@constructive-sdk/cli 1.20.9 → 1.20.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. package/auth/cli/commands/send-step-up-code.d.ts +8 -0
  2. package/auth/cli/commands/send-step-up-code.js +36 -0
  3. package/auth/cli/commands/verify-step-up-code.d.ts +8 -0
  4. package/auth/cli/commands/verify-step-up-code.js +36 -0
  5. package/auth/cli/commands.js +5 -1
  6. package/auth/cli/executor.d.ts +10 -0
  7. package/auth/orm/index.d.ts +10 -0
  8. package/auth/orm/input-types.d.ts +26 -0
  9. package/auth/orm/mutation/index.d.ts +17 -1
  10. package/auth/orm/mutation/index.js +24 -0
  11. package/compute/cli/commands/database-function-graph-execution-cancel-request.d.ts +8 -0
  12. package/compute/cli/commands/database-function-graph-execution-cancel-request.js +262 -0
  13. package/compute/cli/commands/function-graph-execution-cancel-request.d.ts +8 -0
  14. package/compute/cli/commands/function-graph-execution-cancel-request.js +262 -0
  15. package/compute/cli/commands/function-invocations-create-page.d.ts +8 -0
  16. package/compute/cli/commands/function-invocations-create-page.js +36 -0
  17. package/compute/cli/commands/platform-function-invocations-create-page.d.ts +8 -0
  18. package/compute/cli/commands/platform-function-invocations-create-page.js +36 -0
  19. package/compute/cli/commands.js +9 -1
  20. package/compute/cli/executor.d.ts +12 -0
  21. package/compute/orm/index.d.ts +14 -0
  22. package/compute/orm/index.js +4 -0
  23. package/compute/orm/input-types.d.ts +298 -4
  24. package/compute/orm/models/databaseFunctionGraphExecutionCancelRequest.d.ts +54 -0
  25. package/compute/orm/models/databaseFunctionGraphExecutionCancelRequest.js +104 -0
  26. package/compute/orm/models/functionGraphExecutionCancelRequest.d.ts +54 -0
  27. package/compute/orm/models/functionGraphExecutionCancelRequest.js +104 -0
  28. package/compute/orm/models/index.d.ts +2 -0
  29. package/compute/orm/models/index.js +7 -3
  30. package/compute/orm/mutation/index.d.ts +17 -1
  31. package/compute/orm/mutation/index.js +24 -0
  32. package/esm/auth/cli/commands/send-step-up-code.d.ts +8 -0
  33. package/esm/auth/cli/commands/send-step-up-code.js +34 -0
  34. package/esm/auth/cli/commands/verify-step-up-code.d.ts +8 -0
  35. package/esm/auth/cli/commands/verify-step-up-code.js +34 -0
  36. package/esm/auth/cli/commands.js +5 -1
  37. package/esm/auth/cli/executor.d.ts +10 -0
  38. package/esm/auth/orm/index.d.ts +10 -0
  39. package/esm/auth/orm/input-types.d.ts +26 -0
  40. package/esm/auth/orm/mutation/index.d.ts +17 -1
  41. package/esm/auth/orm/mutation/index.js +24 -0
  42. package/esm/compute/cli/commands/database-function-graph-execution-cancel-request.d.ts +8 -0
  43. package/esm/compute/cli/commands/database-function-graph-execution-cancel-request.js +260 -0
  44. package/esm/compute/cli/commands/function-graph-execution-cancel-request.d.ts +8 -0
  45. package/esm/compute/cli/commands/function-graph-execution-cancel-request.js +260 -0
  46. package/esm/compute/cli/commands/function-invocations-create-page.d.ts +8 -0
  47. package/esm/compute/cli/commands/function-invocations-create-page.js +34 -0
  48. package/esm/compute/cli/commands/platform-function-invocations-create-page.d.ts +8 -0
  49. package/esm/compute/cli/commands/platform-function-invocations-create-page.js +34 -0
  50. package/esm/compute/cli/commands.js +9 -1
  51. package/esm/compute/cli/executor.d.ts +12 -0
  52. package/esm/compute/orm/index.d.ts +14 -0
  53. package/esm/compute/orm/index.js +4 -0
  54. package/esm/compute/orm/input-types.d.ts +298 -4
  55. package/esm/compute/orm/models/databaseFunctionGraphExecutionCancelRequest.d.ts +54 -0
  56. package/esm/compute/orm/models/databaseFunctionGraphExecutionCancelRequest.js +100 -0
  57. package/esm/compute/orm/models/functionGraphExecutionCancelRequest.d.ts +54 -0
  58. package/esm/compute/orm/models/functionGraphExecutionCancelRequest.js +100 -0
  59. package/esm/compute/orm/models/index.d.ts +2 -0
  60. package/esm/compute/orm/models/index.js +2 -0
  61. package/esm/compute/orm/mutation/index.d.ts +17 -1
  62. package/esm/compute/orm/mutation/index.js +24 -0
  63. package/package.json +2 -2
@@ -0,0 +1,8 @@
1
+ /**
2
+ * CLI command for mutation sendStepUpCode
3
+ * @generated by @constructive-io/graphql-codegen
4
+ * DO NOT EDIT - changes will be overwritten
5
+ */
6
+ import { CLIOptions, Inquirerer } from 'inquirerer';
7
+ declare const _default: (argv: Partial<Record<string, unknown>>, prompter: Inquirerer, _options: CLIOptions) => Promise<void>;
8
+ export default _default;
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const executor_1 = require("../executor");
4
+ const utils_1 = require("../utils");
5
+ exports.default = async (argv, prompter, _options) => {
6
+ try {
7
+ if (argv.help || argv.h) {
8
+ console.log('send-step-up-code - sendStepUpCode\n\nUsage: send-step-up-code [OPTIONS]\n');
9
+ process.exit(0);
10
+ }
11
+ const answers = await prompter.prompt(argv, [
12
+ {
13
+ type: 'text',
14
+ name: 'input',
15
+ message: 'The exclusive input argument for this mutation. An object type, make sure to see documentation for this object\u2019s fields.',
16
+ required: true,
17
+ },
18
+ ]);
19
+ const client = (0, executor_1.getClient)();
20
+ const parsedAnswers = (0, utils_1.unflattenDotNotation)(answers);
21
+ const selectFields = (0, utils_1.buildSelectFromPaths)(argv.select ?? 'clientMutationId');
22
+ const result = await client.mutation
23
+ .sendStepUpCode(parsedAnswers, {
24
+ select: selectFields,
25
+ })
26
+ .execute();
27
+ console.log(JSON.stringify(result, null, 2));
28
+ }
29
+ catch (error) {
30
+ console.error('Failed: sendStepUpCode');
31
+ if (error instanceof Error) {
32
+ console.error(error.message);
33
+ }
34
+ process.exit(1);
35
+ }
36
+ };
@@ -0,0 +1,8 @@
1
+ /**
2
+ * CLI command for mutation verifyStepUpCode
3
+ * @generated by @constructive-io/graphql-codegen
4
+ * DO NOT EDIT - changes will be overwritten
5
+ */
6
+ import { CLIOptions, Inquirerer } from 'inquirerer';
7
+ declare const _default: (argv: Partial<Record<string, unknown>>, prompter: Inquirerer, _options: CLIOptions) => Promise<void>;
8
+ export default _default;
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const executor_1 = require("../executor");
4
+ const utils_1 = require("../utils");
5
+ exports.default = async (argv, prompter, _options) => {
6
+ try {
7
+ if (argv.help || argv.h) {
8
+ console.log('verify-step-up-code - verifyStepUpCode\n\nUsage: verify-step-up-code [OPTIONS]\n');
9
+ process.exit(0);
10
+ }
11
+ const answers = await prompter.prompt(argv, [
12
+ {
13
+ type: 'text',
14
+ name: 'input',
15
+ message: 'The exclusive input argument for this mutation. An object type, make sure to see documentation for this object\u2019s fields.',
16
+ required: true,
17
+ },
18
+ ]);
19
+ const client = (0, executor_1.getClient)();
20
+ const parsedAnswers = (0, utils_1.unflattenDotNotation)(answers);
21
+ const selectFields = (0, utils_1.buildSelectFromPaths)(argv.select ?? 'clientMutationId');
22
+ const result = await client.mutation
23
+ .verifyStepUpCode(parsedAnswers, {
24
+ select: selectFields,
25
+ })
26
+ .execute();
27
+ console.log(JSON.stringify(result, null, 2));
28
+ }
29
+ catch (error) {
30
+ console.error('Failed: verifyStepUpCode');
31
+ if (error instanceof Error) {
32
+ console.error(error.message);
33
+ }
34
+ process.exit(1);
35
+ }
36
+ };
@@ -69,6 +69,7 @@ const send_account_deletion_email_1 = __importDefault(require("./commands/send-a
69
69
  const send_mfa_challenge_code_1 = __importDefault(require("./commands/send-mfa-challenge-code"));
70
70
  const send_phone_verification_code_1 = __importDefault(require("./commands/send-phone-verification-code"));
71
71
  const send_sms_otp_1 = __importDefault(require("./commands/send-sms-otp"));
72
+ const send_step_up_code_1 = __importDefault(require("./commands/send-step-up-code"));
72
73
  const send_verification_email_1 = __importDefault(require("./commands/send-verification-email"));
73
74
  const set_password_1 = __importDefault(require("./commands/set-password"));
74
75
  const set_principal_entities_1 = __importDefault(require("./commands/set-principal-entities"));
@@ -85,6 +86,7 @@ const update_principal_1 = __importDefault(require("./commands/update-principal"
85
86
  const verify_email_1 = __importDefault(require("./commands/verify-email"));
86
87
  const verify_password_1 = __importDefault(require("./commands/verify-password"));
87
88
  const verify_phone_1 = __importDefault(require("./commands/verify-phone"));
89
+ const verify_step_up_code_1 = __importDefault(require("./commands/verify-step-up-code"));
88
90
  const verify_totp_1 = __importDefault(require("./commands/verify-totp"));
89
91
  const createCommandMap = () => ({
90
92
  context: context_1.default,
@@ -146,6 +148,7 @@ const createCommandMap = () => ({
146
148
  'send-mfa-challenge-code': send_mfa_challenge_code_1.default,
147
149
  'send-phone-verification-code': send_phone_verification_code_1.default,
148
150
  'send-sms-otp': send_sms_otp_1.default,
151
+ 'send-step-up-code': send_step_up_code_1.default,
149
152
  'send-verification-email': send_verification_email_1.default,
150
153
  'set-password': set_password_1.default,
151
154
  'set-principal-entities': set_principal_entities_1.default,
@@ -162,9 +165,10 @@ const createCommandMap = () => ({
162
165
  'verify-email': verify_email_1.default,
163
166
  'verify-password': verify_password_1.default,
164
167
  'verify-phone': verify_phone_1.default,
168
+ 'verify-step-up-code': verify_step_up_code_1.default,
165
169
  'verify-totp': verify_totp_1.default,
166
170
  });
167
- const usage = '\ncsdk <command>\n\nCommands:\n context Manage API contexts\n auth Manage authentication\n audit-log-auth auditLogAuth CRUD operations\n crypto-address cryptoAddress CRUD operations\n email email CRUD operations\n identity-provider identityProvider CRUD operations\n org-api-key-list orgApiKeyList CRUD operations\n phone-number phoneNumber CRUD operations\n principal principal CRUD operations\n principal-entity principalEntity CRUD operations\n principal-scope-override principalScopeOverride CRUD operations\n role-type roleType CRUD operations\n user-connected-account userConnectedAccount CRUD operations\n user user CRUD operations\n user-setting userSetting CRUD operations\n user-settings-security userSettingsSecurity CRUD operations\n webauthn-credential webauthnCredential CRUD operations\n current-ip-address currentIpAddress\n current-user currentUser\n current-user-agent currentUserAgent\n current-user-id currentUserId\n get-mfa-status getMfaStatus\n require-step-up requireStepUp\n approve-device approveDevice\n check-password checkPassword\n complete-mfa-challenge completeMfaChallenge\n confirm-delete-account confirmDeleteAccount\n confirm-totp-setup confirmTotpSetup\n create-api-key createApiKey\n create-child-principal createChildPrincipal\n create-org-api-key createOrgApiKey\n create-org-principal createOrgPrincipal\n create-principal-from-preset createPrincipalFromPreset\n delete-org-principal deleteOrgPrincipal\n delete-principal deletePrincipal\n disable-email-mfa disableEmailMfa\n disable-sms-mfa disableSmsMfa\n disable-totp disableTotp\n disconnect-account disconnectAccount\n enable-email-mfa enableEmailMfa\n enable-sms-mfa enableSmsMfa\n enable-totp enableTotp\n extend-token-expires extendTokenExpires\n forgot-password forgotPassword\n generate-backup-codes generateBackupCodes\n link-identity linkIdentity\n mint-access-token mintAccessToken\n provision-bucket Reconcile an S3 bucket for a logical bucket in the database.\nReads the bucket config via RLS, then enqueues the same\nstorage:provision_bucket job used by the INSERT trigger. This is\nidempotent for an already-reconciled bucket; enqueue failures become\nGraphQL errors.\n refresh-access-token refreshAccessToken\n request-cross-origin-token requestCrossOriginToken\n request-magic-link requestMagicLink\n reset-password resetPassword\n revoke-api-key revokeApiKey\n revoke-org-api-key revokeOrgApiKey\n revoke-session revokeSession\n send-account-deletion-email sendAccountDeletionEmail\n send-mfa-challenge-code sendMfaChallengeCode\n send-phone-verification-code sendPhoneVerificationCode\n send-sms-otp sendSmsOtp\n send-verification-email sendVerificationEmail\n set-password setPassword\n set-principal-entities setPrincipalEntities\n set-principal-scope setPrincipalScope\n sign-in signIn\n sign-in-cross-origin signInCrossOrigin\n sign-in-magic-link signInMagicLink\n sign-in-sms-otp signInSmsOtp\n sign-out signOut\n sign-up signUp\n sign-up-magic-link signUpMagicLink\n sign-up-sms signUpSms\n update-principal updatePrincipal\n verify-email verifyEmail\n verify-password verifyPassword\n verify-phone verifyPhone\n verify-totp verifyTotp\n\n --help, -h Show this help message\n --version, -v Show version\n';
171
+ const usage = '\ncsdk <command>\n\nCommands:\n context Manage API contexts\n auth Manage authentication\n audit-log-auth auditLogAuth CRUD operations\n crypto-address cryptoAddress CRUD operations\n email email CRUD operations\n identity-provider identityProvider CRUD operations\n org-api-key-list orgApiKeyList CRUD operations\n phone-number phoneNumber CRUD operations\n principal principal CRUD operations\n principal-entity principalEntity CRUD operations\n principal-scope-override principalScopeOverride CRUD operations\n role-type roleType CRUD operations\n user-connected-account userConnectedAccount CRUD operations\n user user CRUD operations\n user-setting userSetting CRUD operations\n user-settings-security userSettingsSecurity CRUD operations\n webauthn-credential webauthnCredential CRUD operations\n current-ip-address currentIpAddress\n current-user currentUser\n current-user-agent currentUserAgent\n current-user-id currentUserId\n get-mfa-status getMfaStatus\n require-step-up requireStepUp\n approve-device approveDevice\n check-password checkPassword\n complete-mfa-challenge completeMfaChallenge\n confirm-delete-account confirmDeleteAccount\n confirm-totp-setup confirmTotpSetup\n create-api-key createApiKey\n create-child-principal createChildPrincipal\n create-org-api-key createOrgApiKey\n create-org-principal createOrgPrincipal\n create-principal-from-preset createPrincipalFromPreset\n delete-org-principal deleteOrgPrincipal\n delete-principal deletePrincipal\n disable-email-mfa disableEmailMfa\n disable-sms-mfa disableSmsMfa\n disable-totp disableTotp\n disconnect-account disconnectAccount\n enable-email-mfa enableEmailMfa\n enable-sms-mfa enableSmsMfa\n enable-totp enableTotp\n extend-token-expires extendTokenExpires\n forgot-password forgotPassword\n generate-backup-codes generateBackupCodes\n link-identity linkIdentity\n mint-access-token mintAccessToken\n provision-bucket Reconcile an S3 bucket for a logical bucket in the database.\nReads the bucket config via RLS, then enqueues the same\nstorage:provision_bucket job used by the INSERT trigger. This is\nidempotent for an already-reconciled bucket; enqueue failures become\nGraphQL errors.\n refresh-access-token refreshAccessToken\n request-cross-origin-token requestCrossOriginToken\n request-magic-link requestMagicLink\n reset-password resetPassword\n revoke-api-key revokeApiKey\n revoke-org-api-key revokeOrgApiKey\n revoke-session revokeSession\n send-account-deletion-email sendAccountDeletionEmail\n send-mfa-challenge-code sendMfaChallengeCode\n send-phone-verification-code sendPhoneVerificationCode\n send-sms-otp sendSmsOtp\n send-step-up-code sendStepUpCode\n send-verification-email sendVerificationEmail\n set-password setPassword\n set-principal-entities setPrincipalEntities\n set-principal-scope setPrincipalScope\n sign-in signIn\n sign-in-cross-origin signInCrossOrigin\n sign-in-magic-link signInMagicLink\n sign-in-sms-otp signInSmsOtp\n sign-out signOut\n sign-up signUp\n sign-up-magic-link signUpMagicLink\n sign-up-sms signUpSms\n update-principal updatePrincipal\n verify-email verifyEmail\n verify-password verifyPassword\n verify-phone verifyPhone\n verify-step-up-code verifyStepUpCode\n verify-totp verifyTotp\n\n --help, -h Show this help message\n --version, -v Show version\n';
168
172
  const commands = async (argv, prompter, options) => {
169
173
  if (argv.help || argv.h) {
170
174
  console.log(usage);
@@ -228,6 +228,11 @@ export declare function getClient(contextName?: string): {
228
228
  } & import("../orm").StrictSelect<S, import("../orm/input-types").SendSmsOtpPayloadSelect>) => import("../orm").QueryBuilder<{
229
229
  sendSmsOtp: import("../orm").InferSelectResult<import("../orm/input-types").SendSmsOtpPayload, S> | null;
230
230
  }>;
231
+ sendStepUpCode: <S extends import("../orm/input-types").SendStepUpCodePayloadSelect>(args: import("../orm/mutation").SendStepUpCodeVariables, options: {
232
+ select: S;
233
+ } & import("../orm").StrictSelect<S, import("../orm/input-types").SendStepUpCodePayloadSelect>) => import("../orm").QueryBuilder<{
234
+ sendStepUpCode: import("../orm").InferSelectResult<import("../orm/input-types").SendStepUpCodePayload, S> | null;
235
+ }>;
231
236
  sendVerificationEmail: <S extends import("../orm/input-types").SendVerificationEmailPayloadSelect>(args: import("../orm/mutation").SendVerificationEmailVariables, options: {
232
237
  select: S;
233
238
  } & import("../orm").StrictSelect<S, import("../orm/input-types").SendVerificationEmailPayloadSelect>) => import("../orm").QueryBuilder<{
@@ -308,6 +313,11 @@ export declare function getClient(contextName?: string): {
308
313
  } & import("../orm").StrictSelect<S, import("../orm/input-types").VerifyPhonePayloadSelect>) => import("../orm").QueryBuilder<{
309
314
  verifyPhone: import("../orm").InferSelectResult<import("../orm/input-types").VerifyPhonePayload, S> | null;
310
315
  }>;
316
+ verifyStepUpCode: <S extends import("../orm/input-types").VerifyStepUpCodePayloadSelect>(args: import("../orm/mutation").VerifyStepUpCodeVariables, options: {
317
+ select: S;
318
+ } & import("../orm").StrictSelect<S, import("../orm/input-types").VerifyStepUpCodePayloadSelect>) => import("../orm").QueryBuilder<{
319
+ verifyStepUpCode: import("../orm").InferSelectResult<import("../orm/input-types").VerifyStepUpCodePayload, S> | null;
320
+ }>;
311
321
  verifyTotp: <S extends import("../orm/input-types").VerifyTotpPayloadSelect>(args: import("../orm/mutation").VerifyTotpVariables, options: {
312
322
  select: S;
313
323
  } & import("../orm").StrictSelect<S, import("../orm/input-types").VerifyTotpPayloadSelect>) => import("../orm").QueryBuilder<{
@@ -273,6 +273,11 @@ export declare function createClient(config: OrmClientConfig): {
273
273
  } & import("./select-types").StrictSelect<S, import("./input-types").SendSmsOtpPayloadSelect>) => import("./query-builder").QueryBuilder<{
274
274
  sendSmsOtp: import("./select-types").InferSelectResult<import("./input-types").SendSmsOtpPayload, S> | null;
275
275
  }>;
276
+ sendStepUpCode: <S extends import("./input-types").SendStepUpCodePayloadSelect>(args: import("./mutation").SendStepUpCodeVariables, options: {
277
+ select: S;
278
+ } & import("./select-types").StrictSelect<S, import("./input-types").SendStepUpCodePayloadSelect>) => import("./query-builder").QueryBuilder<{
279
+ sendStepUpCode: import("./select-types").InferSelectResult<import("./input-types").SendStepUpCodePayload, S> | null;
280
+ }>;
276
281
  sendVerificationEmail: <S extends import("./input-types").SendVerificationEmailPayloadSelect>(args: import("./mutation").SendVerificationEmailVariables, options: {
277
282
  select: S;
278
283
  } & import("./select-types").StrictSelect<S, import("./input-types").SendVerificationEmailPayloadSelect>) => import("./query-builder").QueryBuilder<{
@@ -353,6 +358,11 @@ export declare function createClient(config: OrmClientConfig): {
353
358
  } & import("./select-types").StrictSelect<S, import("./input-types").VerifyPhonePayloadSelect>) => import("./query-builder").QueryBuilder<{
354
359
  verifyPhone: import("./select-types").InferSelectResult<import("./input-types").VerifyPhonePayload, S> | null;
355
360
  }>;
361
+ verifyStepUpCode: <S extends import("./input-types").VerifyStepUpCodePayloadSelect>(args: import("./mutation").VerifyStepUpCodeVariables, options: {
362
+ select: S;
363
+ } & import("./select-types").StrictSelect<S, import("./input-types").VerifyStepUpCodePayloadSelect>) => import("./query-builder").QueryBuilder<{
364
+ verifyStepUpCode: import("./select-types").InferSelectResult<import("./input-types").VerifyStepUpCodePayload, S> | null;
365
+ }>;
356
366
  verifyTotp: <S extends import("./input-types").VerifyTotpPayloadSelect>(args: import("./mutation").VerifyTotpVariables, options: {
357
367
  select: S;
358
368
  } & import("./select-types").StrictSelect<S, import("./input-types").VerifyTotpPayloadSelect>) => import("./query-builder").QueryBuilder<{
@@ -1884,6 +1884,10 @@ export interface SendSmsOtpInput {
1884
1884
  clientMutationId?: string;
1885
1885
  phone?: string;
1886
1886
  }
1887
+ export interface SendStepUpCodeInput {
1888
+ clientMutationId?: string;
1889
+ method?: string;
1890
+ }
1887
1891
  export interface SendVerificationEmailInput {
1888
1892
  clientMutationId?: string;
1889
1893
  email?: ConstructiveInternalTypeEmail;
@@ -1980,6 +1984,10 @@ export interface VerifyPhoneInput {
1980
1984
  code?: string;
1981
1985
  phone?: string;
1982
1986
  }
1987
+ export interface VerifyStepUpCodeInput {
1988
+ clientMutationId?: string;
1989
+ code: string;
1990
+ }
1983
1991
  export interface VerifyTotpInput {
1984
1992
  clientMutationId?: string;
1985
1993
  totpValue: string;
@@ -3619,6 +3627,14 @@ export type SendSmsOtpPayloadSelect = {
3619
3627
  clientMutationId?: boolean;
3620
3628
  result?: boolean;
3621
3629
  };
3630
+ export interface SendStepUpCodePayload {
3631
+ clientMutationId?: string | null;
3632
+ result?: string | null;
3633
+ }
3634
+ export type SendStepUpCodePayloadSelect = {
3635
+ clientMutationId?: boolean;
3636
+ result?: boolean;
3637
+ };
3622
3638
  export interface SendVerificationEmailPayload {
3623
3639
  clientMutationId?: string | null;
3624
3640
  result?: boolean | null;
@@ -3759,6 +3775,14 @@ export type VerifyPhonePayloadSelect = {
3759
3775
  clientMutationId?: boolean;
3760
3776
  result?: boolean;
3761
3777
  };
3778
+ export interface VerifyStepUpCodePayload {
3779
+ clientMutationId?: string | null;
3780
+ result?: boolean | null;
3781
+ }
3782
+ export type VerifyStepUpCodePayloadSelect = {
3783
+ clientMutationId?: boolean;
3784
+ result?: boolean;
3785
+ };
3762
3786
  export interface VerifyTotpPayload {
3763
3787
  clientMutationId?: string | null;
3764
3788
  result?: boolean | null;
@@ -4268,6 +4292,7 @@ export interface SignInRecord {
4268
4292
  isVerified?: boolean | null;
4269
4293
  mfaChallengeToken?: string | null;
4270
4294
  mfaRequired?: boolean | null;
4295
+ mfaSetupRequired?: boolean | null;
4271
4296
  outDeviceToken?: string | null;
4272
4297
  totpEnabled?: boolean | null;
4273
4298
  userId?: string | null;
@@ -4280,6 +4305,7 @@ export type SignInRecordSelect = {
4280
4305
  isVerified?: boolean;
4281
4306
  mfaChallengeToken?: boolean;
4282
4307
  mfaRequired?: boolean;
4308
+ mfaSetupRequired?: boolean;
4283
4309
  outDeviceToken?: boolean;
4284
4310
  totpEnabled?: boolean;
4285
4311
  userId?: boolean;
@@ -6,7 +6,7 @@
6
6
  import { OrmClient } from '../client';
7
7
  import { QueryBuilder } from '../query-builder';
8
8
  import type { InferSelectResult, StrictSelect } from '../select-types';
9
- import type { ApproveDeviceInput, CheckPasswordInput, CompleteMfaChallengeInput, ConfirmDeleteAccountInput, ConfirmTotpSetupInput, CreateApiKeyInput, CreateChildPrincipalInput, CreateOrgApiKeyInput, CreateOrgPrincipalInput, CreatePrincipalFromPresetInput, DeleteOrgPrincipalInput, DeletePrincipalInput, DisableEmailMfaInput, DisableSmsMfaInput, DisableTotpInput, DisconnectAccountInput, EnableEmailMfaInput, EnableSmsMfaInput, EnableTotpInput, ExtendTokenExpiresInput, ForgotPasswordInput, GenerateBackupCodesInput, LinkIdentityInput, MintAccessTokenInput, ProvisionBucketInput, RefreshAccessTokenInput, RequestCrossOriginTokenInput, RequestMagicLinkInput, ResetPasswordInput, RevokeApiKeyInput, RevokeOrgApiKeyInput, RevokeSessionInput, SendAccountDeletionEmailInput, SendMfaChallengeCodeInput, SendPhoneVerificationCodeInput, SendSmsOtpInput, SendVerificationEmailInput, SetPasswordInput, SetPrincipalEntitiesInput, SetPrincipalScopeInput, SignInInput, SignInCrossOriginInput, SignInMagicLinkInput, SignInSmsOtpInput, SignOutInput, SignUpInput, SignUpMagicLinkInput, SignUpSmsInput, UpdatePrincipalInput, VerifyEmailInput, VerifyPasswordInput, VerifyPhoneInput, VerifyTotpInput, ApproveDevicePayload, CheckPasswordPayload, CompleteMfaChallengePayload, ConfirmDeleteAccountPayload, ConfirmTotpSetupPayload, CreateApiKeyPayload, CreateChildPrincipalPayload, CreateOrgApiKeyPayload, CreateOrgPrincipalPayload, CreatePrincipalFromPresetPayload, DeleteOrgPrincipalPayload, DeletePrincipalPayload, DisableEmailMfaPayload, DisableSmsMfaPayload, DisableTotpPayload, DisconnectAccountPayload, EnableEmailMfaPayload, EnableSmsMfaPayload, EnableTotpPayload, ExtendTokenExpiresPayload, ForgotPasswordPayload, GenerateBackupCodesPayload, LinkIdentityPayload, MintAccessTokenPayload, ProvisionBucketPayload, RefreshAccessTokenPayload, RequestCrossOriginTokenPayload, RequestMagicLinkPayload, ResetPasswordPayload, RevokeApiKeyPayload, RevokeOrgApiKeyPayload, RevokeSessionPayload, SendAccountDeletionEmailPayload, SendMfaChallengeCodePayload, SendPhoneVerificationCodePayload, SendSmsOtpPayload, SendVerificationEmailPayload, SetPasswordPayload, SetPrincipalEntitiesPayload, SetPrincipalScopePayload, SignInPayload, SignInCrossOriginPayload, SignInMagicLinkPayload, SignInSmsOtpPayload, SignOutPayload, SignUpPayload, SignUpMagicLinkPayload, SignUpSmsPayload, UpdatePrincipalPayload, VerifyEmailPayload, VerifyPasswordPayload, VerifyPhonePayload, VerifyTotpPayload, ApproveDevicePayloadSelect, CheckPasswordPayloadSelect, CompleteMfaChallengePayloadSelect, ConfirmDeleteAccountPayloadSelect, ConfirmTotpSetupPayloadSelect, CreateApiKeyPayloadSelect, CreateChildPrincipalPayloadSelect, CreateOrgApiKeyPayloadSelect, CreateOrgPrincipalPayloadSelect, CreatePrincipalFromPresetPayloadSelect, DeleteOrgPrincipalPayloadSelect, DeletePrincipalPayloadSelect, DisableEmailMfaPayloadSelect, DisableSmsMfaPayloadSelect, DisableTotpPayloadSelect, DisconnectAccountPayloadSelect, EnableEmailMfaPayloadSelect, EnableSmsMfaPayloadSelect, EnableTotpPayloadSelect, ExtendTokenExpiresPayloadSelect, ForgotPasswordPayloadSelect, GenerateBackupCodesPayloadSelect, LinkIdentityPayloadSelect, MintAccessTokenPayloadSelect, ProvisionBucketPayloadSelect, RefreshAccessTokenPayloadSelect, RequestCrossOriginTokenPayloadSelect, RequestMagicLinkPayloadSelect, ResetPasswordPayloadSelect, RevokeApiKeyPayloadSelect, RevokeOrgApiKeyPayloadSelect, RevokeSessionPayloadSelect, SendAccountDeletionEmailPayloadSelect, SendMfaChallengeCodePayloadSelect, SendPhoneVerificationCodePayloadSelect, SendSmsOtpPayloadSelect, SendVerificationEmailPayloadSelect, SetPasswordPayloadSelect, SetPrincipalEntitiesPayloadSelect, SetPrincipalScopePayloadSelect, SignInPayloadSelect, SignInCrossOriginPayloadSelect, SignInMagicLinkPayloadSelect, SignInSmsOtpPayloadSelect, SignOutPayloadSelect, SignUpPayloadSelect, SignUpMagicLinkPayloadSelect, SignUpSmsPayloadSelect, UpdatePrincipalPayloadSelect, VerifyEmailPayloadSelect, VerifyPasswordPayloadSelect, VerifyPhonePayloadSelect, VerifyTotpPayloadSelect } from '../input-types';
9
+ import type { ApproveDeviceInput, CheckPasswordInput, CompleteMfaChallengeInput, ConfirmDeleteAccountInput, ConfirmTotpSetupInput, CreateApiKeyInput, CreateChildPrincipalInput, CreateOrgApiKeyInput, CreateOrgPrincipalInput, CreatePrincipalFromPresetInput, DeleteOrgPrincipalInput, DeletePrincipalInput, DisableEmailMfaInput, DisableSmsMfaInput, DisableTotpInput, DisconnectAccountInput, EnableEmailMfaInput, EnableSmsMfaInput, EnableTotpInput, ExtendTokenExpiresInput, ForgotPasswordInput, GenerateBackupCodesInput, LinkIdentityInput, MintAccessTokenInput, ProvisionBucketInput, RefreshAccessTokenInput, RequestCrossOriginTokenInput, RequestMagicLinkInput, ResetPasswordInput, RevokeApiKeyInput, RevokeOrgApiKeyInput, RevokeSessionInput, SendAccountDeletionEmailInput, SendMfaChallengeCodeInput, SendPhoneVerificationCodeInput, SendSmsOtpInput, SendStepUpCodeInput, SendVerificationEmailInput, SetPasswordInput, SetPrincipalEntitiesInput, SetPrincipalScopeInput, SignInInput, SignInCrossOriginInput, SignInMagicLinkInput, SignInSmsOtpInput, SignOutInput, SignUpInput, SignUpMagicLinkInput, SignUpSmsInput, UpdatePrincipalInput, VerifyEmailInput, VerifyPasswordInput, VerifyPhoneInput, VerifyStepUpCodeInput, VerifyTotpInput, ApproveDevicePayload, CheckPasswordPayload, CompleteMfaChallengePayload, ConfirmDeleteAccountPayload, ConfirmTotpSetupPayload, CreateApiKeyPayload, CreateChildPrincipalPayload, CreateOrgApiKeyPayload, CreateOrgPrincipalPayload, CreatePrincipalFromPresetPayload, DeleteOrgPrincipalPayload, DeletePrincipalPayload, DisableEmailMfaPayload, DisableSmsMfaPayload, DisableTotpPayload, DisconnectAccountPayload, EnableEmailMfaPayload, EnableSmsMfaPayload, EnableTotpPayload, ExtendTokenExpiresPayload, ForgotPasswordPayload, GenerateBackupCodesPayload, LinkIdentityPayload, MintAccessTokenPayload, ProvisionBucketPayload, RefreshAccessTokenPayload, RequestCrossOriginTokenPayload, RequestMagicLinkPayload, ResetPasswordPayload, RevokeApiKeyPayload, RevokeOrgApiKeyPayload, RevokeSessionPayload, SendAccountDeletionEmailPayload, SendMfaChallengeCodePayload, SendPhoneVerificationCodePayload, SendSmsOtpPayload, SendStepUpCodePayload, SendVerificationEmailPayload, SetPasswordPayload, SetPrincipalEntitiesPayload, SetPrincipalScopePayload, SignInPayload, SignInCrossOriginPayload, SignInMagicLinkPayload, SignInSmsOtpPayload, SignOutPayload, SignUpPayload, SignUpMagicLinkPayload, SignUpSmsPayload, UpdatePrincipalPayload, VerifyEmailPayload, VerifyPasswordPayload, VerifyPhonePayload, VerifyStepUpCodePayload, VerifyTotpPayload, ApproveDevicePayloadSelect, CheckPasswordPayloadSelect, CompleteMfaChallengePayloadSelect, ConfirmDeleteAccountPayloadSelect, ConfirmTotpSetupPayloadSelect, CreateApiKeyPayloadSelect, CreateChildPrincipalPayloadSelect, CreateOrgApiKeyPayloadSelect, CreateOrgPrincipalPayloadSelect, CreatePrincipalFromPresetPayloadSelect, DeleteOrgPrincipalPayloadSelect, DeletePrincipalPayloadSelect, DisableEmailMfaPayloadSelect, DisableSmsMfaPayloadSelect, DisableTotpPayloadSelect, DisconnectAccountPayloadSelect, EnableEmailMfaPayloadSelect, EnableSmsMfaPayloadSelect, EnableTotpPayloadSelect, ExtendTokenExpiresPayloadSelect, ForgotPasswordPayloadSelect, GenerateBackupCodesPayloadSelect, LinkIdentityPayloadSelect, MintAccessTokenPayloadSelect, ProvisionBucketPayloadSelect, RefreshAccessTokenPayloadSelect, RequestCrossOriginTokenPayloadSelect, RequestMagicLinkPayloadSelect, ResetPasswordPayloadSelect, RevokeApiKeyPayloadSelect, RevokeOrgApiKeyPayloadSelect, RevokeSessionPayloadSelect, SendAccountDeletionEmailPayloadSelect, SendMfaChallengeCodePayloadSelect, SendPhoneVerificationCodePayloadSelect, SendSmsOtpPayloadSelect, SendStepUpCodePayloadSelect, SendVerificationEmailPayloadSelect, SetPasswordPayloadSelect, SetPrincipalEntitiesPayloadSelect, SetPrincipalScopePayloadSelect, SignInPayloadSelect, SignInCrossOriginPayloadSelect, SignInMagicLinkPayloadSelect, SignInSmsOtpPayloadSelect, SignOutPayloadSelect, SignUpPayloadSelect, SignUpMagicLinkPayloadSelect, SignUpSmsPayloadSelect, UpdatePrincipalPayloadSelect, VerifyEmailPayloadSelect, VerifyPasswordPayloadSelect, VerifyPhonePayloadSelect, VerifyStepUpCodePayloadSelect, VerifyTotpPayloadSelect } from '../input-types';
10
10
  export interface ApproveDeviceVariables {
11
11
  input: ApproveDeviceInput;
12
12
  }
@@ -123,6 +123,9 @@ export interface SendPhoneVerificationCodeVariables {
123
123
  export interface SendSmsOtpVariables {
124
124
  input: SendSmsOtpInput;
125
125
  }
126
+ export interface SendStepUpCodeVariables {
127
+ input: SendStepUpCodeInput;
128
+ }
126
129
  export interface SendVerificationEmailVariables {
127
130
  input: SendVerificationEmailInput;
128
131
  }
@@ -171,6 +174,9 @@ export interface VerifyPasswordVariables {
171
174
  export interface VerifyPhoneVariables {
172
175
  input: VerifyPhoneInput;
173
176
  }
177
+ export interface VerifyStepUpCodeVariables {
178
+ input: VerifyStepUpCodeInput;
179
+ }
174
180
  export interface VerifyTotpVariables {
175
181
  input: VerifyTotpInput;
176
182
  }
@@ -355,6 +361,11 @@ export declare function createMutationOperations(client: OrmClient): {
355
361
  } & StrictSelect<S, SendSmsOtpPayloadSelect>) => QueryBuilder<{
356
362
  sendSmsOtp: InferSelectResult<SendSmsOtpPayload, S> | null;
357
363
  }>;
364
+ sendStepUpCode: <S extends SendStepUpCodePayloadSelect>(args: SendStepUpCodeVariables, options: {
365
+ select: S;
366
+ } & StrictSelect<S, SendStepUpCodePayloadSelect>) => QueryBuilder<{
367
+ sendStepUpCode: InferSelectResult<SendStepUpCodePayload, S> | null;
368
+ }>;
358
369
  sendVerificationEmail: <S extends SendVerificationEmailPayloadSelect>(args: SendVerificationEmailVariables, options: {
359
370
  select: S;
360
371
  } & StrictSelect<S, SendVerificationEmailPayloadSelect>) => QueryBuilder<{
@@ -435,6 +446,11 @@ export declare function createMutationOperations(client: OrmClient): {
435
446
  } & StrictSelect<S, VerifyPhonePayloadSelect>) => QueryBuilder<{
436
447
  verifyPhone: InferSelectResult<VerifyPhonePayload, S> | null;
437
448
  }>;
449
+ verifyStepUpCode: <S extends VerifyStepUpCodePayloadSelect>(args: VerifyStepUpCodeVariables, options: {
450
+ select: S;
451
+ } & StrictSelect<S, VerifyStepUpCodePayloadSelect>) => QueryBuilder<{
452
+ verifyStepUpCode: InferSelectResult<VerifyStepUpCodePayload, S> | null;
453
+ }>;
438
454
  verifyTotp: <S extends VerifyTotpPayloadSelect>(args: VerifyTotpVariables, options: {
439
455
  select: S;
440
456
  } & StrictSelect<S, VerifyTotpPayloadSelect>) => QueryBuilder<{
@@ -437,6 +437,18 @@ function createMutationOperations(client) {
437
437
  },
438
438
  ], input_types_1.connectionFieldsMap, 'SendSmsOtpPayload'),
439
439
  }),
440
+ sendStepUpCode: (args, options) => new query_builder_1.QueryBuilder({
441
+ client,
442
+ operation: 'mutation',
443
+ operationName: 'SendStepUpCode',
444
+ fieldName: 'sendStepUpCode',
445
+ ...(0, query_builder_1.buildCustomDocument)('mutation', 'SendStepUpCode', 'sendStepUpCode', options.select, args, [
446
+ {
447
+ name: 'input',
448
+ type: 'SendStepUpCodeInput!',
449
+ },
450
+ ], input_types_1.connectionFieldsMap, 'SendStepUpCodePayload'),
451
+ }),
440
452
  sendVerificationEmail: (args, options) => new query_builder_1.QueryBuilder({
441
453
  client,
442
454
  operation: 'mutation',
@@ -629,6 +641,18 @@ function createMutationOperations(client) {
629
641
  },
630
642
  ], input_types_1.connectionFieldsMap, 'VerifyPhonePayload'),
631
643
  }),
644
+ verifyStepUpCode: (args, options) => new query_builder_1.QueryBuilder({
645
+ client,
646
+ operation: 'mutation',
647
+ operationName: 'VerifyStepUpCode',
648
+ fieldName: 'verifyStepUpCode',
649
+ ...(0, query_builder_1.buildCustomDocument)('mutation', 'VerifyStepUpCode', 'verifyStepUpCode', options.select, args, [
650
+ {
651
+ name: 'input',
652
+ type: 'VerifyStepUpCodeInput!',
653
+ },
654
+ ], input_types_1.connectionFieldsMap, 'VerifyStepUpCodePayload'),
655
+ }),
632
656
  verifyTotp: (args, options) => new query_builder_1.QueryBuilder({
633
657
  client,
634
658
  operation: 'mutation',
@@ -0,0 +1,8 @@
1
+ /**
2
+ * CLI commands for DatabaseFunctionGraphExecutionCancelRequest
3
+ * @generated by @constructive-io/graphql-codegen
4
+ * DO NOT EDIT - changes will be overwritten
5
+ */
6
+ import { CLIOptions, Inquirerer } from 'inquirerer';
7
+ declare const _default: (argv: Partial<Record<string, unknown>>, prompter: Inquirerer, _options: CLIOptions) => Promise<void>;
8
+ export default _default;
@@ -0,0 +1,262 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ /**
4
+ * CLI commands for DatabaseFunctionGraphExecutionCancelRequest
5
+ * @generated by @constructive-io/graphql-codegen
6
+ * DO NOT EDIT - changes will be overwritten
7
+ */
8
+ const inquirerer_1 = require("inquirerer");
9
+ const executor_1 = require("../executor");
10
+ const utils_1 = require("../utils");
11
+ const fieldSchema = {
12
+ actorId: 'uuid',
13
+ createdAt: 'string',
14
+ executionId: 'uuid',
15
+ id: 'uuid',
16
+ };
17
+ const usage = '\ndatabase-function-graph-execution-cancel-request <command>\n\nCommands:\n list List databaseFunctionGraphExecutionCancelRequest records\n find-first Find first matching databaseFunctionGraphExecutionCancelRequest record\n get Get a databaseFunctionGraphExecutionCancelRequest by ID\n create Create a new databaseFunctionGraphExecutionCancelRequest\n update Update an existing databaseFunctionGraphExecutionCancelRequest\n delete Delete a databaseFunctionGraphExecutionCancelRequest\n\nList Options:\n --limit <n> Max number of records to return (forward pagination)\n --last <n> Number of records from the end (backward pagination)\n --after <cursor> Cursor for forward pagination\n --before <cursor> Cursor for backward pagination\n --offset <n> Number of records to skip\n --select <fields> Comma-separated list of fields to return\n --where.<field>.<op> Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.<f>.<op> Condition filter (dot-notation)\n --orderBy <values> Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select <fields> Comma-separated list of fields to return\n --where.<field>.<op> Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.<f>.<op> Condition filter (dot-notation)\n --orderBy <values> Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n';
18
+ exports.default = async (argv, prompter, _options) => {
19
+ if (argv.help || argv.h) {
20
+ console.log(usage);
21
+ process.exit(0);
22
+ }
23
+ const { first: subcommand, newArgv } = (0, inquirerer_1.extractFirst)(argv);
24
+ if (!subcommand) {
25
+ const answer = await prompter.prompt(argv, [
26
+ {
27
+ type: 'autocomplete',
28
+ name: 'subcommand',
29
+ message: 'What do you want to do?',
30
+ options: ['list', 'find-first', 'get', 'create', 'update', 'delete'],
31
+ },
32
+ ]);
33
+ return handleTableSubcommand(answer.subcommand, newArgv, prompter);
34
+ }
35
+ return handleTableSubcommand(subcommand, newArgv, prompter);
36
+ };
37
+ async function handleTableSubcommand(subcommand, argv, prompter) {
38
+ switch (subcommand) {
39
+ case 'list':
40
+ return handleList(argv, prompter);
41
+ case 'find-first':
42
+ return handleFindFirst(argv, prompter);
43
+ case 'get':
44
+ return handleGet(argv, prompter);
45
+ case 'create':
46
+ return handleCreate(argv, prompter);
47
+ case 'update':
48
+ return handleUpdate(argv, prompter);
49
+ case 'delete':
50
+ return handleDelete(argv, prompter);
51
+ default:
52
+ console.log(usage);
53
+ process.exit(1);
54
+ }
55
+ }
56
+ async function handleList(argv, _prompter) {
57
+ try {
58
+ const defaultSelect = {
59
+ actorId: true,
60
+ createdAt: true,
61
+ executionId: true,
62
+ id: true,
63
+ };
64
+ const findManyArgs = (0, utils_1.parseFindManyArgs)(argv, defaultSelect);
65
+ const client = (0, executor_1.getClient)();
66
+ const result = await client.databaseFunctionGraphExecutionCancelRequest
67
+ .findMany(findManyArgs)
68
+ .execute();
69
+ console.log(JSON.stringify(result, null, 2));
70
+ }
71
+ catch (error) {
72
+ console.error('Failed to list records.');
73
+ if (error instanceof Error) {
74
+ console.error(error.message);
75
+ }
76
+ process.exit(1);
77
+ }
78
+ }
79
+ async function handleFindFirst(argv, _prompter) {
80
+ try {
81
+ const defaultSelect = {
82
+ actorId: true,
83
+ createdAt: true,
84
+ executionId: true,
85
+ id: true,
86
+ };
87
+ const findFirstArgs = (0, utils_1.parseFindFirstArgs)(argv, defaultSelect);
88
+ const client = (0, executor_1.getClient)();
89
+ const result = await client.databaseFunctionGraphExecutionCancelRequest
90
+ .findFirst(findFirstArgs)
91
+ .execute();
92
+ console.log(JSON.stringify(result, null, 2));
93
+ }
94
+ catch (error) {
95
+ console.error('Failed to find record.');
96
+ if (error instanceof Error) {
97
+ console.error(error.message);
98
+ }
99
+ process.exit(1);
100
+ }
101
+ }
102
+ async function handleGet(argv, prompter) {
103
+ try {
104
+ const answers = await prompter.prompt(argv, [
105
+ {
106
+ type: 'text',
107
+ name: 'id',
108
+ message: 'id',
109
+ required: true,
110
+ },
111
+ ]);
112
+ const client = (0, executor_1.getClient)();
113
+ const result = await client.databaseFunctionGraphExecutionCancelRequest
114
+ .findOne({
115
+ id: answers.id,
116
+ select: {
117
+ actorId: true,
118
+ createdAt: true,
119
+ executionId: true,
120
+ id: true,
121
+ },
122
+ })
123
+ .execute();
124
+ console.log(JSON.stringify(result, null, 2));
125
+ }
126
+ catch (error) {
127
+ console.error('Record not found.');
128
+ if (error instanceof Error) {
129
+ console.error(error.message);
130
+ }
131
+ process.exit(1);
132
+ }
133
+ }
134
+ async function handleCreate(argv, prompter) {
135
+ try {
136
+ const rawAnswers = await prompter.prompt(argv, [
137
+ {
138
+ type: 'text',
139
+ name: 'actorId',
140
+ message: 'actorId',
141
+ required: false,
142
+ skipPrompt: true,
143
+ },
144
+ {
145
+ type: 'text',
146
+ name: 'executionId',
147
+ message: 'executionId',
148
+ required: true,
149
+ },
150
+ ]);
151
+ const answers = (0, utils_1.coerceAnswers)(rawAnswers, fieldSchema);
152
+ const cleanedData = (0, utils_1.stripUndefined)(answers, fieldSchema);
153
+ const client = (0, executor_1.getClient)();
154
+ const result = await client.databaseFunctionGraphExecutionCancelRequest
155
+ .create({
156
+ data: {
157
+ actorId: cleanedData.actorId,
158
+ executionId: cleanedData.executionId,
159
+ },
160
+ select: {
161
+ actorId: true,
162
+ createdAt: true,
163
+ executionId: true,
164
+ id: true,
165
+ },
166
+ })
167
+ .execute();
168
+ console.log(JSON.stringify(result, null, 2));
169
+ }
170
+ catch (error) {
171
+ console.error('Failed to create record.');
172
+ if (error instanceof Error) {
173
+ console.error(error.message);
174
+ }
175
+ process.exit(1);
176
+ }
177
+ }
178
+ async function handleUpdate(argv, prompter) {
179
+ try {
180
+ const rawAnswers = await prompter.prompt(argv, [
181
+ {
182
+ type: 'text',
183
+ name: 'id',
184
+ message: 'id',
185
+ required: true,
186
+ },
187
+ {
188
+ type: 'text',
189
+ name: 'actorId',
190
+ message: 'actorId',
191
+ required: false,
192
+ skipPrompt: true,
193
+ },
194
+ {
195
+ type: 'text',
196
+ name: 'executionId',
197
+ message: 'executionId',
198
+ required: false,
199
+ },
200
+ ]);
201
+ const answers = (0, utils_1.coerceAnswers)(rawAnswers, fieldSchema);
202
+ const cleanedData = (0, utils_1.stripUndefined)(answers, fieldSchema);
203
+ const client = (0, executor_1.getClient)();
204
+ const result = await client.databaseFunctionGraphExecutionCancelRequest
205
+ .update({
206
+ where: {
207
+ id: answers.id,
208
+ },
209
+ data: {
210
+ actorId: cleanedData.actorId,
211
+ executionId: cleanedData.executionId,
212
+ },
213
+ select: {
214
+ actorId: true,
215
+ createdAt: true,
216
+ executionId: true,
217
+ id: true,
218
+ },
219
+ })
220
+ .execute();
221
+ console.log(JSON.stringify(result, null, 2));
222
+ }
223
+ catch (error) {
224
+ console.error('Failed to update record.');
225
+ if (error instanceof Error) {
226
+ console.error(error.message);
227
+ }
228
+ process.exit(1);
229
+ }
230
+ }
231
+ async function handleDelete(argv, prompter) {
232
+ try {
233
+ const rawAnswers = await prompter.prompt(argv, [
234
+ {
235
+ type: 'text',
236
+ name: 'id',
237
+ message: 'id',
238
+ required: true,
239
+ },
240
+ ]);
241
+ const answers = (0, utils_1.coerceAnswers)(rawAnswers, fieldSchema);
242
+ const client = (0, executor_1.getClient)();
243
+ const result = await client.databaseFunctionGraphExecutionCancelRequest
244
+ .delete({
245
+ where: {
246
+ id: answers.id,
247
+ },
248
+ select: {
249
+ id: true,
250
+ },
251
+ })
252
+ .execute();
253
+ console.log(JSON.stringify(result, null, 2));
254
+ }
255
+ catch (error) {
256
+ console.error('Failed to delete record.');
257
+ if (error instanceof Error) {
258
+ console.error(error.message);
259
+ }
260
+ process.exit(1);
261
+ }
262
+ }
@@ -0,0 +1,8 @@
1
+ /**
2
+ * CLI commands for FunctionGraphExecutionCancelRequest
3
+ * @generated by @constructive-io/graphql-codegen
4
+ * DO NOT EDIT - changes will be overwritten
5
+ */
6
+ import { CLIOptions, Inquirerer } from 'inquirerer';
7
+ declare const _default: (argv: Partial<Record<string, unknown>>, prompter: Inquirerer, _options: CLIOptions) => Promise<void>;
8
+ export default _default;