-
Notifications
You must be signed in to change notification settings - Fork 3
Delete user functionality (PM-3158) #18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,6 +8,7 @@ module.exports = { | |
| API_VERSION: process.env.API_VERSION || 'v6', | ||
| AUTH_SECRET: process.env.AUTH_SECRET || 'mysecret', | ||
| VALID_ISSUERS: process.env.VALID_ISSUERS || '["https://api.topcoder-dev.com", "https://api.topcoder.com", "https://topcoder-dev.auth0.com/", "https://auth.topcoder-dev.com/"]', | ||
| IDENTITY_DB_URL: process.env.IDENTITY_DB_URL, | ||
|
|
||
| // used to get M2M token | ||
| AUTH0_URL: process.env.AUTH0_URL, | ||
|
|
@@ -69,6 +70,7 @@ module.exports = { | |
| ALL: process.env.SCOPE_MEMBERS_ALL || 'all:user_profiles' | ||
| } | ||
| }, | ||
| DELETE_USER_SCOPE: process.env.SCOPE_DELETE_USER || 'delete:user', | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [❗❗ |
||
|
|
||
| // Member identifiable info fields, copilots, admins, or M2M can get these fields | ||
| // Anyone in the constants.AUTOCOMPLETE_ROLES will have access to these fields | ||
|
|
@@ -123,4 +125,10 @@ module.exports = { | |
| USERFLOW: process.env.USERFLOW_PRIVATE_KEY | ||
| }, | ||
| MEMBER_SERVICE_PRISMA_TIMEOUT: process.env.MEMBER_SERVICE_PRISMA_TIMEOUT ? parseInt(process.env.MEMBER_SERVICE_PRISMA_TIMEOUT, 10) : 10000, | ||
|
|
||
| MAILCHIMP: { | ||
| API_KEY: process.env.MAILCHIMP_API_KEY, | ||
| SERVER_PREFIX: process.env.MAILCHIMP_SERVER_PREFIX, | ||
| LIST_FETCH_COUNT: process.env.MAILCHIMP_LIST_FETCH_COUNT ? Number(process.env.MAILCHIMP_LIST_FETCH_COUNT) : 1000 | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [ |
||
| } | ||
| } | ||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| export * from "./index" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
|
|
||
| /* !!! This is code generated by Prisma. Do not edit directly. !!! | ||
| /* eslint-disable */ | ||
| module.exports = { ...require('.') } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| export * from "./index" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
|
|
||
| /* !!! This is code generated by Prisma. Do not edit directly. !!! | ||
| /* eslint-disable */ | ||
| module.exports = { ...require('.') } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| export * from "./default" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,201 @@ | ||
|
|
||
| /* !!! This is code generated by Prisma. Do not edit directly. !!! | ||
| /* eslint-disable */ | ||
|
|
||
| Object.defineProperty(exports, "__esModule", { value: true }); | ||
|
|
||
| const { | ||
| PrismaClientKnownRequestError, | ||
| PrismaClientUnknownRequestError, | ||
| PrismaClientRustPanicError, | ||
| PrismaClientInitializationError, | ||
| PrismaClientValidationError, | ||
| getPrismaClient, | ||
| sqltag, | ||
| empty, | ||
| join, | ||
| raw, | ||
| skip, | ||
| Decimal, | ||
| Debug, | ||
| objectEnumValues, | ||
| makeStrictEnum, | ||
| Extensions, | ||
| warnOnce, | ||
| defineDmmfProperty, | ||
| Public, | ||
| getRuntime, | ||
| createParam, | ||
| } = require('./runtime/edge.js') | ||
|
|
||
|
|
||
| const Prisma = {} | ||
|
|
||
| exports.Prisma = Prisma | ||
| exports.$Enums = {} | ||
|
|
||
| /** | ||
| * Prisma Client JS version: 6.13.0 | ||
| * Query Engine version: 361e86d0ea4987e9f53a565309b3eed797a6bcbd | ||
| */ | ||
| Prisma.prismaVersion = { | ||
| client: "6.13.0", | ||
| engine: "361e86d0ea4987e9f53a565309b3eed797a6bcbd" | ||
| } | ||
|
|
||
| Prisma.PrismaClientKnownRequestError = PrismaClientKnownRequestError; | ||
| Prisma.PrismaClientUnknownRequestError = PrismaClientUnknownRequestError | ||
| Prisma.PrismaClientRustPanicError = PrismaClientRustPanicError | ||
| Prisma.PrismaClientInitializationError = PrismaClientInitializationError | ||
| Prisma.PrismaClientValidationError = PrismaClientValidationError | ||
| Prisma.Decimal = Decimal | ||
|
|
||
| /** | ||
| * Re-export of sql-template-tag | ||
| */ | ||
| Prisma.sql = sqltag | ||
| Prisma.empty = empty | ||
| Prisma.join = join | ||
| Prisma.raw = raw | ||
| Prisma.validator = Public.validator | ||
|
|
||
| /** | ||
| * Extensions | ||
| */ | ||
| Prisma.getExtensionContext = Extensions.getExtensionContext | ||
| Prisma.defineExtension = Extensions.defineExtension | ||
|
|
||
| /** | ||
| * Shorthand utilities for JSON filtering | ||
| */ | ||
| Prisma.DbNull = objectEnumValues.instances.DbNull | ||
| Prisma.JsonNull = objectEnumValues.instances.JsonNull | ||
| Prisma.AnyNull = objectEnumValues.instances.AnyNull | ||
|
|
||
| Prisma.NullTypes = { | ||
| DbNull: objectEnumValues.classes.DbNull, | ||
| JsonNull: objectEnumValues.classes.JsonNull, | ||
| AnyNull: objectEnumValues.classes.AnyNull | ||
| } | ||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
| /** | ||
| * Enums | ||
| */ | ||
| exports.Prisma.TransactionIsolationLevel = makeStrictEnum({ | ||
| ReadUncommitted: 'ReadUncommitted', | ||
| ReadCommitted: 'ReadCommitted', | ||
| RepeatableRead: 'RepeatableRead', | ||
| Serializable: 'Serializable' | ||
| }); | ||
|
|
||
| exports.Prisma.UserScalarFieldEnum = { | ||
| user_id: 'user_id', | ||
| handle: 'handle', | ||
| handle_lower: 'handle_lower', | ||
| modify_date: 'modify_date', | ||
| status: 'status' | ||
| }; | ||
|
|
||
| exports.Prisma.EmailScalarFieldEnum = { | ||
| email_id: 'email_id', | ||
| user_id: 'user_id', | ||
| address: 'address', | ||
| modify_date: 'modify_date' | ||
| }; | ||
|
|
||
| exports.Prisma.SortOrder = { | ||
| asc: 'asc', | ||
| desc: 'desc' | ||
| }; | ||
|
|
||
| exports.Prisma.QueryMode = { | ||
| default: 'default', | ||
| insensitive: 'insensitive' | ||
| }; | ||
|
|
||
| exports.Prisma.NullsOrder = { | ||
| first: 'first', | ||
| last: 'last' | ||
| }; | ||
|
|
||
|
|
||
| exports.Prisma.ModelName = { | ||
| user: 'user', | ||
| email: 'email' | ||
| }; | ||
| /** | ||
| * Create the Client | ||
| */ | ||
| const config = { | ||
| "generator": { | ||
| "name": "identityClient", | ||
| "provider": { | ||
| "fromEnvVar": null, | ||
| "value": "prisma-client-js" | ||
| }, | ||
| "output": { | ||
| "value": "/home/jmgasper/Documents/Git/v6/member-api-v6/prisma/generated/identity-client", | ||
| "fromEnvVar": null | ||
| }, | ||
| "config": { | ||
| "engineType": "library" | ||
| }, | ||
| "binaryTargets": [ | ||
| { | ||
| "fromEnvVar": null, | ||
| "value": "debian-openssl-3.0.x", | ||
| "native": true | ||
| } | ||
| ], | ||
| "previewFeatures": [], | ||
| "sourceFilePath": "/home/jmgasper/Documents/Git/v6/member-api-v6/prisma/identity-schema.prisma", | ||
| "isCustomOutput": true | ||
| }, | ||
| "relativeEnvPaths": { | ||
| "rootEnvPath": null | ||
| }, | ||
| "relativePath": "../..", | ||
| "clientVersion": "6.13.0", | ||
| "engineVersion": "361e86d0ea4987e9f53a565309b3eed797a6bcbd", | ||
| "datasourceNames": [ | ||
| "identitydb" | ||
| ], | ||
| "activeProvider": "postgresql", | ||
| "postinstall": false, | ||
| "inlineDatasources": { | ||
| "identitydb": { | ||
| "url": { | ||
| "fromEnvVar": "IDENTITY_DB_URL", | ||
| "value": null | ||
| } | ||
| } | ||
| }, | ||
| "inlineSchema": "generator identityClient {\n provider = \"prisma-client-js\"\n output = \"./generated/identity-client\"\n}\n\ndatasource identitydb {\n provider = \"postgresql\"\n url = env(\"IDENTITY_DB_URL\")\n schemas = [\"identity\"]\n}\n\nmodel user {\n user_id Decimal @id(map: \"u175_45\") @default(dbgenerated(\"nextval('sequence_user_seq'::regclass)\")) @identitydb.Decimal(10, 0)\n handle String @identitydb.VarChar(50)\n handle_lower String? @identitydb.VarChar(50)\n modify_date DateTime? @default(now()) @identitydb.Timestamp(6)\n status String @identitydb.VarChar(3)\n\n @@index([handle])\n @@index([handle_lower], map: \"user_lower_handle_idx\")\n @@index([status, handle_lower])\n @@map(\"user\")\n @@schema(\"identity\")\n}\n\nmodel email {\n email_id Decimal @id(map: \"u110_23\") @default(dbgenerated(\"nextval('sequence_email_seq'::regclass)\")) @identitydb.Decimal(10, 0)\n user_id Decimal? @identitydb.Decimal(10, 0)\n address String? @identitydb.VarChar(100)\n modify_date DateTime? @default(now()) @identitydb.Timestamp(6)\n\n @@index([user_id], map: \"email_user_id_idx\")\n @@index([address])\n @@map(\"email\")\n @@schema(\"identity\")\n}\n", | ||
| "inlineSchemaHash": "c5a596f0918d1322e0688539e5f1dd09423833ad2a87dca3d89817938caeaaf8", | ||
| "copyEngine": true | ||
| } | ||
| config.dirname = '/' | ||
|
|
||
| config.runtimeDataModel = JSON.parse("{\"models\":{\"user\":{\"dbName\":\"user\",\"schema\":\"identity\",\"fields\":[{\"name\":\"user_id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Decimal\",\"nativeType\":[\"Decimal\",[\"10\",\"0\"]],\"default\":{\"name\":\"dbgenerated\",\"args\":[\"nextval('sequence_user_seq'::regclass)\"]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"handle\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":[\"VarChar\",[\"50\"]],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"handle_lower\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":[\"VarChar\",[\"50\"]],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"modify_date\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":[\"Timestamp\",[\"6\"]],\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"status\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":[\"VarChar\",[\"3\"]],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"email\":{\"dbName\":\"email\",\"schema\":\"identity\",\"fields\":[{\"name\":\"email_id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Decimal\",\"nativeType\":[\"Decimal\",[\"10\",\"0\"]],\"default\":{\"name\":\"dbgenerated\",\"args\":[\"nextval('sequence_email_seq'::regclass)\"]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"user_id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Decimal\",\"nativeType\":[\"Decimal\",[\"10\",\"0\"]],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"address\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":[\"VarChar\",[\"100\"]],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"modify_date\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":[\"Timestamp\",[\"6\"]],\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false}},\"enums\":{},\"types\":{}}") | ||
| defineDmmfProperty(exports.Prisma, config.runtimeDataModel) | ||
| config.engineWasm = undefined | ||
| config.compilerWasm = undefined | ||
|
|
||
| config.injectableEdgeEnv = () => ({ | ||
| parsed: { | ||
| IDENTITY_DB_URL: typeof globalThis !== 'undefined' && globalThis['IDENTITY_DB_URL'] || typeof process !== 'undefined' && process.env && process.env.IDENTITY_DB_URL || undefined | ||
| } | ||
| }) | ||
|
|
||
| if (typeof globalThis !== 'undefined' && globalThis['DEBUG'] || typeof process !== 'undefined' && process.env && process.env.DEBUG || undefined) { | ||
| Debug.enable(typeof globalThis !== 'undefined' && globalThis['DEBUG'] || typeof process !== 'undefined' && process.env && process.env.DEBUG || undefined) | ||
| } | ||
|
|
||
| const PrismaClient = getPrismaClient(config) | ||
| exports.PrismaClient = PrismaClient | ||
| Object.assign(exports, Prisma) | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[❗❗
correctness]The
IDENTITY_DB_URLis added without a default value. Ensure that this environment variable is always set in all environments to prevent potential runtime errors.