@integry/sdk 3.2.3 → 3.2.4-beta.2

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