@constructive-sdk/cli 1.21.5 → 1.21.6
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/provision-bucket.js +1 -1
- package/admin/cli/commands.js +1 -1
- package/admin/orm/input-types.d.ts +4 -4
- package/admin/orm/mutation/index.d.ts +5 -4
- package/agent/cli/commands/provision-bucket.js +1 -1
- package/agent/cli/commands.js +1 -1
- package/agent/orm/input-types.d.ts +4 -4
- package/agent/orm/mutation/index.d.ts +5 -4
- package/api/cli/commands/{route-binding.d.ts → create-function-from-source.d.ts} +1 -1
- package/api/cli/commands/create-function-from-source.js +36 -0
- package/api/cli/commands/{hostname-binding.d.ts → email-shared-account.d.ts} +1 -1
- package/api/cli/commands/email-shared-account.js +21 -0
- package/api/cli/commands/managed-domain.js +22 -0
- package/api/cli/commands/platform-managed-domain.js +22 -0
- package/api/cli/commands/provision-bucket.js +1 -1
- package/api/cli/commands/unique-constraint.js +22 -0
- package/{esm/api/cli/commands/route-binding.d.ts → api/cli/commands/update-function-from-source.d.ts} +1 -1
- package/api/cli/commands/update-function-from-source.js +36 -0
- package/api/cli/commands.js +7 -5
- package/api/cli/executor.d.ts +15 -2
- package/api/orm/index.d.ts +15 -4
- package/api/orm/index.js +0 -4
- package/api/orm/input-types.d.ts +96 -439
- package/api/orm/models/index.d.ts +0 -2
- package/api/orm/models/index.js +2 -6
- package/api/orm/mutation/index.d.ts +30 -5
- package/api/orm/mutation/index.js +24 -0
- package/api/orm/query/index.d.ts +5 -0
- package/api/orm/query/index.js +7 -0
- package/auth/cli/commands/provision-bucket.js +1 -1
- package/auth/cli/commands.js +1 -1
- package/auth/orm/input-types.d.ts +5 -29
- package/auth/orm/mutation/index.d.ts +5 -4
- package/compute/cli/commands/function-invocation.js +44 -0
- package/compute/cli/commands/platform-function-invocation.js +44 -0
- package/compute/cli/commands/provision-bucket.js +1 -1
- package/compute/cli/commands.js +1 -1
- package/compute/orm/input-types.d.ts +50 -6
- package/compute/orm/mutation/index.d.ts +5 -4
- package/config/cli/commands/provision-bucket.js +1 -1
- package/config/cli/commands.js +1 -1
- package/config/orm/input-types.d.ts +4 -4
- package/config/orm/mutation/index.d.ts +5 -4
- package/esm/admin/cli/commands/provision-bucket.js +1 -1
- package/esm/admin/cli/commands.js +1 -1
- package/esm/admin/orm/input-types.d.ts +4 -4
- package/esm/admin/orm/mutation/index.d.ts +5 -4
- package/esm/agent/cli/commands/provision-bucket.js +1 -1
- package/esm/agent/cli/commands.js +1 -1
- package/esm/agent/orm/input-types.d.ts +4 -4
- package/esm/agent/orm/mutation/index.d.ts +5 -4
- package/esm/api/cli/commands/create-function-from-source.d.ts +8 -0
- package/esm/api/cli/commands/create-function-from-source.js +34 -0
- package/esm/api/cli/commands/{hostname-binding.d.ts → email-shared-account.d.ts} +1 -1
- package/esm/api/cli/commands/email-shared-account.js +19 -0
- package/esm/api/cli/commands/managed-domain.js +22 -0
- package/esm/api/cli/commands/platform-managed-domain.js +22 -0
- package/esm/api/cli/commands/provision-bucket.js +1 -1
- package/esm/api/cli/commands/unique-constraint.js +22 -0
- package/esm/api/cli/commands/update-function-from-source.d.ts +8 -0
- package/esm/api/cli/commands/update-function-from-source.js +34 -0
- package/esm/api/cli/commands.js +7 -5
- package/esm/api/cli/executor.d.ts +15 -2
- package/esm/api/orm/index.d.ts +15 -4
- package/esm/api/orm/index.js +0 -4
- package/esm/api/orm/input-types.d.ts +96 -439
- package/esm/api/orm/models/index.d.ts +0 -2
- package/esm/api/orm/models/index.js +0 -2
- package/esm/api/orm/mutation/index.d.ts +30 -5
- package/esm/api/orm/mutation/index.js +24 -0
- package/esm/api/orm/query/index.d.ts +5 -0
- package/esm/api/orm/query/index.js +7 -0
- package/esm/auth/cli/commands/provision-bucket.js +1 -1
- package/esm/auth/cli/commands.js +1 -1
- package/esm/auth/orm/input-types.d.ts +5 -29
- package/esm/auth/orm/mutation/index.d.ts +5 -4
- package/esm/compute/cli/commands/function-invocation.js +44 -0
- package/esm/compute/cli/commands/platform-function-invocation.js +44 -0
- package/esm/compute/cli/commands/provision-bucket.js +1 -1
- package/esm/compute/cli/commands.js +1 -1
- package/esm/compute/orm/input-types.d.ts +50 -6
- package/esm/compute/orm/mutation/index.d.ts +5 -4
- package/esm/config/cli/commands/provision-bucket.js +1 -1
- package/esm/config/cli/commands.js +1 -1
- package/esm/config/orm/input-types.d.ts +4 -4
- package/esm/config/orm/mutation/index.d.ts +5 -4
- package/esm/infra/cli/commands/provision-bucket.js +1 -1
- package/esm/infra/cli/commands.js +1 -1
- package/esm/infra/orm/input-types.d.ts +4 -4
- package/esm/infra/orm/mutation/index.d.ts +5 -4
- package/esm/modules/cli/commands/billing-provider-module.js +110 -0
- package/esm/modules/cli/commands/blueprint-construction.js +0 -22
- package/esm/modules/cli/commands/catalog-module.js +44 -0
- package/esm/modules/cli/commands/construct-blueprint.js +1 -1
- package/esm/modules/cli/commands/provision-bucket.js +1 -1
- package/esm/modules/cli/commands/storage-module.js +22 -0
- package/esm/modules/cli/commands.js +1 -1
- package/esm/modules/orm/input-types.d.ts +72 -21
- package/esm/modules/orm/mutation/index.d.ts +6 -5
- package/esm/objects/cli/commands/provision-bucket.js +1 -1
- package/esm/objects/cli/commands.js +1 -1
- package/esm/objects/orm/input-types.d.ts +4 -4
- package/esm/objects/orm/mutation/index.d.ts +5 -4
- package/esm/remote/cli/commands/provision-bucket.js +1 -1
- package/esm/remote/cli/commands.js +1 -1
- package/esm/remote/orm/input-types.d.ts +4 -4
- package/esm/remote/orm/mutation/index.d.ts +5 -4
- package/esm/storage/cli/commands/bucket.js +23 -0
- package/esm/storage/cli/commands/platform-bucket.js +23 -0
- package/esm/storage/cli/commands/provision-bucket.js +1 -1
- package/esm/storage/cli/commands/upload-files.js +1 -1
- package/esm/storage/cli/commands/upload-platform-files.js +1 -1
- package/esm/storage/cli/commands.js +1 -1
- package/esm/storage/orm/input-types.d.ts +34 -6
- package/esm/storage/orm/mutation/index.d.ts +7 -6
- package/esm/usage/cli/commands/provision-bucket.js +1 -1
- package/esm/usage/cli/commands.js +1 -1
- package/esm/usage/orm/input-types.d.ts +4 -4
- package/esm/usage/orm/mutation/index.d.ts +5 -4
- package/infra/cli/commands/provision-bucket.js +1 -1
- package/infra/cli/commands.js +1 -1
- package/infra/orm/input-types.d.ts +4 -4
- package/infra/orm/mutation/index.d.ts +5 -4
- package/modules/cli/commands/billing-provider-module.js +110 -0
- package/modules/cli/commands/blueprint-construction.js +0 -22
- package/modules/cli/commands/catalog-module.js +44 -0
- package/modules/cli/commands/construct-blueprint.js +1 -1
- package/modules/cli/commands/provision-bucket.js +1 -1
- package/modules/cli/commands/storage-module.js +22 -0
- package/modules/cli/commands.js +1 -1
- package/modules/orm/input-types.d.ts +72 -21
- package/modules/orm/mutation/index.d.ts +6 -5
- package/objects/cli/commands/provision-bucket.js +1 -1
- package/objects/cli/commands.js +1 -1
- package/objects/orm/input-types.d.ts +4 -4
- package/objects/orm/mutation/index.d.ts +5 -4
- package/package.json +2 -2
- package/remote/cli/commands/provision-bucket.js +1 -1
- package/remote/cli/commands.js +1 -1
- package/remote/orm/input-types.d.ts +4 -4
- package/remote/orm/mutation/index.d.ts +5 -4
- package/storage/cli/commands/bucket.js +23 -0
- package/storage/cli/commands/platform-bucket.js +23 -0
- package/storage/cli/commands/provision-bucket.js +1 -1
- package/storage/cli/commands/upload-files.js +1 -1
- package/storage/cli/commands/upload-platform-files.js +1 -1
- package/storage/cli/commands.js +1 -1
- package/storage/orm/input-types.d.ts +34 -6
- package/storage/orm/mutation/index.d.ts +7 -6
- package/usage/cli/commands/provision-bucket.js +1 -1
- package/usage/cli/commands.js +1 -1
- package/usage/orm/input-types.d.ts +4 -4
- package/usage/orm/mutation/index.d.ts +5 -4
- package/api/cli/commands/hostname-binding.js +0 -388
- package/api/cli/commands/route-binding.js +0 -476
- package/api/orm/models/hostnameBinding.d.ts +0 -54
- package/api/orm/models/hostnameBinding.js +0 -104
- package/api/orm/models/routeBinding.d.ts +0 -54
- package/api/orm/models/routeBinding.js +0 -104
- package/esm/api/cli/commands/hostname-binding.js +0 -386
- package/esm/api/cli/commands/route-binding.js +0 -474
- package/esm/api/orm/models/hostnameBinding.d.ts +0 -54
- package/esm/api/orm/models/hostnameBinding.js +0 -100
- package/esm/api/orm/models/routeBinding.d.ts +0 -54
- package/esm/api/orm/models/routeBinding.js +0 -100
|
@@ -19,10 +19,11 @@ export interface InsertNodesAtPathsVariables {
|
|
|
19
19
|
/**
|
|
20
20
|
* Variables for provisionBucket
|
|
21
21
|
* Reconcile an S3 bucket for a logical bucket in the database.
|
|
22
|
-
|
|
23
|
-
storage:provision_bucket job used
|
|
24
|
-
|
|
25
|
-
GraphQL
|
|
22
|
+
Records the request on the bucket row via RLS; the bucket's job
|
|
23
|
+
trigger then enqueues the same storage:provision_bucket job used on
|
|
24
|
+
INSERT, and repeated requests collapse into one pending job. This is
|
|
25
|
+
idempotent for an already-reconciled bucket; failures become GraphQL
|
|
26
|
+
errors.
|
|
26
27
|
*/
|
|
27
28
|
export interface ProvisionBucketVariables {
|
|
28
29
|
input: ProvisionBucketInput;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@constructive-sdk/cli",
|
|
3
|
-
"version": "1.21.
|
|
3
|
+
"version": "1.21.6",
|
|
4
4
|
"author": "Constructive <developers@constructive.io>",
|
|
5
5
|
"description": "Constructive CLI SDK - Auto-generated GraphQL CLI with ORM client, context management, and interactive prompts",
|
|
6
6
|
"main": "index.js",
|
|
@@ -62,5 +62,5 @@
|
|
|
62
62
|
"tsx": "^4.19.0",
|
|
63
63
|
"typescript": "^6.0.3"
|
|
64
64
|
},
|
|
65
|
-
"gitHead": "
|
|
65
|
+
"gitHead": "a94434095095bc1f1c06d8878e06f88d37b121b4"
|
|
66
66
|
}
|
|
@@ -5,7 +5,7 @@ const utils_1 = require("../utils");
|
|
|
5
5
|
exports.default = async (argv, prompter, _options) => {
|
|
6
6
|
try {
|
|
7
7
|
if (argv.help || argv.h) {
|
|
8
|
-
console.log(
|
|
8
|
+
console.log("provision-bucket - Reconcile an S3 bucket for a logical bucket in the database.\nRecords the request on the bucket row via RLS; the bucket's job\ntrigger then enqueues the same storage:provision_bucket job used on\nINSERT, and repeated requests collapse into one pending job. This is\nidempotent for an already-reconciled bucket; failures become GraphQL\nerrors.\n\nUsage: provision-bucket [OPTIONS]\n");
|
|
9
9
|
process.exit(0);
|
|
10
10
|
}
|
|
11
11
|
const answers = await prompter.prompt(argv, [
|
package/remote/cli/commands.js
CHANGED
|
@@ -26,7 +26,7 @@ const createCommandMap = () => ({
|
|
|
26
26
|
'machines-enroll': machines_enroll_1.default,
|
|
27
27
|
'provision-bucket': provision_bucket_1.default,
|
|
28
28
|
});
|
|
29
|
-
const usage =
|
|
29
|
+
const usage = "\ncsdk <command>\n\nCommands:\n context Manage API contexts\n auth Manage authentication\n machine machine CRUD operations\n machine-message machineMessage CRUD operations\n machine-session machineSession CRUD operations\n machines-enroll machinesEnroll\n provision-bucket Reconcile an S3 bucket for a logical bucket in the database.\nRecords the request on the bucket row via RLS; the bucket's job\ntrigger then enqueues the same storage:provision_bucket job used on\nINSERT, and repeated requests collapse into one pending job. This is\nidempotent for an already-reconciled bucket; failures become GraphQL\nerrors.\n\n --help, -h Show this help message\n --version, -v Show version\n";
|
|
30
30
|
const commands = async (argv, prompter, options) => {
|
|
31
31
|
if (argv.help || argv.h) {
|
|
32
32
|
console.log(usage);
|
|
@@ -1307,19 +1307,19 @@ export type MachinesEnrollPayloadSelect = {
|
|
|
1307
1307
|
result?: boolean;
|
|
1308
1308
|
};
|
|
1309
1309
|
export interface ProvisionBucketPayload {
|
|
1310
|
-
/** The logical bucket row
|
|
1310
|
+
/** The logical bucket row whose reconciliation was requested. */
|
|
1311
1311
|
bucketId: string;
|
|
1312
1312
|
bucketKey: string;
|
|
1313
|
-
/** The reconciler job enqueued to provision this bucket. */
|
|
1314
|
-
jobId: string;
|
|
1315
1313
|
/** The physical bucket name already recorded, or null when reconciliation has not completed. */
|
|
1316
1314
|
physicalName?: string | null;
|
|
1315
|
+
/** When reconciliation was last requested for this bucket. */
|
|
1316
|
+
provisionRequestedAt: string;
|
|
1317
1317
|
}
|
|
1318
1318
|
export type ProvisionBucketPayloadSelect = {
|
|
1319
1319
|
bucketId?: boolean;
|
|
1320
1320
|
bucketKey?: boolean;
|
|
1321
|
-
jobId?: boolean;
|
|
1322
1321
|
physicalName?: boolean;
|
|
1322
|
+
provisionRequestedAt?: boolean;
|
|
1323
1323
|
};
|
|
1324
1324
|
export interface CreateMachinePayload {
|
|
1325
1325
|
clientMutationId?: string | null;
|
|
@@ -13,10 +13,11 @@ export interface MachinesEnrollVariables {
|
|
|
13
13
|
/**
|
|
14
14
|
* Variables for provisionBucket
|
|
15
15
|
* Reconcile an S3 bucket for a logical bucket in the database.
|
|
16
|
-
|
|
17
|
-
storage:provision_bucket job used
|
|
18
|
-
|
|
19
|
-
GraphQL
|
|
16
|
+
Records the request on the bucket row via RLS; the bucket's job
|
|
17
|
+
trigger then enqueues the same storage:provision_bucket job used on
|
|
18
|
+
INSERT, and repeated requests collapse into one pending job. This is
|
|
19
|
+
idempotent for an already-reconciled bucket; failures become GraphQL
|
|
20
|
+
errors.
|
|
20
21
|
*/
|
|
21
22
|
export interface ProvisionBucketVariables {
|
|
22
23
|
input: ProvisionBucketInput;
|
|
@@ -20,8 +20,10 @@ const fieldSchema = {
|
|
|
20
20
|
id: 'uuid',
|
|
21
21
|
isPublic: 'boolean',
|
|
22
22
|
key: 'string',
|
|
23
|
+
maxBulkFiles: 'int',
|
|
23
24
|
maxFileSize: 'int',
|
|
24
25
|
physicalName: 'string',
|
|
26
|
+
provisionRequestedAt: 'string',
|
|
25
27
|
stagingTtl: 'string',
|
|
26
28
|
tags: 'string',
|
|
27
29
|
type: 'string',
|
|
@@ -82,6 +84,7 @@ async function handleList(argv, _prompter) {
|
|
|
82
84
|
key: true,
|
|
83
85
|
maxFileSize: true,
|
|
84
86
|
physicalName: true,
|
|
87
|
+
provisionRequestedAt: true,
|
|
85
88
|
stagingTtl: true,
|
|
86
89
|
tags: true,
|
|
87
90
|
type: true,
|
|
@@ -116,6 +119,7 @@ async function handleFindFirst(argv, _prompter) {
|
|
|
116
119
|
key: true,
|
|
117
120
|
maxFileSize: true,
|
|
118
121
|
physicalName: true,
|
|
122
|
+
provisionRequestedAt: true,
|
|
119
123
|
stagingTtl: true,
|
|
120
124
|
tags: true,
|
|
121
125
|
type: true,
|
|
@@ -162,6 +166,7 @@ async function handleGet(argv, prompter) {
|
|
|
162
166
|
key: true,
|
|
163
167
|
maxFileSize: true,
|
|
164
168
|
physicalName: true,
|
|
169
|
+
provisionRequestedAt: true,
|
|
165
170
|
stagingTtl: true,
|
|
166
171
|
tags: true,
|
|
167
172
|
type: true,
|
|
@@ -256,6 +261,13 @@ async function handleCreate(argv, prompter) {
|
|
|
256
261
|
required: false,
|
|
257
262
|
skipPrompt: true,
|
|
258
263
|
},
|
|
264
|
+
{
|
|
265
|
+
type: 'text',
|
|
266
|
+
name: 'provisionRequestedAt',
|
|
267
|
+
message: 'provisionRequestedAt',
|
|
268
|
+
required: false,
|
|
269
|
+
skipPrompt: true,
|
|
270
|
+
},
|
|
259
271
|
{
|
|
260
272
|
type: 'text',
|
|
261
273
|
name: 'stagingTtl',
|
|
@@ -295,6 +307,7 @@ async function handleCreate(argv, prompter) {
|
|
|
295
307
|
key: cleanedData.key,
|
|
296
308
|
maxFileSize: cleanedData.maxFileSize,
|
|
297
309
|
physicalName: cleanedData.physicalName,
|
|
310
|
+
provisionRequestedAt: cleanedData.provisionRequestedAt,
|
|
298
311
|
stagingTtl: cleanedData.stagingTtl,
|
|
299
312
|
tags: cleanedData.tags,
|
|
300
313
|
type: cleanedData.type,
|
|
@@ -313,6 +326,7 @@ async function handleCreate(argv, prompter) {
|
|
|
313
326
|
key: true,
|
|
314
327
|
maxFileSize: true,
|
|
315
328
|
physicalName: true,
|
|
329
|
+
provisionRequestedAt: true,
|
|
316
330
|
stagingTtl: true,
|
|
317
331
|
tags: true,
|
|
318
332
|
type: true,
|
|
@@ -413,6 +427,13 @@ async function handleUpdate(argv, prompter) {
|
|
|
413
427
|
required: false,
|
|
414
428
|
skipPrompt: true,
|
|
415
429
|
},
|
|
430
|
+
{
|
|
431
|
+
type: 'text',
|
|
432
|
+
name: 'provisionRequestedAt',
|
|
433
|
+
message: 'provisionRequestedAt',
|
|
434
|
+
required: false,
|
|
435
|
+
skipPrompt: true,
|
|
436
|
+
},
|
|
416
437
|
{
|
|
417
438
|
type: 'text',
|
|
418
439
|
name: 'stagingTtl',
|
|
@@ -455,6 +476,7 @@ async function handleUpdate(argv, prompter) {
|
|
|
455
476
|
key: cleanedData.key,
|
|
456
477
|
maxFileSize: cleanedData.maxFileSize,
|
|
457
478
|
physicalName: cleanedData.physicalName,
|
|
479
|
+
provisionRequestedAt: cleanedData.provisionRequestedAt,
|
|
458
480
|
stagingTtl: cleanedData.stagingTtl,
|
|
459
481
|
tags: cleanedData.tags,
|
|
460
482
|
type: cleanedData.type,
|
|
@@ -473,6 +495,7 @@ async function handleUpdate(argv, prompter) {
|
|
|
473
495
|
key: true,
|
|
474
496
|
maxFileSize: true,
|
|
475
497
|
physicalName: true,
|
|
498
|
+
provisionRequestedAt: true,
|
|
476
499
|
stagingTtl: true,
|
|
477
500
|
tags: true,
|
|
478
501
|
type: true,
|
|
@@ -19,8 +19,10 @@ const fieldSchema = {
|
|
|
19
19
|
id: 'uuid',
|
|
20
20
|
isPublic: 'boolean',
|
|
21
21
|
key: 'string',
|
|
22
|
+
maxBulkFiles: 'int',
|
|
22
23
|
maxFileSize: 'int',
|
|
23
24
|
physicalName: 'string',
|
|
25
|
+
provisionRequestedAt: 'string',
|
|
24
26
|
stagingTtl: 'string',
|
|
25
27
|
tags: 'string',
|
|
26
28
|
type: 'string',
|
|
@@ -80,6 +82,7 @@ async function handleList(argv, _prompter) {
|
|
|
80
82
|
key: true,
|
|
81
83
|
maxFileSize: true,
|
|
82
84
|
physicalName: true,
|
|
85
|
+
provisionRequestedAt: true,
|
|
83
86
|
stagingTtl: true,
|
|
84
87
|
tags: true,
|
|
85
88
|
type: true,
|
|
@@ -113,6 +116,7 @@ async function handleFindFirst(argv, _prompter) {
|
|
|
113
116
|
key: true,
|
|
114
117
|
maxFileSize: true,
|
|
115
118
|
physicalName: true,
|
|
119
|
+
provisionRequestedAt: true,
|
|
116
120
|
stagingTtl: true,
|
|
117
121
|
tags: true,
|
|
118
122
|
type: true,
|
|
@@ -158,6 +162,7 @@ async function handleGet(argv, prompter) {
|
|
|
158
162
|
key: true,
|
|
159
163
|
maxFileSize: true,
|
|
160
164
|
physicalName: true,
|
|
165
|
+
provisionRequestedAt: true,
|
|
161
166
|
stagingTtl: true,
|
|
162
167
|
tags: true,
|
|
163
168
|
type: true,
|
|
@@ -246,6 +251,13 @@ async function handleCreate(argv, prompter) {
|
|
|
246
251
|
required: false,
|
|
247
252
|
skipPrompt: true,
|
|
248
253
|
},
|
|
254
|
+
{
|
|
255
|
+
type: 'text',
|
|
256
|
+
name: 'provisionRequestedAt',
|
|
257
|
+
message: 'provisionRequestedAt',
|
|
258
|
+
required: false,
|
|
259
|
+
skipPrompt: true,
|
|
260
|
+
},
|
|
249
261
|
{
|
|
250
262
|
type: 'text',
|
|
251
263
|
name: 'stagingTtl',
|
|
@@ -284,6 +296,7 @@ async function handleCreate(argv, prompter) {
|
|
|
284
296
|
key: cleanedData.key,
|
|
285
297
|
maxFileSize: cleanedData.maxFileSize,
|
|
286
298
|
physicalName: cleanedData.physicalName,
|
|
299
|
+
provisionRequestedAt: cleanedData.provisionRequestedAt,
|
|
287
300
|
stagingTtl: cleanedData.stagingTtl,
|
|
288
301
|
tags: cleanedData.tags,
|
|
289
302
|
type: cleanedData.type,
|
|
@@ -301,6 +314,7 @@ async function handleCreate(argv, prompter) {
|
|
|
301
314
|
key: true,
|
|
302
315
|
maxFileSize: true,
|
|
303
316
|
physicalName: true,
|
|
317
|
+
provisionRequestedAt: true,
|
|
304
318
|
stagingTtl: true,
|
|
305
319
|
tags: true,
|
|
306
320
|
type: true,
|
|
@@ -395,6 +409,13 @@ async function handleUpdate(argv, prompter) {
|
|
|
395
409
|
required: false,
|
|
396
410
|
skipPrompt: true,
|
|
397
411
|
},
|
|
412
|
+
{
|
|
413
|
+
type: 'text',
|
|
414
|
+
name: 'provisionRequestedAt',
|
|
415
|
+
message: 'provisionRequestedAt',
|
|
416
|
+
required: false,
|
|
417
|
+
skipPrompt: true,
|
|
418
|
+
},
|
|
398
419
|
{
|
|
399
420
|
type: 'text',
|
|
400
421
|
name: 'stagingTtl',
|
|
@@ -436,6 +457,7 @@ async function handleUpdate(argv, prompter) {
|
|
|
436
457
|
key: cleanedData.key,
|
|
437
458
|
maxFileSize: cleanedData.maxFileSize,
|
|
438
459
|
physicalName: cleanedData.physicalName,
|
|
460
|
+
provisionRequestedAt: cleanedData.provisionRequestedAt,
|
|
439
461
|
stagingTtl: cleanedData.stagingTtl,
|
|
440
462
|
tags: cleanedData.tags,
|
|
441
463
|
type: cleanedData.type,
|
|
@@ -453,6 +475,7 @@ async function handleUpdate(argv, prompter) {
|
|
|
453
475
|
key: true,
|
|
454
476
|
maxFileSize: true,
|
|
455
477
|
physicalName: true,
|
|
478
|
+
provisionRequestedAt: true,
|
|
456
479
|
stagingTtl: true,
|
|
457
480
|
tags: true,
|
|
458
481
|
type: true,
|
|
@@ -5,7 +5,7 @@ const utils_1 = require("../utils");
|
|
|
5
5
|
exports.default = async (argv, prompter, _options) => {
|
|
6
6
|
try {
|
|
7
7
|
if (argv.help || argv.h) {
|
|
8
|
-
console.log(
|
|
8
|
+
console.log("provision-bucket - Reconcile an S3 bucket for a logical bucket in the database.\nRecords the request on the bucket row via RLS; the bucket's job\ntrigger then enqueues the same storage:provision_bucket job used on\nINSERT, and repeated requests collapse into one pending job. This is\nidempotent for an already-reconciled bucket; failures become GraphQL\nerrors.\n\nUsage: provision-bucket [OPTIONS]\n");
|
|
9
9
|
process.exit(0);
|
|
10
10
|
}
|
|
11
11
|
const answers = await prompter.prompt(argv, [
|
|
@@ -5,7 +5,7 @@ const utils_1 = require("../utils");
|
|
|
5
5
|
exports.default = async (argv, prompter, _options) => {
|
|
6
6
|
try {
|
|
7
7
|
if (argv.help || argv.h) {
|
|
8
|
-
console.log(
|
|
8
|
+
console.log("upload-files - Upload multiple files: resolves the bucket by key, creates file rows, and returns presigned PUT URLs for each. Accepts at most the bucket's `maxBulkFiles` files per call.\n\nUsage: upload-files [OPTIONS]\n");
|
|
9
9
|
process.exit(0);
|
|
10
10
|
}
|
|
11
11
|
const answers = await prompter.prompt(argv, [
|
|
@@ -5,7 +5,7 @@ const utils_1 = require("../utils");
|
|
|
5
5
|
exports.default = async (argv, prompter, _options) => {
|
|
6
6
|
try {
|
|
7
7
|
if (argv.help || argv.h) {
|
|
8
|
-
console.log(
|
|
8
|
+
console.log("upload-platform-files - Upload multiple files: resolves the bucket by key, creates file rows, and returns presigned PUT URLs for each. Accepts at most the bucket's `maxBulkFiles` files per call.\n\nUsage: upload-platform-files [OPTIONS]\n");
|
|
9
9
|
process.exit(0);
|
|
10
10
|
}
|
|
11
11
|
const answers = await prompter.prompt(argv, [
|
package/storage/cli/commands.js
CHANGED
|
@@ -38,7 +38,7 @@ const createCommandMap = () => ({
|
|
|
38
38
|
'upload-platform-file': upload_platform_file_1.default,
|
|
39
39
|
'upload-platform-files': upload_platform_files_1.default,
|
|
40
40
|
});
|
|
41
|
-
const usage =
|
|
41
|
+
const usage = "\ncsdk <command>\n\nCommands:\n context Manage API contexts\n auth Manage authentication\n bucket bucket CRUD operations\n file file CRUD operations\n platform-bucket platformBucket CRUD operations\n platform-file platformFile CRUD operations\n files-rename filesRename\n platform-files-rename platformFilesRename\n provision-bucket Reconcile an S3 bucket for a logical bucket in the database.\nRecords the request on the bucket row via RLS; the bucket's job\ntrigger then enqueues the same storage:provision_bucket job used on\nINSERT, and repeated requests collapse into one pending job. This is\nidempotent for an already-reconciled bucket; failures become GraphQL\nerrors.\n upload-file Upload a file: resolves the bucket by key, creates the file row, and returns a presigned PUT URL.\n upload-files Upload multiple files: resolves the bucket by key, creates file rows, and returns presigned PUT URLs for each. Accepts at most the bucket's `maxBulkFiles` files per call.\n upload-platform-file Upload a file: resolves the bucket by key, creates the file row, and returns a presigned PUT URL.\n upload-platform-files Upload multiple files: resolves the bucket by key, creates file rows, and returns presigned PUT URLs for each. Accepts at most the bucket's `maxBulkFiles` files per call.\n\n --help, -h Show this help message\n --version, -v Show version\n";
|
|
42
42
|
const commands = async (argv, prompter, options) => {
|
|
43
43
|
if (argv.help || argv.h) {
|
|
44
44
|
console.log(usage);
|
|
@@ -254,10 +254,14 @@ export interface Bucket {
|
|
|
254
254
|
isPublic?: boolean | null;
|
|
255
255
|
/** Unique bucket identifier used in S3 key paths (e.g. avatars, documents, temp) */
|
|
256
256
|
key?: string | null;
|
|
257
|
+
/** The most files one bulk-upload call accepts for this bucket. Batches larger than this are refused with BULK_UPLOAD_FILES_EXCEEDED. */
|
|
258
|
+
maxBulkFiles?: number | null;
|
|
257
259
|
/** Maximum file size in bytes allowed in this bucket (NULL = no limit, enforcement deferred) */
|
|
258
260
|
maxFileSize?: string | null;
|
|
259
261
|
/** Physical S3/MinIO bucket name recorded at provision time (NULL until the physical bucket exists) */
|
|
260
262
|
physicalName?: string | null;
|
|
263
|
+
/** When re-provisioning was last requested (provisionBucket); NULL until requested */
|
|
264
|
+
provisionRequestedAt?: string | null;
|
|
261
265
|
/** For a temp bucket, how long an unpromoted staged file survives before it is eligible for expiry. NULL on non-temp buckets; required on temp buckets. */
|
|
262
266
|
stagingTtl?: string | null;
|
|
263
267
|
/** Selector labels for capability resolution and grouping (e.g. uploads, variants, exports). A function's required bucket key is matched against these plus type. */
|
|
@@ -325,10 +329,14 @@ export interface PlatformBucket {
|
|
|
325
329
|
isPublic?: boolean | null;
|
|
326
330
|
/** Unique bucket identifier used in S3 key paths (e.g. avatars, documents, temp) */
|
|
327
331
|
key?: string | null;
|
|
332
|
+
/** The most files one bulk-upload call accepts for this bucket. Batches larger than this are refused with BULK_UPLOAD_FILES_EXCEEDED. */
|
|
333
|
+
maxBulkFiles?: number | null;
|
|
328
334
|
/** Maximum file size in bytes allowed in this bucket (NULL = no limit, enforcement deferred) */
|
|
329
335
|
maxFileSize?: string | null;
|
|
330
336
|
/** Physical S3/MinIO bucket name recorded at provision time (NULL until the physical bucket exists) */
|
|
331
337
|
physicalName?: string | null;
|
|
338
|
+
/** When re-provisioning was last requested (provisionBucket); NULL until requested */
|
|
339
|
+
provisionRequestedAt?: string | null;
|
|
332
340
|
/** For a temp bucket, how long an unpromoted staged file survives before it is eligible for expiry. NULL on non-temp buckets; required on temp buckets. */
|
|
333
341
|
stagingTtl?: string | null;
|
|
334
342
|
/** Selector labels for capability resolution and grouping (e.g. uploads, variants, exports). A function's required bucket key is matched against these plus type. */
|
|
@@ -417,8 +425,10 @@ export type BucketSelect = {
|
|
|
417
425
|
id?: boolean;
|
|
418
426
|
isPublic?: boolean;
|
|
419
427
|
key?: boolean;
|
|
428
|
+
maxBulkFiles?: boolean;
|
|
420
429
|
maxFileSize?: boolean;
|
|
421
430
|
physicalName?: boolean;
|
|
431
|
+
provisionRequestedAt?: boolean;
|
|
422
432
|
stagingTtl?: boolean;
|
|
423
433
|
tags?: boolean;
|
|
424
434
|
type?: boolean;
|
|
@@ -475,8 +485,10 @@ export type PlatformBucketSelect = {
|
|
|
475
485
|
id?: boolean;
|
|
476
486
|
isPublic?: boolean;
|
|
477
487
|
key?: boolean;
|
|
488
|
+
maxBulkFiles?: boolean;
|
|
478
489
|
maxFileSize?: boolean;
|
|
479
490
|
physicalName?: boolean;
|
|
491
|
+
provisionRequestedAt?: boolean;
|
|
480
492
|
stagingTtl?: boolean;
|
|
481
493
|
tags?: boolean;
|
|
482
494
|
type?: boolean;
|
|
@@ -566,6 +578,8 @@ export interface BucketFilter {
|
|
|
566
578
|
or?: BucketFilter[];
|
|
567
579
|
/** Filter by the object’s `physicalName` field. */
|
|
568
580
|
physicalName?: StringFilter;
|
|
581
|
+
/** Filter by the object’s `provisionRequestedAt` field. */
|
|
582
|
+
provisionRequestedAt?: DatetimeFilter;
|
|
569
583
|
/** Filter by the object’s `stagingTtl` field. */
|
|
570
584
|
stagingTtl?: IntervalFilter;
|
|
571
585
|
/** Filter by the object’s `tags` field. */
|
|
@@ -664,6 +678,8 @@ export interface PlatformBucketFilter {
|
|
|
664
678
|
platformFilesByBucketId?: PlatformBucketToManyPlatformFileFilter;
|
|
665
679
|
/** `platformFilesByBucketId` exist. */
|
|
666
680
|
platformFilesByBucketIdExist?: boolean;
|
|
681
|
+
/** Filter by the object’s `provisionRequestedAt` field. */
|
|
682
|
+
provisionRequestedAt?: DatetimeFilter;
|
|
667
683
|
/** Filter by the object’s `stagingTtl` field. */
|
|
668
684
|
stagingTtl?: IntervalFilter;
|
|
669
685
|
/** Filter by the object’s `tags` field. */
|
|
@@ -717,9 +733,9 @@ export interface PlatformFileFilter {
|
|
|
717
733
|
/** Filter by the object’s `upload` field. */
|
|
718
734
|
upload?: ConstructiveInternalTypeUploadFilter;
|
|
719
735
|
}
|
|
720
|
-
export type BucketOrderBy = 'ACTOR_ID_ASC' | 'ACTOR_ID_DESC' | 'ALLOWED_MIME_TYPES_ASC' | 'ALLOWED_MIME_TYPES_DESC' | 'ALLOWED_ORIGINS_ASC' | 'ALLOWED_ORIGINS_DESC' | 'ALLOW_CUSTOM_KEYS_ASC' | 'ALLOW_CUSTOM_KEYS_DESC' | 'CREATED_AT_ASC' | 'CREATED_AT_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' | 'DESCRIPTION_ASC' | 'DESCRIPTION_DESC' | 'DESTINATION_BUCKET_ID_ASC' | 'DESTINATION_BUCKET_ID_DESC' | 'ID_ASC' | 'ID_DESC' | 'IS_PUBLIC_ASC' | 'IS_PUBLIC_DESC' | 'KEY_ASC' | 'KEY_DESC' | 'MAX_FILE_SIZE_ASC' | 'MAX_FILE_SIZE_DESC' | 'NATURAL' | 'PHYSICAL_NAME_ASC' | 'PHYSICAL_NAME_DESC' | 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' | 'STAGING_TTL_ASC' | 'STAGING_TTL_DESC' | 'TAGS_ASC' | 'TAGS_DESC' | 'TYPE_ASC' | 'TYPE_DESC' | 'UPDATED_AT_ASC' | 'UPDATED_AT_DESC';
|
|
736
|
+
export type BucketOrderBy = 'ACTOR_ID_ASC' | 'ACTOR_ID_DESC' | 'ALLOWED_MIME_TYPES_ASC' | 'ALLOWED_MIME_TYPES_DESC' | 'ALLOWED_ORIGINS_ASC' | 'ALLOWED_ORIGINS_DESC' | 'ALLOW_CUSTOM_KEYS_ASC' | 'ALLOW_CUSTOM_KEYS_DESC' | 'CREATED_AT_ASC' | 'CREATED_AT_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' | 'DESCRIPTION_ASC' | 'DESCRIPTION_DESC' | 'DESTINATION_BUCKET_ID_ASC' | 'DESTINATION_BUCKET_ID_DESC' | 'ID_ASC' | 'ID_DESC' | 'IS_PUBLIC_ASC' | 'IS_PUBLIC_DESC' | 'KEY_ASC' | 'KEY_DESC' | 'MAX_FILE_SIZE_ASC' | 'MAX_FILE_SIZE_DESC' | 'NATURAL' | 'PHYSICAL_NAME_ASC' | 'PHYSICAL_NAME_DESC' | 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' | 'PROVISION_REQUESTED_AT_ASC' | 'PROVISION_REQUESTED_AT_DESC' | 'STAGING_TTL_ASC' | 'STAGING_TTL_DESC' | 'TAGS_ASC' | 'TAGS_DESC' | 'TYPE_ASC' | 'TYPE_DESC' | 'UPDATED_AT_ASC' | 'UPDATED_AT_DESC';
|
|
721
737
|
export type FileOrderBy = 'ACTOR_ID_ASC' | 'ACTOR_ID_DESC' | 'BUCKET_ID_ASC' | 'BUCKET_ID_DESC' | 'CONTENT_HASH_ASC' | 'CONTENT_HASH_DESC' | 'CREATED_AT_ASC' | 'CREATED_AT_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' | 'DESCRIPTION_ASC' | 'DESCRIPTION_DESC' | 'EXPIRY_ENQUEUED_AT_ASC' | 'EXPIRY_ENQUEUED_AT_DESC' | 'FILENAME_ASC' | 'FILENAME_DESC' | 'ID_ASC' | 'ID_DESC' | 'IS_PUBLIC_ASC' | 'IS_PUBLIC_DESC' | 'KEY_ASC' | 'KEY_DESC' | 'MIME_TYPE_ASC' | 'MIME_TYPE_DESC' | 'NATURAL' | 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' | 'PROMOTED_AT_ASC' | 'PROMOTED_AT_DESC' | 'SIZE_ASC' | 'SIZE_DESC' | 'STATUS_ASC' | 'STATUS_DESC' | 'TAGS_ASC' | 'TAGS_DESC' | 'UPDATED_AT_ASC' | 'UPDATED_AT_DESC' | 'UPLOAD_ASC' | 'UPLOAD_DESC';
|
|
722
|
-
export type PlatformBucketOrderBy = 'ACTOR_ID_ASC' | 'ACTOR_ID_DESC' | 'ALLOWED_MIME_TYPES_ASC' | 'ALLOWED_MIME_TYPES_DESC' | 'ALLOWED_ORIGINS_ASC' | 'ALLOWED_ORIGINS_DESC' | 'ALLOW_CUSTOM_KEYS_ASC' | 'ALLOW_CUSTOM_KEYS_DESC' | 'CREATED_AT_ASC' | 'CREATED_AT_DESC' | 'DESCRIPTION_ASC' | 'DESCRIPTION_DESC' | 'DESTINATION_BUCKET_ID_ASC' | 'DESTINATION_BUCKET_ID_DESC' | 'ID_ASC' | 'ID_DESC' | 'IS_PUBLIC_ASC' | 'IS_PUBLIC_DESC' | 'KEY_ASC' | 'KEY_DESC' | 'MAX_FILE_SIZE_ASC' | 'MAX_FILE_SIZE_DESC' | 'NATURAL' | 'PHYSICAL_NAME_ASC' | 'PHYSICAL_NAME_DESC' | 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' | 'STAGING_TTL_ASC' | 'STAGING_TTL_DESC' | 'TAGS_ASC' | 'TAGS_DESC' | 'TYPE_ASC' | 'TYPE_DESC' | 'UPDATED_AT_ASC' | 'UPDATED_AT_DESC';
|
|
738
|
+
export type PlatformBucketOrderBy = 'ACTOR_ID_ASC' | 'ACTOR_ID_DESC' | 'ALLOWED_MIME_TYPES_ASC' | 'ALLOWED_MIME_TYPES_DESC' | 'ALLOWED_ORIGINS_ASC' | 'ALLOWED_ORIGINS_DESC' | 'ALLOW_CUSTOM_KEYS_ASC' | 'ALLOW_CUSTOM_KEYS_DESC' | 'CREATED_AT_ASC' | 'CREATED_AT_DESC' | 'DESCRIPTION_ASC' | 'DESCRIPTION_DESC' | 'DESTINATION_BUCKET_ID_ASC' | 'DESTINATION_BUCKET_ID_DESC' | 'ID_ASC' | 'ID_DESC' | 'IS_PUBLIC_ASC' | 'IS_PUBLIC_DESC' | 'KEY_ASC' | 'KEY_DESC' | 'MAX_FILE_SIZE_ASC' | 'MAX_FILE_SIZE_DESC' | 'NATURAL' | 'PHYSICAL_NAME_ASC' | 'PHYSICAL_NAME_DESC' | 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' | 'PROVISION_REQUESTED_AT_ASC' | 'PROVISION_REQUESTED_AT_DESC' | 'STAGING_TTL_ASC' | 'STAGING_TTL_DESC' | 'TAGS_ASC' | 'TAGS_DESC' | 'TYPE_ASC' | 'TYPE_DESC' | 'UPDATED_AT_ASC' | 'UPDATED_AT_DESC';
|
|
723
739
|
export type PlatformFileOrderBy = 'ACTOR_ID_ASC' | 'ACTOR_ID_DESC' | 'BUCKET_ID_ASC' | 'BUCKET_ID_DESC' | 'CONTENT_HASH_ASC' | 'CONTENT_HASH_DESC' | 'CREATED_AT_ASC' | 'CREATED_AT_DESC' | 'DESCRIPTION_ASC' | 'DESCRIPTION_DESC' | 'EXPIRY_ENQUEUED_AT_ASC' | 'EXPIRY_ENQUEUED_AT_DESC' | 'FILENAME_ASC' | 'FILENAME_DESC' | 'ID_ASC' | 'ID_DESC' | 'IS_PUBLIC_ASC' | 'IS_PUBLIC_DESC' | 'KEY_ASC' | 'KEY_DESC' | 'MIME_TYPE_ASC' | 'MIME_TYPE_DESC' | 'NATURAL' | 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' | 'PROMOTED_AT_ASC' | 'PROMOTED_AT_DESC' | 'SIZE_ASC' | 'SIZE_DESC' | 'STATUS_ASC' | 'STATUS_DESC' | 'TAGS_ASC' | 'TAGS_DESC' | 'UPDATED_AT_ASC' | 'UPDATED_AT_DESC' | 'UPLOAD_ASC' | 'UPLOAD_DESC';
|
|
724
740
|
export interface CreateBucketInput {
|
|
725
741
|
clientMutationId?: string;
|
|
@@ -735,6 +751,7 @@ export interface CreateBucketInput {
|
|
|
735
751
|
key: string;
|
|
736
752
|
maxFileSize?: string;
|
|
737
753
|
physicalName?: string;
|
|
754
|
+
provisionRequestedAt?: string;
|
|
738
755
|
stagingTtl?: IntervalInput;
|
|
739
756
|
tags?: string[];
|
|
740
757
|
type?: BucketType;
|
|
@@ -752,6 +769,7 @@ export interface BucketPatch {
|
|
|
752
769
|
key?: string | null;
|
|
753
770
|
maxFileSize?: string | null;
|
|
754
771
|
physicalName?: string | null;
|
|
772
|
+
provisionRequestedAt?: string | null;
|
|
755
773
|
stagingTtl?: IntervalInput | null;
|
|
756
774
|
tags?: string[] | null;
|
|
757
775
|
type?: BucketType | null;
|
|
@@ -823,6 +841,7 @@ export interface CreatePlatformBucketInput {
|
|
|
823
841
|
key: string;
|
|
824
842
|
maxFileSize?: string;
|
|
825
843
|
physicalName?: string;
|
|
844
|
+
provisionRequestedAt?: string;
|
|
826
845
|
stagingTtl?: IntervalInput;
|
|
827
846
|
tags?: string[];
|
|
828
847
|
type?: BucketType;
|
|
@@ -839,6 +858,7 @@ export interface PlatformBucketPatch {
|
|
|
839
858
|
key?: string | null;
|
|
840
859
|
maxFileSize?: string | null;
|
|
841
860
|
physicalName?: string | null;
|
|
861
|
+
provisionRequestedAt?: string | null;
|
|
842
862
|
stagingTtl?: IntervalInput | null;
|
|
843
863
|
tags?: string[] | null;
|
|
844
864
|
type?: BucketType | null;
|
|
@@ -1136,6 +1156,8 @@ export interface BucketInput {
|
|
|
1136
1156
|
maxFileSize?: string;
|
|
1137
1157
|
/** Physical S3/MinIO bucket name recorded at provision time (NULL until the physical bucket exists) */
|
|
1138
1158
|
physicalName?: string;
|
|
1159
|
+
/** When re-provisioning was last requested (provisionBucket); NULL until requested */
|
|
1160
|
+
provisionRequestedAt?: string;
|
|
1139
1161
|
/** For a temp bucket, how long an unpromoted staged file survives before it is eligible for expiry. NULL on non-temp buckets; required on temp buckets. */
|
|
1140
1162
|
stagingTtl?: IntervalInput;
|
|
1141
1163
|
/** Selector labels for capability resolution and grouping (e.g. uploads, variants, exports). A function's required bucket key is matched against these plus type. */
|
|
@@ -1219,6 +1241,8 @@ export interface PlatformBucketInput {
|
|
|
1219
1241
|
maxFileSize?: string;
|
|
1220
1242
|
/** Physical S3/MinIO bucket name recorded at provision time (NULL until the physical bucket exists) */
|
|
1221
1243
|
physicalName?: string;
|
|
1244
|
+
/** When re-provisioning was last requested (provisionBucket); NULL until requested */
|
|
1245
|
+
provisionRequestedAt?: string;
|
|
1222
1246
|
/** For a temp bucket, how long an unpromoted staged file survives before it is eligible for expiry. NULL on non-temp buckets; required on temp buckets. */
|
|
1223
1247
|
stagingTtl?: IntervalInput;
|
|
1224
1248
|
/** Selector labels for capability resolution and grouping (e.g. uploads, variants, exports). A function's required bucket key is matched against these plus type. */
|
|
@@ -1329,6 +1353,8 @@ export interface BucketFilter {
|
|
|
1329
1353
|
or?: BucketFilter[];
|
|
1330
1354
|
/** Filter by the object’s `physicalName` field. */
|
|
1331
1355
|
physicalName?: StringFilter;
|
|
1356
|
+
/** Filter by the object’s `provisionRequestedAt` field. */
|
|
1357
|
+
provisionRequestedAt?: DatetimeFilter;
|
|
1332
1358
|
/** Filter by the object’s `stagingTtl` field. */
|
|
1333
1359
|
stagingTtl?: IntervalFilter;
|
|
1334
1360
|
/** Filter by the object’s `tags` field. */
|
|
@@ -1429,6 +1455,8 @@ export interface PlatformBucketFilter {
|
|
|
1429
1455
|
platformFilesByBucketId?: PlatformBucketToManyPlatformFileFilter;
|
|
1430
1456
|
/** `platformFilesByBucketId` exist. */
|
|
1431
1457
|
platformFilesByBucketIdExist?: boolean;
|
|
1458
|
+
/** Filter by the object’s `provisionRequestedAt` field. */
|
|
1459
|
+
provisionRequestedAt?: DatetimeFilter;
|
|
1432
1460
|
/** Filter by the object’s `stagingTtl` field. */
|
|
1433
1461
|
stagingTtl?: IntervalFilter;
|
|
1434
1462
|
/** Filter by the object’s `tags` field. */
|
|
@@ -1728,19 +1756,19 @@ export type PlatformFilesRenamePayloadSelect = {
|
|
|
1728
1756
|
};
|
|
1729
1757
|
};
|
|
1730
1758
|
export interface ProvisionBucketPayload {
|
|
1731
|
-
/** The logical bucket row
|
|
1759
|
+
/** The logical bucket row whose reconciliation was requested. */
|
|
1732
1760
|
bucketId: string;
|
|
1733
1761
|
bucketKey: string;
|
|
1734
|
-
/** The reconciler job enqueued to provision this bucket. */
|
|
1735
|
-
jobId: string;
|
|
1736
1762
|
/** The physical bucket name already recorded, or null when reconciliation has not completed. */
|
|
1737
1763
|
physicalName?: string | null;
|
|
1764
|
+
/** When reconciliation was last requested for this bucket. */
|
|
1765
|
+
provisionRequestedAt: string;
|
|
1738
1766
|
}
|
|
1739
1767
|
export type ProvisionBucketPayloadSelect = {
|
|
1740
1768
|
bucketId?: boolean;
|
|
1741
1769
|
bucketKey?: boolean;
|
|
1742
|
-
jobId?: boolean;
|
|
1743
1770
|
physicalName?: boolean;
|
|
1771
|
+
provisionRequestedAt?: boolean;
|
|
1744
1772
|
};
|
|
1745
1773
|
export interface UploadFilePayload {
|
|
1746
1774
|
/** Whether this file was deduplicated (content already exists) */
|
|
@@ -16,10 +16,11 @@ export interface PlatformFilesRenameVariables {
|
|
|
16
16
|
/**
|
|
17
17
|
* Variables for provisionBucket
|
|
18
18
|
* Reconcile an S3 bucket for a logical bucket in the database.
|
|
19
|
-
|
|
20
|
-
storage:provision_bucket job used
|
|
21
|
-
|
|
22
|
-
GraphQL
|
|
19
|
+
Records the request on the bucket row via RLS; the bucket's job
|
|
20
|
+
trigger then enqueues the same storage:provision_bucket job used on
|
|
21
|
+
INSERT, and repeated requests collapse into one pending job. This is
|
|
22
|
+
idempotent for an already-reconciled bucket; failures become GraphQL
|
|
23
|
+
errors.
|
|
23
24
|
*/
|
|
24
25
|
export interface ProvisionBucketVariables {
|
|
25
26
|
input: ProvisionBucketInput;
|
|
@@ -33,7 +34,7 @@ export interface UploadFileVariables {
|
|
|
33
34
|
}
|
|
34
35
|
/**
|
|
35
36
|
* Variables for uploadFiles
|
|
36
|
-
* Upload multiple files: resolves the bucket by key, creates file rows, and returns presigned PUT URLs for each.
|
|
37
|
+
* Upload multiple files: resolves the bucket by key, creates file rows, and returns presigned PUT URLs for each. Accepts at most the bucket's `maxBulkFiles` files per call.
|
|
37
38
|
*/
|
|
38
39
|
export interface UploadFilesVariables {
|
|
39
40
|
input: UploadFileBulkInput;
|
|
@@ -47,7 +48,7 @@ export interface UploadPlatformFileVariables {
|
|
|
47
48
|
}
|
|
48
49
|
/**
|
|
49
50
|
* Variables for uploadPlatformFiles
|
|
50
|
-
* Upload multiple files: resolves the bucket by key, creates file rows, and returns presigned PUT URLs for each.
|
|
51
|
+
* Upload multiple files: resolves the bucket by key, creates file rows, and returns presigned PUT URLs for each. Accepts at most the bucket's `maxBulkFiles` files per call.
|
|
51
52
|
*/
|
|
52
53
|
export interface UploadPlatformFilesVariables {
|
|
53
54
|
input: UploadPlatformFileBulkInput;
|
|
@@ -5,7 +5,7 @@ const utils_1 = require("../utils");
|
|
|
5
5
|
exports.default = async (argv, prompter, _options) => {
|
|
6
6
|
try {
|
|
7
7
|
if (argv.help || argv.h) {
|
|
8
|
-
console.log(
|
|
8
|
+
console.log("provision-bucket - Reconcile an S3 bucket for a logical bucket in the database.\nRecords the request on the bucket row via RLS; the bucket's job\ntrigger then enqueues the same storage:provision_bucket job used on\nINSERT, and repeated requests collapse into one pending job. This is\nidempotent for an already-reconciled bucket; failures become GraphQL\nerrors.\n\nUsage: provision-bucket [OPTIONS]\n");
|
|
9
9
|
process.exit(0);
|
|
10
10
|
}
|
|
11
11
|
const answers = await prompter.prompt(argv, [
|
package/usage/cli/commands.js
CHANGED
|
@@ -66,7 +66,7 @@ const createCommandMap = () => ({
|
|
|
66
66
|
'seed-org-limit-caps-defaults': seed_org_limit_caps_defaults_1.default,
|
|
67
67
|
'seed-org-limit-defaults': seed_org_limit_defaults_1.default,
|
|
68
68
|
});
|
|
69
|
-
const usage =
|
|
69
|
+
const usage = "\ncsdk <command>\n\nCommands:\n context Manage API contexts\n auth Manage authentication\n app-limit-cap appLimitCap CRUD operations\n app-limit-caps-default appLimitCapsDefault CRUD operations\n app-limit appLimit CRUD operations\n app-limit-credit-code appLimitCreditCode CRUD operations\n app-limit-credit-code-item appLimitCreditCodeItem CRUD operations\n app-limit-credit appLimitCredit CRUD operations\n app-limit-credit-redemption appLimitCreditRedemption CRUD operations\n app-limit-default appLimitDefault CRUD operations\n app-limit-event appLimitEvent CRUD operations\n app-limit-warning appLimitWarning CRUD operations\n org-limit-aggregate orgLimitAggregate CRUD operations\n org-limit-cap orgLimitCap CRUD operations\n org-limit-caps-default orgLimitCapsDefault CRUD operations\n org-limit orgLimit CRUD operations\n org-limit-credit orgLimitCredit CRUD operations\n org-limit-default orgLimitDefault CRUD operations\n org-limit-event orgLimitEvent CRUD operations\n org-limit-warning orgLimitWarning CRUD operations\n capture-app-limit-defaults captureAppLimitDefaults\n capture-org-limit-defaults captureOrgLimitDefaults\n provision-bucket Reconcile an S3 bucket for a logical bucket in the database.\nRecords the request on the bucket row via RLS; the bucket's job\ntrigger then enqueues the same storage:provision_bucket job used on\nINSERT, and repeated requests collapse into one pending job. This is\nidempotent for an already-reconciled bucket; failures become GraphQL\nerrors.\n seed-app-limit-caps-defaults seedAppLimitCapsDefaults\n seed-app-limit-defaults seedAppLimitDefaults\n seed-org-limit-caps-defaults seedOrgLimitCapsDefaults\n seed-org-limit-defaults seedOrgLimitDefaults\n\n --help, -h Show this help message\n --version, -v Show version\n";
|
|
70
70
|
const commands = async (argv, prompter, options) => {
|
|
71
71
|
if (argv.help || argv.h) {
|
|
72
72
|
console.log(usage);
|
|
@@ -2527,19 +2527,19 @@ export interface DatetimeFilter {
|
|
|
2527
2527
|
notIn?: string[];
|
|
2528
2528
|
}
|
|
2529
2529
|
export interface ProvisionBucketPayload {
|
|
2530
|
-
/** The logical bucket row
|
|
2530
|
+
/** The logical bucket row whose reconciliation was requested. */
|
|
2531
2531
|
bucketId: string;
|
|
2532
2532
|
bucketKey: string;
|
|
2533
|
-
/** The reconciler job enqueued to provision this bucket. */
|
|
2534
|
-
jobId: string;
|
|
2535
2533
|
/** The physical bucket name already recorded, or null when reconciliation has not completed. */
|
|
2536
2534
|
physicalName?: string | null;
|
|
2535
|
+
/** When reconciliation was last requested for this bucket. */
|
|
2536
|
+
provisionRequestedAt: string;
|
|
2537
2537
|
}
|
|
2538
2538
|
export type ProvisionBucketPayloadSelect = {
|
|
2539
2539
|
bucketId?: boolean;
|
|
2540
2540
|
bucketKey?: boolean;
|
|
2541
|
-
jobId?: boolean;
|
|
2542
2541
|
physicalName?: boolean;
|
|
2542
|
+
provisionRequestedAt?: boolean;
|
|
2543
2543
|
};
|
|
2544
2544
|
export interface SeedAppLimitCapsDefaultsPayload {
|
|
2545
2545
|
clientMutationId?: string | null;
|
|
@@ -10,10 +10,11 @@ import type { ProvisionBucketInput, SeedAppLimitCapsDefaultsInput, SeedAppLimitD
|
|
|
10
10
|
/**
|
|
11
11
|
* Variables for provisionBucket
|
|
12
12
|
* Reconcile an S3 bucket for a logical bucket in the database.
|
|
13
|
-
|
|
14
|
-
storage:provision_bucket job used
|
|
15
|
-
|
|
16
|
-
GraphQL
|
|
13
|
+
Records the request on the bucket row via RLS; the bucket's job
|
|
14
|
+
trigger then enqueues the same storage:provision_bucket job used on
|
|
15
|
+
INSERT, and repeated requests collapse into one pending job. This is
|
|
16
|
+
idempotent for an already-reconciled bucket; failures become GraphQL
|
|
17
|
+
errors.
|
|
17
18
|
*/
|
|
18
19
|
export interface ProvisionBucketVariables {
|
|
19
20
|
input: ProvisionBucketInput;
|