@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,338 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
/**
|
|
4
|
+
* CLI commands for OrgLimitCredit
|
|
5
|
+
* @generated by @constructive-io/graphql-codegen
|
|
6
|
+
* DO NOT EDIT - changes will be overwritten
|
|
7
|
+
*/
|
|
8
|
+
const inquirerer_1 = require("inquirerer");
|
|
9
|
+
const executor_1 = require("../executor");
|
|
10
|
+
const utils_1 = require("../utils");
|
|
11
|
+
const fieldSchema = {
|
|
12
|
+
id: 'uuid',
|
|
13
|
+
defaultLimitId: 'uuid',
|
|
14
|
+
actorId: 'uuid',
|
|
15
|
+
entityId: 'uuid',
|
|
16
|
+
amount: 'int',
|
|
17
|
+
creditType: 'string',
|
|
18
|
+
reason: 'string',
|
|
19
|
+
};
|
|
20
|
+
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';
|
|
21
|
+
exports.default = async (argv, prompter, _options) => {
|
|
22
|
+
if (argv.help || argv.h) {
|
|
23
|
+
console.log(usage);
|
|
24
|
+
process.exit(0);
|
|
25
|
+
}
|
|
26
|
+
const { first: subcommand, newArgv } = (0, inquirerer_1.extractFirst)(argv);
|
|
27
|
+
if (!subcommand) {
|
|
28
|
+
const answer = await prompter.prompt(argv, [
|
|
29
|
+
{
|
|
30
|
+
type: 'autocomplete',
|
|
31
|
+
name: 'subcommand',
|
|
32
|
+
message: 'What do you want to do?',
|
|
33
|
+
options: ['list', 'find-first', 'get', 'create', 'update', 'delete'],
|
|
34
|
+
},
|
|
35
|
+
]);
|
|
36
|
+
return handleTableSubcommand(answer.subcommand, newArgv, prompter);
|
|
37
|
+
}
|
|
38
|
+
return handleTableSubcommand(subcommand, newArgv, prompter);
|
|
39
|
+
};
|
|
40
|
+
async function handleTableSubcommand(subcommand, argv, prompter) {
|
|
41
|
+
switch (subcommand) {
|
|
42
|
+
case 'list':
|
|
43
|
+
return handleList(argv, prompter);
|
|
44
|
+
case 'find-first':
|
|
45
|
+
return handleFindFirst(argv, prompter);
|
|
46
|
+
case 'get':
|
|
47
|
+
return handleGet(argv, prompter);
|
|
48
|
+
case 'create':
|
|
49
|
+
return handleCreate(argv, prompter);
|
|
50
|
+
case 'update':
|
|
51
|
+
return handleUpdate(argv, prompter);
|
|
52
|
+
case 'delete':
|
|
53
|
+
return handleDelete(argv, prompter);
|
|
54
|
+
default:
|
|
55
|
+
console.log(usage);
|
|
56
|
+
process.exit(1);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
async function handleList(argv, _prompter) {
|
|
60
|
+
try {
|
|
61
|
+
const defaultSelect = {
|
|
62
|
+
id: true,
|
|
63
|
+
defaultLimitId: true,
|
|
64
|
+
actorId: true,
|
|
65
|
+
entityId: true,
|
|
66
|
+
amount: true,
|
|
67
|
+
creditType: true,
|
|
68
|
+
reason: true,
|
|
69
|
+
};
|
|
70
|
+
const findManyArgs = (0, utils_1.parseFindManyArgs)(argv, defaultSelect);
|
|
71
|
+
const client = (0, executor_1.getClient)();
|
|
72
|
+
const result = await client.orgLimitCredit.findMany(findManyArgs).execute();
|
|
73
|
+
console.log(JSON.stringify(result, null, 2));
|
|
74
|
+
}
|
|
75
|
+
catch (error) {
|
|
76
|
+
console.error('Failed to list records.');
|
|
77
|
+
if (error instanceof Error) {
|
|
78
|
+
console.error(error.message);
|
|
79
|
+
}
|
|
80
|
+
process.exit(1);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
async function handleFindFirst(argv, _prompter) {
|
|
84
|
+
try {
|
|
85
|
+
const defaultSelect = {
|
|
86
|
+
id: true,
|
|
87
|
+
defaultLimitId: true,
|
|
88
|
+
actorId: true,
|
|
89
|
+
entityId: true,
|
|
90
|
+
amount: true,
|
|
91
|
+
creditType: true,
|
|
92
|
+
reason: true,
|
|
93
|
+
};
|
|
94
|
+
const findFirstArgs = (0, utils_1.parseFindFirstArgs)(argv, defaultSelect);
|
|
95
|
+
const client = (0, executor_1.getClient)();
|
|
96
|
+
const result = await client.orgLimitCredit.findFirst(findFirstArgs).execute();
|
|
97
|
+
console.log(JSON.stringify(result, null, 2));
|
|
98
|
+
}
|
|
99
|
+
catch (error) {
|
|
100
|
+
console.error('Failed to find record.');
|
|
101
|
+
if (error instanceof Error) {
|
|
102
|
+
console.error(error.message);
|
|
103
|
+
}
|
|
104
|
+
process.exit(1);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
async function handleGet(argv, prompter) {
|
|
108
|
+
try {
|
|
109
|
+
const answers = await prompter.prompt(argv, [
|
|
110
|
+
{
|
|
111
|
+
type: 'text',
|
|
112
|
+
name: 'id',
|
|
113
|
+
message: 'id',
|
|
114
|
+
required: true,
|
|
115
|
+
},
|
|
116
|
+
]);
|
|
117
|
+
const client = (0, executor_1.getClient)();
|
|
118
|
+
const result = await client.orgLimitCredit
|
|
119
|
+
.findOne({
|
|
120
|
+
id: answers.id,
|
|
121
|
+
select: {
|
|
122
|
+
id: true,
|
|
123
|
+
defaultLimitId: true,
|
|
124
|
+
actorId: true,
|
|
125
|
+
entityId: true,
|
|
126
|
+
amount: true,
|
|
127
|
+
creditType: true,
|
|
128
|
+
reason: true,
|
|
129
|
+
},
|
|
130
|
+
})
|
|
131
|
+
.execute();
|
|
132
|
+
console.log(JSON.stringify(result, null, 2));
|
|
133
|
+
}
|
|
134
|
+
catch (error) {
|
|
135
|
+
console.error('Record not found.');
|
|
136
|
+
if (error instanceof Error) {
|
|
137
|
+
console.error(error.message);
|
|
138
|
+
}
|
|
139
|
+
process.exit(1);
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
async function handleCreate(argv, prompter) {
|
|
143
|
+
try {
|
|
144
|
+
const rawAnswers = await prompter.prompt(argv, [
|
|
145
|
+
{
|
|
146
|
+
type: 'text',
|
|
147
|
+
name: 'defaultLimitId',
|
|
148
|
+
message: 'defaultLimitId',
|
|
149
|
+
required: true,
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
type: 'text',
|
|
153
|
+
name: 'actorId',
|
|
154
|
+
message: 'actorId',
|
|
155
|
+
required: false,
|
|
156
|
+
skipPrompt: true,
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
type: 'text',
|
|
160
|
+
name: 'entityId',
|
|
161
|
+
message: 'entityId',
|
|
162
|
+
required: false,
|
|
163
|
+
skipPrompt: true,
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
type: 'text',
|
|
167
|
+
name: 'amount',
|
|
168
|
+
message: 'amount',
|
|
169
|
+
required: true,
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
type: 'text',
|
|
173
|
+
name: 'creditType',
|
|
174
|
+
message: 'creditType',
|
|
175
|
+
required: false,
|
|
176
|
+
skipPrompt: true,
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
type: 'text',
|
|
180
|
+
name: 'reason',
|
|
181
|
+
message: 'reason',
|
|
182
|
+
required: false,
|
|
183
|
+
skipPrompt: true,
|
|
184
|
+
},
|
|
185
|
+
]);
|
|
186
|
+
const answers = (0, utils_1.coerceAnswers)(rawAnswers, fieldSchema);
|
|
187
|
+
const cleanedData = (0, utils_1.stripUndefined)(answers, fieldSchema);
|
|
188
|
+
const client = (0, executor_1.getClient)();
|
|
189
|
+
const result = await client.orgLimitCredit
|
|
190
|
+
.create({
|
|
191
|
+
data: {
|
|
192
|
+
defaultLimitId: cleanedData.defaultLimitId,
|
|
193
|
+
actorId: cleanedData.actorId,
|
|
194
|
+
entityId: cleanedData.entityId,
|
|
195
|
+
amount: cleanedData.amount,
|
|
196
|
+
creditType: cleanedData.creditType,
|
|
197
|
+
reason: cleanedData.reason,
|
|
198
|
+
},
|
|
199
|
+
select: {
|
|
200
|
+
id: true,
|
|
201
|
+
defaultLimitId: true,
|
|
202
|
+
actorId: true,
|
|
203
|
+
entityId: true,
|
|
204
|
+
amount: true,
|
|
205
|
+
creditType: true,
|
|
206
|
+
reason: true,
|
|
207
|
+
},
|
|
208
|
+
})
|
|
209
|
+
.execute();
|
|
210
|
+
console.log(JSON.stringify(result, null, 2));
|
|
211
|
+
}
|
|
212
|
+
catch (error) {
|
|
213
|
+
console.error('Failed to create record.');
|
|
214
|
+
if (error instanceof Error) {
|
|
215
|
+
console.error(error.message);
|
|
216
|
+
}
|
|
217
|
+
process.exit(1);
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
async function handleUpdate(argv, prompter) {
|
|
221
|
+
try {
|
|
222
|
+
const rawAnswers = await prompter.prompt(argv, [
|
|
223
|
+
{
|
|
224
|
+
type: 'text',
|
|
225
|
+
name: 'id',
|
|
226
|
+
message: 'id',
|
|
227
|
+
required: true,
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
type: 'text',
|
|
231
|
+
name: 'defaultLimitId',
|
|
232
|
+
message: 'defaultLimitId',
|
|
233
|
+
required: false,
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
type: 'text',
|
|
237
|
+
name: 'actorId',
|
|
238
|
+
message: 'actorId',
|
|
239
|
+
required: false,
|
|
240
|
+
skipPrompt: true,
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
type: 'text',
|
|
244
|
+
name: 'entityId',
|
|
245
|
+
message: 'entityId',
|
|
246
|
+
required: false,
|
|
247
|
+
skipPrompt: true,
|
|
248
|
+
},
|
|
249
|
+
{
|
|
250
|
+
type: 'text',
|
|
251
|
+
name: 'amount',
|
|
252
|
+
message: 'amount',
|
|
253
|
+
required: false,
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
type: 'text',
|
|
257
|
+
name: 'creditType',
|
|
258
|
+
message: 'creditType',
|
|
259
|
+
required: false,
|
|
260
|
+
skipPrompt: true,
|
|
261
|
+
},
|
|
262
|
+
{
|
|
263
|
+
type: 'text',
|
|
264
|
+
name: 'reason',
|
|
265
|
+
message: 'reason',
|
|
266
|
+
required: false,
|
|
267
|
+
skipPrompt: true,
|
|
268
|
+
},
|
|
269
|
+
]);
|
|
270
|
+
const answers = (0, utils_1.coerceAnswers)(rawAnswers, fieldSchema);
|
|
271
|
+
const cleanedData = (0, utils_1.stripUndefined)(answers, fieldSchema);
|
|
272
|
+
const client = (0, executor_1.getClient)();
|
|
273
|
+
const result = await client.orgLimitCredit
|
|
274
|
+
.update({
|
|
275
|
+
where: {
|
|
276
|
+
id: answers.id,
|
|
277
|
+
},
|
|
278
|
+
data: {
|
|
279
|
+
defaultLimitId: cleanedData.defaultLimitId,
|
|
280
|
+
actorId: cleanedData.actorId,
|
|
281
|
+
entityId: cleanedData.entityId,
|
|
282
|
+
amount: cleanedData.amount,
|
|
283
|
+
creditType: cleanedData.creditType,
|
|
284
|
+
reason: cleanedData.reason,
|
|
285
|
+
},
|
|
286
|
+
select: {
|
|
287
|
+
id: true,
|
|
288
|
+
defaultLimitId: true,
|
|
289
|
+
actorId: true,
|
|
290
|
+
entityId: true,
|
|
291
|
+
amount: true,
|
|
292
|
+
creditType: true,
|
|
293
|
+
reason: true,
|
|
294
|
+
},
|
|
295
|
+
})
|
|
296
|
+
.execute();
|
|
297
|
+
console.log(JSON.stringify(result, null, 2));
|
|
298
|
+
}
|
|
299
|
+
catch (error) {
|
|
300
|
+
console.error('Failed to update record.');
|
|
301
|
+
if (error instanceof Error) {
|
|
302
|
+
console.error(error.message);
|
|
303
|
+
}
|
|
304
|
+
process.exit(1);
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
async function handleDelete(argv, prompter) {
|
|
308
|
+
try {
|
|
309
|
+
const rawAnswers = await prompter.prompt(argv, [
|
|
310
|
+
{
|
|
311
|
+
type: 'text',
|
|
312
|
+
name: 'id',
|
|
313
|
+
message: 'id',
|
|
314
|
+
required: true,
|
|
315
|
+
},
|
|
316
|
+
]);
|
|
317
|
+
const answers = (0, utils_1.coerceAnswers)(rawAnswers, fieldSchema);
|
|
318
|
+
const client = (0, executor_1.getClient)();
|
|
319
|
+
const result = await client.orgLimitCredit
|
|
320
|
+
.delete({
|
|
321
|
+
where: {
|
|
322
|
+
id: answers.id,
|
|
323
|
+
},
|
|
324
|
+
select: {
|
|
325
|
+
id: true,
|
|
326
|
+
},
|
|
327
|
+
})
|
|
328
|
+
.execute();
|
|
329
|
+
console.log(JSON.stringify(result, null, 2));
|
|
330
|
+
}
|
|
331
|
+
catch (error) {
|
|
332
|
+
console.error('Failed to delete record.');
|
|
333
|
+
if (error instanceof Error) {
|
|
334
|
+
console.error(error.message);
|
|
335
|
+
}
|
|
336
|
+
process.exit(1);
|
|
337
|
+
}
|
|
338
|
+
}
|
|
@@ -17,6 +17,9 @@ const fieldSchema = {
|
|
|
17
17
|
softMax: 'int',
|
|
18
18
|
windowStart: 'string',
|
|
19
19
|
windowDuration: 'string',
|
|
20
|
+
planMax: 'int',
|
|
21
|
+
purchasedCredits: 'int',
|
|
22
|
+
periodCredits: 'int',
|
|
20
23
|
entityId: 'uuid',
|
|
21
24
|
};
|
|
22
25
|
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';
|
|
@@ -69,6 +72,9 @@ async function handleList(argv, _prompter) {
|
|
|
69
72
|
softMax: true,
|
|
70
73
|
windowStart: true,
|
|
71
74
|
windowDuration: true,
|
|
75
|
+
planMax: true,
|
|
76
|
+
purchasedCredits: true,
|
|
77
|
+
periodCredits: true,
|
|
72
78
|
entityId: true,
|
|
73
79
|
};
|
|
74
80
|
const findManyArgs = (0, utils_1.parseFindManyArgs)(argv, defaultSelect);
|
|
@@ -95,6 +101,9 @@ async function handleFindFirst(argv, _prompter) {
|
|
|
95
101
|
softMax: true,
|
|
96
102
|
windowStart: true,
|
|
97
103
|
windowDuration: true,
|
|
104
|
+
planMax: true,
|
|
105
|
+
purchasedCredits: true,
|
|
106
|
+
periodCredits: true,
|
|
98
107
|
entityId: true,
|
|
99
108
|
};
|
|
100
109
|
const findFirstArgs = (0, utils_1.parseFindFirstArgs)(argv, defaultSelect);
|
|
@@ -133,6 +142,9 @@ async function handleGet(argv, prompter) {
|
|
|
133
142
|
softMax: true,
|
|
134
143
|
windowStart: true,
|
|
135
144
|
windowDuration: true,
|
|
145
|
+
planMax: true,
|
|
146
|
+
purchasedCredits: true,
|
|
147
|
+
periodCredits: true,
|
|
136
148
|
entityId: true,
|
|
137
149
|
},
|
|
138
150
|
})
|
|
@@ -198,6 +210,27 @@ async function handleCreate(argv, prompter) {
|
|
|
198
210
|
required: false,
|
|
199
211
|
skipPrompt: true,
|
|
200
212
|
},
|
|
213
|
+
{
|
|
214
|
+
type: 'text',
|
|
215
|
+
name: 'planMax',
|
|
216
|
+
message: 'planMax',
|
|
217
|
+
required: false,
|
|
218
|
+
skipPrompt: true,
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
type: 'text',
|
|
222
|
+
name: 'purchasedCredits',
|
|
223
|
+
message: 'purchasedCredits',
|
|
224
|
+
required: false,
|
|
225
|
+
skipPrompt: true,
|
|
226
|
+
},
|
|
227
|
+
{
|
|
228
|
+
type: 'text',
|
|
229
|
+
name: 'periodCredits',
|
|
230
|
+
message: 'periodCredits',
|
|
231
|
+
required: false,
|
|
232
|
+
skipPrompt: true,
|
|
233
|
+
},
|
|
201
234
|
{
|
|
202
235
|
type: 'text',
|
|
203
236
|
name: 'entityId',
|
|
@@ -218,6 +251,9 @@ async function handleCreate(argv, prompter) {
|
|
|
218
251
|
softMax: cleanedData.softMax,
|
|
219
252
|
windowStart: cleanedData.windowStart,
|
|
220
253
|
windowDuration: cleanedData.windowDuration,
|
|
254
|
+
planMax: cleanedData.planMax,
|
|
255
|
+
purchasedCredits: cleanedData.purchasedCredits,
|
|
256
|
+
periodCredits: cleanedData.periodCredits,
|
|
221
257
|
entityId: cleanedData.entityId,
|
|
222
258
|
},
|
|
223
259
|
select: {
|
|
@@ -229,6 +265,9 @@ async function handleCreate(argv, prompter) {
|
|
|
229
265
|
softMax: true,
|
|
230
266
|
windowStart: true,
|
|
231
267
|
windowDuration: true,
|
|
268
|
+
planMax: true,
|
|
269
|
+
purchasedCredits: true,
|
|
270
|
+
periodCredits: true,
|
|
232
271
|
entityId: true,
|
|
233
272
|
},
|
|
234
273
|
})
|
|
@@ -300,6 +339,27 @@ async function handleUpdate(argv, prompter) {
|
|
|
300
339
|
required: false,
|
|
301
340
|
skipPrompt: true,
|
|
302
341
|
},
|
|
342
|
+
{
|
|
343
|
+
type: 'text',
|
|
344
|
+
name: 'planMax',
|
|
345
|
+
message: 'planMax',
|
|
346
|
+
required: false,
|
|
347
|
+
skipPrompt: true,
|
|
348
|
+
},
|
|
349
|
+
{
|
|
350
|
+
type: 'text',
|
|
351
|
+
name: 'purchasedCredits',
|
|
352
|
+
message: 'purchasedCredits',
|
|
353
|
+
required: false,
|
|
354
|
+
skipPrompt: true,
|
|
355
|
+
},
|
|
356
|
+
{
|
|
357
|
+
type: 'text',
|
|
358
|
+
name: 'periodCredits',
|
|
359
|
+
message: 'periodCredits',
|
|
360
|
+
required: false,
|
|
361
|
+
skipPrompt: true,
|
|
362
|
+
},
|
|
303
363
|
{
|
|
304
364
|
type: 'text',
|
|
305
365
|
name: 'entityId',
|
|
@@ -323,6 +383,9 @@ async function handleUpdate(argv, prompter) {
|
|
|
323
383
|
softMax: cleanedData.softMax,
|
|
324
384
|
windowStart: cleanedData.windowStart,
|
|
325
385
|
windowDuration: cleanedData.windowDuration,
|
|
386
|
+
planMax: cleanedData.planMax,
|
|
387
|
+
purchasedCredits: cleanedData.purchasedCredits,
|
|
388
|
+
periodCredits: cleanedData.periodCredits,
|
|
326
389
|
entityId: cleanedData.entityId,
|
|
327
390
|
},
|
|
328
391
|
select: {
|
|
@@ -334,6 +397,9 @@ async function handleUpdate(argv, prompter) {
|
|
|
334
397
|
softMax: true,
|
|
335
398
|
windowStart: true,
|
|
336
399
|
windowDuration: true,
|
|
400
|
+
planMax: true,
|
|
401
|
+
purchasedCredits: true,
|
|
402
|
+
periodCredits: true,
|
|
337
403
|
entityId: true,
|
|
338
404
|
},
|
|
339
405
|
})
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CLI commands for Partition
|
|
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;
|