@constructive-sdk/cli 0.23.2 → 0.24.0
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.
- package/admin/cli/commands/app-limit-event.js +248 -2
- package/admin/cli/commands/app-limit.js +44 -0
- package/admin/cli/commands/org-limit-aggregate.js +44 -0
- package/admin/cli/commands/org-limit-event.js +248 -2
- package/admin/cli/commands/org-limit.js +44 -0
- package/admin/cli/commands.js +31 -33
- package/admin/cli/executor.d.ts +15 -16
- package/admin/orm/index.d.ts +31 -33
- package/admin/orm/index.js +32 -33
- package/admin/orm/input-types.d.ts +2090 -2039
- package/admin/orm/input-types.js +4 -4
- package/admin/orm/models/appLimitEvent.d.ts +26 -2
- package/admin/orm/models/appLimitEvent.js +45 -0
- package/admin/orm/models/index.d.ts +15 -16
- package/admin/orm/models/index.js +31 -33
- package/admin/orm/models/orgLimitEvent.d.ts +26 -2
- package/admin/orm/models/orgLimitEvent.js +45 -0
- package/{esm/public/cli/commands/agent-message.d.ts → auth/cli/commands/audit-log-auth.d.ts} +1 -1
- package/auth/cli/commands/{audit-log.js → audit-log-auth.js} +14 -14
- package/auth/cli/commands.js +5 -5
- package/auth/cli/executor.d.ts +6 -6
- package/auth/orm/index.d.ts +8 -8
- package/auth/orm/index.js +4 -3
- package/auth/orm/input-types.d.ts +94 -94
- package/auth/orm/input-types.js +1 -1
- package/auth/orm/models/auditLogAuth.d.ts +54 -0
- package/{public/orm/models/agentMessage.js → auth/orm/models/auditLogAuth.js} +27 -27
- package/auth/orm/models/index.d.ts +1 -1
- package/auth/orm/models/index.js +3 -3
- package/auth/orm/mutation/index.d.ts +9 -9
- package/auth/orm/mutation/index.js +12 -12
- package/esm/admin/cli/commands/app-limit-event.js +248 -2
- package/esm/admin/cli/commands/app-limit.js +44 -0
- package/esm/admin/cli/commands/org-limit-aggregate.js +44 -0
- package/esm/admin/cli/commands/org-limit-event.js +248 -2
- package/esm/admin/cli/commands/org-limit.js +44 -0
- package/esm/admin/cli/commands.js +31 -33
- package/esm/admin/cli/executor.d.ts +15 -16
- package/esm/admin/orm/index.d.ts +31 -33
- package/esm/admin/orm/index.js +31 -33
- package/esm/admin/orm/input-types.d.ts +2090 -2039
- package/esm/admin/orm/input-types.js +4 -4
- package/esm/admin/orm/models/appLimitEvent.d.ts +26 -2
- package/esm/admin/orm/models/appLimitEvent.js +46 -1
- package/esm/admin/orm/models/index.d.ts +15 -16
- package/esm/admin/orm/models/index.js +15 -16
- package/esm/admin/orm/models/orgLimitEvent.d.ts +26 -2
- package/esm/admin/orm/models/orgLimitEvent.js +46 -1
- package/esm/auth/cli/commands/audit-log-auth.d.ts +8 -0
- package/esm/{public/cli/commands/audit-log.js → auth/cli/commands/audit-log-auth.js} +14 -14
- package/esm/auth/cli/commands.js +5 -5
- package/esm/auth/cli/executor.d.ts +6 -6
- package/esm/auth/orm/index.d.ts +8 -8
- package/esm/auth/orm/index.js +3 -3
- package/esm/auth/orm/input-types.d.ts +94 -94
- package/esm/auth/orm/input-types.js +1 -1
- package/esm/auth/orm/models/auditLogAuth.d.ts +54 -0
- package/esm/{public/orm/models/auditLog.js → auth/orm/models/auditLogAuth.js} +25 -25
- package/esm/auth/orm/models/index.d.ts +1 -1
- package/esm/auth/orm/models/index.js +1 -1
- package/esm/auth/orm/mutation/index.d.ts +9 -9
- package/esm/auth/orm/mutation/index.js +12 -12
- package/esm/objects/orm/index.d.ts +1 -1
- package/esm/objects/orm/index.js +1 -1
- package/esm/public/cli/commands/{agent-thread.d.ts → agent-module.d.ts} +1 -1
- package/esm/public/cli/commands/agent-module.js +690 -0
- package/esm/public/cli/commands/app-limit-event.js +248 -2
- package/esm/public/cli/commands/app-limit.js +44 -0
- package/esm/public/cli/commands/apply-registry-defaults.d.ts +8 -0
- package/esm/public/cli/commands/{rev-parse.js → apply-registry-defaults.js} +9 -12
- package/esm/public/cli/commands/audit-log-auth.d.ts +8 -0
- package/esm/{auth/cli/commands/audit-log.js → public/cli/commands/audit-log-auth.js} +14 -14
- package/esm/public/cli/commands/billing-module.js +88 -0
- package/esm/public/cli/commands/compute-log-module.d.ts +8 -0
- package/esm/public/cli/commands/compute-log-module.js +514 -0
- package/esm/public/cli/commands/config-secrets-org-module.d.ts +8 -0
- package/esm/public/cli/commands/{encrypted-secrets-module.js → config-secrets-org-module.js} +8 -8
- package/esm/public/cli/commands/config-secrets-user-module.d.ts +8 -0
- package/esm/public/cli/commands/{object.js → config-secrets-user-module.js} +60 -67
- package/esm/public/cli/commands/construct-blueprint.js +1 -1
- package/{admin/cli/commands/usage-snapshot.d.ts → esm/public/cli/commands/db-usage-module.d.ts} +1 -1
- package/esm/public/cli/commands/db-usage-module.js +558 -0
- package/esm/public/cli/commands/entity-type-provision.js +386 -34
- package/esm/public/cli/commands/field.js +4 -26
- package/esm/public/cli/commands/function-module.d.ts +8 -0
- package/esm/public/cli/commands/function-module.js +778 -0
- package/{auth/cli/commands/audit-log.d.ts → esm/public/cli/commands/graph-module.d.ts} +1 -1
- package/esm/public/cli/commands/graph-module.js +584 -0
- package/esm/public/cli/commands/inference-log-module.d.ts +8 -0
- package/esm/public/cli/commands/inference-log-module.js +514 -0
- package/esm/public/cli/commands/memberships-module.js +22 -0
- package/esm/public/cli/commands/merkle-store-module.d.ts +8 -0
- package/esm/public/cli/commands/merkle-store-module.js +498 -0
- package/esm/public/cli/commands/namespace-module.d.ts +8 -0
- package/esm/public/cli/commands/namespace-module.js +558 -0
- package/esm/public/cli/commands/org-limit-aggregate.js +44 -0
- package/esm/public/cli/commands/org-limit-event.js +248 -2
- package/esm/public/cli/commands/org-limit.js +44 -0
- package/esm/public/cli/commands/partition.js +44 -0
- package/esm/public/cli/commands/storage-log-module.d.ts +8 -0
- package/esm/public/cli/commands/storage-log-module.js +514 -0
- package/esm/public/cli/commands/storage-module.js +36 -14
- package/esm/public/cli/commands/transfer-log-module.d.ts +8 -0
- package/esm/public/cli/commands/transfer-log-module.js +514 -0
- package/esm/public/cli/commands.js +83 -101
- package/esm/public/cli/executor.d.ts +72 -125
- package/esm/public/orm/index.d.ts +102 -153
- package/esm/public/orm/index.js +59 -55
- package/esm/public/orm/input-types.d.ts +6255 -3877
- package/esm/public/orm/input-types.js +24 -15
- package/esm/public/orm/models/agentModule.d.ts +54 -0
- package/esm/public/orm/models/{agentThread.js → agentModule.js} +25 -25
- package/esm/public/orm/models/appLimitEvent.d.ts +26 -2
- package/esm/public/orm/models/appLimitEvent.js +46 -1
- package/esm/public/orm/models/auditLogAuth.d.ts +54 -0
- package/esm/{auth/orm/models/auditLog.js → public/orm/models/auditLogAuth.js} +25 -25
- package/esm/public/orm/models/computeLogModule.d.ts +54 -0
- package/esm/public/orm/models/{commit.js → computeLogModule.js} +25 -25
- package/esm/public/orm/models/configSecretsOrgModule.d.ts +54 -0
- package/esm/public/orm/models/{encryptedSecretsModule.js → configSecretsOrgModule.js} +25 -25
- package/esm/public/orm/models/configSecretsUserModule.d.ts +54 -0
- package/esm/public/orm/models/configSecretsUserModule.js +100 -0
- package/esm/public/orm/models/dbUsageModule.d.ts +54 -0
- package/esm/{admin/orm/models/usageSnapshot.js → public/orm/models/dbUsageModule.js} +25 -25
- package/esm/public/orm/models/functionModule.d.ts +54 -0
- package/esm/public/orm/models/{agentMessage.js → functionModule.js} +25 -25
- package/esm/public/orm/models/graphModule.d.ts +54 -0
- package/esm/public/orm/models/{agentTask.js → graphModule.js} +25 -25
- package/esm/public/orm/models/index.d.ts +29 -27
- package/esm/public/orm/models/index.js +29 -27
- package/esm/public/orm/models/inferenceLogModule.d.ts +54 -0
- package/esm/public/orm/models/inferenceLogModule.js +100 -0
- package/esm/public/orm/models/merkleStoreModule.d.ts +54 -0
- package/esm/public/orm/models/merkleStoreModule.js +100 -0
- package/esm/public/orm/models/namespaceModule.d.ts +54 -0
- package/esm/public/orm/models/namespaceModule.js +100 -0
- package/esm/public/orm/models/orgLimitEvent.d.ts +26 -2
- package/esm/public/orm/models/orgLimitEvent.js +46 -1
- package/esm/public/orm/models/storageLogModule.d.ts +54 -0
- package/esm/public/orm/models/{store.js → storageLogModule.js} +25 -25
- package/esm/public/orm/models/transferLogModule.d.ts +54 -0
- package/esm/public/orm/models/transferLogModule.js +100 -0
- package/esm/public/orm/mutation/index.d.ts +69 -133
- package/esm/public/orm/mutation/index.js +78 -174
- package/esm/public/orm/query/index.d.ts +22 -71
- package/esm/public/orm/query/index.js +36 -124
- package/objects/orm/index.d.ts +1 -1
- package/objects/orm/index.js +2 -1
- package/package.json +6 -6
- package/{esm/public/cli/commands/agent-task.d.ts → public/cli/commands/agent-module.d.ts} +1 -1
- package/public/cli/commands/agent-module.js +692 -0
- package/public/cli/commands/app-limit-event.js +248 -2
- package/public/cli/commands/app-limit.js +44 -0
- package/public/cli/commands/apply-registry-defaults.d.ts +8 -0
- package/public/cli/commands/{rev-parse.js → apply-registry-defaults.js} +9 -12
- package/public/cli/commands/audit-log-auth.d.ts +8 -0
- package/public/cli/commands/{audit-log.js → audit-log-auth.js} +14 -14
- package/public/cli/commands/billing-module.js +88 -0
- package/public/cli/commands/compute-log-module.d.ts +8 -0
- package/public/cli/commands/compute-log-module.js +516 -0
- package/public/cli/commands/config-secrets-org-module.d.ts +8 -0
- package/public/cli/commands/{encrypted-secrets-module.js → config-secrets-org-module.js} +8 -8
- package/public/cli/commands/config-secrets-user-module.d.ts +8 -0
- package/public/cli/commands/{object.js → config-secrets-user-module.js} +60 -67
- package/public/cli/commands/construct-blueprint.js +1 -1
- package/{esm/admin/cli/commands/usage-snapshot.d.ts → public/cli/commands/db-usage-module.d.ts} +1 -1
- package/public/cli/commands/db-usage-module.js +560 -0
- package/public/cli/commands/entity-type-provision.js +386 -34
- package/public/cli/commands/field.js +4 -26
- package/public/cli/commands/function-module.d.ts +8 -0
- package/public/cli/commands/function-module.js +780 -0
- package/{esm/auth/cli/commands/audit-log.d.ts → public/cli/commands/graph-module.d.ts} +1 -1
- package/public/cli/commands/graph-module.js +586 -0
- package/public/cli/commands/inference-log-module.d.ts +8 -0
- package/public/cli/commands/inference-log-module.js +516 -0
- package/public/cli/commands/memberships-module.js +22 -0
- package/public/cli/commands/merkle-store-module.d.ts +8 -0
- package/public/cli/commands/merkle-store-module.js +500 -0
- package/public/cli/commands/namespace-module.d.ts +8 -0
- package/public/cli/commands/namespace-module.js +560 -0
- package/public/cli/commands/org-limit-aggregate.js +44 -0
- package/public/cli/commands/org-limit-event.js +248 -2
- package/public/cli/commands/org-limit.js +44 -0
- package/public/cli/commands/partition.js +44 -0
- package/public/cli/commands/storage-log-module.d.ts +8 -0
- package/public/cli/commands/storage-log-module.js +516 -0
- package/public/cli/commands/storage-module.js +36 -14
- package/public/cli/commands/transfer-log-module.d.ts +8 -0
- package/public/cli/commands/transfer-log-module.js +516 -0
- package/public/cli/commands.js +83 -101
- package/public/cli/executor.d.ts +72 -125
- package/public/orm/index.d.ts +102 -153
- package/public/orm/index.js +60 -55
- package/public/orm/input-types.d.ts +6255 -3877
- package/public/orm/input-types.js +24 -15
- package/public/orm/models/agentModule.d.ts +54 -0
- package/public/orm/models/{agentThread.js → agentModule.js} +27 -27
- package/public/orm/models/appLimitEvent.d.ts +26 -2
- package/public/orm/models/appLimitEvent.js +45 -0
- package/public/orm/models/auditLogAuth.d.ts +54 -0
- package/{admin/orm/models/usageSnapshot.js → public/orm/models/auditLogAuth.js} +27 -27
- package/public/orm/models/computeLogModule.d.ts +54 -0
- package/{auth/orm/models/auditLog.js → public/orm/models/computeLogModule.js} +27 -27
- package/public/orm/models/configSecretsOrgModule.d.ts +54 -0
- package/public/orm/models/{encryptedSecretsModule.js → configSecretsOrgModule.js} +27 -27
- package/public/orm/models/configSecretsUserModule.d.ts +54 -0
- package/public/orm/models/{ref.js → configSecretsUserModule.js} +27 -27
- package/public/orm/models/dbUsageModule.d.ts +54 -0
- package/public/orm/models/{usageSnapshot.js → dbUsageModule.js} +27 -27
- package/public/orm/models/functionModule.d.ts +54 -0
- package/public/orm/models/functionModule.js +104 -0
- package/public/orm/models/graphModule.d.ts +54 -0
- package/public/orm/models/{agentTask.js → graphModule.js} +27 -27
- package/public/orm/models/index.d.ts +29 -27
- package/public/orm/models/index.js +61 -57
- package/public/orm/models/inferenceLogModule.d.ts +54 -0
- package/public/orm/models/inferenceLogModule.js +104 -0
- package/public/orm/models/merkleStoreModule.d.ts +54 -0
- package/public/orm/models/merkleStoreModule.js +104 -0
- package/public/orm/models/namespaceModule.d.ts +54 -0
- package/public/orm/models/namespaceModule.js +104 -0
- package/public/orm/models/orgLimitEvent.d.ts +26 -2
- package/public/orm/models/orgLimitEvent.js +45 -0
- package/public/orm/models/storageLogModule.d.ts +54 -0
- package/public/orm/models/storageLogModule.js +104 -0
- package/public/orm/models/transferLogModule.d.ts +54 -0
- package/public/orm/models/transferLogModule.js +104 -0
- package/public/orm/mutation/index.d.ts +69 -133
- package/public/orm/mutation/index.js +78 -174
- package/public/orm/query/index.d.ts +22 -71
- package/public/orm/query/index.js +36 -124
- package/admin/cli/commands/usage-snapshot.js +0 -316
- package/admin/orm/models/usageSnapshot.d.ts +0 -54
- package/auth/orm/models/auditLog.d.ts +0 -54
- package/esm/admin/cli/commands/usage-snapshot.js +0 -314
- package/esm/admin/orm/models/usageSnapshot.d.ts +0 -54
- package/esm/auth/orm/models/auditLog.d.ts +0 -54
- package/esm/public/cli/commands/agent-message.js +0 -324
- package/esm/public/cli/commands/agent-task.js +0 -368
- package/esm/public/cli/commands/agent-thread.js +0 -372
- package/esm/public/cli/commands/audit-log.d.ts +0 -8
- package/esm/public/cli/commands/commit.d.ts +0 -8
- package/esm/public/cli/commands/commit.js +0 -380
- package/esm/public/cli/commands/encrypted-secrets-module.d.ts +0 -8
- package/esm/public/cli/commands/freeze-objects.d.ts +0 -8
- package/esm/public/cli/commands/freeze-objects.js +0 -34
- package/esm/public/cli/commands/get-all-objects-from-root.d.ts +0 -8
- package/esm/public/cli/commands/get-all-objects-from-root.js +0 -52
- package/esm/public/cli/commands/get-all-record.d.ts +0 -8
- package/esm/public/cli/commands/get-all-record.js +0 -124
- package/esm/public/cli/commands/get-object-at-path.d.ts +0 -8
- package/esm/public/cli/commands/get-object-at-path.js +0 -47
- package/esm/public/cli/commands/get-path-objects-from-root.d.ts +0 -8
- package/esm/public/cli/commands/get-path-objects-from-root.js +0 -57
- package/esm/public/cli/commands/init-empty-repo.d.ts +0 -8
- package/esm/public/cli/commands/init-empty-repo.js +0 -34
- package/esm/public/cli/commands/insert-node-at-path.d.ts +0 -8
- package/esm/public/cli/commands/insert-node-at-path.js +0 -34
- package/esm/public/cli/commands/object.d.ts +0 -8
- package/esm/public/cli/commands/ref.d.ts +0 -8
- package/esm/public/cli/commands/ref.js +0 -290
- package/esm/public/cli/commands/remove-node-at-path.d.ts +0 -8
- package/esm/public/cli/commands/remove-node-at-path.js +0 -34
- package/esm/public/cli/commands/rev-parse.d.ts +0 -8
- package/esm/public/cli/commands/set-and-commit.d.ts +0 -8
- package/esm/public/cli/commands/set-and-commit.js +0 -34
- package/esm/public/cli/commands/set-data-at-path.d.ts +0 -8
- package/esm/public/cli/commands/set-data-at-path.js +0 -34
- package/esm/public/cli/commands/set-props-and-commit.d.ts +0 -8
- package/esm/public/cli/commands/set-props-and-commit.js +0 -34
- package/esm/public/cli/commands/store.d.ts +0 -8
- package/esm/public/cli/commands/store.js +0 -276
- package/esm/public/cli/commands/update-node-at-path.d.ts +0 -8
- package/esm/public/cli/commands/update-node-at-path.js +0 -34
- package/esm/public/cli/commands/usage-snapshot.d.ts +0 -8
- package/esm/public/cli/commands/usage-snapshot.js +0 -314
- package/esm/public/orm/models/agentMessage.d.ts +0 -54
- package/esm/public/orm/models/agentTask.d.ts +0 -54
- package/esm/public/orm/models/agentThread.d.ts +0 -54
- package/esm/public/orm/models/auditLog.d.ts +0 -54
- package/esm/public/orm/models/commit.d.ts +0 -54
- package/esm/public/orm/models/encryptedSecretsModule.d.ts +0 -54
- package/esm/public/orm/models/getAllRecord.d.ts +0 -30
- package/esm/public/orm/models/getAllRecord.js +0 -55
- package/esm/public/orm/models/object.d.ts +0 -54
- package/esm/public/orm/models/object.js +0 -90
- package/esm/public/orm/models/ref.d.ts +0 -54
- package/esm/public/orm/models/ref.js +0 -100
- package/esm/public/orm/models/store.d.ts +0 -54
- package/esm/public/orm/models/usageSnapshot.d.ts +0 -54
- package/esm/public/orm/models/usageSnapshot.js +0 -100
- package/public/cli/commands/agent-message.d.ts +0 -8
- package/public/cli/commands/agent-message.js +0 -326
- package/public/cli/commands/agent-task.d.ts +0 -8
- package/public/cli/commands/agent-task.js +0 -370
- package/public/cli/commands/agent-thread.d.ts +0 -8
- package/public/cli/commands/agent-thread.js +0 -374
- package/public/cli/commands/audit-log.d.ts +0 -8
- package/public/cli/commands/commit.d.ts +0 -8
- package/public/cli/commands/commit.js +0 -382
- package/public/cli/commands/encrypted-secrets-module.d.ts +0 -8
- package/public/cli/commands/freeze-objects.d.ts +0 -8
- package/public/cli/commands/freeze-objects.js +0 -36
- package/public/cli/commands/get-all-objects-from-root.d.ts +0 -8
- package/public/cli/commands/get-all-objects-from-root.js +0 -54
- package/public/cli/commands/get-all-record.d.ts +0 -8
- package/public/cli/commands/get-all-record.js +0 -126
- package/public/cli/commands/get-object-at-path.d.ts +0 -8
- package/public/cli/commands/get-object-at-path.js +0 -49
- package/public/cli/commands/get-path-objects-from-root.d.ts +0 -8
- package/public/cli/commands/get-path-objects-from-root.js +0 -59
- package/public/cli/commands/init-empty-repo.d.ts +0 -8
- package/public/cli/commands/init-empty-repo.js +0 -36
- package/public/cli/commands/insert-node-at-path.d.ts +0 -8
- package/public/cli/commands/insert-node-at-path.js +0 -36
- package/public/cli/commands/object.d.ts +0 -8
- package/public/cli/commands/ref.d.ts +0 -8
- package/public/cli/commands/ref.js +0 -292
- package/public/cli/commands/remove-node-at-path.d.ts +0 -8
- package/public/cli/commands/remove-node-at-path.js +0 -36
- package/public/cli/commands/rev-parse.d.ts +0 -8
- package/public/cli/commands/set-and-commit.d.ts +0 -8
- package/public/cli/commands/set-and-commit.js +0 -36
- package/public/cli/commands/set-data-at-path.d.ts +0 -8
- package/public/cli/commands/set-data-at-path.js +0 -36
- package/public/cli/commands/set-props-and-commit.d.ts +0 -8
- package/public/cli/commands/set-props-and-commit.js +0 -36
- package/public/cli/commands/store.d.ts +0 -8
- package/public/cli/commands/store.js +0 -278
- package/public/cli/commands/update-node-at-path.d.ts +0 -8
- package/public/cli/commands/update-node-at-path.js +0 -36
- package/public/cli/commands/usage-snapshot.d.ts +0 -8
- package/public/cli/commands/usage-snapshot.js +0 -316
- package/public/orm/models/agentMessage.d.ts +0 -54
- package/public/orm/models/agentTask.d.ts +0 -54
- package/public/orm/models/agentThread.d.ts +0 -54
- package/public/orm/models/auditLog.d.ts +0 -54
- package/public/orm/models/auditLog.js +0 -104
- package/public/orm/models/commit.d.ts +0 -54
- package/public/orm/models/commit.js +0 -104
- package/public/orm/models/encryptedSecretsModule.d.ts +0 -54
- package/public/orm/models/getAllRecord.d.ts +0 -30
- package/public/orm/models/getAllRecord.js +0 -59
- package/public/orm/models/object.d.ts +0 -54
- package/public/orm/models/object.js +0 -94
- package/public/orm/models/ref.d.ts +0 -54
- package/public/orm/models/store.d.ts +0 -54
- package/public/orm/models/store.js +0 -104
- package/public/orm/models/usageSnapshot.d.ts +0 -54
|
@@ -9,9 +9,13 @@ const inquirerer_1 = require("inquirerer");
|
|
|
9
9
|
const executor_1 = require("../executor");
|
|
10
10
|
const utils_1 = require("../utils");
|
|
11
11
|
const fieldSchema = {
|
|
12
|
+
createdAt: 'string',
|
|
13
|
+
id: 'uuid',
|
|
12
14
|
name: 'string',
|
|
13
15
|
actorId: 'uuid',
|
|
14
16
|
entityId: 'uuid',
|
|
17
|
+
organizationId: 'uuid',
|
|
18
|
+
entityType: 'string',
|
|
15
19
|
eventType: 'string',
|
|
16
20
|
delta: 'int',
|
|
17
21
|
numBefore: 'int',
|
|
@@ -19,7 +23,7 @@ const fieldSchema = {
|
|
|
19
23
|
maxAtEvent: 'int',
|
|
20
24
|
reason: 'string',
|
|
21
25
|
};
|
|
22
|
-
const usage = '\napp-limit-event <command>\n\nCommands:\n list List appLimitEvent records\n find-first Find first matching appLimitEvent record\n create Create a new appLimitEvent\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';
|
|
26
|
+
const usage = '\napp-limit-event <command>\n\nCommands:\n list List appLimitEvent records\n find-first Find first matching appLimitEvent record\n get Get a appLimitEvent by ID\n create Create a new appLimitEvent\n update Update an existing appLimitEvent\n delete Delete a appLimitEvent\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';
|
|
23
27
|
exports.default = async (argv, prompter, _options) => {
|
|
24
28
|
if (argv.help || argv.h) {
|
|
25
29
|
console.log(usage);
|
|
@@ -32,7 +36,7 @@ exports.default = async (argv, prompter, _options) => {
|
|
|
32
36
|
type: 'autocomplete',
|
|
33
37
|
name: 'subcommand',
|
|
34
38
|
message: 'What do you want to do?',
|
|
35
|
-
options: ['list', 'find-first', 'create'],
|
|
39
|
+
options: ['list', 'find-first', 'get', 'create', 'update', 'delete'],
|
|
36
40
|
},
|
|
37
41
|
]);
|
|
38
42
|
return handleTableSubcommand(answer.subcommand, newArgv, prompter);
|
|
@@ -45,8 +49,14 @@ async function handleTableSubcommand(subcommand, argv, prompter) {
|
|
|
45
49
|
return handleList(argv, prompter);
|
|
46
50
|
case 'find-first':
|
|
47
51
|
return handleFindFirst(argv, prompter);
|
|
52
|
+
case 'get':
|
|
53
|
+
return handleGet(argv, prompter);
|
|
48
54
|
case 'create':
|
|
49
55
|
return handleCreate(argv, prompter);
|
|
56
|
+
case 'update':
|
|
57
|
+
return handleUpdate(argv, prompter);
|
|
58
|
+
case 'delete':
|
|
59
|
+
return handleDelete(argv, prompter);
|
|
50
60
|
default:
|
|
51
61
|
console.log(usage);
|
|
52
62
|
process.exit(1);
|
|
@@ -55,9 +65,13 @@ async function handleTableSubcommand(subcommand, argv, prompter) {
|
|
|
55
65
|
async function handleList(argv, _prompter) {
|
|
56
66
|
try {
|
|
57
67
|
const defaultSelect = {
|
|
68
|
+
createdAt: true,
|
|
69
|
+
id: true,
|
|
58
70
|
name: true,
|
|
59
71
|
actorId: true,
|
|
60
72
|
entityId: true,
|
|
73
|
+
organizationId: true,
|
|
74
|
+
entityType: true,
|
|
61
75
|
eventType: true,
|
|
62
76
|
delta: true,
|
|
63
77
|
numBefore: true,
|
|
@@ -81,9 +95,13 @@ async function handleList(argv, _prompter) {
|
|
|
81
95
|
async function handleFindFirst(argv, _prompter) {
|
|
82
96
|
try {
|
|
83
97
|
const defaultSelect = {
|
|
98
|
+
createdAt: true,
|
|
99
|
+
id: true,
|
|
84
100
|
name: true,
|
|
85
101
|
actorId: true,
|
|
86
102
|
entityId: true,
|
|
103
|
+
organizationId: true,
|
|
104
|
+
entityType: true,
|
|
87
105
|
eventType: true,
|
|
88
106
|
delta: true,
|
|
89
107
|
numBefore: true,
|
|
@@ -104,6 +122,47 @@ async function handleFindFirst(argv, _prompter) {
|
|
|
104
122
|
process.exit(1);
|
|
105
123
|
}
|
|
106
124
|
}
|
|
125
|
+
async function handleGet(argv, prompter) {
|
|
126
|
+
try {
|
|
127
|
+
const answers = await prompter.prompt(argv, [
|
|
128
|
+
{
|
|
129
|
+
type: 'text',
|
|
130
|
+
name: 'id',
|
|
131
|
+
message: 'id',
|
|
132
|
+
required: true,
|
|
133
|
+
},
|
|
134
|
+
]);
|
|
135
|
+
const client = (0, executor_1.getClient)();
|
|
136
|
+
const result = await client.appLimitEvent
|
|
137
|
+
.findOne({
|
|
138
|
+
id: answers.id,
|
|
139
|
+
select: {
|
|
140
|
+
createdAt: true,
|
|
141
|
+
id: true,
|
|
142
|
+
name: true,
|
|
143
|
+
actorId: true,
|
|
144
|
+
entityId: true,
|
|
145
|
+
organizationId: true,
|
|
146
|
+
entityType: true,
|
|
147
|
+
eventType: true,
|
|
148
|
+
delta: true,
|
|
149
|
+
numBefore: true,
|
|
150
|
+
numAfter: true,
|
|
151
|
+
maxAtEvent: true,
|
|
152
|
+
reason: true,
|
|
153
|
+
},
|
|
154
|
+
})
|
|
155
|
+
.execute();
|
|
156
|
+
console.log(JSON.stringify(result, null, 2));
|
|
157
|
+
}
|
|
158
|
+
catch (error) {
|
|
159
|
+
console.error('Record not found.');
|
|
160
|
+
if (error instanceof Error) {
|
|
161
|
+
console.error(error.message);
|
|
162
|
+
}
|
|
163
|
+
process.exit(1);
|
|
164
|
+
}
|
|
165
|
+
}
|
|
107
166
|
async function handleCreate(argv, prompter) {
|
|
108
167
|
try {
|
|
109
168
|
const rawAnswers = await prompter.prompt(argv, [
|
|
@@ -128,6 +187,20 @@ async function handleCreate(argv, prompter) {
|
|
|
128
187
|
required: false,
|
|
129
188
|
skipPrompt: true,
|
|
130
189
|
},
|
|
190
|
+
{
|
|
191
|
+
type: 'text',
|
|
192
|
+
name: 'organizationId',
|
|
193
|
+
message: 'organizationId',
|
|
194
|
+
required: false,
|
|
195
|
+
skipPrompt: true,
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
type: 'text',
|
|
199
|
+
name: 'entityType',
|
|
200
|
+
message: 'entityType',
|
|
201
|
+
required: false,
|
|
202
|
+
skipPrompt: true,
|
|
203
|
+
},
|
|
131
204
|
{
|
|
132
205
|
type: 'text',
|
|
133
206
|
name: 'eventType',
|
|
@@ -180,6 +253,8 @@ async function handleCreate(argv, prompter) {
|
|
|
180
253
|
name: cleanedData.name,
|
|
181
254
|
actorId: cleanedData.actorId,
|
|
182
255
|
entityId: cleanedData.entityId,
|
|
256
|
+
organizationId: cleanedData.organizationId,
|
|
257
|
+
entityType: cleanedData.entityType,
|
|
183
258
|
eventType: cleanedData.eventType,
|
|
184
259
|
delta: cleanedData.delta,
|
|
185
260
|
numBefore: cleanedData.numBefore,
|
|
@@ -188,9 +263,13 @@ async function handleCreate(argv, prompter) {
|
|
|
188
263
|
reason: cleanedData.reason,
|
|
189
264
|
},
|
|
190
265
|
select: {
|
|
266
|
+
createdAt: true,
|
|
267
|
+
id: true,
|
|
191
268
|
name: true,
|
|
192
269
|
actorId: true,
|
|
193
270
|
entityId: true,
|
|
271
|
+
organizationId: true,
|
|
272
|
+
entityType: true,
|
|
194
273
|
eventType: true,
|
|
195
274
|
delta: true,
|
|
196
275
|
numBefore: true,
|
|
@@ -210,3 +289,170 @@ async function handleCreate(argv, prompter) {
|
|
|
210
289
|
process.exit(1);
|
|
211
290
|
}
|
|
212
291
|
}
|
|
292
|
+
async function handleUpdate(argv, prompter) {
|
|
293
|
+
try {
|
|
294
|
+
const rawAnswers = await prompter.prompt(argv, [
|
|
295
|
+
{
|
|
296
|
+
type: 'text',
|
|
297
|
+
name: 'id',
|
|
298
|
+
message: 'id',
|
|
299
|
+
required: true,
|
|
300
|
+
},
|
|
301
|
+
{
|
|
302
|
+
type: 'text',
|
|
303
|
+
name: 'name',
|
|
304
|
+
message: 'name',
|
|
305
|
+
required: false,
|
|
306
|
+
skipPrompt: true,
|
|
307
|
+
},
|
|
308
|
+
{
|
|
309
|
+
type: 'text',
|
|
310
|
+
name: 'actorId',
|
|
311
|
+
message: 'actorId',
|
|
312
|
+
required: false,
|
|
313
|
+
skipPrompt: true,
|
|
314
|
+
},
|
|
315
|
+
{
|
|
316
|
+
type: 'text',
|
|
317
|
+
name: 'entityId',
|
|
318
|
+
message: 'entityId',
|
|
319
|
+
required: false,
|
|
320
|
+
skipPrompt: true,
|
|
321
|
+
},
|
|
322
|
+
{
|
|
323
|
+
type: 'text',
|
|
324
|
+
name: 'organizationId',
|
|
325
|
+
message: 'organizationId',
|
|
326
|
+
required: false,
|
|
327
|
+
skipPrompt: true,
|
|
328
|
+
},
|
|
329
|
+
{
|
|
330
|
+
type: 'text',
|
|
331
|
+
name: 'entityType',
|
|
332
|
+
message: 'entityType',
|
|
333
|
+
required: false,
|
|
334
|
+
skipPrompt: true,
|
|
335
|
+
},
|
|
336
|
+
{
|
|
337
|
+
type: 'text',
|
|
338
|
+
name: 'eventType',
|
|
339
|
+
message: 'eventType',
|
|
340
|
+
required: false,
|
|
341
|
+
skipPrompt: true,
|
|
342
|
+
},
|
|
343
|
+
{
|
|
344
|
+
type: 'text',
|
|
345
|
+
name: 'delta',
|
|
346
|
+
message: 'delta',
|
|
347
|
+
required: false,
|
|
348
|
+
skipPrompt: true,
|
|
349
|
+
},
|
|
350
|
+
{
|
|
351
|
+
type: 'text',
|
|
352
|
+
name: 'numBefore',
|
|
353
|
+
message: 'numBefore',
|
|
354
|
+
required: false,
|
|
355
|
+
skipPrompt: true,
|
|
356
|
+
},
|
|
357
|
+
{
|
|
358
|
+
type: 'text',
|
|
359
|
+
name: 'numAfter',
|
|
360
|
+
message: 'numAfter',
|
|
361
|
+
required: false,
|
|
362
|
+
skipPrompt: true,
|
|
363
|
+
},
|
|
364
|
+
{
|
|
365
|
+
type: 'text',
|
|
366
|
+
name: 'maxAtEvent',
|
|
367
|
+
message: 'maxAtEvent',
|
|
368
|
+
required: false,
|
|
369
|
+
skipPrompt: true,
|
|
370
|
+
},
|
|
371
|
+
{
|
|
372
|
+
type: 'text',
|
|
373
|
+
name: 'reason',
|
|
374
|
+
message: 'reason',
|
|
375
|
+
required: false,
|
|
376
|
+
skipPrompt: true,
|
|
377
|
+
},
|
|
378
|
+
]);
|
|
379
|
+
const answers = (0, utils_1.coerceAnswers)(rawAnswers, fieldSchema);
|
|
380
|
+
const cleanedData = (0, utils_1.stripUndefined)(answers, fieldSchema);
|
|
381
|
+
const client = (0, executor_1.getClient)();
|
|
382
|
+
const result = await client.appLimitEvent
|
|
383
|
+
.update({
|
|
384
|
+
where: {
|
|
385
|
+
id: answers.id,
|
|
386
|
+
},
|
|
387
|
+
data: {
|
|
388
|
+
name: cleanedData.name,
|
|
389
|
+
actorId: cleanedData.actorId,
|
|
390
|
+
entityId: cleanedData.entityId,
|
|
391
|
+
organizationId: cleanedData.organizationId,
|
|
392
|
+
entityType: cleanedData.entityType,
|
|
393
|
+
eventType: cleanedData.eventType,
|
|
394
|
+
delta: cleanedData.delta,
|
|
395
|
+
numBefore: cleanedData.numBefore,
|
|
396
|
+
numAfter: cleanedData.numAfter,
|
|
397
|
+
maxAtEvent: cleanedData.maxAtEvent,
|
|
398
|
+
reason: cleanedData.reason,
|
|
399
|
+
},
|
|
400
|
+
select: {
|
|
401
|
+
createdAt: true,
|
|
402
|
+
id: true,
|
|
403
|
+
name: true,
|
|
404
|
+
actorId: true,
|
|
405
|
+
entityId: true,
|
|
406
|
+
organizationId: true,
|
|
407
|
+
entityType: true,
|
|
408
|
+
eventType: true,
|
|
409
|
+
delta: true,
|
|
410
|
+
numBefore: true,
|
|
411
|
+
numAfter: true,
|
|
412
|
+
maxAtEvent: true,
|
|
413
|
+
reason: true,
|
|
414
|
+
},
|
|
415
|
+
})
|
|
416
|
+
.execute();
|
|
417
|
+
console.log(JSON.stringify(result, null, 2));
|
|
418
|
+
}
|
|
419
|
+
catch (error) {
|
|
420
|
+
console.error('Failed to update record.');
|
|
421
|
+
if (error instanceof Error) {
|
|
422
|
+
console.error(error.message);
|
|
423
|
+
}
|
|
424
|
+
process.exit(1);
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
async function handleDelete(argv, prompter) {
|
|
428
|
+
try {
|
|
429
|
+
const rawAnswers = await prompter.prompt(argv, [
|
|
430
|
+
{
|
|
431
|
+
type: 'text',
|
|
432
|
+
name: 'id',
|
|
433
|
+
message: 'id',
|
|
434
|
+
required: true,
|
|
435
|
+
},
|
|
436
|
+
]);
|
|
437
|
+
const answers = (0, utils_1.coerceAnswers)(rawAnswers, fieldSchema);
|
|
438
|
+
const client = (0, executor_1.getClient)();
|
|
439
|
+
const result = await client.appLimitEvent
|
|
440
|
+
.delete({
|
|
441
|
+
where: {
|
|
442
|
+
id: answers.id,
|
|
443
|
+
},
|
|
444
|
+
select: {
|
|
445
|
+
id: true,
|
|
446
|
+
},
|
|
447
|
+
})
|
|
448
|
+
.execute();
|
|
449
|
+
console.log(JSON.stringify(result, null, 2));
|
|
450
|
+
}
|
|
451
|
+
catch (error) {
|
|
452
|
+
console.error('Failed to delete record.');
|
|
453
|
+
if (error instanceof Error) {
|
|
454
|
+
console.error(error.message);
|
|
455
|
+
}
|
|
456
|
+
process.exit(1);
|
|
457
|
+
}
|
|
458
|
+
}
|
|
@@ -20,6 +20,8 @@ const fieldSchema = {
|
|
|
20
20
|
planMax: 'int',
|
|
21
21
|
purchasedCredits: 'int',
|
|
22
22
|
periodCredits: 'int',
|
|
23
|
+
organizationId: 'uuid',
|
|
24
|
+
entityType: 'string',
|
|
23
25
|
};
|
|
24
26
|
const usage = '\napp-limit <command>\n\nCommands:\n list List appLimit records\n find-first Find first matching appLimit record\n get Get a appLimit by ID\n create Create a new appLimit\n update Update an existing appLimit\n delete Delete a appLimit\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';
|
|
25
27
|
exports.default = async (argv, prompter, _options) => {
|
|
@@ -74,6 +76,8 @@ async function handleList(argv, _prompter) {
|
|
|
74
76
|
planMax: true,
|
|
75
77
|
purchasedCredits: true,
|
|
76
78
|
periodCredits: true,
|
|
79
|
+
organizationId: true,
|
|
80
|
+
entityType: true,
|
|
77
81
|
};
|
|
78
82
|
const findManyArgs = (0, utils_1.parseFindManyArgs)(argv, defaultSelect);
|
|
79
83
|
const client = (0, executor_1.getClient)();
|
|
@@ -102,6 +106,8 @@ async function handleFindFirst(argv, _prompter) {
|
|
|
102
106
|
planMax: true,
|
|
103
107
|
purchasedCredits: true,
|
|
104
108
|
periodCredits: true,
|
|
109
|
+
organizationId: true,
|
|
110
|
+
entityType: true,
|
|
105
111
|
};
|
|
106
112
|
const findFirstArgs = (0, utils_1.parseFindFirstArgs)(argv, defaultSelect);
|
|
107
113
|
const client = (0, executor_1.getClient)();
|
|
@@ -142,6 +148,8 @@ async function handleGet(argv, prompter) {
|
|
|
142
148
|
planMax: true,
|
|
143
149
|
purchasedCredits: true,
|
|
144
150
|
periodCredits: true,
|
|
151
|
+
organizationId: true,
|
|
152
|
+
entityType: true,
|
|
145
153
|
},
|
|
146
154
|
})
|
|
147
155
|
.execute();
|
|
@@ -227,6 +235,20 @@ async function handleCreate(argv, prompter) {
|
|
|
227
235
|
required: false,
|
|
228
236
|
skipPrompt: true,
|
|
229
237
|
},
|
|
238
|
+
{
|
|
239
|
+
type: 'text',
|
|
240
|
+
name: 'organizationId',
|
|
241
|
+
message: 'organizationId',
|
|
242
|
+
required: false,
|
|
243
|
+
skipPrompt: true,
|
|
244
|
+
},
|
|
245
|
+
{
|
|
246
|
+
type: 'text',
|
|
247
|
+
name: 'entityType',
|
|
248
|
+
message: 'entityType',
|
|
249
|
+
required: false,
|
|
250
|
+
skipPrompt: true,
|
|
251
|
+
},
|
|
230
252
|
]);
|
|
231
253
|
const answers = (0, utils_1.coerceAnswers)(rawAnswers, fieldSchema);
|
|
232
254
|
const cleanedData = (0, utils_1.stripUndefined)(answers, fieldSchema);
|
|
@@ -244,6 +266,8 @@ async function handleCreate(argv, prompter) {
|
|
|
244
266
|
planMax: cleanedData.planMax,
|
|
245
267
|
purchasedCredits: cleanedData.purchasedCredits,
|
|
246
268
|
periodCredits: cleanedData.periodCredits,
|
|
269
|
+
organizationId: cleanedData.organizationId,
|
|
270
|
+
entityType: cleanedData.entityType,
|
|
247
271
|
},
|
|
248
272
|
select: {
|
|
249
273
|
id: true,
|
|
@@ -257,6 +281,8 @@ async function handleCreate(argv, prompter) {
|
|
|
257
281
|
planMax: true,
|
|
258
282
|
purchasedCredits: true,
|
|
259
283
|
periodCredits: true,
|
|
284
|
+
organizationId: true,
|
|
285
|
+
entityType: true,
|
|
260
286
|
},
|
|
261
287
|
})
|
|
262
288
|
.execute();
|
|
@@ -348,6 +374,20 @@ async function handleUpdate(argv, prompter) {
|
|
|
348
374
|
required: false,
|
|
349
375
|
skipPrompt: true,
|
|
350
376
|
},
|
|
377
|
+
{
|
|
378
|
+
type: 'text',
|
|
379
|
+
name: 'organizationId',
|
|
380
|
+
message: 'organizationId',
|
|
381
|
+
required: false,
|
|
382
|
+
skipPrompt: true,
|
|
383
|
+
},
|
|
384
|
+
{
|
|
385
|
+
type: 'text',
|
|
386
|
+
name: 'entityType',
|
|
387
|
+
message: 'entityType',
|
|
388
|
+
required: false,
|
|
389
|
+
skipPrompt: true,
|
|
390
|
+
},
|
|
351
391
|
]);
|
|
352
392
|
const answers = (0, utils_1.coerceAnswers)(rawAnswers, fieldSchema);
|
|
353
393
|
const cleanedData = (0, utils_1.stripUndefined)(answers, fieldSchema);
|
|
@@ -368,6 +408,8 @@ async function handleUpdate(argv, prompter) {
|
|
|
368
408
|
planMax: cleanedData.planMax,
|
|
369
409
|
purchasedCredits: cleanedData.purchasedCredits,
|
|
370
410
|
periodCredits: cleanedData.periodCredits,
|
|
411
|
+
organizationId: cleanedData.organizationId,
|
|
412
|
+
entityType: cleanedData.entityType,
|
|
371
413
|
},
|
|
372
414
|
select: {
|
|
373
415
|
id: true,
|
|
@@ -381,6 +423,8 @@ async function handleUpdate(argv, prompter) {
|
|
|
381
423
|
planMax: true,
|
|
382
424
|
purchasedCredits: true,
|
|
383
425
|
periodCredits: true,
|
|
426
|
+
organizationId: true,
|
|
427
|
+
entityType: true,
|
|
384
428
|
},
|
|
385
429
|
})
|
|
386
430
|
.execute();
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CLI command for query applyRegistryDefaults
|
|
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;
|
|
@@ -4,32 +4,29 @@ const executor_1 = require("../executor");
|
|
|
4
4
|
exports.default = async (argv, prompter, _options) => {
|
|
5
5
|
try {
|
|
6
6
|
if (argv.help || argv.h) {
|
|
7
|
-
console.log('
|
|
7
|
+
console.log('apply-registry-defaults - applyRegistryDefaults\n\nUsage: apply-registry-defaults [OPTIONS]\n');
|
|
8
8
|
process.exit(0);
|
|
9
9
|
}
|
|
10
10
|
const answers = await prompter.prompt(argv, [
|
|
11
11
|
{
|
|
12
12
|
type: 'text',
|
|
13
|
-
name: '
|
|
14
|
-
message: '
|
|
13
|
+
name: 'nodeType',
|
|
14
|
+
message: 'nodeType',
|
|
15
15
|
},
|
|
16
16
|
{
|
|
17
17
|
type: 'text',
|
|
18
|
-
name: '
|
|
19
|
-
message: '
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
type: 'text',
|
|
23
|
-
name: 'refname',
|
|
24
|
-
message: 'refname',
|
|
18
|
+
name: 'data',
|
|
19
|
+
message: 'data',
|
|
25
20
|
},
|
|
26
21
|
]);
|
|
27
22
|
const client = (0, executor_1.getClient)();
|
|
28
|
-
const result = await client.query
|
|
23
|
+
const result = await client.query
|
|
24
|
+
.applyRegistryDefaults(answers)
|
|
25
|
+
.execute();
|
|
29
26
|
console.log(JSON.stringify(result, null, 2));
|
|
30
27
|
}
|
|
31
28
|
catch (error) {
|
|
32
|
-
console.error('Failed:
|
|
29
|
+
console.error('Failed: applyRegistryDefaults');
|
|
33
30
|
if (error instanceof Error) {
|
|
34
31
|
console.error(error.message);
|
|
35
32
|
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CLI commands for AuditLogAuth
|
|
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;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
/**
|
|
4
|
-
* CLI commands for
|
|
4
|
+
* CLI commands for AuditLogAuth
|
|
5
5
|
* @generated by @constructive-io/graphql-codegen
|
|
6
6
|
* DO NOT EDIT - changes will be overwritten
|
|
7
7
|
*/
|
|
@@ -9,6 +9,7 @@ const inquirerer_1 = require("inquirerer");
|
|
|
9
9
|
const executor_1 = require("../executor");
|
|
10
10
|
const utils_1 = require("../utils");
|
|
11
11
|
const fieldSchema = {
|
|
12
|
+
createdAt: 'string',
|
|
12
13
|
id: 'uuid',
|
|
13
14
|
event: 'string',
|
|
14
15
|
actorId: 'uuid',
|
|
@@ -16,9 +17,8 @@ const fieldSchema = {
|
|
|
16
17
|
userAgent: 'string',
|
|
17
18
|
ipAddress: 'string',
|
|
18
19
|
success: 'boolean',
|
|
19
|
-
createdAt: 'string',
|
|
20
20
|
};
|
|
21
|
-
const usage = '\naudit-log <command>\n\nCommands:\n list List
|
|
21
|
+
const usage = '\naudit-log-auth <command>\n\nCommands:\n list List auditLogAuth records\n find-first Find first matching auditLogAuth record\n get Get a auditLogAuth by ID\n create Create a new auditLogAuth\n update Update an existing auditLogAuth\n delete Delete a auditLogAuth\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';
|
|
22
22
|
exports.default = async (argv, prompter, _options) => {
|
|
23
23
|
if (argv.help || argv.h) {
|
|
24
24
|
console.log(usage);
|
|
@@ -60,6 +60,7 @@ async function handleTableSubcommand(subcommand, argv, prompter) {
|
|
|
60
60
|
async function handleList(argv, _prompter) {
|
|
61
61
|
try {
|
|
62
62
|
const defaultSelect = {
|
|
63
|
+
createdAt: true,
|
|
63
64
|
id: true,
|
|
64
65
|
event: true,
|
|
65
66
|
actorId: true,
|
|
@@ -67,11 +68,10 @@ async function handleList(argv, _prompter) {
|
|
|
67
68
|
userAgent: true,
|
|
68
69
|
ipAddress: true,
|
|
69
70
|
success: true,
|
|
70
|
-
createdAt: true,
|
|
71
71
|
};
|
|
72
72
|
const findManyArgs = (0, utils_1.parseFindManyArgs)(argv, defaultSelect);
|
|
73
73
|
const client = (0, executor_1.getClient)();
|
|
74
|
-
const result = await client.
|
|
74
|
+
const result = await client.auditLogAuth.findMany(findManyArgs).execute();
|
|
75
75
|
console.log(JSON.stringify(result, null, 2));
|
|
76
76
|
}
|
|
77
77
|
catch (error) {
|
|
@@ -85,6 +85,7 @@ async function handleList(argv, _prompter) {
|
|
|
85
85
|
async function handleFindFirst(argv, _prompter) {
|
|
86
86
|
try {
|
|
87
87
|
const defaultSelect = {
|
|
88
|
+
createdAt: true,
|
|
88
89
|
id: true,
|
|
89
90
|
event: true,
|
|
90
91
|
actorId: true,
|
|
@@ -92,11 +93,10 @@ async function handleFindFirst(argv, _prompter) {
|
|
|
92
93
|
userAgent: true,
|
|
93
94
|
ipAddress: true,
|
|
94
95
|
success: true,
|
|
95
|
-
createdAt: true,
|
|
96
96
|
};
|
|
97
97
|
const findFirstArgs = (0, utils_1.parseFindFirstArgs)(argv, defaultSelect);
|
|
98
98
|
const client = (0, executor_1.getClient)();
|
|
99
|
-
const result = await client.
|
|
99
|
+
const result = await client.auditLogAuth.findFirst(findFirstArgs).execute();
|
|
100
100
|
console.log(JSON.stringify(result, null, 2));
|
|
101
101
|
}
|
|
102
102
|
catch (error) {
|
|
@@ -118,10 +118,11 @@ async function handleGet(argv, prompter) {
|
|
|
118
118
|
},
|
|
119
119
|
]);
|
|
120
120
|
const client = (0, executor_1.getClient)();
|
|
121
|
-
const result = await client.
|
|
121
|
+
const result = await client.auditLogAuth
|
|
122
122
|
.findOne({
|
|
123
123
|
id: answers.id,
|
|
124
124
|
select: {
|
|
125
|
+
createdAt: true,
|
|
125
126
|
id: true,
|
|
126
127
|
event: true,
|
|
127
128
|
actorId: true,
|
|
@@ -129,7 +130,6 @@ async function handleGet(argv, prompter) {
|
|
|
129
130
|
userAgent: true,
|
|
130
131
|
ipAddress: true,
|
|
131
132
|
success: true,
|
|
132
|
-
createdAt: true,
|
|
133
133
|
},
|
|
134
134
|
})
|
|
135
135
|
.execute();
|
|
@@ -190,7 +190,7 @@ async function handleCreate(argv, prompter) {
|
|
|
190
190
|
const answers = (0, utils_1.coerceAnswers)(rawAnswers, fieldSchema);
|
|
191
191
|
const cleanedData = (0, utils_1.stripUndefined)(answers, fieldSchema);
|
|
192
192
|
const client = (0, executor_1.getClient)();
|
|
193
|
-
const result = await client.
|
|
193
|
+
const result = await client.auditLogAuth
|
|
194
194
|
.create({
|
|
195
195
|
data: {
|
|
196
196
|
event: cleanedData.event,
|
|
@@ -201,6 +201,7 @@ async function handleCreate(argv, prompter) {
|
|
|
201
201
|
success: cleanedData.success,
|
|
202
202
|
},
|
|
203
203
|
select: {
|
|
204
|
+
createdAt: true,
|
|
204
205
|
id: true,
|
|
205
206
|
event: true,
|
|
206
207
|
actorId: true,
|
|
@@ -208,7 +209,6 @@ async function handleCreate(argv, prompter) {
|
|
|
208
209
|
userAgent: true,
|
|
209
210
|
ipAddress: true,
|
|
210
211
|
success: true,
|
|
211
|
-
createdAt: true,
|
|
212
212
|
},
|
|
213
213
|
})
|
|
214
214
|
.execute();
|
|
@@ -275,7 +275,7 @@ async function handleUpdate(argv, prompter) {
|
|
|
275
275
|
const answers = (0, utils_1.coerceAnswers)(rawAnswers, fieldSchema);
|
|
276
276
|
const cleanedData = (0, utils_1.stripUndefined)(answers, fieldSchema);
|
|
277
277
|
const client = (0, executor_1.getClient)();
|
|
278
|
-
const result = await client.
|
|
278
|
+
const result = await client.auditLogAuth
|
|
279
279
|
.update({
|
|
280
280
|
where: {
|
|
281
281
|
id: answers.id,
|
|
@@ -289,6 +289,7 @@ async function handleUpdate(argv, prompter) {
|
|
|
289
289
|
success: cleanedData.success,
|
|
290
290
|
},
|
|
291
291
|
select: {
|
|
292
|
+
createdAt: true,
|
|
292
293
|
id: true,
|
|
293
294
|
event: true,
|
|
294
295
|
actorId: true,
|
|
@@ -296,7 +297,6 @@ async function handleUpdate(argv, prompter) {
|
|
|
296
297
|
userAgent: true,
|
|
297
298
|
ipAddress: true,
|
|
298
299
|
success: true,
|
|
299
|
-
createdAt: true,
|
|
300
300
|
},
|
|
301
301
|
})
|
|
302
302
|
.execute();
|
|
@@ -322,7 +322,7 @@ async function handleDelete(argv, prompter) {
|
|
|
322
322
|
]);
|
|
323
323
|
const answers = (0, utils_1.coerceAnswers)(rawAnswers, fieldSchema);
|
|
324
324
|
const client = (0, executor_1.getClient)();
|
|
325
|
-
const result = await client.
|
|
325
|
+
const result = await client.auditLogAuth
|
|
326
326
|
.delete({
|
|
327
327
|
where: {
|
|
328
328
|
id: answers.id,
|