@integry/sdk 3.1.0-alpha.1 → 3.1.1-beta.10

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.
@@ -3,8 +3,9 @@ type IntegrySDKEvents = {
3
3
  ready: ({ deploymentId }: {
4
4
  deploymentId: number;
5
5
  }) => void;
6
- "should-load-flow": ({ templateId }: {
6
+ "should-load-flow": ({ templateId, flowId }: {
7
7
  templateId: number;
8
+ flowId: number;
8
9
  }) => void;
9
10
  "did-load-flows": ({ flows }: {
10
11
  flows: any[];
@@ -13,6 +14,9 @@ type IntegrySDKEvents = {
13
14
  integrations: any[];
14
15
  }) => void;
15
16
  "did-load-flow": (data: {
17
+ flowId: number;
18
+ flowTitle: string;
19
+ flowDescription: string;
16
20
  templateId: number;
17
21
  templateTitle: string;
18
22
  templateDescription: string;
@@ -21,18 +25,42 @@ type IntegrySDKEvents = {
21
25
  integrationId: number;
22
26
  name: string;
23
27
  templateId: number;
28
+ flowId: number;
24
29
  status: string;
25
30
  callbackUrl: string | null;
31
+ authorizations: {
32
+ authorizationId: number;
33
+ userIdentity: string;
34
+ isBrandingAppAuth: boolean;
35
+ }[];
26
36
  }) => void;
27
37
  "did-load-preview": (data: {
28
- templateId: number;
29
- templateTitle: string;
30
- templateDescription: string;
38
+ flowId: number;
39
+ flowTitle: string;
40
+ flowDescription: string;
31
41
  }) => void;
32
42
  "did-change-step": (data: {
33
43
  stepId: number;
34
44
  stepType: "AUTH" | "CONFIGURATION" | "SECTION" | "CONFIRMATION";
35
45
  }) => void;
46
+ "did-add-authorization": (data: {
47
+ identity: string;
48
+ authorizationId: number;
49
+ flowId: number | null;
50
+ appId: number;
51
+ appName: string;
52
+ appIcon: string;
53
+ alreadyExists: boolean;
54
+ }) => void;
55
+ "did-select-authorization": (data: {
56
+ authorizationId: number;
57
+ }) => void;
58
+ "did-remove-authorization": (data: {
59
+ authorizationId: number;
60
+ }) => void;
61
+ "did-begin-remove-authorization": (data: {
62
+ authorizationId: number;
63
+ }) => void;
36
64
  };
37
65
  declare enum TemplateFormRenderModes {
38
66
  MODAL = "MODAL",
@@ -64,6 +92,7 @@ type FlowCardProps = {
64
92
  interface UserConfig {
65
93
  availableFlowsLabel?: string;
66
94
  myFlowsLabel?: string;
95
+ hideWebhookUrlScreen?: boolean;
67
96
  customComponents?: {
68
97
  flowCard?: (props: FlowCardProps) => VNode;
69
98
  };
@@ -73,7 +102,8 @@ interface SDKConfig {
73
102
  debug?: boolean;
74
103
  integrationId?: number;
75
104
  xIntegryConfig?: {
76
- appAuth: {
105
+ isAnonymous?: boolean;
106
+ appAuth?: {
77
107
  apiKey: string;
78
108
  extras?: Record<string, string | number>;
79
109
  };
@@ -139,6 +169,7 @@ interface TemplateField {
139
169
  weight: number;
140
170
  is_required: boolean;
141
171
  child_fields: string | null;
172
+ placeholder: string | null;
142
173
  is_dynamic: boolean;
143
174
  data_src: string | null;
144
175
  data_src_endpoint: number | null;
@@ -164,6 +195,13 @@ interface TemplateField {
164
195
  regex: string | null;
165
196
  regex_msg: string | null;
166
197
  is_visible: boolean;
198
+ app_user_data?: {
199
+ app_user: number;
200
+ id: number;
201
+ value: string | number;
202
+ }[];
203
+ added_in_mapping?: boolean;
204
+ field_mapping_source?: string;
167
205
  }
168
206
  interface TemplateStep {
169
207
  id: number;
@@ -173,7 +211,7 @@ interface TemplateStep {
173
211
  activity: Activity;
174
212
  authorization_type: AuthorizationType;
175
213
  template_fields: TemplateField[];
176
- // step_instance: unknown | null;
214
+ step_instance?: number | null;
177
215
  allow_multiple_authorizations: boolean;
178
216
  step_authorization: number | null;
179
217
  button_text: string | null;
@@ -245,6 +283,7 @@ declare class IntegryJS {
245
283
  static Helpers: {
246
284
  getAuthHash: (key: string, message: string) => Promise<string>;
247
285
  };
286
+ private authModalId;
248
287
  constructor(config: ConfigWithObject | ConfigWithUrlParams);
249
288
  /**
250
289
  *
@@ -272,6 +311,13 @@ declare class IntegryJS {
272
311
  flowId?: string;
273
312
  flowContainerId: string;
274
313
  }) => void;
314
+ /**
315
+ * Render the template form we ship
316
+ * @param data
317
+ */
318
+ renderAccountConnectionModal: (data?: {
319
+ deploymentId?: string | undefined;
320
+ } | undefined) => void;
275
321
  /**
276
322
  * Render the template form we ship
277
323
  * @param templateId