@epilot/app-client 0.3.5 → 0.4.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.
package/dist/openapi.d.ts CHANGED
@@ -111,13 +111,37 @@ declare namespace Components {
111
111
  * Unique identifier for the component
112
112
  */
113
113
  id: string;
114
- name?: TranslatedString;
115
- description?: TranslatedString;
114
+ /**
115
+ * Name of the component
116
+ */
117
+ name?: {
118
+ /**
119
+ * English translation
120
+ */
121
+ en?: string | null;
122
+ /**
123
+ * German translation
124
+ */
125
+ de: string;
126
+ };
127
+ /**
128
+ * Description of the component
129
+ */
130
+ description?: {
131
+ /**
132
+ * English translation
133
+ */
134
+ en?: string | null;
135
+ /**
136
+ * German translation
137
+ */
138
+ de: string;
139
+ };
116
140
  /**
117
141
  * List of options for the app component
118
142
  */
119
143
  options?: /* Options for the component configuration */ Options[];
120
- } & (JourneyBlockComponent | PortalExtensionComponent);
144
+ } & (JourneyBlockComponent | PortalExtensionComponent | CustomFlowActionComponent);
121
145
  export interface BaseComponentCommon {
122
146
  /**
123
147
  * Unique identifier for the component
@@ -126,16 +150,92 @@ declare namespace Components {
126
150
  /**
127
151
  * Name of the component
128
152
  */
129
- name?: TranslatedString;
153
+ name?: {
154
+ /**
155
+ * English translation
156
+ */
157
+ en?: string | null;
158
+ /**
159
+ * German translation
160
+ */
161
+ de: string;
162
+ };
130
163
  /**
131
164
  * Description of the component
132
165
  */
133
- description?: TranslatedString;
166
+ description?: {
167
+ /**
168
+ * English translation
169
+ */
170
+ en?: string | null;
171
+ /**
172
+ * German translation
173
+ */
174
+ de: string;
175
+ };
134
176
  /**
135
177
  * List of options for the app component
136
178
  */
137
179
  options?: /* Options for the component configuration */ Options[];
138
180
  }
181
+ export interface BaseCustomActionConfig {
182
+ /**
183
+ * Name of the custom action
184
+ */
185
+ name?: string;
186
+ /**
187
+ * Description of the custom action
188
+ */
189
+ description?: string;
190
+ /**
191
+ * The ID of the app to fetch configuration from the app API
192
+ * example:
193
+ * c451c26a-cc7a-4c1c-92bf-1c6246cbfe88
194
+ */
195
+ app_id: string;
196
+ /**
197
+ * The ID of the component from the app. As the app can potentially have multiple custom actions, this ID is used to identify the component
198
+ * example:
199
+ * 2f1c26a-cc7a-4c1c-92bf-1c6246cbfe88
200
+ */
201
+ component_id: string;
202
+ }
203
+ export interface BasicCustomActionConfig {
204
+ /**
205
+ * Name of the custom action
206
+ */
207
+ name?: string;
208
+ /**
209
+ * Description of the custom action
210
+ */
211
+ description?: string;
212
+ /**
213
+ * The ID of the app to fetch configuration from the app API
214
+ * example:
215
+ * c451c26a-cc7a-4c1c-92bf-1c6246cbfe88
216
+ */
217
+ app_id: string;
218
+ /**
219
+ * The ID of the component from the app. As the app can potentially have multiple custom actions, this ID is used to identify the component
220
+ * example:
221
+ * 2f1c26a-cc7a-4c1c-92bf-1c6246cbfe88
222
+ */
223
+ component_id: string;
224
+ type: "basic";
225
+ basic_settings?: {
226
+ /**
227
+ * URL to call
228
+ */
229
+ url?: string;
230
+ headers?: {
231
+ [name: string]: any;
232
+ };
233
+ /**
234
+ * SSM Reference to the auth token to use for the request
235
+ */
236
+ auth_token_ref?: string;
237
+ };
238
+ }
139
239
  /**
140
240
  * How often the subscription is billed
141
241
  */
@@ -172,7 +272,7 @@ declare namespace Components {
172
272
  /**
173
273
  * Type of app component
174
274
  */
175
- export type ComponentType = "CUSTOM_JOURNEY_BLOCK" | "PORTAL_EXTENSION";
275
+ export type ComponentType = "CUSTOM_JOURNEY_BLOCK" | "PORTAL_EXTENSION" | "CUSTOM_FLOW_ACTION";
176
276
  /**
177
277
  * Configuration of the published app
178
278
  */
@@ -211,8 +311,34 @@ declare namespace Components {
211
311
  * URL of the app documentation.
212
312
  */
213
313
  documentation_url?: string;
214
- description: TranslatedString;
215
- notifications?: NotificationConfig;
314
+ /**
315
+ * Markdown description of the app.
316
+ */
317
+ description: {
318
+ /**
319
+ * English translation
320
+ */
321
+ en?: string | null;
322
+ /**
323
+ * German translation
324
+ */
325
+ de: string;
326
+ };
327
+ /**
328
+ * Configuration for developer notifications
329
+ */
330
+ notifications?: {
331
+ /**
332
+ * Email address to receive notifications
333
+ * example:
334
+ * developer@example.com
335
+ */
336
+ email?: string; // email
337
+ /**
338
+ * List of events to subscribe to
339
+ */
340
+ events?: NotificationEvent[];
341
+ };
216
342
  /**
217
343
  * Organization ID of the app owner
218
344
  */
@@ -221,8 +347,34 @@ declare namespace Components {
221
347
  * Flag to indicate if the app is built by epilot.
222
348
  */
223
349
  internal?: boolean;
224
- pricing?: Pricing;
225
- configuration_audit?: Audit;
350
+ /**
351
+ * Pricing information for the app
352
+ */
353
+ pricing?: {
354
+ pricing_type?: "FREE" | "SUBSCRIPTION" | "USAGE_BASED" | "ONE_TIME" | "CUSTOM" | "UNKNOWN";
355
+ billing_frequency?: /* How often the subscription is billed */ BillingFrequency;
356
+ };
357
+ /**
358
+ * Audit information for the app
359
+ */
360
+ configuration_audit?: {
361
+ /**
362
+ * Timestamp of the creation
363
+ */
364
+ created_at?: string;
365
+ /**
366
+ * User ID of the creator
367
+ */
368
+ created_by?: string;
369
+ /**
370
+ * Timestamp of the last update
371
+ */
372
+ updated_at?: string;
373
+ /**
374
+ * User ID of the last updater
375
+ */
376
+ updated_by?: string;
377
+ };
226
378
  components: BaseComponent[];
227
379
  /**
228
380
  * Flag to indicate if the app is public.
@@ -320,11 +472,31 @@ declare namespace Components {
320
472
  /**
321
473
  * Markdown description of the app.
322
474
  */
323
- description: TranslatedString;
475
+ description: {
476
+ /**
477
+ * English translation
478
+ */
479
+ en?: string | null;
480
+ /**
481
+ * German translation
482
+ */
483
+ de: string;
484
+ };
324
485
  /**
325
486
  * Configuration for developer notifications
326
487
  */
327
- notifications?: NotificationConfig;
488
+ notifications?: {
489
+ /**
490
+ * Email address to receive notifications
491
+ * example:
492
+ * developer@example.com
493
+ */
494
+ email?: string; // email
495
+ /**
496
+ * List of events to subscribe to
497
+ */
498
+ events?: NotificationEvent[];
499
+ };
328
500
  /**
329
501
  * Organization ID of the app owner, required for private apps or sandbox accounts
330
502
  */
@@ -336,11 +508,31 @@ declare namespace Components {
336
508
  /**
337
509
  * Pricing information for the app
338
510
  */
339
- pricing?: Pricing;
511
+ pricing?: {
512
+ pricing_type?: "FREE" | "SUBSCRIPTION" | "USAGE_BASED" | "ONE_TIME" | "CUSTOM" | "UNKNOWN";
513
+ billing_frequency?: /* How often the subscription is billed */ BillingFrequency;
514
+ };
340
515
  /**
341
516
  * Audit information for the app
342
517
  */
343
- configuration_audit?: Audit;
518
+ configuration_audit?: {
519
+ /**
520
+ * Timestamp of the creation
521
+ */
522
+ created_at?: string;
523
+ /**
524
+ * User ID of the creator
525
+ */
526
+ created_by?: string;
527
+ /**
528
+ * Timestamp of the last update
529
+ */
530
+ updated_at?: string;
531
+ /**
532
+ * User ID of the last updater
533
+ */
534
+ updated_by?: string;
535
+ };
344
536
  }
345
537
  /**
346
538
  * Configuration data about your app which is versionable
@@ -407,6 +599,11 @@ declare namespace Components {
407
599
  versioned_by?: string;
408
600
  };
409
601
  }
602
+ export interface CustomFlowActionComponent {
603
+ component_type: "CUSTOM_FLOW_ACTION";
604
+ configuration: CustomFlowConfig;
605
+ }
606
+ export type CustomFlowConfig = BasicCustomActionConfig;
410
607
  export interface EnumArg {
411
608
  type?: "enum";
412
609
  /**
@@ -425,7 +622,16 @@ declare namespace Components {
425
622
  /**
426
623
  * Display label for the option
427
624
  */
428
- label: TranslatedString;
625
+ label: {
626
+ /**
627
+ * English translation
628
+ */
629
+ en?: string | null;
630
+ /**
631
+ * German translation
632
+ */
633
+ de: string;
634
+ };
429
635
  },
430
636
  ...{
431
637
  /**
@@ -435,7 +641,16 @@ declare namespace Components {
435
641
  /**
436
642
  * Display label for the option
437
643
  */
438
- label: TranslatedString;
644
+ label: {
645
+ /**
646
+ * English translation
647
+ */
648
+ en?: string | null;
649
+ /**
650
+ * German translation
651
+ */
652
+ de: string;
653
+ };
439
654
  }[]
440
655
  ];
441
656
  }
@@ -471,7 +686,27 @@ declare namespace Components {
471
686
  * Version of the app that is installed
472
687
  */
473
688
  installed_version: string;
474
- installation_audit?: Audit;
689
+ /**
690
+ * Audit information for the app
691
+ */
692
+ installation_audit?: {
693
+ /**
694
+ * Timestamp of the creation
695
+ */
696
+ created_at?: string;
697
+ /**
698
+ * User ID of the creator
699
+ */
700
+ created_by?: string;
701
+ /**
702
+ * Timestamp of the last update
703
+ */
704
+ updated_at?: string;
705
+ /**
706
+ * User ID of the last updater
707
+ */
708
+ updated_by?: string;
709
+ };
475
710
  }
476
711
  export interface JourneyBlockComponent {
477
712
  component_type: "CUSTOM_JOURNEY_BLOCK";
@@ -487,8 +722,32 @@ declare namespace Components {
487
722
  * Flag to indicate if this option is required
488
723
  */
489
724
  required?: boolean;
490
- description?: TranslatedString;
491
- label: TranslatedString;
725
+ /**
726
+ * Description of what this component arg does
727
+ */
728
+ description?: {
729
+ /**
730
+ * English translation
731
+ */
732
+ en?: string | null;
733
+ /**
734
+ * German translation
735
+ */
736
+ de: string;
737
+ };
738
+ /**
739
+ * Human-readable label for the component arg
740
+ */
741
+ label: {
742
+ /**
743
+ * English translation
744
+ */
745
+ en?: string | null;
746
+ /**
747
+ * German translation
748
+ */
749
+ de: string;
750
+ };
492
751
  } & (TextArg | BooleanArg | EnumArg);
493
752
  export interface JourneyBlockConfig {
494
753
  /**
@@ -658,11 +917,23 @@ declare namespace Components {
658
917
  /**
659
918
  * Markdown description of the app.
660
919
  */
661
- description?: TranslatedString;
920
+ description?: {
921
+ /**
922
+ * English translation
923
+ */
924
+ en?: string | null;
925
+ /**
926
+ * German translation
927
+ */
928
+ de: string;
929
+ };
662
930
  /**
663
931
  * Pricing information for the app
664
932
  */
665
- pricing?: Pricing;
933
+ pricing?: {
934
+ pricing_type?: "FREE" | "SUBSCRIPTION" | "USAGE_BASED" | "ONE_TIME" | "CUSTOM" | "UNKNOWN";
935
+ billing_frequency?: /* How often the subscription is billed */ BillingFrequency;
936
+ };
666
937
  components: BaseComponent[];
667
938
  /**
668
939
  * Flag to indicate if the app is in beta.
@@ -676,6 +947,10 @@ declare namespace Components {
676
947
  * Version of the app that is installed
677
948
  */
678
949
  version: string;
950
+ /**
951
+ * Flag to indicate if the app is public.
952
+ */
953
+ public?: boolean;
679
954
  }
680
955
  export interface S3Reference {
681
956
  /**
@@ -704,12 +979,6 @@ declare namespace Components {
704
979
  */
705
980
  de: string;
706
981
  }
707
- export interface UploadFilePayload {
708
- /**
709
- * ID of the app configuration. Required for app updates.
710
- */
711
- app_id?: string;
712
- }
713
982
  }
714
983
  }
715
984
  declare namespace Paths {
@@ -1556,6 +1825,8 @@ export type Audit = Components.Schemas.Audit;
1556
1825
  export type Author = Components.Schemas.Author;
1557
1826
  export type BaseComponent = Components.Schemas.BaseComponent;
1558
1827
  export type BaseComponentCommon = Components.Schemas.BaseComponentCommon;
1828
+ export type BaseCustomActionConfig = Components.Schemas.BaseCustomActionConfig;
1829
+ export type BasicCustomActionConfig = Components.Schemas.BasicCustomActionConfig;
1559
1830
  export type BillingFrequency = Components.Schemas.BillingFrequency;
1560
1831
  export type BooleanArg = Components.Schemas.BooleanArg;
1561
1832
  export type CallerIdentity = Components.Schemas.CallerIdentity;
@@ -1563,6 +1834,8 @@ export type ComponentType = Components.Schemas.ComponentType;
1563
1834
  export type Configuration = Components.Schemas.Configuration;
1564
1835
  export type ConfigurationMetadata = Components.Schemas.ConfigurationMetadata;
1565
1836
  export type ConfigurationVersion = Components.Schemas.ConfigurationVersion;
1837
+ export type CustomFlowActionComponent = Components.Schemas.CustomFlowActionComponent;
1838
+ export type CustomFlowConfig = Components.Schemas.CustomFlowConfig;
1566
1839
  export type EnumArg = Components.Schemas.EnumArg;
1567
1840
  export type Installation = Components.Schemas.Installation;
1568
1841
  export type JourneyBlockComponent = Components.Schemas.JourneyBlockComponent;
@@ -1581,4 +1854,3 @@ export type PublicConfiguration = Components.Schemas.PublicConfiguration;
1581
1854
  export type S3Reference = Components.Schemas.S3Reference;
1582
1855
  export type TextArg = Components.Schemas.TextArg;
1583
1856
  export type TranslatedString = Components.Schemas.TranslatedString;
1584
- export type UploadFilePayload = Components.Schemas.UploadFilePayload;
package/dist/openapi.json CHANGED
@@ -5,6 +5,16 @@
5
5
  "description": "API for managing app publishing and installed app.",
6
6
  "version": "1.0.0"
7
7
  },
8
+ "tags": [
9
+ {
10
+ "name": "App Configuration",
11
+ "description": "Create and manage app configurations"
12
+ },
13
+ {
14
+ "name": "App Installation",
15
+ "description": "Install and uninstall apps"
16
+ }
17
+ ],
8
18
  "servers": [
9
19
  {
10
20
  "url": "https://app.sls.epilot.io"
@@ -27,6 +37,9 @@
27
37
  "summary": "listConfigurations",
28
38
  "description": "List all app configuration metadata owned by an organization. To get full app configuration details, use the /v1/app-configurations/{appId} endpoint.",
29
39
  "operationId": "listConfigurations",
40
+ "tags": [
41
+ "App Configuration"
42
+ ],
30
43
  "parameters": [
31
44
  {
32
45
  "name": "page",
@@ -86,6 +99,9 @@
86
99
  "summary": "createConfiguration",
87
100
  "description": "Create a new private app configuration. To make it public a verification process needs to be triggered",
88
101
  "operationId": "createConfiguration",
102
+ "tags": [
103
+ "App Configuration"
104
+ ],
89
105
  "requestBody": {
90
106
  "$ref": "#/components/requestBodies/CreateConfigRequest"
91
107
  },
@@ -127,6 +143,9 @@
127
143
  "summary": "getPublicConfiguration",
128
144
  "description": "Retrieve the public configuration of an app to install in your tenant",
129
145
  "operationId": "getPublicConfiguration",
146
+ "tags": [
147
+ "App Configuration"
148
+ ],
130
149
  "parameters": [
131
150
  {
132
151
  "name": "version",
@@ -170,6 +189,9 @@
170
189
  "summary": "getConfiguration",
171
190
  "description": "Retrieve a specific app configuration",
172
191
  "operationId": "getConfiguration",
192
+ "tags": [
193
+ "App Configuration"
194
+ ],
173
195
  "parameters": [
174
196
  {
175
197
  "name": "version",
@@ -200,6 +222,9 @@
200
222
  "summary": "patchMetadata",
201
223
  "description": "Patch non-versioned configuration metadata of a given app configuration.",
202
224
  "operationId": "patchMetadata",
225
+ "tags": [
226
+ "App Configuration"
227
+ ],
203
228
  "requestBody": {
204
229
  "$ref": "#/components/requestBodies/PatchConfigMetadataRequest"
205
230
  },
@@ -218,6 +243,9 @@
218
243
  "summary": "createBundleUploadUrl",
219
244
  "description": "Generate a presigned URL for uploading app bundle to /<app-id>/bundle.zip path",
220
245
  "operationId": "createBundleUploadUrl",
246
+ "tags": [
247
+ "App Configuration"
248
+ ],
221
249
  "parameters": [
222
250
  {
223
251
  "name": "appId",
@@ -290,6 +318,9 @@
290
318
  "summary": "createLogoUploadUrl",
291
319
  "description": "Generate a presigned URL for uploading app logo to /<app-id>/logo.png path",
292
320
  "operationId": "createLogoUploadUrl",
321
+ "tags": [
322
+ "App Configuration"
323
+ ],
293
324
  "requestBody": {
294
325
  "$ref": "#/components/requestBodies/CreateLogoPresignedRequest"
295
326
  },
@@ -330,6 +361,9 @@
330
361
  "summary": "deleteLogo",
331
362
  "description": "Delete the app logo from /<app-id>/logo.png path",
332
363
  "operationId": "deleteLogo",
364
+ "tags": [
365
+ "App Configuration"
366
+ ],
333
367
  "responses": {
334
368
  "204": {
335
369
  "description": "Logo deleted successfully"
@@ -345,6 +379,9 @@
345
379
  "summary": "listVersions",
346
380
  "description": "Retrieve a list of versions for an app configuration",
347
381
  "operationId": "listVersions",
382
+ "tags": [
383
+ "App Configuration"
384
+ ],
348
385
  "parameters": [
349
386
  {
350
387
  "name": "appId",
@@ -415,6 +452,9 @@
415
452
  "summary": "getVersion",
416
453
  "description": "Retrieve a specific version of an app configuration",
417
454
  "operationId": "getVersion",
455
+ "tags": [
456
+ "App Configuration"
457
+ ],
418
458
  "parameters": [
419
459
  {
420
460
  "name": "appId",
@@ -455,6 +495,9 @@
455
495
  "summary": "deleteVersion",
456
496
  "description": "Delete a specific version of an app configuration",
457
497
  "operationId": "deleteVersion",
498
+ "tags": [
499
+ "App Configuration"
500
+ ],
458
501
  "parameters": [
459
502
  {
460
503
  "name": "appId",
@@ -496,6 +539,9 @@
496
539
  "summary": "createComponent",
497
540
  "description": "Patch an existing app version to create/add a component",
498
541
  "operationId": "createComponent",
542
+ "tags": [
543
+ "App Configuration"
544
+ ],
499
545
  "parameters": [
500
546
  {
501
547
  "name": "appId",
@@ -537,6 +583,9 @@
537
583
  "summary": "patchComponent",
538
584
  "description": "Patch an existing app version to update its components",
539
585
  "operationId": "patchComponent",
586
+ "tags": [
587
+ "App Configuration"
588
+ ],
540
589
  "parameters": [
541
590
  {
542
591
  "name": "appId",
@@ -585,6 +634,9 @@
585
634
  "summary": "deleteComponent",
586
635
  "description": "Delete a specific component from an app version",
587
636
  "operationId": "deleteComponent",
637
+ "tags": [
638
+ "App Configuration"
639
+ ],
588
640
  "parameters": [
589
641
  {
590
642
  "name": "appId",
@@ -629,6 +681,9 @@
629
681
  "summary": "cloneVersion",
630
682
  "description": "Clone an existing app version to create a new version",
631
683
  "operationId": "cloneVersion",
684
+ "tags": [
685
+ "App Configuration"
686
+ ],
632
687
  "parameters": [
633
688
  {
634
689
  "name": "appId",
@@ -698,6 +753,9 @@
698
753
  "summary": "listInstallations",
699
754
  "description": "Retrieve a list of installed apps for the organization.",
700
755
  "operationId": "listInstallations",
756
+ "tags": [
757
+ "App Installation"
758
+ ],
701
759
  "parameters": [
702
760
  {
703
761
  "name": "componentType",
@@ -776,6 +834,9 @@
776
834
  "summary": "getInstallation",
777
835
  "description": "Retrieve details of an installed app by its ID.",
778
836
  "operationId": "getInstallation",
837
+ "tags": [
838
+ "App Installation"
839
+ ],
779
840
  "parameters": [
780
841
  {
781
842
  "name": "appId",
@@ -806,6 +867,9 @@
806
867
  "summary": "install",
807
868
  "description": "Upsert app installation by its ID.",
808
869
  "operationId": "install",
870
+ "tags": [
871
+ "App Installation"
872
+ ],
809
873
  "parameters": [
810
874
  {
811
875
  "name": "appId",
@@ -832,6 +896,9 @@
832
896
  "summary": "patchInstallation",
833
897
  "description": "Patch an installed app by its ID.",
834
898
  "operationId": "patchInstallation",
899
+ "tags": [
900
+ "App Installation"
901
+ ],
835
902
  "parameters": [
836
903
  {
837
904
  "name": "appId",
@@ -858,6 +925,9 @@
858
925
  "summary": "uninstall",
859
926
  "description": "Uninstall an app by its ID.",
860
927
  "operationId": "uninstall",
928
+ "tags": [
929
+ "App Installation"
930
+ ],
861
931
  "parameters": [
862
932
  {
863
933
  "name": "appId",
@@ -883,6 +953,9 @@
883
953
  "summary": "promoteVersion",
884
954
  "description": "Update an installed app to a new version",
885
955
  "operationId": "promoteVersion",
956
+ "tags": [
957
+ "App Installation"
958
+ ],
886
959
  "parameters": [
887
960
  {
888
961
  "name": "appId",
@@ -1166,15 +1239,6 @@
1166
1239
  }
1167
1240
  }
1168
1241
  },
1169
- "UploadFilePayload": {
1170
- "type": "object",
1171
- "properties": {
1172
- "app_id": {
1173
- "type": "string",
1174
- "description": "ID of the app configuration. Required for app updates."
1175
- }
1176
- }
1177
- },
1178
1242
  "S3Reference": {
1179
1243
  "type": "object",
1180
1244
  "properties": {
@@ -1198,7 +1262,8 @@
1198
1262
  "type": "string",
1199
1263
  "enum": [
1200
1264
  "CUSTOM_JOURNEY_BLOCK",
1201
- "PORTAL_EXTENSION"
1265
+ "PORTAL_EXTENSION",
1266
+ "CUSTOM_FLOW_ACTION"
1202
1267
  ],
1203
1268
  "description": "Type of app component"
1204
1269
  },
@@ -1262,12 +1327,24 @@
1262
1327
  "description": "Unique identifier for the component"
1263
1328
  },
1264
1329
  "name": {
1265
- "$ref": "#/components/schemas/TranslatedString",
1266
- "description": "Name of the component"
1330
+ "allOf": [
1331
+ {
1332
+ "description": "Name of the component"
1333
+ },
1334
+ {
1335
+ "$ref": "#/components/schemas/TranslatedString"
1336
+ }
1337
+ ]
1267
1338
  },
1268
1339
  "description": {
1269
- "$ref": "#/components/schemas/TranslatedString",
1270
- "description": "Description of the component"
1340
+ "allOf": [
1341
+ {
1342
+ "description": "Description of the component"
1343
+ },
1344
+ {
1345
+ "$ref": "#/components/schemas/TranslatedString"
1346
+ }
1347
+ ]
1271
1348
  },
1272
1349
  "options": {
1273
1350
  "type": "array",
@@ -1289,7 +1366,8 @@
1289
1366
  "propertyName": "component_type",
1290
1367
  "mapping": {
1291
1368
  "CUSTOM_JOURNEY_BLOCK": "#/components/schemas/JourneyBlockComponent",
1292
- "PORTAL_EXTENSION": "#/components/schemas/PortalExtensionComponent"
1369
+ "PORTAL_EXTENSION": "#/components/schemas/PortalExtensionComponent",
1370
+ "CUSTOM_FLOW_ACTION": "#/components/schemas/CustomFlowActionComponent"
1293
1371
  }
1294
1372
  },
1295
1373
  "oneOf": [
@@ -1298,6 +1376,9 @@
1298
1376
  },
1299
1377
  {
1300
1378
  "$ref": "#/components/schemas/PortalExtensionComponent"
1379
+ },
1380
+ {
1381
+ "$ref": "#/components/schemas/CustomFlowActionComponent"
1301
1382
  }
1302
1383
  ]
1303
1384
  }
@@ -1321,6 +1402,103 @@
1321
1402
  }
1322
1403
  }
1323
1404
  },
1405
+ "CustomFlowActionComponent": {
1406
+ "type": "object",
1407
+ "required": [
1408
+ "component_type",
1409
+ "configuration"
1410
+ ],
1411
+ "properties": {
1412
+ "component_type": {
1413
+ "type": "string",
1414
+ "enum": [
1415
+ "CUSTOM_FLOW_ACTION"
1416
+ ]
1417
+ },
1418
+ "configuration": {
1419
+ "$ref": "#/components/schemas/CustomFlowConfig"
1420
+ }
1421
+ }
1422
+ },
1423
+ "BaseCustomActionConfig": {
1424
+ "type": "object",
1425
+ "properties": {
1426
+ "name": {
1427
+ "type": "string",
1428
+ "description": "Name of the custom action"
1429
+ },
1430
+ "description": {
1431
+ "type": "string",
1432
+ "description": "Description of the custom action"
1433
+ },
1434
+ "app_id": {
1435
+ "type": "string",
1436
+ "description": "The ID of the app to fetch configuration from the app API",
1437
+ "example": "c451c26a-cc7a-4c1c-92bf-1c6246cbfe88"
1438
+ },
1439
+ "component_id": {
1440
+ "type": "string",
1441
+ "description": "The ID of the component from the app. As the app can potentially have multiple custom actions, this ID is used to identify the component",
1442
+ "example": "2f1c26a-cc7a-4c1c-92bf-1c6246cbfe88"
1443
+ }
1444
+ },
1445
+ "required": [
1446
+ "app_id",
1447
+ "component_id"
1448
+ ]
1449
+ },
1450
+ "BasicCustomActionConfig": {
1451
+ "allOf": [
1452
+ {
1453
+ "$ref": "#/components/schemas/BaseCustomActionConfig"
1454
+ },
1455
+ {
1456
+ "type": "object",
1457
+ "properties": {
1458
+ "type": {
1459
+ "type": "string",
1460
+ "enum": [
1461
+ "basic"
1462
+ ]
1463
+ },
1464
+ "basic_settings": {
1465
+ "type": "object",
1466
+ "properties": {
1467
+ "url": {
1468
+ "type": "string",
1469
+ "description": "URL to call"
1470
+ },
1471
+ "headers": {
1472
+ "type": "object",
1473
+ "additionalProperties": true
1474
+ },
1475
+ "auth_token_ref": {
1476
+ "type": "string",
1477
+ "description": "SSM Reference to the auth token to use for the request"
1478
+ }
1479
+ }
1480
+ }
1481
+ },
1482
+ "required": [
1483
+ "type"
1484
+ ]
1485
+ }
1486
+ ]
1487
+ },
1488
+ "CustomFlowConfig": {
1489
+ "type": "object",
1490
+ "oneOf": [
1491
+ {
1492
+ "$ref": "#/components/schemas/BasicCustomActionConfig"
1493
+ }
1494
+ ],
1495
+ "discriminator": {
1496
+ "propertyName": "type",
1497
+ "mapping": {
1498
+ "basic": "#/components/schemas/BasicCustomActionConfig"
1499
+ }
1500
+ }
1501
+ },
1324
1502
  "PortalExtensionComponent": {
1325
1503
  "type": "object",
1326
1504
  "required": [
@@ -1533,12 +1711,24 @@
1533
1711
  "default": false
1534
1712
  },
1535
1713
  "description": {
1536
- "description": "Description of what this component arg does",
1537
- "$ref": "#/components/schemas/TranslatedString"
1714
+ "allOf": [
1715
+ {
1716
+ "description": "Description of what this component arg does"
1717
+ },
1718
+ {
1719
+ "$ref": "#/components/schemas/TranslatedString"
1720
+ }
1721
+ ]
1538
1722
  },
1539
1723
  "label": {
1540
- "description": "Human-readable label for the component arg",
1541
- "$ref": "#/components/schemas/TranslatedString"
1724
+ "allOf": [
1725
+ {
1726
+ "description": "Human-readable label for the component arg"
1727
+ },
1728
+ {
1729
+ "$ref": "#/components/schemas/TranslatedString"
1730
+ }
1731
+ ]
1542
1732
  }
1543
1733
  }
1544
1734
  },
@@ -1621,8 +1811,14 @@
1621
1811
  "description": "Unique identifier for the option"
1622
1812
  },
1623
1813
  "label": {
1624
- "$ref": "#/components/schemas/TranslatedString",
1625
- "description": "Display label for the option"
1814
+ "allOf": [
1815
+ {
1816
+ "description": "Display label for the option"
1817
+ },
1818
+ {
1819
+ "$ref": "#/components/schemas/TranslatedString"
1820
+ }
1821
+ ]
1626
1822
  }
1627
1823
  }
1628
1824
  }
@@ -1744,12 +1940,24 @@
1744
1940
  "description": "URL of the app documentation."
1745
1941
  },
1746
1942
  "description": {
1747
- "$ref": "#/components/schemas/TranslatedString",
1748
- "description": "Markdown description of the app."
1943
+ "allOf": [
1944
+ {
1945
+ "description": "Markdown description of the app."
1946
+ },
1947
+ {
1948
+ "$ref": "#/components/schemas/TranslatedString"
1949
+ }
1950
+ ]
1749
1951
  },
1750
1952
  "notifications": {
1751
- "$ref": "#/components/schemas/NotificationConfig",
1752
- "description": "Configuration for developer notifications"
1953
+ "allOf": [
1954
+ {
1955
+ "description": "Configuration for developer notifications"
1956
+ },
1957
+ {
1958
+ "$ref": "#/components/schemas/NotificationConfig"
1959
+ }
1960
+ ]
1753
1961
  },
1754
1962
  "owner_org_id": {
1755
1963
  "type": "string",
@@ -1763,13 +1971,25 @@
1763
1971
  "readOnly": true
1764
1972
  },
1765
1973
  "pricing": {
1766
- "$ref": "#/components/schemas/Pricing",
1767
- "description": "Pricing information for the app"
1974
+ "allOf": [
1975
+ {
1976
+ "description": "Pricing information for the app"
1977
+ },
1978
+ {
1979
+ "$ref": "#/components/schemas/Pricing"
1980
+ }
1981
+ ]
1768
1982
  },
1769
1983
  "configuration_audit": {
1770
- "$ref": "#/components/schemas/Audit",
1771
- "description": "Audit information for the app",
1772
- "readOnly": true
1984
+ "readOnly": true,
1985
+ "allOf": [
1986
+ {
1987
+ "description": "Audit information for the app"
1988
+ },
1989
+ {
1990
+ "$ref": "#/components/schemas/Audit"
1991
+ }
1992
+ ]
1773
1993
  }
1774
1994
  }
1775
1995
  },
@@ -1921,8 +2141,15 @@
1921
2141
  "readOnly": true
1922
2142
  },
1923
2143
  "installation_audit": {
1924
- "$ref": "#/components/schemas/Audit",
1925
- "readOnly": true
2144
+ "readOnly": true,
2145
+ "allOf": [
2146
+ {
2147
+ "description": "Audit information for the app"
2148
+ },
2149
+ {
2150
+ "$ref": "#/components/schemas/Audit"
2151
+ }
2152
+ ]
1926
2153
  }
1927
2154
  }
1928
2155
  },
@@ -1969,12 +2196,24 @@
1969
2196
  "description": "URL of the app documentation."
1970
2197
  },
1971
2198
  "description": {
1972
- "$ref": "#/components/schemas/TranslatedString",
1973
- "description": "Markdown description of the app."
2199
+ "allOf": [
2200
+ {
2201
+ "description": "Markdown description of the app."
2202
+ },
2203
+ {
2204
+ "$ref": "#/components/schemas/TranslatedString"
2205
+ }
2206
+ ]
1974
2207
  },
1975
2208
  "pricing": {
1976
- "$ref": "#/components/schemas/Pricing",
1977
- "description": "Pricing information for the app"
2209
+ "allOf": [
2210
+ {
2211
+ "description": "Pricing information for the app"
2212
+ },
2213
+ {
2214
+ "$ref": "#/components/schemas/Pricing"
2215
+ }
2216
+ ]
1978
2217
  },
1979
2218
  "components": {
1980
2219
  "type": "array",
@@ -1996,6 +2235,12 @@
1996
2235
  "type": "string",
1997
2236
  "description": "Version of the app that is installed",
1998
2237
  "readOnly": true
2238
+ },
2239
+ "public": {
2240
+ "type": "boolean",
2241
+ "default": true,
2242
+ "description": "Flag to indicate if the app is public.",
2243
+ "readOnly": true
1999
2244
  }
2000
2245
  }
2001
2246
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epilot/app-client",
3
- "version": "0.3.5",
3
+ "version": "0.4.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",
@@ -73,4 +73,4 @@
73
73
  "webpack-cli": "^4.4.0"
74
74
  },
75
75
  "gitHead": "39426e86cfb320fa3227dc03f60ee6a10848e7c7"
76
- }
76
+ }