flexprice-sdk-test 1.0.49 → 1.0.52
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 +31 -449
- 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/.eslintrc.js +0 -27
- 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/jest.config.js +0 -30
- 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
- package/tsconfig.esm.json +0 -7
package/README.md
CHANGED
|
@@ -1,373 +1,14 @@
|
|
|
1
|
-
#
|
|
1
|
+
# flexprice-sdk-test
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
[](https://www.typescriptlang.org/)
|
|
3
|
+
Developer-friendly & type-safe Typescript SDK specifically catered to leverage *flexprice-sdk-test* API.
|
|
5
4
|
|
|
6
|
-
|
|
5
|
+
[](https://www.speakeasy.com/?utm_source=flexprice-sdk-test&utm_campaign=typescript)
|
|
6
|
+
[](https://opensource.org/licenses/MIT)
|
|
7
7
|
|
|
8
|
-
## Features
|
|
9
8
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
- ✅ **Browser Compatible** - Works in Node.js, Webpack, and Browserify
|
|
14
|
-
- ✅ **Promise & Callback Support** - Flexible async patterns
|
|
15
|
-
- ✅ **Comprehensive Documentation** - Auto-generated from OpenAPI specs
|
|
16
|
-
- ✅ **Error Handling** - Detailed error messages and status codes
|
|
17
|
-
|
|
18
|
-
## Installation
|
|
19
|
-
|
|
20
|
-
```bash
|
|
21
|
-
npm install @flexprice/sdk --save
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
## Quick Start
|
|
25
|
-
|
|
26
|
-
```typescript
|
|
27
|
-
import { Configuration, EventsApi, CustomersApi } from "@flexprice/sdk";
|
|
28
|
-
|
|
29
|
-
// Configure the API client
|
|
30
|
-
const config = new Configuration({
|
|
31
|
-
basePath: "https://api.cloud.flexprice.io/v1",
|
|
32
|
-
apiKey: "your_api_key_here",
|
|
33
|
-
headers: {
|
|
34
|
-
"X-Environment-ID": "your_environment_id_here",
|
|
35
|
-
},
|
|
36
|
-
});
|
|
37
|
-
|
|
38
|
-
// Create API instances
|
|
39
|
-
const eventsApi = new EventsApi(config);
|
|
40
|
-
const customersApi = new CustomersApi(config);
|
|
41
|
-
|
|
42
|
-
// Use APIs directly
|
|
43
|
-
const eventRequest = {
|
|
44
|
-
eventName: "user_signup",
|
|
45
|
-
externalCustomerId: "customer-123",
|
|
46
|
-
properties: {
|
|
47
|
-
plan: "premium",
|
|
48
|
-
source: "website",
|
|
49
|
-
},
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
await eventsApi.eventsPost({ event: eventRequest });
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
## Environment Setup
|
|
56
|
-
|
|
57
|
-
### Environment Variables
|
|
58
|
-
|
|
59
|
-
Create a `.env` file in your project root:
|
|
60
|
-
|
|
61
|
-
```bash
|
|
62
|
-
# FlexPrice Configuration
|
|
63
|
-
FLEXPRICE_API_KEY=sk_your_api_key_here
|
|
64
|
-
FLEXPRICE_BASE_URL=https://api.cloud.flexprice.io/v1
|
|
65
|
-
FLEXPRICE_ENVIRONMENT_ID=env_your_environment_id_here
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
### Vite/React Applications
|
|
69
|
-
|
|
70
|
-
For Vite applications, prefix environment variables with `VITE_`:
|
|
71
|
-
|
|
72
|
-
```bash
|
|
73
|
-
# .env
|
|
74
|
-
VITE_FLEXPRICE_API_KEY=sk_your_api_key_here
|
|
75
|
-
VITE_FLEXPRICE_BASE_URL=https://api.cloud.flexprice.io/v1
|
|
76
|
-
VITE_FLEXPRICE_ENVIRONMENT_ID=env_your_environment_id_here
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
```typescript
|
|
80
|
-
// config.ts
|
|
81
|
-
import { Configuration, EventsApi, CustomersApi } from "@flexprice/sdk";
|
|
82
|
-
|
|
83
|
-
const API_KEY = import.meta.env.VITE_FLEXPRICE_API_KEY;
|
|
84
|
-
const BASE_PATH = import.meta.env.VITE_FLEXPRICE_BASE_URL;
|
|
85
|
-
const ENVIRONMENT_ID = import.meta.env.VITE_FLEXPRICE_ENVIRONMENT_ID;
|
|
86
|
-
|
|
87
|
-
const config = new Configuration({
|
|
88
|
-
basePath: BASE_PATH,
|
|
89
|
-
apiKey: API_KEY,
|
|
90
|
-
headers: {
|
|
91
|
-
"X-Environment-ID": ENVIRONMENT_ID,
|
|
92
|
-
},
|
|
93
|
-
});
|
|
94
|
-
|
|
95
|
-
// Export configured API instances
|
|
96
|
-
export const eventsApi = new EventsApi(config);
|
|
97
|
-
export const customersApi = new CustomersApi(config);
|
|
98
|
-
```
|
|
99
|
-
|
|
100
|
-
## Available APIs
|
|
101
|
-
|
|
102
|
-
- **EventsApi** - Event ingestion and analytics
|
|
103
|
-
- **CustomersApi** - Customer management
|
|
104
|
-
- **AuthApi** - Authentication and user management
|
|
105
|
-
- **PlansApi** - Subscription plan management
|
|
106
|
-
- **FeaturesApi** - Feature management
|
|
107
|
-
- **InvoicesApi** - Invoice operations
|
|
108
|
-
- **SubscriptionsApi** - Subscription management
|
|
109
|
-
- **AddonsApi** - Addon management
|
|
110
|
-
- **CouponsApi** - Coupon management
|
|
111
|
-
- **CreditNotesApi** - Credit note management
|
|
112
|
-
- **EntitlementsApi** - Feature access control
|
|
113
|
-
- **UsersApi** - User management
|
|
114
|
-
|
|
115
|
-
## API Examples
|
|
116
|
-
|
|
117
|
-
### Events API
|
|
118
|
-
|
|
119
|
-
```typescript
|
|
120
|
-
import { EventsApi } from "@flexprice/sdk";
|
|
121
|
-
|
|
122
|
-
const eventsApi = new EventsApi(config);
|
|
123
|
-
|
|
124
|
-
// Ingest a single event
|
|
125
|
-
await eventsApi.eventsPost({
|
|
126
|
-
event: {
|
|
127
|
-
eventName: "api_call",
|
|
128
|
-
externalCustomerId: "customer-123",
|
|
129
|
-
properties: {
|
|
130
|
-
endpoint: "/api/users",
|
|
131
|
-
method: "GET",
|
|
132
|
-
responseTime: 150,
|
|
133
|
-
},
|
|
134
|
-
},
|
|
135
|
-
});
|
|
136
|
-
|
|
137
|
-
// Query events
|
|
138
|
-
const events = await eventsApi.eventsQueryPost({
|
|
139
|
-
request: {
|
|
140
|
-
externalCustomerId: "customer-123",
|
|
141
|
-
eventName: "api_call",
|
|
142
|
-
startTime: "2024-01-01T00:00:00Z",
|
|
143
|
-
endTime: "2024-01-31T23:59:59Z",
|
|
144
|
-
limit: 100,
|
|
145
|
-
},
|
|
146
|
-
});
|
|
147
|
-
|
|
148
|
-
// Get usage analytics
|
|
149
|
-
const analytics = await eventsApi.eventsAnalyticsPost({
|
|
150
|
-
request: {
|
|
151
|
-
externalCustomerId: "customer-123",
|
|
152
|
-
startTime: "2024-01-01T00:00:00Z",
|
|
153
|
-
endTime: "2024-01-31T23:59:59Z",
|
|
154
|
-
windowSize: "day",
|
|
155
|
-
},
|
|
156
|
-
});
|
|
157
|
-
```
|
|
158
|
-
|
|
159
|
-
### Customers API
|
|
160
|
-
|
|
161
|
-
```typescript
|
|
162
|
-
import { CustomersApi } from "@flexprice/sdk";
|
|
163
|
-
|
|
164
|
-
const customersApi = new CustomersApi(config);
|
|
165
|
-
|
|
166
|
-
// Create a customer
|
|
167
|
-
const customer = await customersApi.customersPost({
|
|
168
|
-
customer: {
|
|
169
|
-
externalId: "customer-123",
|
|
170
|
-
email: "user@example.com",
|
|
171
|
-
name: "John Doe",
|
|
172
|
-
metadata: {
|
|
173
|
-
source: "signup_form",
|
|
174
|
-
},
|
|
175
|
-
},
|
|
176
|
-
});
|
|
177
|
-
|
|
178
|
-
// Get customer
|
|
179
|
-
const customerData = await customersApi.customersIdGet({
|
|
180
|
-
id: "customer-123",
|
|
181
|
-
});
|
|
182
|
-
|
|
183
|
-
// Update customer
|
|
184
|
-
const updatedCustomer = await customersApi.customersIdPut({
|
|
185
|
-
id: "customer-123",
|
|
186
|
-
customer: {
|
|
187
|
-
name: "John Smith",
|
|
188
|
-
metadata: { plan: "premium" },
|
|
189
|
-
},
|
|
190
|
-
});
|
|
191
|
-
|
|
192
|
-
// List customers
|
|
193
|
-
const customers = await customersApi.customersGet({
|
|
194
|
-
limit: 50,
|
|
195
|
-
offset: 0,
|
|
196
|
-
status: "active",
|
|
197
|
-
});
|
|
198
|
-
```
|
|
199
|
-
|
|
200
|
-
### Authentication API
|
|
201
|
-
|
|
202
|
-
```typescript
|
|
203
|
-
import { AuthApi } from "@flexprice/sdk";
|
|
204
|
-
|
|
205
|
-
const authApi = new AuthApi(config);
|
|
206
|
-
|
|
207
|
-
// Login user
|
|
208
|
-
const authResponse = await authApi.authLoginPost({
|
|
209
|
-
login: {
|
|
210
|
-
email: "user@example.com",
|
|
211
|
-
password: "password123",
|
|
212
|
-
},
|
|
213
|
-
});
|
|
214
|
-
|
|
215
|
-
// Sign up new user
|
|
216
|
-
const signupResponse = await authApi.authSignupPost({
|
|
217
|
-
signup: {
|
|
218
|
-
email: "newuser@example.com",
|
|
219
|
-
password: "password123",
|
|
220
|
-
name: "New User",
|
|
221
|
-
},
|
|
222
|
-
});
|
|
223
|
-
```
|
|
224
|
-
|
|
225
|
-
## React Integration
|
|
226
|
-
|
|
227
|
-
### With React Query
|
|
228
|
-
|
|
229
|
-
```typescript
|
|
230
|
-
import { useMutation, useQuery } from "@tanstack/react-query";
|
|
231
|
-
import { eventsApi } from "./config";
|
|
232
|
-
|
|
233
|
-
// Fetch events
|
|
234
|
-
const { data: events, isLoading } = useQuery({
|
|
235
|
-
queryKey: ["events"],
|
|
236
|
-
queryFn: () =>
|
|
237
|
-
eventsApi.eventsQueryPost({
|
|
238
|
-
request: {
|
|
239
|
-
externalCustomerId: "customer-123",
|
|
240
|
-
limit: 100,
|
|
241
|
-
},
|
|
242
|
-
}),
|
|
243
|
-
});
|
|
244
|
-
|
|
245
|
-
// Fire an event
|
|
246
|
-
const { mutate: fireEvent } = useMutation({
|
|
247
|
-
mutationFn: (eventData) => eventsApi.eventsPost({ event: eventData }),
|
|
248
|
-
onSuccess: () => {
|
|
249
|
-
toast.success("Event fired successfully");
|
|
250
|
-
},
|
|
251
|
-
onError: (error) => {
|
|
252
|
-
toast.error("Failed to fire event");
|
|
253
|
-
},
|
|
254
|
-
});
|
|
255
|
-
```
|
|
256
|
-
|
|
257
|
-
### With useEffect
|
|
258
|
-
|
|
259
|
-
```typescript
|
|
260
|
-
import { useEffect, useState } from "react";
|
|
261
|
-
import { eventsApi } from "./config";
|
|
262
|
-
|
|
263
|
-
const UsageComponent = () => {
|
|
264
|
-
const [usage, setUsage] = useState(null);
|
|
265
|
-
|
|
266
|
-
useEffect(() => {
|
|
267
|
-
const fetchUsage = async () => {
|
|
268
|
-
try {
|
|
269
|
-
const data = await eventsApi.eventsUsagePost({
|
|
270
|
-
request: {
|
|
271
|
-
externalCustomerId: "customer-123",
|
|
272
|
-
startTime: "2024-01-01",
|
|
273
|
-
endTime: "2024-01-31",
|
|
274
|
-
},
|
|
275
|
-
});
|
|
276
|
-
setUsage(data);
|
|
277
|
-
} catch (error) {
|
|
278
|
-
console.error("Failed to fetch usage:", error);
|
|
279
|
-
}
|
|
280
|
-
};
|
|
281
|
-
|
|
282
|
-
fetchUsage();
|
|
283
|
-
}, []);
|
|
284
|
-
|
|
285
|
-
return <div>{/* Render usage data */}</div>;
|
|
286
|
-
};
|
|
287
|
-
```
|
|
288
|
-
|
|
289
|
-
## Error Handling
|
|
290
|
-
|
|
291
|
-
```typescript
|
|
292
|
-
try {
|
|
293
|
-
await eventsApi.eventsPost({ event: eventData });
|
|
294
|
-
} catch (error) {
|
|
295
|
-
if (error.status === 401) {
|
|
296
|
-
console.error("Authentication failed");
|
|
297
|
-
} else if (error.status === 400) {
|
|
298
|
-
console.error("Bad request:", error.response?.body);
|
|
299
|
-
} else {
|
|
300
|
-
console.error("API Error:", error.message);
|
|
301
|
-
}
|
|
302
|
-
}
|
|
303
|
-
```
|
|
304
|
-
|
|
305
|
-
## TypeScript Support
|
|
306
|
-
|
|
307
|
-
The SDK includes comprehensive TypeScript definitions:
|
|
308
|
-
|
|
309
|
-
```typescript
|
|
310
|
-
import type {
|
|
311
|
-
DtoIngestEventRequest,
|
|
312
|
-
DtoGetUsageRequest,
|
|
313
|
-
DtoCreateCustomerRequest,
|
|
314
|
-
DtoCustomerResponse,
|
|
315
|
-
// ... many more types
|
|
316
|
-
} from "@flexprice/sdk";
|
|
317
|
-
|
|
318
|
-
// Type-safe event creation
|
|
319
|
-
const event: DtoIngestEventRequest = {
|
|
320
|
-
eventName: "llm_usage",
|
|
321
|
-
externalCustomerId: "user_123",
|
|
322
|
-
properties: {
|
|
323
|
-
tokens: 150,
|
|
324
|
-
model: "gpt-4",
|
|
325
|
-
},
|
|
326
|
-
};
|
|
327
|
-
```
|
|
328
|
-
|
|
329
|
-
## Browser Usage
|
|
330
|
-
|
|
331
|
-
```html
|
|
332
|
-
<script src="https://cdn.jsdelivr.net/npm/@flexprice/sdk/dist/flexprice-sdk.min.js"></script>
|
|
333
|
-
<script>
|
|
334
|
-
// Configure the API client
|
|
335
|
-
const config = new FlexPrice.Configuration({
|
|
336
|
-
basePath: "https://api.cloud.flexprice.io/v1",
|
|
337
|
-
apiKey: "your-api-key-here",
|
|
338
|
-
headers: {
|
|
339
|
-
"X-Environment-ID": "your-environment-id-here",
|
|
340
|
-
},
|
|
341
|
-
});
|
|
342
|
-
|
|
343
|
-
// Create API instance
|
|
344
|
-
const eventsApi = new FlexPrice.EventsApi(config);
|
|
345
|
-
|
|
346
|
-
// Use the SDK
|
|
347
|
-
eventsApi.eventsPost({
|
|
348
|
-
event: {
|
|
349
|
-
eventName: "page_view",
|
|
350
|
-
externalCustomerId: "user_123",
|
|
351
|
-
properties: { page: "/home" },
|
|
352
|
-
},
|
|
353
|
-
});
|
|
354
|
-
</script>
|
|
355
|
-
```
|
|
356
|
-
|
|
357
|
-
## Troubleshooting
|
|
358
|
-
|
|
359
|
-
### Authentication Issues
|
|
360
|
-
|
|
361
|
-
- Verify the key is active and has required permissions
|
|
362
|
-
- Check that the `x-api-key` header is being sent correctly
|
|
363
|
-
- Verify the `X-Environment-ID` header is included
|
|
364
|
-
|
|
365
|
-
## Support
|
|
366
|
-
|
|
367
|
-
For support and questions:
|
|
368
|
-
|
|
369
|
-
- Check the [API Documentation](https://docs.flexprice.io)
|
|
370
|
-
- Contact support at [support@flexprice.io](mailto:support@flexprice.io)
|
|
9
|
+
<br /><br />
|
|
10
|
+
> [!IMPORTANT]
|
|
11
|
+
> This SDK is not yet ready for production use. To complete setup please follow the steps outlined in your [workspace](https://app.speakeasy.com/org/flexprice/develop-cw0). Delete this section before > publishing to a package manager.
|
|
371
12
|
|
|
372
13
|
<!-- Start Summary [summary] -->
|
|
373
14
|
## Summary
|
|
@@ -378,19 +19,7 @@ FlexPrice API: FlexPrice API Service
|
|
|
378
19
|
<!-- Start Table of Contents [toc] -->
|
|
379
20
|
## Table of Contents
|
|
380
21
|
<!-- $toc-max-depth=2 -->
|
|
381
|
-
* [
|
|
382
|
-
* [Features](#features)
|
|
383
|
-
* [Installation](#installation)
|
|
384
|
-
* [Quick Start](#quick-start)
|
|
385
|
-
* [Environment Setup](#environment-setup)
|
|
386
|
-
* [Available APIs](#available-apis)
|
|
387
|
-
* [API Examples](#api-examples)
|
|
388
|
-
* [React Integration](#react-integration)
|
|
389
|
-
* [Error Handling](#error-handling)
|
|
390
|
-
* [TypeScript Support](#typescript-support)
|
|
391
|
-
* [Browser Usage](#browser-usage)
|
|
392
|
-
* [Troubleshooting](#troubleshooting)
|
|
393
|
-
* [Support](#support)
|
|
22
|
+
* [flexprice-sdk-test](#flexprice-sdk-test)
|
|
394
23
|
* [SDK Installation](#sdk-installation)
|
|
395
24
|
* [Requirements](#requirements)
|
|
396
25
|
* [SDK Example Usage](#sdk-example-usage)
|
|
@@ -399,9 +28,12 @@ FlexPrice API: FlexPrice API Service
|
|
|
399
28
|
* [Standalone functions](#standalone-functions)
|
|
400
29
|
* [File uploads](#file-uploads)
|
|
401
30
|
* [Retries](#retries)
|
|
402
|
-
* [Error Handling](#error-handling
|
|
31
|
+
* [Error Handling](#error-handling)
|
|
403
32
|
* [Custom HTTP Client](#custom-http-client)
|
|
404
33
|
* [Debugging](#debugging)
|
|
34
|
+
* [Development](#development)
|
|
35
|
+
* [Maturity](#maturity)
|
|
36
|
+
* [Contributions](#contributions)
|
|
405
37
|
|
|
406
38
|
<!-- End Table of Contents [toc] -->
|
|
407
39
|
|
|
@@ -497,49 +129,6 @@ async function run() {
|
|
|
497
129
|
|
|
498
130
|
run();
|
|
499
131
|
|
|
500
|
-
```
|
|
501
|
-
|
|
502
|
-
### Per-Operation Security Schemes
|
|
503
|
-
|
|
504
|
-
Some operations in this SDK require the security scheme to be specified at the request level. For example:
|
|
505
|
-
```typescript
|
|
506
|
-
import { FlexPrice } from "flexprice-sdk-test";
|
|
507
|
-
|
|
508
|
-
const flexPrice = new FlexPrice({
|
|
509
|
-
serverURL: "https://api.example.com",
|
|
510
|
-
});
|
|
511
|
-
|
|
512
|
-
async function run() {
|
|
513
|
-
const result = await flexPrice.customerDashboard
|
|
514
|
-
.postCustomerDashboardAnalytics({
|
|
515
|
-
bearerAuth: "<YOUR_API_KEY_HERE>",
|
|
516
|
-
}, {
|
|
517
|
-
endTime: "2024-01-31T23:59:59Z",
|
|
518
|
-
expand: [
|
|
519
|
-
"price",
|
|
520
|
-
"meter",
|
|
521
|
-
"feature",
|
|
522
|
-
],
|
|
523
|
-
featureIds: [
|
|
524
|
-
"feat_123",
|
|
525
|
-
"feat_456",
|
|
526
|
-
],
|
|
527
|
-
groupBy: [
|
|
528
|
-
"source",
|
|
529
|
-
"feature_id",
|
|
530
|
-
],
|
|
531
|
-
sources: [
|
|
532
|
-
"api",
|
|
533
|
-
"web",
|
|
534
|
-
],
|
|
535
|
-
startTime: "2024-01-01T00:00:00Z",
|
|
536
|
-
});
|
|
537
|
-
|
|
538
|
-
console.log(result);
|
|
539
|
-
}
|
|
540
|
-
|
|
541
|
-
run();
|
|
542
|
-
|
|
543
132
|
```
|
|
544
133
|
<!-- End Authentication [security] -->
|
|
545
134
|
|
|
@@ -612,20 +201,9 @@ run();
|
|
|
612
201
|
* [deleteCreditgrantsId](docs/sdks/creditgrants/README.md#deletecreditgrantsid) - Delete a credit grant
|
|
613
202
|
* [getPlansIdCreditgrants](docs/sdks/creditgrants/README.md#getplansidcreditgrants) - Get plan credit grants
|
|
614
203
|
|
|
615
|
-
### [
|
|
616
|
-
|
|
617
|
-
* [
|
|
618
|
-
* [postCustomerDashboardAnalytics](docs/sdks/customerdashboard/README.md#postcustomerdashboardanalytics) - Get customer analytics
|
|
619
|
-
* [postCustomerDashboardCostAnalytics](docs/sdks/customerdashboard/README.md#postcustomerdashboardcostanalytics) - Get customer cost analytics
|
|
620
|
-
* [getCustomerDashboardInfo](docs/sdks/customerdashboard/README.md#getcustomerdashboardinfo) - Get customer information
|
|
621
|
-
* [putCustomerDashboardInfo](docs/sdks/customerdashboard/README.md#putcustomerdashboardinfo) - Update customer information
|
|
622
|
-
* [postCustomerDashboardInvoices](docs/sdks/customerdashboard/README.md#postcustomerdashboardinvoices) - Get customer invoices
|
|
623
|
-
* [getCustomerDashboardInvoicesId](docs/sdks/customerdashboard/README.md#getcustomerdashboardinvoicesid) - Get invoice by ID
|
|
624
|
-
* [postCustomerDashboardSubscriptions](docs/sdks/customerdashboard/README.md#postcustomerdashboardsubscriptions) - Get customer subscriptions
|
|
625
|
-
* [getCustomerDashboardSubscriptionsId](docs/sdks/customerdashboard/README.md#getcustomerdashboardsubscriptionsid) - Get subscription by ID
|
|
626
|
-
* [getCustomerDashboardUsage](docs/sdks/customerdashboard/README.md#getcustomerdashboardusage) - Get customer usage summary
|
|
627
|
-
* [postCustomerDashboardWallets](docs/sdks/customerdashboard/README.md#postcustomerdashboardwallets) - Get customer wallets
|
|
628
|
-
* [getCustomerDashboardWalletsId](docs/sdks/customerdashboard/README.md#getcustomerdashboardwalletsid) - Get wallet by ID
|
|
204
|
+
### [CustomerPortal](docs/sdks/customerportal/README.md)
|
|
205
|
+
|
|
206
|
+
* [getPortalExternalId](docs/sdks/customerportal/README.md#getportalexternalid) - Create a customer portal session
|
|
629
207
|
|
|
630
208
|
### [Customers](docs/sdks/customers/README.md)
|
|
631
209
|
|
|
@@ -916,18 +494,7 @@ To read more about standalone functions, check [FUNCTIONS.md](./FUNCTIONS.md).
|
|
|
916
494
|
- [`creditNotesPostCreditnotes`](docs/sdks/creditnotes/README.md#postcreditnotes) - Create a new credit note
|
|
917
495
|
- [`creditNotesPostCreditnotesIdFinalize`](docs/sdks/creditnotes/README.md#postcreditnotesidfinalize) - Process a draft credit note
|
|
918
496
|
- [`creditNotesPostCreditnotesIdVoid`](docs/sdks/creditnotes/README.md#postcreditnotesidvoid) - Void a credit note
|
|
919
|
-
- [`
|
|
920
|
-
- [`customerDashboardGetCustomerDashboardInfo`](docs/sdks/customerdashboard/README.md#getcustomerdashboardinfo) - Get customer information
|
|
921
|
-
- [`customerDashboardGetCustomerDashboardInvoicesId`](docs/sdks/customerdashboard/README.md#getcustomerdashboardinvoicesid) - Get invoice by ID
|
|
922
|
-
- [`customerDashboardGetCustomerDashboardSubscriptionsId`](docs/sdks/customerdashboard/README.md#getcustomerdashboardsubscriptionsid) - Get subscription by ID
|
|
923
|
-
- [`customerDashboardGetCustomerDashboardUsage`](docs/sdks/customerdashboard/README.md#getcustomerdashboardusage) - Get customer usage summary
|
|
924
|
-
- [`customerDashboardGetCustomerDashboardWalletsId`](docs/sdks/customerdashboard/README.md#getcustomerdashboardwalletsid) - Get wallet by ID
|
|
925
|
-
- [`customerDashboardPostCustomerDashboardAnalytics`](docs/sdks/customerdashboard/README.md#postcustomerdashboardanalytics) - Get customer analytics
|
|
926
|
-
- [`customerDashboardPostCustomerDashboardCostAnalytics`](docs/sdks/customerdashboard/README.md#postcustomerdashboardcostanalytics) - Get customer cost analytics
|
|
927
|
-
- [`customerDashboardPostCustomerDashboardInvoices`](docs/sdks/customerdashboard/README.md#postcustomerdashboardinvoices) - Get customer invoices
|
|
928
|
-
- [`customerDashboardPostCustomerDashboardSubscriptions`](docs/sdks/customerdashboard/README.md#postcustomerdashboardsubscriptions) - Get customer subscriptions
|
|
929
|
-
- [`customerDashboardPostCustomerDashboardWallets`](docs/sdks/customerdashboard/README.md#postcustomerdashboardwallets) - Get customer wallets
|
|
930
|
-
- [`customerDashboardPutCustomerDashboardInfo`](docs/sdks/customerdashboard/README.md#putcustomerdashboardinfo) - Update customer information
|
|
497
|
+
- [`customerPortalGetPortalExternalId`](docs/sdks/customerportal/README.md#getportalexternalid) - Create a customer portal session
|
|
931
498
|
- [`customersDeleteCustomersId`](docs/sdks/customers/README.md#deletecustomersid) - Delete a customer
|
|
932
499
|
- [`customersGetCustomers`](docs/sdks/customers/README.md#getcustomers) - Get customers
|
|
933
500
|
- [`customersGetCustomersExternalExternalId`](docs/sdks/customers/README.md#getcustomersexternalexternalid) - Get a customer by external id
|
|
@@ -1335,3 +902,18 @@ const sdk = new FlexPrice({ debugLogger: console });
|
|
|
1335
902
|
<!-- End Debugging [debug] -->
|
|
1336
903
|
|
|
1337
904
|
<!-- Placeholder for Future Speakeasy SDK Sections -->
|
|
905
|
+
|
|
906
|
+
# Development
|
|
907
|
+
|
|
908
|
+
## Maturity
|
|
909
|
+
|
|
910
|
+
This SDK is in beta, and there may be breaking changes between versions without a major version update. Therefore, we recommend pinning usage
|
|
911
|
+
to a specific package version. This way, you can install the same version each time without breaking changes unless you are intentionally
|
|
912
|
+
looking for the latest version.
|
|
913
|
+
|
|
914
|
+
## Contributions
|
|
915
|
+
|
|
916
|
+
While we value open-source contributions to this SDK, this library is generated programmatically. Any manual changes added to internal files will be overwritten on the next generation.
|
|
917
|
+
We look forward to hearing your feedback. Feel free to open a PR or an issue with a proof of concept and we'll do our best to include it in a future release.
|
|
918
|
+
|
|
919
|
+
### SDK Created by [Speakeasy](https://www.speakeasy.com/?utm_source=flexprice-sdk-test&utm_campaign=typescript)
|
|
@@ -6,14 +6,13 @@ import { ConnectionError, InvalidRequestError, RequestAbortedError, RequestTimeo
|
|
|
6
6
|
import * as errors from "../models/errors/index.js";
|
|
7
7
|
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
8
8
|
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
9
|
-
import * as operations from "../models/operations/index.js";
|
|
10
9
|
import { APIPromise } from "../types/async.js";
|
|
11
10
|
import { Result } from "../types/fp.js";
|
|
12
11
|
/**
|
|
13
|
-
*
|
|
12
|
+
* Create a customer portal session
|
|
14
13
|
*
|
|
15
14
|
* @remarks
|
|
16
|
-
*
|
|
15
|
+
* Generate a dashboard URL/token for a customer to access their billing information
|
|
17
16
|
*/
|
|
18
|
-
export declare function
|
|
19
|
-
//# sourceMappingURL=
|
|
17
|
+
export declare function customerPortalGetPortalExternalId(client: FlexPriceCore, externalId: string, options?: RequestOptions): APIPromise<Result<components.DtoPortalSessionResponse, errors.ErrorsErrorResponse | FlexPriceError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
|
|
18
|
+
//# sourceMappingURL=customerPortalGetPortalExternalId.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"customerPortalGetPortalExternalId.d.ts","sourceRoot":"","sources":["../src/funcs/customerPortalGetPortalExternalId.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAK3C,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AACpE,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,KAAK,MAAM,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAE,uBAAuB,EAAE,MAAM,6CAA6C,CAAC;AACtF,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAE5E,OAAO,EAAW,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC;;;;;GAKG;AACH,wBAAgB,iCAAiC,CAC/C,MAAM,EAAE,aAAa,EACrB,UAAU,EAAE,MAAM,EAClB,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CACX,MAAM,CACJ,UAAU,CAAC,wBAAwB,EACjC,MAAM,CAAC,mBAAmB,GAC1B,cAAc,GACd,uBAAuB,GACvB,eAAe,GACf,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,qBAAqB,GACrB,kBAAkB,CACrB,CACF,CAMA"}
|
|
@@ -36,7 +36,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
36
36
|
};
|
|
37
37
|
})();
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.
|
|
39
|
+
exports.customerPortalGetPortalExternalId = customerPortalGetPortalExternalId;
|
|
40
40
|
const encodings_js_1 = require("../lib/encodings.js");
|
|
41
41
|
const M = __importStar(require("../lib/matchers.js"));
|
|
42
42
|
const primitives_js_1 = require("../lib/primitives.js");
|
|
@@ -48,48 +48,44 @@ const errors = __importStar(require("../models/errors/index.js"));
|
|
|
48
48
|
const operations = __importStar(require("../models/operations/index.js"));
|
|
49
49
|
const async_js_1 = require("../types/async.js");
|
|
50
50
|
/**
|
|
51
|
-
*
|
|
51
|
+
* Create a customer portal session
|
|
52
52
|
*
|
|
53
53
|
* @remarks
|
|
54
|
-
*
|
|
54
|
+
* Generate a dashboard URL/token for a customer to access their billing information
|
|
55
55
|
*/
|
|
56
|
-
function
|
|
57
|
-
return new async_js_1.APIPromise($do(client,
|
|
56
|
+
function customerPortalGetPortalExternalId(client, externalId, options) {
|
|
57
|
+
return new async_js_1.APIPromise($do(client, externalId, options));
|
|
58
58
|
}
|
|
59
|
-
async function $do(client,
|
|
59
|
+
async function $do(client, externalId, options) {
|
|
60
60
|
const input = {
|
|
61
|
-
|
|
61
|
+
externalId: externalId,
|
|
62
62
|
};
|
|
63
|
-
const parsed = (0, schemas_js_1.safeParse)(input, (value) => operations.
|
|
63
|
+
const parsed = (0, schemas_js_1.safeParse)(input, (value) => operations.GetPortalExternalIdRequest$outboundSchema.parse(value), "Input validation failed");
|
|
64
64
|
if (!parsed.ok) {
|
|
65
65
|
return [parsed, { status: "invalid" }];
|
|
66
66
|
}
|
|
67
67
|
const payload = parsed.value;
|
|
68
68
|
const body = null;
|
|
69
69
|
const pathParams = {
|
|
70
|
-
|
|
70
|
+
external_id: (0, encodings_js_1.encodeSimple)("external_id", payload.external_id, {
|
|
71
71
|
explode: false,
|
|
72
72
|
charEncoding: "percent",
|
|
73
73
|
}),
|
|
74
74
|
};
|
|
75
|
-
const path = (0, url_js_1.pathToFunc)("/
|
|
75
|
+
const path = (0, url_js_1.pathToFunc)("/portal/{external_id}")(pathParams);
|
|
76
76
|
const headers = new Headers((0, primitives_js_1.compactMap)({
|
|
77
77
|
Accept: "application/json",
|
|
78
78
|
}));
|
|
79
|
-
const
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
type: "apiKey:header",
|
|
83
|
-
value: security?.bearerAuth,
|
|
84
|
-
},
|
|
85
|
-
]);
|
|
79
|
+
const secConfig = await (0, security_js_1.extractSecurity)(client._options.apiKeyAuth);
|
|
80
|
+
const securityInput = secConfig == null ? {} : { apiKeyAuth: secConfig };
|
|
81
|
+
const requestSecurity = (0, security_js_1.resolveGlobalSecurity)(securityInput);
|
|
86
82
|
const context = {
|
|
87
83
|
options: client._options,
|
|
88
84
|
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
89
|
-
operationID: "get_/
|
|
85
|
+
operationID: "get_/portal/{external_id}",
|
|
90
86
|
oAuth2Scopes: null,
|
|
91
87
|
resolvedSecurity: requestSecurity,
|
|
92
|
-
securitySource:
|
|
88
|
+
securitySource: client._options.apiKeyAuth,
|
|
93
89
|
retryConfig: options?.retries
|
|
94
90
|
|| client._options.retryConfig
|
|
95
91
|
|| {
|
|
@@ -121,7 +117,7 @@ async function $do(client, security, id, options) {
|
|
|
121
117
|
const req = requestRes.value;
|
|
122
118
|
const doResult = await client._do(req, {
|
|
123
119
|
context,
|
|
124
|
-
errorCodes: ["
|
|
120
|
+
errorCodes: ["400", "404", "4XX", "500", "5XX"],
|
|
125
121
|
retryConfig: context.retryConfig,
|
|
126
122
|
retryCodes: context.retryCodes,
|
|
127
123
|
});
|
|
@@ -132,10 +128,10 @@ async function $do(client, security, id, options) {
|
|
|
132
128
|
const responseFields = {
|
|
133
129
|
HttpMeta: { Response: response, Request: req },
|
|
134
130
|
};
|
|
135
|
-
const [result] = await M.match(M.json(200, components.
|
|
131
|
+
const [result] = await M.match(M.json(200, components.DtoPortalSessionResponse$inboundSchema), M.jsonErr([400, 404], errors.ErrorsErrorResponse$inboundSchema), M.jsonErr(500, errors.ErrorsErrorResponse$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
|
|
136
132
|
if (!result.ok) {
|
|
137
133
|
return [result, { status: "complete", request: req, response }];
|
|
138
134
|
}
|
|
139
135
|
return [result, { status: "complete", request: req, response }];
|
|
140
136
|
}
|
|
141
|
-
//# sourceMappingURL=
|
|
137
|
+
//# sourceMappingURL=customerPortalGetPortalExternalId.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"customerPortalGetPortalExternalId.js","sourceRoot":"","sources":["../src/funcs/customerPortalGetPortalExternalId.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCH,8EAuBC;AApDD,sDAAmD;AACnD,sDAAwC;AACxC,wDAAkD;AAClD,kDAA8C;AAE9C,oDAA4E;AAC5E,0CAA2C;AAC3C,0EAA4D;AAS5D,kEAAoD;AAGpD,0EAA4D;AAC5D,gDAAwD;AAGxD;;;;;GAKG;AACH,SAAgB,iCAAiC,CAC/C,MAAqB,EACrB,UAAkB,EAClB,OAAwB;IAexB,OAAO,IAAI,qBAAU,CAAC,GAAG,CACvB,MAAM,EACN,UAAU,EACV,OAAO,CACR,CAAC,CAAC;AACL,CAAC;AAED,KAAK,UAAU,GAAG,CAChB,MAAqB,EACrB,UAAkB,EAClB,OAAwB;IAkBxB,MAAM,KAAK,GAA0C;QACnD,UAAU,EAAE,UAAU;KACvB,CAAC;IAEF,MAAM,MAAM,GAAG,IAAA,sBAAS,EACtB,KAAK,EACL,CAAC,KAAK,EAAE,EAAE,CACR,UAAU,CAAC,yCAAyC,CAAC,KAAK,CAAC,KAAK,CAAC,EACnE,yBAAyB,CAC1B,CAAC;IACF,IAAI,CAAC,MAAM,CAAC,EAA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