@sanity/blueprints 0.22.0 → 0.23.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. package/README.md +1 -0
  2. package/dist/definers/functions/base-event.d.ts +2 -0
  3. package/dist/definers/functions/base-event.js +2 -0
  4. package/dist/definers/functions/base-event.js.map +1 -0
  5. package/dist/definers/functions/document.d.ts +26 -0
  6. package/dist/definers/functions/document.js +43 -0
  7. package/dist/definers/functions/document.js.map +1 -0
  8. package/dist/definers/functions/event.d.ts +20 -0
  9. package/dist/definers/functions/event.js +30 -0
  10. package/dist/definers/functions/event.js.map +1 -0
  11. package/dist/definers/functions/index.d.ts +15 -0
  12. package/dist/definers/functions/index.js +34 -0
  13. package/dist/definers/functions/index.js.map +1 -0
  14. package/dist/definers/functions/media-library.d.ts +23 -0
  15. package/dist/definers/functions/media-library.js +83 -0
  16. package/dist/definers/functions/media-library.js.map +1 -0
  17. package/dist/definers/functions/pipeline.d.ts +26 -0
  18. package/dist/definers/functions/pipeline.js +41 -0
  19. package/dist/definers/functions/pipeline.js.map +1 -0
  20. package/dist/definers/functions/queue.d.ts +30 -0
  21. package/dist/definers/functions/queue.js +47 -0
  22. package/dist/definers/functions/queue.js.map +1 -0
  23. package/dist/definers/functions/scheduled.d.ts +46 -0
  24. package/dist/definers/functions/scheduled.js +91 -0
  25. package/dist/definers/functions/scheduled.js.map +1 -0
  26. package/dist/definers/functions/sync-tag-invalidate.d.ts +31 -0
  27. package/dist/definers/functions/sync-tag-invalidate.js +43 -0
  28. package/dist/definers/functions/sync-tag-invalidate.js.map +1 -0
  29. package/dist/definers/studios.d.ts +22 -0
  30. package/dist/definers/studios.js +31 -0
  31. package/dist/definers/studios.js.map +1 -0
  32. package/dist/index.d.ts +11 -1
  33. package/dist/index.js +11 -1
  34. package/dist/index.js.map +1 -1
  35. package/dist/types/functions/event.d.ts +9 -26
  36. package/dist/types/functions/index.d.ts +64 -47
  37. package/dist/types/functions/index.js.map +1 -1
  38. package/dist/types/studios.d.ts +57 -0
  39. package/dist/types/studios.js +2 -0
  40. package/dist/types/studios.js.map +1 -0
  41. package/dist/validation/functions.d.ts +10 -1
  42. package/dist/validation/functions.js +91 -19
  43. package/dist/validation/functions.js.map +1 -1
  44. package/dist/validation/studios.d.ts +9 -0
  45. package/dist/validation/studios.js +70 -0
  46. package/dist/validation/studios.js.map +1 -0
  47. package/package.json +19 -9
  48. package/src/definers/functions/base-event.ts +4 -0
  49. package/src/definers/functions/document.ts +129 -0
  50. package/src/definers/functions/event.ts +32 -0
  51. package/src/definers/functions/index.ts +39 -0
  52. package/src/definers/functions/media-library.ts +98 -0
  53. package/src/definers/functions/pipeline.ts +42 -0
  54. package/src/definers/functions/queue.ts +49 -0
  55. package/src/definers/functions/scheduled.ts +112 -0
  56. package/src/definers/functions/sync-tag-invalidate.ts +51 -0
  57. package/src/definers/studios.ts +34 -0
  58. package/src/index.ts +11 -1
  59. package/src/types/functions/event.ts +4 -31
  60. package/src/types/functions/index.ts +75 -57
  61. package/src/types/studios.ts +68 -0
  62. package/src/validation/functions.ts +98 -21
  63. package/src/validation/studios.ts +76 -0
  64. package/dist/definers/functions.d.ts +0 -195
  65. package/dist/definers/functions.js +0 -368
  66. package/dist/definers/functions.js.map +0 -1
  67. package/src/definers/functions.ts +0 -526
@@ -1,368 +0,0 @@
1
- import { validateDocumentFunction, validateEventFunction, validateFunction, validateMediaLibraryAssetFunction, validateQueueFunction, validateScheduledFunction, validateSyncTagInvalidateFunction, } from '../index.js';
2
- import { parseScheduledExpression } from '../utils/schedule-parser.js';
3
- import { runValidation } from '../utils/validation.js';
4
- const BASE_EVENT_KEYS = new Set(['on', 'filter', 'projection', 'includeDrafts']);
5
- const DOCUMENT_EVENT_KEYS = new Set(['includeAllVersions', 'resource', ...BASE_EVENT_KEYS.values()]);
6
- const MEDIA_LIBRARY_EVENT_KEYS = new Set(['resource', ...BASE_EVENT_KEYS.values()]);
7
- const SCHEDULED_EVENT_KEYS = new Set(['minute', 'hour', 'dayOfWeek', 'month', 'dayOfMonth', 'expression']);
8
- const QUEUE_EVENT_KEYS = new Set(['concurrency', 'fifo', 'dlq']);
9
- export function defineDocumentFunction(functionConfig) {
10
- let { name, src, event, timeout, memory, env, robotToken, project, runtime, ...maybeEvent } = functionConfig;
11
- // event validation and normalization
12
- if (event) {
13
- // `event` was specified, but event keys (aggregated in `maybeEvent`) were also specified at the top level. ambiguous and deprecated usage.
14
- const duplicateKeys = Array.from(DOCUMENT_EVENT_KEYS).filter((key) => key in maybeEvent);
15
- if (duplicateKeys.length > 0) {
16
- throw new Error(`\`event\` properties should be specified under the \`event\` key - specifying them at the top level is deprecated. The following keys were specified at the top level: ${duplicateKeys.map((k) => `\`${k}\``).join(', ')}`);
17
- }
18
- event = buildDocumentFunctionEvent(event);
19
- }
20
- else {
21
- event = buildDocumentFunctionEvent(maybeEvent);
22
- // deprecated usage of putting event properties at the top level, warn about this.
23
- console.warn('⚠️ Deprecated usage of `defineDocumentFunction`: prefer to put `event` properties under the `event` key rather than at the top level.');
24
- }
25
- const functionResource = {
26
- ...defineFunction(functionConfig, { skipValidation: true }),
27
- type: 'sanity.function.document',
28
- event,
29
- };
30
- runValidation(() => validateDocumentFunction(functionResource));
31
- return functionResource;
32
- }
33
- /*
34
- * FUTURE example (move below @example when ready)
35
- * @example With robot token reference
36
- * ```ts
37
- * defineRobotToken({
38
- * name: 'media-robot',
39
- * memberships: [{
40
- * resourceType: 'project',
41
- * resourceId: projectId,
42
- * roleNames: ['editor'],
43
- * }],
44
- * })
45
- *
46
- * defineMediaLibraryAssetFunction({
47
- * name: 'process-uploads',
48
- * src: 'functions/process-uploads-v2',
49
- * robotToken: '$.resources.media-robot',
50
- * event: {
51
- * on: ['create', 'update'],
52
- * resource: {
53
- * type: 'media-library',
54
- * id: 'my-media-library-id',
55
- * },
56
- * filter: "type == 'image'",
57
- * projection: "{_id}",
58
- * },
59
- * env: {
60
- * CDN_BUCKET: 'my-cdn-bucket',
61
- * },
62
- * })
63
- * ```
64
- */
65
- /**
66
- * Defines a function that is triggered by media library events.
67
- *
68
- * ```ts
69
- * defineMediaLibraryAssetFunction({
70
- * name: 'my-media-library-function',
71
- * event: {
72
- * on: ['create'],
73
- * resource: {
74
- * type: 'media-library',
75
- * id: 'my-media-library-id',
76
- * },
77
- * },
78
- * })
79
- * ```
80
- * @param functionConfig The configuration for the media library asset function
81
- * @public
82
- * @category Definers
83
- * @expandType BlueprintMediaLibraryAssetFunctionConfig
84
- * @returns The validated media library asset function resource
85
- */
86
- export function defineMediaLibraryAssetFunction(functionConfig) {
87
- const { event } = functionConfig;
88
- const functionResource = {
89
- ...defineFunction(functionConfig, { skipValidation: true }),
90
- type: 'sanity.function.media-library.asset',
91
- event: buildMediaLibraryFunctionEvent(event),
92
- };
93
- runValidation(() => validateMediaLibraryAssetFunction(functionResource));
94
- return functionResource;
95
- }
96
- /**
97
- * Defines a function that is triggered on a schedule.
98
- * Supports cron expressions or natural language schedules.
99
- *
100
- * @remarks
101
- * Using a cron expression:
102
- * ```ts
103
- * defineScheduledFunction({
104
- * name: 'daily-cleanup',
105
- * event: {expression: '0 9 * * *'},
106
- * })
107
- * ```
108
- *
109
- * Using explicit cron fields:
110
- * ```ts
111
- * defineScheduledFunction({
112
- * name: 'daily-cleanup',
113
- * event: {minute: '0', hour: '9', dayOfMonth: '*', month: '*', dayOfWeek: '*'},
114
- * })
115
- * ```
116
- *
117
- * The `event.expression` field accepts standard cron expressions or natural language:
118
- * `'every 15 minutes'`, `'weekdays at 8am'`, `'fridays in the evening'`,
119
- * `'mon, wed, fri at 9am'`, `'first of the month at noon'`
120
- *
121
- * ```ts
122
- * defineScheduledFunction({
123
- * name: 'daily-cleanup',
124
- * event: {expression: 'every day at 9am'},
125
- * })
126
- * ```
127
- * @public
128
- * @alpha Deploying Scheduled Functions via Blueprints is experimental. This feature is not available publicly yet.
129
- * @hidden
130
- * @category Definers
131
- * @expandType BlueprintScheduledFunctionConfig
132
- * @param functionConfig The configuration for the scheduled function
133
- * @returns The validated scheduled function resource
134
- */
135
- export function defineScheduledFunction(functionConfig) {
136
- const { event, timezone } = functionConfig;
137
- const functionResource = {
138
- ...defineFunction(functionConfig, { skipValidation: true, scopeType: 'organization' }),
139
- type: 'sanity.function.cron',
140
- event: buildScheduledFunctionEvent(event),
141
- };
142
- if (timezone)
143
- functionResource.timezone = timezone;
144
- // Always normalize to explicit fields (minute, hour, dayOfWeek, month, dayOfMonth)
145
- if ('expression' in functionResource.event && typeof functionResource.event.expression === 'string') {
146
- const cron = parseScheduledExpression(functionResource.event.expression);
147
- functionResource.event = cronStringToExplicitEvent(cron);
148
- }
149
- runValidation(() => validateScheduledFunction(functionResource));
150
- return functionResource;
151
- }
152
- /**
153
- * @deprecated Define scheduled functions using `defineScheduledFunction` instead
154
- * @hidden
155
- */
156
- export function defineScheduleFunction(functionConfig) {
157
- return defineScheduledFunction(functionConfig);
158
- }
159
- /**
160
- * Defines a function that is triggered on a sync tag invalidate event.
161
- *
162
- * @remarks
163
- * Using implicit event scoping to all datasets in the function project:
164
- * ```ts
165
- * defineSyncTagInvalidateFunction({
166
- * name: 'bustin-caches',
167
- * })
168
- * ```
169
- *
170
- * Using explicit event scoping to a particular dataset in the function project:
171
- * ```ts
172
- * defineSyncTagInvalidateFunction({
173
- * name: 'bustin-caches',
174
- * event: {
175
- * resource: {
176
- * type: 'dataset',
177
- * id: 'myProj.myDataset',
178
- * },
179
- * },
180
- * })
181
- * ```
182
- * @public
183
- * @category Definers
184
- * @expandType BlueprintSyncTagInvalidateFunctionConfig
185
- * @param functionConfig The configuration for the sync tag invalidate function
186
- * @returns The validated sync tag invalidate function resource
187
- */
188
- export function defineSyncTagInvalidateFunction(functionConfig) {
189
- const { event } = functionConfig;
190
- const functionResource = {
191
- ...defineFunction(functionConfig, { skipValidation: true }),
192
- type: 'sanity.function.sync-tag-invalidate',
193
- ...(event?.resource ? { event } : {}),
194
- };
195
- runValidation(() => validateSyncTagInvalidateFunction(functionResource));
196
- return functionResource;
197
- }
198
- /**
199
- * Defines a function that provide queueing behaviour.
200
- *
201
- * @remarks
202
- * Using the reasonable defaults of concurrency: 1, fifo: true, and dlq: true
203
- * ```ts
204
- * defineQueueFunction({
205
- * name: 'send-email',
206
- * })
207
- * ```
208
- *
209
- * Using the reasonable defaults of concurrency: 1, fifo: true, and dlq: true
210
- * ```ts
211
- * defineQueueFunction({
212
- * name: 'bustin-caches',
213
- * queue: true,
214
- * })
215
- * ```
216
- *
217
- * Specifying a concurrency of 5
218
- * ```ts
219
- * defineQueueFunction({
220
- * name: 'bustin-caches',
221
- * queue: {
222
- * concurrency: 5,
223
- * fifo: true,
224
- * dlq: true,
225
- * },
226
- * })
227
- * ```
228
- * @public
229
- * @alpha Deploying Queue Functions via Blueprints is experimental. This feature is not available publicly yet.
230
- * @hidden
231
- * @category Definers
232
- * @expandType BlueprintQueueFunctionConfig
233
- * @param functionConfig The configuration for the queue function
234
- * @returns The validated queue function resource
235
- */
236
- export function defineQueueFunction(functionConfig) {
237
- const { queue = true } = functionConfig;
238
- const functionResource = {
239
- ...defineFunction(functionConfig, { skipValidation: true }),
240
- type: 'sanity.function.queue',
241
- event: buildQueueFunctionEvent(queue),
242
- };
243
- runValidation(() => validateQueueFunction(functionResource));
244
- return functionResource;
245
- }
246
- /**
247
- * Defines a function that provide event behaviour.
248
- *
249
- * @remarks
250
- * A barebones event function
251
- * ```ts
252
- * defineEventFunction({
253
- * name: 'send-email',
254
- * })
255
- * ```
256
- * @public
257
- * @alpha Deploying Event Functions via Blueprints is experimental. This feature is not available publicly yet.
258
- * @hidden
259
- * @category Definers
260
- * @expandType BlueprintEventFunctionConfig
261
- * @param functionConfig The configuration for the event function
262
- * @returns The validated event function resource
263
- */
264
- export function defineEventFunction(functionConfig) {
265
- const functionResource = {
266
- ...defineFunction(functionConfig, { skipValidation: true }),
267
- type: 'sanity.function.event',
268
- };
269
- runValidation(() => validateEventFunction(functionResource));
270
- return functionResource;
271
- }
272
- /**
273
- * Defines a base function resource with common properties.
274
- *
275
- * @param functionConfig The configuration for the function
276
- * @param options Optional configuration including validation options
277
- * @category Definers
278
- * @internal
279
- * @expandType BlueprintBaseFunctionConfig
280
- * @returns The validated function resource
281
- */
282
- export function defineFunction(functionConfig, options) {
283
- const { name, displayName, src, timeout, memory, env, robotToken, project, runtime, lifecycle } = functionConfig;
284
- const functionResource = {
285
- type: 'sanity.function.document',
286
- name,
287
- src: src ?? `functions/${name}`,
288
- displayName,
289
- timeout,
290
- memory,
291
- env,
292
- robotToken,
293
- runtime,
294
- };
295
- if (options?.scopeType !== 'organization' && project)
296
- functionResource.project = project;
297
- if (lifecycle)
298
- functionResource.lifecycle = lifecycle;
299
- if (options?.skipValidation !== true)
300
- runValidation(() => validateFunction(functionResource));
301
- return functionResource;
302
- }
303
- /**
304
- * Builds a document function event configuration from partial event properties.
305
- * Filters out non-event properties and applies defaults.
306
- * @param event Partial document function event configuration
307
- * @returns Complete document function event configuration
308
- */
309
- function buildDocumentFunctionEvent(event) {
310
- const cleanEvent = Object.fromEntries(Object.entries(event).filter(([key]) => DOCUMENT_EVENT_KEYS.has(key)));
311
- return {
312
- on: cleanEvent.on || ['publish'],
313
- ...cleanEvent,
314
- };
315
- }
316
- /**
317
- * Builds a media library function event configuration.
318
- * Filters out non-event properties and applies defaults.
319
- * @param event Media library function event configuration
320
- * @returns Complete media library function event configuration
321
- */
322
- function buildMediaLibraryFunctionEvent(event) {
323
- const cleanEvent = Object.fromEntries(Object.entries(event).filter(([key]) => MEDIA_LIBRARY_EVENT_KEYS.has(key)));
324
- const fullEvent = {
325
- on: cleanEvent.on || ['publish'],
326
- ...cleanEvent,
327
- };
328
- return fullEvent;
329
- }
330
- /**
331
- * Builds a scheduled function event configuration.
332
- * Filters out non-event properties. Does not parse expressions.
333
- * @param event Scheduled function event configuration
334
- * @returns Cleaned scheduled function event configuration
335
- */
336
- function buildScheduledFunctionEvent(event) {
337
- return Object.fromEntries(Object.entries(event).filter(([key]) => SCHEDULED_EVENT_KEYS.has(key)));
338
- }
339
- /**
340
- * Converts a cron expression string (minute hour dayOfMonth month dayOfWeek) to explicit event fields.
341
- * @param cron Cron string with five space-separated fields
342
- * @returns Explicit scheduled event with minute, hour, dayOfMonth, month, dayOfWeek
343
- */
344
- function cronStringToExplicitEvent(cron) {
345
- const parts = cron.trim().split(/\s+/);
346
- if (parts.length !== 5) {
347
- throw new Error(`Invalid cron string: expected 5 fields, got ${parts.length}`);
348
- }
349
- const [minute, hour, dayOfMonth, month, dayOfWeek] = parts;
350
- return { minute, hour, dayOfMonth, month, dayOfWeek };
351
- }
352
- /**
353
- * Builds a queue function event configuration.
354
- * @param event Queue function event configuration
355
- * @returns Cleaned queue function event configuration
356
- */
357
- function buildQueueFunctionEvent(event) {
358
- const defaultEvent = { concurrency: 1, fifo: true, dlq: true };
359
- if (typeof event === 'boolean') {
360
- return defaultEvent;
361
- }
362
- const userProvidedEvent = Object.fromEntries(Object.entries(event).filter(([key]) => QUEUE_EVENT_KEYS.has(key)));
363
- return {
364
- ...defaultEvent,
365
- ...userProvidedEvent,
366
- };
367
- }
368
- //# sourceMappingURL=functions.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"functions.js","sourceRoot":"","sources":["../../src/definers/functions.ts"],"names":[],"mappings":"AAAA,OAAO,EAwBL,wBAAwB,EACxB,qBAAqB,EACrB,gBAAgB,EAChB,iCAAiC,EACjC,qBAAqB,EACrB,yBAAyB,EACzB,iCAAiC,GAClC,MAAM,aAAa,CAAA;AACpB,OAAO,EAAC,wBAAwB,EAAC,MAAM,6BAA6B,CAAA;AACpE,OAAO,EAAC,aAAa,EAAC,MAAM,wBAAwB,CAAA;AAGpD,MAAM,eAAe,GAAG,IAAI,GAAG,CAAuB,CAAC,IAAI,EAAE,QAAQ,EAAE,YAAY,EAAE,eAAe,CAAC,CAAC,CAAA;AAEtG,MAAM,mBAAmB,GAAG,IAAI,GAAG,CAA2B,CAAC,oBAAoB,EAAE,UAAU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