@constructive-sdk/cli 0.20.4 → 0.20.5
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/{request-upload-url.d.ts → app-limit-cap.d.ts} +1 -1
- package/admin/cli/commands/app-limit-cap.js +272 -0
- package/{esm/admin/cli/commands/request-upload-url.d.ts → admin/cli/commands/app-limit-caps-default.d.ts} +1 -1
- package/admin/cli/commands/app-limit-caps-default.js +252 -0
- package/{auth/cli/commands/request-upload-url.d.ts → admin/cli/commands/app-limit-credit-code-item.d.ts} +1 -1
- package/admin/cli/commands/app-limit-credit-code-item.js +292 -0
- package/{esm/auth/cli/commands/request-upload-url.d.ts → admin/cli/commands/app-limit-credit-code.d.ts} +1 -1
- package/admin/cli/commands/app-limit-credit-code.js +296 -0
- package/admin/cli/commands/app-limit-credit-redemption.d.ts +8 -0
- package/admin/cli/commands/app-limit-credit-redemption.js +250 -0
- package/admin/cli/commands/app-limit-credit.d.ts +8 -0
- package/admin/cli/commands/app-limit-credit.js +316 -0
- package/admin/cli/commands/app-limit.js +66 -0
- package/admin/cli/commands/org-limit-aggregate.js +88 -0
- package/admin/cli/commands/org-limit-cap.d.ts +8 -0
- package/admin/cli/commands/org-limit-cap.js +272 -0
- package/admin/cli/commands/org-limit-caps-default.d.ts +8 -0
- package/admin/cli/commands/org-limit-caps-default.js +252 -0
- package/admin/cli/commands/org-limit-credit.d.ts +8 -0
- package/admin/cli/commands/org-limit-credit.js +338 -0
- package/admin/cli/commands/org-limit.js +66 -0
- package/admin/cli/commands.js +25 -9
- package/admin/cli/executor.d.ts +12 -8
- package/admin/orm/index.d.ts +24 -11
- package/admin/orm/index.js +24 -6
- package/admin/orm/input-types.d.ts +2108 -545
- package/admin/orm/input-types.js +13 -1
- package/admin/orm/models/appLimitCap.d.ts +56 -0
- package/admin/orm/models/appLimitCap.js +100 -0
- package/admin/orm/models/appLimitCapsDefault.d.ts +56 -0
- package/admin/orm/models/appLimitCapsDefault.js +100 -0
- package/admin/orm/models/appLimitCredit.d.ts +56 -0
- package/admin/orm/models/appLimitCredit.js +100 -0
- package/admin/orm/models/appLimitCreditCode.d.ts +56 -0
- package/admin/orm/models/appLimitCreditCode.js +100 -0
- package/admin/orm/models/appLimitCreditCodeItem.d.ts +56 -0
- package/admin/orm/models/appLimitCreditCodeItem.js +100 -0
- package/admin/orm/models/appLimitCreditRedemption.d.ts +56 -0
- package/admin/orm/models/appLimitCreditRedemption.js +100 -0
- package/admin/orm/models/index.d.ts +12 -3
- package/admin/orm/models/index.js +25 -7
- package/admin/orm/models/orgLimitCap.d.ts +56 -0
- package/admin/orm/models/orgLimitCap.js +100 -0
- package/admin/orm/models/orgLimitCapsDefault.d.ts +56 -0
- package/admin/orm/models/orgLimitCapsDefault.js +100 -0
- package/admin/orm/models/orgLimitCredit.d.ts +56 -0
- package/admin/orm/models/orgLimitCredit.js +100 -0
- package/admin/orm/mutation/index.d.ts +1 -16
- package/admin/orm/mutation/index.js +0 -12
- package/admin/orm/query-builder.js +24 -0
- package/auth/cli/commands.js +1 -3
- package/auth/cli/executor.d.ts +0 -5
- package/auth/orm/index.d.ts +0 -5
- package/auth/orm/input-types.d.ts +0 -38
- package/auth/orm/mutation/index.d.ts +1 -16
- package/auth/orm/mutation/index.js +0 -12
- package/auth/orm/query-builder.js +24 -0
- package/esm/admin/cli/commands/app-limit-cap.d.ts +8 -0
- package/esm/admin/cli/commands/app-limit-cap.js +270 -0
- package/esm/admin/cli/commands/app-limit-caps-default.d.ts +8 -0
- package/esm/admin/cli/commands/app-limit-caps-default.js +250 -0
- package/esm/admin/cli/commands/app-limit-credit-code-item.d.ts +8 -0
- package/esm/admin/cli/commands/app-limit-credit-code-item.js +290 -0
- package/esm/admin/cli/commands/app-limit-credit-code.d.ts +8 -0
- package/esm/admin/cli/commands/app-limit-credit-code.js +294 -0
- package/esm/admin/cli/commands/app-limit-credit-redemption.d.ts +8 -0
- package/esm/admin/cli/commands/app-limit-credit-redemption.js +248 -0
- package/esm/admin/cli/commands/app-limit-credit.d.ts +8 -0
- package/esm/admin/cli/commands/app-limit-credit.js +314 -0
- package/esm/admin/cli/commands/app-limit.js +66 -0
- package/esm/admin/cli/commands/org-limit-aggregate.js +88 -0
- package/esm/admin/cli/commands/org-limit-cap.d.ts +8 -0
- package/esm/admin/cli/commands/org-limit-cap.js +270 -0
- package/esm/admin/cli/commands/org-limit-caps-default.d.ts +8 -0
- package/esm/admin/cli/commands/org-limit-caps-default.js +250 -0
- package/esm/admin/cli/commands/org-limit-credit.d.ts +8 -0
- package/esm/admin/cli/commands/org-limit-credit.js +336 -0
- package/esm/admin/cli/commands/org-limit.js +66 -0
- package/esm/admin/cli/commands.js +25 -9
- package/esm/admin/cli/executor.d.ts +12 -8
- package/esm/admin/orm/index.d.ts +24 -11
- package/esm/admin/orm/index.js +24 -6
- package/esm/admin/orm/input-types.d.ts +2108 -545
- package/esm/admin/orm/input-types.js +13 -1
- package/esm/admin/orm/models/appLimitCap.d.ts +56 -0
- package/esm/admin/orm/models/appLimitCap.js +96 -0
- package/esm/admin/orm/models/appLimitCapsDefault.d.ts +56 -0
- package/esm/admin/orm/models/appLimitCapsDefault.js +96 -0
- package/esm/admin/orm/models/appLimitCredit.d.ts +56 -0
- package/esm/admin/orm/models/appLimitCredit.js +96 -0
- package/esm/admin/orm/models/appLimitCreditCode.d.ts +56 -0
- package/esm/admin/orm/models/appLimitCreditCode.js +96 -0
- package/esm/admin/orm/models/appLimitCreditCodeItem.d.ts +56 -0
- package/esm/admin/orm/models/appLimitCreditCodeItem.js +96 -0
- package/esm/admin/orm/models/appLimitCreditRedemption.d.ts +56 -0
- package/esm/admin/orm/models/appLimitCreditRedemption.js +96 -0
- package/esm/admin/orm/models/index.d.ts +12 -3
- package/esm/admin/orm/models/index.js +12 -3
- package/esm/admin/orm/models/orgLimitCap.d.ts +56 -0
- package/esm/admin/orm/models/orgLimitCap.js +96 -0
- package/esm/admin/orm/models/orgLimitCapsDefault.d.ts +56 -0
- package/esm/admin/orm/models/orgLimitCapsDefault.js +96 -0
- package/esm/admin/orm/models/orgLimitCredit.d.ts +56 -0
- package/esm/admin/orm/models/orgLimitCredit.js +96 -0
- package/esm/admin/orm/mutation/index.d.ts +1 -16
- package/esm/admin/orm/mutation/index.js +0 -12
- package/esm/admin/orm/query-builder.js +24 -0
- package/esm/auth/cli/commands.js +1 -3
- package/esm/auth/cli/executor.d.ts +0 -5
- package/esm/auth/orm/index.d.ts +0 -5
- package/esm/auth/orm/input-types.d.ts +0 -38
- package/esm/auth/orm/mutation/index.d.ts +1 -16
- package/esm/auth/orm/mutation/index.js +0 -12
- package/esm/auth/orm/query-builder.js +24 -0
- package/esm/objects/cli/commands.js +1 -3
- package/esm/objects/cli/executor.d.ts +0 -5
- package/esm/objects/orm/index.d.ts +0 -5
- package/esm/objects/orm/input-types.d.ts +0 -38
- package/esm/objects/orm/mutation/index.d.ts +1 -16
- package/esm/objects/orm/mutation/index.js +0 -12
- package/esm/objects/orm/query-builder.js +24 -0
- package/esm/public/cli/commands/api-setting.d.ts +8 -0
- package/esm/public/cli/commands/api-setting.js +468 -0
- package/esm/public/cli/commands/app-limit-cap.d.ts +8 -0
- package/esm/public/cli/commands/app-limit-cap.js +270 -0
- package/esm/public/cli/commands/app-limit-caps-default.d.ts +8 -0
- package/esm/public/cli/commands/app-limit-caps-default.js +250 -0
- package/esm/public/cli/commands/app-limit-credit-code-item.d.ts +8 -0
- package/esm/public/cli/commands/app-limit-credit-code-item.js +290 -0
- package/esm/public/cli/commands/app-limit-credit-code.d.ts +8 -0
- package/esm/public/cli/commands/app-limit-credit-code.js +294 -0
- package/esm/public/cli/commands/app-limit-credit-redemption.d.ts +8 -0
- package/esm/public/cli/commands/app-limit-credit-redemption.js +248 -0
- package/esm/public/cli/commands/app-limit-credit.d.ts +8 -0
- package/esm/public/cli/commands/app-limit-credit.js +314 -0
- package/esm/public/cli/commands/app-limit.js +66 -0
- package/esm/public/cli/commands/append-smart-tags.d.ts +8 -0
- package/esm/{admin/cli/commands/request-upload-url.js → public/cli/commands/append-smart-tags.js} +3 -3
- package/esm/public/cli/commands/billing-provider-module.d.ts +8 -0
- package/esm/public/cli/commands/billing-provider-module.js +624 -0
- package/esm/public/cli/commands/cors-setting.d.ts +8 -0
- package/esm/public/cli/commands/cors-setting.js +272 -0
- package/esm/public/cli/commands/database-setting.d.ts +8 -0
- package/esm/public/cli/commands/database-setting.js +448 -0
- package/esm/public/cli/commands/entity-type-provision.js +22 -0
- package/esm/public/cli/commands/function.d.ts +8 -0
- package/esm/public/cli/commands/function.js +268 -0
- package/esm/public/cli/commands/limits-module.js +198 -0
- package/esm/public/cli/commands/org-limit-aggregate.js +88 -0
- package/esm/public/cli/commands/org-limit-cap.d.ts +8 -0
- package/esm/public/cli/commands/org-limit-cap.js +270 -0
- package/esm/public/cli/commands/org-limit-caps-default.d.ts +8 -0
- package/esm/public/cli/commands/org-limit-caps-default.js +250 -0
- package/esm/public/cli/commands/org-limit-credit.d.ts +8 -0
- package/esm/public/cli/commands/org-limit-credit.js +336 -0
- package/esm/public/cli/commands/org-limit.js +66 -0
- package/esm/public/cli/commands/partition.d.ts +8 -0
- package/esm/public/cli/commands/partition.js +388 -0
- package/esm/public/cli/commands/plans-module.js +44 -0
- package/esm/public/cli/commands/pubkey-setting.d.ts +8 -0
- package/esm/public/cli/commands/pubkey-setting.js +382 -0
- package/esm/public/cli/commands/rls-setting.d.ts +8 -0
- package/esm/public/cli/commands/rls-setting.js +404 -0
- package/esm/public/cli/commands/storage-module.js +198 -0
- package/esm/public/cli/commands/webauthn-setting.d.ts +8 -0
- package/esm/public/cli/commands/webauthn-setting.js +580 -0
- package/esm/public/cli/commands.js +41 -5
- package/esm/public/cli/executor.d.ts +24 -6
- package/esm/public/orm/index.d.ts +43 -7
- package/esm/public/orm/index.js +38 -2
- package/esm/public/orm/input-types.d.ts +4601 -321
- package/esm/public/orm/input-types.js +21 -0
- package/esm/public/orm/models/apiSetting.d.ts +56 -0
- package/esm/public/orm/models/apiSetting.js +96 -0
- package/esm/public/orm/models/appLimitCap.d.ts +56 -0
- package/esm/public/orm/models/appLimitCap.js +96 -0
- package/esm/public/orm/models/appLimitCapsDefault.d.ts +56 -0
- package/esm/public/orm/models/appLimitCapsDefault.js +96 -0
- package/esm/public/orm/models/appLimitCredit.d.ts +56 -0
- package/esm/public/orm/models/appLimitCredit.js +96 -0
- package/esm/public/orm/models/appLimitCreditCode.d.ts +56 -0
- package/esm/public/orm/models/appLimitCreditCode.js +96 -0
- package/esm/public/orm/models/appLimitCreditCodeItem.d.ts +56 -0
- package/esm/public/orm/models/appLimitCreditCodeItem.js +96 -0
- package/esm/public/orm/models/appLimitCreditRedemption.d.ts +56 -0
- package/esm/public/orm/models/appLimitCreditRedemption.js +96 -0
- package/esm/public/orm/models/billingProviderModule.d.ts +56 -0
- package/esm/public/orm/models/billingProviderModule.js +96 -0
- package/esm/public/orm/models/corsSetting.d.ts +56 -0
- package/esm/public/orm/models/corsSetting.js +96 -0
- package/esm/public/orm/models/databaseSetting.d.ts +56 -0
- package/esm/public/orm/models/databaseSetting.js +96 -0
- package/esm/public/orm/models/function.d.ts +56 -0
- package/esm/public/orm/models/function.js +96 -0
- package/esm/public/orm/models/index.d.ts +19 -1
- package/esm/public/orm/models/index.js +19 -1
- package/esm/public/orm/models/orgLimitCap.d.ts +56 -0
- package/esm/public/orm/models/orgLimitCap.js +96 -0
- package/esm/public/orm/models/orgLimitCapsDefault.d.ts +56 -0
- package/esm/public/orm/models/orgLimitCapsDefault.js +96 -0
- package/esm/public/orm/models/orgLimitCredit.d.ts +56 -0
- package/esm/public/orm/models/orgLimitCredit.js +96 -0
- package/esm/public/orm/models/partition.d.ts +56 -0
- package/esm/public/orm/models/partition.js +96 -0
- package/esm/public/orm/models/pubkeySetting.d.ts +56 -0
- package/esm/public/orm/models/pubkeySetting.js +96 -0
- package/esm/public/orm/models/rlsSetting.d.ts +56 -0
- package/esm/public/orm/models/rlsSetting.js +96 -0
- package/esm/public/orm/models/webauthnSetting.d.ts +56 -0
- package/esm/public/orm/models/webauthnSetting.js +96 -0
- package/esm/public/orm/mutation/index.d.ts +9 -16
- package/esm/public/orm/mutation/index.js +12 -12
- package/esm/public/orm/query-builder.js +24 -0
- package/objects/cli/commands.js +1 -3
- package/objects/cli/executor.d.ts +0 -5
- package/objects/orm/index.d.ts +0 -5
- package/objects/orm/input-types.d.ts +0 -38
- package/objects/orm/mutation/index.d.ts +1 -16
- package/objects/orm/mutation/index.js +0 -12
- package/objects/orm/query-builder.js +24 -0
- package/package.json +4 -4
- package/public/cli/commands/api-setting.d.ts +8 -0
- package/public/cli/commands/api-setting.js +470 -0
- package/public/cli/commands/app-limit-cap.d.ts +8 -0
- package/public/cli/commands/app-limit-cap.js +272 -0
- package/public/cli/commands/app-limit-caps-default.d.ts +8 -0
- package/public/cli/commands/app-limit-caps-default.js +252 -0
- package/public/cli/commands/app-limit-credit-code-item.d.ts +8 -0
- package/public/cli/commands/app-limit-credit-code-item.js +292 -0
- package/public/cli/commands/app-limit-credit-code.d.ts +8 -0
- package/public/cli/commands/app-limit-credit-code.js +296 -0
- package/public/cli/commands/app-limit-credit-redemption.d.ts +8 -0
- package/public/cli/commands/app-limit-credit-redemption.js +250 -0
- package/public/cli/commands/app-limit-credit.d.ts +8 -0
- package/public/cli/commands/app-limit-credit.js +316 -0
- package/public/cli/commands/app-limit.js +66 -0
- package/public/cli/commands/append-smart-tags.d.ts +8 -0
- package/{objects/cli/commands/request-upload-url.js → public/cli/commands/append-smart-tags.js} +3 -3
- package/public/cli/commands/billing-provider-module.d.ts +8 -0
- package/public/cli/commands/billing-provider-module.js +626 -0
- package/public/cli/commands/cors-setting.d.ts +8 -0
- package/public/cli/commands/cors-setting.js +274 -0
- package/public/cli/commands/database-setting.d.ts +8 -0
- package/public/cli/commands/database-setting.js +450 -0
- package/public/cli/commands/entity-type-provision.js +22 -0
- package/public/cli/commands/function.d.ts +8 -0
- package/public/cli/commands/function.js +270 -0
- package/public/cli/commands/limits-module.js +198 -0
- package/public/cli/commands/org-limit-aggregate.js +88 -0
- package/public/cli/commands/org-limit-cap.d.ts +8 -0
- package/public/cli/commands/org-limit-cap.js +272 -0
- package/public/cli/commands/org-limit-caps-default.d.ts +8 -0
- package/public/cli/commands/org-limit-caps-default.js +252 -0
- package/public/cli/commands/org-limit-credit.d.ts +8 -0
- package/public/cli/commands/org-limit-credit.js +338 -0
- package/public/cli/commands/org-limit.js +66 -0
- package/public/cli/commands/partition.d.ts +8 -0
- package/public/cli/commands/partition.js +390 -0
- package/public/cli/commands/plans-module.js +44 -0
- package/public/cli/commands/pubkey-setting.d.ts +8 -0
- package/public/cli/commands/pubkey-setting.js +384 -0
- package/public/cli/commands/rls-setting.d.ts +8 -0
- package/public/cli/commands/rls-setting.js +406 -0
- package/public/cli/commands/storage-module.js +198 -0
- package/public/cli/commands/webauthn-setting.d.ts +8 -0
- package/public/cli/commands/webauthn-setting.js +582 -0
- package/public/cli/commands.js +41 -5
- package/public/cli/executor.d.ts +24 -6
- package/public/orm/index.d.ts +43 -7
- package/public/orm/index.js +38 -2
- package/public/orm/input-types.d.ts +4601 -321
- package/public/orm/input-types.js +21 -0
- package/public/orm/models/apiSetting.d.ts +56 -0
- package/public/orm/models/apiSetting.js +100 -0
- package/public/orm/models/appLimitCap.d.ts +56 -0
- package/public/orm/models/appLimitCap.js +100 -0
- package/public/orm/models/appLimitCapsDefault.d.ts +56 -0
- package/public/orm/models/appLimitCapsDefault.js +100 -0
- package/public/orm/models/appLimitCredit.d.ts +56 -0
- package/public/orm/models/appLimitCredit.js +100 -0
- package/public/orm/models/appLimitCreditCode.d.ts +56 -0
- package/public/orm/models/appLimitCreditCode.js +100 -0
- package/public/orm/models/appLimitCreditCodeItem.d.ts +56 -0
- package/public/orm/models/appLimitCreditCodeItem.js +100 -0
- package/public/orm/models/appLimitCreditRedemption.d.ts +56 -0
- package/public/orm/models/appLimitCreditRedemption.js +100 -0
- package/public/orm/models/billingProviderModule.d.ts +56 -0
- package/public/orm/models/billingProviderModule.js +100 -0
- package/public/orm/models/corsSetting.d.ts +56 -0
- package/public/orm/models/corsSetting.js +100 -0
- package/public/orm/models/databaseSetting.d.ts +56 -0
- package/public/orm/models/databaseSetting.js +100 -0
- package/public/orm/models/function.d.ts +56 -0
- package/public/orm/models/function.js +100 -0
- package/public/orm/models/index.d.ts +19 -1
- package/public/orm/models/index.js +41 -5
- package/public/orm/models/orgLimitCap.d.ts +56 -0
- package/public/orm/models/orgLimitCap.js +100 -0
- package/public/orm/models/orgLimitCapsDefault.d.ts +56 -0
- package/public/orm/models/orgLimitCapsDefault.js +100 -0
- package/public/orm/models/orgLimitCredit.d.ts +56 -0
- package/public/orm/models/orgLimitCredit.js +100 -0
- package/public/orm/models/partition.d.ts +56 -0
- package/public/orm/models/partition.js +100 -0
- package/public/orm/models/pubkeySetting.d.ts +56 -0
- package/public/orm/models/pubkeySetting.js +100 -0
- package/public/orm/models/rlsSetting.d.ts +56 -0
- package/public/orm/models/rlsSetting.js +100 -0
- package/public/orm/models/webauthnSetting.d.ts +56 -0
- package/public/orm/models/webauthnSetting.js +100 -0
- package/public/orm/mutation/index.d.ts +9 -16
- package/public/orm/mutation/index.js +12 -12
- package/public/orm/query-builder.js +24 -0
- package/admin/cli/commands/request-upload-url.js +0 -36
- package/auth/cli/commands/request-upload-url.js +0 -36
- package/esm/auth/cli/commands/request-upload-url.js +0 -34
- package/esm/objects/cli/commands/request-upload-url.d.ts +0 -8
- package/esm/objects/cli/commands/request-upload-url.js +0 -34
- package/esm/public/cli/commands/request-upload-url.d.ts +0 -8
- package/esm/public/cli/commands/request-upload-url.js +0 -34
- package/objects/cli/commands/request-upload-url.d.ts +0 -8
- package/public/cli/commands/request-upload-url.d.ts +0 -8
- package/public/cli/commands/request-upload-url.js +0 -36
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CLI commands for OrgLimitCredit
|
|
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,336 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CLI commands for OrgLimitCredit
|
|
3
|
+
* @generated by @constructive-io/graphql-codegen
|
|
4
|
+
* DO NOT EDIT - changes will be overwritten
|
|
5
|
+
*/
|
|
6
|
+
import { extractFirst } from 'inquirerer';
|
|
7
|
+
import { getClient } from '../executor';
|
|
8
|
+
import { coerceAnswers, parseFindFirstArgs, parseFindManyArgs, stripUndefined } from '../utils';
|
|
9
|
+
const fieldSchema = {
|
|
10
|
+
id: 'uuid',
|
|
11
|
+
defaultLimitId: 'uuid',
|
|
12
|
+
actorId: 'uuid',
|
|
13
|
+
entityId: 'uuid',
|
|
14
|
+
amount: 'int',
|
|
15
|
+
creditType: 'string',
|
|
16
|
+
reason: 'string',
|
|
17
|
+
};
|
|
18
|
+
const usage = '\norg-limit-credit <command>\n\nCommands:\n list List orgLimitCredit records\n find-first Find first matching orgLimitCredit record\n get Get a orgLimitCredit by ID\n create Create a new orgLimitCredit\n update Update an existing orgLimitCredit\n delete Delete a orgLimitCredit\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\n --help, -h Show this help message\n';
|
|
19
|
+
export default async (argv, prompter, _options) => {
|
|
20
|
+
if (argv.help || argv.h) {
|
|
21
|
+
console.log(usage);
|
|
22
|
+
process.exit(0);
|
|
23
|
+
}
|
|
24
|
+
const { first: subcommand, newArgv } = extractFirst(argv);
|
|
25
|
+
if (!subcommand) {
|
|
26
|
+
const answer = await prompter.prompt(argv, [
|
|
27
|
+
{
|
|
28
|
+
type: 'autocomplete',
|
|
29
|
+
name: 'subcommand',
|
|
30
|
+
message: 'What do you want to do?',
|
|
31
|
+
options: ['list', 'find-first', 'get', 'create', 'update', 'delete'],
|
|
32
|
+
},
|
|
33
|
+
]);
|
|
34
|
+
return handleTableSubcommand(answer.subcommand, newArgv, prompter);
|
|
35
|
+
}
|
|
36
|
+
return handleTableSubcommand(subcommand, newArgv, prompter);
|
|
37
|
+
};
|
|
38
|
+
async function handleTableSubcommand(subcommand, argv, prompter) {
|
|
39
|
+
switch (subcommand) {
|
|
40
|
+
case 'list':
|
|
41
|
+
return handleList(argv, prompter);
|
|
42
|
+
case 'find-first':
|
|
43
|
+
return handleFindFirst(argv, prompter);
|
|
44
|
+
case 'get':
|
|
45
|
+
return handleGet(argv, prompter);
|
|
46
|
+
case 'create':
|
|
47
|
+
return handleCreate(argv, prompter);
|
|
48
|
+
case 'update':
|
|
49
|
+
return handleUpdate(argv, prompter);
|
|
50
|
+
case 'delete':
|
|
51
|
+
return handleDelete(argv, prompter);
|
|
52
|
+
default:
|
|
53
|
+
console.log(usage);
|
|
54
|
+
process.exit(1);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
async function handleList(argv, _prompter) {
|
|
58
|
+
try {
|
|
59
|
+
const defaultSelect = {
|
|
60
|
+
id: true,
|
|
61
|
+
defaultLimitId: true,
|
|
62
|
+
actorId: true,
|
|
63
|
+
entityId: true,
|
|
64
|
+
amount: true,
|
|
65
|
+
creditType: true,
|
|
66
|
+
reason: true,
|
|
67
|
+
};
|
|
68
|
+
const findManyArgs = parseFindManyArgs(argv, defaultSelect);
|
|
69
|
+
const client = getClient();
|
|
70
|
+
const result = await client.orgLimitCredit.findMany(findManyArgs).execute();
|
|
71
|
+
console.log(JSON.stringify(result, null, 2));
|
|
72
|
+
}
|
|
73
|
+
catch (error) {
|
|
74
|
+
console.error('Failed to list records.');
|
|
75
|
+
if (error instanceof Error) {
|
|
76
|
+
console.error(error.message);
|
|
77
|
+
}
|
|
78
|
+
process.exit(1);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
async function handleFindFirst(argv, _prompter) {
|
|
82
|
+
try {
|
|
83
|
+
const defaultSelect = {
|
|
84
|
+
id: true,
|
|
85
|
+
defaultLimitId: true,
|
|
86
|
+
actorId: true,
|
|
87
|
+
entityId: true,
|
|
88
|
+
amount: true,
|
|
89
|
+
creditType: true,
|
|
90
|
+
reason: true,
|
|
91
|
+
};
|
|
92
|
+
const findFirstArgs = parseFindFirstArgs(argv, defaultSelect);
|
|
93
|
+
const client = getClient();
|
|
94
|
+
const result = await client.orgLimitCredit.findFirst(findFirstArgs).execute();
|
|
95
|
+
console.log(JSON.stringify(result, null, 2));
|
|
96
|
+
}
|
|
97
|
+
catch (error) {
|
|
98
|
+
console.error('Failed to find record.');
|
|
99
|
+
if (error instanceof Error) {
|
|
100
|
+
console.error(error.message);
|
|
101
|
+
}
|
|
102
|
+
process.exit(1);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
async function handleGet(argv, prompter) {
|
|
106
|
+
try {
|
|
107
|
+
const answers = await prompter.prompt(argv, [
|
|
108
|
+
{
|
|
109
|
+
type: 'text',
|
|
110
|
+
name: 'id',
|
|
111
|
+
message: 'id',
|
|
112
|
+
required: true,
|
|
113
|
+
},
|
|
114
|
+
]);
|
|
115
|
+
const client = getClient();
|
|
116
|
+
const result = await client.orgLimitCredit
|
|
117
|
+
.findOne({
|
|
118
|
+
id: answers.id,
|
|
119
|
+
select: {
|
|
120
|
+
id: true,
|
|
121
|
+
defaultLimitId: true,
|
|
122
|
+
actorId: true,
|
|
123
|
+
entityId: true,
|
|
124
|
+
amount: true,
|
|
125
|
+
creditType: true,
|
|
126
|
+
reason: true,
|
|
127
|
+
},
|
|
128
|
+
})
|
|
129
|
+
.execute();
|
|
130
|
+
console.log(JSON.stringify(result, null, 2));
|
|
131
|
+
}
|
|
132
|
+
catch (error) {
|
|
133
|
+
console.error('Record not found.');
|
|
134
|
+
if (error instanceof Error) {
|
|
135
|
+
console.error(error.message);
|
|
136
|
+
}
|
|
137
|
+
process.exit(1);
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
async function handleCreate(argv, prompter) {
|
|
141
|
+
try {
|
|
142
|
+
const rawAnswers = await prompter.prompt(argv, [
|
|
143
|
+
{
|
|
144
|
+
type: 'text',
|
|
145
|
+
name: 'defaultLimitId',
|
|
146
|
+
message: 'defaultLimitId',
|
|
147
|
+
required: true,
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
type: 'text',
|
|
151
|
+
name: 'actorId',
|
|
152
|
+
message: 'actorId',
|
|
153
|
+
required: false,
|
|
154
|
+
skipPrompt: true,
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
type: 'text',
|
|
158
|
+
name: 'entityId',
|
|
159
|
+
message: 'entityId',
|
|
160
|
+
required: false,
|
|
161
|
+
skipPrompt: true,
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
type: 'text',
|
|
165
|
+
name: 'amount',
|
|
166
|
+
message: 'amount',
|
|
167
|
+
required: true,
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
type: 'text',
|
|
171
|
+
name: 'creditType',
|
|
172
|
+
message: 'creditType',
|
|
173
|
+
required: false,
|
|
174
|
+
skipPrompt: true,
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
type: 'text',
|
|
178
|
+
name: 'reason',
|
|
179
|
+
message: 'reason',
|
|
180
|
+
required: false,
|
|
181
|
+
skipPrompt: true,
|
|
182
|
+
},
|
|
183
|
+
]);
|
|
184
|
+
const answers = coerceAnswers(rawAnswers, fieldSchema);
|
|
185
|
+
const cleanedData = stripUndefined(answers, fieldSchema);
|
|
186
|
+
const client = getClient();
|
|
187
|
+
const result = await client.orgLimitCredit
|
|
188
|
+
.create({
|
|
189
|
+
data: {
|
|
190
|
+
defaultLimitId: cleanedData.defaultLimitId,
|
|
191
|
+
actorId: cleanedData.actorId,
|
|
192
|
+
entityId: cleanedData.entityId,
|
|
193
|
+
amount: cleanedData.amount,
|
|
194
|
+
creditType: cleanedData.creditType,
|
|
195
|
+
reason: cleanedData.reason,
|
|
196
|
+
},
|
|
197
|
+
select: {
|
|
198
|
+
id: true,
|
|
199
|
+
defaultLimitId: true,
|
|
200
|
+
actorId: true,
|
|
201
|
+
entityId: true,
|
|
202
|
+
amount: true,
|
|
203
|
+
creditType: true,
|
|
204
|
+
reason: true,
|
|
205
|
+
},
|
|
206
|
+
})
|
|
207
|
+
.execute();
|
|
208
|
+
console.log(JSON.stringify(result, null, 2));
|
|
209
|
+
}
|
|
210
|
+
catch (error) {
|
|
211
|
+
console.error('Failed to create record.');
|
|
212
|
+
if (error instanceof Error) {
|
|
213
|
+
console.error(error.message);
|
|
214
|
+
}
|
|
215
|
+
process.exit(1);
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
async function handleUpdate(argv, prompter) {
|
|
219
|
+
try {
|
|
220
|
+
const rawAnswers = await prompter.prompt(argv, [
|
|
221
|
+
{
|
|
222
|
+
type: 'text',
|
|
223
|
+
name: 'id',
|
|
224
|
+
message: 'id',
|
|
225
|
+
required: true,
|
|
226
|
+
},
|
|
227
|
+
{
|
|
228
|
+
type: 'text',
|
|
229
|
+
name: 'defaultLimitId',
|
|
230
|
+
message: 'defaultLimitId',
|
|
231
|
+
required: false,
|
|
232
|
+
},
|
|
233
|
+
{
|
|
234
|
+
type: 'text',
|
|
235
|
+
name: 'actorId',
|
|
236
|
+
message: 'actorId',
|
|
237
|
+
required: false,
|
|
238
|
+
skipPrompt: true,
|
|
239
|
+
},
|
|
240
|
+
{
|
|
241
|
+
type: 'text',
|
|
242
|
+
name: 'entityId',
|
|
243
|
+
message: 'entityId',
|
|
244
|
+
required: false,
|
|
245
|
+
skipPrompt: true,
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
type: 'text',
|
|
249
|
+
name: 'amount',
|
|
250
|
+
message: 'amount',
|
|
251
|
+
required: false,
|
|
252
|
+
},
|
|
253
|
+
{
|
|
254
|
+
type: 'text',
|
|
255
|
+
name: 'creditType',
|
|
256
|
+
message: 'creditType',
|
|
257
|
+
required: false,
|
|
258
|
+
skipPrompt: true,
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
type: 'text',
|
|
262
|
+
name: 'reason',
|
|
263
|
+
message: 'reason',
|
|
264
|
+
required: false,
|
|
265
|
+
skipPrompt: true,
|
|
266
|
+
},
|
|
267
|
+
]);
|
|
268
|
+
const answers = coerceAnswers(rawAnswers, fieldSchema);
|
|
269
|
+
const cleanedData = stripUndefined(answers, fieldSchema);
|
|
270
|
+
const client = getClient();
|
|
271
|
+
const result = await client.orgLimitCredit
|
|
272
|
+
.update({
|
|
273
|
+
where: {
|
|
274
|
+
id: answers.id,
|
|
275
|
+
},
|
|
276
|
+
data: {
|
|
277
|
+
defaultLimitId: cleanedData.defaultLimitId,
|
|
278
|
+
actorId: cleanedData.actorId,
|
|
279
|
+
entityId: cleanedData.entityId,
|
|
280
|
+
amount: cleanedData.amount,
|
|
281
|
+
creditType: cleanedData.creditType,
|
|
282
|
+
reason: cleanedData.reason,
|
|
283
|
+
},
|
|
284
|
+
select: {
|
|
285
|
+
id: true,
|
|
286
|
+
defaultLimitId: true,
|
|
287
|
+
actorId: true,
|
|
288
|
+
entityId: true,
|
|
289
|
+
amount: true,
|
|
290
|
+
creditType: true,
|
|
291
|
+
reason: true,
|
|
292
|
+
},
|
|
293
|
+
})
|
|
294
|
+
.execute();
|
|
295
|
+
console.log(JSON.stringify(result, null, 2));
|
|
296
|
+
}
|
|
297
|
+
catch (error) {
|
|
298
|
+
console.error('Failed to update record.');
|
|
299
|
+
if (error instanceof Error) {
|
|
300
|
+
console.error(error.message);
|
|
301
|
+
}
|
|
302
|
+
process.exit(1);
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
async function handleDelete(argv, prompter) {
|
|
306
|
+
try {
|
|
307
|
+
const rawAnswers = await prompter.prompt(argv, [
|
|
308
|
+
{
|
|
309
|
+
type: 'text',
|
|
310
|
+
name: 'id',
|
|
311
|
+
message: 'id',
|
|
312
|
+
required: true,
|
|
313
|
+
},
|
|
314
|
+
]);
|
|
315
|
+
const answers = coerceAnswers(rawAnswers, fieldSchema);
|
|
316
|
+
const client = getClient();
|
|
317
|
+
const result = await client.orgLimitCredit
|
|
318
|
+
.delete({
|
|
319
|
+
where: {
|
|
320
|
+
id: answers.id,
|
|
321
|
+
},
|
|
322
|
+
select: {
|
|
323
|
+
id: true,
|
|
324
|
+
},
|
|
325
|
+
})
|
|
326
|
+
.execute();
|
|
327
|
+
console.log(JSON.stringify(result, null, 2));
|
|
328
|
+
}
|
|
329
|
+
catch (error) {
|
|
330
|
+
console.error('Failed to delete record.');
|
|
331
|
+
if (error instanceof Error) {
|
|
332
|
+
console.error(error.message);
|
|
333
|
+
}
|
|
334
|
+
process.exit(1);
|
|
335
|
+
}
|
|
336
|
+
}
|
|
@@ -15,6 +15,9 @@ const fieldSchema = {
|
|
|
15
15
|
softMax: 'int',
|
|
16
16
|
windowStart: 'string',
|
|
17
17
|
windowDuration: 'string',
|
|
18
|
+
planMax: 'int',
|
|
19
|
+
purchasedCredits: 'int',
|
|
20
|
+
periodCredits: 'int',
|
|
18
21
|
entityId: 'uuid',
|
|
19
22
|
};
|
|
20
23
|
const usage = '\norg-limit <command>\n\nCommands:\n list List orgLimit records\n find-first Find first matching orgLimit record\n get Get a orgLimit by ID\n create Create a new orgLimit\n update Update an existing orgLimit\n delete Delete a orgLimit\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\n --help, -h Show this help message\n';
|
|
@@ -67,6 +70,9 @@ async function handleList(argv, _prompter) {
|
|
|
67
70
|
softMax: true,
|
|
68
71
|
windowStart: true,
|
|
69
72
|
windowDuration: true,
|
|
73
|
+
planMax: true,
|
|
74
|
+
purchasedCredits: true,
|
|
75
|
+
periodCredits: true,
|
|
70
76
|
entityId: true,
|
|
71
77
|
};
|
|
72
78
|
const findManyArgs = parseFindManyArgs(argv, defaultSelect);
|
|
@@ -93,6 +99,9 @@ async function handleFindFirst(argv, _prompter) {
|
|
|
93
99
|
softMax: true,
|
|
94
100
|
windowStart: true,
|
|
95
101
|
windowDuration: true,
|
|
102
|
+
planMax: true,
|
|
103
|
+
purchasedCredits: true,
|
|
104
|
+
periodCredits: true,
|
|
96
105
|
entityId: true,
|
|
97
106
|
};
|
|
98
107
|
const findFirstArgs = parseFindFirstArgs(argv, defaultSelect);
|
|
@@ -131,6 +140,9 @@ async function handleGet(argv, prompter) {
|
|
|
131
140
|
softMax: true,
|
|
132
141
|
windowStart: true,
|
|
133
142
|
windowDuration: true,
|
|
143
|
+
planMax: true,
|
|
144
|
+
purchasedCredits: true,
|
|
145
|
+
periodCredits: true,
|
|
134
146
|
entityId: true,
|
|
135
147
|
},
|
|
136
148
|
})
|
|
@@ -196,6 +208,27 @@ async function handleCreate(argv, prompter) {
|
|
|
196
208
|
required: false,
|
|
197
209
|
skipPrompt: true,
|
|
198
210
|
},
|
|
211
|
+
{
|
|
212
|
+
type: 'text',
|
|
213
|
+
name: 'planMax',
|
|
214
|
+
message: 'planMax',
|
|
215
|
+
required: false,
|
|
216
|
+
skipPrompt: true,
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
type: 'text',
|
|
220
|
+
name: 'purchasedCredits',
|
|
221
|
+
message: 'purchasedCredits',
|
|
222
|
+
required: false,
|
|
223
|
+
skipPrompt: true,
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
type: 'text',
|
|
227
|
+
name: 'periodCredits',
|
|
228
|
+
message: 'periodCredits',
|
|
229
|
+
required: false,
|
|
230
|
+
skipPrompt: true,
|
|
231
|
+
},
|
|
199
232
|
{
|
|
200
233
|
type: 'text',
|
|
201
234
|
name: 'entityId',
|
|
@@ -216,6 +249,9 @@ async function handleCreate(argv, prompter) {
|
|
|
216
249
|
softMax: cleanedData.softMax,
|
|
217
250
|
windowStart: cleanedData.windowStart,
|
|
218
251
|
windowDuration: cleanedData.windowDuration,
|
|
252
|
+
planMax: cleanedData.planMax,
|
|
253
|
+
purchasedCredits: cleanedData.purchasedCredits,
|
|
254
|
+
periodCredits: cleanedData.periodCredits,
|
|
219
255
|
entityId: cleanedData.entityId,
|
|
220
256
|
},
|
|
221
257
|
select: {
|
|
@@ -227,6 +263,9 @@ async function handleCreate(argv, prompter) {
|
|
|
227
263
|
softMax: true,
|
|
228
264
|
windowStart: true,
|
|
229
265
|
windowDuration: true,
|
|
266
|
+
planMax: true,
|
|
267
|
+
purchasedCredits: true,
|
|
268
|
+
periodCredits: true,
|
|
230
269
|
entityId: true,
|
|
231
270
|
},
|
|
232
271
|
})
|
|
@@ -298,6 +337,27 @@ async function handleUpdate(argv, prompter) {
|
|
|
298
337
|
required: false,
|
|
299
338
|
skipPrompt: true,
|
|
300
339
|
},
|
|
340
|
+
{
|
|
341
|
+
type: 'text',
|
|
342
|
+
name: 'planMax',
|
|
343
|
+
message: 'planMax',
|
|
344
|
+
required: false,
|
|
345
|
+
skipPrompt: true,
|
|
346
|
+
},
|
|
347
|
+
{
|
|
348
|
+
type: 'text',
|
|
349
|
+
name: 'purchasedCredits',
|
|
350
|
+
message: 'purchasedCredits',
|
|
351
|
+
required: false,
|
|
352
|
+
skipPrompt: true,
|
|
353
|
+
},
|
|
354
|
+
{
|
|
355
|
+
type: 'text',
|
|
356
|
+
name: 'periodCredits',
|
|
357
|
+
message: 'periodCredits',
|
|
358
|
+
required: false,
|
|
359
|
+
skipPrompt: true,
|
|
360
|
+
},
|
|
301
361
|
{
|
|
302
362
|
type: 'text',
|
|
303
363
|
name: 'entityId',
|
|
@@ -321,6 +381,9 @@ async function handleUpdate(argv, prompter) {
|
|
|
321
381
|
softMax: cleanedData.softMax,
|
|
322
382
|
windowStart: cleanedData.windowStart,
|
|
323
383
|
windowDuration: cleanedData.windowDuration,
|
|
384
|
+
planMax: cleanedData.planMax,
|
|
385
|
+
purchasedCredits: cleanedData.purchasedCredits,
|
|
386
|
+
periodCredits: cleanedData.periodCredits,
|
|
324
387
|
entityId: cleanedData.entityId,
|
|
325
388
|
},
|
|
326
389
|
select: {
|
|
@@ -332,6 +395,9 @@ async function handleUpdate(argv, prompter) {
|
|
|
332
395
|
softMax: true,
|
|
333
396
|
windowStart: true,
|
|
334
397
|
windowDuration: true,
|
|
398
|
+
planMax: true,
|
|
399
|
+
purchasedCredits: true,
|
|
400
|
+
periodCredits: true,
|
|
335
401
|
entityId: true,
|
|
336
402
|
},
|
|
337
403
|
})
|
|
@@ -11,18 +11,27 @@ import orgGetSubordinatesRecordCmd from './commands/org-get-subordinates-record'
|
|
|
11
11
|
import appPermissionCmd from './commands/app-permission';
|
|
12
12
|
import orgPermissionCmd from './commands/org-permission';
|
|
13
13
|
import appLevelRequirementCmd from './commands/app-level-requirement';
|
|
14
|
+
import appLimitCreditRedemptionCmd from './commands/app-limit-credit-redemption';
|
|
15
|
+
import appLimitCreditCodeItemCmd from './commands/app-limit-credit-code-item';
|
|
16
|
+
import appLimitCreditCmd from './commands/app-limit-credit';
|
|
14
17
|
import orgMemberCmd from './commands/org-member';
|
|
15
18
|
import appPermissionDefaultCmd from './commands/app-permission-default';
|
|
19
|
+
import appLimitCreditCodeCmd from './commands/app-limit-credit-code';
|
|
16
20
|
import orgPermissionDefaultCmd from './commands/org-permission-default';
|
|
17
21
|
import appAdminGrantCmd from './commands/app-admin-grant';
|
|
18
22
|
import appOwnerGrantCmd from './commands/app-owner-grant';
|
|
19
23
|
import appAchievementCmd from './commands/app-achievement';
|
|
20
24
|
import appStepCmd from './commands/app-step';
|
|
25
|
+
import appLimitCapsDefaultCmd from './commands/app-limit-caps-default';
|
|
26
|
+
import orgLimitCapsDefaultCmd from './commands/org-limit-caps-default';
|
|
27
|
+
import appLimitCapCmd from './commands/app-limit-cap';
|
|
28
|
+
import orgLimitCapCmd from './commands/org-limit-cap';
|
|
21
29
|
import orgAdminGrantCmd from './commands/org-admin-grant';
|
|
22
30
|
import orgOwnerGrantCmd from './commands/org-owner-grant';
|
|
23
31
|
import membershipTypeCmd from './commands/membership-type';
|
|
24
32
|
import appLimitDefaultCmd from './commands/app-limit-default';
|
|
25
33
|
import orgLimitDefaultCmd from './commands/org-limit-default';
|
|
34
|
+
import orgLimitCreditCmd from './commands/org-limit-credit';
|
|
26
35
|
import orgChartEdgeGrantCmd from './commands/org-chart-edge-grant';
|
|
27
36
|
import appClaimedInviteCmd from './commands/app-claimed-invite';
|
|
28
37
|
import appGrantCmd from './commands/app-grant';
|
|
@@ -33,13 +42,13 @@ import appLimitEventCmd from './commands/app-limit-event';
|
|
|
33
42
|
import orgLimitEventCmd from './commands/org-limit-event';
|
|
34
43
|
import orgGrantCmd from './commands/org-grant';
|
|
35
44
|
import orgChartEdgeCmd from './commands/org-chart-edge';
|
|
36
|
-
import appLimitCmd from './commands/app-limit';
|
|
37
|
-
import orgLimitAggregateCmd from './commands/org-limit-aggregate';
|
|
38
45
|
import orgMemberProfileCmd from './commands/org-member-profile';
|
|
39
|
-
import orgLimitCmd from './commands/org-limit';
|
|
40
46
|
import appLevelCmd from './commands/app-level';
|
|
47
|
+
import appLimitCmd from './commands/app-limit';
|
|
41
48
|
import appInviteCmd from './commands/app-invite';
|
|
42
49
|
import orgMembershipSettingCmd from './commands/org-membership-setting';
|
|
50
|
+
import orgLimitAggregateCmd from './commands/org-limit-aggregate';
|
|
51
|
+
import orgLimitCmd from './commands/org-limit';
|
|
43
52
|
import orgInviteCmd from './commands/org-invite';
|
|
44
53
|
import appMembershipCmd from './commands/app-membership';
|
|
45
54
|
import orgMembershipCmd from './commands/org-membership';
|
|
@@ -56,7 +65,6 @@ import orgPermissionsGetByMaskCmd from './commands/org-permissions-get-by-mask';
|
|
|
56
65
|
import stepsRequiredCmd from './commands/steps-required';
|
|
57
66
|
import submitAppInviteCodeCmd from './commands/submit-app-invite-code';
|
|
58
67
|
import submitOrgInviteCodeCmd from './commands/submit-org-invite-code';
|
|
59
|
-
import requestUploadUrlCmd from './commands/request-upload-url';
|
|
60
68
|
import provisionBucketCmd from './commands/provision-bucket';
|
|
61
69
|
const createCommandMap = () => ({
|
|
62
70
|
context: contextCmd,
|
|
@@ -66,18 +74,27 @@ const createCommandMap = () => ({
|
|
|
66
74
|
'app-permission': appPermissionCmd,
|
|
67
75
|
'org-permission': orgPermissionCmd,
|
|
68
76
|
'app-level-requirement': appLevelRequirementCmd,
|
|
77
|
+
'app-limit-credit-redemption': appLimitCreditRedemptionCmd,
|
|
78
|
+
'app-limit-credit-code-item': appLimitCreditCodeItemCmd,
|
|
79
|
+
'app-limit-credit': appLimitCreditCmd,
|
|
69
80
|
'org-member': orgMemberCmd,
|
|
70
81
|
'app-permission-default': appPermissionDefaultCmd,
|
|
82
|
+
'app-limit-credit-code': appLimitCreditCodeCmd,
|
|
71
83
|
'org-permission-default': orgPermissionDefaultCmd,
|
|
72
84
|
'app-admin-grant': appAdminGrantCmd,
|
|
73
85
|
'app-owner-grant': appOwnerGrantCmd,
|
|
74
86
|
'app-achievement': appAchievementCmd,
|
|
75
87
|
'app-step': appStepCmd,
|
|
88
|
+
'app-limit-caps-default': appLimitCapsDefaultCmd,
|
|
89
|
+
'org-limit-caps-default': orgLimitCapsDefaultCmd,
|
|
90
|
+
'app-limit-cap': appLimitCapCmd,
|
|
91
|
+
'org-limit-cap': orgLimitCapCmd,
|
|
76
92
|
'org-admin-grant': orgAdminGrantCmd,
|
|
77
93
|
'org-owner-grant': orgOwnerGrantCmd,
|
|
78
94
|
'membership-type': membershipTypeCmd,
|
|
79
95
|
'app-limit-default': appLimitDefaultCmd,
|
|
80
96
|
'org-limit-default': orgLimitDefaultCmd,
|
|
97
|
+
'org-limit-credit': orgLimitCreditCmd,
|
|
81
98
|
'org-chart-edge-grant': orgChartEdgeGrantCmd,
|
|
82
99
|
'app-claimed-invite': appClaimedInviteCmd,
|
|
83
100
|
'app-grant': appGrantCmd,
|
|
@@ -88,13 +105,13 @@ const createCommandMap = () => ({
|
|
|
88
105
|
'org-limit-event': orgLimitEventCmd,
|
|
89
106
|
'org-grant': orgGrantCmd,
|
|
90
107
|
'org-chart-edge': orgChartEdgeCmd,
|
|
91
|
-
'app-limit': appLimitCmd,
|
|
92
|
-
'org-limit-aggregate': orgLimitAggregateCmd,
|
|
93
108
|
'org-member-profile': orgMemberProfileCmd,
|
|
94
|
-
'org-limit': orgLimitCmd,
|
|
95
109
|
'app-level': appLevelCmd,
|
|
110
|
+
'app-limit': appLimitCmd,
|
|
96
111
|
'app-invite': appInviteCmd,
|
|
97
112
|
'org-membership-setting': orgMembershipSettingCmd,
|
|
113
|
+
'org-limit-aggregate': orgLimitAggregateCmd,
|
|
114
|
+
'org-limit': orgLimitCmd,
|
|
98
115
|
'org-invite': orgInviteCmd,
|
|
99
116
|
'app-membership': appMembershipCmd,
|
|
100
117
|
'org-membership': orgMembershipCmd,
|
|
@@ -111,10 +128,9 @@ const createCommandMap = () => ({
|
|
|
111
128
|
'steps-required': stepsRequiredCmd,
|
|
112
129
|
'submit-app-invite-code': submitAppInviteCodeCmd,
|
|
113
130
|
'submit-org-invite-code': submitOrgInviteCodeCmd,
|
|
114
|
-
'request-upload-url': requestUploadUrlCmd,
|
|
115
131
|
'provision-bucket': provisionBucketCmd,
|
|
116
132
|
});
|
|
117
|
-
const usage = '\ncsdk <command>\n\nCommands:\n context Manage API contexts\n auth Manage authentication\n org-get-managers-record orgGetManagersRecord CRUD operations\n org-get-subordinates-record orgGetSubordinatesRecord CRUD operations\n app-permission appPermission CRUD operations\n org-permission orgPermission CRUD operations\n app-level-requirement appLevelRequirement CRUD operations\n org-member orgMember CRUD operations\n app-permission-default appPermissionDefault CRUD operations\n org-permission-default orgPermissionDefault CRUD operations\n app-admin-grant appAdminGrant CRUD operations\n app-owner-grant appOwnerGrant CRUD operations\n app-achievement appAchievement CRUD operations\n app-step appStep CRUD operations\n org-admin-grant orgAdminGrant CRUD operations\n org-owner-grant orgOwnerGrant CRUD operations\n membership-type membershipType CRUD operations\n app-limit-default appLimitDefault CRUD operations\n org-limit-default orgLimitDefault CRUD operations\n org-chart-edge-grant orgChartEdgeGrant CRUD operations\n app-claimed-invite appClaimedInvite CRUD operations\n app-grant appGrant CRUD operations\n app-membership-default appMembershipDefault CRUD operations\n org-membership-default orgMembershipDefault CRUD operations\n org-claimed-invite orgClaimedInvite CRUD operations\n app-limit-event appLimitEvent CRUD operations\n org-limit-event orgLimitEvent CRUD operations\n org-grant orgGrant CRUD operations\n org-chart-edge orgChartEdge CRUD operations\n
|
|
133
|
+
const usage = '\ncsdk <command>\n\nCommands:\n context Manage API contexts\n auth Manage authentication\n org-get-managers-record orgGetManagersRecord CRUD operations\n org-get-subordinates-record orgGetSubordinatesRecord CRUD operations\n app-permission appPermission CRUD operations\n org-permission orgPermission CRUD operations\n app-level-requirement appLevelRequirement CRUD operations\n app-limit-credit-redemption appLimitCreditRedemption CRUD operations\n app-limit-credit-code-item appLimitCreditCodeItem CRUD operations\n app-limit-credit appLimitCredit CRUD operations\n org-member orgMember CRUD operations\n app-permission-default appPermissionDefault CRUD operations\n app-limit-credit-code appLimitCreditCode CRUD operations\n org-permission-default orgPermissionDefault CRUD operations\n app-admin-grant appAdminGrant CRUD operations\n app-owner-grant appOwnerGrant CRUD operations\n app-achievement appAchievement CRUD operations\n app-step appStep CRUD operations\n app-limit-caps-default appLimitCapsDefault CRUD operations\n org-limit-caps-default orgLimitCapsDefault CRUD operations\n app-limit-cap appLimitCap CRUD operations\n org-limit-cap orgLimitCap CRUD operations\n org-admin-grant orgAdminGrant CRUD operations\n org-owner-grant orgOwnerGrant CRUD operations\n membership-type membershipType CRUD operations\n app-limit-default appLimitDefault CRUD operations\n org-limit-default orgLimitDefault CRUD operations\n org-limit-credit orgLimitCredit CRUD operations\n org-chart-edge-grant orgChartEdgeGrant CRUD operations\n app-claimed-invite appClaimedInvite CRUD operations\n app-grant appGrant CRUD operations\n app-membership-default appMembershipDefault CRUD operations\n org-membership-default orgMembershipDefault CRUD operations\n org-claimed-invite orgClaimedInvite CRUD operations\n app-limit-event appLimitEvent CRUD operations\n org-limit-event orgLimitEvent CRUD operations\n org-grant orgGrant CRUD operations\n org-chart-edge orgChartEdge CRUD operations\n org-member-profile orgMemberProfile CRUD operations\n app-level appLevel CRUD operations\n app-limit appLimit CRUD operations\n app-invite appInvite CRUD operations\n org-membership-setting orgMembershipSetting CRUD operations\n org-limit-aggregate orgLimitAggregate CRUD operations\n org-limit orgLimit CRUD operations\n org-invite orgInvite CRUD operations\n app-membership appMembership CRUD operations\n org-membership orgMembership CRUD operations\n app-permissions-get-padded-mask appPermissionsGetPaddedMask\n org-permissions-get-padded-mask orgPermissionsGetPaddedMask\n org-is-manager-of orgIsManagerOf\n app-permissions-get-mask appPermissionsGetMask\n org-permissions-get-mask orgPermissionsGetMask\n steps-achieved stepsAchieved\n app-permissions-get-mask-by-names appPermissionsGetMaskByNames\n org-permissions-get-mask-by-names orgPermissionsGetMaskByNames\n app-permissions-get-by-mask Reads and enables pagination through a set of `AppPermission`.\n org-permissions-get-by-mask Reads and enables pagination through a set of `OrgPermission`.\n steps-required Reads and enables pagination through a set of `AppLevelRequirement`.\n submit-app-invite-code submitAppInviteCode\n submit-org-invite-code submitOrgInviteCode\n provision-bucket Provision an S3 bucket for a logical bucket in the database.\nReads the bucket config via RLS, then creates and configures\nthe S3 bucket with the appropriate privacy policies, CORS rules,\nand lifecycle settings.\n\n --help, -h Show this help message\n --version, -v Show version\n';
|
|
118
134
|
export const commands = async (argv, prompter, options) => {
|
|
119
135
|
if (argv.help || argv.h) {
|
|
120
136
|
console.log(usage);
|
|
@@ -5,18 +5,27 @@ export declare function getClient(contextName?: string): {
|
|
|
5
5
|
appPermission: import("..").AppPermissionModel;
|
|
6
6
|
orgPermission: import("..").OrgPermissionModel;
|
|
7
7
|
appLevelRequirement: import("..").AppLevelRequirementModel;
|
|
8
|
+
appLimitCreditRedemption: import("..").AppLimitCreditRedemptionModel;
|
|
9
|
+
appLimitCreditCodeItem: import("..").AppLimitCreditCodeItemModel;
|
|
10
|
+
appLimitCredit: import("..").AppLimitCreditModel;
|
|
8
11
|
orgMember: import("..").OrgMemberModel;
|
|
9
12
|
appPermissionDefault: import("..").AppPermissionDefaultModel;
|
|
13
|
+
appLimitCreditCode: import("..").AppLimitCreditCodeModel;
|
|
10
14
|
orgPermissionDefault: import("..").OrgPermissionDefaultModel;
|
|
11
15
|
appAdminGrant: import("..").AppAdminGrantModel;
|
|
12
16
|
appOwnerGrant: import("..").AppOwnerGrantModel;
|
|
13
17
|
appAchievement: import("..").AppAchievementModel;
|
|
14
18
|
appStep: import("..").AppStepModel;
|
|
19
|
+
appLimitCapsDefault: import("..").AppLimitCapsDefaultModel;
|
|
20
|
+
orgLimitCapsDefault: import("..").OrgLimitCapsDefaultModel;
|
|
21
|
+
appLimitCap: import("..").AppLimitCapModel;
|
|
22
|
+
orgLimitCap: import("..").OrgLimitCapModel;
|
|
15
23
|
orgAdminGrant: import("..").OrgAdminGrantModel;
|
|
16
24
|
orgOwnerGrant: import("..").OrgOwnerGrantModel;
|
|
17
25
|
membershipType: import("..").MembershipTypeModel;
|
|
18
26
|
appLimitDefault: import("..").AppLimitDefaultModel;
|
|
19
27
|
orgLimitDefault: import("..").OrgLimitDefaultModel;
|
|
28
|
+
orgLimitCredit: import("..").OrgLimitCreditModel;
|
|
20
29
|
orgChartEdgeGrant: import("..").OrgChartEdgeGrantModel;
|
|
21
30
|
appClaimedInvite: import("..").AppClaimedInviteModel;
|
|
22
31
|
appGrant: import("..").AppGrantModel;
|
|
@@ -27,13 +36,13 @@ export declare function getClient(contextName?: string): {
|
|
|
27
36
|
orgLimitEvent: import("..").OrgLimitEventModel;
|
|
28
37
|
orgGrant: import("..").OrgGrantModel;
|
|
29
38
|
orgChartEdge: import("..").OrgChartEdgeModel;
|
|
30
|
-
appLimit: import("..").AppLimitModel;
|
|
31
|
-
orgLimitAggregate: import("..").OrgLimitAggregateModel;
|
|
32
39
|
orgMemberProfile: import("..").OrgMemberProfileModel;
|
|
33
|
-
orgLimit: import("..").OrgLimitModel;
|
|
34
40
|
appLevel: import("..").AppLevelModel;
|
|
41
|
+
appLimit: import("..").AppLimitModel;
|
|
35
42
|
appInvite: import("..").AppInviteModel;
|
|
36
43
|
orgMembershipSetting: import("..").OrgMembershipSettingModel;
|
|
44
|
+
orgLimitAggregate: import("..").OrgLimitAggregateModel;
|
|
45
|
+
orgLimit: import("..").OrgLimitModel;
|
|
37
46
|
orgInvite: import("..").OrgInviteModel;
|
|
38
47
|
appMembership: import("..").AppMembershipModel;
|
|
39
48
|
orgMembership: import("..").OrgMembershipModel;
|
|
@@ -105,11 +114,6 @@ export declare function getClient(contextName?: string): {
|
|
|
105
114
|
} & import("..").StrictSelect<S, import("../orm/input-types").SubmitOrgInviteCodePayloadSelect>) => import("..").QueryBuilder<{
|
|
106
115
|
submitOrgInviteCode: import("..").InferSelectResult<import("../orm/input-types").SubmitOrgInviteCodePayload, S> | null;
|
|
107
116
|
}>;
|
|
108
|
-
requestUploadUrl: <S extends import("../orm/input-types").RequestUploadUrlPayloadSelect>(args: import("../orm/mutation").RequestUploadUrlVariables, options: {
|
|
109
|
-
select: S;
|
|
110
|
-
} & import("..").StrictSelect<S, import("../orm/input-types").RequestUploadUrlPayloadSelect>) => import("..").QueryBuilder<{
|
|
111
|
-
requestUploadUrl: import("..").InferSelectResult<import("../orm/input-types").RequestUploadUrlPayload, S> | null;
|
|
112
|
-
}>;
|
|
113
117
|
provisionBucket: <S extends import("../orm/input-types").ProvisionBucketPayloadSelect>(args: import("../orm/mutation").ProvisionBucketVariables, options: {
|
|
114
118
|
select: S;
|
|
115
119
|
} & import("..").StrictSelect<S, import("../orm/input-types").ProvisionBucketPayloadSelect>) => import("..").QueryBuilder<{
|