ultracart_rest_api_v2_typescript 4.1.125 → 4.1.127
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/.openapi-generator/FILES +1 -0
- package/README.md +4 -2
- package/dist/apis/ConversationEmbedApi.js +3 -3
- package/dist/apis/OauthApi.d.ts +23 -0
- package/dist/apis/OauthApi.js +53 -3
- package/dist/apis/StorefrontApi.js +1 -1
- package/dist/models/OauthMeResponse.d.ts +55 -0
- package/dist/models/OauthMeResponse.js +58 -0
- package/dist/models/OauthTokenResponse.d.ts +6 -0
- package/dist/models/OauthTokenResponse.js +2 -0
- package/dist/models/OrderSummary.d.ts +12 -0
- package/dist/models/OrderSummary.js +4 -0
- package/dist/models/index.d.ts +1 -0
- package/dist/models/index.js +1 -0
- package/package.json +1 -1
- package/src/apis/ConversationEmbedApi.ts +3 -3
- package/src/apis/OauthApi.ts +50 -3
- package/src/apis/StorefrontApi.ts +1 -1
- package/src/models/OauthMeResponse.ts +99 -0
- package/src/models/OauthTokenResponse.ts +8 -0
- package/src/models/OrderSummary.ts +16 -0
- package/src/models/index.ts +1 -0
package/.openapi-generator/FILES
CHANGED
|
@@ -796,6 +796,7 @@ src/models/Metric.ts
|
|
|
796
796
|
src/models/ModelError.ts
|
|
797
797
|
src/models/Notification.ts
|
|
798
798
|
src/models/OauthDeviceAuthorizationResponse.ts
|
|
799
|
+
src/models/OauthMeResponse.ts
|
|
799
800
|
src/models/OauthRevokeSuccessResponse.ts
|
|
800
801
|
src/models/OauthTokenResponse.ts
|
|
801
802
|
src/models/Order.ts
|
package/README.md
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
# UltraCart Typescript SDK
|
|
2
|
-
## ultracart_rest_api_v2_typescript@4.1.
|
|
2
|
+
## ultracart_rest_api_v2_typescript@4.1.127
|
|
3
3
|
|
|
4
4
|
Every API method call has a sample for every language SDK. See https://github.com/UltraCart/sdk_samples
|
|
5
5
|
|
|
6
6
|
Installation
|
|
7
7
|
|
|
8
8
|
```
|
|
9
|
-
npm install ultracart_rest_api_v2_typescript@4.1.
|
|
9
|
+
npm install ultracart_rest_api_v2_typescript@4.1.127 --save
|
|
10
10
|
```
|
|
11
11
|
|
|
12
12
|
```typescript
|
|
@@ -85,6 +85,8 @@ Not every change is committed to every SDK.
|
|
|
85
85
|
|
|
86
86
|
| Version | Date | Comments |
|
|
87
87
|
| --: | :-: | --- |
|
|
88
|
+
| 4.1.127 | 08/13/2026 | added arbitrary discounts to order creation for historical imports |
|
|
89
|
+
| 4.1.126 | 08/10/2026 | oauth - add /oauth/me method to assist application in indentifying the connected account |
|
|
88
90
|
| 4.1.125 | 08/06/2026 | order api - ability to query by bin and last 4 in unlimited scenarios for chargeback order association |
|
|
89
91
|
| 4.1.124 | 08/04/2026 | customer - method to remove customer profile from email suppression |
|
|
90
92
|
| 4.1.123 | 08/04/2026 | customer - method to remove customer profile from email suppression |
|
|
@@ -100,7 +100,7 @@ var ConversationEmbedApi = /** @class */ (function (_super) {
|
|
|
100
100
|
// oauth required
|
|
101
101
|
_a = headerParameters;
|
|
102
102
|
_b = "Authorization";
|
|
103
|
-
return [4 /*yield*/, this.configuration.accessToken("ultraCartOauth", ["affiliate_read", "affiliate_write", "auto_order_read", "auto_order_write", "channel_partner_read", "channel_partner_write", "
|
|
103
|
+
return [4 /*yield*/, this.configuration.accessToken("ultraCartOauth", ["affiliate_read", "affiliate_write", "auto_order_read", "auto_order_write", "channel_partner_read", "channel_partner_write", "checkout_read", "checkout_write", "configuration_read", "configuration_write", "conversation_read", "conversation_write", "coupon_read", "coupon_write", "customer_read", "customer_write", "fraud_read", "fraud_write", "fulfillment_read", "fulfillment_write", "gift_certificate_read", "gift_certificate_write", "integration_log_read", "integration_log_write", "order_read", "order_write", "item_read", "item_write", "storefront_read", "storefront_write", "tax_read", "tax_write", "webhook_read", "webhook_write", "ultrabooks_read", "ultrabooks_write", "user_read", "user_write", "workflow_read", "workflow_write"])];
|
|
104
104
|
case 1:
|
|
105
105
|
// oauth required
|
|
106
106
|
_a[_b] = _c.sent();
|
|
@@ -181,7 +181,7 @@ var ConversationEmbedApi = /** @class */ (function (_super) {
|
|
|
181
181
|
// oauth required
|
|
182
182
|
_a = headerParameters;
|
|
183
183
|
_b = "Authorization";
|
|
184
|
-
return [4 /*yield*/, this.configuration.accessToken("ultraCartOauth", ["affiliate_read", "affiliate_write", "auto_order_read", "auto_order_write", "channel_partner_read", "channel_partner_write", "
|
|
184
|
+
return [4 /*yield*/, this.configuration.accessToken("ultraCartOauth", ["affiliate_read", "affiliate_write", "auto_order_read", "auto_order_write", "channel_partner_read", "channel_partner_write", "checkout_read", "checkout_write", "configuration_read", "configuration_write", "conversation_read", "conversation_write", "coupon_read", "coupon_write", "customer_read", "customer_write", "fraud_read", "fraud_write", "fulfillment_read", "fulfillment_write", "gift_certificate_read", "gift_certificate_write", "integration_log_read", "integration_log_write", "order_read", "order_write", "item_read", "item_write", "storefront_read", "storefront_write", "tax_read", "tax_write", "webhook_read", "webhook_write", "ultrabooks_read", "ultrabooks_write", "user_read", "user_write", "workflow_read", "workflow_write"])];
|
|
185
185
|
case 1:
|
|
186
186
|
// oauth required
|
|
187
187
|
_a[_b] = _c.sent();
|
|
@@ -262,7 +262,7 @@ var ConversationEmbedApi = /** @class */ (function (_super) {
|
|
|
262
262
|
// oauth required
|
|
263
263
|
_a = headerParameters;
|
|
264
264
|
_b = "Authorization";
|
|
265
|
-
return [4 /*yield*/, this.configuration.accessToken("ultraCartOauth", ["affiliate_read", "affiliate_write", "auto_order_read", "auto_order_write", "channel_partner_read", "channel_partner_write", "
|
|
265
|
+
return [4 /*yield*/, this.configuration.accessToken("ultraCartOauth", ["affiliate_read", "affiliate_write", "auto_order_read", "auto_order_write", "channel_partner_read", "channel_partner_write", "checkout_read", "checkout_write", "configuration_read", "configuration_write", "conversation_read", "conversation_write", "coupon_read", "coupon_write", "customer_read", "customer_write", "fraud_read", "fraud_write", "fulfillment_read", "fulfillment_write", "gift_certificate_read", "gift_certificate_write", "integration_log_read", "integration_log_write", "order_read", "order_write", "item_read", "item_write", "storefront_read", "storefront_write", "tax_read", "tax_write", "webhook_read", "webhook_write", "ultrabooks_read", "ultrabooks_write", "user_read", "user_write", "workflow_read", "workflow_write"])];
|
|
266
266
|
case 1:
|
|
267
267
|
// oauth required
|
|
268
268
|
_a[_b] = _c.sent();
|
package/dist/apis/OauthApi.d.ts
CHANGED
|
@@ -68,6 +68,19 @@ export interface OauthApiInterface {
|
|
|
68
68
|
* Initiate a device authorization flow.
|
|
69
69
|
*/
|
|
70
70
|
oauthDeviceAuthorize(requestParameters: OauthDeviceAuthorizeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OauthDeviceAuthorizationResponse>;
|
|
71
|
+
/**
|
|
72
|
+
* Returns the UltraCart merchant account that authorized your application, along with the permissions that were granted. Call it immediately after exchanging your authorization code so you can display the connected account to your user and map it within your own system. Any OAuth access token may call this endpoint regardless of the permissions it holds. The granted permissions are the ones the merchant approved, which may be narrower than the permissions your application currently requests, because permissions are recorded when the merchant authorizes and do not change afterwards. If you add a permission to your application, already connected merchants keep the permissions they originally approved until they authorize again, so read this list rather than assuming your application\'s configured permissions.
|
|
73
|
+
* @summary Identify the merchant account this access token belongs to.
|
|
74
|
+
* @param {*} [options] Override http request option.
|
|
75
|
+
* @throws {RequiredError}
|
|
76
|
+
* @memberof OauthApiInterface
|
|
77
|
+
*/
|
|
78
|
+
oauthMeRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
79
|
+
/**
|
|
80
|
+
* Returns the UltraCart merchant account that authorized your application, along with the permissions that were granted. Call it immediately after exchanging your authorization code so you can display the connected account to your user and map it within your own system. Any OAuth access token may call this endpoint regardless of the permissions it holds. The granted permissions are the ones the merchant approved, which may be narrower than the permissions your application currently requests, because permissions are recorded when the merchant authorizes and do not change afterwards. If you add a permission to your application, already connected merchants keep the permissions they originally approved until they authorize again, so read this list rather than assuming your application\'s configured permissions.
|
|
81
|
+
* Identify the merchant account this access token belongs to.
|
|
82
|
+
*/
|
|
83
|
+
oauthMe(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
71
84
|
/**
|
|
72
85
|
* Revokes the OAuth application associated with the specified client_id and token.
|
|
73
86
|
* @summary Revoke this OAuth application.
|
|
@@ -108,6 +121,16 @@ export declare class OauthApi extends runtime.BaseAPI implements OauthApiInterfa
|
|
|
108
121
|
* Initiate a device authorization flow.
|
|
109
122
|
*/
|
|
110
123
|
oauthDeviceAuthorize(requestParameters: OauthDeviceAuthorizeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OauthDeviceAuthorizationResponse>;
|
|
124
|
+
/**
|
|
125
|
+
* Returns the UltraCart merchant account that authorized your application, along with the permissions that were granted. Call it immediately after exchanging your authorization code so you can display the connected account to your user and map it within your own system. Any OAuth access token may call this endpoint regardless of the permissions it holds. The granted permissions are the ones the merchant approved, which may be narrower than the permissions your application currently requests, because permissions are recorded when the merchant authorizes and do not change afterwards. If you add a permission to your application, already connected merchants keep the permissions they originally approved until they authorize again, so read this list rather than assuming your application\'s configured permissions.
|
|
126
|
+
* Identify the merchant account this access token belongs to.
|
|
127
|
+
*/
|
|
128
|
+
oauthMeRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
129
|
+
/**
|
|
130
|
+
* Returns the UltraCart merchant account that authorized your application, along with the permissions that were granted. Call it immediately after exchanging your authorization code so you can display the connected account to your user and map it within your own system. Any OAuth access token may call this endpoint regardless of the permissions it holds. The granted permissions are the ones the merchant approved, which may be narrower than the permissions your application currently requests, because permissions are recorded when the merchant authorizes and do not change afterwards. If you add a permission to your application, already connected merchants keep the permissions they originally approved until they authorize again, so read this list rather than assuming your application\'s configured permissions.
|
|
131
|
+
* Identify the merchant account this access token belongs to.
|
|
132
|
+
*/
|
|
133
|
+
oauthMe(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
111
134
|
/**
|
|
112
135
|
* Revokes the OAuth application associated with the specified client_id and token.
|
|
113
136
|
* Revoke this OAuth application.
|
package/dist/apis/OauthApi.js
CHANGED
|
@@ -100,7 +100,7 @@ var OauthApi = /** @class */ (function (_super) {
|
|
|
100
100
|
// oauth required
|
|
101
101
|
_a = headerParameters;
|
|
102
102
|
_b = "Authorization";
|
|
103
|
-
return [4 /*yield*/, this.configuration.accessToken("ultraCartOauth", ["affiliate_read", "affiliate_write", "auto_order_read", "auto_order_write", "channel_partner_read", "channel_partner_write", "
|
|
103
|
+
return [4 /*yield*/, this.configuration.accessToken("ultraCartOauth", ["affiliate_read", "affiliate_write", "auto_order_read", "auto_order_write", "channel_partner_read", "channel_partner_write", "checkout_read", "checkout_write", "configuration_read", "configuration_write", "conversation_read", "conversation_write", "coupon_read", "coupon_write", "customer_read", "customer_write", "fraud_read", "fraud_write", "fulfillment_read", "fulfillment_write", "gift_certificate_read", "gift_certificate_write", "integration_log_read", "integration_log_write", "order_read", "order_write", "item_read", "item_write", "storefront_read", "storefront_write", "tax_read", "tax_write", "webhook_read", "webhook_write", "ultrabooks_read", "ultrabooks_write", "user_read", "user_write", "workflow_read", "workflow_write"])];
|
|
104
104
|
case 1:
|
|
105
105
|
// oauth required
|
|
106
106
|
_a[_b] = _c.sent();
|
|
@@ -195,7 +195,7 @@ var OauthApi = /** @class */ (function (_super) {
|
|
|
195
195
|
// oauth required
|
|
196
196
|
_a = headerParameters;
|
|
197
197
|
_b = "Authorization";
|
|
198
|
-
return [4 /*yield*/, this.configuration.accessToken("ultraCartOauth", ["affiliate_read", "affiliate_write", "auto_order_read", "auto_order_write", "channel_partner_read", "channel_partner_write", "
|
|
198
|
+
return [4 /*yield*/, this.configuration.accessToken("ultraCartOauth", ["affiliate_read", "affiliate_write", "auto_order_read", "auto_order_write", "channel_partner_read", "channel_partner_write", "checkout_read", "checkout_write", "configuration_read", "configuration_write", "conversation_read", "conversation_write", "coupon_read", "coupon_write", "customer_read", "customer_write", "fraud_read", "fraud_write", "fulfillment_read", "fulfillment_write", "gift_certificate_read", "gift_certificate_write", "integration_log_read", "integration_log_write", "order_read", "order_write", "item_read", "item_write", "storefront_read", "storefront_write", "tax_read", "tax_write", "webhook_read", "webhook_write", "ultrabooks_read", "ultrabooks_write", "user_read", "user_write", "workflow_read", "workflow_write"])];
|
|
199
199
|
case 1:
|
|
200
200
|
// oauth required
|
|
201
201
|
_a[_b] = _c.sent();
|
|
@@ -253,6 +253,56 @@ var OauthApi = /** @class */ (function (_super) {
|
|
|
253
253
|
});
|
|
254
254
|
});
|
|
255
255
|
};
|
|
256
|
+
/**
|
|
257
|
+
* Returns the UltraCart merchant account that authorized your application, along with the permissions that were granted. Call it immediately after exchanging your authorization code so you can display the connected account to your user and map it within your own system. Any OAuth access token may call this endpoint regardless of the permissions it holds. The granted permissions are the ones the merchant approved, which may be narrower than the permissions your application currently requests, because permissions are recorded when the merchant authorizes and do not change afterwards. If you add a permission to your application, already connected merchants keep the permissions they originally approved until they authorize again, so read this list rather than assuming your application\'s configured permissions.
|
|
258
|
+
* Identify the merchant account this access token belongs to.
|
|
259
|
+
*/
|
|
260
|
+
OauthApi.prototype.oauthMeRaw = function (initOverrides) {
|
|
261
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
262
|
+
var queryParameters, headerParameters, _a, _b, response;
|
|
263
|
+
return __generator(this, function (_c) {
|
|
264
|
+
switch (_c.label) {
|
|
265
|
+
case 0:
|
|
266
|
+
queryParameters = {};
|
|
267
|
+
headerParameters = {};
|
|
268
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
|
|
269
|
+
// oauth required
|
|
270
|
+
_a = headerParameters;
|
|
271
|
+
_b = "Authorization";
|
|
272
|
+
return [4 /*yield*/, this.configuration.accessToken("ultraCartOauth", [])];
|
|
273
|
+
case 1:
|
|
274
|
+
// oauth required
|
|
275
|
+
_a[_b] = _c.sent();
|
|
276
|
+
_c.label = 2;
|
|
277
|
+
case 2: return [4 /*yield*/, this.request({
|
|
278
|
+
path: "/oauth/me",
|
|
279
|
+
method: 'GET',
|
|
280
|
+
headers: headerParameters,
|
|
281
|
+
query: queryParameters,
|
|
282
|
+
}, initOverrides)];
|
|
283
|
+
case 3:
|
|
284
|
+
response = _c.sent();
|
|
285
|
+
return [2 /*return*/, new runtime.VoidApiResponse(response)];
|
|
286
|
+
}
|
|
287
|
+
});
|
|
288
|
+
});
|
|
289
|
+
};
|
|
290
|
+
/**
|
|
291
|
+
* Returns the UltraCart merchant account that authorized your application, along with the permissions that were granted. Call it immediately after exchanging your authorization code so you can display the connected account to your user and map it within your own system. Any OAuth access token may call this endpoint regardless of the permissions it holds. The granted permissions are the ones the merchant approved, which may be narrower than the permissions your application currently requests, because permissions are recorded when the merchant authorizes and do not change afterwards. If you add a permission to your application, already connected merchants keep the permissions they originally approved until they authorize again, so read this list rather than assuming your application\'s configured permissions.
|
|
292
|
+
* Identify the merchant account this access token belongs to.
|
|
293
|
+
*/
|
|
294
|
+
OauthApi.prototype.oauthMe = function (initOverrides) {
|
|
295
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
296
|
+
return __generator(this, function (_a) {
|
|
297
|
+
switch (_a.label) {
|
|
298
|
+
case 0: return [4 /*yield*/, this.oauthMeRaw(initOverrides)];
|
|
299
|
+
case 1:
|
|
300
|
+
_a.sent();
|
|
301
|
+
return [2 /*return*/];
|
|
302
|
+
}
|
|
303
|
+
});
|
|
304
|
+
});
|
|
305
|
+
};
|
|
256
306
|
/**
|
|
257
307
|
* Revokes the OAuth application associated with the specified client_id and token.
|
|
258
308
|
* Revoke this OAuth application.
|
|
@@ -278,7 +328,7 @@ var OauthApi = /** @class */ (function (_super) {
|
|
|
278
328
|
// oauth required
|
|
279
329
|
_a = headerParameters;
|
|
280
330
|
_b = "Authorization";
|
|
281
|
-
return [4 /*yield*/, this.configuration.accessToken("ultraCartOauth", ["affiliate_read", "affiliate_write", "auto_order_read", "auto_order_write", "channel_partner_read", "channel_partner_write", "
|
|
331
|
+
return [4 /*yield*/, this.configuration.accessToken("ultraCartOauth", ["affiliate_read", "affiliate_write", "auto_order_read", "auto_order_write", "channel_partner_read", "channel_partner_write", "checkout_read", "checkout_write", "configuration_read", "configuration_write", "conversation_read", "conversation_write", "coupon_read", "coupon_write", "customer_read", "customer_write", "fraud_read", "fraud_write", "fulfillment_read", "fulfillment_write", "gift_certificate_read", "gift_certificate_write", "integration_log_read", "integration_log_write", "order_read", "order_write", "item_read", "item_write", "storefront_read", "storefront_write", "tax_read", "tax_write", "webhook_read", "webhook_write", "ultrabooks_read", "ultrabooks_write", "user_read", "user_write", "workflow_read", "workflow_write"])];
|
|
282
332
|
case 1:
|
|
283
333
|
// oauth required
|
|
284
334
|
_a[_b] = _c.sent();
|
|
@@ -7357,7 +7357,7 @@ var StorefrontApi = /** @class */ (function (_super) {
|
|
|
7357
7357
|
// oauth required
|
|
7358
7358
|
_a = headerParameters;
|
|
7359
7359
|
_b = "Authorization";
|
|
7360
|
-
return [4 /*yield*/, this.configuration.accessToken("ultraCartOauth", ["affiliate_read", "affiliate_write", "auto_order_read", "auto_order_write", "channel_partner_read", "channel_partner_write", "
|
|
7360
|
+
return [4 /*yield*/, this.configuration.accessToken("ultraCartOauth", ["affiliate_read", "affiliate_write", "auto_order_read", "auto_order_write", "channel_partner_read", "channel_partner_write", "checkout_read", "checkout_write", "configuration_read", "configuration_write", "conversation_read", "conversation_write", "coupon_read", "coupon_write", "customer_read", "customer_write", "fraud_read", "fraud_write", "fulfillment_read", "fulfillment_write", "gift_certificate_read", "gift_certificate_write", "integration_log_read", "integration_log_write", "order_read", "order_write", "item_read", "item_write", "storefront_read", "storefront_write", "tax_read", "tax_write", "webhook_read", "webhook_write", "ultrabooks_read", "ultrabooks_write", "user_read", "user_write", "workflow_read", "workflow_write"])];
|
|
7361
7361
|
case 1:
|
|
7362
7362
|
// oauth required
|
|
7363
7363
|
_a[_b] = _c.sent();
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* UltraCart Rest API V2
|
|
3
|
+
* UltraCart REST API Version 2
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 2.0.0
|
|
6
|
+
* Contact: support@ultracart.com
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
* @export
|
|
15
|
+
* @interface OauthMeResponse
|
|
16
|
+
*/
|
|
17
|
+
export interface OauthMeResponse {
|
|
18
|
+
/**
|
|
19
|
+
* The name of your application as the merchant approved it.
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof OauthMeResponse
|
|
22
|
+
*/
|
|
23
|
+
application_name?: string;
|
|
24
|
+
/**
|
|
25
|
+
* Your application's client_id. Null when authenticating with a simple key, which is not tied to an application.
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof OauthMeResponse
|
|
28
|
+
*/
|
|
29
|
+
client_id?: string;
|
|
30
|
+
/**
|
|
31
|
+
* The UltraCart merchant account that authorized your application. Stable, and the value to key your own records on.
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof OauthMeResponse
|
|
34
|
+
*/
|
|
35
|
+
merchant_id?: string;
|
|
36
|
+
/**
|
|
37
|
+
* The account's company name, suitable for displaying to your user. The merchant can change this, so display it rather than storing it as an identifier.
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof OauthMeResponse
|
|
40
|
+
*/
|
|
41
|
+
merchant_name?: string;
|
|
42
|
+
/**
|
|
43
|
+
* The permissions the merchant granted. May be narrower than the permissions your application currently requests.
|
|
44
|
+
* @type {Array<string>}
|
|
45
|
+
* @memberof OauthMeResponse
|
|
46
|
+
*/
|
|
47
|
+
scopes?: Array<string>;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Check if a given object implements the OauthMeResponse interface.
|
|
51
|
+
*/
|
|
52
|
+
export declare function instanceOfOauthMeResponse(value: object): boolean;
|
|
53
|
+
export declare function OauthMeResponseFromJSON(json: any): OauthMeResponse;
|
|
54
|
+
export declare function OauthMeResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): OauthMeResponse;
|
|
55
|
+
export declare function OauthMeResponseToJSON(value?: OauthMeResponse | null): any;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* UltraCart Rest API V2
|
|
6
|
+
* UltraCart REST API Version 2
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 2.0.0
|
|
9
|
+
* Contact: support@ultracart.com
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.OauthMeResponseToJSON = exports.OauthMeResponseFromJSONTyped = exports.OauthMeResponseFromJSON = exports.instanceOfOauthMeResponse = void 0;
|
|
17
|
+
var runtime_1 = require("../runtime");
|
|
18
|
+
/**
|
|
19
|
+
* Check if a given object implements the OauthMeResponse interface.
|
|
20
|
+
*/
|
|
21
|
+
function instanceOfOauthMeResponse(value) {
|
|
22
|
+
var isInstance = true;
|
|
23
|
+
return isInstance;
|
|
24
|
+
}
|
|
25
|
+
exports.instanceOfOauthMeResponse = instanceOfOauthMeResponse;
|
|
26
|
+
function OauthMeResponseFromJSON(json) {
|
|
27
|
+
return OauthMeResponseFromJSONTyped(json, false);
|
|
28
|
+
}
|
|
29
|
+
exports.OauthMeResponseFromJSON = OauthMeResponseFromJSON;
|
|
30
|
+
function OauthMeResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
31
|
+
if ((json === undefined) || (json === null)) {
|
|
32
|
+
return json;
|
|
33
|
+
}
|
|
34
|
+
return {
|
|
35
|
+
'application_name': !(0, runtime_1.exists)(json, 'application_name') ? undefined : json['application_name'],
|
|
36
|
+
'client_id': !(0, runtime_1.exists)(json, 'client_id') ? undefined : json['client_id'],
|
|
37
|
+
'merchant_id': !(0, runtime_1.exists)(json, 'merchant_id') ? undefined : json['merchant_id'],
|
|
38
|
+
'merchant_name': !(0, runtime_1.exists)(json, 'merchant_name') ? undefined : json['merchant_name'],
|
|
39
|
+
'scopes': !(0, runtime_1.exists)(json, 'scopes') ? undefined : json['scopes'],
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
exports.OauthMeResponseFromJSONTyped = OauthMeResponseFromJSONTyped;
|
|
43
|
+
function OauthMeResponseToJSON(value) {
|
|
44
|
+
if (value === undefined) {
|
|
45
|
+
return undefined;
|
|
46
|
+
}
|
|
47
|
+
if (value === null) {
|
|
48
|
+
return null;
|
|
49
|
+
}
|
|
50
|
+
return {
|
|
51
|
+
'application_name': value.application_name,
|
|
52
|
+
'client_id': value.client_id,
|
|
53
|
+
'merchant_id': value.merchant_id,
|
|
54
|
+
'merchant_name': value.merchant_name,
|
|
55
|
+
'scopes': value.scopes,
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
exports.OauthMeResponseToJSON = OauthMeResponseToJSON;
|
|
@@ -45,6 +45,12 @@ export interface OauthTokenResponse {
|
|
|
45
45
|
* @memberof OauthTokenResponse
|
|
46
46
|
*/
|
|
47
47
|
expires_in?: string;
|
|
48
|
+
/**
|
|
49
|
+
* The UltraCart merchant account that authorized this token. Use it to map the token to the merchant within your own system. Also returned by GET /oauth/me along with the account name.
|
|
50
|
+
* @type {string}
|
|
51
|
+
* @memberof OauthTokenResponse
|
|
52
|
+
*/
|
|
53
|
+
merchant_id?: string;
|
|
48
54
|
/**
|
|
49
55
|
* The refresh token that should be used to fetch a new access token when the expiration occurs
|
|
50
56
|
* @type {string}
|
|
@@ -43,6 +43,7 @@ function OauthTokenResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
43
43
|
'error_description': !(0, runtime_1.exists)(json, 'error_description') ? undefined : json['error_description'],
|
|
44
44
|
'error_uri': !(0, runtime_1.exists)(json, 'error_uri') ? undefined : json['error_uri'],
|
|
45
45
|
'expires_in': !(0, runtime_1.exists)(json, 'expires_in') ? undefined : json['expires_in'],
|
|
46
|
+
'merchant_id': !(0, runtime_1.exists)(json, 'merchant_id') ? undefined : json['merchant_id'],
|
|
46
47
|
'refresh_token': !(0, runtime_1.exists)(json, 'refresh_token') ? undefined : json['refresh_token'],
|
|
47
48
|
'scope': !(0, runtime_1.exists)(json, 'scope') ? undefined : json['scope'],
|
|
48
49
|
'token_type': !(0, runtime_1.exists)(json, 'token_type') ? undefined : json['token_type'],
|
|
@@ -62,6 +63,7 @@ function OauthTokenResponseToJSON(value) {
|
|
|
62
63
|
'error_description': value.error_description,
|
|
63
64
|
'error_uri': value.error_uri,
|
|
64
65
|
'expires_in': value.expires_in,
|
|
66
|
+
'merchant_id': value.merchant_id,
|
|
65
67
|
'refresh_token': value.refresh_token,
|
|
66
68
|
'scope': value.scope,
|
|
67
69
|
'token_type': value.token_type,
|
|
@@ -64,6 +64,18 @@ export interface OrderSummary {
|
|
|
64
64
|
* @memberof OrderSummary
|
|
65
65
|
*/
|
|
66
66
|
arbitrary_shipping_handling_total?: Currency;
|
|
67
|
+
/**
|
|
68
|
+
*
|
|
69
|
+
* @type {Currency}
|
|
70
|
+
* @memberof OrderSummary
|
|
71
|
+
*/
|
|
72
|
+
arbitrary_subtotal_discount?: Currency;
|
|
73
|
+
/**
|
|
74
|
+
*
|
|
75
|
+
* @type {Currency}
|
|
76
|
+
* @memberof OrderSummary
|
|
77
|
+
*/
|
|
78
|
+
arbitrary_taxable_subtotal_discount?: Currency;
|
|
67
79
|
/**
|
|
68
80
|
*
|
|
69
81
|
* @type {Currency}
|
|
@@ -41,6 +41,8 @@ function OrderSummaryFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
41
41
|
'actual_profit_review': !(0, runtime_1.exists)(json, 'actual_profit_review') ? undefined : json['actual_profit_review'],
|
|
42
42
|
'actual_shipping': !(0, runtime_1.exists)(json, 'actual_shipping') ? undefined : (0, Currency_1.CurrencyFromJSON)(json['actual_shipping']),
|
|
43
43
|
'arbitrary_shipping_handling_total': !(0, runtime_1.exists)(json, 'arbitrary_shipping_handling_total') ? undefined : (0, Currency_1.CurrencyFromJSON)(json['arbitrary_shipping_handling_total']),
|
|
44
|
+
'arbitrary_subtotal_discount': !(0, runtime_1.exists)(json, 'arbitrary_subtotal_discount') ? undefined : (0, Currency_1.CurrencyFromJSON)(json['arbitrary_subtotal_discount']),
|
|
45
|
+
'arbitrary_taxable_subtotal_discount': !(0, runtime_1.exists)(json, 'arbitrary_taxable_subtotal_discount') ? undefined : (0, Currency_1.CurrencyFromJSON)(json['arbitrary_taxable_subtotal_discount']),
|
|
44
46
|
'health_benefit_card_amount': !(0, runtime_1.exists)(json, 'health_benefit_card_amount') ? undefined : (0, Currency_1.CurrencyFromJSON)(json['health_benefit_card_amount']),
|
|
45
47
|
'health_benefit_card_refunded': !(0, runtime_1.exists)(json, 'health_benefit_card_refunded') ? undefined : (0, Currency_1.CurrencyFromJSON)(json['health_benefit_card_refunded']),
|
|
46
48
|
'internal_gift_certificate_amount': !(0, runtime_1.exists)(json, 'internal_gift_certificate_amount') ? undefined : (0, Currency_1.CurrencyFromJSON)(json['internal_gift_certificate_amount']),
|
|
@@ -78,6 +80,8 @@ function OrderSummaryToJSON(value) {
|
|
|
78
80
|
'actual_profit_review': value.actual_profit_review,
|
|
79
81
|
'actual_shipping': (0, Currency_1.CurrencyToJSON)(value.actual_shipping),
|
|
80
82
|
'arbitrary_shipping_handling_total': (0, Currency_1.CurrencyToJSON)(value.arbitrary_shipping_handling_total),
|
|
83
|
+
'arbitrary_subtotal_discount': (0, Currency_1.CurrencyToJSON)(value.arbitrary_subtotal_discount),
|
|
84
|
+
'arbitrary_taxable_subtotal_discount': (0, Currency_1.CurrencyToJSON)(value.arbitrary_taxable_subtotal_discount),
|
|
81
85
|
'health_benefit_card_amount': (0, Currency_1.CurrencyToJSON)(value.health_benefit_card_amount),
|
|
82
86
|
'health_benefit_card_refunded': (0, Currency_1.CurrencyToJSON)(value.health_benefit_card_refunded),
|
|
83
87
|
'internal_gift_certificate_amount': (0, Currency_1.CurrencyToJSON)(value.internal_gift_certificate_amount),
|
package/dist/models/index.d.ts
CHANGED
|
@@ -767,6 +767,7 @@ export * from './Metric';
|
|
|
767
767
|
export * from './ModelError';
|
|
768
768
|
export * from './Notification';
|
|
769
769
|
export * from './OauthDeviceAuthorizationResponse';
|
|
770
|
+
export * from './OauthMeResponse';
|
|
770
771
|
export * from './OauthRevokeSuccessResponse';
|
|
771
772
|
export * from './OauthTokenResponse';
|
|
772
773
|
export * from './Order';
|
package/dist/models/index.js
CHANGED
|
@@ -785,6 +785,7 @@ __exportStar(require("./Metric"), exports);
|
|
|
785
785
|
__exportStar(require("./ModelError"), exports);
|
|
786
786
|
__exportStar(require("./Notification"), exports);
|
|
787
787
|
__exportStar(require("./OauthDeviceAuthorizationResponse"), exports);
|
|
788
|
+
__exportStar(require("./OauthMeResponse"), exports);
|
|
788
789
|
__exportStar(require("./OauthRevokeSuccessResponse"), exports);
|
|
789
790
|
__exportStar(require("./OauthTokenResponse"), exports);
|
|
790
791
|
__exportStar(require("./Order"), exports);
|
package/package.json
CHANGED
|
@@ -145,7 +145,7 @@ export class ConversationEmbedApi extends runtime.BaseAPI implements Conversatio
|
|
|
145
145
|
|
|
146
146
|
if (this.configuration && this.configuration.accessToken) {
|
|
147
147
|
// oauth required
|
|
148
|
-
headerParameters["Authorization"] = await this.configuration.accessToken("ultraCartOauth", ["affiliate_read", "affiliate_write", "auto_order_read", "auto_order_write", "channel_partner_read", "channel_partner_write", "
|
|
148
|
+
headerParameters["Authorization"] = await this.configuration.accessToken("ultraCartOauth", ["affiliate_read", "affiliate_write", "auto_order_read", "auto_order_write", "channel_partner_read", "channel_partner_write", "checkout_read", "checkout_write", "configuration_read", "configuration_write", "conversation_read", "conversation_write", "coupon_read", "coupon_write", "customer_read", "customer_write", "fraud_read", "fraud_write", "fulfillment_read", "fulfillment_write", "gift_certificate_read", "gift_certificate_write", "integration_log_read", "integration_log_write", "order_read", "order_write", "item_read", "item_write", "storefront_read", "storefront_write", "tax_read", "tax_write", "webhook_read", "webhook_write", "ultrabooks_read", "ultrabooks_write", "user_read", "user_write", "workflow_read", "workflow_write"]);
|
|
149
149
|
}
|
|
150
150
|
|
|
151
151
|
if (this.configuration && this.configuration.apiKey) {
|
|
@@ -216,7 +216,7 @@ export class ConversationEmbedApi extends runtime.BaseAPI implements Conversatio
|
|
|
216
216
|
|
|
217
217
|
if (this.configuration && this.configuration.accessToken) {
|
|
218
218
|
// oauth required
|
|
219
|
-
headerParameters["Authorization"] = await this.configuration.accessToken("ultraCartOauth", ["affiliate_read", "affiliate_write", "auto_order_read", "auto_order_write", "channel_partner_read", "channel_partner_write", "
|
|
219
|
+
headerParameters["Authorization"] = await this.configuration.accessToken("ultraCartOauth", ["affiliate_read", "affiliate_write", "auto_order_read", "auto_order_write", "channel_partner_read", "channel_partner_write", "checkout_read", "checkout_write", "configuration_read", "configuration_write", "conversation_read", "conversation_write", "coupon_read", "coupon_write", "customer_read", "customer_write", "fraud_read", "fraud_write", "fulfillment_read", "fulfillment_write", "gift_certificate_read", "gift_certificate_write", "integration_log_read", "integration_log_write", "order_read", "order_write", "item_read", "item_write", "storefront_read", "storefront_write", "tax_read", "tax_write", "webhook_read", "webhook_write", "ultrabooks_read", "ultrabooks_write", "user_read", "user_write", "workflow_read", "workflow_write"]);
|
|
220
220
|
}
|
|
221
221
|
|
|
222
222
|
if (this.configuration && this.configuration.apiKey) {
|
|
@@ -287,7 +287,7 @@ export class ConversationEmbedApi extends runtime.BaseAPI implements Conversatio
|
|
|
287
287
|
|
|
288
288
|
if (this.configuration && this.configuration.accessToken) {
|
|
289
289
|
// oauth required
|
|
290
|
-
headerParameters["Authorization"] = await this.configuration.accessToken("ultraCartOauth", ["affiliate_read", "affiliate_write", "auto_order_read", "auto_order_write", "channel_partner_read", "channel_partner_write", "
|
|
290
|
+
headerParameters["Authorization"] = await this.configuration.accessToken("ultraCartOauth", ["affiliate_read", "affiliate_write", "auto_order_read", "auto_order_write", "channel_partner_read", "channel_partner_write", "checkout_read", "checkout_write", "configuration_read", "configuration_write", "conversation_read", "conversation_write", "coupon_read", "coupon_write", "customer_read", "customer_write", "fraud_read", "fraud_write", "fulfillment_read", "fulfillment_write", "gift_certificate_read", "gift_certificate_write", "integration_log_read", "integration_log_write", "order_read", "order_write", "item_read", "item_write", "storefront_read", "storefront_write", "tax_read", "tax_write", "webhook_read", "webhook_write", "ultrabooks_read", "ultrabooks_write", "user_read", "user_write", "workflow_read", "workflow_write"]);
|
|
291
291
|
}
|
|
292
292
|
|
|
293
293
|
if (this.configuration && this.configuration.apiKey) {
|
package/src/apis/OauthApi.ts
CHANGED
|
@@ -93,6 +93,21 @@ export interface OauthApiInterface {
|
|
|
93
93
|
*/
|
|
94
94
|
oauthDeviceAuthorize(requestParameters: OauthDeviceAuthorizeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OauthDeviceAuthorizationResponse>;
|
|
95
95
|
|
|
96
|
+
/**
|
|
97
|
+
* Returns the UltraCart merchant account that authorized your application, along with the permissions that were granted. Call it immediately after exchanging your authorization code so you can display the connected account to your user and map it within your own system. Any OAuth access token may call this endpoint regardless of the permissions it holds. The granted permissions are the ones the merchant approved, which may be narrower than the permissions your application currently requests, because permissions are recorded when the merchant authorizes and do not change afterwards. If you add a permission to your application, already connected merchants keep the permissions they originally approved until they authorize again, so read this list rather than assuming your application\'s configured permissions.
|
|
98
|
+
* @summary Identify the merchant account this access token belongs to.
|
|
99
|
+
* @param {*} [options] Override http request option.
|
|
100
|
+
* @throws {RequiredError}
|
|
101
|
+
* @memberof OauthApiInterface
|
|
102
|
+
*/
|
|
103
|
+
oauthMeRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* Returns the UltraCart merchant account that authorized your application, along with the permissions that were granted. Call it immediately after exchanging your authorization code so you can display the connected account to your user and map it within your own system. Any OAuth access token may call this endpoint regardless of the permissions it holds. The granted permissions are the ones the merchant approved, which may be narrower than the permissions your application currently requests, because permissions are recorded when the merchant authorizes and do not change afterwards. If you add a permission to your application, already connected merchants keep the permissions they originally approved until they authorize again, so read this list rather than assuming your application\'s configured permissions.
|
|
107
|
+
* Identify the merchant account this access token belongs to.
|
|
108
|
+
*/
|
|
109
|
+
oauthMe(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
110
|
+
|
|
96
111
|
/**
|
|
97
112
|
* Revokes the OAuth application associated with the specified client_id and token.
|
|
98
113
|
* @summary Revoke this OAuth application.
|
|
@@ -140,7 +155,7 @@ export class OauthApi extends runtime.BaseAPI implements OauthApiInterface {
|
|
|
140
155
|
|
|
141
156
|
if (this.configuration && this.configuration.accessToken) {
|
|
142
157
|
// oauth required
|
|
143
|
-
headerParameters["Authorization"] = await this.configuration.accessToken("ultraCartOauth", ["affiliate_read", "affiliate_write", "auto_order_read", "auto_order_write", "channel_partner_read", "channel_partner_write", "
|
|
158
|
+
headerParameters["Authorization"] = await this.configuration.accessToken("ultraCartOauth", ["affiliate_read", "affiliate_write", "auto_order_read", "auto_order_write", "channel_partner_read", "channel_partner_write", "checkout_read", "checkout_write", "configuration_read", "configuration_write", "conversation_read", "conversation_write", "coupon_read", "coupon_write", "customer_read", "customer_write", "fraud_read", "fraud_write", "fulfillment_read", "fulfillment_write", "gift_certificate_read", "gift_certificate_write", "integration_log_read", "integration_log_write", "order_read", "order_write", "item_read", "item_write", "storefront_read", "storefront_write", "tax_read", "tax_write", "webhook_read", "webhook_write", "ultrabooks_read", "ultrabooks_write", "user_read", "user_write", "workflow_read", "workflow_write"]);
|
|
144
159
|
}
|
|
145
160
|
|
|
146
161
|
if (this.configuration && this.configuration.apiKey) {
|
|
@@ -228,7 +243,7 @@ export class OauthApi extends runtime.BaseAPI implements OauthApiInterface {
|
|
|
228
243
|
|
|
229
244
|
if (this.configuration && this.configuration.accessToken) {
|
|
230
245
|
// oauth required
|
|
231
|
-
headerParameters["Authorization"] = await this.configuration.accessToken("ultraCartOauth", ["affiliate_read", "affiliate_write", "auto_order_read", "auto_order_write", "channel_partner_read", "channel_partner_write", "
|
|
246
|
+
headerParameters["Authorization"] = await this.configuration.accessToken("ultraCartOauth", ["affiliate_read", "affiliate_write", "auto_order_read", "auto_order_write", "channel_partner_read", "channel_partner_write", "checkout_read", "checkout_write", "configuration_read", "configuration_write", "conversation_read", "conversation_write", "coupon_read", "coupon_write", "customer_read", "customer_write", "fraud_read", "fraud_write", "fulfillment_read", "fulfillment_write", "gift_certificate_read", "gift_certificate_write", "integration_log_read", "integration_log_write", "order_read", "order_write", "item_read", "item_write", "storefront_read", "storefront_write", "tax_read", "tax_write", "webhook_read", "webhook_write", "ultrabooks_read", "ultrabooks_write", "user_read", "user_write", "workflow_read", "workflow_write"]);
|
|
232
247
|
}
|
|
233
248
|
|
|
234
249
|
if (this.configuration && this.configuration.apiKey) {
|
|
@@ -277,6 +292,38 @@ export class OauthApi extends runtime.BaseAPI implements OauthApiInterface {
|
|
|
277
292
|
return await response.value();
|
|
278
293
|
}
|
|
279
294
|
|
|
295
|
+
/**
|
|
296
|
+
* Returns the UltraCart merchant account that authorized your application, along with the permissions that were granted. Call it immediately after exchanging your authorization code so you can display the connected account to your user and map it within your own system. Any OAuth access token may call this endpoint regardless of the permissions it holds. The granted permissions are the ones the merchant approved, which may be narrower than the permissions your application currently requests, because permissions are recorded when the merchant authorizes and do not change afterwards. If you add a permission to your application, already connected merchants keep the permissions they originally approved until they authorize again, so read this list rather than assuming your application\'s configured permissions.
|
|
297
|
+
* Identify the merchant account this access token belongs to.
|
|
298
|
+
*/
|
|
299
|
+
async oauthMeRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
300
|
+
const queryParameters: any = {};
|
|
301
|
+
|
|
302
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
303
|
+
|
|
304
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
305
|
+
// oauth required
|
|
306
|
+
headerParameters["Authorization"] = await this.configuration.accessToken("ultraCartOauth", []);
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
const response = await this.request({
|
|
310
|
+
path: `/oauth/me`,
|
|
311
|
+
method: 'GET',
|
|
312
|
+
headers: headerParameters,
|
|
313
|
+
query: queryParameters,
|
|
314
|
+
}, initOverrides);
|
|
315
|
+
|
|
316
|
+
return new runtime.VoidApiResponse(response);
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
/**
|
|
320
|
+
* Returns the UltraCart merchant account that authorized your application, along with the permissions that were granted. Call it immediately after exchanging your authorization code so you can display the connected account to your user and map it within your own system. Any OAuth access token may call this endpoint regardless of the permissions it holds. The granted permissions are the ones the merchant approved, which may be narrower than the permissions your application currently requests, because permissions are recorded when the merchant authorizes and do not change afterwards. If you add a permission to your application, already connected merchants keep the permissions they originally approved until they authorize again, so read this list rather than assuming your application\'s configured permissions.
|
|
321
|
+
* Identify the merchant account this access token belongs to.
|
|
322
|
+
*/
|
|
323
|
+
async oauthMe(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
324
|
+
await this.oauthMeRaw(initOverrides);
|
|
325
|
+
}
|
|
326
|
+
|
|
280
327
|
/**
|
|
281
328
|
* Revokes the OAuth application associated with the specified client_id and token.
|
|
282
329
|
* Revoke this OAuth application.
|
|
@@ -300,7 +347,7 @@ export class OauthApi extends runtime.BaseAPI implements OauthApiInterface {
|
|
|
300
347
|
|
|
301
348
|
if (this.configuration && this.configuration.accessToken) {
|
|
302
349
|
// oauth required
|
|
303
|
-
headerParameters["Authorization"] = await this.configuration.accessToken("ultraCartOauth", ["affiliate_read", "affiliate_write", "auto_order_read", "auto_order_write", "channel_partner_read", "channel_partner_write", "
|
|
350
|
+
headerParameters["Authorization"] = await this.configuration.accessToken("ultraCartOauth", ["affiliate_read", "affiliate_write", "auto_order_read", "auto_order_write", "channel_partner_read", "channel_partner_write", "checkout_read", "checkout_write", "configuration_read", "configuration_write", "conversation_read", "conversation_write", "coupon_read", "coupon_write", "customer_read", "customer_write", "fraud_read", "fraud_write", "fulfillment_read", "fulfillment_write", "gift_certificate_read", "gift_certificate_write", "integration_log_read", "integration_log_write", "order_read", "order_write", "item_read", "item_write", "storefront_read", "storefront_write", "tax_read", "tax_write", "webhook_read", "webhook_write", "ultrabooks_read", "ultrabooks_write", "user_read", "user_write", "workflow_read", "workflow_write"]);
|
|
304
351
|
}
|
|
305
352
|
|
|
306
353
|
if (this.configuration && this.configuration.apiKey) {
|
|
@@ -9941,7 +9941,7 @@ export class StorefrontApi extends runtime.BaseAPI implements StorefrontApiInter
|
|
|
9941
9941
|
|
|
9942
9942
|
if (this.configuration && this.configuration.accessToken) {
|
|
9943
9943
|
// oauth required
|
|
9944
|
-
headerParameters["Authorization"] = await this.configuration.accessToken("ultraCartOauth", ["affiliate_read", "affiliate_write", "auto_order_read", "auto_order_write", "channel_partner_read", "channel_partner_write", "
|
|
9944
|
+
headerParameters["Authorization"] = await this.configuration.accessToken("ultraCartOauth", ["affiliate_read", "affiliate_write", "auto_order_read", "auto_order_write", "channel_partner_read", "channel_partner_write", "checkout_read", "checkout_write", "configuration_read", "configuration_write", "conversation_read", "conversation_write", "coupon_read", "coupon_write", "customer_read", "customer_write", "fraud_read", "fraud_write", "fulfillment_read", "fulfillment_write", "gift_certificate_read", "gift_certificate_write", "integration_log_read", "integration_log_write", "order_read", "order_write", "item_read", "item_write", "storefront_read", "storefront_write", "tax_read", "tax_write", "webhook_read", "webhook_write", "ultrabooks_read", "ultrabooks_write", "user_read", "user_write", "workflow_read", "workflow_write"]);
|
|
9945
9945
|
}
|
|
9946
9946
|
|
|
9947
9947
|
if (this.configuration && this.configuration.apiKey) {
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* UltraCart Rest API V2
|
|
5
|
+
* UltraCart REST API Version 2
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 2.0.0
|
|
8
|
+
* Contact: support@ultracart.com
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { exists, mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface OauthMeResponse
|
|
20
|
+
*/
|
|
21
|
+
export interface OauthMeResponse {
|
|
22
|
+
/**
|
|
23
|
+
* The name of your application as the merchant approved it.
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof OauthMeResponse
|
|
26
|
+
*/
|
|
27
|
+
application_name?: string;
|
|
28
|
+
/**
|
|
29
|
+
* Your application's client_id. Null when authenticating with a simple key, which is not tied to an application.
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof OauthMeResponse
|
|
32
|
+
*/
|
|
33
|
+
client_id?: string;
|
|
34
|
+
/**
|
|
35
|
+
* The UltraCart merchant account that authorized your application. Stable, and the value to key your own records on.
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof OauthMeResponse
|
|
38
|
+
*/
|
|
39
|
+
merchant_id?: string;
|
|
40
|
+
/**
|
|
41
|
+
* The account's company name, suitable for displaying to your user. The merchant can change this, so display it rather than storing it as an identifier.
|
|
42
|
+
* @type {string}
|
|
43
|
+
* @memberof OauthMeResponse
|
|
44
|
+
*/
|
|
45
|
+
merchant_name?: string;
|
|
46
|
+
/**
|
|
47
|
+
* The permissions the merchant granted. May be narrower than the permissions your application currently requests.
|
|
48
|
+
* @type {Array<string>}
|
|
49
|
+
* @memberof OauthMeResponse
|
|
50
|
+
*/
|
|
51
|
+
scopes?: Array<string>;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Check if a given object implements the OauthMeResponse interface.
|
|
58
|
+
*/
|
|
59
|
+
export function instanceOfOauthMeResponse(value: object): boolean {
|
|
60
|
+
let isInstance = true;
|
|
61
|
+
|
|
62
|
+
return isInstance;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export function OauthMeResponseFromJSON(json: any): OauthMeResponse {
|
|
66
|
+
return OauthMeResponseFromJSONTyped(json, false);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export function OauthMeResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): OauthMeResponse {
|
|
70
|
+
if ((json === undefined) || (json === null)) {
|
|
71
|
+
return json;
|
|
72
|
+
}
|
|
73
|
+
return {
|
|
74
|
+
|
|
75
|
+
'application_name': !exists(json, 'application_name') ? undefined : json['application_name'],
|
|
76
|
+
'client_id': !exists(json, 'client_id') ? undefined : json['client_id'],
|
|
77
|
+
'merchant_id': !exists(json, 'merchant_id') ? undefined : json['merchant_id'],
|
|
78
|
+
'merchant_name': !exists(json, 'merchant_name') ? undefined : json['merchant_name'],
|
|
79
|
+
'scopes': !exists(json, 'scopes') ? undefined : json['scopes'],
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export function OauthMeResponseToJSON(value?: OauthMeResponse | null): any {
|
|
84
|
+
if (value === undefined) {
|
|
85
|
+
return undefined;
|
|
86
|
+
}
|
|
87
|
+
if (value === null) {
|
|
88
|
+
return null;
|
|
89
|
+
}
|
|
90
|
+
return {
|
|
91
|
+
|
|
92
|
+
'application_name': value.application_name,
|
|
93
|
+
'client_id': value.client_id,
|
|
94
|
+
'merchant_id': value.merchant_id,
|
|
95
|
+
'merchant_name': value.merchant_name,
|
|
96
|
+
'scopes': value.scopes,
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
|
|
@@ -49,6 +49,12 @@ export interface OauthTokenResponse {
|
|
|
49
49
|
* @memberof OauthTokenResponse
|
|
50
50
|
*/
|
|
51
51
|
expires_in?: string;
|
|
52
|
+
/**
|
|
53
|
+
* The UltraCart merchant account that authorized this token. Use it to map the token to the merchant within your own system. Also returned by GET /oauth/me along with the account name.
|
|
54
|
+
* @type {string}
|
|
55
|
+
* @memberof OauthTokenResponse
|
|
56
|
+
*/
|
|
57
|
+
merchant_id?: string;
|
|
52
58
|
/**
|
|
53
59
|
* The refresh token that should be used to fetch a new access token when the expiration occurs
|
|
54
60
|
* @type {string}
|
|
@@ -104,6 +110,7 @@ export function OauthTokenResponseFromJSONTyped(json: any, ignoreDiscriminator:
|
|
|
104
110
|
'error_description': !exists(json, 'error_description') ? undefined : json['error_description'],
|
|
105
111
|
'error_uri': !exists(json, 'error_uri') ? undefined : json['error_uri'],
|
|
106
112
|
'expires_in': !exists(json, 'expires_in') ? undefined : json['expires_in'],
|
|
113
|
+
'merchant_id': !exists(json, 'merchant_id') ? undefined : json['merchant_id'],
|
|
107
114
|
'refresh_token': !exists(json, 'refresh_token') ? undefined : json['refresh_token'],
|
|
108
115
|
'scope': !exists(json, 'scope') ? undefined : json['scope'],
|
|
109
116
|
'token_type': !exists(json, 'token_type') ? undefined : json['token_type'],
|
|
@@ -124,6 +131,7 @@ export function OauthTokenResponseToJSON(value?: OauthTokenResponse | null): any
|
|
|
124
131
|
'error_description': value.error_description,
|
|
125
132
|
'error_uri': value.error_uri,
|
|
126
133
|
'expires_in': value.expires_in,
|
|
134
|
+
'merchant_id': value.merchant_id,
|
|
127
135
|
'refresh_token': value.refresh_token,
|
|
128
136
|
'scope': value.scope,
|
|
129
137
|
'token_type': value.token_type,
|
|
@@ -74,6 +74,18 @@ export interface OrderSummary {
|
|
|
74
74
|
* @memberof OrderSummary
|
|
75
75
|
*/
|
|
76
76
|
arbitrary_shipping_handling_total?: Currency;
|
|
77
|
+
/**
|
|
78
|
+
*
|
|
79
|
+
* @type {Currency}
|
|
80
|
+
* @memberof OrderSummary
|
|
81
|
+
*/
|
|
82
|
+
arbitrary_subtotal_discount?: Currency;
|
|
83
|
+
/**
|
|
84
|
+
*
|
|
85
|
+
* @type {Currency}
|
|
86
|
+
* @memberof OrderSummary
|
|
87
|
+
*/
|
|
88
|
+
arbitrary_taxable_subtotal_discount?: Currency;
|
|
77
89
|
/**
|
|
78
90
|
*
|
|
79
91
|
* @type {Currency}
|
|
@@ -213,6 +225,8 @@ export function OrderSummaryFromJSONTyped(json: any, ignoreDiscriminator: boolea
|
|
|
213
225
|
'actual_profit_review': !exists(json, 'actual_profit_review') ? undefined : json['actual_profit_review'],
|
|
214
226
|
'actual_shipping': !exists(json, 'actual_shipping') ? undefined : CurrencyFromJSON(json['actual_shipping']),
|
|
215
227
|
'arbitrary_shipping_handling_total': !exists(json, 'arbitrary_shipping_handling_total') ? undefined : CurrencyFromJSON(json['arbitrary_shipping_handling_total']),
|
|
228
|
+
'arbitrary_subtotal_discount': !exists(json, 'arbitrary_subtotal_discount') ? undefined : CurrencyFromJSON(json['arbitrary_subtotal_discount']),
|
|
229
|
+
'arbitrary_taxable_subtotal_discount': !exists(json, 'arbitrary_taxable_subtotal_discount') ? undefined : CurrencyFromJSON(json['arbitrary_taxable_subtotal_discount']),
|
|
216
230
|
'health_benefit_card_amount': !exists(json, 'health_benefit_card_amount') ? undefined : CurrencyFromJSON(json['health_benefit_card_amount']),
|
|
217
231
|
'health_benefit_card_refunded': !exists(json, 'health_benefit_card_refunded') ? undefined : CurrencyFromJSON(json['health_benefit_card_refunded']),
|
|
218
232
|
'internal_gift_certificate_amount': !exists(json, 'internal_gift_certificate_amount') ? undefined : CurrencyFromJSON(json['internal_gift_certificate_amount']),
|
|
@@ -251,6 +265,8 @@ export function OrderSummaryToJSON(value?: OrderSummary | null): any {
|
|
|
251
265
|
'actual_profit_review': value.actual_profit_review,
|
|
252
266
|
'actual_shipping': CurrencyToJSON(value.actual_shipping),
|
|
253
267
|
'arbitrary_shipping_handling_total': CurrencyToJSON(value.arbitrary_shipping_handling_total),
|
|
268
|
+
'arbitrary_subtotal_discount': CurrencyToJSON(value.arbitrary_subtotal_discount),
|
|
269
|
+
'arbitrary_taxable_subtotal_discount': CurrencyToJSON(value.arbitrary_taxable_subtotal_discount),
|
|
254
270
|
'health_benefit_card_amount': CurrencyToJSON(value.health_benefit_card_amount),
|
|
255
271
|
'health_benefit_card_refunded': CurrencyToJSON(value.health_benefit_card_refunded),
|
|
256
272
|
'internal_gift_certificate_amount': CurrencyToJSON(value.internal_gift_certificate_amount),
|
package/src/models/index.ts
CHANGED
|
@@ -769,6 +769,7 @@ export * from './Metric';
|
|
|
769
769
|
export * from './ModelError';
|
|
770
770
|
export * from './Notification';
|
|
771
771
|
export * from './OauthDeviceAuthorizationResponse';
|
|
772
|
+
export * from './OauthMeResponse';
|
|
772
773
|
export * from './OauthRevokeSuccessResponse';
|
|
773
774
|
export * from './OauthTokenResponse';
|
|
774
775
|
export * from './Order';
|