@integry/sdk 0.0.83 → 0.0.87

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,8 +1,8 @@
1
1
  type IntegrySDKEvents = {
2
- "should-load-template": ({ templateId }: {
2
+ "should-load-flow": ({ templateId }: {
3
3
  templateId: number;
4
4
  }) => void;
5
- "did-load-template": (data: {
5
+ "did-load-flow": (data: {
6
6
  templateId: number;
7
7
  templateTitle: string;
8
8
  templateDescription: string;
@@ -57,62 +57,11 @@ interface ConfigWithObject extends SDKConfig {
57
57
  appKey: string;
58
58
  hash: string;
59
59
  userId: string;
60
- bundleId: string;
60
+ deploymentId: string;
61
61
  }
62
62
  interface ConfigWithUrlParams extends SDKConfig {
63
63
  useUrlParams?: boolean;
64
64
  }
65
- interface Template {
66
- id: number;
67
- name: string;
68
- description: string;
69
- can_add_integration: boolean;
70
- integration_count: number;
71
- app: {
72
- icon_url: string;
73
- category: string[];
74
- tags: string;
75
- };
76
- branding_app: {
77
- icon_url: string;
78
- category: string[];
79
- tags: string;
80
- };
81
- }
82
- interface Integration {
83
- name: string;
84
- branding_app: {
85
- icon_url: string;
86
- category: string[];
87
- tags: string;
88
- };
89
- id: number;
90
- runs_count: number;
91
- bundle_instance: number;
92
- created: Date;
93
- delete_link: string;
94
- disable_link: string;
95
- edit_link: string;
96
- enable_link: string;
97
- icon_url: string;
98
- is_visible: number;
99
- last_modified: Date;
100
- status: string;
101
- template: number;
102
- task_execution: {
103
- integration_created_at: Date;
104
- last_execution_at: {
105
- date: Date;
106
- timezone: string;
107
- timezone_type: number;
108
- } | null;
109
- status: string | null;
110
- };
111
- }
112
- interface BundleResponse {
113
- templates: Template[];
114
- integrations: Integration[];
115
- }
116
65
  type App = {
117
66
  id: number;
118
67
  name: string;
@@ -282,25 +231,27 @@ declare class IntegryJS {
282
231
  * @param length Length of string to randomly generate
283
232
  * @returns {string} Returns a random string
284
233
  */
285
- private getRandomTemplateId;
234
+ private getRandomFlowId;
286
235
  private getAuthParamsFromUrl;
287
236
  /**
288
237
  * Prints version number of this SDK version
289
238
  */
290
239
  printVersion: () => void;
291
- getTemplatesList: () => Promise<BundleResponse | null>;
292
240
  /**
293
241
  *
294
242
  * @param renderMode
295
243
  * @param templateContainerId
296
244
  * @returns {HTMLElement | null}
297
245
  */
298
- private setupTemplateFormDestination;
246
+ private setupFlowFormDestination;
299
247
  /**
300
248
  * Render the template form we ship
301
- * @param templateId
249
+ * @param data
302
250
  */
303
- renderTemplateForm: (templateId: string, templateContainerId: string) => void;
251
+ renderFlowSetupForm: (data: {
252
+ flowId?: string;
253
+ flowContainerId: string;
254
+ }) => void;
304
255
  /**
305
256
  * Render the template form we ship
306
257
  * @param templateId