ultracart_rest_api_v2_typescript 4.1.94 → 4.1.96

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 CHANGED
@@ -1,12 +1,12 @@
1
1
  # UltraCart Typescript SDK
2
- ## ultracart_rest_api_v2_typescript@4.1.94
2
+ ## ultracart_rest_api_v2_typescript@4.1.96
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.94 --save
9
+ npm install ultracart_rest_api_v2_typescript@4.1.96 --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.96 | 06/03/2026 | fraud api alpha build |
89
+ | 4.1.95 | 06/02/2026 | fraud api alpha version |
88
90
  | 4.1.94 | 06/02/2026 | fraud api alpha version |
89
91
  | 4.1.93 | 06/02/2026 | fraud api alpha version for testing |
90
92
  | 4.1.92 | 05/26/2026 | AutoOrderApi.getAutoOrderCancelReasons |
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import { OauthRevokeSuccessResponse, OauthTokenResponse } from '../models';
13
+ import { OauthDeviceAuthorizationResponse, OauthRevokeSuccessResponse, OauthTokenResponse } from '../models';
14
14
  export interface OauthAccessTokenRequest {
15
15
  clientId: string;
16
16
  grantType: string;
@@ -62,12 +62,12 @@ export interface OauthApiInterface {
62
62
  * @throws {RequiredError}
63
63
  * @memberof OauthApiInterface
64
64
  */
65
- oauthDeviceAuthorizeRaw(requestParameters: OauthDeviceAuthorizeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
65
+ oauthDeviceAuthorizeRaw(requestParameters: OauthDeviceAuthorizeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<OauthDeviceAuthorizationResponse>>;
66
66
  /**
67
67
  * Initiates the device authorization flow by returning a device code and user code. The device displays the user code to the merchant, who visits the verification URI to approve the request. RFC 8628.
68
68
  * Initiate a device authorization flow.
69
69
  */
70
- oauthDeviceAuthorize(requestParameters: OauthDeviceAuthorizeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
70
+ oauthDeviceAuthorize(requestParameters: OauthDeviceAuthorizeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OauthDeviceAuthorizationResponse>;
71
71
  /**
72
72
  * Revokes the OAuth application associated with the specified client_id and token.
73
73
  * @summary Revoke this OAuth application.
@@ -102,12 +102,12 @@ export declare class OauthApi extends runtime.BaseAPI implements OauthApiInterfa
102
102
  * Initiates the device authorization flow by returning a device code and user code. The device displays the user code to the merchant, who visits the verification URI to approve the request. RFC 8628.
103
103
  * Initiate a device authorization flow.
104
104
  */
105
- oauthDeviceAuthorizeRaw(requestParameters: OauthDeviceAuthorizeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
105
+ oauthDeviceAuthorizeRaw(requestParameters: OauthDeviceAuthorizeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<OauthDeviceAuthorizationResponse>>;
106
106
  /**
107
107
  * Initiates the device authorization flow by returning a device code and user code. The device displays the user code to the merchant, who visits the verification URI to approve the request. RFC 8628.
108
108
  * Initiate a device authorization flow.
109
109
  */
110
- oauthDeviceAuthorize(requestParameters: OauthDeviceAuthorizeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
110
+ oauthDeviceAuthorize(requestParameters: OauthDeviceAuthorizeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OauthDeviceAuthorizationResponse>;
111
111
  /**
112
112
  * Revokes the OAuth application associated with the specified client_id and token.
113
113
  * Revoke this OAuth application.
@@ -230,7 +230,7 @@ var OauthApi = /** @class */ (function (_super) {
230
230
  }, initOverrides)];
231
231
  case 3:
232
232
  response = _c.sent();
233
- return [2 /*return*/, new runtime.VoidApiResponse(response)];
233
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, models_1.OauthDeviceAuthorizationResponseFromJSON)(jsonValue); })];
234
234
  }
235
235
  });
236
236
  });
@@ -241,12 +241,14 @@ var OauthApi = /** @class */ (function (_super) {
241
241
  */
242
242
  OauthApi.prototype.oauthDeviceAuthorize = function (requestParameters, initOverrides) {
243
243
  return __awaiter(this, void 0, void 0, function () {
244
+ var response;
244
245
  return __generator(this, function (_a) {
245
246
  switch (_a.label) {
246
247
  case 0: return [4 /*yield*/, this.oauthDeviceAuthorizeRaw(requestParameters, initOverrides)];
247
248
  case 1:
248
- _a.sent();
249
- return [2 /*return*/];
249
+ response = _a.sent();
250
+ return [4 /*yield*/, response.value()];
251
+ case 2: return [2 /*return*/, _a.sent()];
250
252
  }
251
253
  });
252
254
  });
@@ -217,11 +217,11 @@ export interface FraudRulePublic {
217
217
  */
218
218
  rotating_transaction_gateway_filters?: Array<FraudRuleRotatingTransactionGatewayFilter>;
219
219
  /**
220
- * Group containing this rule type (eg 'creditCardRules')
220
+ * Group containing this rule type (eg 'creditCardRules'). Deliberately not constrained by allowableValues on the response so SDK consumers do not hard-fail on an unexpected value if a future rule_type slips through the server-side mapping. Search REQUESTS still restrict rule_group to the known set.
221
221
  * @type {string}
222
222
  * @memberof FraudRulePublic
223
223
  */
224
- rule_group?: FraudRulePublicRuleGroupEnum;
224
+ rule_group?: string;
225
225
  /**
226
226
  * Rule type.
227
227
  * @type {string}
@@ -269,20 +269,6 @@ export declare const FraudRulePublicIpRangeTypeEnum: {
269
269
  readonly Subnet: "subnet";
270
270
  };
271
271
  export type FraudRulePublicIpRangeTypeEnum = typeof FraudRulePublicIpRangeTypeEnum[keyof typeof FraudRulePublicIpRangeTypeEnum];
272
- /**
273
- * @export
274
- */
275
- export declare const FraudRulePublicRuleGroupEnum: {
276
- readonly ExemptRules: "exemptRules";
277
- readonly CreditCardRules: "creditCardRules";
278
- readonly IpRules: "ipRules";
279
- readonly AddressRules: "addressRules";
280
- readonly AffiliateRules: "affiliateRules";
281
- readonly ItemRules: "itemRules";
282
- readonly OrderRules: "orderRules";
283
- readonly BrowserRules: "browserRules";
284
- };
285
- export type FraudRulePublicRuleGroupEnum = typeof FraudRulePublicRuleGroupEnum[keyof typeof FraudRulePublicRuleGroupEnum];
286
272
  /**
287
273
  * @export
288
274
  */
@@ -13,7 +13,7 @@
13
13
  * Do not edit the class manually.
14
14
  */
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
- exports.FraudRulePublicToJSON = exports.FraudRulePublicFromJSONTyped = exports.FraudRulePublicFromJSON = exports.instanceOfFraudRulePublic = exports.FraudRulePublicUserActionEnum = exports.FraudRulePublicRuleTypeEnum = exports.FraudRulePublicRuleGroupEnum = exports.FraudRulePublicIpRangeTypeEnum = exports.FraudRulePublicFailureActionEnum = exports.FraudRulePublicAvsMatchTypeEnum = void 0;
16
+ exports.FraudRulePublicToJSON = exports.FraudRulePublicFromJSONTyped = exports.FraudRulePublicFromJSON = exports.instanceOfFraudRulePublic = exports.FraudRulePublicUserActionEnum = exports.FraudRulePublicRuleTypeEnum = exports.FraudRulePublicIpRangeTypeEnum = exports.FraudRulePublicFailureActionEnum = exports.FraudRulePublicAvsMatchTypeEnum = void 0;
17
17
  var runtime_1 = require("../runtime");
18
18
  var FraudRuleItemFilter_1 = require("./FraudRuleItemFilter");
19
19
  var FraudRuleRotatingTransactionGatewayFilter_1 = require("./FraudRuleRotatingTransactionGatewayFilter");
@@ -43,19 +43,6 @@ exports.FraudRulePublicIpRangeTypeEnum = {
43
43
  Address: 'address',
44
44
  Subnet: 'subnet'
45
45
  };
46
- /**
47
- * @export
48
- */
49
- exports.FraudRulePublicRuleGroupEnum = {
50
- ExemptRules: 'exemptRules',
51
- CreditCardRules: 'creditCardRules',
52
- IpRules: 'ipRules',
53
- AddressRules: 'addressRules',
54
- AffiliateRules: 'affiliateRules',
55
- ItemRules: 'itemRules',
56
- OrderRules: 'orderRules',
57
- BrowserRules: 'browserRules'
58
- };
59
46
  /**
60
47
  * @export
61
48
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ultracart_rest_api_v2_typescript",
3
- "version": "4.1.94",
3
+ "version": "4.1.96",
4
4
  "description": "UltraCart Rest TypeScript SDK",
5
5
  "author": "UltraCart",
6
6
  "repository": {
@@ -18,6 +18,9 @@ import {
18
18
  ErrorResponse,
19
19
  ErrorResponseFromJSON,
20
20
  ErrorResponseToJSON,
21
+ OauthDeviceAuthorizationResponse,
22
+ OauthDeviceAuthorizationResponseFromJSON,
23
+ OauthDeviceAuthorizationResponseToJSON,
21
24
  OauthRevokeSuccessResponse,
22
25
  OauthRevokeSuccessResponseFromJSON,
23
26
  OauthRevokeSuccessResponseToJSON,
@@ -82,13 +85,13 @@ export interface OauthApiInterface {
82
85
  * @throws {RequiredError}
83
86
  * @memberof OauthApiInterface
84
87
  */
85
- oauthDeviceAuthorizeRaw(requestParameters: OauthDeviceAuthorizeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
88
+ oauthDeviceAuthorizeRaw(requestParameters: OauthDeviceAuthorizeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<OauthDeviceAuthorizationResponse>>;
86
89
 
87
90
  /**
88
91
  * Initiates the device authorization flow by returning a device code and user code. The device displays the user code to the merchant, who visits the verification URI to approve the request. RFC 8628.
89
92
  * Initiate a device authorization flow.
90
93
  */
91
- oauthDeviceAuthorize(requestParameters: OauthDeviceAuthorizeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
94
+ oauthDeviceAuthorize(requestParameters: OauthDeviceAuthorizeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OauthDeviceAuthorizationResponse>;
92
95
 
93
96
  /**
94
97
  * Revokes the OAuth application associated with the specified client_id and token.
@@ -206,7 +209,7 @@ export class OauthApi extends runtime.BaseAPI implements OauthApiInterface {
206
209
  * Initiates the device authorization flow by returning a device code and user code. The device displays the user code to the merchant, who visits the verification URI to approve the request. RFC 8628.
207
210
  * Initiate a device authorization flow.
208
211
  */
209
- async oauthDeviceAuthorizeRaw(requestParameters: OauthDeviceAuthorizeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
212
+ async oauthDeviceAuthorizeRaw(requestParameters: OauthDeviceAuthorizeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<OauthDeviceAuthorizationResponse>> {
210
213
  if (requestParameters.clientId === null || requestParameters.clientId === undefined) {
211
214
  throw new runtime.RequiredError('clientId','Required parameter requestParameters.clientId was null or undefined when calling oauthDeviceAuthorize.');
212
215
  }
@@ -262,15 +265,16 @@ export class OauthApi extends runtime.BaseAPI implements OauthApiInterface {
262
265
  body: formParams,
263
266
  }, initOverrides);
264
267
 
265
- return new runtime.VoidApiResponse(response);
268
+ return new runtime.JSONApiResponse(response, (jsonValue) => OauthDeviceAuthorizationResponseFromJSON(jsonValue));
266
269
  }
267
270
 
268
271
  /**
269
272
  * Initiates the device authorization flow by returning a device code and user code. The device displays the user code to the merchant, who visits the verification URI to approve the request. RFC 8628.
270
273
  * Initiate a device authorization flow.
271
274
  */
272
- async oauthDeviceAuthorize(requestParameters: OauthDeviceAuthorizeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
273
- await this.oauthDeviceAuthorizeRaw(requestParameters, initOverrides);
275
+ async oauthDeviceAuthorize(requestParameters: OauthDeviceAuthorizeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OauthDeviceAuthorizationResponse> {
276
+ const response = await this.oauthDeviceAuthorizeRaw(requestParameters, initOverrides);
277
+ return await response.value();
274
278
  }
275
279
 
276
280
  /**
@@ -237,11 +237,11 @@ export interface FraudRulePublic {
237
237
  */
238
238
  rotating_transaction_gateway_filters?: Array<FraudRuleRotatingTransactionGatewayFilter>;
239
239
  /**
240
- * Group containing this rule type (eg 'creditCardRules')
240
+ * Group containing this rule type (eg 'creditCardRules'). Deliberately not constrained by allowableValues on the response so SDK consumers do not hard-fail on an unexpected value if a future rule_type slips through the server-side mapping. Search REQUESTS still restrict rule_group to the known set.
241
241
  * @type {string}
242
242
  * @memberof FraudRulePublic
243
243
  */
244
- rule_group?: FraudRulePublicRuleGroupEnum;
244
+ rule_group?: string;
245
245
  /**
246
246
  * Rule type.
247
247
  * @type {string}
@@ -295,21 +295,6 @@ export const FraudRulePublicIpRangeTypeEnum = {
295
295
  } as const;
296
296
  export type FraudRulePublicIpRangeTypeEnum = typeof FraudRulePublicIpRangeTypeEnum[keyof typeof FraudRulePublicIpRangeTypeEnum];
297
297
 
298
- /**
299
- * @export
300
- */
301
- export const FraudRulePublicRuleGroupEnum = {
302
- ExemptRules: 'exemptRules',
303
- CreditCardRules: 'creditCardRules',
304
- IpRules: 'ipRules',
305
- AddressRules: 'addressRules',
306
- AffiliateRules: 'affiliateRules',
307
- ItemRules: 'itemRules',
308
- OrderRules: 'orderRules',
309
- BrowserRules: 'browserRules'
310
- } as const;
311
- export type FraudRulePublicRuleGroupEnum = typeof FraudRulePublicRuleGroupEnum[keyof typeof FraudRulePublicRuleGroupEnum];
312
-
313
298
  /**
314
299
  * @export
315
300
  */