@sanity/functions 1.7.1 → 1.7.2

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.
@@ -204,20 +204,20 @@ export type DurableOperations = {
204
204
  * // my-durable-function/index.ts
205
205
  * createDurable(({step, context}) => {
206
206
  * // With a function name
207
- * step.delegate({name: 'my-function', handler: 'my-delegated-function', input: {}})
207
+ * step.delegate({name: 'my-function', handler: 'my-delegated-function', event: {data: {hello: 'world'}}})
208
208
  * // With a resource object
209
- * step.delegate({name: 'another-function', handler: context.resource.function('my-resource'), input: {}})
209
+ * step.delegate({name: 'another-function', handler: context.resource.function('my-resource'), event: {data: {hello: 'world'}}})
210
210
  * })
211
211
  * ```
212
212
  * @param name - Step name
213
213
  * @param handler - Function to be invoked
214
- * @param input - Data passed to the called function
214
+ * @param event - Data passed to the called function
215
215
  * @returns The value returned by the called function
216
216
  */
217
- delegate<T>({ name, handler, input, }: {
217
+ delegate<T>({ name, handler, event, }: {
218
218
  name?: string;
219
219
  handler: string | BlueprintResource<`sanity.function.${string}`>;
220
- input?: unknown;
220
+ event?: unknown;
221
221
  }): Promise<T>;
222
222
  /**
223
223
  * Waits for an external callback
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sanity/functions",
3
- "version": "1.7.1",
3
+ "version": "1.7.2",
4
4
  "description": "Helper methods and type definitions for Sanity Functions",
5
5
  "keywords": [
6
6
  "sanity",
@@ -37,7 +37,7 @@
37
37
  "scripts": {
38
38
  "build": "rimraf dist .tsbuildinfo && tsc",
39
39
  "coverage": "vitest --coverage",
40
- "docs:typedoc": "typedoc --options typedoc.json",
40
+ "docs:typedoc": "npx -y -p typescript@6 -p typedoc@0.28.20 typedoc --options typedoc.json",
41
41
  "docs:watch": "npm run docs:typedoc && open ./docs/html/index.html && npm run docs:typedoc -- --watch",
42
42
  "lint": "biome check .",
43
43
  "lint:write": "biome check --write .",
@@ -60,8 +60,7 @@
60
60
  "@types/node": "^22",
61
61
  "@vitest/coverage-v8": "4.1.10",
62
62
  "rimraf": "^6.1.2",
63
- "typedoc": "^0.28.16",
64
- "typescript": "^6.0.3",
63
+ "typescript": "^7.0.2",
65
64
  "vitest": "4.1.10"
66
65
  },
67
66
  "engines": {
@@ -76,5 +75,8 @@
76
75
  "@aws-lite/lambda": "^0.1.5",
77
76
  "@aws-lite/sns": "^0.0.8",
78
77
  "@aws-lite/sqs": "^0.2.4"
78
+ },
79
+ "allowScripts": {
80
+ "fsevents@2.3.3": true
79
81
  }
80
82
  }
@@ -201,24 +201,24 @@ export type DurableOperations = {
201
201
  * // my-durable-function/index.ts
202
202
  * createDurable(({step, context}) => {
203
203
  * // With a function name
204
- * step.delegate({name: 'my-function', handler: 'my-delegated-function', input: {}})
204
+ * step.delegate({name: 'my-function', handler: 'my-delegated-function', event: {data: {hello: 'world'}}})
205
205
  * // With a resource object
206
- * step.delegate({name: 'another-function', handler: context.resource.function('my-resource'), input: {}})
206
+ * step.delegate({name: 'another-function', handler: context.resource.function('my-resource'), event: {data: {hello: 'world'}}})
207
207
  * })
208
208
  * ```
209
209
  * @param name - Step name
210
210
  * @param handler - Function to be invoked
211
- * @param input - Data passed to the called function
211
+ * @param event - Data passed to the called function
212
212
  * @returns The value returned by the called function
213
213
  */
214
214
  delegate<T>({
215
215
  name,
216
216
  handler,
217
- input,
217
+ event,
218
218
  }: {
219
219
  name?: string
220
220
  handler: string | BlueprintResource<`sanity.function.${string}`>
221
- input?: unknown
221
+ event?: unknown
222
222
  }): Promise<T>
223
223
 
224
224
  /**