@epilot/app-client 0.0.20 → 0.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 +1 @@
1
- (()=>{"use strict";var e={187:function(e,r,t){var p=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0});var n=p(t(466));r.default=n.default},466:e=>{e.exports=JSON.parse('{"openapi":"3.0.3","info":{"title":"","version":""},"servers":[{"url":"https://app.sls.epilot.io"}],"paths":{"/v1/app-configurations":{"get":{"operationId":"listAppConfigurations","parameters":[{"name":"page","in":"query"},{"name":"pageSize","in":"query"}],"responses":{}},"post":{"operationId":"createAppConfiguration","requestBody":{"$ref":"#/components/requestBodies/CreateConfigRequest"},"responses":{}}},"/v1/app-configurations/{appId}":{"parameters":[{"name":"appId","in":"path","required":true,"description":"ID of the app configuration"}],"get":{"operationId":"getAppConfiguration","parameters":[{"name":"version","in":"query"}],"responses":{}},"patch":{"operationId":"patchConfigurationMetadata","requestBody":{"$ref":"#/components/requestBodies/PatchConfigMetadataRequest"},"responses":{}}},"/v1/app-configurations/{appId}/logo":{"parameters":[{"name":"appId","in":"path","required":true,"description":"ID of the app configuration"}],"post":{"operationId":"createLogoUploadUrl","requestBody":{"$ref":"#/components/requestBodies/CreateLogoRequest"},"responses":{}},"delete":{"operationId":"deleteLogo","responses":{}}},"/v1/app-configurations/{appId}/versions":{"get":{"operationId":"listAppVersions","parameters":[{"name":"appId","in":"path","required":true},{"name":"page","in":"query"},{"name":"pageSize","in":"query"}],"responses":{}}},"/v1/app-configurations/{appId}/versions/{version}":{"get":{"operationId":"getAppConfigurationVersion","parameters":[{"name":"appId","in":"path","required":true},{"name":"version","in":"path","required":true}],"responses":{}},"delete":{"operationId":"deleteAppVersion","parameters":[{"name":"appId","in":"path","required":true},{"name":"version","in":"path","required":true}],"responses":{}},"put":{"operationId":"updateAppVersion","parameters":[{"name":"appId","in":"path","required":true},{"name":"version","in":"path","required":true}],"requestBody":{"$ref":"#/components/requestBodies/UpdateVersionRequest"},"responses":{}}},"/v1/app-configurations/{appId}/versions/{sourceVersion}/clone-to/{targetVersion}":{"post":{"operationId":"cloneAppVersion","parameters":[{"name":"appId","in":"path","required":true},{"name":"sourceVersion","in":"path","required":true},{"name":"targetVersion","in":"path","required":true}],"responses":{}}},"/v1/app":{"get":{"operationId":"listInstalledApps","parameters":[{"name":"componentType","in":"query"},{"name":"enabled","in":"query"},{"name":"page","in":"query"},{"name":"pageSize","in":"query"}],"responses":{}}},"/v1/app/{appId}":{"get":{"operationId":"getInstalledApp","parameters":[{"name":"appId","in":"path","required":true}],"responses":{}},"put":{"operationId":"installApp","parameters":[{"name":"appId","in":"path","required":true}],"requestBody":{"$ref":"#/components/requestBodies/InstallAppRequest"},"responses":{}},"delete":{"operationId":"uninstallApp","parameters":[{"name":"appId","in":"path","required":true}],"responses":{}}},"/v1/app/{appId}/promote-to/{version}":{"post":{"operationId":"promoteAppVersion","parameters":[{"name":"appId","in":"path","required":true},{"name":"version","in":"path","required":true}],"responses":{}}}},"components":{"requestBodies":{"CreateLogoRequest":{"required":true,"content":{"application/json":{}}},"PatchConfigMetadataRequest":{"required":true,"content":{"application/json":{}}},"UpdateVersionRequest":{"required":true,"content":{"application/json":{}}},"CreateConfigRequest":{"required":true,"content":{"application/json":{}}},"InstallAppRequest":{"content":{"application/json":{}}}}}}')}},r={},t=function t(p){var n=r[p];if(void 0!==n)return n.exports;var a=r[p]={exports:{}};return e[p].call(a.exports,a,a.exports,t),a.exports}(187),p=exports;for(var n in t)p[n]=t[n];t.__esModule&&Object.defineProperty(p,"__esModule",{value:!0})})();
1
+ (()=>{"use strict";var e={187:function(e,r,t){var p=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0});var n=p(t(466));r.default=n.default},466:e=>{e.exports=JSON.parse('{"openapi":"3.0.3","info":{"title":"","version":""},"servers":[{"url":"https://app.sls.epilot.io"}],"paths":{"/v1/app-configurations":{"get":{"operationId":"listAppConfigurations","parameters":[{"name":"page","in":"query"},{"name":"pageSize","in":"query"}],"responses":{}},"post":{"operationId":"createAppConfiguration","requestBody":{"$ref":"#/components/requestBodies/CreateConfigRequest"},"responses":{}}},"/v1/app-configurations/{appId}":{"parameters":[{"name":"appId","in":"path","required":true,"description":"ID of the app configuration"}],"get":{"operationId":"getAppConfiguration","parameters":[{"name":"version","in":"query"}],"responses":{}},"patch":{"operationId":"patchConfigurationMetadata","requestBody":{"$ref":"#/components/requestBodies/PatchConfigMetadataRequest"},"responses":{}}},"/v1/app-configurations/{appId}/logo":{"parameters":[{"name":"appId","in":"path","required":true,"description":"ID of the app configuration"}],"post":{"operationId":"createLogoUploadUrl","requestBody":{"$ref":"#/components/requestBodies/CreateLogoRequest"},"responses":{}},"delete":{"operationId":"deleteLogo","responses":{}}},"/v1/app-configurations/{appId}/versions":{"get":{"operationId":"listAppVersions","parameters":[{"name":"appId","in":"path","required":true},{"name":"page","in":"query"},{"name":"pageSize","in":"query"}],"responses":{}}},"/v1/app-configurations/{appId}/versions/{version}":{"get":{"operationId":"getAppConfigurationVersion","parameters":[{"name":"appId","in":"path","required":true},{"name":"version","in":"path","required":true}],"responses":{}},"delete":{"operationId":"deleteAppVersion","parameters":[{"name":"appId","in":"path","required":true},{"name":"version","in":"path","required":true}],"responses":{}},"put":{"operationId":"updateAppVersion","parameters":[{"name":"appId","in":"path","required":true},{"name":"version","in":"path","required":true}],"requestBody":{"$ref":"#/components/requestBodies/UpdateVersionRequest"},"responses":{}}},"/v1/app-configurations/{appId}/versions/{sourceVersion}/clone-to/{targetVersion}":{"post":{"operationId":"cloneAppVersion","parameters":[{"name":"appId","in":"path","required":true},{"name":"sourceVersion","in":"path","required":true},{"name":"targetVersion","in":"path","required":true}],"responses":{}}},"/v1/app":{"get":{"operationId":"listInstalledApps","parameters":[{"name":"componentType","in":"query"},{"name":"enabled","in":"query"},{"name":"page","in":"query"},{"name":"pageSize","in":"query"}],"responses":{}}},"/v1/app/{appId}":{"get":{"operationId":"getInstalledApp","parameters":[{"name":"appId","in":"path","required":true}],"responses":{}},"post":{"operationId":"installApp","parameters":[{"name":"appId","in":"path","required":true}],"requestBody":{"$ref":"#/components/requestBodies/InstallAppRequest"},"responses":{}},"patch":{"operationId":"patchInstalledApp","parameters":[{"name":"appId","in":"path","required":true}],"requestBody":{"$ref":"#/components/requestBodies/InstallAppRequest"},"responses":{}},"delete":{"operationId":"uninstallApp","parameters":[{"name":"appId","in":"path","required":true}],"responses":{}}},"/v1/app/{appId}/promote-to/{version}":{"post":{"operationId":"promoteAppVersion","parameters":[{"name":"appId","in":"path","required":true},{"name":"version","in":"path","required":true}],"responses":{}}}},"components":{"requestBodies":{"CreateLogoRequest":{"required":true,"content":{"application/json":{}}},"PatchConfigMetadataRequest":{"required":true,"content":{"application/json":{}}},"UpdateVersionRequest":{"required":true,"content":{"application/json":{}}},"CreateConfigRequest":{"required":true,"content":{"application/json":{}}},"InstallAppRequest":{"content":{"application/json":{}}}}}}')}},r={},t=function t(p){var n=r[p];if(void 0!==n)return n.exports;var a=r[p]={exports:{}};return e[p].call(a.exports,a,a.exports,t),a.exports}(187),p=exports;for(var n in t)p[n]=t[n];t.__esModule&&Object.defineProperty(p,"__esModule",{value:!0})})();
@@ -214,7 +214,7 @@
214
214
  ],
215
215
  "responses": {}
216
216
  },
217
- "put": {
217
+ "post": {
218
218
  "operationId": "installApp",
219
219
  "parameters": [
220
220
  {
@@ -228,6 +228,20 @@
228
228
  },
229
229
  "responses": {}
230
230
  },
231
+ "patch": {
232
+ "operationId": "patchInstalledApp",
233
+ "parameters": [
234
+ {
235
+ "name": "appId",
236
+ "in": "path",
237
+ "required": true
238
+ }
239
+ ],
240
+ "requestBody": {
241
+ "$ref": "#/components/requestBodies/InstallAppRequest"
242
+ },
243
+ "responses": {}
244
+ },
231
245
  "delete": {
232
246
  "operationId": "uninstallApp",
233
247
  "parameters": [
package/dist/openapi.d.ts CHANGED
@@ -44,7 +44,6 @@ declare namespace Components {
44
44
  description?: Schemas.TranslatedString;
45
45
  category?: string;
46
46
  documentation_url?: string;
47
- homepage_url?: string;
48
47
  notifications?: Schemas.NotificationConfig;
49
48
  pricing?: Schemas.Pricing;
50
49
  /**
@@ -64,122 +63,104 @@ declare namespace Components {
64
63
  }
65
64
  }
66
65
  namespace Schemas {
67
- /**
68
- * Information about the installed app
69
- */
70
- export interface App {
71
- app_id?: string;
72
- name: TranslatedString;
73
- author?: Author;
74
- /**
75
- * List of available versions of the app
76
- */
77
- versions?: string[];
66
+ export interface Audit {
78
67
  /**
79
- * Email address for support requests
80
- */
81
- support_email?: string;
82
- /**
83
- * Latest version of the app
84
- */
85
- latest_version?: string;
86
- /**
87
- * Category of the app.
88
- */
89
- category?: string;
90
- /**
91
- * URL of the app icon.
92
- */
93
- icon_url?: string;
94
- /**
95
- * URL of the app documentation.
96
- */
97
- documentation_url?: string;
98
- /**
99
- * URL of the app homepage.
100
- */
101
- homepage_url?: string;
102
- description: TranslatedString;
103
- notifications?: NotificationConfig;
104
- /**
105
- * Organization ID of the app owner, required for private apps or sandbox accounts
106
- */
107
- owner_org_id?: string;
108
- /**
109
- * Flag to indicate if the app is built by epilot.
110
- */
111
- internal?: boolean;
112
- pricing?: Pricing;
113
- /**
114
- * Timestamp of app creation
68
+ * Timestamp of the creation
115
69
  */
116
70
  created_at?: string;
117
71
  /**
118
- * User ID of the user who created the app
72
+ * User ID of the creator
119
73
  */
120
74
  created_by?: string;
121
- components?: BaseComponent[];
122
75
  /**
123
- * Flag to indicate if the app is public.
76
+ * Timestamp of the last update
124
77
  */
125
- public?: boolean;
78
+ updated_at?: string;
126
79
  /**
127
- * Flag to indicate if the app is pending for verification
80
+ * User ID of the last updater
128
81
  */
129
- pending?: boolean;
82
+ updated_by?: string;
83
+ }
84
+ export interface Author {
130
85
  /**
131
- * Version of the app that is installed
86
+ * Name of the author
132
87
  */
133
- version?: string;
88
+ name?: string;
134
89
  /**
135
- * Timestamp of the last version update
90
+ * Company of the author
136
91
  */
137
- versioned_at?: string;
92
+ company: string;
138
93
  /**
139
- * User ID of the user who last updated the app
94
+ * Email of the author
140
95
  */
141
- versioned_by?: string;
96
+ email?: string;
97
+ }
98
+ export type BaseComponent = {
142
99
  /**
143
- * Flag to indicate if the app is in beta.
100
+ * Unique identifier for the component
144
101
  */
145
- is_beta?: boolean;
102
+ id: string;
103
+ name?: TranslatedString;
146
104
  /**
147
- * Timestamp of the last update
105
+ * List of options for the app component
148
106
  */
149
- updated_at?: string;
107
+ options?: /* Options for the component configuration */ Options[];
108
+ } & (JourneyBlockComponent | PortalExtensionComponent);
109
+ export interface BaseComponentCommon {
150
110
  /**
151
- * User ID of the user who last updated the app
111
+ * Unique identifier for the component
152
112
  */
153
- updated_by?: string;
113
+ id: string;
154
114
  /**
155
- * Unique identifier for the organization the app is installed in
115
+ * Name of the component
156
116
  */
157
- org_id?: string;
117
+ name?: TranslatedString;
158
118
  /**
159
- * Timestamp of app creation
119
+ * List of options for the app component
160
120
  */
161
- installed_at?: string;
121
+ options?: /* Options for the component configuration */ Options[];
122
+ }
123
+ /**
124
+ * How often the subscription is billed
125
+ */
126
+ export type BillingFrequency = "MONTHLY" | "QUARTERLY" | "YEARLY" | "CUSTOM";
127
+ export interface BooleanArg {
128
+ type?: "boolean";
129
+ }
130
+ export interface CallerIdentity {
162
131
  /**
163
- * User ID of the user who installed the app
132
+ * a human readable name of the caller (e.g. user name, token name or email address)
133
+ * example:
134
+ * manifest@epilot.cloud
164
135
  */
165
- installed_by?: string;
136
+ name?: any;
166
137
  /**
167
- * Flag to indicate if the app is enabled.
138
+ * epilot organization id
139
+ * example:
140
+ * 911690
168
141
  */
169
- enabled?: boolean;
142
+ org_id: string;
170
143
  /**
171
- * Configuration values for the app components options
144
+ * epilot user id, when called by a user
145
+ * example:
146
+ * 11001045
172
147
  */
173
- option_values?: OptionsRef[];
148
+ user_id?: string;
174
149
  /**
175
- * Version of the app that is installed
150
+ * token id, when called by API token
151
+ * example:
152
+ * api_5ZugdRXasLfWBypHi93Fk
176
153
  */
177
- installed_version?: string;
154
+ token_id?: string;
178
155
  }
156
+ /**
157
+ * Type of app component
158
+ */
159
+ export type ComponentType = "CUSTOM_JOURNEY_BLOCK" | "PORTAL_EXTENSION";
179
160
  /**
180
161
  * Configuration of the published app
181
162
  */
182
- export interface AppConfiguration {
163
+ export interface Configuration {
183
164
  app_id?: string;
184
165
  name: TranslatedString;
185
166
  author?: Author;
@@ -194,7 +175,7 @@ declare namespace Components {
194
175
  /**
195
176
  * Latest version of the app
196
177
  */
197
- latest_version?: string;
178
+ latest_version: string;
198
179
  /**
199
180
  * Category of the app.
200
181
  */
@@ -207,30 +188,19 @@ declare namespace Components {
207
188
  * URL of the app documentation.
208
189
  */
209
190
  documentation_url?: string;
210
- /**
211
- * URL of the app homepage.
212
- */
213
- homepage_url?: string;
214
191
  description: TranslatedString;
215
192
  notifications?: NotificationConfig;
216
193
  /**
217
194
  * Organization ID of the app owner, required for private apps or sandbox accounts
218
195
  */
219
- owner_org_id?: string;
196
+ owner_org_id: string;
220
197
  /**
221
198
  * Flag to indicate if the app is built by epilot.
222
199
  */
223
200
  internal?: boolean;
224
201
  pricing?: Pricing;
225
- /**
226
- * Timestamp of app creation
227
- */
228
- created_at?: string;
229
- /**
230
- * User ID of the user who created the app
231
- */
232
- created_by?: string;
233
- components?: BaseComponent[];
202
+ configuration_audit?: Audit;
203
+ components: BaseComponent[];
234
204
  /**
235
205
  * Flag to indicate if the app is public.
236
206
  */
@@ -242,26 +212,54 @@ declare namespace Components {
242
212
  /**
243
213
  * Version of the app that is installed
244
214
  */
245
- version?: string;
215
+ version: string;
246
216
  /**
247
- * Timestamp of the last version update
217
+ * Flag to indicate if the app is in beta.
248
218
  */
249
- versioned_at?: string;
219
+ is_beta?: boolean;
250
220
  /**
251
- * User ID of the user who last updated the app
221
+ * Timestamp when the app version is deprecated
252
222
  */
253
- versioned_by?: string;
223
+ deprecated_at?: string;
254
224
  /**
255
- * Flag to indicate if the app is in beta.
225
+ * Changelog for the app version
256
226
  */
257
- is_beta?: boolean;
258
- updated_at?: string;
259
- updated_by?: string;
227
+ changelog?: string;
228
+ /**
229
+ * Status of the review process
230
+ */
231
+ review_status?: "approved" | "rejected" | "pending";
232
+ version_audit: {
233
+ /**
234
+ * Timestamp of the creation
235
+ */
236
+ created_at?: string;
237
+ /**
238
+ * User ID of the creator
239
+ */
240
+ created_by?: string;
241
+ /**
242
+ * Timestamp of the last update
243
+ */
244
+ updated_at?: string;
245
+ /**
246
+ * User ID of the last updater
247
+ */
248
+ updated_by?: string;
249
+ /**
250
+ * Timestamp of the last version update
251
+ */
252
+ versioned_at?: string;
253
+ /**
254
+ * User ID of the user who last updated the app
255
+ */
256
+ versioned_by?: string;
257
+ };
260
258
  }
261
259
  /**
262
260
  * Basic metadata about your app configuration which does not get versioned
263
261
  */
264
- export interface AppMetadata {
262
+ export interface ConfigurationMetadata {
265
263
  app_id?: string;
266
264
  name: TranslatedString;
267
265
  author?: Author;
@@ -276,7 +274,7 @@ declare namespace Components {
276
274
  /**
277
275
  * Latest version of the app
278
276
  */
279
- latest_version?: string;
277
+ latest_version: string;
280
278
  /**
281
279
  * Category of the app.
282
280
  */
@@ -289,10 +287,6 @@ declare namespace Components {
289
287
  * URL of the app documentation.
290
288
  */
291
289
  documentation_url?: string;
292
- /**
293
- * URL of the app homepage.
294
- */
295
- homepage_url?: string;
296
290
  /**
297
291
  * Markdown description of the app.
298
292
  */
@@ -304,7 +298,7 @@ declare namespace Components {
304
298
  /**
305
299
  * Organization ID of the app owner, required for private apps or sandbox accounts
306
300
  */
307
- owner_org_id?: string;
301
+ owner_org_id: string;
308
302
  /**
309
303
  * Flag to indicate if the app is built by epilot.
310
304
  */
@@ -314,19 +308,15 @@ declare namespace Components {
314
308
  */
315
309
  pricing?: Pricing;
316
310
  /**
317
- * Timestamp of app creation
311
+ * Audit information for the app
318
312
  */
319
- created_at?: string;
320
- /**
321
- * User ID of the user who created the app
322
- */
323
- created_by?: string;
313
+ configuration_audit?: Audit;
324
314
  }
325
315
  /**
326
316
  * Configuration data about your app which is versionable
327
317
  */
328
- export interface AppVersioned {
329
- components?: BaseComponent[];
318
+ export interface ConfigurationVersion {
319
+ components: BaseComponent[];
330
320
  /**
331
321
  * Flag to indicate if the app is public.
332
322
  */
@@ -338,96 +328,50 @@ declare namespace Components {
338
328
  /**
339
329
  * Version of the app that is installed
340
330
  */
341
- version?: string;
342
- /**
343
- * Timestamp of the last version update
344
- */
345
- versioned_at?: string;
346
- /**
347
- * User ID of the user who last updated the app
348
- */
349
- versioned_by?: string;
331
+ version: string;
350
332
  /**
351
333
  * Flag to indicate if the app is in beta.
352
334
  */
353
335
  is_beta?: boolean;
354
- }
355
- export interface Author {
356
336
  /**
357
- * Name of the author
337
+ * Timestamp when the app version is deprecated
358
338
  */
359
- name?: string;
339
+ deprecated_at?: string;
360
340
  /**
361
- * Company of the author
362
- */
363
- company: string;
364
- /**
365
- * Email of the author
366
- */
367
- email?: string;
368
- }
369
- export type BaseComponent = {
370
- /**
371
- * Unique identifier for the component
372
- */
373
- id: string;
374
- name?: TranslatedString;
375
- /**
376
- * List of options for the app component
377
- */
378
- options?: /* Options for the component configuration */ Options[];
379
- } & (JourneyBlockComponent | PortalExtensionComponent);
380
- export interface BaseComponentCommon {
381
- /**
382
- * Unique identifier for the component
383
- */
384
- id: string;
385
- /**
386
- * Name of the component
387
- */
388
- name?: TranslatedString;
389
- /**
390
- * List of options for the app component
391
- */
392
- options?: /* Options for the component configuration */ Options[];
393
- }
394
- /**
395
- * How often the subscription is billed
396
- */
397
- export type BillingFrequency = "MONTHLY" | "QUARTERLY" | "YEARLY" | "CUSTOM";
398
- export interface BooleanArg {
399
- type?: "boolean";
400
- }
401
- export interface CallerIdentity {
402
- /**
403
- * a human readable name of the caller (e.g. user name, token name or email address)
404
- * example:
405
- * manifest@epilot.cloud
406
- */
407
- name?: any;
408
- /**
409
- * epilot organization id
410
- * example:
411
- * 911690
412
- */
413
- org_id: string;
414
- /**
415
- * epilot user id, when called by a user
416
- * example:
417
- * 11001045
341
+ * Changelog for the app version
418
342
  */
419
- user_id?: string;
343
+ changelog?: string;
420
344
  /**
421
- * token id, when called by API token
422
- * example:
423
- * api_5ZugdRXasLfWBypHi93Fk
345
+ * Status of the review process
424
346
  */
425
- token_id?: string;
347
+ review_status?: "approved" | "rejected" | "pending";
348
+ version_audit: {
349
+ /**
350
+ * Timestamp of the creation
351
+ */
352
+ created_at?: string;
353
+ /**
354
+ * User ID of the creator
355
+ */
356
+ created_by?: string;
357
+ /**
358
+ * Timestamp of the last update
359
+ */
360
+ updated_at?: string;
361
+ /**
362
+ * User ID of the last updater
363
+ */
364
+ updated_by?: string;
365
+ /**
366
+ * Timestamp of the last version update
367
+ */
368
+ versioned_at?: string;
369
+ /**
370
+ * User ID of the user who last updated the app
371
+ */
372
+ versioned_by?: string;
373
+ };
426
374
  }
427
- /**
428
- * Type of app component
429
- */
430
- export type ComponentType = "CUSTOM_JOURNEY_BLOCK" | "PORTAL_EXTENSION";
431
375
  export interface EnumArg {
432
376
  type?: "enum";
433
377
  /**
@@ -460,6 +404,36 @@ declare namespace Components {
460
404
  }[]
461
405
  ];
462
406
  }
407
+ /**
408
+ * Information about the installed app. Has configuration data of the installed version
409
+ */
410
+ export interface Installation {
411
+ /**
412
+ * Unique identifier for the organization the app is installed in
413
+ */
414
+ installer_org_id: string;
415
+ /**
416
+ * Flag to indicate if the app is enabled. Enabled is set to true when required option values are set.
417
+ */
418
+ enabled: boolean;
419
+ /**
420
+ * Name of the app
421
+ */
422
+ name: TranslatedString;
423
+ /**
424
+ * Configuration values for the app components
425
+ */
426
+ option_values?: OptionsRef[];
427
+ /**
428
+ * List of component configurations for the installed version
429
+ */
430
+ components: BaseComponent[];
431
+ /**
432
+ * Version of the app that is installed
433
+ */
434
+ installed_version: string;
435
+ installation_audit?: Audit;
436
+ }
463
437
  export interface JourneyBlockComponent {
464
438
  component_type: "CUSTOM_JOURNEY_BLOCK";
465
439
  configuration: JourneyBlockConfig;
@@ -505,7 +479,7 @@ declare namespace Components {
505
479
  * example:
506
480
  * developer@example.com
507
481
  */
508
- email?: string | null;
482
+ email?: string;
509
483
  /**
510
484
  * List of events to subscribe to
511
485
  */
@@ -602,7 +576,7 @@ declare namespace Components {
602
576
  }[];
603
577
  }
604
578
  export interface Pricing {
605
- pricing_type?: "FREE" | "SUBSCRIPTION" | "USAGE_BASED";
579
+ pricing_type?: "FREE" | "SUBSCRIPTION" | "USAGE_BASED" | "ONE_TIME" | "CUSTOM" | "UNKNOWN";
606
580
  billing_frequency?: /* How often the subscription is billed */ BillingFrequency;
607
581
  }
608
582
  export interface S3Reference {
@@ -726,7 +700,7 @@ declare namespace Paths {
726
700
  version?: Parameters.Version;
727
701
  }
728
702
  namespace Responses {
729
- export type $200 = /* Configuration of the published app */ Components.Schemas.AppConfiguration;
703
+ export type $200 = /* Information about the installed app. Has configuration data of the installed version */ Components.Schemas.Installation;
730
704
  export interface $404 {
731
705
  }
732
706
  }
@@ -741,7 +715,7 @@ declare namespace Paths {
741
715
  version: Parameters.Version;
742
716
  }
743
717
  namespace Responses {
744
- export type $200 = /* Configuration of the published app */ Components.Schemas.AppConfiguration;
718
+ export type $200 = /* Configuration of the published app */ Components.Schemas.Configuration;
745
719
  export interface $404 {
746
720
  }
747
721
  }
@@ -754,7 +728,7 @@ declare namespace Paths {
754
728
  appId: Parameters.AppId;
755
729
  }
756
730
  namespace Responses {
757
- export type $200 = /* Information about the installed app */ Components.Schemas.App;
731
+ export type $200 = /* Information about the installed app. Has configuration data of the installed version */ Components.Schemas.Installation;
758
732
  export interface $404 {
759
733
  }
760
734
  }
@@ -785,7 +759,7 @@ declare namespace Paths {
785
759
  }
786
760
  namespace Responses {
787
761
  export interface $200 {
788
- configurations?: /* Basic metadata about your app configuration which does not get versioned */ Components.Schemas.AppMetadata[];
762
+ configurations?: /* Basic metadata about your app configuration which does not get versioned */ Components.Schemas.ConfigurationMetadata[];
789
763
  pagination?: {
790
764
  total?: number;
791
765
  page?: number;
@@ -809,7 +783,7 @@ declare namespace Paths {
809
783
  }
810
784
  namespace Responses {
811
785
  export interface $200 {
812
- versions?: /* Configuration data about your app which is versionable */ Components.Schemas.AppVersioned[];
786
+ versions?: /* Configuration data about your app which is versionable */ Components.Schemas.ConfigurationVersion[];
813
787
  pagination?: {
814
788
  total?: number;
815
789
  page?: number;
@@ -833,7 +807,7 @@ declare namespace Paths {
833
807
  }
834
808
  namespace Responses {
835
809
  export interface $200 {
836
- apps?: /* Information about the installed app */ Components.Schemas.App[];
810
+ apps?: /* Information about the installed app. Has configuration data of the installed version */ Components.Schemas.Installation[];
837
811
  pagination?: {
838
812
  total?: number;
839
813
  page?: number;
@@ -851,6 +825,21 @@ declare namespace Paths {
851
825
  }
852
826
  }
853
827
  }
828
+ namespace PatchInstalledApp {
829
+ namespace Parameters {
830
+ export type AppId = string;
831
+ }
832
+ export interface PathParameters {
833
+ appId: Parameters.AppId;
834
+ }
835
+ export type RequestBody = Components.RequestBodies.InstallAppRequest;
836
+ namespace Responses {
837
+ export interface $204 {
838
+ }
839
+ export interface $404 {
840
+ }
841
+ }
842
+ }
854
843
  namespace PromoteAppVersion {
855
844
  namespace Parameters {
856
845
  export type AppId = string;
@@ -861,7 +850,7 @@ declare namespace Paths {
861
850
  version: Parameters.Version;
862
851
  }
863
852
  namespace Responses {
864
- export type $200 = /* Information about the installed app */ Components.Schemas.App;
853
+ export type $200 = /* Information about the installed app. Has configuration data of the installed version */ Components.Schemas.Installation;
865
854
  export interface $400 {
866
855
  }
867
856
  export interface $404 {
@@ -1060,6 +1049,16 @@ export interface OperationMethods {
1060
1049
  data?: Paths.InstallApp.RequestBody,
1061
1050
  config?: AxiosRequestConfig
1062
1051
  ): OperationResponse<Paths.InstallApp.Responses.$204>
1052
+ /**
1053
+ * patchInstalledApp - patchInstalledApp
1054
+ *
1055
+ * Patch an installed app by its ID.
1056
+ */
1057
+ 'patchInstalledApp'(
1058
+ parameters?: Parameters<Paths.PatchInstalledApp.PathParameters> | null,
1059
+ data?: Paths.PatchInstalledApp.RequestBody,
1060
+ config?: AxiosRequestConfig
1061
+ ): OperationResponse<Paths.PatchInstalledApp.Responses.$204>
1063
1062
  /**
1064
1063
  * uninstallApp - uninstallApp
1065
1064
  *
@@ -1233,11 +1232,21 @@ export interface PathsDictionary {
1233
1232
  *
1234
1233
  * Upsert app installation by its ID.
1235
1234
  */
1236
- 'put'(
1235
+ 'post'(
1237
1236
  parameters?: Parameters<Paths.InstallApp.PathParameters> | null,
1238
1237
  data?: Paths.InstallApp.RequestBody,
1239
1238
  config?: AxiosRequestConfig
1240
1239
  ): OperationResponse<Paths.InstallApp.Responses.$204>
1240
+ /**
1241
+ * patchInstalledApp - patchInstalledApp
1242
+ *
1243
+ * Patch an installed app by its ID.
1244
+ */
1245
+ 'patch'(
1246
+ parameters?: Parameters<Paths.PatchInstalledApp.PathParameters> | null,
1247
+ data?: Paths.PatchInstalledApp.RequestBody,
1248
+ config?: AxiosRequestConfig
1249
+ ): OperationResponse<Paths.PatchInstalledApp.Responses.$204>
1241
1250
  /**
1242
1251
  * uninstallApp - uninstallApp
1243
1252
  *
@@ -1265,10 +1274,7 @@ export interface PathsDictionary {
1265
1274
 
1266
1275
  export type Client = OpenAPIClient<OperationMethods, PathsDictionary>
1267
1276
 
1268
- export type App = Components.Schemas.App;
1269
- export type AppConfiguration = Components.Schemas.AppConfiguration;
1270
- export type AppMetadata = Components.Schemas.AppMetadata;
1271
- export type AppVersioned = Components.Schemas.AppVersioned;
1277
+ export type Audit = Components.Schemas.Audit;
1272
1278
  export type Author = Components.Schemas.Author;
1273
1279
  export type BaseComponent = Components.Schemas.BaseComponent;
1274
1280
  export type BaseComponentCommon = Components.Schemas.BaseComponentCommon;
@@ -1276,7 +1282,11 @@ export type BillingFrequency = Components.Schemas.BillingFrequency;
1276
1282
  export type BooleanArg = Components.Schemas.BooleanArg;
1277
1283
  export type CallerIdentity = Components.Schemas.CallerIdentity;
1278
1284
  export type ComponentType = Components.Schemas.ComponentType;
1285
+ export type Configuration = Components.Schemas.Configuration;
1286
+ export type ConfigurationMetadata = Components.Schemas.ConfigurationMetadata;
1287
+ export type ConfigurationVersion = Components.Schemas.ConfigurationVersion;
1279
1288
  export type EnumArg = Components.Schemas.EnumArg;
1289
+ export type Installation = Components.Schemas.Installation;
1280
1290
  export type JourneyBlockComponent = Components.Schemas.JourneyBlockComponent;
1281
1291
  export type JourneyBlockComponentArgs = Components.Schemas.JourneyBlockComponentArgs;
1282
1292
  export type JourneyBlockConfig = Components.Schemas.JourneyBlockConfig;
package/dist/openapi.json CHANGED
@@ -58,7 +58,7 @@
58
58
  "configurations": {
59
59
  "type": "array",
60
60
  "items": {
61
- "$ref": "#/components/schemas/AppMetadata"
61
+ "$ref": "#/components/schemas/ConfigurationMetadata"
62
62
  }
63
63
  },
64
64
  "pagination": {
@@ -143,7 +143,7 @@
143
143
  "content": {
144
144
  "application/json": {
145
145
  "schema": {
146
- "$ref": "#/components/schemas/AppConfiguration"
146
+ "$ref": "#/components/schemas/Installation"
147
147
  }
148
148
  }
149
149
  }
@@ -281,7 +281,7 @@
281
281
  "versions": {
282
282
  "type": "array",
283
283
  "items": {
284
- "$ref": "#/components/schemas/AppVersioned"
284
+ "$ref": "#/components/schemas/ConfigurationVersion"
285
285
  }
286
286
  },
287
287
  "pagination": {
@@ -337,7 +337,7 @@
337
337
  "content": {
338
338
  "application/json": {
339
339
  "schema": {
340
- "$ref": "#/components/schemas/AppConfiguration"
340
+ "$ref": "#/components/schemas/Configuration"
341
341
  }
342
342
  }
343
343
  }
@@ -548,7 +548,7 @@
548
548
  "apps": {
549
549
  "type": "array",
550
550
  "items": {
551
- "$ref": "#/components/schemas/App"
551
+ "$ref": "#/components/schemas/Installation"
552
552
  }
553
553
  },
554
554
  "pagination": {
@@ -590,21 +590,21 @@
590
590
  ],
591
591
  "responses": {
592
592
  "200": {
593
- "description": "Details about installed app.",
593
+ "description": "Details about an app installation.",
594
594
  "content": {
595
595
  "application/json": {
596
596
  "schema": {
597
- "$ref": "#/components/schemas/App"
597
+ "$ref": "#/components/schemas/Installation"
598
598
  }
599
599
  }
600
600
  }
601
601
  },
602
602
  "404": {
603
- "description": "App not found."
603
+ "description": "Installation not found."
604
604
  }
605
605
  }
606
606
  },
607
- "put": {
607
+ "post": {
608
608
  "summary": "installApp",
609
609
  "description": "Upsert app installation by its ID.",
610
610
  "operationId": "installApp",
@@ -623,7 +623,33 @@
623
623
  },
624
624
  "responses": {
625
625
  "204": {
626
- "description": "App installation updated successfully."
626
+ "description": "App successfully installed."
627
+ },
628
+ "404": {
629
+ "description": "App not found."
630
+ }
631
+ }
632
+ },
633
+ "patch": {
634
+ "summary": "patchInstalledApp",
635
+ "description": "Patch an installed app by its ID.",
636
+ "operationId": "patchInstalledApp",
637
+ "parameters": [
638
+ {
639
+ "name": "appId",
640
+ "in": "path",
641
+ "required": true,
642
+ "schema": {
643
+ "type": "string"
644
+ }
645
+ }
646
+ ],
647
+ "requestBody": {
648
+ "$ref": "#/components/requestBodies/InstallAppRequest"
649
+ },
650
+ "responses": {
651
+ "204": {
652
+ "description": "App installation patched successfully."
627
653
  },
628
654
  "404": {
629
655
  "description": "App not found."
@@ -683,7 +709,7 @@
683
709
  "content": {
684
710
  "application/json": {
685
711
  "schema": {
686
- "$ref": "#/components/schemas/App"
712
+ "$ref": "#/components/schemas/Installation"
687
713
  }
688
714
  }
689
715
  }
@@ -750,9 +776,6 @@
750
776
  "documentation_url": {
751
777
  "type": "string"
752
778
  },
753
- "homepage_url": {
754
- "type": "string"
755
- },
756
779
  "notifications": {
757
780
  "$ref": "#/components/schemas/NotificationConfig"
758
781
  },
@@ -976,15 +999,18 @@
976
999
  "properties": {
977
1000
  "name": {
978
1001
  "type": "string",
979
- "description": "Name of the author"
1002
+ "description": "Name of the author",
1003
+ "maxLength": 50
980
1004
  },
981
1005
  "company": {
982
1006
  "type": "string",
983
- "description": "Company of the author"
1007
+ "description": "Company of the author",
1008
+ "maxLength": 30
984
1009
  },
985
1010
  "email": {
986
1011
  "type": "string",
987
- "description": "Email of the author"
1012
+ "description": "Email of the author",
1013
+ "maxLength": 30
988
1014
  }
989
1015
  }
990
1016
  },
@@ -993,7 +1019,6 @@
993
1019
  "properties": {
994
1020
  "email": {
995
1021
  "type": "string",
996
- "nullable": true,
997
1022
  "description": "Email address to receive notifications",
998
1023
  "example": "developer@example.com"
999
1024
  },
@@ -1399,7 +1424,10 @@
1399
1424
  "enum": [
1400
1425
  "FREE",
1401
1426
  "SUBSCRIPTION",
1402
- "USAGE_BASED"
1427
+ "USAGE_BASED",
1428
+ "ONE_TIME",
1429
+ "CUSTOM",
1430
+ "UNKNOWN"
1403
1431
  ]
1404
1432
  },
1405
1433
  "billing_frequency": {
@@ -1407,12 +1435,40 @@
1407
1435
  }
1408
1436
  }
1409
1437
  },
1410
- "AppMetadata": {
1438
+ "Audit": {
1439
+ "type": "object",
1440
+ "properties": {
1441
+ "created_at": {
1442
+ "type": "string",
1443
+ "description": "Timestamp of the creation",
1444
+ "readOnly": true
1445
+ },
1446
+ "created_by": {
1447
+ "type": "string",
1448
+ "description": "User ID of the creator",
1449
+ "readOnly": true
1450
+ },
1451
+ "updated_at": {
1452
+ "type": "string",
1453
+ "description": "Timestamp of the last update",
1454
+ "readOnly": true
1455
+ },
1456
+ "updated_by": {
1457
+ "type": "string",
1458
+ "description": "User ID of the last updater",
1459
+ "readOnly": true
1460
+ }
1461
+ }
1462
+ },
1463
+ "ConfigurationMetadata": {
1411
1464
  "description": "Basic metadata about your app configuration which does not get versioned",
1412
1465
  "type": "object",
1413
1466
  "required": [
1414
1467
  "name",
1415
- "description"
1468
+ "description",
1469
+ "latest_version",
1470
+ "owner_org_id",
1471
+ "has_public_version"
1416
1472
  ],
1417
1473
  "properties": {
1418
1474
  "app_id": {
@@ -1454,10 +1510,6 @@
1454
1510
  "type": "string",
1455
1511
  "description": "URL of the app documentation."
1456
1512
  },
1457
- "homepage_url": {
1458
- "type": "string",
1459
- "description": "URL of the app homepage."
1460
- },
1461
1513
  "description": {
1462
1514
  "$ref": "#/components/schemas/TranslatedString",
1463
1515
  "description": "Markdown description of the app."
@@ -1481,27 +1533,28 @@
1481
1533
  "$ref": "#/components/schemas/Pricing",
1482
1534
  "description": "Pricing information for the app"
1483
1535
  },
1484
- "created_at": {
1485
- "type": "string",
1486
- "description": "Timestamp of app creation",
1487
- "readOnly": true
1488
- },
1489
- "created_by": {
1490
- "type": "string",
1491
- "description": "User ID of the user who created the app",
1536
+ "configuration_audit": {
1537
+ "$ref": "#/components/schemas/Audit",
1538
+ "description": "Audit information for the app",
1492
1539
  "readOnly": true
1493
1540
  }
1494
1541
  }
1495
1542
  },
1496
- "AppVersioned": {
1543
+ "ConfigurationVersion": {
1497
1544
  "description": "Configuration data about your app which is versionable",
1498
1545
  "type": "object",
1546
+ "required": [
1547
+ "version",
1548
+ "components",
1549
+ "version_audit"
1550
+ ],
1499
1551
  "properties": {
1500
1552
  "components": {
1501
1553
  "type": "array",
1502
1554
  "items": {
1503
1555
  "$ref": "#/components/schemas/BaseComponent"
1504
- }
1556
+ },
1557
+ "minItems": 0
1505
1558
  },
1506
1559
  "public": {
1507
1560
  "type": "boolean",
@@ -1518,107 +1571,121 @@
1518
1571
  "version": {
1519
1572
  "type": "string",
1520
1573
  "description": "Version of the app that is installed",
1574
+ "readOnly": true,
1575
+ "maxLength": 10
1576
+ },
1577
+ "is_beta": {
1578
+ "type": "boolean",
1579
+ "description": "Flag to indicate if the app is in beta.",
1521
1580
  "readOnly": true
1522
1581
  },
1523
- "versioned_at": {
1582
+ "deprecated_at": {
1524
1583
  "type": "string",
1525
- "description": "Timestamp of the last version update",
1526
- "readOnly": true
1584
+ "description": "Timestamp when the app version is deprecated"
1527
1585
  },
1528
- "versioned_by": {
1586
+ "changelog": {
1529
1587
  "type": "string",
1530
- "description": "User ID of the user who last updated the app",
1531
- "readOnly": true
1588
+ "description": "Changelog for the app version",
1589
+ "maxLength": 250
1532
1590
  },
1533
- "is_beta": {
1534
- "type": "boolean",
1535
- "description": "Flag to indicate if the app is in beta."
1591
+ "review_status": {
1592
+ "type": "string",
1593
+ "enum": [
1594
+ "approved",
1595
+ "rejected",
1596
+ "pending"
1597
+ ],
1598
+ "description": "Status of the review process"
1599
+ },
1600
+ "version_audit": {
1601
+ "readOnly": true,
1602
+ "allOf": [
1603
+ {
1604
+ "$ref": "#/components/schemas/Audit"
1605
+ },
1606
+ {
1607
+ "type": "object",
1608
+ "properties": {
1609
+ "versioned_at": {
1610
+ "type": "string",
1611
+ "description": "Timestamp of the last version update",
1612
+ "readOnly": true
1613
+ },
1614
+ "versioned_by": {
1615
+ "type": "string",
1616
+ "description": "User ID of the user who last updated the app",
1617
+ "readOnly": true
1618
+ }
1619
+ }
1620
+ }
1621
+ ]
1536
1622
  }
1537
1623
  }
1538
1624
  },
1539
- "App": {
1540
- "allOf": [
1541
- {
1542
- "$ref": "#/components/schemas/AppConfiguration"
1543
- }
1544
- ],
1545
- "description": "Information about the installed app",
1625
+ "Installation": {
1626
+ "description": "Information about the installed app. Has configuration data of the installed version",
1546
1627
  "type": "object",
1628
+ "required": [
1629
+ "installer_org_id",
1630
+ "enabled",
1631
+ "name",
1632
+ "components",
1633
+ "installed_version"
1634
+ ],
1547
1635
  "properties": {
1548
- "org_id": {
1636
+ "installer_org_id": {
1549
1637
  "type": "string",
1550
1638
  "description": "Unique identifier for the organization the app is installed in",
1551
1639
  "readOnly": true
1552
1640
  },
1553
- "installed_at": {
1554
- "type": "string",
1555
- "description": "Timestamp of app creation",
1556
- "readOnly": true
1557
- },
1558
- "installed_by": {
1559
- "type": "string",
1560
- "description": "User ID of the user who installed the app",
1561
- "readOnly": true
1562
- },
1563
- "updated_by": {
1564
- "type": "string",
1565
- "description": "User ID of the user who last updated the app",
1566
- "readOnly": true
1567
- },
1568
- "updated_at": {
1569
- "type": "string",
1570
- "description": "Timestamp of the last update",
1571
- "readOnly": true
1572
- },
1573
1641
  "enabled": {
1574
1642
  "readOnly": true,
1575
1643
  "type": "boolean",
1576
1644
  "default": true,
1577
- "description": "Flag to indicate if the app is enabled."
1645
+ "description": "Flag to indicate if the app is enabled. Enabled is set to true when required option values are set."
1646
+ },
1647
+ "name": {
1648
+ "$ref": "#/components/schemas/TranslatedString",
1649
+ "description": "Name of the app",
1650
+ "readOnly": true
1578
1651
  },
1579
1652
  "option_values": {
1580
- "description": "Configuration values for the app components options",
1581
1653
  "type": "array",
1582
1654
  "items": {
1583
1655
  "$ref": "#/components/schemas/OptionsRef"
1584
- }
1656
+ },
1657
+ "description": "Configuration values for the app components"
1658
+ },
1659
+ "components": {
1660
+ "description": "List of component configurations for the installed version",
1661
+ "type": "array",
1662
+ "items": {
1663
+ "$ref": "#/components/schemas/BaseComponent"
1664
+ },
1665
+ "minLength": 0,
1666
+ "readOnly": true
1585
1667
  },
1586
1668
  "installed_version": {
1587
1669
  "type": "string",
1588
1670
  "description": "Version of the app that is installed",
1589
1671
  "readOnly": true
1672
+ },
1673
+ "installation_audit": {
1674
+ "$ref": "#/components/schemas/Audit",
1675
+ "readOnly": true
1590
1676
  }
1591
1677
  }
1592
1678
  },
1593
- "AppConfiguration": {
1679
+ "Configuration": {
1680
+ "description": "Configuration of the published app",
1594
1681
  "allOf": [
1595
1682
  {
1596
- "$ref": "#/components/schemas/AppMetadata"
1683
+ "$ref": "#/components/schemas/ConfigurationMetadata"
1597
1684
  },
1598
1685
  {
1599
- "$ref": "#/components/schemas/AppVersioned"
1600
- }
1601
- ],
1602
- "type": "object",
1603
- "description": "Configuration of the published app",
1604
- "properties": {
1605
- "created_by": {
1606
- "type": "string",
1607
- "readOnly": true
1608
- },
1609
- "created_at": {
1610
- "type": "string",
1611
- "readOnly": true
1612
- },
1613
- "updated_at": {
1614
- "type": "string",
1615
- "readOnly": true
1616
- },
1617
- "updated_by": {
1618
- "type": "string",
1619
- "readOnly": true
1686
+ "$ref": "#/components/schemas/ConfigurationVersion"
1620
1687
  }
1621
- }
1688
+ ]
1622
1689
  },
1623
1690
  "TranslatedString": {
1624
1691
  "type": "object",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epilot/app-client",
3
- "version": "0.0.20",
3
+ "version": "0.1.0",
4
4
  "description": "JavaScript client library for the epilot App API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",