@epilot/app-client 0.0.9 → 0.0.10

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,p,t){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(p,"__esModule",{value:!0});var s=r(t(466));p.default=s.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/upload-url":{"post":{"operationId":"getUploadUrl","requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/app-configurations":{"post":{"operationId":"publishApp","requestBody":{"$ref":"#/components/requestBodies/PublishAppRequest"},"responses":{}}},"/v1/app-configurations/{appId}":{"parameters":[{"name":"appId","in":"path","required":true,"description":"ID of the app configuration"}],"get":{"operationId":"getAppConfiguration","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":{}}}},"components":{"requestBodies":{"PublishAppRequest":{"required":true,"content":{"application/json":{}}},"InstallAppRequest":{"content":{"application/json":{}}}}}}')}},p={},t=function t(r){var s=p[r];if(void 0!==s)return s.exports;var n=p[r]={exports:{}};return e[r].call(n.exports,n,n.exports,t),n.exports}(187),r=exports;for(var s in t)r[s]=t[s];t.__esModule&&Object.defineProperty(r,"__esModule",{value:!0})})();
1
+ (()=>{"use strict";var e={187:function(e,p,t){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(p,"__esModule",{value:!0});var a=r(t(466));p.default=a.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/{appId}":{"parameters":[{"name":"appId","in":"path","required":true,"description":"ID of the app configuration"}],"get":{"operationId":"getAppConfiguration","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":{}}}},"components":{"requestBodies":{"PublishAppRequest":{"required":true,"content":{"application/json":{}}},"InstallAppRequest":{"content":{"application/json":{}}}}}}')}},p={},t=function t(r){var a=p[r];if(void 0!==a)return a.exports;var n=p[r]={exports:{}};return e[r].call(n.exports,n,n.exports,t),n.exports}(187),r=exports;for(var a in t)r[a]=t[a];t.__esModule&&Object.defineProperty(r,"__esModule",{value:!0})})();
@@ -10,27 +10,6 @@
10
10
  }
11
11
  ],
12
12
  "paths": {
13
- "/v1/app-configurations/upload-url": {
14
- "post": {
15
- "operationId": "getUploadUrl",
16
- "requestBody": {
17
- "required": true,
18
- "content": {
19
- "application/json": {}
20
- }
21
- },
22
- "responses": {}
23
- }
24
- },
25
- "/v1/app-configurations": {
26
- "post": {
27
- "operationId": "publishApp",
28
- "requestBody": {
29
- "$ref": "#/components/requestBodies/PublishAppRequest"
30
- },
31
- "responses": {}
32
- }
33
- },
34
13
  "/v1/app-configurations/{appId}": {
35
14
  "parameters": [
36
15
  {
package/dist/openapi.d.ts CHANGED
@@ -173,6 +173,9 @@ declare namespace Components {
173
173
  */
174
174
  options?: /* Options for the component configuration */ Options[];
175
175
  }
176
+ export interface BooleanArg {
177
+ type?: "boolean";
178
+ }
176
179
  export interface CallerIdentity {
177
180
  /**
178
181
  * a human readable name of the caller (e.g. user name, token name or email address)
@@ -203,29 +206,55 @@ declare namespace Components {
203
206
  * Type of app component
204
207
  */
205
208
  export type ComponentType = "CUSTOM_JOURNEY_BLOCK" | "PORTAL_EXTENSION";
209
+ export interface EnumArg {
210
+ type?: "enum";
211
+ /**
212
+ * If true, allows selection of multiple values
213
+ */
214
+ isMulti?: boolean;
215
+ /**
216
+ * List of options for enum type
217
+ */
218
+ options: [
219
+ {
220
+ /**
221
+ * Unique identifier for the option
222
+ */
223
+ id: string;
224
+ /**
225
+ * Display label for the option
226
+ */
227
+ label: TranslatedString;
228
+ },
229
+ ...{
230
+ /**
231
+ * Unique identifier for the option
232
+ */
233
+ id: string;
234
+ /**
235
+ * Display label for the option
236
+ */
237
+ label: TranslatedString;
238
+ }[]
239
+ ];
240
+ }
206
241
  export interface JourneyBlockComponent {
207
242
  component_type: "CUSTOM_JOURNEY_BLOCK";
208
243
  configuration: JourneyBlockConfig;
209
244
  }
210
- export interface JourneyBlockComponentArgs {
245
+ export type JourneyBlockComponentArgs = {
211
246
  /**
212
- * Key matching a config_option from the component
247
+ * Unique identifier for this component arg
213
248
  */
214
249
  key: string;
250
+ type: "text" | "boolean" | "enum";
215
251
  /**
216
252
  * Flag to indicate if this option is required
217
253
  */
218
254
  required?: boolean;
219
- /**
220
- * Description of what this component arg does
221
- */
222
255
  description?: TranslatedString;
223
- /**
224
- * Human-readable label for the component arg
225
- */
226
- label?: TranslatedString;
227
- type?: "text" | "number" | "boolean";
228
- }
256
+ label: TranslatedString;
257
+ } & (TextArg | BooleanArg | EnumArg);
229
258
  export interface JourneyBlockConfig {
230
259
  /**
231
260
  * URL of the web component object
@@ -241,6 +270,12 @@ declare namespace Components {
241
270
  * Arguments to pass to the component
242
271
  */
243
272
  component_args?: JourneyBlockComponentArgs[];
273
+ /**
274
+ * Define data which is mapped to entity mapping ui blocks
275
+ */
276
+ component_mapping?: {
277
+ [name: string]: "string" | "boolean" | "date" | "datetime";
278
+ };
244
279
  }
245
280
  export interface NotificationConfig {
246
281
  /**
@@ -361,6 +396,9 @@ declare namespace Components {
361
396
  */
362
397
  key: string;
363
398
  }
399
+ export interface TextArg {
400
+ type?: "text";
401
+ }
364
402
  export interface TranslatedString {
365
403
  /**
366
404
  * English translation
@@ -400,26 +438,6 @@ declare namespace Paths {
400
438
  }
401
439
  }
402
440
  }
403
- namespace GetUploadUrl {
404
- export type RequestBody = Components.Schemas.UploadFilePayload;
405
- namespace Responses {
406
- export interface $200 {
407
- /**
408
- * ID of the app configuration
409
- */
410
- app_id?: string;
411
- /**
412
- * Presigned S3 URL for uploading the file
413
- */
414
- upload_url: string;
415
- s3_reference: Components.Schemas.S3Reference;
416
- /**
417
- * Timestamp when the upload URL expires
418
- */
419
- expires_at?: string; // date-time
420
- }
421
- }
422
- }
423
441
  namespace InstallApp {
424
442
  namespace Parameters {
425
443
  export type AppId = string;
@@ -459,19 +477,6 @@ declare namespace Paths {
459
477
  }
460
478
  }
461
479
  }
462
- namespace PublishApp {
463
- export type RequestBody = Components.RequestBodies.PublishAppRequest;
464
- namespace Responses {
465
- export interface $202 {
466
- app_id: string;
467
- status: "pending" | "published";
468
- /**
469
- * Step Function execution ARN for status tracking
470
- */
471
- execution_arn?: string;
472
- }
473
- }
474
- }
475
480
  namespace UninstallApp {
476
481
  namespace Parameters {
477
482
  export type AppId = string;
@@ -497,26 +502,6 @@ declare namespace Paths {
497
502
  }
498
503
 
499
504
  export interface OperationMethods {
500
- /**
501
- * getUploadUrl - getUploadUrl
502
- *
503
- * Generate a presigned URL for uploading app package zip file
504
- */
505
- 'getUploadUrl'(
506
- parameters?: Parameters<UnknownParamsObject> | null,
507
- data?: Paths.GetUploadUrl.RequestBody,
508
- config?: AxiosRequestConfig
509
- ): OperationResponse<Paths.GetUploadUrl.Responses.$200>
510
- /**
511
- * publishApp - publishApp
512
- *
513
- * Publish a new app configuration from uploaded zip file
514
- */
515
- 'publishApp'(
516
- parameters?: Parameters<UnknownParamsObject> | null,
517
- data?: Paths.PublishApp.RequestBody,
518
- config?: AxiosRequestConfig
519
- ): OperationResponse<Paths.PublishApp.Responses.$202>
520
505
  /**
521
506
  * getAppConfiguration - getAppConfiguration
522
507
  *
@@ -570,30 +555,6 @@ export interface OperationMethods {
570
555
  }
571
556
 
572
557
  export interface PathsDictionary {
573
- ['/v1/app-configurations/upload-url']: {
574
- /**
575
- * getUploadUrl - getUploadUrl
576
- *
577
- * Generate a presigned URL for uploading app package zip file
578
- */
579
- 'post'(
580
- parameters?: Parameters<UnknownParamsObject> | null,
581
- data?: Paths.GetUploadUrl.RequestBody,
582
- config?: AxiosRequestConfig
583
- ): OperationResponse<Paths.GetUploadUrl.Responses.$200>
584
- }
585
- ['/v1/app-configurations']: {
586
- /**
587
- * publishApp - publishApp
588
- *
589
- * Publish a new app configuration from uploaded zip file
590
- */
591
- 'post'(
592
- parameters?: Parameters<UnknownParamsObject> | null,
593
- data?: Paths.PublishApp.RequestBody,
594
- config?: AxiosRequestConfig
595
- ): OperationResponse<Paths.PublishApp.Responses.$202>
596
- }
597
558
  ['/v1/app-configurations/{appId}']: {
598
559
  /**
599
560
  * getAppConfiguration - getAppConfiguration
@@ -659,8 +620,10 @@ export type AppConfiguration = Components.Schemas.AppConfiguration;
659
620
  export type Author = Components.Schemas.Author;
660
621
  export type BaseComponent = Components.Schemas.BaseComponent;
661
622
  export type BaseComponentCommon = Components.Schemas.BaseComponentCommon;
623
+ export type BooleanArg = Components.Schemas.BooleanArg;
662
624
  export type CallerIdentity = Components.Schemas.CallerIdentity;
663
625
  export type ComponentType = Components.Schemas.ComponentType;
626
+ export type EnumArg = Components.Schemas.EnumArg;
664
627
  export type JourneyBlockComponent = Components.Schemas.JourneyBlockComponent;
665
628
  export type JourneyBlockComponentArgs = Components.Schemas.JourneyBlockComponentArgs;
666
629
  export type JourneyBlockConfig = Components.Schemas.JourneyBlockConfig;
@@ -673,5 +636,6 @@ export type PortalAuth = Components.Schemas.PortalAuth;
673
636
  export type PortalExtensionComponent = Components.Schemas.PortalExtensionComponent;
674
637
  export type PortalExtensionConfig = Components.Schemas.PortalExtensionConfig;
675
638
  export type S3Reference = Components.Schemas.S3Reference;
639
+ export type TextArg = Components.Schemas.TextArg;
676
640
  export type TranslatedString = Components.Schemas.TranslatedString;
677
641
  export type UploadFilePayload = Components.Schemas.UploadFilePayload;
package/dist/openapi.json CHANGED
@@ -22,99 +22,6 @@
22
22
  }
23
23
  ],
24
24
  "paths": {
25
- "/v1/app-configurations/upload-url": {
26
- "post": {
27
- "summary": "getUploadUrl",
28
- "description": "Generate a presigned URL for uploading app package zip file",
29
- "operationId": "getUploadUrl",
30
- "requestBody": {
31
- "required": true,
32
- "content": {
33
- "application/json": {
34
- "schema": {
35
- "$ref": "#/components/schemas/UploadFilePayload"
36
- }
37
- }
38
- }
39
- },
40
- "responses": {
41
- "200": {
42
- "description": "Upload URL generated successfully",
43
- "content": {
44
- "application/json": {
45
- "schema": {
46
- "type": "object",
47
- "required": [
48
- "upload_url",
49
- "s3_reference"
50
- ],
51
- "properties": {
52
- "app_id": {
53
- "type": "string",
54
- "description": "ID of the app configuration"
55
- },
56
- "upload_url": {
57
- "type": "string",
58
- "description": "Presigned S3 URL for uploading the file"
59
- },
60
- "s3_reference": {
61
- "$ref": "#/components/schemas/S3Reference"
62
- },
63
- "expires_at": {
64
- "type": "string",
65
- "format": "date-time",
66
- "description": "Timestamp when the upload URL expires"
67
- }
68
- }
69
- }
70
- }
71
- }
72
- }
73
- }
74
- }
75
- },
76
- "/v1/app-configurations": {
77
- "post": {
78
- "summary": "publishApp",
79
- "description": "Publish a new app configuration from uploaded zip file",
80
- "operationId": "publishApp",
81
- "requestBody": {
82
- "$ref": "#/components/requestBodies/PublishAppRequest"
83
- },
84
- "responses": {
85
- "202": {
86
- "description": "App publication process started",
87
- "content": {
88
- "application/json": {
89
- "schema": {
90
- "type": "object",
91
- "required": [
92
- "app_id",
93
- "status"
94
- ],
95
- "properties": {
96
- "app_id": {
97
- "type": "string"
98
- },
99
- "status": {
100
- "type": "string",
101
- "enum": [
102
- "pending",
103
- "published"
104
- ]
105
- },
106
- "execution_arn": {
107
- "type": "string",
108
- "description": "Step Function execution ARN for status tracking"
109
- }
110
- }
111
- }
112
- }
113
- }
114
- }
115
- }
116
- }
117
- },
118
25
  "/v1/app-configurations/{appId}": {
119
26
  "parameters": [
120
27
  {
@@ -762,40 +669,143 @@
762
669
  "items": {
763
670
  "$ref": "#/components/schemas/JourneyBlockComponentArgs"
764
671
  }
672
+ },
673
+ "component_mapping": {
674
+ "description": "Define data which is mapped to entity mapping ui blocks",
675
+ "type": "object",
676
+ "additionalProperties": {
677
+ "type": "string",
678
+ "enum": [
679
+ "string",
680
+ "boolean",
681
+ "date",
682
+ "datetime"
683
+ ]
684
+ }
765
685
  }
766
686
  }
767
687
  },
768
688
  "JourneyBlockComponentArgs": {
689
+ "allOf": [
690
+ {
691
+ "type": "object",
692
+ "required": [
693
+ "key",
694
+ "label",
695
+ "type"
696
+ ],
697
+ "properties": {
698
+ "key": {
699
+ "type": "string",
700
+ "description": "Unique identifier for this component arg"
701
+ },
702
+ "type": {
703
+ "type": "string",
704
+ "enum": [
705
+ "text",
706
+ "boolean",
707
+ "enum"
708
+ ]
709
+ },
710
+ "required": {
711
+ "type": "boolean",
712
+ "description": "Flag to indicate if this option is required",
713
+ "default": false
714
+ },
715
+ "description": {
716
+ "description": "Description of what this component arg does",
717
+ "$ref": "#/components/schemas/TranslatedString"
718
+ },
719
+ "label": {
720
+ "description": "Human-readable label for the component arg",
721
+ "$ref": "#/components/schemas/TranslatedString"
722
+ }
723
+ }
724
+ },
725
+ {
726
+ "type": "object",
727
+ "discriminator": {
728
+ "propertyName": "type",
729
+ "mapping": {
730
+ "text": "#/components/schemas/TextArg",
731
+ "boolean": "#/components/schemas/BooleanArg",
732
+ "enum": "#/components/schemas/EnumArg"
733
+ }
734
+ },
735
+ "oneOf": [
736
+ {
737
+ "$ref": "#/components/schemas/TextArg"
738
+ },
739
+ {
740
+ "$ref": "#/components/schemas/BooleanArg"
741
+ },
742
+ {
743
+ "$ref": "#/components/schemas/EnumArg"
744
+ }
745
+ ]
746
+ }
747
+ ]
748
+ },
749
+ "TextArg": {
750
+ "type": "object",
751
+ "properties": {
752
+ "type": {
753
+ "type": "string",
754
+ "enum": [
755
+ "text"
756
+ ]
757
+ }
758
+ }
759
+ },
760
+ "BooleanArg": {
761
+ "type": "object",
762
+ "properties": {
763
+ "type": {
764
+ "type": "string",
765
+ "enum": [
766
+ "boolean"
767
+ ]
768
+ }
769
+ }
770
+ },
771
+ "EnumArg": {
769
772
  "type": "object",
770
773
  "required": [
771
- "key"
774
+ "options"
772
775
  ],
773
776
  "properties": {
774
- "key": {
777
+ "type": {
775
778
  "type": "string",
776
- "description": "Key matching a config_option from the component"
779
+ "enum": [
780
+ "enum"
781
+ ]
777
782
  },
778
- "required": {
783
+ "isMulti": {
779
784
  "type": "boolean",
780
- "description": "Flag to indicate if this option is required",
785
+ "description": "If true, allows selection of multiple values",
781
786
  "default": false
782
787
  },
783
- "description": {
784
- "description": "Description of what this component arg does",
785
- "$ref": "#/components/schemas/TranslatedString"
786
- },
787
- "label": {
788
- "description": "Human-readable label for the component arg",
789
- "$ref": "#/components/schemas/TranslatedString"
790
- },
791
- "type": {
792
- "type": "string",
793
- "enum": [
794
- "text",
795
- "number",
796
- "boolean"
797
- ],
798
- "default": "text"
788
+ "options": {
789
+ "type": "array",
790
+ "description": "List of options for enum type",
791
+ "minItems": 1,
792
+ "items": {
793
+ "type": "object",
794
+ "required": [
795
+ "id",
796
+ "label"
797
+ ],
798
+ "properties": {
799
+ "id": {
800
+ "type": "string",
801
+ "description": "Unique identifier for the option"
802
+ },
803
+ "label": {
804
+ "$ref": "#/components/schemas/TranslatedString",
805
+ "description": "Display label for the option"
806
+ }
807
+ }
808
+ }
799
809
  }
800
810
  }
801
811
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epilot/app-client",
3
- "version": "0.0.9",
3
+ "version": "0.0.10",
4
4
  "description": "JavaScript client library for the epilot App API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",