@spacefast/common 0.0.11 → 0.0.13
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/agents/connect-targets.d.ts +4 -4
- package/dist/agents/connect-targets.js +3 -3
- package/dist/agents/private-key-oauth.d.ts +37 -0
- package/dist/agents/private-key-oauth.js +158 -0
- package/dist/config/domains.js +1 -1
- package/dist/config/index.d.ts +1 -0
- package/dist/config/index.js +1 -0
- package/dist/config/postgres-budget.d.ts +126 -0
- package/dist/config/postgres-budget.js +135 -0
- package/dist/config/postgres-budget.json +50 -0
- package/dist/contracts/access.d.ts +386 -1183
- package/dist/contracts/access.js +240 -1018
- package/dist/contracts/activity.d.ts +1 -1
- package/dist/contracts/activity.js +11 -19
- package/dist/contracts/api-keys.d.ts +69 -45
- package/dist/contracts/api-keys.js +3 -0
- package/dist/contracts/archives.d.ts +9 -10
- package/dist/contracts/archives.js +4 -6
- package/dist/contracts/builds.d.ts +8 -8
- package/dist/contracts/builds.js +28 -48
- package/dist/contracts/channels.js +1 -2
- package/dist/contracts/comments.d.ts +102 -93
- package/dist/contracts/comments.js +121 -63
- package/dist/contracts/common.d.ts +4 -3
- package/dist/contracts/common.js +2 -0
- package/dist/contracts/countries.js +2 -7
- package/dist/contracts/data-source-routes.d.ts +20 -0
- package/dist/contracts/data-source-routes.js +15 -0
- package/dist/contracts/deployments.d.ts +3 -3
- package/dist/contracts/device-auth.d.ts +21 -15
- package/dist/contracts/docs.d.ts +5 -5
- package/dist/contracts/domains.d.ts +261 -1330
- package/dist/contracts/domains.js +39 -301
- package/dist/contracts/email-preferences.d.ts +50 -0
- package/dist/contracts/email-preferences.js +44 -0
- package/dist/contracts/enums.d.ts +3 -5
- package/dist/contracts/enums.js +3 -8
- package/dist/contracts/error-code-meta.d.ts +99 -33
- package/dist/contracts/error-code-meta.js +36 -9
- package/dist/contracts/error-codes.d.ts +1 -1
- package/dist/contracts/error-codes.js +28 -11
- package/dist/contracts/execution.d.ts +212 -0
- package/dist/contracts/execution.js +288 -0
- package/dist/contracts/feature-lifecycle.d.ts +498 -2
- package/dist/contracts/feature-lifecycle.js +539 -2
- package/dist/contracts/features.d.ts +184 -74
- package/dist/contracts/features.js +4 -303
- package/dist/contracts/functions.d.ts +729 -0
- package/dist/contracts/functions.js +485 -0
- package/dist/contracts/git.d.ts +1 -1
- package/dist/contracts/grants.d.ts +1158 -0
- package/dist/contracts/grants.js +696 -0
- package/dist/contracts/ids.d.ts +6 -5
- package/dist/contracts/ids.js +6 -5
- package/dist/contracts/internal.d.ts +3 -3
- package/dist/contracts/mcp.d.ts +12 -12
- package/dist/contracts/me.js +1 -1
- package/dist/contracts/mounts.d.ts +142 -0
- package/dist/contracts/mounts.js +56 -0
- package/dist/contracts/oauth-resources.d.ts +5 -5
- package/dist/contracts/oauth-resources.js +2 -0
- package/dist/contracts/operations.d.ts +4 -4
- package/dist/contracts/pages.d.ts +6 -14
- package/dist/contracts/pages.js +11 -23
- package/dist/contracts/plan-policy.d.ts +2 -9
- package/dist/contracts/plan-policy.js +1 -4
- package/dist/contracts/platform.d.ts +80 -32
- package/dist/contracts/platform.js +59 -12
- package/dist/contracts/push-new.d.ts +26 -2
- package/dist/contracts/push-new.js +8 -0
- package/dist/contracts/quotas.d.ts +0 -1
- package/dist/contracts/quotas.js +0 -5
- package/dist/contracts/repository-connections.d.ts +1 -1
- package/dist/contracts/resources.d.ts +21 -85
- package/dist/contracts/resources.js +17 -47
- package/dist/contracts/runtime-api.d.ts +799 -192
- package/dist/contracts/runtime-api.js +231 -100
- package/dist/contracts/runtime-app.d.ts +138 -0
- package/dist/contracts/runtime-app.js +21 -0
- package/dist/contracts/sf-config-v1.d.ts +5 -0
- package/dist/contracts/sf-config-v1.js +1 -1
- package/dist/contracts/sites.d.ts +17 -12
- package/dist/contracts/sites.js +30 -12
- package/dist/contracts/space-config.d.ts +46 -117
- package/dist/contracts/space-config.js +323 -25
- package/dist/contracts/spaces.d.ts +392 -256
- package/dist/contracts/spaces.js +163 -83
- package/dist/contracts/superadmin-emails.d.ts +27 -3
- package/dist/contracts/superadmin-emails.js +10 -15
- package/dist/contracts/superadmin-runtime.d.ts +2 -2
- package/dist/contracts/superadmin-spaces.d.ts +19 -142
- package/dist/contracts/superadmin-spaces.js +7 -0
- package/dist/contracts/tags.d.ts +66 -36
- package/dist/contracts/tags.js +195 -11
- package/dist/contracts/teams.d.ts +9 -9
- package/dist/contracts/transfers.d.ts +1 -2
- package/dist/contracts/variables.d.ts +4 -4
- package/dist/contracts/variables.js +4 -3
- package/dist/contracts/webhooks.d.ts +2 -2
- package/dist/contracts/zero.d.ts +437 -193
- package/dist/contracts/zero.js +149 -158
- package/dist/dashboard-paths/index.d.ts +3 -3
- package/dist/dashboard-paths/index.js +1 -0
- package/dist/docs/agent-prose.js +10 -8
- package/dist/docs/agent-setup.d.ts +6 -4
- package/dist/docs/agent-setup.js +26 -16
- package/dist/docs/agent-solutions.js +1 -1
- package/dist/docs/catalog.d.ts +35 -37
- package/dist/docs/catalog.js +36 -38
- package/dist/docs/error-docs.js +108 -44
- package/dist/utils/asset-fingerprint.d.ts +11 -0
- package/dist/utils/asset-fingerprint.js +46 -0
- package/dist/utils/auth-redirect.d.ts +1 -3
- package/dist/utils/auth-redirect.js +1 -21
- package/dist/utils/build-settings.d.ts +2 -0
- package/dist/utils/build-settings.js +61 -9
- package/dist/utils/credential-policy.d.ts +1 -1
- package/dist/utils/credential-policy.js +4 -0
- package/dist/utils/dns-instructions.d.ts +29 -0
- package/dist/utils/dns-instructions.js +78 -0
- package/dist/utils/domain-diagnostics.d.ts +29 -0
- package/dist/utils/domain-diagnostics.js +63 -0
- package/dist/utils/egress-policy.fixtures.json +51 -0
- package/dist/utils/grants.d.ts +53 -0
- package/dist/utils/grants.js +160 -0
- package/dist/utils/id-hints.d.ts +1 -0
- package/dist/utils/id-hints.js +55 -13
- package/dist/utils/local-space-state.js +1 -0
- package/dist/utils/page-colors.d.ts +50 -0
- package/dist/utils/page-colors.js +167 -0
- package/dist/utils/page-fonts.d.ts +2 -0
- package/dist/utils/page-fonts.js +4 -0
- package/dist/utils/pages.d.ts +19 -6
- package/dist/utils/pages.js +122 -49
- package/dist/utils/production-runtime.d.ts +18 -0
- package/dist/utils/production-runtime.js +28 -0
- package/dist/utils/publish-policy.d.ts +34 -4
- package/dist/utils/publish-policy.js +132 -61
- package/dist/utils/query-keys.d.ts +7 -13
- package/dist/utils/query-keys.js +12 -18
- package/dist/utils/source-archive-policy.d.ts +2 -0
- package/dist/utils/source-archive-policy.js +2 -0
- package/dist/utils/space-config.d.ts +5 -1
- package/dist/utils/space-config.js +35 -0
- package/dist/utils/static-runtime-policy.d.ts +5 -0
- package/dist/utils/static-runtime-policy.fixtures.json +57 -0
- package/dist/utils/static-runtime-policy.js +54 -10
- package/dist/utils/upload-session.d.ts +3 -0
- package/dist/utils/upload-session.js +31 -0
- package/package.json +6 -4
- package/dist/contracts/annotations.d.ts +0 -327
- package/dist/contracts/annotations.js +0 -235
- package/dist/contracts/generated-feature-launch-entries.d.ts +0 -2
- package/dist/contracts/generated-feature-launch-entries.js +0 -518
- package/dist/contracts/publishes.d.ts +0 -135
- package/dist/contracts/publishes.js +0 -162
- package/dist/utils/access-match.d.ts +0 -39
- package/dist/utils/access-match.js +0 -296
- package/dist/utils/sf-config-v1.d.ts +0 -2
- package/dist/utils/sf-config-v1.js +0 -542
package/dist/contracts/tags.js
CHANGED
|
@@ -184,6 +184,148 @@ export function mergeTagConsentPolicyInputs(...policies) {
|
|
|
184
184
|
}
|
|
185
185
|
return Object.keys(merged).length > 0 ? merged : undefined;
|
|
186
186
|
}
|
|
187
|
+
export const TAG_GRAPH_MAX_ENCODED_BYTES = 256 * 1024;
|
|
188
|
+
export const TAG_GRAPH_MAX_REQUEST_BODY_BYTES = 512 * 1024;
|
|
189
|
+
export const TAG_GRAPH_MAX_TAGS = 256;
|
|
190
|
+
export const TAG_GRAPH_MAX_TRIGGERS = 256;
|
|
191
|
+
export const TAG_GRAPH_MAX_VARIABLES = 256;
|
|
192
|
+
export const TAG_GRAPH_MAX_SYSTEM_MODULES = 64;
|
|
193
|
+
export const TAG_GRAPH_MAX_ARRAY_ITEMS = 256;
|
|
194
|
+
export const TAG_GRAPH_MAX_OBJECT_KEYS = 64;
|
|
195
|
+
export const TAG_GRAPH_MAX_STRING_BYTES = 64 * 1024;
|
|
196
|
+
export const TAG_GRAPH_MAX_DEPTH = 16;
|
|
197
|
+
const TAG_GRAPH_TEXT_ENCODER = new TextEncoder();
|
|
198
|
+
function tagGraphStringBytes(value) {
|
|
199
|
+
return TAG_GRAPH_TEXT_ENCODER.encode(value).byteLength;
|
|
200
|
+
}
|
|
201
|
+
function refineTagGraphBudget(value, ctx) {
|
|
202
|
+
let encodedBytes = 0;
|
|
203
|
+
const addEncodedBytes = (bytes, path) => {
|
|
204
|
+
encodedBytes += bytes;
|
|
205
|
+
if (encodedBytes <= TAG_GRAPH_MAX_ENCODED_BYTES)
|
|
206
|
+
return true;
|
|
207
|
+
ctx.addIssue({
|
|
208
|
+
code: "custom",
|
|
209
|
+
message: `Tag graph must not exceed ${TAG_GRAPH_MAX_ENCODED_BYTES} encoded bytes.`,
|
|
210
|
+
path,
|
|
211
|
+
});
|
|
212
|
+
return false;
|
|
213
|
+
};
|
|
214
|
+
const pending = [
|
|
215
|
+
{ value, path: [], depth: 0 },
|
|
216
|
+
];
|
|
217
|
+
while (pending.length > 0) {
|
|
218
|
+
const current = pending.pop();
|
|
219
|
+
if (!current)
|
|
220
|
+
break;
|
|
221
|
+
if (typeof current.value === "string") {
|
|
222
|
+
if (tagGraphStringBytes(current.value) > TAG_GRAPH_MAX_STRING_BYTES) {
|
|
223
|
+
ctx.addIssue({
|
|
224
|
+
code: "custom",
|
|
225
|
+
message: `Tag graph strings must not exceed ${TAG_GRAPH_MAX_STRING_BYTES} bytes.`,
|
|
226
|
+
path: current.path,
|
|
227
|
+
});
|
|
228
|
+
return;
|
|
229
|
+
}
|
|
230
|
+
if (!addEncodedBytes(tagGraphStringBytes(JSON.stringify(current.value)), current.path)) {
|
|
231
|
+
return;
|
|
232
|
+
}
|
|
233
|
+
continue;
|
|
234
|
+
}
|
|
235
|
+
if (current.value === null) {
|
|
236
|
+
if (!addEncodedBytes(4, current.path))
|
|
237
|
+
return;
|
|
238
|
+
continue;
|
|
239
|
+
}
|
|
240
|
+
if (current.value === undefined) {
|
|
241
|
+
// Template expansion can retain optional object properties as undefined.
|
|
242
|
+
// JSON omits them from objects (and encodes them as null in arrays), so
|
|
243
|
+
// counting four bytes is a safe upper bound without rejecting the graph.
|
|
244
|
+
if (!addEncodedBytes(4, current.path))
|
|
245
|
+
return;
|
|
246
|
+
continue;
|
|
247
|
+
}
|
|
248
|
+
if (typeof current.value !== "object") {
|
|
249
|
+
let encoded;
|
|
250
|
+
try {
|
|
251
|
+
encoded = JSON.stringify(current.value);
|
|
252
|
+
}
|
|
253
|
+
catch {
|
|
254
|
+
encoded = undefined;
|
|
255
|
+
}
|
|
256
|
+
if (encoded === undefined) {
|
|
257
|
+
ctx.addIssue({
|
|
258
|
+
code: "custom",
|
|
259
|
+
message: "Tag graph values must be serializable as JSON.",
|
|
260
|
+
path: current.path,
|
|
261
|
+
});
|
|
262
|
+
return;
|
|
263
|
+
}
|
|
264
|
+
if (!addEncodedBytes(tagGraphStringBytes(encoded), current.path))
|
|
265
|
+
return;
|
|
266
|
+
continue;
|
|
267
|
+
}
|
|
268
|
+
if (current.depth >= TAG_GRAPH_MAX_DEPTH) {
|
|
269
|
+
ctx.addIssue({
|
|
270
|
+
code: "custom",
|
|
271
|
+
message: `Tag graph values must not exceed ${TAG_GRAPH_MAX_DEPTH} levels.`,
|
|
272
|
+
path: current.path,
|
|
273
|
+
});
|
|
274
|
+
return;
|
|
275
|
+
}
|
|
276
|
+
if (Array.isArray(current.value)) {
|
|
277
|
+
if (current.value.length > TAG_GRAPH_MAX_ARRAY_ITEMS) {
|
|
278
|
+
ctx.addIssue({
|
|
279
|
+
code: "custom",
|
|
280
|
+
message: `Tag graph arrays must not exceed ${TAG_GRAPH_MAX_ARRAY_ITEMS} items.`,
|
|
281
|
+
path: current.path,
|
|
282
|
+
});
|
|
283
|
+
return;
|
|
284
|
+
}
|
|
285
|
+
if (!addEncodedBytes(2 + Math.max(0, current.value.length - 1), current.path)) {
|
|
286
|
+
return;
|
|
287
|
+
}
|
|
288
|
+
for (const [index, item] of current.value.entries()) {
|
|
289
|
+
pending.push({ value: item, path: [...current.path, index], depth: current.depth + 1 });
|
|
290
|
+
}
|
|
291
|
+
continue;
|
|
292
|
+
}
|
|
293
|
+
const prototype = Object.getPrototypeOf(current.value);
|
|
294
|
+
if (prototype !== Object.prototype && prototype !== null) {
|
|
295
|
+
ctx.addIssue({
|
|
296
|
+
code: "custom",
|
|
297
|
+
message: "Tag graph values must be plain JSON objects.",
|
|
298
|
+
path: current.path,
|
|
299
|
+
});
|
|
300
|
+
return;
|
|
301
|
+
}
|
|
302
|
+
const entries = Object.entries(current.value);
|
|
303
|
+
if (entries.length > TAG_GRAPH_MAX_OBJECT_KEYS) {
|
|
304
|
+
ctx.addIssue({
|
|
305
|
+
code: "custom",
|
|
306
|
+
message: `Tag graph objects must not exceed ${TAG_GRAPH_MAX_OBJECT_KEYS} keys.`,
|
|
307
|
+
path: current.path,
|
|
308
|
+
});
|
|
309
|
+
return;
|
|
310
|
+
}
|
|
311
|
+
if (!addEncodedBytes(2 + Math.max(0, entries.length - 1), current.path))
|
|
312
|
+
return;
|
|
313
|
+
for (const [key, item] of entries) {
|
|
314
|
+
if (tagGraphStringBytes(key) > TAG_GRAPH_MAX_STRING_BYTES) {
|
|
315
|
+
ctx.addIssue({
|
|
316
|
+
code: "custom",
|
|
317
|
+
message: `Tag graph object keys must not exceed ${TAG_GRAPH_MAX_STRING_BYTES} bytes.`,
|
|
318
|
+
path: [...current.path, key],
|
|
319
|
+
});
|
|
320
|
+
return;
|
|
321
|
+
}
|
|
322
|
+
if (!addEncodedBytes(tagGraphStringBytes(JSON.stringify(key)) + 1, [...current.path, key])) {
|
|
323
|
+
return;
|
|
324
|
+
}
|
|
325
|
+
pending.push({ value: item, path: [...current.path, key], depth: current.depth + 1 });
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
}
|
|
187
329
|
export const tagGraphSchema = z
|
|
188
330
|
.object({
|
|
189
331
|
format: z.literal("spacefast.tag_graph.v1").default("spacefast.tag_graph.v1"),
|
|
@@ -194,6 +336,28 @@ export const tagGraphSchema = z
|
|
|
194
336
|
consentPolicy: z.record(z.string(), z.unknown()).optional(),
|
|
195
337
|
})
|
|
196
338
|
.passthrough();
|
|
339
|
+
const tagGraphBudgetedShape = {
|
|
340
|
+
format: z.literal("spacefast.tag_graph.v1").default("spacefast.tag_graph.v1"),
|
|
341
|
+
tags: z.array(z.record(z.string(), z.unknown())).max(TAG_GRAPH_MAX_TAGS).default([]),
|
|
342
|
+
triggers: z.array(z.record(z.string(), z.unknown())).max(TAG_GRAPH_MAX_TRIGGERS).default([]),
|
|
343
|
+
variables: z.array(z.record(z.string(), z.unknown())).max(TAG_GRAPH_MAX_VARIABLES).default([]),
|
|
344
|
+
systemModules: z
|
|
345
|
+
.record(z.string(), z.unknown())
|
|
346
|
+
.refine((modules) => Object.keys(modules).length <= TAG_GRAPH_MAX_SYSTEM_MODULES, {
|
|
347
|
+
message: `Tag graph systemModules must not exceed ${TAG_GRAPH_MAX_SYSTEM_MODULES} entries.`,
|
|
348
|
+
})
|
|
349
|
+
.default({}),
|
|
350
|
+
consentPolicy: z.record(z.string(), z.unknown()).optional(),
|
|
351
|
+
};
|
|
352
|
+
export const tagGraphCloneSchema = z
|
|
353
|
+
.object(tagGraphBudgetedShape)
|
|
354
|
+
.passthrough()
|
|
355
|
+
.superRefine(refineTagGraphBudget);
|
|
356
|
+
export const tagGraphWriteSchema = z
|
|
357
|
+
.object(tagGraphBudgetedShape)
|
|
358
|
+
.strict()
|
|
359
|
+
.superRefine(refineTagGraphBudget)
|
|
360
|
+
.describe(`Tag graph v1 write input. The server enforces a maximum of ${TAG_GRAPH_MAX_ENCODED_BYTES} encoded bytes, ${TAG_GRAPH_MAX_TAGS} tags, ${TAG_GRAPH_MAX_TRIGGERS} triggers, ${TAG_GRAPH_MAX_VARIABLES} variables, ${TAG_GRAPH_MAX_SYSTEM_MODULES} system modules, ${TAG_GRAPH_MAX_ARRAY_ITEMS} items per nested array, ${TAG_GRAPH_MAX_OBJECT_KEYS} keys per object, ${TAG_GRAPH_MAX_STRING_BYTES} encoded bytes per string, and ${TAG_GRAPH_MAX_DEPTH} nested levels. Unknown top-level fields are rejected.`);
|
|
197
361
|
export const emptyTagGraph = {
|
|
198
362
|
format: "spacefast.tag_graph.v1",
|
|
199
363
|
tags: [],
|
|
@@ -239,7 +403,7 @@ export const tagVersionCreateSchema = z.object({
|
|
|
239
403
|
title: z.string().trim().min(1).max(255).default("Draft tag version"),
|
|
240
404
|
description: z.string().trim().max(4_000).nullable().optional(),
|
|
241
405
|
baseVersionId: z.string().trim().min(1).nullable().optional(),
|
|
242
|
-
graph:
|
|
406
|
+
graph: tagGraphWriteSchema.optional(),
|
|
243
407
|
});
|
|
244
408
|
export const tagVersionPatchSchema = z.object({
|
|
245
409
|
title: z.string().trim().min(1).max(255).optional(),
|
|
@@ -251,7 +415,7 @@ export const tagGraphResponseSchema = dataEnvelope(z.object({
|
|
|
251
415
|
graphRevision: z.number().int().positive(),
|
|
252
416
|
}));
|
|
253
417
|
export const tagGraphPutSchema = z.object({
|
|
254
|
-
graph:
|
|
418
|
+
graph: tagGraphWriteSchema,
|
|
255
419
|
});
|
|
256
420
|
export const tagGraphPatchSchema = z.object({
|
|
257
421
|
baseGraphRevision: z.number().int().positive(),
|
|
@@ -259,7 +423,7 @@ export const tagGraphPatchSchema = z.object({
|
|
|
259
423
|
.array(z.object({
|
|
260
424
|
op: z.enum(["replace"]),
|
|
261
425
|
path: z.enum(["graph"]),
|
|
262
|
-
value:
|
|
426
|
+
value: tagGraphWriteSchema,
|
|
263
427
|
}))
|
|
264
428
|
.length(1),
|
|
265
429
|
});
|
|
@@ -378,13 +542,18 @@ export const tagPreviewSessionCreateSchema = z.object({
|
|
|
378
542
|
environment: tagEnvironmentSchema.default("production"),
|
|
379
543
|
});
|
|
380
544
|
export const tagDebugSessionCreateSchema = tagPreviewSessionCreateSchema;
|
|
381
|
-
|
|
545
|
+
const TAG_TRIGGER_PRESET_VALUES = [
|
|
382
546
|
"page_view",
|
|
383
547
|
"outbound_click",
|
|
384
548
|
"form_submit",
|
|
385
549
|
"file_download",
|
|
386
550
|
"scroll_depth",
|
|
387
|
-
]
|
|
551
|
+
];
|
|
552
|
+
export const tagTriggerPresetSchema = z.enum(TAG_TRIGGER_PRESET_VALUES);
|
|
553
|
+
export const TAG_TEMPLATE_MAX_SELECTIONS = TAG_GRAPH_MAX_TAGS;
|
|
554
|
+
export const TAG_TEMPLATE_MAX_TRIGGERS = TAG_TRIGGER_PRESET_VALUES.length;
|
|
555
|
+
export const TAG_TEMPLATE_MAX_CONSENT_CATEGORIES = tagConsentCategorySchema.options.length;
|
|
556
|
+
export const TAG_TEMPLATE_MAX_ENVIRONMENTS = tagEnvironmentSchema.options.length;
|
|
388
557
|
export const TAG_TRIGGER_PRESETS = [
|
|
389
558
|
{
|
|
390
559
|
id: "page_view",
|
|
@@ -459,9 +628,18 @@ export const tagTemplateSelectionSchema = z.object({
|
|
|
459
628
|
name: z.string().trim().min(1).max(160).optional(),
|
|
460
629
|
enabled: z.boolean().default(true),
|
|
461
630
|
config: z.record(z.string(), z.unknown()).default({}),
|
|
462
|
-
triggers: z
|
|
463
|
-
|
|
464
|
-
|
|
631
|
+
triggers: z
|
|
632
|
+
.array(tagTriggerPresetSchema)
|
|
633
|
+
.max(TAG_TEMPLATE_MAX_TRIGGERS)
|
|
634
|
+
.refine((triggers) => new Set(triggers).size === triggers.length, {
|
|
635
|
+
message: "Tag template triggers must be unique.",
|
|
636
|
+
})
|
|
637
|
+
.optional(),
|
|
638
|
+
consentCategories: z
|
|
639
|
+
.array(tagConsentCategorySchema)
|
|
640
|
+
.max(TAG_TEMPLATE_MAX_CONSENT_CATEGORIES)
|
|
641
|
+
.optional(),
|
|
642
|
+
environments: z.array(tagEnvironmentSchema).max(TAG_TEMPLATE_MAX_ENVIRONMENTS).optional(),
|
|
465
643
|
schedule: z
|
|
466
644
|
.object({
|
|
467
645
|
activeFrom: z.string().trim().min(1).optional(),
|
|
@@ -485,9 +663,15 @@ export const tagConsentPolicyResponseSchema = dataEnvelope(z.object({
|
|
|
485
663
|
policy: tagConsentPolicySchema,
|
|
486
664
|
}));
|
|
487
665
|
export const tagTemplateGraphSchema = z.object({
|
|
488
|
-
templates: z.array(tagTemplateSelectionSchema).default([]),
|
|
489
|
-
eventPresets: z
|
|
490
|
-
|
|
666
|
+
templates: z.array(tagTemplateSelectionSchema).max(TAG_TEMPLATE_MAX_SELECTIONS).default([]),
|
|
667
|
+
eventPresets: z
|
|
668
|
+
.array(tagTriggerPresetSchema)
|
|
669
|
+
.max(TAG_TEMPLATE_MAX_TRIGGERS)
|
|
670
|
+
.refine((presets) => new Set(presets).size === presets.length, {
|
|
671
|
+
message: "Tag event presets must be unique.",
|
|
672
|
+
})
|
|
673
|
+
.default([]),
|
|
674
|
+
graph: tagGraphWriteSchema.optional(),
|
|
491
675
|
});
|
|
492
676
|
const TAG_TEMPLATE_DEFINITION_INPUTS = [
|
|
493
677
|
{
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
export declare const TEAM_ROLE_VALUES: readonly ["owner", "admin", "member"];
|
|
3
3
|
export declare const teamMemberRole: z.ZodEnum<{
|
|
4
|
-
admin: "admin";
|
|
5
4
|
owner: "owner";
|
|
5
|
+
admin: "admin";
|
|
6
6
|
member: "member";
|
|
7
7
|
}>;
|
|
8
8
|
export declare const teamInvitationCreateSchema: z.ZodObject<{
|
|
9
9
|
email: z.ZodString;
|
|
10
10
|
role: z.ZodDefault<z.ZodEnum<{
|
|
11
|
-
admin: "admin";
|
|
12
11
|
owner: "owner";
|
|
12
|
+
admin: "admin";
|
|
13
13
|
member: "member";
|
|
14
14
|
}>>;
|
|
15
15
|
}, z.core.$strip>;
|
|
@@ -34,8 +34,8 @@ export declare const TeamInvitationSchema: z.ZodObject<{
|
|
|
34
34
|
teamId: z.ZodString;
|
|
35
35
|
email: z.ZodString;
|
|
36
36
|
role: z.ZodEnum<{
|
|
37
|
-
admin: "admin";
|
|
38
37
|
owner: "owner";
|
|
38
|
+
admin: "admin";
|
|
39
39
|
member: "member";
|
|
40
40
|
}>;
|
|
41
41
|
status: z.ZodString;
|
|
@@ -55,8 +55,8 @@ export declare const TeamSummarySchema: z.ZodObject<{
|
|
|
55
55
|
name: z.ZodString;
|
|
56
56
|
slug: z.ZodString;
|
|
57
57
|
role: z.ZodEnum<{
|
|
58
|
-
admin: "admin";
|
|
59
58
|
owner: "owner";
|
|
59
|
+
admin: "admin";
|
|
60
60
|
member: "member";
|
|
61
61
|
}>;
|
|
62
62
|
plan: z.ZodEnum<{
|
|
@@ -76,8 +76,8 @@ export declare const TeamDetailSchema: z.ZodObject<{
|
|
|
76
76
|
name: z.ZodString;
|
|
77
77
|
slug: z.ZodString;
|
|
78
78
|
role: z.ZodEnum<{
|
|
79
|
-
admin: "admin";
|
|
80
79
|
owner: "owner";
|
|
80
|
+
admin: "admin";
|
|
81
81
|
member: "member";
|
|
82
82
|
}>;
|
|
83
83
|
plan: z.ZodEnum<{
|
|
@@ -101,8 +101,8 @@ export declare const teamListResponseSchema: z.ZodObject<{
|
|
|
101
101
|
name: z.ZodString;
|
|
102
102
|
slug: z.ZodString;
|
|
103
103
|
role: z.ZodEnum<{
|
|
104
|
-
admin: "admin";
|
|
105
104
|
owner: "owner";
|
|
105
|
+
admin: "admin";
|
|
106
106
|
member: "member";
|
|
107
107
|
}>;
|
|
108
108
|
plan: z.ZodEnum<{
|
|
@@ -127,8 +127,8 @@ export declare const teamMemberListResponseSchema: z.ZodObject<{
|
|
|
127
127
|
teamId: z.ZodString;
|
|
128
128
|
userId: z.ZodString;
|
|
129
129
|
role: z.ZodEnum<{
|
|
130
|
-
admin: "admin";
|
|
131
130
|
owner: "owner";
|
|
131
|
+
admin: "admin";
|
|
132
132
|
member: "member";
|
|
133
133
|
}>;
|
|
134
134
|
createdAt: z.ZodString;
|
|
@@ -160,8 +160,8 @@ export declare const teamInvitationAcceptResponseSchema: z.ZodObject<{
|
|
|
160
160
|
teamSlug: z.ZodString;
|
|
161
161
|
userId: z.ZodString;
|
|
162
162
|
role: z.ZodEnum<{
|
|
163
|
-
admin: "admin";
|
|
164
163
|
owner: "owner";
|
|
164
|
+
admin: "admin";
|
|
165
165
|
member: "member";
|
|
166
166
|
}>;
|
|
167
167
|
}, z.core.$strip>;
|
|
@@ -172,8 +172,8 @@ export declare const teamInvitationListResponseSchema: z.ZodObject<{
|
|
|
172
172
|
teamId: z.ZodString;
|
|
173
173
|
email: z.ZodString;
|
|
174
174
|
role: z.ZodEnum<{
|
|
175
|
-
admin: "admin";
|
|
176
175
|
owner: "owner";
|
|
176
|
+
admin: "admin";
|
|
177
177
|
member: "member";
|
|
178
178
|
}>;
|
|
179
179
|
status: z.ZodString;
|
|
@@ -44,7 +44,6 @@ export declare const spaceTransferSchema: z.ZodObject<{
|
|
|
44
44
|
tenantId: z.ZodString;
|
|
45
45
|
}, z.core.$strip>;
|
|
46
46
|
status: z.ZodEnum<{
|
|
47
|
-
moving: "moving";
|
|
48
47
|
pending_confirmation: "pending_confirmation";
|
|
49
48
|
confirming_domains: "confirming_domains";
|
|
50
49
|
completed: "completed";
|
|
@@ -84,8 +83,8 @@ export declare const spaceTransferSchema: z.ZodObject<{
|
|
|
84
83
|
code: z.ZodString;
|
|
85
84
|
severity: z.ZodEnum<{
|
|
86
85
|
info: "info";
|
|
87
|
-
warning: "warning";
|
|
88
86
|
error: "error";
|
|
87
|
+
warning: "warning";
|
|
89
88
|
}>;
|
|
90
89
|
message: z.ZodString;
|
|
91
90
|
path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -31,12 +31,12 @@ export declare const SystemVariableSchema: z.ZodObject<{
|
|
|
31
31
|
export declare const variableUpsertSchema: z.ZodObject<{
|
|
32
32
|
name: z.ZodString;
|
|
33
33
|
value: z.ZodString;
|
|
34
|
-
secret: z.
|
|
34
|
+
secret: z.ZodBoolean;
|
|
35
35
|
channelValues: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
36
36
|
}, z.core.$strip>;
|
|
37
37
|
export declare const variableValueUpsertSchema: z.ZodObject<{
|
|
38
38
|
value: z.ZodString;
|
|
39
|
-
secret: z.
|
|
39
|
+
secret: z.ZodBoolean;
|
|
40
40
|
channelValues: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
41
41
|
}, z.core.$strip>;
|
|
42
42
|
export declare const variableListQuerySchema: z.ZodObject<{
|
|
@@ -122,8 +122,8 @@ export declare const variableMutationResponseSchema: z.ZodObject<{
|
|
|
122
122
|
code: z.ZodString;
|
|
123
123
|
severity: z.ZodEnum<{
|
|
124
124
|
info: "info";
|
|
125
|
-
warning: "warning";
|
|
126
125
|
error: "error";
|
|
126
|
+
warning: "warning";
|
|
127
127
|
}>;
|
|
128
128
|
message: z.ZodString;
|
|
129
129
|
path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -166,8 +166,8 @@ export declare const variableDeleteResponseSchema: z.ZodObject<{
|
|
|
166
166
|
code: z.ZodString;
|
|
167
167
|
severity: z.ZodEnum<{
|
|
168
168
|
info: "info";
|
|
169
|
-
warning: "warning";
|
|
170
169
|
error: "error";
|
|
170
|
+
warning: "warning";
|
|
171
171
|
}>;
|
|
172
172
|
message: z.ZodString;
|
|
173
173
|
path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -29,8 +29,9 @@ export const VariableSchema = z.object({
|
|
|
29
29
|
});
|
|
30
30
|
// Version provenance (internal-docs/platform.md "Variable rules"): versions
|
|
31
31
|
// record which variable names and value hashes they were finalized with —
|
|
32
|
-
// never values. Stored
|
|
33
|
-
// the
|
|
32
|
+
// never values. Stored only for internal cascade and synchronization; it is
|
|
33
|
+
// never echoed on the public Version resource because historical rows cannot
|
|
34
|
+
// distinguish sealed-value hashes safely.
|
|
34
35
|
export const variableProvenanceSchema = z
|
|
35
36
|
.array(z.object({
|
|
36
37
|
name: z.string().describe("Variable name the version was finalized with."),
|
|
@@ -49,7 +50,7 @@ export const SystemVariableSchema = z.object({
|
|
|
49
50
|
export const variableUpsertSchema = z.object({
|
|
50
51
|
name: variableNameSchema,
|
|
51
52
|
value: z.string().min(1),
|
|
52
|
-
secret: z.boolean().
|
|
53
|
+
secret: z.boolean().describe("Whether the value is write-only."),
|
|
53
54
|
channelValues: z.record(z.string(), z.string()).optional(),
|
|
54
55
|
});
|
|
55
56
|
export const variableValueUpsertSchema = variableUpsertSchema.omit({ name: true });
|
|
@@ -94,8 +94,8 @@ export declare const webhookDeliverySchema: z.ZodObject<{
|
|
|
94
94
|
code: z.ZodString;
|
|
95
95
|
severity: z.ZodEnum<{
|
|
96
96
|
info: "info";
|
|
97
|
-
warning: "warning";
|
|
98
97
|
error: "error";
|
|
98
|
+
warning: "warning";
|
|
99
99
|
}>;
|
|
100
100
|
message: z.ZodString;
|
|
101
101
|
path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -135,8 +135,8 @@ export declare const webhookDeliveryListResponseSchema: z.ZodObject<{
|
|
|
135
135
|
code: z.ZodString;
|
|
136
136
|
severity: z.ZodEnum<{
|
|
137
137
|
info: "info";
|
|
138
|
-
warning: "warning";
|
|
139
138
|
error: "error";
|
|
139
|
+
warning: "warning";
|
|
140
140
|
}>;
|
|
141
141
|
message: z.ZodString;
|
|
142
142
|
path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|