@spacefast/common 0.0.23 → 0.0.24
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/dist/config/domains.d.ts +1 -1
- package/dist/config/domains.js +1 -0
- package/dist/config/index.d.ts +0 -1
- package/dist/config/index.js +0 -1
- package/dist/contracts/abuse.d.ts +2 -0
- package/dist/contracts/abuse.js +12 -0
- package/dist/contracts/access.d.ts +121 -9
- package/dist/contracts/access.js +73 -9
- package/dist/contracts/activity.d.ts +1 -1
- package/dist/contracts/activity.js +0 -9
- package/dist/contracts/api-keys.d.ts +21 -21
- package/dist/contracts/beta.js +1 -1
- package/dist/contracts/billing.d.ts +1 -34
- package/dist/contracts/billing.js +4 -53
- package/dist/contracts/builds.d.ts +8 -8
- package/dist/contracts/builds.js +10 -3
- package/dist/contracts/cli.d.ts +10 -0
- package/dist/contracts/cli.js +10 -0
- package/dist/contracts/collab-public.d.ts +63 -0
- package/dist/contracts/collab-public.js +46 -0
- package/dist/contracts/comments.d.ts +283 -54
- package/dist/contracts/comments.js +173 -52
- package/dist/contracts/common.d.ts +3 -3
- package/dist/contracts/device-auth.d.ts +6 -6
- package/dist/contracts/device-auth.js +1 -1
- package/dist/contracts/docs.d.ts +5 -5
- package/dist/contracts/domains.d.ts +36 -36
- package/dist/contracts/enums.d.ts +33 -30
- package/dist/contracts/enums.js +52 -38
- package/dist/contracts/error-code-meta.d.ts +37 -126
- package/dist/contracts/error-code-meta.js +12 -41
- package/dist/contracts/error-codes.d.ts +1 -1
- package/dist/contracts/error-codes.js +10 -32
- package/dist/contracts/execution.d.ts +35 -57
- package/dist/contracts/execution.js +41 -40
- package/dist/contracts/feature-lifecycle-core.d.ts +0 -6
- package/dist/contracts/feature-lifecycle-core.js +2 -31
- package/dist/contracts/feature-lifecycle.d.ts +8 -38
- package/dist/contracts/feature-lifecycle.js +16 -48
- package/dist/contracts/features.d.ts +15 -13
- package/dist/contracts/features.js +39 -38
- package/dist/contracts/functions.d.ts +97 -70
- package/dist/contracts/functions.js +101 -34
- package/dist/contracts/git.d.ts +1 -1
- package/dist/contracts/grants.d.ts +7 -3
- package/dist/contracts/grants.js +18 -9
- package/dist/contracts/internal.d.ts +14 -1
- package/dist/contracts/internal.js +17 -7
- package/dist/contracts/oauth-resources.d.ts +4 -3
- package/dist/contracts/oauth-resources.js +12 -3
- package/dist/contracts/operations.d.ts +90 -5
- package/dist/contracts/operations.js +75 -1
- package/dist/contracts/pages.d.ts +6 -1
- package/dist/contracts/pages.js +24 -1
- package/dist/contracts/plan-policy.d.ts +1 -3
- package/dist/contracts/plan-policy.js +1 -2
- package/dist/contracts/platform.d.ts +61 -148
- package/dist/contracts/platform.js +70 -126
- package/dist/contracts/publish-archive.d.ts +498 -0
- package/dist/contracts/publish-archive.js +25 -0
- package/dist/contracts/resources.d.ts +12 -24
- package/dist/contracts/resources.js +32 -12
- package/dist/contracts/runtime-api.d.ts +369 -175
- package/dist/contracts/runtime-api.js +372 -348
- package/dist/contracts/runtime-app.d.ts +127 -120
- package/dist/contracts/runtime-app.js +19 -10
- package/dist/contracts/runtime-db.d.ts +1 -1
- package/dist/contracts/runtime-services.d.ts +219 -0
- package/dist/contracts/runtime-services.js +437 -0
- package/dist/contracts/runtime-storage.d.ts +45 -32
- package/dist/contracts/runtime-storage.js +30 -8
- package/dist/contracts/space-config.d.ts +10 -16
- package/dist/contracts/space-config.js +14 -10
- package/dist/contracts/spaces.d.ts +241 -436
- package/dist/contracts/spaces.js +128 -145
- package/dist/contracts/superadmin-activity.d.ts +57 -4
- package/dist/contracts/superadmin-activity.js +48 -2
- package/dist/contracts/superadmin-search.d.ts +126 -0
- package/dist/contracts/superadmin-search.js +61 -0
- package/dist/contracts/superadmin-spaces.d.ts +358 -89
- package/dist/contracts/superadmin-spaces.js +97 -24
- package/dist/contracts/superadmin-teams.d.ts +28 -10
- package/dist/contracts/superadmin-teams.js +5 -8
- package/dist/contracts/superadmin.d.ts +0 -32
- package/dist/contracts/superadmin.js +3 -11
- package/dist/contracts/tags.d.ts +9 -9
- package/dist/contracts/teams.d.ts +38 -0
- package/dist/contracts/teams.js +34 -16
- package/dist/contracts/transfers.d.ts +0 -49
- package/dist/contracts/transfers.js +2 -6
- package/dist/contracts/usage.d.ts +61 -0
- package/dist/contracts/usage.js +64 -0
- package/dist/contracts/variables.d.ts +2 -7
- package/dist/contracts/variables.js +6 -5
- package/dist/contracts/webhooks.d.ts +2 -2
- package/dist/contracts/zero.d.ts +87 -56
- package/dist/contracts/zero.js +82 -20
- package/dist/dashboard-paths/index.d.ts +1 -1
- package/dist/dashboard-paths/index.js +1 -0
- package/dist/docs/agent-prose.d.ts +1 -1
- package/dist/docs/agent-prose.js +57 -61
- package/dist/docs/agent-setup.js +40 -13
- package/dist/docs/catalog.d.ts +19 -19
- package/dist/docs/catalog.js +30 -19
- package/dist/docs/error-docs.js +63 -151
- package/dist/test-helpers/fetch-stub.d.ts +16 -0
- package/dist/test-helpers/fetch-stub.js +24 -0
- package/dist/utils/build-settings.js +9 -3
- package/dist/utils/canonical-json.d.ts +10 -0
- package/dist/utils/canonical-json.js +21 -0
- package/dist/utils/cast-transport.d.ts +28 -0
- package/dist/utils/cast-transport.js +52 -0
- package/dist/utils/claim-token.d.ts +0 -8
- package/dist/utils/claim-token.js +3 -15
- package/dist/utils/credential-policy.d.ts +1 -1
- package/dist/utils/env-file.d.ts +17 -0
- package/dist/utils/env-file.js +96 -0
- package/dist/utils/error-code.d.ts +2 -0
- package/dist/utils/error-code.js +7 -0
- package/dist/utils/generate-space-name.d.ts +8 -10
- package/dist/utils/generate-space-name.js +206 -21
- package/dist/utils/grant-decision.fixtures.json +2938 -0
- package/dist/utils/grants.d.ts +2 -0
- package/dist/utils/grants.js +25 -2
- package/dist/utils/gravatar.d.ts +9 -0
- package/dist/utils/gravatar.js +31 -0
- package/dist/utils/idempotency.d.ts +6 -0
- package/dist/utils/idempotency.js +28 -0
- package/dist/utils/local-space-state.d.ts +1 -5
- package/dist/utils/local-space-state.js +7 -26
- package/dist/utils/page-fonts.d.ts +2 -2
- package/dist/utils/page-fonts.js +22 -4
- package/dist/utils/pages.d.ts +1 -2
- package/dist/utils/pages.js +21 -5
- package/dist/utils/publish-form-data.d.ts +12 -0
- package/dist/utils/publish-form-data.js +10 -0
- package/dist/utils/publish-policy.d.ts +20 -0
- package/dist/utils/publish-policy.fixtures.json +397 -0
- package/dist/utils/publish-policy.js +36 -19
- package/dist/utils/push-new.d.ts +7 -0
- package/dist/utils/push-new.js +7 -0
- package/dist/utils/query-keys.d.ts +0 -1
- package/dist/utils/query-keys.js +0 -1
- package/dist/utils/runtime-paths.d.ts +5 -0
- package/dist/utils/runtime-paths.js +5 -0
- package/dist/utils/runtime-upload-batch.d.ts +0 -5
- package/dist/utils/runtime-upload-batch.js +1 -27
- package/dist/utils/runtime-upload.d.ts +3 -13
- package/dist/utils/runtime-upload.js +4 -14
- package/dist/utils/space-config.d.ts +0 -33
- package/dist/utils/space-config.js +5 -326
- package/dist/utils/storage-policy.d.ts +1 -1
- package/dist/utils/storage-policy.js +3 -1
- package/dist/utils/structured-error.d.ts +14 -0
- package/dist/utils/structured-error.js +22 -0
- package/dist/utils/version-path.js +12 -3
- package/dist/vocabulary.d.ts +5 -3
- package/dist/vocabulary.js +13 -10
- package/package.json +10 -5
- package/dist/config/postgres-budget.d.ts +0 -129
- package/dist/config/postgres-budget.js +0 -140
- package/dist/config/postgres-budget.json +0 -51
- package/dist/contracts/archives.d.ts +0 -331
- package/dist/contracts/archives.js +0 -120
- package/dist/contracts/deployments.d.ts +0 -574
- package/dist/contracts/deployments.js +0 -97
- package/dist/contracts/sites.d.ts +0 -416
- package/dist/contracts/sites.js +0 -168
- package/dist/contracts/superadmin-queues.d.ts +0 -414
- package/dist/contracts/superadmin-queues.js +0 -202
- package/dist/contracts/superadmin-runtime.d.ts +0 -27
- package/dist/contracts/superadmin-runtime.js +0 -38
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -1
- package/dist/utils/api.d.ts +0 -4
- package/dist/utils/api.js +0 -13
|
@@ -7,6 +7,8 @@ export declare const StatticActionSchema: z.ZodEnum<{
|
|
|
7
7
|
"spaces:write": "spaces:write";
|
|
8
8
|
"spaces:rename": "spaces:rename";
|
|
9
9
|
"domains:read": "domains:read";
|
|
10
|
+
"spaces:publish": "spaces:publish";
|
|
11
|
+
"builds:trigger": "builds:trigger";
|
|
10
12
|
"mcp:tools": "mcp:tools";
|
|
11
13
|
"*": "*";
|
|
12
14
|
"sites:read": "sites:read";
|
|
@@ -16,7 +18,6 @@ export declare const StatticActionSchema: z.ZodEnum<{
|
|
|
16
18
|
"sites:policy.write": "sites:policy.write";
|
|
17
19
|
"spaces:create": "spaces:create";
|
|
18
20
|
"spaces:delete": "spaces:delete";
|
|
19
|
-
"spaces:publish": "spaces:publish";
|
|
20
21
|
"spaces:transfer": "spaces:transfer";
|
|
21
22
|
"spaces:export": "spaces:export";
|
|
22
23
|
"spaces:import": "spaces:import";
|
|
@@ -35,7 +36,6 @@ export declare const StatticActionSchema: z.ZodEnum<{
|
|
|
35
36
|
"webhooks:read": "webhooks:read";
|
|
36
37
|
"webhooks:write": "webhooks:write";
|
|
37
38
|
"builds:read": "builds:read";
|
|
38
|
-
"builds:trigger": "builds:trigger";
|
|
39
39
|
"builds:create": "builds:create";
|
|
40
40
|
"teams:write": "teams:write";
|
|
41
41
|
"teams:members.write": "teams:members.write";
|
|
@@ -91,6 +91,8 @@ export declare const ApiCredentialPolicySchema: z.ZodObject<{
|
|
|
91
91
|
"spaces:write": "spaces:write";
|
|
92
92
|
"spaces:rename": "spaces:rename";
|
|
93
93
|
"domains:read": "domains:read";
|
|
94
|
+
"spaces:publish": "spaces:publish";
|
|
95
|
+
"builds:trigger": "builds:trigger";
|
|
94
96
|
"mcp:tools": "mcp:tools";
|
|
95
97
|
"*": "*";
|
|
96
98
|
"sites:read": "sites:read";
|
|
@@ -100,7 +102,6 @@ export declare const ApiCredentialPolicySchema: z.ZodObject<{
|
|
|
100
102
|
"sites:policy.write": "sites:policy.write";
|
|
101
103
|
"spaces:create": "spaces:create";
|
|
102
104
|
"spaces:delete": "spaces:delete";
|
|
103
|
-
"spaces:publish": "spaces:publish";
|
|
104
105
|
"spaces:transfer": "spaces:transfer";
|
|
105
106
|
"spaces:export": "spaces:export";
|
|
106
107
|
"spaces:import": "spaces:import";
|
|
@@ -119,7 +120,6 @@ export declare const ApiCredentialPolicySchema: z.ZodObject<{
|
|
|
119
120
|
"webhooks:read": "webhooks:read";
|
|
120
121
|
"webhooks:write": "webhooks:write";
|
|
121
122
|
"builds:read": "builds:read";
|
|
122
|
-
"builds:trigger": "builds:trigger";
|
|
123
123
|
"builds:create": "builds:create";
|
|
124
124
|
"teams:write": "teams:write";
|
|
125
125
|
"teams:members.write": "teams:members.write";
|
|
@@ -135,8 +135,8 @@ export declare const ApiCredentialPolicySchema: z.ZodObject<{
|
|
|
135
135
|
"request.client": z.ZodOptional<z.ZodEnum<{
|
|
136
136
|
api: "api";
|
|
137
137
|
dashboard: "dashboard";
|
|
138
|
-
worker: "worker";
|
|
139
138
|
cli: "cli";
|
|
139
|
+
worker: "worker";
|
|
140
140
|
}>>;
|
|
141
141
|
}, z.core.$strict>>;
|
|
142
142
|
}, z.core.$strict>>;
|
|
@@ -197,6 +197,8 @@ export declare const ApiKeySchema: z.ZodObject<{
|
|
|
197
197
|
"spaces:write": "spaces:write";
|
|
198
198
|
"spaces:rename": "spaces:rename";
|
|
199
199
|
"domains:read": "domains:read";
|
|
200
|
+
"spaces:publish": "spaces:publish";
|
|
201
|
+
"builds:trigger": "builds:trigger";
|
|
200
202
|
"mcp:tools": "mcp:tools";
|
|
201
203
|
"*": "*";
|
|
202
204
|
"sites:read": "sites:read";
|
|
@@ -206,7 +208,6 @@ export declare const ApiKeySchema: z.ZodObject<{
|
|
|
206
208
|
"sites:policy.write": "sites:policy.write";
|
|
207
209
|
"spaces:create": "spaces:create";
|
|
208
210
|
"spaces:delete": "spaces:delete";
|
|
209
|
-
"spaces:publish": "spaces:publish";
|
|
210
211
|
"spaces:transfer": "spaces:transfer";
|
|
211
212
|
"spaces:export": "spaces:export";
|
|
212
213
|
"spaces:import": "spaces:import";
|
|
@@ -225,7 +226,6 @@ export declare const ApiKeySchema: z.ZodObject<{
|
|
|
225
226
|
"webhooks:read": "webhooks:read";
|
|
226
227
|
"webhooks:write": "webhooks:write";
|
|
227
228
|
"builds:read": "builds:read";
|
|
228
|
-
"builds:trigger": "builds:trigger";
|
|
229
229
|
"builds:create": "builds:create";
|
|
230
230
|
"teams:write": "teams:write";
|
|
231
231
|
"teams:members.write": "teams:members.write";
|
|
@@ -241,8 +241,8 @@ export declare const ApiKeySchema: z.ZodObject<{
|
|
|
241
241
|
"request.client": z.ZodOptional<z.ZodEnum<{
|
|
242
242
|
api: "api";
|
|
243
243
|
dashboard: "dashboard";
|
|
244
|
-
worker: "worker";
|
|
245
244
|
cli: "cli";
|
|
245
|
+
worker: "worker";
|
|
246
246
|
}>>;
|
|
247
247
|
}, z.core.$strict>>;
|
|
248
248
|
}, z.core.$strict>>;
|
|
@@ -311,6 +311,8 @@ export declare const ApiKeyListResponseSchema: z.ZodObject<{
|
|
|
311
311
|
"spaces:write": "spaces:write";
|
|
312
312
|
"spaces:rename": "spaces:rename";
|
|
313
313
|
"domains:read": "domains:read";
|
|
314
|
+
"spaces:publish": "spaces:publish";
|
|
315
|
+
"builds:trigger": "builds:trigger";
|
|
314
316
|
"mcp:tools": "mcp:tools";
|
|
315
317
|
"*": "*";
|
|
316
318
|
"sites:read": "sites:read";
|
|
@@ -320,7 +322,6 @@ export declare const ApiKeyListResponseSchema: z.ZodObject<{
|
|
|
320
322
|
"sites:policy.write": "sites:policy.write";
|
|
321
323
|
"spaces:create": "spaces:create";
|
|
322
324
|
"spaces:delete": "spaces:delete";
|
|
323
|
-
"spaces:publish": "spaces:publish";
|
|
324
325
|
"spaces:transfer": "spaces:transfer";
|
|
325
326
|
"spaces:export": "spaces:export";
|
|
326
327
|
"spaces:import": "spaces:import";
|
|
@@ -339,7 +340,6 @@ export declare const ApiKeyListResponseSchema: z.ZodObject<{
|
|
|
339
340
|
"webhooks:read": "webhooks:read";
|
|
340
341
|
"webhooks:write": "webhooks:write";
|
|
341
342
|
"builds:read": "builds:read";
|
|
342
|
-
"builds:trigger": "builds:trigger";
|
|
343
343
|
"builds:create": "builds:create";
|
|
344
344
|
"teams:write": "teams:write";
|
|
345
345
|
"teams:members.write": "teams:members.write";
|
|
@@ -355,8 +355,8 @@ export declare const ApiKeyListResponseSchema: z.ZodObject<{
|
|
|
355
355
|
"request.client": z.ZodOptional<z.ZodEnum<{
|
|
356
356
|
api: "api";
|
|
357
357
|
dashboard: "dashboard";
|
|
358
|
-
worker: "worker";
|
|
359
358
|
cli: "cli";
|
|
359
|
+
worker: "worker";
|
|
360
360
|
}>>;
|
|
361
361
|
}, z.core.$strict>>;
|
|
362
362
|
}, z.core.$strict>>;
|
|
@@ -405,6 +405,8 @@ export declare const ApiKeyCreateRequestSchema: z.ZodObject<{
|
|
|
405
405
|
"spaces:write": "spaces:write";
|
|
406
406
|
"spaces:rename": "spaces:rename";
|
|
407
407
|
"domains:read": "domains:read";
|
|
408
|
+
"spaces:publish": "spaces:publish";
|
|
409
|
+
"builds:trigger": "builds:trigger";
|
|
408
410
|
"mcp:tools": "mcp:tools";
|
|
409
411
|
"*": "*";
|
|
410
412
|
"sites:read": "sites:read";
|
|
@@ -414,7 +416,6 @@ export declare const ApiKeyCreateRequestSchema: z.ZodObject<{
|
|
|
414
416
|
"sites:policy.write": "sites:policy.write";
|
|
415
417
|
"spaces:create": "spaces:create";
|
|
416
418
|
"spaces:delete": "spaces:delete";
|
|
417
|
-
"spaces:publish": "spaces:publish";
|
|
418
419
|
"spaces:transfer": "spaces:transfer";
|
|
419
420
|
"spaces:export": "spaces:export";
|
|
420
421
|
"spaces:import": "spaces:import";
|
|
@@ -433,7 +434,6 @@ export declare const ApiKeyCreateRequestSchema: z.ZodObject<{
|
|
|
433
434
|
"webhooks:read": "webhooks:read";
|
|
434
435
|
"webhooks:write": "webhooks:write";
|
|
435
436
|
"builds:read": "builds:read";
|
|
436
|
-
"builds:trigger": "builds:trigger";
|
|
437
437
|
"builds:create": "builds:create";
|
|
438
438
|
"teams:write": "teams:write";
|
|
439
439
|
"teams:members.write": "teams:members.write";
|
|
@@ -449,8 +449,8 @@ export declare const ApiKeyCreateRequestSchema: z.ZodObject<{
|
|
|
449
449
|
"request.client": z.ZodOptional<z.ZodEnum<{
|
|
450
450
|
api: "api";
|
|
451
451
|
dashboard: "dashboard";
|
|
452
|
-
worker: "worker";
|
|
453
452
|
cli: "cli";
|
|
453
|
+
worker: "worker";
|
|
454
454
|
}>>;
|
|
455
455
|
}, z.core.$strict>>;
|
|
456
456
|
}, z.core.$strict>>;
|
|
@@ -481,6 +481,8 @@ export declare const ApiKeyPatchRequestSchema: z.ZodObject<{
|
|
|
481
481
|
"spaces:write": "spaces:write";
|
|
482
482
|
"spaces:rename": "spaces:rename";
|
|
483
483
|
"domains:read": "domains:read";
|
|
484
|
+
"spaces:publish": "spaces:publish";
|
|
485
|
+
"builds:trigger": "builds:trigger";
|
|
484
486
|
"mcp:tools": "mcp:tools";
|
|
485
487
|
"*": "*";
|
|
486
488
|
"sites:read": "sites:read";
|
|
@@ -490,7 +492,6 @@ export declare const ApiKeyPatchRequestSchema: z.ZodObject<{
|
|
|
490
492
|
"sites:policy.write": "sites:policy.write";
|
|
491
493
|
"spaces:create": "spaces:create";
|
|
492
494
|
"spaces:delete": "spaces:delete";
|
|
493
|
-
"spaces:publish": "spaces:publish";
|
|
494
495
|
"spaces:transfer": "spaces:transfer";
|
|
495
496
|
"spaces:export": "spaces:export";
|
|
496
497
|
"spaces:import": "spaces:import";
|
|
@@ -509,7 +510,6 @@ export declare const ApiKeyPatchRequestSchema: z.ZodObject<{
|
|
|
509
510
|
"webhooks:read": "webhooks:read";
|
|
510
511
|
"webhooks:write": "webhooks:write";
|
|
511
512
|
"builds:read": "builds:read";
|
|
512
|
-
"builds:trigger": "builds:trigger";
|
|
513
513
|
"builds:create": "builds:create";
|
|
514
514
|
"teams:write": "teams:write";
|
|
515
515
|
"teams:members.write": "teams:members.write";
|
|
@@ -525,8 +525,8 @@ export declare const ApiKeyPatchRequestSchema: z.ZodObject<{
|
|
|
525
525
|
"request.client": z.ZodOptional<z.ZodEnum<{
|
|
526
526
|
api: "api";
|
|
527
527
|
dashboard: "dashboard";
|
|
528
|
-
worker: "worker";
|
|
529
528
|
cli: "cli";
|
|
529
|
+
worker: "worker";
|
|
530
530
|
}>>;
|
|
531
531
|
}, z.core.$strict>>;
|
|
532
532
|
}, z.core.$strict>>;
|
|
@@ -556,6 +556,8 @@ export declare const ApiKeyScopedCreateRequestSchema: z.ZodObject<{
|
|
|
556
556
|
"spaces:write": "spaces:write";
|
|
557
557
|
"spaces:rename": "spaces:rename";
|
|
558
558
|
"domains:read": "domains:read";
|
|
559
|
+
"spaces:publish": "spaces:publish";
|
|
560
|
+
"builds:trigger": "builds:trigger";
|
|
559
561
|
"mcp:tools": "mcp:tools";
|
|
560
562
|
"*": "*";
|
|
561
563
|
"sites:read": "sites:read";
|
|
@@ -565,7 +567,6 @@ export declare const ApiKeyScopedCreateRequestSchema: z.ZodObject<{
|
|
|
565
567
|
"sites:policy.write": "sites:policy.write";
|
|
566
568
|
"spaces:create": "spaces:create";
|
|
567
569
|
"spaces:delete": "spaces:delete";
|
|
568
|
-
"spaces:publish": "spaces:publish";
|
|
569
570
|
"spaces:transfer": "spaces:transfer";
|
|
570
571
|
"spaces:export": "spaces:export";
|
|
571
572
|
"spaces:import": "spaces:import";
|
|
@@ -584,7 +585,6 @@ export declare const ApiKeyScopedCreateRequestSchema: z.ZodObject<{
|
|
|
584
585
|
"webhooks:read": "webhooks:read";
|
|
585
586
|
"webhooks:write": "webhooks:write";
|
|
586
587
|
"builds:read": "builds:read";
|
|
587
|
-
"builds:trigger": "builds:trigger";
|
|
588
588
|
"builds:create": "builds:create";
|
|
589
589
|
"teams:write": "teams:write";
|
|
590
590
|
"teams:members.write": "teams:members.write";
|
|
@@ -617,6 +617,8 @@ export declare const ApiKeyScopedPatchRequestSchema: z.ZodObject<{
|
|
|
617
617
|
"spaces:write": "spaces:write";
|
|
618
618
|
"spaces:rename": "spaces:rename";
|
|
619
619
|
"domains:read": "domains:read";
|
|
620
|
+
"spaces:publish": "spaces:publish";
|
|
621
|
+
"builds:trigger": "builds:trigger";
|
|
620
622
|
"mcp:tools": "mcp:tools";
|
|
621
623
|
"*": "*";
|
|
622
624
|
"sites:read": "sites:read";
|
|
@@ -626,7 +628,6 @@ export declare const ApiKeyScopedPatchRequestSchema: z.ZodObject<{
|
|
|
626
628
|
"sites:policy.write": "sites:policy.write";
|
|
627
629
|
"spaces:create": "spaces:create";
|
|
628
630
|
"spaces:delete": "spaces:delete";
|
|
629
|
-
"spaces:publish": "spaces:publish";
|
|
630
631
|
"spaces:transfer": "spaces:transfer";
|
|
631
632
|
"spaces:export": "spaces:export";
|
|
632
633
|
"spaces:import": "spaces:import";
|
|
@@ -645,7 +646,6 @@ export declare const ApiKeyScopedPatchRequestSchema: z.ZodObject<{
|
|
|
645
646
|
"webhooks:read": "webhooks:read";
|
|
646
647
|
"webhooks:write": "webhooks:write";
|
|
647
648
|
"builds:read": "builds:read";
|
|
648
|
-
"builds:trigger": "builds:trigger";
|
|
649
649
|
"builds:create": "builds:create";
|
|
650
650
|
"teams:write": "teams:write";
|
|
651
651
|
"teams:members.write": "teams:members.write";
|
package/dist/contracts/beta.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { makeOffsetListSchema } from "./common.js";
|
|
3
3
|
import { superadminPaginationSchema } from "./superadmin.js";
|
|
4
|
-
// Private-beta enrollment contracts
|
|
4
|
+
// Private-beta enrollment contracts.
|
|
5
5
|
// Two invite systems coexist: `stattic_beta_signups` (this file) is the public
|
|
6
6
|
// waitlist, while `stattic_auth_invitation` stays team-membership-only — the
|
|
7
7
|
// two share no rows, routes, or email templates.
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
export declare const billingProviderValues: readonly ["stripe", "
|
|
2
|
+
export declare const billingProviderValues: readonly ["stripe", "grant"];
|
|
3
3
|
export declare const billingProviderSchema: z.ZodEnum<{
|
|
4
4
|
grant: "grant";
|
|
5
5
|
stripe: "stripe";
|
|
6
|
-
app_store: "app_store";
|
|
7
|
-
google_play: "google_play";
|
|
8
6
|
}>;
|
|
9
7
|
export declare const billingIntervalValues: readonly ["monthly", "yearly"];
|
|
10
8
|
export declare const billingIntervalSchema: z.ZodEnum<{
|
|
@@ -12,11 +10,6 @@ export declare const billingIntervalSchema: z.ZodEnum<{
|
|
|
12
10
|
yearly: "yearly";
|
|
13
11
|
}>;
|
|
14
12
|
export type BillingIntervalValue = z.infer<typeof billingIntervalSchema>;
|
|
15
|
-
export declare const appStoreEnvironmentValues: readonly ["Sandbox", "Production", "Xcode", "LocalTesting"];
|
|
16
|
-
export declare const googlePlaySubscriptionStateValues: readonly ["SUBSCRIPTION_STATE_UNSPECIFIED", "SUBSCRIPTION_STATE_PENDING", "SUBSCRIPTION_STATE_ACTIVE", "SUBSCRIPTION_STATE_PAUSED", "SUBSCRIPTION_STATE_IN_GRACE_PERIOD", "SUBSCRIPTION_STATE_ON_HOLD", "SUBSCRIPTION_STATE_CANCELED", "SUBSCRIPTION_STATE_EXPIRED", "SUBSCRIPTION_STATE_PENDING_PURCHASE_EXPIRED"];
|
|
17
|
-
export type GooglePlaySubscriptionState = (typeof googlePlaySubscriptionStateValues)[number];
|
|
18
|
-
export declare const googlePlayAcknowledgementStateValues: readonly ["ACKNOWLEDGEMENT_STATE_UNSPECIFIED", "ACKNOWLEDGEMENT_STATE_PENDING", "ACKNOWLEDGEMENT_STATE_ACKNOWLEDGED"];
|
|
19
|
-
export type GooglePlayAcknowledgementState = (typeof googlePlayAcknowledgementStateValues)[number];
|
|
20
13
|
export declare const billingTransactionKindValues: readonly ["purchase", "renewal", "refund", "adjustment"];
|
|
21
14
|
export declare const billingTransactionKindSchema: z.ZodEnum<{
|
|
22
15
|
purchase: "purchase";
|
|
@@ -47,8 +40,6 @@ export declare const billingPlanSourceSchema: z.ZodObject<{
|
|
|
47
40
|
provider: z.ZodEnum<{
|
|
48
41
|
grant: "grant";
|
|
49
42
|
stripe: "stripe";
|
|
50
|
-
app_store: "app_store";
|
|
51
|
-
google_play: "google_play";
|
|
52
43
|
}>;
|
|
53
44
|
planCode: z.ZodEnum<{
|
|
54
45
|
free: "free";
|
|
@@ -62,30 +53,6 @@ export declare const billingPlanSourceSchema: z.ZodObject<{
|
|
|
62
53
|
expiresAt: z.ZodNullable<z.ZodString>;
|
|
63
54
|
}, z.core.$strip>;
|
|
64
55
|
export type BillingPlanSource = z.infer<typeof billingPlanSourceSchema>;
|
|
65
|
-
export declare const billingStoreAccountResponseSchema: z.ZodObject<{
|
|
66
|
-
token: z.ZodString;
|
|
67
|
-
appStoreProducts: z.ZodArray<z.ZodString>;
|
|
68
|
-
googlePlayBasePlans: z.ZodArray<z.ZodString>;
|
|
69
|
-
}, z.core.$strip>;
|
|
70
|
-
export declare const appStoreVerifyRequestSchema: z.ZodObject<{
|
|
71
|
-
transactionId: z.ZodString;
|
|
72
|
-
}, z.core.$strip>;
|
|
73
|
-
export declare const googlePlayRecoverRequestSchema: z.ZodObject<{
|
|
74
|
-
purchaseToken: z.ZodString;
|
|
75
|
-
}, z.core.$strip>;
|
|
76
|
-
export declare const storeSubscriptionResultSchema: z.ZodObject<{
|
|
77
|
-
provider: z.ZodEnum<{
|
|
78
|
-
grant: "grant";
|
|
79
|
-
stripe: "stripe";
|
|
80
|
-
app_store: "app_store";
|
|
81
|
-
google_play: "google_play";
|
|
82
|
-
}>;
|
|
83
|
-
reference: z.ZodString;
|
|
84
|
-
productId: z.ZodString;
|
|
85
|
-
planCode: z.ZodNullable<z.ZodString>;
|
|
86
|
-
isActive: z.ZodBoolean;
|
|
87
|
-
expiresAt: z.ZodNullable<z.ZodString>;
|
|
88
|
-
}, z.core.$strip>;
|
|
89
56
|
export declare const stripeCheckoutRequestSchema: z.ZodObject<{
|
|
90
57
|
planCode: z.ZodDefault<z.ZodEnum<{
|
|
91
58
|
free: "free";
|
|
@@ -3,37 +3,14 @@ import { planCodeSchema, planLimitValueSchema } from "./features.js";
|
|
|
3
3
|
// Billing providers a team plan can resolve from. `grant` is a
|
|
4
4
|
// superadmin-assigned subscription: no payment, no transactions, just an
|
|
5
5
|
// operator-issued entitlement row (optionally expiring).
|
|
6
|
-
export const billingProviderValues = ["stripe", "
|
|
6
|
+
export const billingProviderValues = ["stripe", "grant"];
|
|
7
7
|
export const billingProviderSchema = z.enum(billingProviderValues).describe("Billing provider.");
|
|
8
8
|
export const billingIntervalValues = ["monthly", "yearly"];
|
|
9
9
|
export const billingIntervalSchema = z.enum(billingIntervalValues);
|
|
10
|
-
export const appStoreEnvironmentValues = [
|
|
11
|
-
"Sandbox",
|
|
12
|
-
"Production",
|
|
13
|
-
"Xcode",
|
|
14
|
-
"LocalTesting",
|
|
15
|
-
];
|
|
16
|
-
// Google Play subscriptionsv2 states (subset we persist verbatim).
|
|
17
|
-
export const googlePlaySubscriptionStateValues = [
|
|
18
|
-
"SUBSCRIPTION_STATE_UNSPECIFIED",
|
|
19
|
-
"SUBSCRIPTION_STATE_PENDING",
|
|
20
|
-
"SUBSCRIPTION_STATE_ACTIVE",
|
|
21
|
-
"SUBSCRIPTION_STATE_PAUSED",
|
|
22
|
-
"SUBSCRIPTION_STATE_IN_GRACE_PERIOD",
|
|
23
|
-
"SUBSCRIPTION_STATE_ON_HOLD",
|
|
24
|
-
"SUBSCRIPTION_STATE_CANCELED",
|
|
25
|
-
"SUBSCRIPTION_STATE_EXPIRED",
|
|
26
|
-
"SUBSCRIPTION_STATE_PENDING_PURCHASE_EXPIRED",
|
|
27
|
-
];
|
|
28
|
-
export const googlePlayAcknowledgementStateValues = [
|
|
29
|
-
"ACKNOWLEDGEMENT_STATE_UNSPECIFIED",
|
|
30
|
-
"ACKNOWLEDGEMENT_STATE_PENDING",
|
|
31
|
-
"ACKNOWLEDGEMENT_STATE_ACKNOWLEDGED",
|
|
32
|
-
];
|
|
33
10
|
// Transaction ledger vocabulary. Every REAL payment event lands as one row —
|
|
34
11
|
// operator grants never do (no transactions by definition). Amounts are
|
|
35
|
-
// micros of the payment currency (1_000_000 micros = 1 unit) so
|
|
36
|
-
//
|
|
12
|
+
// micros of the payment currency (1_000_000 micros = 1 unit) so Stripe cents
|
|
13
|
+
// normalize losslessly.
|
|
37
14
|
export const billingTransactionKindValues = [
|
|
38
15
|
"purchase",
|
|
39
16
|
"renewal",
|
|
@@ -61,33 +38,7 @@ export const billingPlanSourceSchema = z.object({
|
|
|
61
38
|
provider: billingProviderSchema,
|
|
62
39
|
planCode: planCodeSchema,
|
|
63
40
|
active: z.boolean(),
|
|
64
|
-
detail: z
|
|
65
|
-
.string()
|
|
66
|
-
.describe("Provider-specific reference: subscription/grant id, transaction id, or token."),
|
|
67
|
-
expiresAt: z.string().datetime().nullable(),
|
|
68
|
-
});
|
|
69
|
-
// Mobile-client store flows: the team's store account token is passed as
|
|
70
|
-
// Apple `appAccountToken` / Google `obfuscatedExternalAccountId` at purchase
|
|
71
|
-
// time so receipts bind back to the team server-side.
|
|
72
|
-
export const billingStoreAccountResponseSchema = z.object({
|
|
73
|
-
token: z.string().uuid(),
|
|
74
|
-
appStoreProducts: z.array(z.string()).describe("App Store product ids sold by this deployment."),
|
|
75
|
-
googlePlayBasePlans: z
|
|
76
|
-
.array(z.string())
|
|
77
|
-
.describe("Google Play base plan ids sold by this deployment."),
|
|
78
|
-
});
|
|
79
|
-
export const appStoreVerifyRequestSchema = z.object({
|
|
80
|
-
transactionId: z.string().trim().min(1),
|
|
81
|
-
});
|
|
82
|
-
export const googlePlayRecoverRequestSchema = z.object({
|
|
83
|
-
purchaseToken: z.string().trim().min(1),
|
|
84
|
-
});
|
|
85
|
-
export const storeSubscriptionResultSchema = z.object({
|
|
86
|
-
provider: billingProviderSchema,
|
|
87
|
-
reference: z.string().describe("Provider-side id: transaction id or purchase token."),
|
|
88
|
-
productId: z.string(),
|
|
89
|
-
planCode: z.string().nullable(),
|
|
90
|
-
isActive: z.boolean(),
|
|
41
|
+
detail: z.string().describe("Provider-specific reference: subscription or grant id."),
|
|
91
42
|
expiresAt: z.string().datetime().nullable(),
|
|
92
43
|
});
|
|
93
44
|
export const stripeCheckoutRequestSchema = z.object({
|
|
@@ -24,7 +24,7 @@ declare const InternalBuildSourceSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
24
24
|
kind: z.ZodLiteral<"archive">;
|
|
25
25
|
uploadId: z.ZodOptional<z.ZodString>;
|
|
26
26
|
sourceMetadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
27
|
-
|
|
27
|
+
sourceBuildId: z.ZodOptional<z.ZodString>;
|
|
28
28
|
uploadedAt: z.ZodOptional<z.ZodString>;
|
|
29
29
|
recoveredAt: z.ZodOptional<z.ZodString>;
|
|
30
30
|
sha256: z.ZodOptional<z.ZodString>;
|
|
@@ -37,7 +37,7 @@ declare const InternalBuildInputSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
37
37
|
kind: z.ZodLiteral<"archive">;
|
|
38
38
|
uploadId: z.ZodOptional<z.ZodString>;
|
|
39
39
|
sourceMetadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
40
|
-
|
|
40
|
+
sourceBuildId: z.ZodOptional<z.ZodString>;
|
|
41
41
|
uploadedAt: z.ZodOptional<z.ZodString>;
|
|
42
42
|
recoveredAt: z.ZodOptional<z.ZodString>;
|
|
43
43
|
sha256: z.ZodOptional<z.ZodString>;
|
|
@@ -181,8 +181,8 @@ export declare const BuildSchema: z.ZodObject<{
|
|
|
181
181
|
code: z.ZodString;
|
|
182
182
|
severity: z.ZodEnum<{
|
|
183
183
|
info: "info";
|
|
184
|
-
error: "error";
|
|
185
184
|
warning: "warning";
|
|
185
|
+
error: "error";
|
|
186
186
|
}>;
|
|
187
187
|
message: z.ZodString;
|
|
188
188
|
path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -232,8 +232,8 @@ export declare const buildCreateRequestSchema: z.ZodObject<{
|
|
|
232
232
|
code: z.ZodString;
|
|
233
233
|
severity: z.ZodEnum<{
|
|
234
234
|
info: "info";
|
|
235
|
-
error: "error";
|
|
236
235
|
warning: "warning";
|
|
236
|
+
error: "error";
|
|
237
237
|
}>;
|
|
238
238
|
message: z.ZodString;
|
|
239
239
|
path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -295,8 +295,8 @@ export declare const buildSourceArchiveUploadSchema: z.ZodObject<{
|
|
|
295
295
|
code: z.ZodString;
|
|
296
296
|
severity: z.ZodEnum<{
|
|
297
297
|
info: "info";
|
|
298
|
-
error: "error";
|
|
299
298
|
warning: "warning";
|
|
299
|
+
error: "error";
|
|
300
300
|
}>;
|
|
301
301
|
message: z.ZodString;
|
|
302
302
|
path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -359,8 +359,8 @@ export declare const buildCreateResponseSchema: z.ZodObject<{
|
|
|
359
359
|
code: z.ZodString;
|
|
360
360
|
severity: z.ZodEnum<{
|
|
361
361
|
info: "info";
|
|
362
|
-
error: "error";
|
|
363
362
|
warning: "warning";
|
|
363
|
+
error: "error";
|
|
364
364
|
}>;
|
|
365
365
|
message: z.ZodString;
|
|
366
366
|
path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -424,8 +424,8 @@ export declare const buildCreateResponseSchema: z.ZodObject<{
|
|
|
424
424
|
code: z.ZodString;
|
|
425
425
|
severity: z.ZodEnum<{
|
|
426
426
|
info: "info";
|
|
427
|
-
error: "error";
|
|
428
427
|
warning: "warning";
|
|
428
|
+
error: "error";
|
|
429
429
|
}>;
|
|
430
430
|
message: z.ZodString;
|
|
431
431
|
path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -493,8 +493,8 @@ export declare const buildListResponseSchema: z.ZodObject<{
|
|
|
493
493
|
code: z.ZodString;
|
|
494
494
|
severity: z.ZodEnum<{
|
|
495
495
|
info: "info";
|
|
496
|
-
error: "error";
|
|
497
496
|
warning: "warning";
|
|
497
|
+
error: "error";
|
|
498
498
|
}>;
|
|
499
499
|
message: z.ZodString;
|
|
500
500
|
path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
package/dist/contracts/builds.js
CHANGED
|
@@ -49,8 +49,15 @@ const internalArchiveBuildSourceSchema = z.object({
|
|
|
49
49
|
.record(z.string(), z.unknown())
|
|
50
50
|
.optional()
|
|
51
51
|
.describe("Internal source provenance copied to the produced version."),
|
|
52
|
-
|
|
53
|
-
|
|
52
|
+
sourceBuildId: z
|
|
53
|
+
.string()
|
|
54
|
+
.optional()
|
|
55
|
+
.describe("Build id whose provider runtime holds the source archive."),
|
|
56
|
+
uploadedAt: z
|
|
57
|
+
.string()
|
|
58
|
+
.datetime()
|
|
59
|
+
.optional()
|
|
60
|
+
.describe("When the archive reached the provider runtime."),
|
|
54
61
|
recoveredAt: z
|
|
55
62
|
.string()
|
|
56
63
|
.datetime()
|
|
@@ -126,7 +133,7 @@ export const PublicBuildInputSchema = z
|
|
|
126
133
|
})
|
|
127
134
|
.strict(),
|
|
128
135
|
])
|
|
129
|
-
.describe("Public build input. Internal clone URLs and
|
|
136
|
+
.describe("Public build input. Internal clone URLs and provider source references are hidden.");
|
|
130
137
|
export const BuildCreateInputSchema = z
|
|
131
138
|
.discriminatedUnion("kind", [
|
|
132
139
|
z
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
/** A person, as everyone else may see them. Identity colors are not themeable. */
|
|
3
|
+
export declare const publicActorSchema: z.ZodObject<{
|
|
4
|
+
name: z.ZodString;
|
|
5
|
+
color: z.ZodString;
|
|
6
|
+
avatar_url: z.ZodOptional<z.ZodString>;
|
|
7
|
+
}, z.core.$strip>;
|
|
8
|
+
export type PublicActor = z.infer<typeof publicActorSchema>;
|
|
9
|
+
/** A thread as a list renders it — the body is an excerpt, the anchor is gone. */
|
|
10
|
+
export declare const publicThreadSchema: z.ZodObject<{
|
|
11
|
+
id: z.ZodString;
|
|
12
|
+
path: z.ZodString;
|
|
13
|
+
version_id: z.ZodNullable<z.ZodString>;
|
|
14
|
+
author: z.ZodObject<{
|
|
15
|
+
name: z.ZodString;
|
|
16
|
+
color: z.ZodString;
|
|
17
|
+
avatar_url: z.ZodOptional<z.ZodString>;
|
|
18
|
+
}, z.core.$strip>;
|
|
19
|
+
excerpt: z.ZodString;
|
|
20
|
+
open: z.ZodBoolean;
|
|
21
|
+
unread: z.ZodBoolean;
|
|
22
|
+
reply_count: z.ZodNumber;
|
|
23
|
+
reacted: z.ZodBoolean;
|
|
24
|
+
created_at: z.ZodString;
|
|
25
|
+
}, z.core.$strip>;
|
|
26
|
+
export type PublicThread = z.infer<typeof publicThreadSchema>;
|
|
27
|
+
export declare const publicEventKindSchema: z.ZodEnum<{
|
|
28
|
+
publish: "publish";
|
|
29
|
+
archive: "archive";
|
|
30
|
+
thread: "thread";
|
|
31
|
+
reply: "reply";
|
|
32
|
+
reaction: "reaction";
|
|
33
|
+
}>;
|
|
34
|
+
export type PublicEventKind = z.infer<typeof publicEventKindSchema>;
|
|
35
|
+
/** One activity tick. `line` is the rendered sentence; the rest is addressing. */
|
|
36
|
+
export declare const publicEventSchema: z.ZodObject<{
|
|
37
|
+
kind: z.ZodEnum<{
|
|
38
|
+
publish: "publish";
|
|
39
|
+
archive: "archive";
|
|
40
|
+
thread: "thread";
|
|
41
|
+
reply: "reply";
|
|
42
|
+
reaction: "reaction";
|
|
43
|
+
}>;
|
|
44
|
+
actor: z.ZodOptional<z.ZodObject<{
|
|
45
|
+
name: z.ZodString;
|
|
46
|
+
color: z.ZodString;
|
|
47
|
+
avatar_url: z.ZodOptional<z.ZodString>;
|
|
48
|
+
}, z.core.$strip>>;
|
|
49
|
+
thread_id: z.ZodOptional<z.ZodString>;
|
|
50
|
+
path: z.ZodOptional<z.ZodString>;
|
|
51
|
+
version_id: z.ZodOptional<z.ZodString>;
|
|
52
|
+
line: z.ZodString;
|
|
53
|
+
at: z.ZodString;
|
|
54
|
+
}, z.core.$strip>;
|
|
55
|
+
export type PublicEvent = z.infer<typeof publicEventSchema>;
|
|
56
|
+
/** A version as a chip or a switcher names it. */
|
|
57
|
+
export declare const publicVersionSchema: z.ZodObject<{
|
|
58
|
+
id: z.ZodString;
|
|
59
|
+
label: z.ZodString;
|
|
60
|
+
live: z.ZodBoolean;
|
|
61
|
+
published_at: z.ZodNullable<z.ZodString>;
|
|
62
|
+
}, z.core.$strip>;
|
|
63
|
+
export type PublicVersion = z.infer<typeof publicVersionSchema>;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
// The Collab public types — the sanitized shapes every collab surface emits or
|
|
2
|
+
// renders (collab-public-api.html §5). One home: the SDK, the overlay, the
|
|
3
|
+
// dashboard bridge, the control-plane projection and any published layout all
|
|
4
|
+
// import from here. Re-exported nowhere.
|
|
5
|
+
//
|
|
6
|
+
// Sanitized means sanitized: no emails, no raw authority refs, no anchors. A
|
|
7
|
+
// custom layout can restyle everything these carry and escalate nothing.
|
|
8
|
+
import { z } from "zod";
|
|
9
|
+
/** A person, as everyone else may see them. Identity colors are not themeable. */
|
|
10
|
+
export const publicActorSchema = z.object({
|
|
11
|
+
name: z.string().min(1).max(160),
|
|
12
|
+
color: z.string().min(1).max(32),
|
|
13
|
+
avatar_url: z.string().url().max(2048).optional(),
|
|
14
|
+
});
|
|
15
|
+
/** A thread as a list renders it — the body is an excerpt, the anchor is gone. */
|
|
16
|
+
export const publicThreadSchema = z.object({
|
|
17
|
+
id: z.string().min(1).max(128),
|
|
18
|
+
path: z.string().min(1).max(2048),
|
|
19
|
+
version_id: z.string().min(1).max(128).nullable(),
|
|
20
|
+
author: publicActorSchema,
|
|
21
|
+
excerpt: z.string().max(2048),
|
|
22
|
+
open: z.boolean(),
|
|
23
|
+
unread: z.boolean(),
|
|
24
|
+
reply_count: z.number().int().min(0),
|
|
25
|
+
/** The viewer reacted to this thread. */
|
|
26
|
+
reacted: z.boolean(),
|
|
27
|
+
created_at: z.string().min(1).max(64),
|
|
28
|
+
});
|
|
29
|
+
export const publicEventKindSchema = z.enum(["thread", "reply", "reaction", "archive", "publish"]);
|
|
30
|
+
/** One activity tick. `line` is the rendered sentence; the rest is addressing. */
|
|
31
|
+
export const publicEventSchema = z.object({
|
|
32
|
+
kind: publicEventKindSchema,
|
|
33
|
+
actor: publicActorSchema.optional(),
|
|
34
|
+
thread_id: z.string().min(1).max(128).optional(),
|
|
35
|
+
path: z.string().min(1).max(2048).optional(),
|
|
36
|
+
version_id: z.string().min(1).max(128).optional(),
|
|
37
|
+
line: z.string().max(2048),
|
|
38
|
+
at: z.string().min(1).max(64),
|
|
39
|
+
});
|
|
40
|
+
/** A version as a chip or a switcher names it. */
|
|
41
|
+
export const publicVersionSchema = z.object({
|
|
42
|
+
id: z.string().min(1).max(128),
|
|
43
|
+
label: z.string().min(1).max(64),
|
|
44
|
+
live: z.boolean(),
|
|
45
|
+
published_at: z.string().min(1).max(64).nullable(),
|
|
46
|
+
});
|