@integry/sdk 3.2.3 → 3.2.4

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.
@@ -1,383 +1,383 @@
1
- import { VNode } from "preact";
2
- type IntegrySDKEventType = "authorizations" | "did-add-authorization" | "did-begin-remove-authorization" | "did-change-step" | "did-fail-authorization-verification" | "did-load-flow" | "did-load-flows" | "did-load-integration" | "did-load-integrations" | "did-load-preview" | "did-remove-authorization" | "did-save-integration" | "did-delete-integration" | "did-select-authorization" | "ready" | "should-load-flow";
3
- type IntegrySDKEventPayloads = {
4
- ready: {
5
- deploymentId: number;
6
- };
7
- "should-load-flow": {
8
- templateId: number;
9
- flowId: number;
10
- };
11
- "did-load-flows": {
12
- flows: any[];
13
- };
14
- "did-load-integrations": {
15
- integrations: any[];
16
- };
17
- "did-load-flow": {
18
- flowId: number;
19
- flowTitle: string;
20
- flowDescription: string;
21
- templateId: number;
22
- templateTitle: string;
23
- templateDescription: string;
24
- mode: "EDIT" | "CREATE";
25
- };
26
- "did-load-integration": {
27
- flowId: number;
28
- integrationId: number;
29
- };
30
- "did-delete-integration": {
31
- flowId: number;
32
- flowName: string;
33
- flowDescription: string;
34
- integrationId: number;
35
- integrationName: string;
36
- };
37
- "did-save-integration": {
38
- integrationId: number;
39
- name: string;
40
- templateId: number;
41
- flowId: number;
42
- status: string;
43
- callbackUrl: string | null;
44
- authorizations: {
45
- authorizationId: number;
46
- userIdentity: string;
47
- isBrandingAppAuth: boolean;
48
- }[];
49
- event: "EDIT" | "CREATE";
50
- };
51
- "did-load-preview": {
52
- flowId: number;
53
- flowTitle: string;
54
- flowDescription: string;
55
- };
56
- "did-change-step": {
57
- stepId: number;
58
- stepType: "AUTH" | "CONFIGURATION" | "SECTION" | "CONFIRMATION";
59
- };
60
- "did-add-authorization": {
61
- identity: string;
62
- authorizationId: number;
63
- flowId: number | null;
64
- appIcon: string;
65
- alreadyExists: boolean;
66
- externalId?: string;
67
- };
68
- "did-select-authorization": {
69
- authorizationId: number;
70
- };
71
- "did-remove-authorization": {
72
- authorizationId: number;
73
- };
74
- "did-begin-remove-authorization": {
75
- authorizationId: number;
76
- };
77
- };
78
- type EventCallback<P extends IntegrySDKEventType> = (
79
- // @ts-expect-error P can index IntegrySDKEventPayloads
80
- payload: IntegrySDKEventPayloads[P]) => void;
81
- type IntegrySDKEvents = {
82
- authorizations: EventCallback<"authorizations">;
83
- "did-add-authorization": EventCallback<"did-add-authorization">;
84
- "did-begin-remove-authorization": EventCallback<"did-begin-remove-authorization">;
85
- "did-change-step": EventCallback<"did-change-step">;
86
- "did-fail-authorization-verification": EventCallback<"did-fail-authorization-verification">;
87
- "did-load-flow": EventCallback<"did-load-flow">;
88
- "did-load-flows": EventCallback<"did-load-flows">;
89
- "did-load-integration": EventCallback<"did-load-integration">;
90
- "did-delete-integration": EventCallback<"did-delete-integration">;
91
- "did-load-integrations": EventCallback<"did-load-integrations">;
92
- "did-load-preview": EventCallback<"did-load-preview">;
93
- "did-remove-authorization": EventCallback<"did-remove-authorization">;
94
- "did-save-integration": EventCallback<"did-save-integration">;
95
- "did-select-authorization": EventCallback<"did-select-authorization">;
96
- ready: EventCallback<"ready">;
97
- "should-load-flow": EventCallback<"should-load-flow">;
98
- };
99
- declare enum TemplateFormRenderModes {
100
- MODAL = "MODAL",
101
- INLINE = "INLINE",
102
- DETACHED = "DETACHED",
103
- CUSTOM = "CUSTOM"
104
- }
105
- declare enum TemplateListingRenderModes {
106
- GRID = "GRID",
107
- LIST = "LIST"
108
- }
109
- type Authorization = {
110
- id: number;
111
- authorization_type: string;
112
- app_user?: number;
113
- app_user_id?: number;
114
- disable_link?: string;
115
- integration_count?: number;
116
- user_identity: string;
117
- };
118
- type FlowCardProps = {
119
- imgUrl: string;
120
- name: string;
121
- description: string;
122
- tags: string;
123
- layout: TemplateListingRenderModes;
124
- handleClick: () => void;
125
- };
126
- interface UserConfig {
127
- availableFlowsLabel?: string;
128
- myFlowsLabel?: string;
129
- hideWebhookUrlScreen?: boolean;
130
- hideAppConnectionModal?: boolean;
131
- customComponents?: {
132
- flowCard?: (props: FlowCardProps) => VNode;
133
- };
134
- autoRedirectToMyFlows?: boolean;
135
- }
136
- interface SDKConfig {
137
- env?: "staging" | "production";
138
- baseUrl?: string;
139
- debug?: boolean;
140
- integrationId?: number;
141
- xIntegryConfig?: {
142
- isAnonymous?: boolean;
143
- appAuth?: {
144
- apiKey?: string;
145
- authId?: string;
146
- extras?: Record<string, string | number>;
147
- };
148
- };
149
- userConfig?: UserConfig;
150
- }
151
- interface ConfigWithObject extends SDKConfig {
152
- appKey: string;
153
- hash: string;
154
- userId: string;
155
- deploymentId: string;
156
- }
157
- interface ConfigWithUrlParams extends SDKConfig {
158
- useUrlParams?: boolean;
159
- }
160
- type App = {
161
- id: number;
162
- name: string;
163
- description: string;
164
- icon_url: string;
165
- color: string;
166
- publishing_status: string;
167
- category: string[];
168
- app_type?: string;
169
- action_url?: string | null;
170
- created_at?: Date;
171
- tags: string;
172
- };
173
- type Activity = {
174
- id: number;
175
- name: string;
176
- type: string;
177
- endpoint: string;
178
- auth_required: boolean;
179
- total_fields: number;
180
- app: App;
181
- activity_output: string | null;
182
- activity_output_url: string | null;
183
- dynamic_field_data_endpoint: string | null;
184
- };
185
- type AuthorizationType = {
186
- id: number;
187
- type: string;
188
- authorizations: Authorization[];
189
- provider: string;
190
- is_sandbox_enabled: boolean;
191
- authorization_url_sandbox: string;
192
- };
193
- interface TemplateField {
194
- id: number;
195
- is_required: boolean;
196
- is_hidden: boolean;
197
- default_value: string | null;
198
- weight: number;
199
- description: string;
200
- summary: string | null;
201
- activity_field: {
202
- id: number;
203
- machine_name: string;
204
- type: string;
205
- title: string;
206
- description: string;
207
- weight: number;
208
- is_required: boolean;
209
- child_fields: string | null;
210
- placeholder: string | null;
211
- is_dynamic: boolean;
212
- data_src: string | null;
213
- data_src_endpoint: number | null;
214
- parent_fields: string | null;
215
- dynamic_field_src: string | null;
216
- default_value: string | null;
217
- auto_machine_name: string;
218
- dynamic_field_src_endpoint: number | null;
219
- regex: string | null;
220
- regex_error_message?: string | null;
221
- is_searchable: boolean;
222
- conditional_fields?: string | null;
223
- } | null;
224
- title: string | null;
225
- type: string;
226
- placeholder: string | null;
227
- // manual_template: unknown | null;
228
- child_field: string | null;
229
- child_field_value: string | null;
230
- // template_fields: unknown[];
231
- button_text: string | null;
232
- // field_actions: unknown[];
233
- icon_url: string | null;
234
- long_description: string | null;
235
- regex: string | null;
236
- regex_msg: string | null;
237
- is_visible: boolean;
238
- app_user_data?: {
239
- app_user: number;
240
- id: number;
241
- value: string | number;
242
- }[];
243
- added_in_mapping?: boolean;
244
- field_mapping_source?: string;
245
- }
246
- interface TemplateStep {
247
- id: number;
248
- weight: number;
249
- title: string;
250
- is_visible: boolean;
251
- activity: Activity;
252
- authorization_type: AuthorizationType;
253
- template_fields: TemplateField[];
254
- step_instance?: number | null;
255
- allow_multiple_authorizations: boolean;
256
- step_authorization: number | null;
257
- button_text: string | null;
258
- is_self_step: boolean;
259
- summary: string | null;
260
- is_workspace_app_step: boolean;
261
- auth_description: string | null;
262
- hide_authorization: boolean;
263
- // step_condition: unknown | null;
264
- machine_name: string | null;
265
- is_custom_machine_name: boolean;
266
- }
267
- interface InitConfig {
268
- containerId: string;
269
- templateContainerId?: string;
270
- renderMode: TemplateFormRenderModes;
271
- }
272
- interface TemplatePreviewData {
273
- id: number;
274
- name: string;
275
- description: string;
276
- app: App;
277
- branding_app: App;
278
- button_text: string | null;
279
- is_wizard: boolean;
280
- publishing_status: string;
281
- level?: number;
282
- parent_id?: number;
283
- steps: TemplateStep[];
284
- }
285
- interface PreviewMetadata {
286
- stepId: number | null;
287
- type: "AUTH" | "CONFIGURATION" | "CONFIRMATION" | "SECTION";
288
- }
289
- interface PreviewPayload {
290
- templateData: TemplatePreviewData;
291
- metadata: PreviewMetadata;
292
- previewContainerId: string;
293
- }
294
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
295
- type EventSet = Record<string, (...args: any[]) => void>;
296
- interface EventEmitterType<ESet extends EventSet> {
297
- on<EventName extends keyof ESet>(eventName: EventName, handler: ESet[EventName]): void;
298
- once<EventName extends keyof ESet>(eventName: EventName, handler: ESet[EventName]): void;
299
- off<EventName extends keyof ESet>(eventName: EventName, handler: ESet[EventName]): void;
300
- offAll(): void;
301
- emit<EventName extends keyof ESet>(eventName: EventName, ...args: Parameters<ESet[EventName]>): void;
302
- }
303
- declare class EventEmitter<ESet extends EventSet> implements EventEmitterType<EventSet> {
304
- private events;
305
- on<EventName extends keyof ESet>(eventName: EventName, handler: ESet[EventName]): void;
306
- once<EventName extends keyof ESet>(eventName: EventName, handler: ESet[EventName]): void;
307
- off<EventName extends keyof ESet>(eventName: EventName, handler: ESet[EventName]): void;
308
- offAll(): void;
309
- emit<EventName extends keyof ESet>(eventName: EventName, ...args: Parameters<ESet[EventName]>): void;
310
- private addEventListener;
311
- }
312
- /**
313
- * Integry JS SDK
314
- */
315
- declare class IntegryJS {
316
- static SDK_VERSION: string;
317
- private config;
318
- private apiHandler;
319
- eventEmitter: EventEmitter<IntegrySDKEvents>;
320
- // allow customers to use template tagging
321
- static html: (strings: TemplateStringsArray, ...values: any[]) => import("preact").VNode<{}>;
322
- static RenderModes: typeof TemplateFormRenderModes;
323
- static Helpers: {
324
- getAuthHash: (key: string, message: string) => Promise<string>;
325
- };
326
- private authModalId;
327
- private forceRerender;
328
- constructor(config: ConfigWithObject | ConfigWithUrlParams);
329
- /**
330
- *
331
- * @param length Length of string to randomly generate
332
- * @returns {string} Returns a random string
333
- */
334
- private getRandomFlowId;
335
- private getAuthParamsFromUrl;
336
- /**
337
- * Prints version number of this SDK version
338
- */
339
- printVersion: () => void;
340
- /**
341
- *
342
- * @param renderMode
343
- * @param templateContainerId
344
- * @returns {HTMLElement | null}
345
- */
346
- private setupFlowFormDestination;
347
- /**
348
- * Render the template form we ship
349
- * @param data
350
- */
351
- renderFlowSetupForm: (data: {
352
- flowId?: string;
353
- integrationId?: number;
354
- flowContainerId: string;
355
- }) => void;
356
- /**
357
- * Render the template form we ship
358
- * @param data
359
- */
360
- renderAccountConnectionModal: (data?: {
361
- deploymentId?: string | undefined;
362
- appId?: number | undefined;
363
- authTypeId?: number | undefined;
364
- } | undefined) => void;
365
- /**
366
- * Render the template form we ship
367
- * @param params
368
- */
369
- renderPreview: (params: PreviewPayload) => void;
370
- /**
371
- *
372
- * @param initConfig
373
- */
374
- init: (initConfig: InitConfig) => void;
375
- verifyAuthConfig: () => Promise<{
376
- config_verified: boolean;
377
- } | null>;
378
- /**
379
- * Destroy SDK instance and cleanup store
380
- */
381
- destroy: () => void;
382
- }
383
- export { IntegryJS as default };
1
+ import { VNode } from "preact";
2
+ type IntegrySDKEventType = "authorizations" | "did-add-authorization" | "did-begin-remove-authorization" | "did-change-step" | "did-fail-authorization-verification" | "did-load-flow" | "did-load-flows" | "did-load-integration" | "did-load-integrations" | "did-load-preview" | "did-remove-authorization" | "did-save-integration" | "did-delete-integration" | "did-select-authorization" | "ready" | "should-load-flow";
3
+ type IntegrySDKEventPayloads = {
4
+ ready: {
5
+ deploymentId: number;
6
+ };
7
+ "should-load-flow": {
8
+ templateId: number;
9
+ flowId: number;
10
+ };
11
+ "did-load-flows": {
12
+ flows: any[];
13
+ };
14
+ "did-load-integrations": {
15
+ integrations: any[];
16
+ };
17
+ "did-load-flow": {
18
+ flowId: number;
19
+ flowTitle: string;
20
+ flowDescription: string;
21
+ templateId: number;
22
+ templateTitle: string;
23
+ templateDescription: string;
24
+ mode: "EDIT" | "CREATE";
25
+ };
26
+ "did-load-integration": {
27
+ flowId: number;
28
+ integrationId: number;
29
+ };
30
+ "did-delete-integration": {
31
+ flowId: number;
32
+ flowName: string;
33
+ flowDescription: string;
34
+ integrationId: number;
35
+ integrationName: string;
36
+ };
37
+ "did-save-integration": {
38
+ integrationId: number;
39
+ name: string;
40
+ templateId: number;
41
+ flowId: number;
42
+ status: string;
43
+ callbackUrl: string | null;
44
+ authorizations: {
45
+ authorizationId: number;
46
+ userIdentity: string;
47
+ isBrandingAppAuth: boolean;
48
+ }[];
49
+ event: "EDIT" | "CREATE";
50
+ };
51
+ "did-load-preview": {
52
+ flowId: number;
53
+ flowTitle: string;
54
+ flowDescription: string;
55
+ };
56
+ "did-change-step": {
57
+ stepId: number;
58
+ stepType: "AUTH" | "CONFIGURATION" | "SECTION" | "CONFIRMATION";
59
+ };
60
+ "did-add-authorization": {
61
+ identity: string;
62
+ authorizationId: number;
63
+ flowId: number | null;
64
+ appIcon: string;
65
+ alreadyExists: boolean;
66
+ externalId?: string;
67
+ };
68
+ "did-select-authorization": {
69
+ authorizationId: number;
70
+ };
71
+ "did-remove-authorization": {
72
+ authorizationId: number;
73
+ };
74
+ "did-begin-remove-authorization": {
75
+ authorizationId: number;
76
+ };
77
+ };
78
+ type EventCallback<P extends IntegrySDKEventType> = (
79
+ // @ts-expect-error P can index IntegrySDKEventPayloads
80
+ payload: IntegrySDKEventPayloads[P]) => void;
81
+ type IntegrySDKEvents = {
82
+ authorizations: EventCallback<"authorizations">;
83
+ "did-add-authorization": EventCallback<"did-add-authorization">;
84
+ "did-begin-remove-authorization": EventCallback<"did-begin-remove-authorization">;
85
+ "did-change-step": EventCallback<"did-change-step">;
86
+ "did-fail-authorization-verification": EventCallback<"did-fail-authorization-verification">;
87
+ "did-load-flow": EventCallback<"did-load-flow">;
88
+ "did-load-flows": EventCallback<"did-load-flows">;
89
+ "did-load-integration": EventCallback<"did-load-integration">;
90
+ "did-delete-integration": EventCallback<"did-delete-integration">;
91
+ "did-load-integrations": EventCallback<"did-load-integrations">;
92
+ "did-load-preview": EventCallback<"did-load-preview">;
93
+ "did-remove-authorization": EventCallback<"did-remove-authorization">;
94
+ "did-save-integration": EventCallback<"did-save-integration">;
95
+ "did-select-authorization": EventCallback<"did-select-authorization">;
96
+ ready: EventCallback<"ready">;
97
+ "should-load-flow": EventCallback<"should-load-flow">;
98
+ };
99
+ declare enum TemplateFormRenderModes {
100
+ MODAL = "MODAL",
101
+ INLINE = "INLINE",
102
+ DETACHED = "DETACHED",
103
+ CUSTOM = "CUSTOM"
104
+ }
105
+ declare enum TemplateListingRenderModes {
106
+ GRID = "GRID",
107
+ LIST = "LIST"
108
+ }
109
+ type Authorization = {
110
+ id: number;
111
+ authorization_type: string;
112
+ app_user?: number;
113
+ app_user_id?: number;
114
+ disable_link?: string;
115
+ integration_count?: number;
116
+ user_identity: string;
117
+ };
118
+ type FlowCardProps = {
119
+ imgUrl: string;
120
+ name: string;
121
+ description: string;
122
+ tags: string;
123
+ layout: TemplateListingRenderModes;
124
+ handleClick: () => void;
125
+ };
126
+ interface UserConfig {
127
+ availableFlowsLabel?: string;
128
+ myFlowsLabel?: string;
129
+ hideWebhookUrlScreen?: boolean;
130
+ hideAppConnectionModal?: boolean;
131
+ customComponents?: {
132
+ flowCard?: (props: FlowCardProps) => VNode;
133
+ };
134
+ autoRedirectToMyFlows?: boolean;
135
+ }
136
+ interface SDKConfig {
137
+ env?: "staging" | "production";
138
+ baseUrl?: string;
139
+ debug?: boolean;
140
+ integrationId?: number;
141
+ xIntegryConfig?: {
142
+ isAnonymous?: boolean;
143
+ appAuth?: {
144
+ apiKey?: string;
145
+ authId?: string;
146
+ extras?: Record<string, string | number>;
147
+ };
148
+ };
149
+ userConfig?: UserConfig;
150
+ }
151
+ interface ConfigWithObject extends SDKConfig {
152
+ appKey: string;
153
+ hash: string;
154
+ userId: string;
155
+ deploymentId: string;
156
+ }
157
+ interface ConfigWithUrlParams extends SDKConfig {
158
+ useUrlParams?: boolean;
159
+ }
160
+ type App = {
161
+ id: number;
162
+ name: string;
163
+ description: string;
164
+ icon_url: string;
165
+ color: string;
166
+ publishing_status: string;
167
+ category: string[];
168
+ app_type?: string;
169
+ action_url?: string | null;
170
+ created_at?: Date;
171
+ tags: string;
172
+ };
173
+ type Activity = {
174
+ id: number;
175
+ name: string;
176
+ type: string;
177
+ endpoint: string;
178
+ auth_required: boolean;
179
+ total_fields: number;
180
+ app: App;
181
+ activity_output: string | null;
182
+ activity_output_url: string | null;
183
+ dynamic_field_data_endpoint: string | null;
184
+ };
185
+ type AuthorizationType = {
186
+ id: number;
187
+ type: string;
188
+ authorizations: Authorization[];
189
+ provider: string;
190
+ is_sandbox_enabled: boolean;
191
+ authorization_url_sandbox: string;
192
+ };
193
+ interface TemplateField {
194
+ id: number;
195
+ is_required: boolean;
196
+ is_hidden: boolean;
197
+ default_value: string | null;
198
+ weight: number;
199
+ description: string;
200
+ summary: string | null;
201
+ activity_field: {
202
+ id: number;
203
+ machine_name: string;
204
+ type: string;
205
+ title: string;
206
+ description: string;
207
+ weight: number;
208
+ is_required: boolean;
209
+ child_fields: string | null;
210
+ placeholder: string | null;
211
+ is_dynamic: boolean;
212
+ data_src: string | null;
213
+ data_src_endpoint: number | null;
214
+ parent_fields: string | null;
215
+ dynamic_field_src: string | null;
216
+ default_value: string | null;
217
+ auto_machine_name: string;
218
+ dynamic_field_src_endpoint: number | null;
219
+ regex: string | null;
220
+ regex_error_message?: string | null;
221
+ is_searchable: boolean;
222
+ conditional_fields?: string | null;
223
+ } | null;
224
+ title: string | null;
225
+ type: string;
226
+ placeholder: string | null;
227
+ // manual_template: unknown | null;
228
+ child_field: string | null;
229
+ child_field_value: string | null;
230
+ // template_fields: unknown[];
231
+ button_text: string | null;
232
+ // field_actions: unknown[];
233
+ icon_url: string | null;
234
+ long_description: string | null;
235
+ regex: string | null;
236
+ regex_msg: string | null;
237
+ is_visible: boolean;
238
+ app_user_data?: {
239
+ app_user: number;
240
+ id: number;
241
+ value: string | number;
242
+ }[];
243
+ added_in_mapping?: boolean;
244
+ field_mapping_source?: string;
245
+ }
246
+ interface TemplateStep {
247
+ id: number;
248
+ weight: number;
249
+ title: string;
250
+ is_visible: boolean;
251
+ activity: Activity;
252
+ authorization_type: AuthorizationType;
253
+ template_fields: TemplateField[];
254
+ step_instance?: number | null;
255
+ allow_multiple_authorizations: boolean;
256
+ step_authorization: number | null;
257
+ button_text: string | null;
258
+ is_self_step: boolean;
259
+ summary: string | null;
260
+ is_workspace_app_step: boolean;
261
+ auth_description: string | null;
262
+ hide_authorization: boolean;
263
+ // step_condition: unknown | null;
264
+ machine_name: string | null;
265
+ is_custom_machine_name: boolean;
266
+ }
267
+ interface InitConfig {
268
+ containerId: string;
269
+ templateContainerId?: string;
270
+ renderMode: TemplateFormRenderModes;
271
+ }
272
+ interface TemplatePreviewData {
273
+ id: number;
274
+ name: string;
275
+ description: string;
276
+ app: App;
277
+ branding_app: App;
278
+ button_text: string | null;
279
+ is_wizard: boolean;
280
+ publishing_status: string;
281
+ level?: number;
282
+ parent_id?: number;
283
+ steps: TemplateStep[];
284
+ }
285
+ interface PreviewMetadata {
286
+ stepId: number | null;
287
+ type: "AUTH" | "CONFIGURATION" | "CONFIRMATION" | "SECTION";
288
+ }
289
+ interface PreviewPayload {
290
+ templateData: TemplatePreviewData;
291
+ metadata: PreviewMetadata;
292
+ previewContainerId: string;
293
+ }
294
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
295
+ type EventSet = Record<string, (...args: any[]) => void>;
296
+ interface EventEmitterType<ESet extends EventSet> {
297
+ on<EventName extends keyof ESet>(eventName: EventName, handler: ESet[EventName]): void;
298
+ once<EventName extends keyof ESet>(eventName: EventName, handler: ESet[EventName]): void;
299
+ off<EventName extends keyof ESet>(eventName: EventName, handler: ESet[EventName]): void;
300
+ offAll(): void;
301
+ emit<EventName extends keyof ESet>(eventName: EventName, ...args: Parameters<ESet[EventName]>): void;
302
+ }
303
+ declare class EventEmitter<ESet extends EventSet> implements EventEmitterType<EventSet> {
304
+ private events;
305
+ on<EventName extends keyof ESet>(eventName: EventName, handler: ESet[EventName]): void;
306
+ once<EventName extends keyof ESet>(eventName: EventName, handler: ESet[EventName]): void;
307
+ off<EventName extends keyof ESet>(eventName: EventName, handler: ESet[EventName]): void;
308
+ offAll(): void;
309
+ emit<EventName extends keyof ESet>(eventName: EventName, ...args: Parameters<ESet[EventName]>): void;
310
+ private addEventListener;
311
+ }
312
+ /**
313
+ * Integry JS SDK
314
+ */
315
+ declare class IntegryJS {
316
+ static SDK_VERSION: string;
317
+ private config;
318
+ private apiHandler;
319
+ eventEmitter: EventEmitter<IntegrySDKEvents>;
320
+ // allow customers to use template tagging
321
+ static html: (strings: TemplateStringsArray, ...values: any[]) => import("preact").VNode<{}>;
322
+ static RenderModes: typeof TemplateFormRenderModes;
323
+ static Helpers: {
324
+ getAuthHash: (key: string, message: string) => Promise<string>;
325
+ };
326
+ private authModalId;
327
+ private forceRerender;
328
+ constructor(config: ConfigWithObject | ConfigWithUrlParams);
329
+ /**
330
+ *
331
+ * @param length Length of string to randomly generate
332
+ * @returns {string} Returns a random string
333
+ */
334
+ private getRandomFlowId;
335
+ private getAuthParamsFromUrl;
336
+ /**
337
+ * Prints version number of this SDK version
338
+ */
339
+ printVersion: () => void;
340
+ /**
341
+ *
342
+ * @param renderMode
343
+ * @param templateContainerId
344
+ * @returns {HTMLElement | null}
345
+ */
346
+ private setupFlowFormDestination;
347
+ /**
348
+ * Render the template form we ship
349
+ * @param data
350
+ */
351
+ renderFlowSetupForm: (data: {
352
+ flowId?: string;
353
+ integrationId?: number;
354
+ flowContainerId: string;
355
+ }) => void;
356
+ /**
357
+ * Render the template form we ship
358
+ * @param data
359
+ */
360
+ renderAccountConnectionModal: (data?: {
361
+ deploymentId?: string | undefined;
362
+ appId?: number | undefined;
363
+ authTypeId?: number | undefined;
364
+ } | undefined) => void;
365
+ /**
366
+ * Render the template form we ship
367
+ * @param params
368
+ */
369
+ renderPreview: (params: PreviewPayload) => void;
370
+ /**
371
+ *
372
+ * @param initConfig
373
+ */
374
+ init: (initConfig: InitConfig) => void;
375
+ verifyAuthConfig: () => Promise<{
376
+ config_verified: boolean;
377
+ } | null>;
378
+ /**
379
+ * Destroy SDK instance and cleanup store
380
+ */
381
+ destroy: () => void;
382
+ }
383
+ export { IntegryJS as default };