@epilot/app-client 0.0.8 → 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
@@ -39,6 +39,7 @@ declare namespace Components {
39
39
  */
40
40
  documentation_url?: string;
41
41
  description?: TranslatedString;
42
+ notifications?: NotificationConfig;
42
43
  created_by?: string;
43
44
  created_at?: string;
44
45
  /**
@@ -108,6 +109,10 @@ declare namespace Components {
108
109
  * Markdown description of the app.
109
110
  */
110
111
  description?: TranslatedString;
112
+ /**
113
+ * Configuration for developer notifications
114
+ */
115
+ notifications?: NotificationConfig;
111
116
  created_by?: string;
112
117
  created_at?: string;
113
118
  updated_at?: string;
@@ -168,6 +173,9 @@ declare namespace Components {
168
173
  */
169
174
  options?: /* Options for the component configuration */ Options[];
170
175
  }
176
+ export interface BooleanArg {
177
+ type?: "boolean";
178
+ }
171
179
  export interface CallerIdentity {
172
180
  /**
173
181
  * a human readable name of the caller (e.g. user name, token name or email address)
@@ -198,10 +206,55 @@ declare namespace Components {
198
206
  * Type of app component
199
207
  */
200
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
+ }
201
241
  export interface JourneyBlockComponent {
202
242
  component_type: "CUSTOM_JOURNEY_BLOCK";
203
243
  configuration: JourneyBlockConfig;
204
244
  }
245
+ export type JourneyBlockComponentArgs = {
246
+ /**
247
+ * Unique identifier for this component arg
248
+ */
249
+ key: string;
250
+ type: "text" | "boolean" | "enum";
251
+ /**
252
+ * Flag to indicate if this option is required
253
+ */
254
+ required?: boolean;
255
+ description?: TranslatedString;
256
+ label: TranslatedString;
257
+ } & (TextArg | BooleanArg | EnumArg);
205
258
  export interface JourneyBlockConfig {
206
259
  /**
207
260
  * URL of the web component object
@@ -213,7 +266,33 @@ declare namespace Components {
213
266
  * Custom element tag for the component
214
267
  */
215
268
  component_tag: string;
269
+ /**
270
+ * Arguments to pass to the component
271
+ */
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
+ };
216
279
  }
280
+ export interface NotificationConfig {
281
+ /**
282
+ * Email address to receive notifications
283
+ * example:
284
+ * developer@example.com
285
+ */
286
+ email: string; // email
287
+ /**
288
+ * List of events to subscribe to
289
+ */
290
+ events: [
291
+ NotificationEvent,
292
+ ...NotificationEvent[]
293
+ ];
294
+ }
295
+ export type NotificationEvent = "app.installed" | "app.uninstalled";
217
296
  export interface Option {
218
297
  /**
219
298
  * Key matching a config_option from the component
@@ -317,6 +396,9 @@ declare namespace Components {
317
396
  */
318
397
  key: string;
319
398
  }
399
+ export interface TextArg {
400
+ type?: "text";
401
+ }
320
402
  export interface TranslatedString {
321
403
  /**
322
404
  * English translation
@@ -356,26 +438,6 @@ declare namespace Paths {
356
438
  }
357
439
  }
358
440
  }
359
- namespace GetUploadUrl {
360
- export type RequestBody = Components.Schemas.UploadFilePayload;
361
- namespace Responses {
362
- export interface $200 {
363
- /**
364
- * ID of the app configuration
365
- */
366
- app_id?: string;
367
- /**
368
- * Presigned S3 URL for uploading the file
369
- */
370
- upload_url: string;
371
- s3_reference: Components.Schemas.S3Reference;
372
- /**
373
- * Timestamp when the upload URL expires
374
- */
375
- expires_at?: string; // date-time
376
- }
377
- }
378
- }
379
441
  namespace InstallApp {
380
442
  namespace Parameters {
381
443
  export type AppId = string;
@@ -415,19 +477,6 @@ declare namespace Paths {
415
477
  }
416
478
  }
417
479
  }
418
- namespace PublishApp {
419
- export type RequestBody = Components.RequestBodies.PublishAppRequest;
420
- namespace Responses {
421
- export interface $202 {
422
- app_id: string;
423
- status: "pending" | "published";
424
- /**
425
- * Step Function execution ARN for status tracking
426
- */
427
- execution_arn?: string;
428
- }
429
- }
430
- }
431
480
  namespace UninstallApp {
432
481
  namespace Parameters {
433
482
  export type AppId = string;
@@ -453,26 +502,6 @@ declare namespace Paths {
453
502
  }
454
503
 
455
504
  export interface OperationMethods {
456
- /**
457
- * getUploadUrl - getUploadUrl
458
- *
459
- * Generate a presigned URL for uploading app package zip file
460
- */
461
- 'getUploadUrl'(
462
- parameters?: Parameters<UnknownParamsObject> | null,
463
- data?: Paths.GetUploadUrl.RequestBody,
464
- config?: AxiosRequestConfig
465
- ): OperationResponse<Paths.GetUploadUrl.Responses.$200>
466
- /**
467
- * publishApp - publishApp
468
- *
469
- * Publish a new app configuration from uploaded zip file
470
- */
471
- 'publishApp'(
472
- parameters?: Parameters<UnknownParamsObject> | null,
473
- data?: Paths.PublishApp.RequestBody,
474
- config?: AxiosRequestConfig
475
- ): OperationResponse<Paths.PublishApp.Responses.$202>
476
505
  /**
477
506
  * getAppConfiguration - getAppConfiguration
478
507
  *
@@ -526,30 +555,6 @@ export interface OperationMethods {
526
555
  }
527
556
 
528
557
  export interface PathsDictionary {
529
- ['/v1/app-configurations/upload-url']: {
530
- /**
531
- * getUploadUrl - getUploadUrl
532
- *
533
- * Generate a presigned URL for uploading app package zip file
534
- */
535
- 'post'(
536
- parameters?: Parameters<UnknownParamsObject> | null,
537
- data?: Paths.GetUploadUrl.RequestBody,
538
- config?: AxiosRequestConfig
539
- ): OperationResponse<Paths.GetUploadUrl.Responses.$200>
540
- }
541
- ['/v1/app-configurations']: {
542
- /**
543
- * publishApp - publishApp
544
- *
545
- * Publish a new app configuration from uploaded zip file
546
- */
547
- 'post'(
548
- parameters?: Parameters<UnknownParamsObject> | null,
549
- data?: Paths.PublishApp.RequestBody,
550
- config?: AxiosRequestConfig
551
- ): OperationResponse<Paths.PublishApp.Responses.$202>
552
- }
553
558
  ['/v1/app-configurations/{appId}']: {
554
559
  /**
555
560
  * getAppConfiguration - getAppConfiguration
@@ -615,10 +620,15 @@ export type AppConfiguration = Components.Schemas.AppConfiguration;
615
620
  export type Author = Components.Schemas.Author;
616
621
  export type BaseComponent = Components.Schemas.BaseComponent;
617
622
  export type BaseComponentCommon = Components.Schemas.BaseComponentCommon;
623
+ export type BooleanArg = Components.Schemas.BooleanArg;
618
624
  export type CallerIdentity = Components.Schemas.CallerIdentity;
619
625
  export type ComponentType = Components.Schemas.ComponentType;
626
+ export type EnumArg = Components.Schemas.EnumArg;
620
627
  export type JourneyBlockComponent = Components.Schemas.JourneyBlockComponent;
628
+ export type JourneyBlockComponentArgs = Components.Schemas.JourneyBlockComponentArgs;
621
629
  export type JourneyBlockConfig = Components.Schemas.JourneyBlockConfig;
630
+ export type NotificationConfig = Components.Schemas.NotificationConfig;
631
+ export type NotificationEvent = Components.Schemas.NotificationEvent;
622
632
  export type Option = Components.Schemas.Option;
623
633
  export type Options = Components.Schemas.Options;
624
634
  export type OptionsRef = Components.Schemas.OptionsRef;
@@ -626,5 +636,6 @@ export type PortalAuth = Components.Schemas.PortalAuth;
626
636
  export type PortalExtensionComponent = Components.Schemas.PortalExtensionComponent;
627
637
  export type PortalExtensionConfig = Components.Schemas.PortalExtensionConfig;
628
638
  export type S3Reference = Components.Schemas.S3Reference;
639
+ export type TextArg = Components.Schemas.TextArg;
629
640
  export type TranslatedString = Components.Schemas.TranslatedString;
630
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
  {
@@ -505,6 +412,36 @@
505
412
  }
506
413
  }
507
414
  },
415
+ "NotificationConfig": {
416
+ "type": "object",
417
+ "required": [
418
+ "email",
419
+ "events"
420
+ ],
421
+ "properties": {
422
+ "email": {
423
+ "type": "string",
424
+ "format": "email",
425
+ "description": "Email address to receive notifications",
426
+ "example": "developer@example.com"
427
+ },
428
+ "events": {
429
+ "type": "array",
430
+ "description": "List of events to subscribe to",
431
+ "items": {
432
+ "$ref": "#/components/schemas/NotificationEvent"
433
+ },
434
+ "minItems": 1
435
+ }
436
+ }
437
+ },
438
+ "NotificationEvent": {
439
+ "type": "string",
440
+ "enum": [
441
+ "app.installed",
442
+ "app.uninstalled"
443
+ ]
444
+ },
508
445
  "BaseComponentCommon": {
509
446
  "type": "object",
510
447
  "required": [
@@ -725,6 +662,150 @@
725
662
  "component_tag": {
726
663
  "type": "string",
727
664
  "description": "Custom element tag for the component"
665
+ },
666
+ "component_args": {
667
+ "type": "array",
668
+ "description": "Arguments to pass to the component",
669
+ "items": {
670
+ "$ref": "#/components/schemas/JourneyBlockComponentArgs"
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
+ }
685
+ }
686
+ }
687
+ },
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": {
772
+ "type": "object",
773
+ "required": [
774
+ "options"
775
+ ],
776
+ "properties": {
777
+ "type": {
778
+ "type": "string",
779
+ "enum": [
780
+ "enum"
781
+ ]
782
+ },
783
+ "isMulti": {
784
+ "type": "boolean",
785
+ "description": "If true, allows selection of multiple values",
786
+ "default": false
787
+ },
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
+ }
728
809
  }
729
810
  }
730
811
  },
@@ -804,6 +885,10 @@
804
885
  "$ref": "#/components/schemas/TranslatedString",
805
886
  "description": "Markdown description of the app."
806
887
  },
888
+ "notifications": {
889
+ "$ref": "#/components/schemas/NotificationConfig",
890
+ "description": "Configuration for developer notifications"
891
+ },
807
892
  "created_by": {
808
893
  "type": "string",
809
894
  "readOnly": true
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epilot/app-client",
3
- "version": "0.0.8",
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",