@sanity/blueprints 0.23.1 → 0.23.3

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 (37) hide show
  1. package/dist/definers/functions/durable.d.ts +26 -0
  2. package/dist/definers/functions/{pipeline.js → durable.js} +9 -9
  3. package/dist/definers/functions/durable.js.map +1 -0
  4. package/dist/definers/functions/pubsub.d.ts +18 -0
  5. package/dist/definers/functions/pubsub.js +28 -0
  6. package/dist/definers/functions/pubsub.js.map +1 -0
  7. package/dist/definers/studios.js +5 -0
  8. package/dist/definers/studios.js.map +1 -1
  9. package/dist/index.d.ts +2 -2
  10. package/dist/index.js +2 -2
  11. package/dist/index.js.map +1 -1
  12. package/dist/types/functions/event.d.ts +2 -4
  13. package/dist/types/functions/index.d.ts +17 -27
  14. package/dist/types/studios.d.ts +36 -7
  15. package/dist/types/studios.js +7 -1
  16. package/dist/types/studios.js.map +1 -1
  17. package/dist/validation/functions.d.ts +4 -7
  18. package/dist/validation/functions.js +12 -17
  19. package/dist/validation/functions.js.map +1 -1
  20. package/dist/validation/studios.js +29 -5
  21. package/dist/validation/studios.js.map +1 -1
  22. package/package.json +1 -1
  23. package/src/definers/functions/{pipeline.ts → durable.ts} +9 -9
  24. package/src/definers/functions/pubsub.ts +30 -0
  25. package/src/definers/studios.ts +5 -0
  26. package/src/index.ts +2 -2
  27. package/src/types/functions/event.ts +2 -3
  28. package/src/types/functions/index.ts +17 -27
  29. package/src/types/studios.ts +46 -8
  30. package/src/validation/functions.ts +12 -17
  31. package/src/validation/studios.ts +33 -6
  32. package/dist/definers/functions/event.d.ts +0 -20
  33. package/dist/definers/functions/event.js +0 -30
  34. package/dist/definers/functions/event.js.map +0 -1
  35. package/dist/definers/functions/pipeline.d.ts +0 -26
  36. package/dist/definers/functions/pipeline.js.map +0 -1
  37. package/src/definers/functions/event.ts +0 -32
@@ -1,32 +0,0 @@
1
- import {type BlueprintEventFunctionConfig, type BlueprintEventFunctionResource, validateEventFunction} from '../../index.js'
2
- import {runValidation} from '../../utils/validation.js'
3
- import {defineFunction} from './index.js'
4
-
5
- /**
6
- * Defines a function that provide event behaviour.
7
- *
8
- * @remarks
9
- * A barebones event function
10
- * ```ts
11
- * defineEventFunction({
12
- * name: 'send-email',
13
- * })
14
- * ```
15
- * @public
16
- * @alpha Deploying Event Functions via Blueprints is experimental. This feature is not available publicly yet.
17
- * @hidden
18
- * @category Definers
19
- * @expandType BlueprintEventFunctionConfig
20
- * @param functionConfig The configuration for the event function
21
- * @returns The validated event function resource
22
- */
23
- export function defineEventFunction(functionConfig: BlueprintEventFunctionConfig): BlueprintEventFunctionResource {
24
- const functionResource: BlueprintEventFunctionResource = {
25
- ...defineFunction(functionConfig, {skipValidation: true}),
26
- type: 'sanity.function.event',
27
- }
28
-
29
- runValidation(() => validateEventFunction(functionResource))
30
-
31
- return functionResource
32
- }