@epilot/customer-portal-client 0.11.0 → 0.11.2-rc1

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
@@ -19,7 +19,7 @@ declare namespace Components {
19
19
  namespace Schemas {
20
20
  export interface ActionWidget {
21
21
  id: string;
22
- type: "ACTION_WIDGET" | "CONTENT_WIDGET" | "ENTITY_WIDGET" | "TEASER_WIDGET" | "DOCUMENT_WIDGET";
22
+ type: "ACTION_WIDGET" | "CONTENT_WIDGET" | "ENTITY_WIDGET" | "TEASER_WIDGET" | "DOCUMENT_WIDGET" | "PAYMENT_WIDGET";
23
23
  /**
24
24
  * Index of the widget in the list, used for ordering (left or right)
25
25
  */
@@ -216,32 +216,6 @@ declare namespace Components {
216
216
  */
217
217
  phone?: string | null;
218
218
  }
219
- export interface AuthConfig {
220
- /**
221
- * AWS Cognito User Pool ID
222
- * example:
223
- * eu-central-1_CUEQRNbUb
224
- */
225
- user_pool_id: string;
226
- /**
227
- * AWS Cognito User Pool Client ID
228
- * example:
229
- * 6bsd0jkgoie74k2i8mrhc1vest
230
- */
231
- user_pool_client_id: string;
232
- /**
233
- * AWS Cognito User Pool Identity Pool ID
234
- * example:
235
- * eu-central-1:a63af1f7-ab86-4ab5-a0eb-f461cb37c2b1
236
- */
237
- user_pool_identity_pool_id?: string;
238
- /**
239
- * Portal ID
240
- * example:
241
- * 7h2hwdj7hhjsdcjkq03eidna3ep
242
- */
243
- portal_id: string;
244
- }
245
219
  export interface Balance {
246
220
  /**
247
221
  * Current balance of the customer in cents. (precision 2)
@@ -460,7 +434,7 @@ declare namespace Components {
460
434
  }
461
435
  export interface ContentWidget {
462
436
  id: string;
463
- type: "ACTION_WIDGET" | "CONTENT_WIDGET" | "ENTITY_WIDGET" | "TEASER_WIDGET" | "DOCUMENT_WIDGET";
437
+ type: "ACTION_WIDGET" | "CONTENT_WIDGET" | "ENTITY_WIDGET" | "TEASER_WIDGET" | "DOCUMENT_WIDGET" | "PAYMENT_WIDGET";
464
438
  /**
465
439
  * Index of the widget in the list, used for ordering (left or right)
466
440
  */
@@ -632,43 +606,19 @@ declare namespace Components {
632
606
  * example:
633
607
  * 2
634
608
  */
635
- billing_schedule_by_month_day?: number;
636
- /**
637
- * Defines the start date for the billing schedule
638
- * example:
639
- * 2020-01-01T00:00:00.000Z
640
- */
641
- billing_schedule_start_date?: string; // date
642
- /**
643
- * Defines the end date for the billing schedule
644
- * example:
645
- * 2020-01-01T00:00:00.000Z
646
- */
647
- billing_schedule_end_date?: string; // date
609
+ billing_due_day?: number;
648
610
  /**
649
611
  * Set amount for installments in cents. (precision 2)
650
612
  * example:
651
613
  * 10050
652
614
  */
653
615
  installment_amount?: number;
654
- /**
655
- * Set amount for installments in decimal string representation.
656
- * example:
657
- * 100.50
658
- */
659
- installment_amount_decimal?: string;
660
616
  /**
661
617
  * Current balance of the contract in cents. (precision 2)
662
618
  * example:
663
619
  * 8990
664
620
  */
665
621
  balance?: number;
666
- /**
667
- * Current balance of the contract in decimal string representation.
668
- * example:
669
- * 89.90
670
- */
671
- balance_amount_decimal?: string;
672
622
  balance_currency?: /**
673
623
  * Currency code in ISO 4217 format
674
624
  * example:
@@ -772,7 +722,7 @@ declare namespace Components {
772
722
  }
773
723
  export interface DocumentWidget {
774
724
  id: string;
775
- type: "ACTION_WIDGET" | "CONTENT_WIDGET" | "ENTITY_WIDGET" | "TEASER_WIDGET" | "DOCUMENT_WIDGET";
725
+ type: "ACTION_WIDGET" | "CONTENT_WIDGET" | "ENTITY_WIDGET" | "TEASER_WIDGET" | "DOCUMENT_WIDGET" | "PAYMENT_WIDGET";
776
726
  /**
777
727
  * Index of the widget in the list, used for ordering (left or right)
778
728
  */
@@ -967,7 +917,7 @@ declare namespace Components {
967
917
  export type EntitySlug = "contact" | "contract" | "file" | "order" | "opportunity" | "product" | "price" | "meter" | "meter_counter";
968
918
  export interface EntityWidget {
969
919
  id: string;
970
- type: "ACTION_WIDGET" | "CONTENT_WIDGET" | "ENTITY_WIDGET" | "TEASER_WIDGET" | "DOCUMENT_WIDGET";
920
+ type: "ACTION_WIDGET" | "CONTENT_WIDGET" | "ENTITY_WIDGET" | "TEASER_WIDGET" | "DOCUMENT_WIDGET" | "PAYMENT_WIDGET";
971
921
  /**
972
922
  * Index of the widget in the list, used for ordering (left or right)
973
923
  */
@@ -988,23 +938,6 @@ declare namespace Components {
988
938
  */
989
939
  message?: string;
990
940
  }
991
- /**
992
- * example:
993
- * {
994
- * "exists": true,
995
- * "active": false
996
- * }
997
- */
998
- export interface Exists {
999
- /**
1000
- * Indicate whether the item exists
1001
- */
1002
- exists: boolean;
1003
- /**
1004
- * Indicate whether the item is active
1005
- */
1006
- active?: boolean;
1007
- }
1008
941
  export type ExtraSchemaAttributes = {
1009
942
  /**
1010
943
  * Attribute name
@@ -1187,6 +1120,20 @@ declare namespace Components {
1187
1120
  */
1188
1121
  effect?: "allow" | "deny";
1189
1122
  }
1123
+ export interface IdentifierAttribute {
1124
+ /**
1125
+ * Label attribute
1126
+ */
1127
+ label?: string;
1128
+ /**
1129
+ * Name of the attribute
1130
+ */
1131
+ name?: string;
1132
+ /**
1133
+ * Type of the secondary attribute
1134
+ */
1135
+ type?: string;
1136
+ }
1190
1137
  /**
1191
1138
  * An entity that describes an installment billing event.
1192
1139
  */
@@ -1494,7 +1441,7 @@ declare namespace Components {
1494
1441
  export type Origin = "END_CUSTOMER_PORTAL" | "INSTALLER_PORTAL";
1495
1442
  export interface PaymentWidget {
1496
1443
  id: string;
1497
- type: "ACTION_WIDGET" | "CONTENT_WIDGET" | "ENTITY_WIDGET" | "TEASER_WIDGET" | "DOCUMENT_WIDGET";
1444
+ type: "ACTION_WIDGET" | "CONTENT_WIDGET" | "ENTITY_WIDGET" | "TEASER_WIDGET" | "DOCUMENT_WIDGET" | "PAYMENT_WIDGET";
1498
1445
  /**
1499
1446
  * Index of the widget in the list, used for ordering (left or right)
1500
1447
  */
@@ -1719,6 +1666,12 @@ declare namespace Components {
1719
1666
  * 12345
1720
1667
  */
1721
1668
  id?: string;
1669
+ /**
1670
+ * ID of the organization
1671
+ * example:
1672
+ * 12345
1673
+ */
1674
+ organization_id?: string;
1722
1675
  /**
1723
1676
  * Name of the organization
1724
1677
  * example:
@@ -1796,7 +1749,7 @@ declare namespace Components {
1796
1749
  _updated_at: string; // date-time
1797
1750
  _schema: "portal_user";
1798
1751
  }
1799
- export type PortalWidget = EntityWidget | ContentWidget | ActionWidget | TeaserWidget | DocumentWidget;
1752
+ export type PortalWidget = EntityWidget | ContentWidget | ActionWidget | TeaserWidget | DocumentWidget | PaymentWidget;
1800
1753
  /**
1801
1754
  * The product entity
1802
1755
  */
@@ -2045,7 +1998,7 @@ declare namespace Components {
2045
1998
  }
2046
1999
  export interface TeaserWidget {
2047
2000
  id: string;
2048
- type: "ACTION_WIDGET" | "CONTENT_WIDGET" | "ENTITY_WIDGET" | "TEASER_WIDGET" | "DOCUMENT_WIDGET";
2001
+ type: "ACTION_WIDGET" | "CONTENT_WIDGET" | "ENTITY_WIDGET" | "TEASER_WIDGET" | "DOCUMENT_WIDGET" | "PAYMENT_WIDGET";
2049
2002
  /**
2050
2003
  * Index of the widget in the list, used for ordering (left or right)
2051
2004
  */
@@ -2312,7 +2265,7 @@ declare namespace Components {
2312
2265
  }
2313
2266
  export interface WidgetBase {
2314
2267
  id: string;
2315
- type: "ACTION_WIDGET" | "CONTENT_WIDGET" | "ENTITY_WIDGET" | "TEASER_WIDGET" | "DOCUMENT_WIDGET";
2268
+ type: "ACTION_WIDGET" | "CONTENT_WIDGET" | "ENTITY_WIDGET" | "TEASER_WIDGET" | "DOCUMENT_WIDGET" | "PAYMENT_WIDGET";
2316
2269
  /**
2317
2270
  * Index of the widget in the list, used for ordering (left or right)
2318
2271
  */
@@ -2790,10 +2743,6 @@ declare namespace Paths {
2790
2743
  }
2791
2744
  namespace GetBillingEvents {
2792
2745
  namespace Parameters {
2793
- /**
2794
- * List billing events for all contracts/orders of specific customer
2795
- */
2796
- export type CustomerId = string;
2797
2746
  /**
2798
2747
  * List billing events after this date
2799
2748
  */
@@ -2816,7 +2765,6 @@ declare namespace Paths {
2816
2765
  event_type?: /* Type of billing event to filter by */ Parameters.EventType;
2817
2766
  date_after?: /* List billing events after this date */ Parameters.DateAfter /* date-time */;
2818
2767
  date_before?: /* List billing events before this date */ Parameters.DateBefore /* date-time */;
2819
- customer_id?: /* List billing events for all contracts/orders of specific customer */ Parameters.CustomerId;
2820
2768
  }
2821
2769
  namespace Responses {
2822
2770
  export interface $200 {
@@ -2990,20 +2938,6 @@ declare namespace Paths {
2990
2938
  }
2991
2939
  }
2992
2940
  namespace GetCustomerBalance {
2993
- namespace Parameters {
2994
- /**
2995
- * example:
2996
- * 1e3f0d58-69d2-4dbb-9a43-3ee63d862e8e
2997
- */
2998
- export type CustomerId = string;
2999
- }
3000
- export interface PathParameters {
3001
- customer_id: /**
3002
- * example:
3003
- * 1e3f0d58-69d2-4dbb-9a43-3ee63d862e8e
3004
- */
3005
- Parameters.CustomerId;
3006
- }
3007
2941
  namespace Responses {
3008
2942
  export type $200 = Components.Schemas.Balance;
3009
2943
  }
@@ -3532,6 +3466,37 @@ declare namespace Paths {
3532
3466
  export type $500 = Components.Responses.InternalServerError;
3533
3467
  }
3534
3468
  }
3469
+ namespace GetRegistrationIdentifiers {
3470
+ namespace Responses {
3471
+ export interface $200 {
3472
+ /**
3473
+ * example:
3474
+ * {
3475
+ * "contact": [
3476
+ * {
3477
+ * "label": "First name",
3478
+ * "name": "first_name",
3479
+ * "type": "string"
3480
+ * }
3481
+ * ],
3482
+ * "contract": [
3483
+ * {
3484
+ * "label": "Contract number",
3485
+ * "name": "contract_number",
3486
+ * "type": "string"
3487
+ * }
3488
+ * ]
3489
+ * }
3490
+ */
3491
+ data?: {
3492
+ [name: string]: Components.Schemas.IdentifierAttribute[];
3493
+ };
3494
+ }
3495
+ export type $401 = Components.Responses.Unauthorized;
3496
+ export type $403 = Components.Responses.Forbidden;
3497
+ export type $500 = Components.Responses.InternalServerError;
3498
+ }
3499
+ }
3535
3500
  namespace GetSchemas {
3536
3501
  namespace Responses {
3537
3502
  export interface $200 {
@@ -3585,12 +3550,14 @@ declare namespace Paths {
3585
3550
  }
3586
3551
  namespace ReplaceECPTemplateVariables {
3587
3552
  export interface RequestBody {
3588
- /**
3589
- * ID of the contact
3590
- * example:
3591
- * 7aa44fb8-d60e-40cc-9a3a-ba09a1ff7f51
3592
- */
3593
- contactId?: string;
3553
+ [name: string]: {
3554
+ /**
3555
+ * ID of the contact
3556
+ * example:
3557
+ * 7aa44fb8-d60e-40cc-9a3a-ba09a1ff7f51
3558
+ */
3559
+ _id?: string;
3560
+ };
3594
3561
  }
3595
3562
  namespace Responses {
3596
3563
  export interface $200 {
@@ -3600,6 +3567,11 @@ declare namespace Paths {
3600
3567
  * https://end-customer-portal.ecp.dev.epilot.io/register?contactId=7aa44fb8-d60e-40cc-9a3a-ba09a1ff7f51&email=john@doe.com
3601
3568
  */
3602
3569
  invitationLink?: string;
3570
+ /**
3571
+ * example:
3572
+ * https://end-customer-portal.ecp.dev.epilot.io/documents
3573
+ */
3574
+ newDocumentLink?: string;
3603
3575
  };
3604
3576
  installerPortal?: {
3605
3577
  /**
@@ -3607,6 +3579,11 @@ declare namespace Paths {
3607
3579
  * https://installer-portal.ecp.dev.epilot.io/register?contactId=7aa44fb8-d60e-40cc-9a3a-ba09a1ff7f51&email=john@doe.com
3608
3580
  */
3609
3581
  invitationLink?: string;
3582
+ /**
3583
+ * example:
3584
+ * https://installer-portal.ecp.dev.epilot.io/documents
3585
+ */
3586
+ newDocumentLink?: string;
3610
3587
  };
3611
3588
  }
3612
3589
  export type $401 = Components.Responses.Unauthorized;
@@ -4477,6 +4454,16 @@ export interface OperationMethods {
4477
4454
  data?: Paths.SavePortalFiles.RequestBody,
4478
4455
  config?: AxiosRequestConfig
4479
4456
  ): OperationResponse<Paths.SavePortalFiles.Responses.$201>
4457
+ /**
4458
+ * getRegistrationIdentifiers - getRegistrationIdentifiers
4459
+ *
4460
+ * Get valid attributes from entities that can be used as identifier to map contact to user on registration
4461
+ */
4462
+ 'getRegistrationIdentifiers'(
4463
+ parameters?: Parameters<UnknownParamsObject> | null,
4464
+ data?: any,
4465
+ config?: AxiosRequestConfig
4466
+ ): OperationResponse<Paths.GetRegistrationIdentifiers.Responses.$200>
4480
4467
  /**
4481
4468
  * getAllFiles - getAllFiles
4482
4469
  *
@@ -4533,7 +4520,7 @@ export interface OperationMethods {
4533
4520
  * Get total balance across all contracts and orders of a customer entity.
4534
4521
  */
4535
4522
  'getCustomerBalance'(
4536
- parameters?: Parameters<Paths.GetCustomerBalance.PathParameters> | null,
4523
+ parameters?: Parameters<UnknownParamsObject> | null,
4537
4524
  data?: any,
4538
4525
  config?: AxiosRequestConfig
4539
4526
  ): OperationResponse<Paths.GetCustomerBalance.Responses.$200>
@@ -5168,6 +5155,18 @@ export interface PathsDictionary {
5168
5155
  config?: AxiosRequestConfig
5169
5156
  ): OperationResponse<Paths.SavePortalFiles.Responses.$201>
5170
5157
  }
5158
+ ['/v2/portal/registration/identifiers']: {
5159
+ /**
5160
+ * getRegistrationIdentifiers - getRegistrationIdentifiers
5161
+ *
5162
+ * Get valid attributes from entities that can be used as identifier to map contact to user on registration
5163
+ */
5164
+ 'get'(
5165
+ parameters?: Parameters<UnknownParamsObject> | null,
5166
+ data?: any,
5167
+ config?: AxiosRequestConfig
5168
+ ): OperationResponse<Paths.GetRegistrationIdentifiers.Responses.$200>
5169
+ }
5171
5170
  ['/v2/portal/user/files']: {
5172
5171
  /**
5173
5172
  * getAllFiles - getAllFiles
@@ -5228,14 +5227,14 @@ export interface PathsDictionary {
5228
5227
  config?: AxiosRequestConfig
5229
5228
  ): OperationResponse<Paths.GetBillingEvents.Responses.$200>
5230
5229
  }
5231
- ['/v2/portal/billing/customers/{customer_id}/balance']: {
5230
+ ['/v2/portal/billing/customers/balance']: {
5232
5231
  /**
5233
5232
  * getCustomerBalance - getCustomerBalance
5234
5233
  *
5235
5234
  * Get total balance across all contracts and orders of a customer entity.
5236
5235
  */
5237
5236
  'get'(
5238
- parameters?: Parameters<Paths.GetCustomerBalance.PathParameters> | null,
5237
+ parameters?: Parameters<UnknownParamsObject> | null,
5239
5238
  data?: any,
5240
5239
  config?: AxiosRequestConfig
5241
5240
  ): OperationResponse<Paths.GetCustomerBalance.Responses.$200>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epilot/customer-portal-client",
3
- "version": "0.11.0",
3
+ "version": "0.11.2-rc1",
4
4
  "description": "API Client for epilot portal API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -45,24 +45,24 @@
45
45
  "author": "epilot GmbH",
46
46
  "license": "UNLICENSED",
47
47
  "peerDependencies": {
48
- "axios": "^0.25.0"
48
+ "axios": "^1.6.2"
49
49
  },
50
50
  "dependencies": {
51
51
  "buffer": "^6.0.3",
52
52
  "https-browserify": "^1.0.0",
53
- "openapi-client-axios": "^7.1.3",
53
+ "openapi-client-axios": "^7.5.1",
54
54
  "stream-http": "^3.1.1",
55
55
  "url": "^0.11.0",
56
56
  "util": "^0.12.3"
57
57
  },
58
58
  "devDependencies": {
59
59
  "@types/jest": "^26.0.20",
60
- "axios": "^0.25.0",
60
+ "axios": "^1.6.2",
61
61
  "copy-webpack-plugin": "^7.0.0",
62
62
  "jest": "^26.6.3",
63
63
  "json-loader": "^0.5.7",
64
64
  "openapi-client-axios-typegen": "^7.4.1",
65
- "openapicmd": "^1.17.0",
65
+ "openapicmd": "^2.1.0",
66
66
  "ts-jest": "^26.5.0",
67
67
  "ts-loader": "^8.0.14",
68
68
  "ts-node": "^10.9.1",
@@ -204,7 +204,6 @@
204
204
  "post": {
205
205
  "operationId": "replaceECPTemplateVariables",
206
206
  "requestBody": {
207
- "required": true,
208
207
  "content": {
209
208
  "application/json": {}
210
209
  }
@@ -694,6 +693,11 @@
694
693
  }
695
694
  }
696
695
  },
696
+ "/v2/portal/registration/identifiers": {
697
+ "get": {
698
+ "operationId": "getRegistrationIdentifiers"
699
+ }
700
+ },
697
701
  "/v2/portal/user/files": {
698
702
  "get": {
699
703
  "operationId": "getAllFiles",
@@ -763,24 +767,13 @@
763
767
  {
764
768
  "name": "date_before",
765
769
  "in": "query"
766
- },
767
- {
768
- "name": "customer_id",
769
- "in": "query"
770
770
  }
771
771
  ]
772
772
  }
773
773
  },
774
- "/v2/portal/billing/customers/{customer_id}/balance": {
774
+ "/v2/portal/billing/customers/balance": {
775
775
  "get": {
776
- "operationId": "getCustomerBalance",
777
- "parameters": [
778
- {
779
- "name": "customer_id",
780
- "in": "path",
781
- "required": true
782
- }
783
- ]
776
+ "operationId": "getCustomerBalance"
784
777
  }
785
778
  },
786
779
  "/v2/portal/admin:login-as-user": {