@usethrottle/api-client 4.3.0 → 4.4.0
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/generated/index.d.ts +2 -0
- package/dist/generated/index.d.ts.map +1 -1
- package/dist/generated/index.js +2 -0
- package/dist/generated/index.js.map +1 -1
- package/dist/generated/services/ApplicationsService.d.ts +19 -0
- package/dist/generated/services/ApplicationsService.d.ts.map +1 -1
- package/dist/generated/services/ApplicationsService.js +41 -0
- package/dist/generated/services/ApplicationsService.js.map +1 -1
- package/dist/generated/services/CartsService.d.ts +117 -0
- package/dist/generated/services/CartsService.d.ts.map +1 -1
- package/dist/generated/services/CartsService.js.map +1 -1
- package/dist/generated/services/CheckoutSessionsService.d.ts +16 -1
- package/dist/generated/services/CheckoutSessionsService.d.ts.map +1 -1
- package/dist/generated/services/CheckoutSessionsService.js +24 -1
- package/dist/generated/services/CheckoutSessionsService.js.map +1 -1
- package/dist/generated/services/CustomersService.d.ts +24 -0
- package/dist/generated/services/CustomersService.d.ts.map +1 -1
- package/dist/generated/services/CustomersService.js +57 -0
- package/dist/generated/services/CustomersService.js.map +1 -1
- package/dist/generated/services/DefaultService.d.ts +500 -0
- package/dist/generated/services/DefaultService.d.ts.map +1 -1
- package/dist/generated/services/DefaultService.js +1097 -105
- package/dist/generated/services/DefaultService.js.map +1 -1
- package/dist/generated/services/EmbedService.d.ts +10 -0
- package/dist/generated/services/EmbedService.d.ts.map +1 -1
- package/dist/generated/services/EmbedService.js.map +1 -1
- package/dist/generated/services/ExtensionsService.d.ts +164 -1
- package/dist/generated/services/ExtensionsService.d.ts.map +1 -1
- package/dist/generated/services/ExtensionsService.js +192 -1
- package/dist/generated/services/ExtensionsService.js.map +1 -1
- package/dist/generated/services/FulfillmentsService.d.ts +67 -0
- package/dist/generated/services/FulfillmentsService.d.ts.map +1 -1
- package/dist/generated/services/FulfillmentsService.js.map +1 -1
- package/dist/generated/services/ImportsService.d.ts +76 -0
- package/dist/generated/services/ImportsService.d.ts.map +1 -0
- package/dist/generated/services/ImportsService.js +174 -0
- package/dist/generated/services/ImportsService.js.map +1 -0
- package/dist/generated/services/OrdersService.d.ts +284 -23
- package/dist/generated/services/OrdersService.d.ts.map +1 -1
- package/dist/generated/services/OrdersService.js +10 -6
- package/dist/generated/services/OrdersService.js.map +1 -1
- package/dist/generated/services/PartnersService.d.ts +8 -0
- package/dist/generated/services/PartnersService.d.ts.map +1 -1
- package/dist/generated/services/PartnersService.js +19 -0
- package/dist/generated/services/PartnersService.js.map +1 -1
- package/dist/generated/services/PaymentMethodsService.d.ts +17 -0
- package/dist/generated/services/PaymentMethodsService.d.ts.map +1 -1
- package/dist/generated/services/PaymentMethodsService.js +38 -0
- package/dist/generated/services/PaymentMethodsService.js.map +1 -1
- package/dist/generated/services/PaymentsService.d.ts.map +1 -1
- package/dist/generated/services/PaymentsService.js +4 -0
- package/dist/generated/services/PaymentsService.js.map +1 -1
- package/dist/generated/services/QuotesService.d.ts +128 -1
- package/dist/generated/services/QuotesService.d.ts.map +1 -1
- package/dist/generated/services/QuotesService.js +68 -0
- package/dist/generated/services/QuotesService.js.map +1 -1
- package/dist/generated/services/ScriptsService.d.ts +110 -0
- package/dist/generated/services/ScriptsService.d.ts.map +1 -0
- package/dist/generated/services/ScriptsService.js +245 -0
- package/dist/generated/services/ScriptsService.js.map +1 -0
- package/dist/generated/services/SubscriptionsService.d.ts +40 -16
- package/dist/generated/services/SubscriptionsService.d.ts.map +1 -1
- package/dist/generated/services/SubscriptionsService.js +24 -0
- package/dist/generated/services/SubscriptionsService.js.map +1 -1
- package/dist/generated/services/WebhooksOutboundService.d.ts +9 -5
- package/dist/generated/services/WebhooksOutboundService.d.ts.map +1 -1
- package/dist/generated/services/WebhooksOutboundService.js +5 -1
- package/dist/generated/services/WebhooksOutboundService.js.map +1 -1
- package/dist/generated/services/WorkspacesService.d.ts +4 -0
- package/dist/generated/services/WorkspacesService.d.ts.map +1 -1
- package/dist/generated/services/WorkspacesService.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
import { OpenAPI } from '../core/OpenAPI.js';
|
|
2
|
+
import { request as __request } from '../core/request.js';
|
|
3
|
+
export class ImportsService {
|
|
4
|
+
/**
|
|
5
|
+
* Start a bulk import: creates the import record and returns a presigned PUT the browser uploads the file to directly.
|
|
6
|
+
* @param xThrottleEnvironmentId Optional workspace environment id for dashboard-session, Clerk JWT, and extension-session requests. API keys are already pinned to one workspace environment.
|
|
7
|
+
* @returns any Default Response
|
|
8
|
+
* @throws ApiError
|
|
9
|
+
*/
|
|
10
|
+
static postApiV1Imports(xThrottleEnvironmentId) {
|
|
11
|
+
return __request(OpenAPI, {
|
|
12
|
+
method: 'POST',
|
|
13
|
+
url: '/api/v1/imports',
|
|
14
|
+
headers: {
|
|
15
|
+
'X-Throttle-Environment-Id': xThrottleEnvironmentId,
|
|
16
|
+
},
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Imports for this application and environment, newest first.
|
|
21
|
+
* @param xThrottleEnvironmentId Optional workspace environment id for dashboard-session, Clerk JWT, and extension-session requests. API keys are already pinned to one workspace environment.
|
|
22
|
+
* @param limit
|
|
23
|
+
* @param cursor
|
|
24
|
+
* @returns any Default Response
|
|
25
|
+
* @throws ApiError
|
|
26
|
+
*/
|
|
27
|
+
static getApiV1Imports(xThrottleEnvironmentId, limit = 25, cursor) {
|
|
28
|
+
return __request(OpenAPI, {
|
|
29
|
+
method: 'GET',
|
|
30
|
+
url: '/api/v1/imports',
|
|
31
|
+
headers: {
|
|
32
|
+
'X-Throttle-Environment-Id': xThrottleEnvironmentId,
|
|
33
|
+
},
|
|
34
|
+
query: {
|
|
35
|
+
'limit': limit,
|
|
36
|
+
'cursor': cursor,
|
|
37
|
+
},
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Sniff the uploaded file: dialect, headers, a 20-row sample, the matched template and a suggested target field per header.
|
|
42
|
+
* @param id
|
|
43
|
+
* @param xThrottleEnvironmentId Optional workspace environment id for dashboard-session, Clerk JWT, and extension-session requests. API keys are already pinned to one workspace environment.
|
|
44
|
+
* @returns any Default Response
|
|
45
|
+
* @throws ApiError
|
|
46
|
+
*/
|
|
47
|
+
static postApiV1ImportsInspect(id, xThrottleEnvironmentId) {
|
|
48
|
+
return __request(OpenAPI, {
|
|
49
|
+
method: 'POST',
|
|
50
|
+
url: '/api/v1/imports/{id}/inspect',
|
|
51
|
+
path: {
|
|
52
|
+
'id': id,
|
|
53
|
+
},
|
|
54
|
+
headers: {
|
|
55
|
+
'X-Throttle-Environment-Id': xThrottleEnvironmentId,
|
|
56
|
+
},
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Save the column-to-field mapping the merchant confirmed on the mapping screen.
|
|
61
|
+
* @param id
|
|
62
|
+
* @param xThrottleEnvironmentId Optional workspace environment id for dashboard-session, Clerk JWT, and extension-session requests. API keys are already pinned to one workspace environment.
|
|
63
|
+
* @returns any Default Response
|
|
64
|
+
* @throws ApiError
|
|
65
|
+
*/
|
|
66
|
+
static patchApiV1ImportsMapping(id, xThrottleEnvironmentId) {
|
|
67
|
+
return __request(OpenAPI, {
|
|
68
|
+
method: 'PATCH',
|
|
69
|
+
url: '/api/v1/imports/{id}/mapping',
|
|
70
|
+
path: {
|
|
71
|
+
'id': id,
|
|
72
|
+
},
|
|
73
|
+
headers: {
|
|
74
|
+
'X-Throttle-Environment-Id': xThrottleEnvironmentId,
|
|
75
|
+
},
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Queue a dry run: reads the whole file under the saved mapping, reports what it would create, update, skip and reject, and writes nothing.
|
|
80
|
+
* @param id
|
|
81
|
+
* @param xThrottleEnvironmentId Optional workspace environment id for dashboard-session, Clerk JWT, and extension-session requests. API keys are already pinned to one workspace environment.
|
|
82
|
+
* @returns any Default Response
|
|
83
|
+
* @throws ApiError
|
|
84
|
+
*/
|
|
85
|
+
static postApiV1ImportsValidate(id, xThrottleEnvironmentId) {
|
|
86
|
+
return __request(OpenAPI, {
|
|
87
|
+
method: 'POST',
|
|
88
|
+
url: '/api/v1/imports/{id}/validate',
|
|
89
|
+
path: {
|
|
90
|
+
'id': id,
|
|
91
|
+
},
|
|
92
|
+
headers: {
|
|
93
|
+
'X-Throttle-Environment-Id': xThrottleEnvironmentId,
|
|
94
|
+
},
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Queue the real import. Requires a completed dry run: an import that has not been validated is refused.
|
|
99
|
+
* @param id
|
|
100
|
+
* @param xThrottleEnvironmentId Optional workspace environment id for dashboard-session, Clerk JWT, and extension-session requests. API keys are already pinned to one workspace environment.
|
|
101
|
+
* @returns any Default Response
|
|
102
|
+
* @throws ApiError
|
|
103
|
+
*/
|
|
104
|
+
static postApiV1ImportsCommit(id, xThrottleEnvironmentId) {
|
|
105
|
+
return __request(OpenAPI, {
|
|
106
|
+
method: 'POST',
|
|
107
|
+
url: '/api/v1/imports/{id}/commit',
|
|
108
|
+
path: {
|
|
109
|
+
'id': id,
|
|
110
|
+
},
|
|
111
|
+
headers: {
|
|
112
|
+
'X-Throttle-Environment-Id': xThrottleEnvironmentId,
|
|
113
|
+
},
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Queue the deletion of the rows this import created. Rows it only matched, and rows another record now depends on, are kept and reported on the import row.
|
|
118
|
+
* @param id
|
|
119
|
+
* @param xThrottleEnvironmentId Optional workspace environment id for dashboard-session, Clerk JWT, and extension-session requests. API keys are already pinned to one workspace environment.
|
|
120
|
+
* @returns any Default Response
|
|
121
|
+
* @throws ApiError
|
|
122
|
+
*/
|
|
123
|
+
static postApiV1ImportsUndo(id, xThrottleEnvironmentId) {
|
|
124
|
+
return __request(OpenAPI, {
|
|
125
|
+
method: 'POST',
|
|
126
|
+
url: '/api/v1/imports/{id}/undo',
|
|
127
|
+
path: {
|
|
128
|
+
'id': id,
|
|
129
|
+
},
|
|
130
|
+
headers: {
|
|
131
|
+
'X-Throttle-Environment-Id': xThrottleEnvironmentId,
|
|
132
|
+
},
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* One import, with its counters and derived progress.
|
|
137
|
+
* @param id
|
|
138
|
+
* @param xThrottleEnvironmentId Optional workspace environment id for dashboard-session, Clerk JWT, and extension-session requests. API keys are already pinned to one workspace environment.
|
|
139
|
+
* @returns any Default Response
|
|
140
|
+
* @throws ApiError
|
|
141
|
+
*/
|
|
142
|
+
static getApiV1Imports1(id, xThrottleEnvironmentId) {
|
|
143
|
+
return __request(OpenAPI, {
|
|
144
|
+
method: 'GET',
|
|
145
|
+
url: '/api/v1/imports/{id}',
|
|
146
|
+
path: {
|
|
147
|
+
'id': id,
|
|
148
|
+
},
|
|
149
|
+
headers: {
|
|
150
|
+
'X-Throttle-Environment-Id': xThrottleEnvironmentId,
|
|
151
|
+
},
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* The row-level error report for an import, as a re-importable CSV plus the rows behind it. 404 when the import recorded no failures.
|
|
156
|
+
* @param id
|
|
157
|
+
* @param xThrottleEnvironmentId Optional workspace environment id for dashboard-session, Clerk JWT, and extension-session requests. API keys are already pinned to one workspace environment.
|
|
158
|
+
* @returns any Default Response
|
|
159
|
+
* @throws ApiError
|
|
160
|
+
*/
|
|
161
|
+
static getApiV1ImportsErrors(id, xThrottleEnvironmentId) {
|
|
162
|
+
return __request(OpenAPI, {
|
|
163
|
+
method: 'GET',
|
|
164
|
+
url: '/api/v1/imports/{id}/errors',
|
|
165
|
+
path: {
|
|
166
|
+
'id': id,
|
|
167
|
+
},
|
|
168
|
+
headers: {
|
|
169
|
+
'X-Throttle-Environment-Id': xThrottleEnvironmentId,
|
|
170
|
+
},
|
|
171
|
+
});
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
//# sourceMappingURL=ImportsService.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ImportsService.js","sourceRoot":"","sources":["../../../src/generated/services/ImportsService.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAC7C,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC1D,MAAM,OAAO,cAAc;IACvB;;;;;OAKG;IACI,MAAM,CAAC,gBAAgB,CAC1B,sBAA+B;QAE/B,OAAO,SAAS,CAAC,OAAO,EAAE;YACtB,MAAM,EAAE,MAAM;YACd,GAAG,EAAE,iBAAiB;YACtB,OAAO,EAAE;gBACL,2BAA2B,EAAE,sBAAsB;aACtD;SACJ,CAAC,CAAC;IACP,CAAC;IACD;;;;;;;OAOG;IACI,MAAM,CAAC,eAAe,CACzB,sBAA+B,EAC/B,QAAgB,EAAE,EAClB,MAAe;QAEf,OAAO,SAAS,CAAC,OAAO,EAAE;YACtB,MAAM,EAAE,KAAK;YACb,GAAG,EAAE,iBAAiB;YACtB,OAAO,EAAE;gBACL,2BAA2B,EAAE,sBAAsB;aACtD;YACD,KAAK,EAAE;gBACH,OAAO,EAAE,KAAK;gBACd,QAAQ,EAAE,MAAM;aACnB;SACJ,CAAC,CAAC;IACP,CAAC;IACD;;;;;;OAMG;IACI,MAAM,CAAC,uBAAuB,CACjC,EAAU,EACV,sBAA+B;QAE/B,OAAO,SAAS,CAAC,OAAO,EAAE;YACtB,MAAM,EAAE,MAAM;YACd,GAAG,EAAE,8BAA8B;YACnC,IAAI,EAAE;gBACF,IAAI,EAAE,EAAE;aACX;YACD,OAAO,EAAE;gBACL,2BAA2B,EAAE,sBAAsB;aACtD;SACJ,CAAC,CAAC;IACP,CAAC;IACD;;;;;;OAMG;IACI,MAAM,CAAC,wBAAwB,CAClC,EAAU,EACV,sBAA+B;QAE/B,OAAO,SAAS,CAAC,OAAO,EAAE;YACtB,MA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