@sanity/functions 1.11.0 → 1.11.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.
package/dist/types/context.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { InvokeCallback } from './invocation.js';
|
|
1
|
+
import type { InvokeCallback, InvokedBy } from './invocation.js';
|
|
2
2
|
import type { ResourcesApi } from './resources.js';
|
|
3
3
|
/**
|
|
4
4
|
* The context object passed to the function handler.
|
|
@@ -12,6 +12,8 @@ export interface FunctionContext {
|
|
|
12
12
|
functionResourceType: string;
|
|
13
13
|
/** The resource ID of the function container; resource ID that houses the function. */
|
|
14
14
|
functionResourceId: string;
|
|
15
|
+
/** Optional info on the invoker of the function */
|
|
16
|
+
invokedBy?: InvokedBy;
|
|
15
17
|
/** Sanity lineage token */
|
|
16
18
|
lineage?: string | undefined;
|
|
17
19
|
/**
|
package/package.json
CHANGED
package/src/types/context.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {InvokeCallback} from './invocation.js'
|
|
1
|
+
import type {InvokeCallback, InvokedBy} from './invocation.js'
|
|
2
2
|
import type {ResourcesApi} from './resources.js'
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -13,6 +13,8 @@ export interface FunctionContext {
|
|
|
13
13
|
functionResourceType: string
|
|
14
14
|
/** The resource ID of the function container; resource ID that houses the function. */
|
|
15
15
|
functionResourceId: string
|
|
16
|
+
/** Optional info on the invoker of the function */
|
|
17
|
+
invokedBy?: InvokedBy
|
|
16
18
|
/** Sanity lineage token */
|
|
17
19
|
lineage?: string | undefined
|
|
18
20
|
/**
|
package/src/types/invocation.ts
CHANGED