@integry/sdk 3.1.0 → 3.1.1-beta.11

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.
@@ -4,8 +4,9 @@ type IntegrySDKEvents = {
4
4
  ready: ({ deploymentId }: {
5
5
  deploymentId: number;
6
6
  }) => void;
7
- "should-load-flow": ({ templateId }: {
7
+ "should-load-flow": ({ templateId, flowId }: {
8
8
  templateId: number;
9
+ flowId: number;
9
10
  }) => void;
10
11
  "did-load-flows": ({ flows }: {
11
12
  flows: any[];
@@ -14,6 +15,9 @@ type IntegrySDKEvents = {
14
15
  integrations: any[];
15
16
  }) => void;
16
17
  "did-load-flow": (data: {
18
+ flowId: number;
19
+ flowTitle: string;
20
+ flowDescription: string;
17
21
  templateId: number;
18
22
  templateTitle: string;
19
23
  templateDescription: string;
@@ -22,6 +26,7 @@ type IntegrySDKEvents = {
22
26
  integrationId: number;
23
27
  name: string;
24
28
  templateId: number;
29
+ flowId: number;
25
30
  status: string;
26
31
  callbackUrl: string | null;
27
32
  authorizations: {
@@ -31,9 +36,9 @@ type IntegrySDKEvents = {
31
36
  }[];
32
37
  }) => void;
33
38
  "did-load-preview": (data: {
34
- templateId: number;
35
- templateTitle: string;
36
- templateDescription: string;
39
+ flowId: number;
40
+ flowTitle: string;
41
+ flowDescription: string;
37
42
  }) => void;
38
43
  "did-change-step": (data: {
39
44
  stepId: number;
@@ -42,8 +47,19 @@ type IntegrySDKEvents = {
42
47
  "did-add-authorization": (data: {
43
48
  identity: string;
44
49
  authorizationId: number;
45
- flowId: number;
50
+ flowId: number | null;
46
51
  appId: number;
52
+ appName: string;
53
+ appIcon: string;
54
+ alreadyExists: boolean;
55
+ }) => void;
56
+ "did-fail-authorization-verification": (data: {
57
+ identity: string;
58
+ authorizationId: number;
59
+ flowId: number | null;
60
+ appId: number;
61
+ appName: string;
62
+ appIcon: string;
47
63
  alreadyExists: boolean;
48
64
  }) => void;
49
65
  "did-select-authorization": (data: {
@@ -96,8 +112,10 @@ interface SDKConfig {
96
112
  debug?: boolean;
97
113
  integrationId?: number;
98
114
  xIntegryConfig?: {
99
- appAuth: {
100
- apiKey: string;
115
+ isAnonymous?: boolean;
116
+ appAuth?: {
117
+ apiKey?: string;
118
+ authId?: string;
101
119
  extras?: Record<string, string | number>;
102
120
  };
103
121
  };
@@ -285,6 +303,7 @@ declare class IntegryJS {
285
303
  static Helpers: {
286
304
  getAuthHash: (key: string, message: string) => Promise<string>;
287
305
  };
306
+ private authModalId;
288
307
  constructor(config: ConfigWithObject | ConfigWithUrlParams);
289
308
  /**
290
309
  *
@@ -312,6 +331,14 @@ declare class IntegryJS {
312
331
  flowId?: string;
313
332
  flowContainerId: string;
314
333
  }) => void;
334
+ /**
335
+ * Render the template form we ship
336
+ * @param data
337
+ */
338
+ renderAccountConnectionModal: (data?: {
339
+ deploymentId?: string | undefined;
340
+ appId?: number | undefined;
341
+ } | undefined) => void;
315
342
  /**
316
343
  * Render the template form we ship
317
344
  * @param templateId