@constructive-sdk/cli 0.20.9 → 0.21.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.
Files changed (45) hide show
  1. package/admin/cli/commands/usage-snapshot.d.ts +8 -0
  2. package/admin/cli/commands/usage-snapshot.js +316 -0
  3. package/admin/cli/commands.js +3 -1
  4. package/admin/cli/executor.d.ts +1 -0
  5. package/admin/orm/index.d.ts +2 -0
  6. package/admin/orm/index.js +2 -0
  7. package/admin/orm/input-types.d.ts +129 -0
  8. package/admin/orm/models/index.d.ts +1 -0
  9. package/admin/orm/models/index.js +3 -1
  10. package/admin/orm/models/usageSnapshot.d.ts +56 -0
  11. package/admin/orm/models/usageSnapshot.js +100 -0
  12. package/esm/admin/cli/commands/usage-snapshot.d.ts +8 -0
  13. package/esm/admin/cli/commands/usage-snapshot.js +314 -0
  14. package/esm/admin/cli/commands.js +3 -1
  15. package/esm/admin/cli/executor.d.ts +1 -0
  16. package/esm/admin/orm/index.d.ts +2 -0
  17. package/esm/admin/orm/index.js +2 -0
  18. package/esm/admin/orm/input-types.d.ts +129 -0
  19. package/esm/admin/orm/models/index.d.ts +1 -0
  20. package/esm/admin/orm/models/index.js +1 -0
  21. package/esm/admin/orm/models/usageSnapshot.d.ts +56 -0
  22. package/esm/admin/orm/models/usageSnapshot.js +96 -0
  23. package/esm/public/cli/commands/usage-snapshot.d.ts +8 -0
  24. package/esm/public/cli/commands/usage-snapshot.js +314 -0
  25. package/esm/public/cli/commands.js +3 -1
  26. package/esm/public/cli/executor.d.ts +1 -0
  27. package/esm/public/orm/index.d.ts +2 -0
  28. package/esm/public/orm/index.js +2 -0
  29. package/esm/public/orm/input-types.d.ts +129 -0
  30. package/esm/public/orm/models/index.d.ts +1 -0
  31. package/esm/public/orm/models/index.js +1 -0
  32. package/esm/public/orm/models/usageSnapshot.d.ts +56 -0
  33. package/esm/public/orm/models/usageSnapshot.js +96 -0
  34. package/package.json +6 -6
  35. package/public/cli/commands/usage-snapshot.d.ts +8 -0
  36. package/public/cli/commands/usage-snapshot.js +316 -0
  37. package/public/cli/commands.js +3 -1
  38. package/public/cli/executor.d.ts +1 -0
  39. package/public/orm/index.d.ts +2 -0
  40. package/public/orm/index.js +2 -0
  41. package/public/orm/input-types.d.ts +129 -0
  42. package/public/orm/models/index.d.ts +1 -0
  43. package/public/orm/models/index.js +3 -1
  44. package/public/orm/models/usageSnapshot.d.ts +56 -0
  45. package/public/orm/models/usageSnapshot.js +100 -0
@@ -0,0 +1,56 @@
1
+ /**
2
+ * UsageSnapshot model for ORM client
3
+ * @generated by @constructive-io/graphql-codegen
4
+ * DO NOT EDIT - changes will be overwritten
5
+ */
6
+ import { OrmClient } from '../client';
7
+ import { QueryBuilder } from '../query-builder';
8
+ import type { ConnectionResult, FindManyArgs, FindFirstArgs, CreateArgs, UpdateArgs, DeleteArgs, InferSelectResult, StrictSelect } from '../select-types';
9
+ import type { UsageSnapshotWithRelations, UsageSnapshotSelect, UsageSnapshotFilter, UsageSnapshotOrderBy, CreateUsageSnapshotInput, UsageSnapshotPatch } from '../input-types';
10
+ export declare class UsageSnapshotModel {
11
+ private client;
12
+ constructor(client: OrmClient);
13
+ findMany<S extends UsageSnapshotSelect>(args: FindManyArgs<S, UsageSnapshotFilter, UsageSnapshotOrderBy> & {
14
+ select: S;
15
+ } & StrictSelect<S, UsageSnapshotSelect>): QueryBuilder<{
16
+ usageSnapshots: ConnectionResult<InferSelectResult<UsageSnapshotWithRelations, S>>;
17
+ }>;
18
+ findFirst<S extends UsageSnapshotSelect>(args: FindFirstArgs<S, UsageSnapshotFilter> & {
19
+ select: S;
20
+ } & StrictSelect<S, UsageSnapshotSelect>): QueryBuilder<{
21
+ usageSnapshots: {
22
+ nodes: InferSelectResult<UsageSnapshotWithRelations, S>[];
23
+ };
24
+ }>;
25
+ findOne<S extends UsageSnapshotSelect>(args: {
26
+ id: string;
27
+ select: S;
28
+ } & StrictSelect<S, UsageSnapshotSelect>): QueryBuilder<{
29
+ usageSnapshot: InferSelectResult<UsageSnapshotWithRelations, S> | null;
30
+ }>;
31
+ create<S extends UsageSnapshotSelect>(args: CreateArgs<S, CreateUsageSnapshotInput['usageSnapshot']> & {
32
+ select: S;
33
+ } & StrictSelect<S, UsageSnapshotSelect>): QueryBuilder<{
34
+ createUsageSnapshot: {
35
+ usageSnapshot: InferSelectResult<UsageSnapshotWithRelations, S>;
36
+ };
37
+ }>;
38
+ update<S extends UsageSnapshotSelect>(args: UpdateArgs<S, {
39
+ id: string;
40
+ }, UsageSnapshotPatch> & {
41
+ select: S;
42
+ } & StrictSelect<S, UsageSnapshotSelect>): QueryBuilder<{
43
+ updateUsageSnapshot: {
44
+ usageSnapshot: InferSelectResult<UsageSnapshotWithRelations, S>;
45
+ };
46
+ }>;
47
+ delete<S extends UsageSnapshotSelect>(args: DeleteArgs<{
48
+ id: string;
49
+ }, S> & {
50
+ select: S;
51
+ } & StrictSelect<S, UsageSnapshotSelect>): QueryBuilder<{
52
+ deleteUsageSnapshot: {
53
+ usageSnapshot: InferSelectResult<UsageSnapshotWithRelations, S>;
54
+ };
55
+ }>;
56
+ }
@@ -0,0 +1,100 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UsageSnapshotModel = void 0;
4
+ const query_builder_1 = require("../query-builder");
5
+ const input_types_1 = require("../input-types");
6
+ class UsageSnapshotModel {
7
+ client;
8
+ constructor(client) {
9
+ this.client = client;
10
+ }
11
+ findMany(args) {
12
+ const { document, variables } = (0, query_builder_1.buildFindManyDocument)('UsageSnapshot', 'usageSnapshots', args.select, {
13
+ where: args?.where,
14
+ orderBy: args?.orderBy,
15
+ first: args?.first,
16
+ last: args?.last,
17
+ after: args?.after,
18
+ before: args?.before,
19
+ offset: args?.offset,
20
+ }, 'UsageSnapshotFilter', 'UsageSnapshotOrderBy', input_types_1.connectionFieldsMap);
21
+ return new query_builder_1.QueryBuilder({
22
+ client: this.client,
23
+ operation: 'query',
24
+ operationName: 'UsageSnapshot',
25
+ fieldName: 'usageSnapshots',
26
+ document,
27
+ variables,
28
+ });
29
+ }
30
+ findFirst(args) {
31
+ const { document, variables } = (0, query_builder_1.buildFindFirstDocument)('UsageSnapshot', 'usageSnapshots', args.select, {
32
+ where: args?.where,
33
+ }, 'UsageSnapshotFilter', input_types_1.connectionFieldsMap);
34
+ return new query_builder_1.QueryBuilder({
35
+ client: this.client,
36
+ operation: 'query',
37
+ operationName: 'UsageSnapshot',
38
+ fieldName: 'usageSnapshots',
39
+ document,
40
+ variables,
41
+ });
42
+ }
43
+ findOne(args) {
44
+ const { document, variables } = (0, query_builder_1.buildFindManyDocument)('UsageSnapshot', 'usageSnapshots', args.select, {
45
+ where: {
46
+ id: {
47
+ equalTo: args.id,
48
+ },
49
+ },
50
+ first: 1,
51
+ }, 'UsageSnapshotFilter', 'UsageSnapshotOrderBy', input_types_1.connectionFieldsMap);
52
+ return new query_builder_1.QueryBuilder({
53
+ client: this.client,
54
+ operation: 'query',
55
+ operationName: 'UsageSnapshot',
56
+ fieldName: 'usageSnapshot',
57
+ document,
58
+ variables,
59
+ transform: (data) => ({
60
+ usageSnapshot: data.usageSnapshots?.nodes?.[0] ?? null,
61
+ }),
62
+ });
63
+ }
64
+ create(args) {
65
+ const { document, variables } = (0, query_builder_1.buildCreateDocument)('UsageSnapshot', 'createUsageSnapshot', 'usageSnapshot', args.select, args.data, 'CreateUsageSnapshotInput', input_types_1.connectionFieldsMap);
66
+ return new query_builder_1.QueryBuilder({
67
+ client: this.client,
68
+ operation: 'mutation',
69
+ operationName: 'UsageSnapshot',
70
+ fieldName: 'createUsageSnapshot',
71
+ document,
72
+ variables,
73
+ });
74
+ }
75
+ update(args) {
76
+ const { document, variables } = (0, query_builder_1.buildUpdateByPkDocument)('UsageSnapshot', 'updateUsageSnapshot', 'usageSnapshot', args.select, args.where.id, args.data, 'UpdateUsageSnapshotInput', 'id', 'usageSnapshotPatch', input_types_1.connectionFieldsMap);
77
+ return new query_builder_1.QueryBuilder({
78
+ client: this.client,
79
+ operation: 'mutation',
80
+ operationName: 'UsageSnapshot',
81
+ fieldName: 'updateUsageSnapshot',
82
+ document,
83
+ variables,
84
+ });
85
+ }
86
+ delete(args) {
87
+ const { document, variables } = (0, query_builder_1.buildDeleteByPkDocument)('UsageSnapshot', 'deleteUsageSnapshot', 'usageSnapshot', {
88
+ id: args.where.id,
89
+ }, 'DeleteUsageSnapshotInput', args.select, input_types_1.connectionFieldsMap);
90
+ return new query_builder_1.QueryBuilder({
91
+ client: this.client,
92
+ operation: 'mutation',
93
+ operationName: 'UsageSnapshot',
94
+ fieldName: 'deleteUsageSnapshot',
95
+ document,
96
+ variables,
97
+ });
98
+ }
99
+ }
100
+ exports.UsageSnapshotModel = UsageSnapshotModel;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * CLI commands for UsageSnapshot
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,314 @@
1
+ /**
2
+ * CLI commands for UsageSnapshot
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
+ databaseId: 'uuid',
11
+ metricName: 'string',
12
+ metricValue: 'int',
13
+ dimensions: 'json',
14
+ capturedAt: 'string',
15
+ id: 'uuid',
16
+ };
17
+ const usage = '\nusage-snapshot <command>\n\nCommands:\n list List usageSnapshot records\n find-first Find first matching usageSnapshot record\n get Get a usageSnapshot by ID\n create Create a new usageSnapshot\n update Update an existing usageSnapshot\n delete Delete a usageSnapshot\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';
18
+ export default async (argv, prompter, _options) => {
19
+ if (argv.help || argv.h) {
20
+ console.log(usage);
21
+ process.exit(0);
22
+ }
23
+ const { first: subcommand, newArgv } = extractFirst(argv);
24
+ if (!subcommand) {
25
+ const answer = await prompter.prompt(argv, [
26
+ {
27
+ type: 'autocomplete',
28
+ name: 'subcommand',
29
+ message: 'What do you want to do?',
30
+ options: ['list', 'find-first', 'get', 'create', 'update', 'delete'],
31
+ },
32
+ ]);
33
+ return handleTableSubcommand(answer.subcommand, newArgv, prompter);
34
+ }
35
+ return handleTableSubcommand(subcommand, newArgv, prompter);
36
+ };
37
+ async function handleTableSubcommand(subcommand, argv, prompter) {
38
+ switch (subcommand) {
39
+ case 'list':
40
+ return handleList(argv, prompter);
41
+ case 'find-first':
42
+ return handleFindFirst(argv, prompter);
43
+ case 'get':
44
+ return handleGet(argv, prompter);
45
+ case 'create':
46
+ return handleCreate(argv, prompter);
47
+ case 'update':
48
+ return handleUpdate(argv, prompter);
49
+ case 'delete':
50
+ return handleDelete(argv, prompter);
51
+ default:
52
+ console.log(usage);
53
+ process.exit(1);
54
+ }
55
+ }
56
+ async function handleList(argv, _prompter) {
57
+ try {
58
+ const defaultSelect = {
59
+ databaseId: true,
60
+ metricName: true,
61
+ metricValue: true,
62
+ dimensions: true,
63
+ capturedAt: true,
64
+ id: true,
65
+ };
66
+ const findManyArgs = parseFindManyArgs(argv, defaultSelect);
67
+ const client = getClient();
68
+ const result = await client.usageSnapshot.findMany(findManyArgs).execute();
69
+ console.log(JSON.stringify(result, null, 2));
70
+ }
71
+ catch (error) {
72
+ console.error('Failed to list records.');
73
+ if (error instanceof Error) {
74
+ console.error(error.message);
75
+ }
76
+ process.exit(1);
77
+ }
78
+ }
79
+ async function handleFindFirst(argv, _prompter) {
80
+ try {
81
+ const defaultSelect = {
82
+ databaseId: true,
83
+ metricName: true,
84
+ metricValue: true,
85
+ dimensions: true,
86
+ capturedAt: true,
87
+ id: true,
88
+ };
89
+ const findFirstArgs = parseFindFirstArgs(argv, defaultSelect);
90
+ const client = getClient();
91
+ const result = await client.usageSnapshot.findFirst(findFirstArgs).execute();
92
+ console.log(JSON.stringify(result, null, 2));
93
+ }
94
+ catch (error) {
95
+ console.error('Failed to find record.');
96
+ if (error instanceof Error) {
97
+ console.error(error.message);
98
+ }
99
+ process.exit(1);
100
+ }
101
+ }
102
+ async function handleGet(argv, prompter) {
103
+ try {
104
+ const answers = await prompter.prompt(argv, [
105
+ {
106
+ type: 'text',
107
+ name: 'id',
108
+ message: 'id',
109
+ required: true,
110
+ },
111
+ ]);
112
+ const client = getClient();
113
+ const result = await client.usageSnapshot
114
+ .findOne({
115
+ id: answers.id,
116
+ select: {
117
+ databaseId: true,
118
+ metricName: true,
119
+ metricValue: true,
120
+ dimensions: true,
121
+ capturedAt: true,
122
+ id: true,
123
+ },
124
+ })
125
+ .execute();
126
+ console.log(JSON.stringify(result, null, 2));
127
+ }
128
+ catch (error) {
129
+ console.error('Record not found.');
130
+ if (error instanceof Error) {
131
+ console.error(error.message);
132
+ }
133
+ process.exit(1);
134
+ }
135
+ }
136
+ async function handleCreate(argv, prompter) {
137
+ try {
138
+ const rawAnswers = await prompter.prompt(argv, [
139
+ {
140
+ type: 'text',
141
+ name: 'databaseId',
142
+ message: 'databaseId',
143
+ required: true,
144
+ },
145
+ {
146
+ type: 'text',
147
+ name: 'metricName',
148
+ message: 'metricName',
149
+ required: true,
150
+ },
151
+ {
152
+ type: 'text',
153
+ name: 'metricValue',
154
+ message: 'metricValue',
155
+ required: false,
156
+ skipPrompt: true,
157
+ },
158
+ {
159
+ type: 'json',
160
+ name: 'dimensions',
161
+ message: 'dimensions',
162
+ required: false,
163
+ skipPrompt: true,
164
+ },
165
+ {
166
+ type: 'text',
167
+ name: 'capturedAt',
168
+ message: 'capturedAt',
169
+ required: false,
170
+ skipPrompt: true,
171
+ },
172
+ ]);
173
+ const answers = coerceAnswers(rawAnswers, fieldSchema);
174
+ const cleanedData = stripUndefined(answers, fieldSchema);
175
+ const client = getClient();
176
+ const result = await client.usageSnapshot
177
+ .create({
178
+ data: {
179
+ databaseId: cleanedData.databaseId,
180
+ metricName: cleanedData.metricName,
181
+ metricValue: cleanedData.metricValue,
182
+ dimensions: cleanedData.dimensions,
183
+ capturedAt: cleanedData.capturedAt,
184
+ },
185
+ select: {
186
+ databaseId: true,
187
+ metricName: true,
188
+ metricValue: true,
189
+ dimensions: true,
190
+ capturedAt: true,
191
+ id: true,
192
+ },
193
+ })
194
+ .execute();
195
+ console.log(JSON.stringify(result, null, 2));
196
+ }
197
+ catch (error) {
198
+ console.error('Failed to create record.');
199
+ if (error instanceof Error) {
200
+ console.error(error.message);
201
+ }
202
+ process.exit(1);
203
+ }
204
+ }
205
+ async function handleUpdate(argv, prompter) {
206
+ try {
207
+ const rawAnswers = await prompter.prompt(argv, [
208
+ {
209
+ type: 'text',
210
+ name: 'id',
211
+ message: 'id',
212
+ required: true,
213
+ },
214
+ {
215
+ type: 'text',
216
+ name: 'databaseId',
217
+ message: 'databaseId',
218
+ required: false,
219
+ },
220
+ {
221
+ type: 'text',
222
+ name: 'metricName',
223
+ message: 'metricName',
224
+ required: false,
225
+ },
226
+ {
227
+ type: 'text',
228
+ name: 'metricValue',
229
+ message: 'metricValue',
230
+ required: false,
231
+ skipPrompt: true,
232
+ },
233
+ {
234
+ type: 'json',
235
+ name: 'dimensions',
236
+ message: 'dimensions',
237
+ required: false,
238
+ skipPrompt: true,
239
+ },
240
+ {
241
+ type: 'text',
242
+ name: 'capturedAt',
243
+ message: 'capturedAt',
244
+ required: false,
245
+ skipPrompt: true,
246
+ },
247
+ ]);
248
+ const answers = coerceAnswers(rawAnswers, fieldSchema);
249
+ const cleanedData = stripUndefined(answers, fieldSchema);
250
+ const client = getClient();
251
+ const result = await client.usageSnapshot
252
+ .update({
253
+ where: {
254
+ id: answers.id,
255
+ },
256
+ data: {
257
+ databaseId: cleanedData.databaseId,
258
+ metricName: cleanedData.metricName,
259
+ metricValue: cleanedData.metricValue,
260
+ dimensions: cleanedData.dimensions,
261
+ capturedAt: cleanedData.capturedAt,
262
+ },
263
+ select: {
264
+ databaseId: true,
265
+ metricName: true,
266
+ metricValue: true,
267
+ dimensions: true,
268
+ capturedAt: true,
269
+ id: true,
270
+ },
271
+ })
272
+ .execute();
273
+ console.log(JSON.stringify(result, null, 2));
274
+ }
275
+ catch (error) {
276
+ console.error('Failed to update record.');
277
+ if (error instanceof Error) {
278
+ console.error(error.message);
279
+ }
280
+ process.exit(1);
281
+ }
282
+ }
283
+ async function handleDelete(argv, prompter) {
284
+ try {
285
+ const rawAnswers = await prompter.prompt(argv, [
286
+ {
287
+ type: 'text',
288
+ name: 'id',
289
+ message: 'id',
290
+ required: true,
291
+ },
292
+ ]);
293
+ const answers = coerceAnswers(rawAnswers, fieldSchema);
294
+ const client = getClient();
295
+ const result = await client.usageSnapshot
296
+ .delete({
297
+ where: {
298
+ id: answers.id,
299
+ },
300
+ select: {
301
+ id: true,
302
+ },
303
+ })
304
+ .execute();
305
+ console.log(JSON.stringify(result, null, 2));
306
+ }
307
+ catch (error) {
308
+ console.error('Failed to delete record.');
309
+ if (error instanceof Error) {
310
+ console.error(error.message);
311
+ }
312
+ process.exit(1);
313
+ }
314
+ }
@@ -42,6 +42,7 @@ import appLimitEventCmd from './commands/app-limit-event';
42
42
  import orgLimitEventCmd from './commands/org-limit-event';
43
43
  import orgGrantCmd from './commands/org-grant';
44
44
  import orgChartEdgeCmd from './commands/org-chart-edge';
45
+ import usageSnapshotCmd from './commands/usage-snapshot';
45
46
  import orgMemberProfileCmd from './commands/org-member-profile';
46
47
  import appLevelCmd from './commands/app-level';
47
48
  import appLimitCmd from './commands/app-limit';
@@ -105,6 +106,7 @@ const createCommandMap = () => ({
105
106
  'org-limit-event': orgLimitEventCmd,
106
107
  'org-grant': orgGrantCmd,
107
108
  'org-chart-edge': orgChartEdgeCmd,
109
+ 'usage-snapshot': usageSnapshotCmd,
108
110
  'org-member-profile': orgMemberProfileCmd,
109
111
  'app-level': appLevelCmd,
110
112
  'app-limit': appLimitCmd,
@@ -130,7 +132,7 @@ const createCommandMap = () => ({
130
132
  'submit-org-invite-code': submitOrgInviteCodeCmd,
131
133
  'provision-bucket': provisionBucketCmd,
132
134
  });
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';
135
+ 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 usage-snapshot usageSnapshot 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';
134
136
  export const commands = async (argv, prompter, options) => {
135
137
  if (argv.help || argv.h) {
136
138
  console.log(usage);
@@ -36,6 +36,7 @@ export declare function getClient(contextName?: string): {
36
36
  orgLimitEvent: import("..").OrgLimitEventModel;
37
37
  orgGrant: import("..").OrgGrantModel;
38
38
  orgChartEdge: import("..").OrgChartEdgeModel;
39
+ usageSnapshot: import("..").UsageSnapshotModel;
39
40
  orgMemberProfile: import("..").OrgMemberProfileModel;
40
41
  appLevel: import("..").AppLevelModel;
41
42
  appLimit: import("..").AppLimitModel;
@@ -35,6 +35,7 @@ import { AppLimitEventModel } from './models/appLimitEvent';
35
35
  import { OrgLimitEventModel } from './models/orgLimitEvent';
36
36
  import { OrgGrantModel } from './models/orgGrant';
37
37
  import { OrgChartEdgeModel } from './models/orgChartEdge';
38
+ import { UsageSnapshotModel } from './models/usageSnapshot';
38
39
  import { OrgMemberProfileModel } from './models/orgMemberProfile';
39
40
  import { AppLevelModel } from './models/appLevel';
40
41
  import { AppLimitModel } from './models/appLimit';
@@ -113,6 +114,7 @@ export declare function createClient(config: OrmClientConfig): {
113
114
  orgLimitEvent: OrgLimitEventModel;
114
115
  orgGrant: OrgGrantModel;
115
116
  orgChartEdge: OrgChartEdgeModel;
117
+ usageSnapshot: UsageSnapshotModel;
116
118
  orgMemberProfile: OrgMemberProfileModel;
117
119
  appLevel: AppLevelModel;
118
120
  appLimit: AppLimitModel;
@@ -40,6 +40,7 @@ import { AppLimitEventModel } from './models/appLimitEvent';
40
40
  import { OrgLimitEventModel } from './models/orgLimitEvent';
41
41
  import { OrgGrantModel } from './models/orgGrant';
42
42
  import { OrgChartEdgeModel } from './models/orgChartEdge';
43
+ import { UsageSnapshotModel } from './models/usageSnapshot';
43
44
  import { OrgMemberProfileModel } from './models/orgMemberProfile';
44
45
  import { AppLevelModel } from './models/appLevel';
45
46
  import { AppLimitModel } from './models/appLimit';
@@ -121,6 +122,7 @@ export function createClient(config) {
121
122
  orgLimitEvent: new OrgLimitEventModel(client),
122
123
  orgGrant: new OrgGrantModel(client),
123
124
  orgChartEdge: new OrgChartEdgeModel(client),
125
+ usageSnapshot: new UsageSnapshotModel(client),
124
126
  orgMemberProfile: new OrgMemberProfileModel(client),
125
127
  appLevel: new AppLevelModel(client),
126
128
  appLimit: new AppLimitModel(client),