@integry/sdk 3.0.18-beta.1 → 3.1.1-beta.1

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,3 +1,5 @@
1
+ import { html } from 'htm/preact';
2
+ import { VNode } from "preact";
1
3
  type IntegrySDKEvents = {
2
4
  ready: ({ deploymentId }: {
3
5
  deploymentId: number;
@@ -40,7 +42,7 @@ type IntegrySDKEvents = {
40
42
  "did-add-authorization": (data: {
41
43
  identity: string;
42
44
  authorizationId: number;
43
- flowId: number;
45
+ flowId: number | null;
44
46
  appId: number;
45
47
  alreadyExists: boolean;
46
48
  }) => void;
@@ -60,6 +62,10 @@ declare enum TemplateFormRenderModes {
60
62
  DETACHED = "DETACHED",
61
63
  CUSTOM = "CUSTOM"
62
64
  }
65
+ declare enum TemplateListingRenderModes {
66
+ GRID = "GRID",
67
+ LIST = "LIST"
68
+ }
63
69
  type Authorization = {
64
70
  id: number;
65
71
  authorization_type: string;
@@ -69,10 +75,21 @@ type Authorization = {
69
75
  integration_count?: number;
70
76
  user_identity: string;
71
77
  };
78
+ type FlowCardProps = {
79
+ imgUrl: string;
80
+ name: string;
81
+ description: string;
82
+ tags: string;
83
+ layout: TemplateListingRenderModes;
84
+ handleClick: () => void;
85
+ };
72
86
  interface UserConfig {
73
87
  availableFlowsLabel?: string;
74
88
  myFlowsLabel?: string;
75
89
  hideWebhookUrlScreen?: boolean;
90
+ customComponents?: {
91
+ flowCard?: (props: FlowCardProps) => VNode;
92
+ };
76
93
  }
77
94
  interface SDKConfig {
78
95
  env?: "staging" | "production";
@@ -263,10 +280,12 @@ declare class IntegryJS {
263
280
  private config;
264
281
  private apiHandler;
265
282
  eventEmitter: EventEmitter<IntegrySDKEvents>;
283
+ static html: (strings: TemplateStringsArray, ...values: any[]) => import("preact").VNode<{}>;
266
284
  static RenderModes: typeof TemplateFormRenderModes;
267
285
  static Helpers: {
268
286
  getAuthHash: (key: string, message: string) => Promise<string>;
269
287
  };
288
+ private authModalId;
270
289
  constructor(config: ConfigWithObject | ConfigWithUrlParams);
271
290
  /**
272
291
  *
@@ -294,6 +313,13 @@ declare class IntegryJS {
294
313
  flowId?: string;
295
314
  flowContainerId: string;
296
315
  }) => void;
316
+ /**
317
+ * Render the template form we ship
318
+ * @param data
319
+ */
320
+ renderAccountConnectionModal: (data: {
321
+ deploymentId?: string;
322
+ }) => void;
297
323
  /**
298
324
  * Render the template form we ship
299
325
  * @param templateId
@@ -309,4 +335,4 @@ declare class IntegryJS {
309
335
  */
310
336
  destroy: () => void;
311
337
  }
312
- export { IntegryJS, Helpers };
338
+ export { IntegryJS, Helpers, html };