@knocklabs/node 0.4.7 → 0.4.8

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@knocklabs/node",
3
- "version": "0.4.7",
3
+ "version": "0.4.8",
4
4
  "description": "Library for interacting with the Knock API",
5
5
  "homepage": "https://github.com/knocklabs/knock-node",
6
6
  "author": "@knocklabs",
@@ -1,9 +1,9 @@
1
- import { ObjectRef } from "../objects/interfaces";
2
1
  import { PaginationOptions } from "../../common/interfaces";
2
+ import { Recipient } from "../workflows/interfaces";
3
3
  export interface Message {
4
4
  id: string;
5
5
  channel_id: string;
6
- recipient: string | ObjectRef;
6
+ recipient: Recipient;
7
7
  tenant: string | null;
8
8
  status: MessageStatus;
9
9
  read_at: string | null;
@@ -18,7 +18,7 @@ export interface Message {
18
18
  export interface MessageEvent {
19
19
  id: string;
20
20
  environment_id: string;
21
- recipient: string | ObjectRef;
21
+ recipient: Recipient;
22
22
  data: Record<string, any>;
23
23
  type: string;
24
24
  inserted_at: string;
@@ -1,18 +1,25 @@
1
- import { ObjectRef } from "../objects/interfaces";
1
+ import { ObjectRef, SetObjectProperties } from "../objects/interfaces";
2
+ import { IdentifyProperties } from "../users/interfaces";
2
3
  export interface TriggerWorkflowProperties<T = {
3
4
  [key: string]: any;
4
5
  }> {
5
- actor?: Actor;
6
- recipients?: Recipient[];
6
+ actor?: Actor | ActorWithUpsert;
7
+ recipients?: Array<Recipient | RecipientWithUpsert>;
7
8
  cancellationKey?: string;
8
9
  tenant?: string;
9
10
  data?: T;
10
11
  }
11
12
  export interface CancelWorkflowProperties {
12
- recipients?: string[] | ObjectRef;
13
+ recipients?: Recipient[];
13
14
  }
14
15
  export interface WorkflowRun {
15
16
  workflow_run_id: string;
16
17
  }
17
18
  export declare type Recipient = string | ObjectRef;
18
19
  export declare type Actor = Recipient;
20
+ export interface UserWithUpsert extends IdentifyProperties {
21
+ id: string;
22
+ }
23
+ export declare type ObjectWithUpsert = ObjectRef & SetObjectProperties;
24
+ export declare type RecipientWithUpsert = UserWithUpsert | ObjectWithUpsert;
25
+ export declare type ActorWithUpsert = RecipientWithUpsert;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@knocklabs/node",
3
- "version": "0.4.7",
3
+ "version": "0.4.8",
4
4
  "description": "Library for interacting with the Knock API",
5
5
  "homepage": "https://github.com/knocklabs/knock-node",
6
6
  "author": "@knocklabs",