@integry/sdk 3.0.17 → 3.1.0

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,4 @@
1
+ import { VNode } from "preact";
1
2
  type IntegrySDKEvents = {
2
3
  ready: ({ deploymentId }: {
3
4
  deploymentId: number;
@@ -60,6 +61,10 @@ declare enum TemplateFormRenderModes {
60
61
  DETACHED = "DETACHED",
61
62
  CUSTOM = "CUSTOM"
62
63
  }
64
+ declare enum TemplateListingRenderModes {
65
+ GRID = "GRID",
66
+ LIST = "LIST"
67
+ }
63
68
  type Authorization = {
64
69
  id: number;
65
70
  authorization_type: string;
@@ -69,10 +74,21 @@ type Authorization = {
69
74
  integration_count?: number;
70
75
  user_identity: string;
71
76
  };
77
+ type FlowCardProps = {
78
+ imgUrl: string;
79
+ name: string;
80
+ description: string;
81
+ tags: string;
82
+ layout: TemplateListingRenderModes;
83
+ handleClick: () => void;
84
+ };
72
85
  interface UserConfig {
73
86
  availableFlowsLabel?: string;
74
87
  myFlowsLabel?: string;
75
88
  hideWebhookUrlScreen?: boolean;
89
+ customComponents?: {
90
+ flowCard?: (props: FlowCardProps) => VNode;
91
+ };
76
92
  }
77
93
  interface SDKConfig {
78
94
  env?: "staging" | "production";
@@ -252,18 +268,10 @@ declare class IntegryJS {
252
268
  static SDK_VERSION: string;
253
269
  private config;
254
270
  private apiHandler;
255
- // private templateContainer: HTMLElement | null;
256
- // private renderMode: TemplateFormRenderModes | null = null;
257
271
  eventEmitter: EventEmitter<IntegrySDKEvents>;
258
272
  // allow customers to use template tagging
259
- // static html = html;
260
- // static Component = Component;
273
+ static html: (strings: TemplateStringsArray, ...values: any[]) => import("preact").VNode<{}>;
261
274
  static RenderModes: typeof TemplateFormRenderModes;
262
- // static Widgets: {
263
- // Template: typeof Template;
264
- // TemplatesView: typeof TemplatesView;
265
- // TemplateSearch: typeof TemplateSearch;
266
- // };
267
275
  static Helpers: {
268
276
  getAuthHash: (key: string, message: string) => Promise<string>;
269
277
  };