flexprice-sdk-test 1.0.48 → 1.0.51
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/README.md +4 -69
- package/examples/node_modules/.package-lock.json +1 -1
- package/examples/package-lock.json +1 -1
- package/funcs/{customerDashboardPostCustomerDashboardCostAnalytics.d.ts → customerPortalGetPortalExternalId.d.ts} +4 -5
- package/funcs/customerPortalGetPortalExternalId.d.ts.map +1 -0
- package/funcs/{customerDashboardGetCustomerDashboardWalletsId.js → customerPortalGetPortalExternalId.js} +18 -22
- package/funcs/customerPortalGetPortalExternalId.js.map +1 -0
- package/jsr.json +1 -1
- package/lib/config.d.ts +2 -2
- package/lib/config.js +2 -2
- package/models/components/dtoportalsessionresponse.d.ts +12 -0
- package/models/components/dtoportalsessionresponse.d.ts.map +1 -0
- package/models/components/{dtodashboardsessionresponse.js → dtoportalsessionresponse.js} +6 -6
- package/models/components/dtoportalsessionresponse.js.map +1 -0
- package/models/components/index.d.ts +1 -4
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +1 -4
- package/models/components/index.js.map +1 -1
- package/models/components/security.d.ts +2 -2
- package/models/components/security.d.ts.map +1 -1
- package/models/components/security.js +1 -1
- package/models/components/security.js.map +1 -1
- package/models/operations/getportalexternalid.d.ts +15 -0
- package/models/operations/getportalexternalid.d.ts.map +1 -0
- package/models/operations/{putcustomerdashboardinfo.js → getportalexternalid.js} +8 -8
- package/models/operations/getportalexternalid.js.map +1 -0
- package/models/operations/index.d.ts +1 -11
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +1 -11
- package/models/operations/index.js.map +1 -1
- package/package.json +1 -1
- package/sdk/customerportal.d.ts +12 -0
- package/sdk/customerportal.d.ts.map +1 -0
- package/sdk/customerportal.js +22 -0
- package/sdk/customerportal.js.map +1 -0
- package/sdk/sdk.d.ts +3 -3
- package/sdk/sdk.d.ts.map +1 -1
- package/sdk/sdk.js +4 -4
- package/sdk/sdk.js.map +1 -1
- package/src/funcs/{customerDashboardGetCustomerDashboardExternalId.ts → customerPortalGetPortalExternalId.ts} +38 -8
- package/src/lib/config.ts +2 -2
- package/src/models/components/{dtodashboardsessionresponse.ts → dtoportalsessionresponse.ts} +7 -7
- package/src/models/components/index.ts +1 -4
- package/src/models/components/security.ts +3 -3
- package/src/models/operations/getportalexternalid.ts +39 -0
- package/src/models/operations/index.ts +1 -11
- package/src/sdk/customerportal.ts +27 -0
- package/src/sdk/sdk.ts +6 -6
- package/funcs/customerDashboardGetCustomerDashboardExternalId.d.ts +0 -18
- package/funcs/customerDashboardGetCustomerDashboardExternalId.d.ts.map +0 -1
- package/funcs/customerDashboardGetCustomerDashboardExternalId.js +0 -118
- package/funcs/customerDashboardGetCustomerDashboardExternalId.js.map +0 -1
- package/funcs/customerDashboardGetCustomerDashboardInfo.d.ts +0 -19
- package/funcs/customerDashboardGetCustomerDashboardInfo.d.ts.map +0 -1
- package/funcs/customerDashboardGetCustomerDashboardInfo.js +0 -122
- package/funcs/customerDashboardGetCustomerDashboardInfo.js.map +0 -1
- package/funcs/customerDashboardGetCustomerDashboardInvoicesId.d.ts +0 -19
- package/funcs/customerDashboardGetCustomerDashboardInvoicesId.d.ts.map +0 -1
- package/funcs/customerDashboardGetCustomerDashboardInvoicesId.js +0 -141
- package/funcs/customerDashboardGetCustomerDashboardInvoicesId.js.map +0 -1
- package/funcs/customerDashboardGetCustomerDashboardSubscriptionsId.d.ts +0 -19
- package/funcs/customerDashboardGetCustomerDashboardSubscriptionsId.d.ts.map +0 -1
- package/funcs/customerDashboardGetCustomerDashboardSubscriptionsId.js +0 -142
- package/funcs/customerDashboardGetCustomerDashboardSubscriptionsId.js.map +0 -1
- package/funcs/customerDashboardGetCustomerDashboardUsage.d.ts +0 -19
- package/funcs/customerDashboardGetCustomerDashboardUsage.d.ts.map +0 -1
- package/funcs/customerDashboardGetCustomerDashboardUsage.js +0 -141
- package/funcs/customerDashboardGetCustomerDashboardUsage.js.map +0 -1
- package/funcs/customerDashboardGetCustomerDashboardWalletsId.d.ts +0 -19
- package/funcs/customerDashboardGetCustomerDashboardWalletsId.d.ts.map +0 -1
- package/funcs/customerDashboardGetCustomerDashboardWalletsId.js.map +0 -1
- package/funcs/customerDashboardPostCustomerDashboardAnalytics.d.ts +0 -19
- package/funcs/customerDashboardPostCustomerDashboardAnalytics.d.ts.map +0 -1
- package/funcs/customerDashboardPostCustomerDashboardAnalytics.js +0 -132
- package/funcs/customerDashboardPostCustomerDashboardAnalytics.js.map +0 -1
- package/funcs/customerDashboardPostCustomerDashboardCostAnalytics.d.ts.map +0 -1
- package/funcs/customerDashboardPostCustomerDashboardCostAnalytics.js +0 -132
- package/funcs/customerDashboardPostCustomerDashboardCostAnalytics.js.map +0 -1
- package/funcs/customerDashboardPostCustomerDashboardInvoices.d.ts +0 -19
- package/funcs/customerDashboardPostCustomerDashboardInvoices.d.ts.map +0 -1
- package/funcs/customerDashboardPostCustomerDashboardInvoices.js +0 -132
- package/funcs/customerDashboardPostCustomerDashboardInvoices.js.map +0 -1
- package/funcs/customerDashboardPostCustomerDashboardSubscriptions.d.ts +0 -19
- package/funcs/customerDashboardPostCustomerDashboardSubscriptions.d.ts.map +0 -1
- package/funcs/customerDashboardPostCustomerDashboardSubscriptions.js +0 -132
- package/funcs/customerDashboardPostCustomerDashboardSubscriptions.js.map +0 -1
- package/funcs/customerDashboardPostCustomerDashboardWallets.d.ts +0 -19
- package/funcs/customerDashboardPostCustomerDashboardWallets.d.ts.map +0 -1
- package/funcs/customerDashboardPostCustomerDashboardWallets.js +0 -123
- package/funcs/customerDashboardPostCustomerDashboardWallets.js.map +0 -1
- package/funcs/customerDashboardPutCustomerDashboardInfo.d.ts +0 -19
- package/funcs/customerDashboardPutCustomerDashboardInfo.d.ts.map +0 -1
- package/funcs/customerDashboardPutCustomerDashboardInfo.js +0 -132
- package/funcs/customerDashboardPutCustomerDashboardInfo.js.map +0 -1
- package/models/components/dtodashboardanalyticsrequest.d.ts +0 -31
- package/models/components/dtodashboardanalyticsrequest.d.ts.map +0 -1
- package/models/components/dtodashboardanalyticsrequest.js +0 -67
- package/models/components/dtodashboardanalyticsrequest.js.map +0 -1
- package/models/components/dtodashboardcostanalyticsrequest.d.ts +0 -16
- package/models/components/dtodashboardcostanalyticsrequest.d.ts.map +0 -1
- package/models/components/dtodashboardcostanalyticsrequest.js +0 -58
- package/models/components/dtodashboardcostanalyticsrequest.js.map +0 -1
- package/models/components/dtodashboardpaginatedrequest.d.ts +0 -14
- package/models/components/dtodashboardpaginatedrequest.d.ts.map +0 -1
- package/models/components/dtodashboardpaginatedrequest.js +0 -50
- package/models/components/dtodashboardpaginatedrequest.js.map +0 -1
- package/models/components/dtodashboardsessionresponse.d.ts +0 -12
- package/models/components/dtodashboardsessionresponse.d.ts.map +0 -1
- package/models/components/dtodashboardsessionresponse.js.map +0 -1
- package/models/operations/getcustomerdashboardinfo.d.ts +0 -12
- package/models/operations/getcustomerdashboardinfo.d.ts.map +0 -1
- package/models/operations/getcustomerdashboardinfo.js +0 -54
- package/models/operations/getcustomerdashboardinfo.js.map +0 -1
- package/models/operations/getcustomerdashboardinvoicesid.d.ts +0 -25
- package/models/operations/getcustomerdashboardinvoicesid.d.ts.map +0 -1
- package/models/operations/getcustomerdashboardinvoicesid.js +0 -62
- package/models/operations/getcustomerdashboardinvoicesid.js.map +0 -1
- package/models/operations/getcustomerdashboardsubscriptionsid.d.ts +0 -25
- package/models/operations/getcustomerdashboardsubscriptionsid.d.ts.map +0 -1
- package/models/operations/getcustomerdashboardsubscriptionsid.js +0 -62
- package/models/operations/getcustomerdashboardsubscriptionsid.js.map +0 -1
- package/models/operations/getcustomerdashboardusage.d.ts +0 -30
- package/models/operations/getcustomerdashboardusage.d.ts.map +0 -1
- package/models/operations/getcustomerdashboardusage.js +0 -74
- package/models/operations/getcustomerdashboardusage.js.map +0 -1
- package/models/operations/getcustomerdashboardwalletsid.d.ts +0 -25
- package/models/operations/getcustomerdashboardwalletsid.d.ts.map +0 -1
- package/models/operations/getcustomerdashboardwalletsid.js +0 -62
- package/models/operations/getcustomerdashboardwalletsid.js.map +0 -1
- package/models/operations/postcustomerdashboardanalytics.d.ts +0 -12
- package/models/operations/postcustomerdashboardanalytics.d.ts.map +0 -1
- package/models/operations/postcustomerdashboardanalytics.js +0 -54
- package/models/operations/postcustomerdashboardanalytics.js.map +0 -1
- package/models/operations/postcustomerdashboardcostanalytics.d.ts +0 -12
- package/models/operations/postcustomerdashboardcostanalytics.d.ts.map +0 -1
- package/models/operations/postcustomerdashboardcostanalytics.js +0 -54
- package/models/operations/postcustomerdashboardcostanalytics.js.map +0 -1
- package/models/operations/postcustomerdashboardinvoices.d.ts +0 -12
- package/models/operations/postcustomerdashboardinvoices.d.ts.map +0 -1
- package/models/operations/postcustomerdashboardinvoices.js +0 -54
- package/models/operations/postcustomerdashboardinvoices.js.map +0 -1
- package/models/operations/postcustomerdashboardsubscriptions.d.ts +0 -12
- package/models/operations/postcustomerdashboardsubscriptions.d.ts.map +0 -1
- package/models/operations/postcustomerdashboardsubscriptions.js +0 -54
- package/models/operations/postcustomerdashboardsubscriptions.js.map +0 -1
- package/models/operations/postcustomerdashboardwallets.d.ts +0 -12
- package/models/operations/postcustomerdashboardwallets.d.ts.map +0 -1
- package/models/operations/postcustomerdashboardwallets.js +0 -54
- package/models/operations/postcustomerdashboardwallets.js.map +0 -1
- package/models/operations/putcustomerdashboardinfo.d.ts +0 -12
- package/models/operations/putcustomerdashboardinfo.d.ts.map +0 -1
- package/models/operations/putcustomerdashboardinfo.js.map +0 -1
- package/sdk/customerdashboard.d.ts +0 -90
- package/sdk/customerdashboard.d.ts.map +0 -1
- package/sdk/customerdashboard.js +0 -132
- package/sdk/customerdashboard.js.map +0 -1
- package/src/funcs/customerDashboardGetCustomerDashboardInfo.ts +0 -172
- package/src/funcs/customerDashboardGetCustomerDashboardInvoicesId.ts +0 -203
- package/src/funcs/customerDashboardGetCustomerDashboardSubscriptionsId.ts +0 -202
- package/src/funcs/customerDashboardGetCustomerDashboardUsage.ts +0 -203
- package/src/funcs/customerDashboardGetCustomerDashboardWalletsId.ts +0 -203
- package/src/funcs/customerDashboardPostCustomerDashboardAnalytics.ts +0 -191
- package/src/funcs/customerDashboardPostCustomerDashboardCostAnalytics.ts +0 -191
- package/src/funcs/customerDashboardPostCustomerDashboardInvoices.ts +0 -191
- package/src/funcs/customerDashboardPostCustomerDashboardSubscriptions.ts +0 -191
- package/src/funcs/customerDashboardPostCustomerDashboardWallets.ts +0 -173
- package/src/funcs/customerDashboardPutCustomerDashboardInfo.ts +0 -190
- package/src/models/components/dtodashboardanalyticsrequest.ts +0 -68
- package/src/models/components/dtodashboardcostanalyticsrequest.ts +0 -46
- package/src/models/components/dtodashboardpaginatedrequest.ts +0 -36
- package/src/models/operations/getcustomerdashboardinfo.ts +0 -38
- package/src/models/operations/getcustomerdashboardinvoicesid.ts +0 -70
- package/src/models/operations/getcustomerdashboardsubscriptionsid.ts +0 -73
- package/src/models/operations/getcustomerdashboardusage.ts +0 -86
- package/src/models/operations/getcustomerdashboardwalletsid.ts +0 -69
- package/src/models/operations/postcustomerdashboardanalytics.ts +0 -39
- package/src/models/operations/postcustomerdashboardcostanalytics.ts +0 -40
- package/src/models/operations/postcustomerdashboardinvoices.ts +0 -38
- package/src/models/operations/postcustomerdashboardsubscriptions.ts +0 -40
- package/src/models/operations/postcustomerdashboardwallets.ts +0 -38
- package/src/models/operations/putcustomerdashboardinfo.ts +0 -38
- package/src/sdk/customerdashboard.ts +0 -242
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
2
|
-
import * as components from "../models/components/index.js";
|
|
3
|
-
import * as operations from "../models/operations/index.js";
|
|
4
|
-
export declare class CustomerDashboard extends ClientSDK {
|
|
5
|
-
/**
|
|
6
|
-
* Create a customer dashboard session
|
|
7
|
-
*
|
|
8
|
-
* @remarks
|
|
9
|
-
* Generate a dashboard URL/token for a customer to access their billing information
|
|
10
|
-
*/
|
|
11
|
-
getCustomerDashboardExternalId(options?: RequestOptions): Promise<components.DtoDashboardSessionResponse>;
|
|
12
|
-
/**
|
|
13
|
-
* Get customer analytics
|
|
14
|
-
*
|
|
15
|
-
* @remarks
|
|
16
|
-
* Get usage analytics for the authenticated customer
|
|
17
|
-
*/
|
|
18
|
-
postCustomerDashboardAnalytics(security: operations.PostCustomerDashboardAnalyticsSecurity, request: components.DtoDashboardAnalyticsRequest, options?: RequestOptions): Promise<components.DtoGetUsageAnalyticsResponse>;
|
|
19
|
-
/**
|
|
20
|
-
* Get customer cost analytics
|
|
21
|
-
*
|
|
22
|
-
* @remarks
|
|
23
|
-
* Get cost analytics for the authenticated customer
|
|
24
|
-
*/
|
|
25
|
-
postCustomerDashboardCostAnalytics(security: operations.PostCustomerDashboardCostAnalyticsSecurity, request: components.DtoDashboardCostAnalyticsRequest, options?: RequestOptions): Promise<components.DtoGetDetailedCostAnalyticsResponse>;
|
|
26
|
-
/**
|
|
27
|
-
* Get customer information
|
|
28
|
-
*
|
|
29
|
-
* @remarks
|
|
30
|
-
* Get the authenticated customer's information
|
|
31
|
-
*/
|
|
32
|
-
getCustomerDashboardInfo(security: operations.GetCustomerDashboardInfoSecurity, options?: RequestOptions): Promise<components.DtoCustomerResponse>;
|
|
33
|
-
/**
|
|
34
|
-
* Update customer information
|
|
35
|
-
*
|
|
36
|
-
* @remarks
|
|
37
|
-
* Update the authenticated customer's profile information
|
|
38
|
-
*/
|
|
39
|
-
putCustomerDashboardInfo(security: operations.PutCustomerDashboardInfoSecurity, request: components.DtoUpdateCustomerRequest, options?: RequestOptions): Promise<components.DtoCustomerResponse>;
|
|
40
|
-
/**
|
|
41
|
-
* Get customer invoices
|
|
42
|
-
*
|
|
43
|
-
* @remarks
|
|
44
|
-
* Get all invoices for the authenticated customer with pagination
|
|
45
|
-
*/
|
|
46
|
-
postCustomerDashboardInvoices(security: operations.PostCustomerDashboardInvoicesSecurity, request: components.DtoDashboardPaginatedRequest, options?: RequestOptions): Promise<components.DtoListInvoicesResponse>;
|
|
47
|
-
/**
|
|
48
|
-
* Get invoice by ID
|
|
49
|
-
*
|
|
50
|
-
* @remarks
|
|
51
|
-
* Get a specific invoice for the authenticated customer
|
|
52
|
-
*/
|
|
53
|
-
getCustomerDashboardInvoicesId(security: operations.GetCustomerDashboardInvoicesIdSecurity, id: string, options?: RequestOptions): Promise<components.DtoInvoiceResponse>;
|
|
54
|
-
/**
|
|
55
|
-
* Get customer subscriptions
|
|
56
|
-
*
|
|
57
|
-
* @remarks
|
|
58
|
-
* Get all subscriptions for the authenticated customer with pagination
|
|
59
|
-
*/
|
|
60
|
-
postCustomerDashboardSubscriptions(security: operations.PostCustomerDashboardSubscriptionsSecurity, request: components.DtoDashboardPaginatedRequest, options?: RequestOptions): Promise<components.DtoListSubscriptionsResponse>;
|
|
61
|
-
/**
|
|
62
|
-
* Get subscription by ID
|
|
63
|
-
*
|
|
64
|
-
* @remarks
|
|
65
|
-
* Get a specific subscription for the authenticated customer
|
|
66
|
-
*/
|
|
67
|
-
getCustomerDashboardSubscriptionsId(security: operations.GetCustomerDashboardSubscriptionsIdSecurity, id: string, options?: RequestOptions): Promise<components.DtoSubscriptionResponse>;
|
|
68
|
-
/**
|
|
69
|
-
* Get customer usage summary
|
|
70
|
-
*
|
|
71
|
-
* @remarks
|
|
72
|
-
* Get usage summary for the authenticated customer's metered features
|
|
73
|
-
*/
|
|
74
|
-
getCustomerDashboardUsage(security: operations.GetCustomerDashboardUsageSecurity, request: operations.GetCustomerDashboardUsageRequest, options?: RequestOptions): Promise<components.DtoCustomerUsageSummaryResponse>;
|
|
75
|
-
/**
|
|
76
|
-
* Get customer wallets
|
|
77
|
-
*
|
|
78
|
-
* @remarks
|
|
79
|
-
* Get all wallet balances for the authenticated customer
|
|
80
|
-
*/
|
|
81
|
-
postCustomerDashboardWallets(security: operations.PostCustomerDashboardWalletsSecurity, options?: RequestOptions): Promise<Array<components.DtoWalletBalanceResponse>>;
|
|
82
|
-
/**
|
|
83
|
-
* Get wallet by ID
|
|
84
|
-
*
|
|
85
|
-
* @remarks
|
|
86
|
-
* Get a specific wallet for the authenticated customer
|
|
87
|
-
*/
|
|
88
|
-
getCustomerDashboardWalletsId(security: operations.GetCustomerDashboardWalletsIdSecurity, id: string, options?: RequestOptions): Promise<components.DtoWalletBalanceResponse>;
|
|
89
|
-
}
|
|
90
|
-
//# sourceMappingURL=customerdashboard.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"customerdashboard.d.ts","sourceRoot":"","sources":["../src/sdk/customerdashboard.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAG5D,qBAAa,iBAAkB,SAAQ,SAAS;IAC9C;;;;;OAKG;IACG,8BAA8B,CAClC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,2BAA2B,CAAC;IAOlD;;;;;OAKG;IACG,8BAA8B,CAClC,QAAQ,EAAE,UAAU,CAAC,sCAAsC,EAC3D,OAAO,EAAE,UAAU,CAAC,4BAA4B,EAChD,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,4BAA4B,CAAC;IASnD;;;;;OAKG;IACG,kCAAkC,CACtC,QAAQ,EAAE,UAAU,CAAC,0CAA0C,EAC/D,OAAO,EAAE,UAAU,CAAC,gCAAgC,EACpD,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,mCAAmC,CAAC;IAS1D;;;;;OAKG;IACG,wBAAwB,CAC5B,QAAQ,EAAE,UAAU,CAAC,gCAAgC,EACrD,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,mBAAmB,CAAC;IAQ1C;;;;;OAKG;IACG,wBAAwB,CAC5B,QAAQ,EAAE,UAAU,CAAC,gCAAgC,EACrD,OAAO,EAAE,UAAU,CAAC,wBAAwB,EAC5C,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,mBAAmB,CAAC;IAS1C;;;;;OAKG;IACG,6BAA6B,CACjC,QAAQ,EAAE,UAAU,CAAC,qCAAqC,EAC1D,OAAO,EAAE,UAAU,CAAC,4BAA4B,EAChD,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,uBAAuB,CAAC;IAS9C;;;;;OAKG;IACG,8BAA8B,CAClC,QAAQ,EAAE,UAAU,CAAC,sCAAsC,EAC3D,EAAE,EAAE,MAAM,EACV,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,kBAAkB,CAAC;IASzC;;;;;OAKG;IACG,kCAAkC,CACtC,QAAQ,EAAE,UAAU,CAAC,0CAA0C,EAC/D,OAAO,EAAE,UAAU,CAAC,4BAA4B,EAChD,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,4BAA4B,CAAC;IASnD;;;;;OAKG;IACG,mCAAmC,CACvC,QAAQ,EAAE,UAAU,CAAC,2CAA2C,EAChE,EAAE,EAAE,MAAM,EACV,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,uBAAuB,CAAC;IAS9C;;;;;OAKG;IACG,yBAAyB,CAC7B,QAAQ,EAAE,UAAU,CAAC,iCAAiC,EACtD,OAAO,EAAE,UAAU,CAAC,gCAAgC,EACpD,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,+BAA+B,CAAC;IAStD;;;;;OAKG;IACG,4BAA4B,CAChC,QAAQ,EAAE,UAAU,CAAC,oCAAoC,EACzD,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,KAAK,CAAC,UAAU,CAAC,wBAAwB,CAAC,CAAC;IAQtD;;;;;OAKG;IACG,6BAA6B,CACjC,QAAQ,EAAE,UAAU,CAAC,qCAAqC,EAC1D,EAAE,EAAE,MAAM,EACV,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,wBAAwB,CAAC;CAQhD"}
|
package/sdk/customerdashboard.js
DELETED
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
4
|
-
*/
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.CustomerDashboard = void 0;
|
|
7
|
-
const customerDashboardGetCustomerDashboardExternalId_js_1 = require("../funcs/customerDashboardGetCustomerDashboardExternalId.js");
|
|
8
|
-
const customerDashboardGetCustomerDashboardInfo_js_1 = require("../funcs/customerDashboardGetCustomerDashboardInfo.js");
|
|
9
|
-
const customerDashboardGetCustomerDashboardInvoicesId_js_1 = require("../funcs/customerDashboardGetCustomerDashboardInvoicesId.js");
|
|
10
|
-
const customerDashboardGetCustomerDashboardSubscriptionsId_js_1 = require("../funcs/customerDashboardGetCustomerDashboardSubscriptionsId.js");
|
|
11
|
-
const customerDashboardGetCustomerDashboardUsage_js_1 = require("../funcs/customerDashboardGetCustomerDashboardUsage.js");
|
|
12
|
-
const customerDashboardGetCustomerDashboardWalletsId_js_1 = require("../funcs/customerDashboardGetCustomerDashboardWalletsId.js");
|
|
13
|
-
const customerDashboardPostCustomerDashboardAnalytics_js_1 = require("../funcs/customerDashboardPostCustomerDashboardAnalytics.js");
|
|
14
|
-
const customerDashboardPostCustomerDashboardCostAnalytics_js_1 = require("../funcs/customerDashboardPostCustomerDashboardCostAnalytics.js");
|
|
15
|
-
const customerDashboardPostCustomerDashboardInvoices_js_1 = require("../funcs/customerDashboardPostCustomerDashboardInvoices.js");
|
|
16
|
-
const customerDashboardPostCustomerDashboardSubscriptions_js_1 = require("../funcs/customerDashboardPostCustomerDashboardSubscriptions.js");
|
|
17
|
-
const customerDashboardPostCustomerDashboardWallets_js_1 = require("../funcs/customerDashboardPostCustomerDashboardWallets.js");
|
|
18
|
-
const customerDashboardPutCustomerDashboardInfo_js_1 = require("../funcs/customerDashboardPutCustomerDashboardInfo.js");
|
|
19
|
-
const sdks_js_1 = require("../lib/sdks.js");
|
|
20
|
-
const fp_js_1 = require("../types/fp.js");
|
|
21
|
-
class CustomerDashboard extends sdks_js_1.ClientSDK {
|
|
22
|
-
/**
|
|
23
|
-
* Create a customer dashboard session
|
|
24
|
-
*
|
|
25
|
-
* @remarks
|
|
26
|
-
* Generate a dashboard URL/token for a customer to access their billing information
|
|
27
|
-
*/
|
|
28
|
-
async getCustomerDashboardExternalId(options) {
|
|
29
|
-
return (0, fp_js_1.unwrapAsync)((0, customerDashboardGetCustomerDashboardExternalId_js_1.customerDashboardGetCustomerDashboardExternalId)(this, options));
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* Get customer analytics
|
|
33
|
-
*
|
|
34
|
-
* @remarks
|
|
35
|
-
* Get usage analytics for the authenticated customer
|
|
36
|
-
*/
|
|
37
|
-
async postCustomerDashboardAnalytics(security, request, options) {
|
|
38
|
-
return (0, fp_js_1.unwrapAsync)((0, customerDashboardPostCustomerDashboardAnalytics_js_1.customerDashboardPostCustomerDashboardAnalytics)(this, security, request, options));
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* Get customer cost analytics
|
|
42
|
-
*
|
|
43
|
-
* @remarks
|
|
44
|
-
* Get cost analytics for the authenticated customer
|
|
45
|
-
*/
|
|
46
|
-
async postCustomerDashboardCostAnalytics(security, request, options) {
|
|
47
|
-
return (0, fp_js_1.unwrapAsync)((0, customerDashboardPostCustomerDashboardCostAnalytics_js_1.customerDashboardPostCustomerDashboardCostAnalytics)(this, security, request, options));
|
|
48
|
-
}
|
|
49
|
-
/**
|
|
50
|
-
* Get customer information
|
|
51
|
-
*
|
|
52
|
-
* @remarks
|
|
53
|
-
* Get the authenticated customer's information
|
|
54
|
-
*/
|
|
55
|
-
async getCustomerDashboardInfo(security, options) {
|
|
56
|
-
return (0, fp_js_1.unwrapAsync)((0, customerDashboardGetCustomerDashboardInfo_js_1.customerDashboardGetCustomerDashboardInfo)(this, security, options));
|
|
57
|
-
}
|
|
58
|
-
/**
|
|
59
|
-
* Update customer information
|
|
60
|
-
*
|
|
61
|
-
* @remarks
|
|
62
|
-
* Update the authenticated customer's profile information
|
|
63
|
-
*/
|
|
64
|
-
async putCustomerDashboardInfo(security, request, options) {
|
|
65
|
-
return (0, fp_js_1.unwrapAsync)((0, customerDashboardPutCustomerDashboardInfo_js_1.customerDashboardPutCustomerDashboardInfo)(this, security, request, options));
|
|
66
|
-
}
|
|
67
|
-
/**
|
|
68
|
-
* Get customer invoices
|
|
69
|
-
*
|
|
70
|
-
* @remarks
|
|
71
|
-
* Get all invoices for the authenticated customer with pagination
|
|
72
|
-
*/
|
|
73
|
-
async postCustomerDashboardInvoices(security, request, options) {
|
|
74
|
-
return (0, fp_js_1.unwrapAsync)((0, customerDashboardPostCustomerDashboardInvoices_js_1.customerDashboardPostCustomerDashboardInvoices)(this, security, request, options));
|
|
75
|
-
}
|
|
76
|
-
/**
|
|
77
|
-
* Get invoice by ID
|
|
78
|
-
*
|
|
79
|
-
* @remarks
|
|
80
|
-
* Get a specific invoice for the authenticated customer
|
|
81
|
-
*/
|
|
82
|
-
async getCustomerDashboardInvoicesId(security, id, options) {
|
|
83
|
-
return (0, fp_js_1.unwrapAsync)((0, customerDashboardGetCustomerDashboardInvoicesId_js_1.customerDashboardGetCustomerDashboardInvoicesId)(this, security, id, options));
|
|
84
|
-
}
|
|
85
|
-
/**
|
|
86
|
-
* Get customer subscriptions
|
|
87
|
-
*
|
|
88
|
-
* @remarks
|
|
89
|
-
* Get all subscriptions for the authenticated customer with pagination
|
|
90
|
-
*/
|
|
91
|
-
async postCustomerDashboardSubscriptions(security, request, options) {
|
|
92
|
-
return (0, fp_js_1.unwrapAsync)((0, customerDashboardPostCustomerDashboardSubscriptions_js_1.customerDashboardPostCustomerDashboardSubscriptions)(this, security, request, options));
|
|
93
|
-
}
|
|
94
|
-
/**
|
|
95
|
-
* Get subscription by ID
|
|
96
|
-
*
|
|
97
|
-
* @remarks
|
|
98
|
-
* Get a specific subscription for the authenticated customer
|
|
99
|
-
*/
|
|
100
|
-
async getCustomerDashboardSubscriptionsId(security, id, options) {
|
|
101
|
-
return (0, fp_js_1.unwrapAsync)((0, customerDashboardGetCustomerDashboardSubscriptionsId_js_1.customerDashboardGetCustomerDashboardSubscriptionsId)(this, security, id, options));
|
|
102
|
-
}
|
|
103
|
-
/**
|
|
104
|
-
* Get customer usage summary
|
|
105
|
-
*
|
|
106
|
-
* @remarks
|
|
107
|
-
* Get usage summary for the authenticated customer's metered features
|
|
108
|
-
*/
|
|
109
|
-
async getCustomerDashboardUsage(security, request, options) {
|
|
110
|
-
return (0, fp_js_1.unwrapAsync)((0, customerDashboardGetCustomerDashboardUsage_js_1.customerDashboardGetCustomerDashboardUsage)(this, security, request, options));
|
|
111
|
-
}
|
|
112
|
-
/**
|
|
113
|
-
* Get customer wallets
|
|
114
|
-
*
|
|
115
|
-
* @remarks
|
|
116
|
-
* Get all wallet balances for the authenticated customer
|
|
117
|
-
*/
|
|
118
|
-
async postCustomerDashboardWallets(security, options) {
|
|
119
|
-
return (0, fp_js_1.unwrapAsync)((0, customerDashboardPostCustomerDashboardWallets_js_1.customerDashboardPostCustomerDashboardWallets)(this, security, options));
|
|
120
|
-
}
|
|
121
|
-
/**
|
|
122
|
-
* Get wallet by ID
|
|
123
|
-
*
|
|
124
|
-
* @remarks
|
|
125
|
-
* Get a specific wallet for the authenticated customer
|
|
126
|
-
*/
|
|
127
|
-
async getCustomerDashboardWalletsId(security, id, options) {
|
|
128
|
-
return (0, fp_js_1.unwrapAsync)((0, customerDashboardGetCustomerDashboardWalletsId_js_1.customerDashboardGetCustomerDashboardWalletsId)(this, security, id, options));
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
exports.CustomerDashboard = CustomerDashboard;
|
|
132
|
-
//# sourceMappingURL=customerdashboard.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"customerdashboard.js","sourceRoot":"","sources":["../src/sdk/customerdashboard.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,172 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import { FlexPriceCore } from "../core.js";
|
|
6
|
-
import * as M from "../lib/matchers.js";
|
|
7
|
-
import { compactMap } from "../lib/primitives.js";
|
|
8
|
-
import { RequestOptions } from "../lib/sdks.js";
|
|
9
|
-
import { resolveSecurity } from "../lib/security.js";
|
|
10
|
-
import { pathToFunc } from "../lib/url.js";
|
|
11
|
-
import * as components from "../models/components/index.js";
|
|
12
|
-
import { FlexPriceError } from "../models/errors/flexpriceerror.js";
|
|
13
|
-
import {
|
|
14
|
-
ConnectionError,
|
|
15
|
-
InvalidRequestError,
|
|
16
|
-
RequestAbortedError,
|
|
17
|
-
RequestTimeoutError,
|
|
18
|
-
UnexpectedClientError,
|
|
19
|
-
} from "../models/errors/httpclienterrors.js";
|
|
20
|
-
import * as errors from "../models/errors/index.js";
|
|
21
|
-
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
22
|
-
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
23
|
-
import * as operations from "../models/operations/index.js";
|
|
24
|
-
import { APICall, APIPromise } from "../types/async.js";
|
|
25
|
-
import { Result } from "../types/fp.js";
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* Get customer information
|
|
29
|
-
*
|
|
30
|
-
* @remarks
|
|
31
|
-
* Get the authenticated customer's information
|
|
32
|
-
*/
|
|
33
|
-
export function customerDashboardGetCustomerDashboardInfo(
|
|
34
|
-
client: FlexPriceCore,
|
|
35
|
-
security: operations.GetCustomerDashboardInfoSecurity,
|
|
36
|
-
options?: RequestOptions,
|
|
37
|
-
): APIPromise<
|
|
38
|
-
Result<
|
|
39
|
-
components.DtoCustomerResponse,
|
|
40
|
-
| errors.ErrorsErrorResponse
|
|
41
|
-
| FlexPriceError
|
|
42
|
-
| ResponseValidationError
|
|
43
|
-
| ConnectionError
|
|
44
|
-
| RequestAbortedError
|
|
45
|
-
| RequestTimeoutError
|
|
46
|
-
| InvalidRequestError
|
|
47
|
-
| UnexpectedClientError
|
|
48
|
-
| SDKValidationError
|
|
49
|
-
>
|
|
50
|
-
> {
|
|
51
|
-
return new APIPromise($do(
|
|
52
|
-
client,
|
|
53
|
-
security,
|
|
54
|
-
options,
|
|
55
|
-
));
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
async function $do(
|
|
59
|
-
client: FlexPriceCore,
|
|
60
|
-
security: operations.GetCustomerDashboardInfoSecurity,
|
|
61
|
-
options?: RequestOptions,
|
|
62
|
-
): Promise<
|
|
63
|
-
[
|
|
64
|
-
Result<
|
|
65
|
-
components.DtoCustomerResponse,
|
|
66
|
-
| errors.ErrorsErrorResponse
|
|
67
|
-
| FlexPriceError
|
|
68
|
-
| ResponseValidationError
|
|
69
|
-
| ConnectionError
|
|
70
|
-
| RequestAbortedError
|
|
71
|
-
| RequestTimeoutError
|
|
72
|
-
| InvalidRequestError
|
|
73
|
-
| UnexpectedClientError
|
|
74
|
-
| SDKValidationError
|
|
75
|
-
>,
|
|
76
|
-
APICall,
|
|
77
|
-
]
|
|
78
|
-
> {
|
|
79
|
-
const path = pathToFunc("/customer-dashboard/info")();
|
|
80
|
-
|
|
81
|
-
const headers = new Headers(compactMap({
|
|
82
|
-
Accept: "application/json",
|
|
83
|
-
}));
|
|
84
|
-
|
|
85
|
-
const requestSecurity = resolveSecurity(
|
|
86
|
-
[
|
|
87
|
-
{
|
|
88
|
-
fieldName: "Authorization",
|
|
89
|
-
type: "apiKey:header",
|
|
90
|
-
value: security?.bearerAuth,
|
|
91
|
-
},
|
|
92
|
-
],
|
|
93
|
-
);
|
|
94
|
-
|
|
95
|
-
const context = {
|
|
96
|
-
options: client._options,
|
|
97
|
-
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
98
|
-
operationID: "get_/customer-dashboard/info",
|
|
99
|
-
oAuth2Scopes: null,
|
|
100
|
-
|
|
101
|
-
resolvedSecurity: requestSecurity,
|
|
102
|
-
|
|
103
|
-
securitySource: security,
|
|
104
|
-
retryConfig: options?.retries
|
|
105
|
-
|| client._options.retryConfig
|
|
106
|
-
|| {
|
|
107
|
-
strategy: "backoff",
|
|
108
|
-
backoff: {
|
|
109
|
-
initialInterval: 500,
|
|
110
|
-
maxInterval: 60000,
|
|
111
|
-
exponent: 1.5,
|
|
112
|
-
maxElapsedTime: 3600000,
|
|
113
|
-
},
|
|
114
|
-
retryConnectionErrors: true,
|
|
115
|
-
}
|
|
116
|
-
|| { strategy: "none" },
|
|
117
|
-
retryCodes: options?.retryCodes || ["5XX", "429"],
|
|
118
|
-
};
|
|
119
|
-
|
|
120
|
-
const requestRes = client._createRequest(context, {
|
|
121
|
-
security: requestSecurity,
|
|
122
|
-
method: "GET",
|
|
123
|
-
baseURL: options?.serverURL,
|
|
124
|
-
path: path,
|
|
125
|
-
headers: headers,
|
|
126
|
-
userAgent: client._options.userAgent,
|
|
127
|
-
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
128
|
-
}, options);
|
|
129
|
-
if (!requestRes.ok) {
|
|
130
|
-
return [requestRes, { status: "invalid" }];
|
|
131
|
-
}
|
|
132
|
-
const req = requestRes.value;
|
|
133
|
-
|
|
134
|
-
const doResult = await client._do(req, {
|
|
135
|
-
context,
|
|
136
|
-
errorCodes: ["401", "4XX", "500", "5XX"],
|
|
137
|
-
retryConfig: context.retryConfig,
|
|
138
|
-
retryCodes: context.retryCodes,
|
|
139
|
-
});
|
|
140
|
-
if (!doResult.ok) {
|
|
141
|
-
return [doResult, { status: "request-error", request: req }];
|
|
142
|
-
}
|
|
143
|
-
const response = doResult.value;
|
|
144
|
-
|
|
145
|
-
const responseFields = {
|
|
146
|
-
HttpMeta: { Response: response, Request: req },
|
|
147
|
-
};
|
|
148
|
-
|
|
149
|
-
const [result] = await M.match<
|
|
150
|
-
components.DtoCustomerResponse,
|
|
151
|
-
| errors.ErrorsErrorResponse
|
|
152
|
-
| FlexPriceError
|
|
153
|
-
| ResponseValidationError
|
|
154
|
-
| ConnectionError
|
|
155
|
-
| RequestAbortedError
|
|
156
|
-
| RequestTimeoutError
|
|
157
|
-
| InvalidRequestError
|
|
158
|
-
| UnexpectedClientError
|
|
159
|
-
| SDKValidationError
|
|
160
|
-
>(
|
|
161
|
-
M.json(200, components.DtoCustomerResponse$inboundSchema),
|
|
162
|
-
M.jsonErr(401, errors.ErrorsErrorResponse$inboundSchema),
|
|
163
|
-
M.jsonErr(500, errors.ErrorsErrorResponse$inboundSchema),
|
|
164
|
-
M.fail("4XX"),
|
|
165
|
-
M.fail("5XX"),
|
|
166
|
-
)(response, req, { extraFields: responseFields });
|
|
167
|
-
if (!result.ok) {
|
|
168
|
-
return [result, { status: "complete", request: req, response }];
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
return [result, { status: "complete", request: req, response }];
|
|
172
|
-
}
|
|
@@ -1,203 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import { FlexPriceCore } from "../core.js";
|
|
6
|
-
import { encodeSimple } from "../lib/encodings.js";
|
|
7
|
-
import * as M from "../lib/matchers.js";
|
|
8
|
-
import { compactMap } from "../lib/primitives.js";
|
|
9
|
-
import { safeParse } from "../lib/schemas.js";
|
|
10
|
-
import { RequestOptions } from "../lib/sdks.js";
|
|
11
|
-
import { resolveSecurity } from "../lib/security.js";
|
|
12
|
-
import { pathToFunc } from "../lib/url.js";
|
|
13
|
-
import * as components from "../models/components/index.js";
|
|
14
|
-
import { FlexPriceError } from "../models/errors/flexpriceerror.js";
|
|
15
|
-
import {
|
|
16
|
-
ConnectionError,
|
|
17
|
-
InvalidRequestError,
|
|
18
|
-
RequestAbortedError,
|
|
19
|
-
RequestTimeoutError,
|
|
20
|
-
UnexpectedClientError,
|
|
21
|
-
} from "../models/errors/httpclienterrors.js";
|
|
22
|
-
import * as errors from "../models/errors/index.js";
|
|
23
|
-
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
24
|
-
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
25
|
-
import * as operations from "../models/operations/index.js";
|
|
26
|
-
import { APICall, APIPromise } from "../types/async.js";
|
|
27
|
-
import { Result } from "../types/fp.js";
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* Get invoice by ID
|
|
31
|
-
*
|
|
32
|
-
* @remarks
|
|
33
|
-
* Get a specific invoice for the authenticated customer
|
|
34
|
-
*/
|
|
35
|
-
export function customerDashboardGetCustomerDashboardInvoicesId(
|
|
36
|
-
client: FlexPriceCore,
|
|
37
|
-
security: operations.GetCustomerDashboardInvoicesIdSecurity,
|
|
38
|
-
id: string,
|
|
39
|
-
options?: RequestOptions,
|
|
40
|
-
): APIPromise<
|
|
41
|
-
Result<
|
|
42
|
-
components.DtoInvoiceResponse,
|
|
43
|
-
| errors.ErrorsErrorResponse
|
|
44
|
-
| FlexPriceError
|
|
45
|
-
| ResponseValidationError
|
|
46
|
-
| ConnectionError
|
|
47
|
-
| RequestAbortedError
|
|
48
|
-
| RequestTimeoutError
|
|
49
|
-
| InvalidRequestError
|
|
50
|
-
| UnexpectedClientError
|
|
51
|
-
| SDKValidationError
|
|
52
|
-
>
|
|
53
|
-
> {
|
|
54
|
-
return new APIPromise($do(
|
|
55
|
-
client,
|
|
56
|
-
security,
|
|
57
|
-
id,
|
|
58
|
-
options,
|
|
59
|
-
));
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
async function $do(
|
|
63
|
-
client: FlexPriceCore,
|
|
64
|
-
security: operations.GetCustomerDashboardInvoicesIdSecurity,
|
|
65
|
-
id: string,
|
|
66
|
-
options?: RequestOptions,
|
|
67
|
-
): Promise<
|
|
68
|
-
[
|
|
69
|
-
Result<
|
|
70
|
-
components.DtoInvoiceResponse,
|
|
71
|
-
| errors.ErrorsErrorResponse
|
|
72
|
-
| FlexPriceError
|
|
73
|
-
| ResponseValidationError
|
|
74
|
-
| ConnectionError
|
|
75
|
-
| RequestAbortedError
|
|
76
|
-
| RequestTimeoutError
|
|
77
|
-
| InvalidRequestError
|
|
78
|
-
| UnexpectedClientError
|
|
79
|
-
| SDKValidationError
|
|
80
|
-
>,
|
|
81
|
-
APICall,
|
|
82
|
-
]
|
|
83
|
-
> {
|
|
84
|
-
const input: operations.GetCustomerDashboardInvoicesIdRequest = {
|
|
85
|
-
id: id,
|
|
86
|
-
};
|
|
87
|
-
|
|
88
|
-
const parsed = safeParse(
|
|
89
|
-
input,
|
|
90
|
-
(value) =>
|
|
91
|
-
operations.GetCustomerDashboardInvoicesIdRequest$outboundSchema.parse(
|
|
92
|
-
value,
|
|
93
|
-
),
|
|
94
|
-
"Input validation failed",
|
|
95
|
-
);
|
|
96
|
-
if (!parsed.ok) {
|
|
97
|
-
return [parsed, { status: "invalid" }];
|
|
98
|
-
}
|
|
99
|
-
const payload = parsed.value;
|
|
100
|
-
const body = null;
|
|
101
|
-
|
|
102
|
-
const pathParams = {
|
|
103
|
-
id: encodeSimple("id", payload.id, {
|
|
104
|
-
explode: false,
|
|
105
|
-
charEncoding: "percent",
|
|
106
|
-
}),
|
|
107
|
-
};
|
|
108
|
-
|
|
109
|
-
const path = pathToFunc("/customer-dashboard/invoices/{id}")(pathParams);
|
|
110
|
-
|
|
111
|
-
const headers = new Headers(compactMap({
|
|
112
|
-
Accept: "application/json",
|
|
113
|
-
}));
|
|
114
|
-
|
|
115
|
-
const requestSecurity = resolveSecurity(
|
|
116
|
-
[
|
|
117
|
-
{
|
|
118
|
-
fieldName: "Authorization",
|
|
119
|
-
type: "apiKey:header",
|
|
120
|
-
value: security?.bearerAuth,
|
|
121
|
-
},
|
|
122
|
-
],
|
|
123
|
-
);
|
|
124
|
-
|
|
125
|
-
const context = {
|
|
126
|
-
options: client._options,
|
|
127
|
-
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
128
|
-
operationID: "get_/customer-dashboard/invoices/{id}",
|
|
129
|
-
oAuth2Scopes: null,
|
|
130
|
-
|
|
131
|
-
resolvedSecurity: requestSecurity,
|
|
132
|
-
|
|
133
|
-
securitySource: security,
|
|
134
|
-
retryConfig: options?.retries
|
|
135
|
-
|| client._options.retryConfig
|
|
136
|
-
|| {
|
|
137
|
-
strategy: "backoff",
|
|
138
|
-
backoff: {
|
|
139
|
-
initialInterval: 500,
|
|
140
|
-
maxInterval: 60000,
|
|
141
|
-
exponent: 1.5,
|
|
142
|
-
maxElapsedTime: 3600000,
|
|
143
|
-
},
|
|
144
|
-
retryConnectionErrors: true,
|
|
145
|
-
}
|
|
146
|
-
|| { strategy: "none" },
|
|
147
|
-
retryCodes: options?.retryCodes || ["5XX", "429"],
|
|
148
|
-
};
|
|
149
|
-
|
|
150
|
-
const requestRes = client._createRequest(context, {
|
|
151
|
-
security: requestSecurity,
|
|
152
|
-
method: "GET",
|
|
153
|
-
baseURL: options?.serverURL,
|
|
154
|
-
path: path,
|
|
155
|
-
headers: headers,
|
|
156
|
-
body: body,
|
|
157
|
-
userAgent: client._options.userAgent,
|
|
158
|
-
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
159
|
-
}, options);
|
|
160
|
-
if (!requestRes.ok) {
|
|
161
|
-
return [requestRes, { status: "invalid" }];
|
|
162
|
-
}
|
|
163
|
-
const req = requestRes.value;
|
|
164
|
-
|
|
165
|
-
const doResult = await client._do(req, {
|
|
166
|
-
context,
|
|
167
|
-
errorCodes: ["401", "404", "4XX", "500", "5XX"],
|
|
168
|
-
retryConfig: context.retryConfig,
|
|
169
|
-
retryCodes: context.retryCodes,
|
|
170
|
-
});
|
|
171
|
-
if (!doResult.ok) {
|
|
172
|
-
return [doResult, { status: "request-error", request: req }];
|
|
173
|
-
}
|
|
174
|
-
const response = doResult.value;
|
|
175
|
-
|
|
176
|
-
const responseFields = {
|
|
177
|
-
HttpMeta: { Response: response, Request: req },
|
|
178
|
-
};
|
|
179
|
-
|
|
180
|
-
const [result] = await M.match<
|
|
181
|
-
components.DtoInvoiceResponse,
|
|
182
|
-
| errors.ErrorsErrorResponse
|
|
183
|
-
| FlexPriceError
|
|
184
|
-
| ResponseValidationError
|
|
185
|
-
| ConnectionError
|
|
186
|
-
| RequestAbortedError
|
|
187
|
-
| RequestTimeoutError
|
|
188
|
-
| InvalidRequestError
|
|
189
|
-
| UnexpectedClientError
|
|
190
|
-
| SDKValidationError
|
|
191
|
-
>(
|
|
192
|
-
M.json(200, components.DtoInvoiceResponse$inboundSchema),
|
|
193
|
-
M.jsonErr([401, 404], errors.ErrorsErrorResponse$inboundSchema),
|
|
194
|
-
M.jsonErr(500, errors.ErrorsErrorResponse$inboundSchema),
|
|
195
|
-
M.fail("4XX"),
|
|
196
|
-
M.fail("5XX"),
|
|
197
|
-
)(response, req, { extraFields: responseFields });
|
|
198
|
-
if (!result.ok) {
|
|
199
|
-
return [result, { status: "complete", request: req, response }];
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
return [result, { status: "complete", request: req, response }];
|
|
203
|
-
}
|