@tailor-platform/function-types 0.8.4 → 0.8.5
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/CHANGELOG.md +6 -0
- package/package.json +1 -1
- package/tailor.d.ts +25 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @tailor-platform/function-types
|
|
2
2
|
|
|
3
|
+
## 0.8.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#169](https://github.com/tailor-platform/function/pull/169) [`eb7a92d`](https://github.com/tailor-platform/function/commit/eb7a92d424d6d6dbc5c55559d2f21e5bcb4b5aec) Thanks [@remiposo](https://github.com/remiposo)! - Add `tailor.context` namespace with `getInvoker()` for retrieving information about the invoker of the current function execution
|
|
8
|
+
|
|
3
9
|
## 0.8.4
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
package/package.json
CHANGED
package/tailor.d.ts
CHANGED
|
@@ -495,4 +495,28 @@ declare namespace tailor.workflow {
|
|
|
495
495
|
key: string,
|
|
496
496
|
callback: (waitPayload: any) => any
|
|
497
497
|
): Promise<void>;
|
|
498
|
-
}
|
|
498
|
+
}
|
|
499
|
+
|
|
500
|
+
declare namespace tailor.context {
|
|
501
|
+
/**
|
|
502
|
+
* Information about the invoker of the current function execution.
|
|
503
|
+
*/
|
|
504
|
+
interface Invoker {
|
|
505
|
+
/** The invoker's ID */
|
|
506
|
+
id: string;
|
|
507
|
+
/** The invoker's type */
|
|
508
|
+
type: "user" | "machine_user";
|
|
509
|
+
/** The workspace ID */
|
|
510
|
+
workspaceId: string;
|
|
511
|
+
/** The invoker's attribute IDs */
|
|
512
|
+
attributes: string[];
|
|
513
|
+
/** The invoker's attribute map */
|
|
514
|
+
attributeMap: Record<string, unknown>;
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
/**
|
|
518
|
+
* Returns information about the invoker of the current function execution,
|
|
519
|
+
* or `null` for anonymous invocations.
|
|
520
|
+
*/
|
|
521
|
+
function getInvoker(): Invoker | null;
|
|
522
|
+
}
|