ultracart_rest_api_v2_typescript 4.1.15 → 4.1.16

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.
@@ -339,6 +339,7 @@ src/models/CustomReportParameterOption.ts
339
339
  src/models/CustomReportQuery.ts
340
340
  src/models/CustomReportResponse.ts
341
341
  src/models/CustomReportTooltip.ts
342
+ src/models/CustomReportsResponse.ts
342
343
  src/models/Customer.ts
343
344
  src/models/CustomerActivity.ts
344
345
  src/models/CustomerAffiliate.ts
package/README.md CHANGED
@@ -1,12 +1,12 @@
1
1
  # UltraCart Typescript SDK
2
- ## ultracart_rest_api_v2_typescript@4.1.15
2
+ ## ultracart_rest_api_v2_typescript@4.1.16
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.15 --save
9
+ npm install ultracart_rest_api_v2_typescript@4.1.16 --save
10
10
  ```
11
11
 
12
12
  ```typescript
@@ -85,6 +85,7 @@ Not every change is committed to every SDK.
85
85
 
86
86
  | Version | Date | Comments |
87
87
  | --: | :-: | --- |
88
+ | 4.1.16 | 07/28/2025 | updated doc samples |
88
89
  | 4.1.15 | 07/28/2025 | new order methods for blocking and unblocking refunds |
89
90
  | 4.1.14 | 07/10/2025 | automation test |
90
91
  | 4.1.13 | 05/20/2025 | conversation - virtual agent flag and virtual agent cost |
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import { CustomReport, CustomReportAccountConfig, CustomReportAccountConfigResponse, CustomReportExecutionRequest, CustomReportResponse, Report, ReportAuthResponse, ReportDataSetPageResponse, ReportDataSetResponse, ReportDryRunQueriesRequest, ReportDryRunQueriesResponse, ReportExecuteQueriesRequest, ReportResponse, ReportsResponse } from '../models';
13
+ import { CustomReport, CustomReportAccountConfig, CustomReportAccountConfigResponse, CustomReportExecutionRequest, CustomReportResponse, CustomReportsResponse, Report, ReportAuthResponse, ReportDataSetPageResponse, ReportDataSetResponse, ReportDryRunQueriesRequest, ReportDryRunQueriesResponse, ReportExecuteQueriesRequest, ReportResponse, ReportsResponse } from '../models';
14
14
  export interface DeleteCustomReportRequest {
15
15
  customReportOid: number;
16
16
  }
@@ -162,6 +162,19 @@ export interface DatawarehouseApiInterface {
162
162
  * Get custom report account configuration
163
163
  */
164
164
  getCustomReportAccountConfig(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CustomReportAccountConfigResponse>;
165
+ /**
166
+ * Retrieve a custom reports
167
+ * @summary Get custom reports
168
+ * @param {*} [options] Override http request option.
169
+ * @throws {RequiredError}
170
+ * @memberof DatawarehouseApiInterface
171
+ */
172
+ getCustomReportsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CustomReportsResponse>>;
173
+ /**
174
+ * Retrieve a custom reports
175
+ * Get custom reports
176
+ */
177
+ getCustomReports(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CustomReportsResponse>;
165
178
  /**
166
179
  * Retrieve a report
167
180
  * @summary Get a report
@@ -378,6 +391,16 @@ export declare class DatawarehouseApi extends runtime.BaseAPI implements Datawar
378
391
  * Get custom report account configuration
379
392
  */
380
393
  getCustomReportAccountConfig(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CustomReportAccountConfigResponse>;
394
+ /**
395
+ * Retrieve a custom reports
396
+ * Get custom reports
397
+ */
398
+ getCustomReportsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CustomReportsResponse>>;
399
+ /**
400
+ * Retrieve a custom reports
401
+ * Get custom reports
402
+ */
403
+ getCustomReports(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CustomReportsResponse>;
381
404
  /**
382
405
  * Retrieve a report
383
406
  * Get a report
@@ -488,6 +488,62 @@ var DatawarehouseApi = /** @class */ (function (_super) {
488
488
  });
489
489
  });
490
490
  };
491
+ /**
492
+ * Retrieve a custom reports
493
+ * Get custom reports
494
+ */
495
+ DatawarehouseApi.prototype.getCustomReportsRaw = function (initOverrides) {
496
+ return __awaiter(this, void 0, void 0, function () {
497
+ var queryParameters, headerParameters, _a, _b, response;
498
+ return __generator(this, function (_c) {
499
+ switch (_c.label) {
500
+ case 0:
501
+ queryParameters = {};
502
+ headerParameters = {};
503
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
504
+ // oauth required
505
+ _a = headerParameters;
506
+ _b = "Authorization";
507
+ return [4 /*yield*/, this.configuration.accessToken("ultraCartOauth", [])];
508
+ case 1:
509
+ // oauth required
510
+ _a[_b] = _c.sent();
511
+ _c.label = 2;
512
+ case 2:
513
+ if (this.configuration && this.configuration.apiKey) {
514
+ headerParameters["x-ultracart-simple-key"] = this.configuration.apiKey("x-ultracart-simple-key"); // ultraCartSimpleApiKey authentication
515
+ }
516
+ return [4 /*yield*/, this.request({
517
+ path: "/datawarehouse/custom_reports",
518
+ method: 'GET',
519
+ headers: headerParameters,
520
+ query: queryParameters,
521
+ }, initOverrides)];
522
+ case 3:
523
+ response = _c.sent();
524
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, models_1.CustomReportsResponseFromJSON)(jsonValue); })];
525
+ }
526
+ });
527
+ });
528
+ };
529
+ /**
530
+ * Retrieve a custom reports
531
+ * Get custom reports
532
+ */
533
+ DatawarehouseApi.prototype.getCustomReports = function (initOverrides) {
534
+ return __awaiter(this, void 0, void 0, function () {
535
+ var response;
536
+ return __generator(this, function (_a) {
537
+ switch (_a.label) {
538
+ case 0: return [4 /*yield*/, this.getCustomReportsRaw(initOverrides)];
539
+ case 1:
540
+ response = _a.sent();
541
+ return [4 /*yield*/, response.value()];
542
+ case 2: return [2 /*return*/, _a.sent()];
543
+ }
544
+ });
545
+ });
546
+ };
491
547
  /**
492
548
  * Retrieve a report
493
549
  * Get a report
@@ -130,18 +130,6 @@ export interface RefundOrderRequest {
130
130
  autoOrderCancelReason?: string;
131
131
  expand?: string;
132
132
  }
133
- export interface RefundOrderCompletelyRequest {
134
- orderId: string;
135
- rejectAfterRefund?: boolean;
136
- skipCustomerNotification?: boolean;
137
- autoOrderCancel?: boolean;
138
- manualRefund?: boolean;
139
- reverseAffiliateTransactions?: boolean;
140
- issueStoreCredit?: boolean;
141
- autoOrderCancelReason?: string;
142
- refundReason?: string;
143
- rejectReason?: string;
144
- }
145
133
  export interface ReplacementRequest {
146
134
  orderId: string;
147
135
  replacement: OrderReplacement;
@@ -536,29 +524,6 @@ export interface OrderApiInterface {
536
524
  * Refund an order
537
525
  */
538
526
  refundOrder(requestParameters: RefundOrderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OrderResponse>;
539
- /**
540
- * Perform a refund operation on an order and then update the order if successful.
541
- * @summary Refund an order completely
542
- * @param {string} orderId The order id to refund.
543
- * @param {boolean} [rejectAfterRefund] Reject order after refund
544
- * @param {boolean} [skipCustomerNotification] Skip customer email notification
545
- * @param {boolean} [autoOrderCancel] Cancel associated auto orders
546
- * @param {boolean} [manualRefund] Consider a manual refund done externally
547
- * @param {boolean} [reverseAffiliateTransactions] Reverse affiliate transactions
548
- * @param {boolean} [issueStoreCredit] Issue a store credit instead of refunding the original payment method, loyalty must be configured on merchant account
549
- * @param {string} [autoOrderCancelReason] Reason for auto orders cancellation
550
- * @param {string} [refundReason] Reason for refund
551
- * @param {string} [rejectReason] Reason for reject
552
- * @param {*} [options] Override http request option.
553
- * @throws {RequiredError}
554
- * @memberof OrderApiInterface
555
- */
556
- refundOrderCompletelyRaw(requestParameters: RefundOrderCompletelyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<OrderResponse>>;
557
- /**
558
- * Perform a refund operation on an order and then update the order if successful.
559
- * Refund an order completely
560
- */
561
- refundOrderCompletely(requestParameters: RefundOrderCompletelyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OrderResponse>;
562
527
  /**
563
528
  * Create a replacement order based upon a previous order
564
529
  * @summary Replacement order
@@ -885,16 +850,6 @@ export declare class OrderApi extends runtime.BaseAPI implements OrderApiInterfa
885
850
  * Refund an order
886
851
  */
887
852
  refundOrder(requestParameters: RefundOrderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OrderResponse>;
888
- /**
889
- * Perform a refund operation on an order and then update the order if successful.
890
- * Refund an order completely
891
- */
892
- refundOrderCompletelyRaw(requestParameters: RefundOrderCompletelyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<OrderResponse>>;
893
- /**
894
- * Perform a refund operation on an order and then update the order if successful.
895
- * Refund an order completely
896
- */
897
- refundOrderCompletely(requestParameters: RefundOrderCompletelyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OrderResponse>;
898
853
  /**
899
854
  * Create a replacement order based upon a previous order
900
855
  * Replacement order
@@ -170,7 +170,7 @@ var OrderApi = /** @class */ (function (_super) {
170
170
  }
171
171
  return [4 /*yield*/, this.request({
172
172
  path: "/order/orders/{order_id}/refund_block".replace("{".concat("order_id", "}"), encodeURIComponent(String(requestParameters.orderId))),
173
- method: 'POST',
173
+ method: 'GET',
174
174
  headers: headerParameters,
175
175
  query: queryParameters,
176
176
  }, initOverrides)];
@@ -1550,92 +1550,6 @@ var OrderApi = /** @class */ (function (_super) {
1550
1550
  });
1551
1551
  });
1552
1552
  };
1553
- /**
1554
- * Perform a refund operation on an order and then update the order if successful.
1555
- * Refund an order completely
1556
- */
1557
- OrderApi.prototype.refundOrderCompletelyRaw = function (requestParameters, initOverrides) {
1558
- return __awaiter(this, void 0, void 0, function () {
1559
- var queryParameters, headerParameters, _a, _b, response;
1560
- return __generator(this, function (_c) {
1561
- switch (_c.label) {
1562
- case 0:
1563
- if (requestParameters.orderId === null || requestParameters.orderId === undefined) {
1564
- throw new runtime.RequiredError('orderId', 'Required parameter requestParameters.orderId was null or undefined when calling refundOrderCompletely.');
1565
- }
1566
- queryParameters = {};
1567
- if (requestParameters.rejectAfterRefund !== undefined) {
1568
- queryParameters['reject_after_refund'] = requestParameters.rejectAfterRefund;
1569
- }
1570
- if (requestParameters.skipCustomerNotification !== undefined) {
1571
- queryParameters['skip_customer_notification'] = requestParameters.skipCustomerNotification;
1572
- }
1573
- if (requestParameters.autoOrderCancel !== undefined) {
1574
- queryParameters['auto_order_cancel'] = requestParameters.autoOrderCancel;
1575
- }
1576
- if (requestParameters.manualRefund !== undefined) {
1577
- queryParameters['manual_refund'] = requestParameters.manualRefund;
1578
- }
1579
- if (requestParameters.reverseAffiliateTransactions !== undefined) {
1580
- queryParameters['reverse_affiliate_transactions'] = requestParameters.reverseAffiliateTransactions;
1581
- }
1582
- if (requestParameters.issueStoreCredit !== undefined) {
1583
- queryParameters['issue_store_credit'] = requestParameters.issueStoreCredit;
1584
- }
1585
- if (requestParameters.autoOrderCancelReason !== undefined) {
1586
- queryParameters['auto_order_cancel_reason'] = requestParameters.autoOrderCancelReason;
1587
- }
1588
- if (requestParameters.refundReason !== undefined) {
1589
- queryParameters['refund_reason'] = requestParameters.refundReason;
1590
- }
1591
- if (requestParameters.rejectReason !== undefined) {
1592
- queryParameters['reject_reason'] = requestParameters.rejectReason;
1593
- }
1594
- headerParameters = {};
1595
- if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
1596
- // oauth required
1597
- _a = headerParameters;
1598
- _b = "Authorization";
1599
- return [4 /*yield*/, this.configuration.accessToken("ultraCartOauth", ["order_write"])];
1600
- case 1:
1601
- // oauth required
1602
- _a[_b] = _c.sent();
1603
- _c.label = 2;
1604
- case 2:
1605
- if (this.configuration && this.configuration.apiKey) {
1606
- headerParameters["x-ultracart-simple-key"] = this.configuration.apiKey("x-ultracart-simple-key"); // ultraCartSimpleApiKey authentication
1607
- }
1608
- return [4 /*yield*/, this.request({
1609
- path: "/order/orders/{order_id}/refund_completely".replace("{".concat("order_id", "}"), encodeURIComponent(String(requestParameters.orderId))),
1610
- method: 'PUT',
1611
- headers: headerParameters,
1612
- query: queryParameters,
1613
- }, initOverrides)];
1614
- case 3:
1615
- response = _c.sent();
1616
- return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, models_1.OrderResponseFromJSON)(jsonValue); })];
1617
- }
1618
- });
1619
- });
1620
- };
1621
- /**
1622
- * Perform a refund operation on an order and then update the order if successful.
1623
- * Refund an order completely
1624
- */
1625
- OrderApi.prototype.refundOrderCompletely = function (requestParameters, initOverrides) {
1626
- return __awaiter(this, void 0, void 0, function () {
1627
- var response;
1628
- return __generator(this, function (_a) {
1629
- switch (_a.label) {
1630
- case 0: return [4 /*yield*/, this.refundOrderCompletelyRaw(requestParameters, initOverrides)];
1631
- case 1:
1632
- response = _a.sent();
1633
- return [4 /*yield*/, response.value()];
1634
- case 2: return [2 /*return*/, _a.sent()];
1635
- }
1636
- });
1637
- });
1638
- };
1639
1553
  /**
1640
1554
  * Create a replacement order based upon a previous order
1641
1555
  * Replacement order
@@ -1848,7 +1762,7 @@ var OrderApi = /** @class */ (function (_super) {
1848
1762
  }
1849
1763
  return [4 /*yield*/, this.request({
1850
1764
  path: "/order/orders/{order_id}/refund_unblock".replace("{".concat("order_id", "}"), encodeURIComponent(String(requestParameters.orderId))),
1851
- method: 'POST',
1765
+ method: 'GET',
1852
1766
  headers: headerParameters,
1853
1767
  query: queryParameters,
1854
1768
  }, initOverrides)];
@@ -23,14 +23,6 @@ export interface GetWebhookLogRequest {
23
23
  }
24
24
  export interface GetWebhookLogSummariesRequest {
25
25
  webhookOid: number;
26
- requestId?: string;
27
- beginDate?: string;
28
- endDate?: string;
29
- status?: string;
30
- event?: string;
31
- orderId?: string;
32
- request?: string;
33
- duration?: number;
34
26
  limit?: number;
35
27
  offset?: number;
36
28
  since?: string;
@@ -108,14 +100,6 @@ export interface WebhookApiInterface {
108
100
  * Retrieves the log summary information for a given webhook. This is useful for displaying all the various logs that can be viewed.
109
101
  * @summary Retrieve the log summaries
110
102
  * @param {number} webhookOid The webhook oid to retrieve log summaries for.
111
- * @param {string} [requestId]
112
- * @param {string} [beginDate]
113
- * @param {string} [endDate]
114
- * @param {string} [status]
115
- * @param {string} [event]
116
- * @param {string} [orderId]
117
- * @param {string} [request]
118
- * @param {number} [duration]
119
103
  * @param {number} [limit] The maximum number of records to return on this one API call.
120
104
  * @param {number} [offset] Pagination of the record set. Offset is a zero based index.
121
105
  * @param {string} [since] Fetch log summaries that have been delivered since this date/time.
@@ -269,30 +269,6 @@ var WebhookApi = /** @class */ (function (_super) {
269
269
  throw new runtime.RequiredError('webhookOid', 'Required parameter requestParameters.webhookOid was null or undefined when calling getWebhookLogSummaries.');
270
270
  }
271
271
  queryParameters = {};
272
- if (requestParameters.requestId !== undefined) {
273
- queryParameters['requestId'] = requestParameters.requestId;
274
- }
275
- if (requestParameters.beginDate !== undefined) {
276
- queryParameters['beginDate'] = requestParameters.beginDate;
277
- }
278
- if (requestParameters.endDate !== undefined) {
279
- queryParameters['endDate'] = requestParameters.endDate;
280
- }
281
- if (requestParameters.status !== undefined) {
282
- queryParameters['status'] = requestParameters.status;
283
- }
284
- if (requestParameters.event !== undefined) {
285
- queryParameters['event'] = requestParameters.event;
286
- }
287
- if (requestParameters.orderId !== undefined) {
288
- queryParameters['orderId'] = requestParameters.orderId;
289
- }
290
- if (requestParameters.request !== undefined) {
291
- queryParameters['request'] = requestParameters.request;
292
- }
293
- if (requestParameters.duration !== undefined) {
294
- queryParameters['duration'] = requestParameters.duration;
295
- }
296
272
  if (requestParameters.limit !== undefined) {
297
273
  queryParameters['_limit'] = requestParameters.limit;
298
274
  }
@@ -0,0 +1,59 @@
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
+ import { CustomReport } from './CustomReport';
13
+ import { ModelError } from './ModelError';
14
+ import { ResponseMetadata } from './ResponseMetadata';
15
+ import { Warning } from './Warning';
16
+ /**
17
+ *
18
+ * @export
19
+ * @interface CustomReportsResponse
20
+ */
21
+ export interface CustomReportsResponse {
22
+ /**
23
+ *
24
+ * @type {ModelError}
25
+ * @memberof CustomReportsResponse
26
+ */
27
+ error?: ModelError;
28
+ /**
29
+ *
30
+ * @type {ResponseMetadata}
31
+ * @memberof CustomReportsResponse
32
+ */
33
+ metadata?: ResponseMetadata;
34
+ /**
35
+ * reports
36
+ * @type {Array<CustomReport>}
37
+ * @memberof CustomReportsResponse
38
+ */
39
+ reports?: Array<CustomReport>;
40
+ /**
41
+ * Indicates if API call was successful
42
+ * @type {boolean}
43
+ * @memberof CustomReportsResponse
44
+ */
45
+ success?: boolean;
46
+ /**
47
+ *
48
+ * @type {Warning}
49
+ * @memberof CustomReportsResponse
50
+ */
51
+ warning?: Warning;
52
+ }
53
+ /**
54
+ * Check if a given object implements the CustomReportsResponse interface.
55
+ */
56
+ export declare function instanceOfCustomReportsResponse(value: object): boolean;
57
+ export declare function CustomReportsResponseFromJSON(json: any): CustomReportsResponse;
58
+ export declare function CustomReportsResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): CustomReportsResponse;
59
+ export declare function CustomReportsResponseToJSON(value?: CustomReportsResponse | null): any;
@@ -0,0 +1,62 @@
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.CustomReportsResponseToJSON = exports.CustomReportsResponseFromJSONTyped = exports.CustomReportsResponseFromJSON = exports.instanceOfCustomReportsResponse = void 0;
17
+ var runtime_1 = require("../runtime");
18
+ var CustomReport_1 = require("./CustomReport");
19
+ var ModelError_1 = require("./ModelError");
20
+ var ResponseMetadata_1 = require("./ResponseMetadata");
21
+ var Warning_1 = require("./Warning");
22
+ /**
23
+ * Check if a given object implements the CustomReportsResponse interface.
24
+ */
25
+ function instanceOfCustomReportsResponse(value) {
26
+ var isInstance = true;
27
+ return isInstance;
28
+ }
29
+ exports.instanceOfCustomReportsResponse = instanceOfCustomReportsResponse;
30
+ function CustomReportsResponseFromJSON(json) {
31
+ return CustomReportsResponseFromJSONTyped(json, false);
32
+ }
33
+ exports.CustomReportsResponseFromJSON = CustomReportsResponseFromJSON;
34
+ function CustomReportsResponseFromJSONTyped(json, ignoreDiscriminator) {
35
+ if ((json === undefined) || (json === null)) {
36
+ return json;
37
+ }
38
+ return {
39
+ 'error': !(0, runtime_1.exists)(json, 'error') ? undefined : (0, ModelError_1.ModelErrorFromJSON)(json['error']),
40
+ 'metadata': !(0, runtime_1.exists)(json, 'metadata') ? undefined : (0, ResponseMetadata_1.ResponseMetadataFromJSON)(json['metadata']),
41
+ 'reports': !(0, runtime_1.exists)(json, 'reports') ? undefined : (json['reports'].map(CustomReport_1.CustomReportFromJSON)),
42
+ 'success': !(0, runtime_1.exists)(json, 'success') ? undefined : json['success'],
43
+ 'warning': !(0, runtime_1.exists)(json, 'warning') ? undefined : (0, Warning_1.WarningFromJSON)(json['warning']),
44
+ };
45
+ }
46
+ exports.CustomReportsResponseFromJSONTyped = CustomReportsResponseFromJSONTyped;
47
+ function CustomReportsResponseToJSON(value) {
48
+ if (value === undefined) {
49
+ return undefined;
50
+ }
51
+ if (value === null) {
52
+ return null;
53
+ }
54
+ return {
55
+ 'error': (0, ModelError_1.ModelErrorToJSON)(value.error),
56
+ 'metadata': (0, ResponseMetadata_1.ResponseMetadataToJSON)(value.metadata),
57
+ 'reports': value.reports === undefined ? undefined : (value.reports.map(CustomReport_1.CustomReportToJSON)),
58
+ 'success': value.success,
59
+ 'warning': (0, Warning_1.WarningToJSON)(value.warning),
60
+ };
61
+ }
62
+ exports.CustomReportsResponseToJSON = CustomReportsResponseToJSON;
@@ -312,6 +312,7 @@ export * from './CustomReportParameterOption';
312
312
  export * from './CustomReportQuery';
313
313
  export * from './CustomReportResponse';
314
314
  export * from './CustomReportTooltip';
315
+ export * from './CustomReportsResponse';
315
316
  export * from './Customer';
316
317
  export * from './CustomerActivity';
317
318
  export * from './CustomerAffiliate';
@@ -330,6 +330,7 @@ __exportStar(require("./CustomReportParameterOption"), exports);
330
330
  __exportStar(require("./CustomReportQuery"), exports);
331
331
  __exportStar(require("./CustomReportResponse"), exports);
332
332
  __exportStar(require("./CustomReportTooltip"), exports);
333
+ __exportStar(require("./CustomReportsResponse"), exports);
333
334
  __exportStar(require("./Customer"), exports);
334
335
  __exportStar(require("./CustomerActivity"), exports);
335
336
  __exportStar(require("./CustomerAffiliate"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ultracart_rest_api_v2_typescript",
3
- "version": "4.1.15",
3
+ "version": "4.1.16",
4
4
  "description": "UltraCart Rest TypeScript SDK",
5
5
  "author": "UltraCart",
6
6
  "repository": {
@@ -30,6 +30,9 @@ import {
30
30
  CustomReportResponse,
31
31
  CustomReportResponseFromJSON,
32
32
  CustomReportResponseToJSON,
33
+ CustomReportsResponse,
34
+ CustomReportsResponseFromJSON,
35
+ CustomReportsResponseToJSON,
33
36
  ErrorResponse,
34
37
  ErrorResponseFromJSON,
35
38
  ErrorResponseToJSON,
@@ -241,6 +244,21 @@ export interface DatawarehouseApiInterface {
241
244
  */
242
245
  getCustomReportAccountConfig(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CustomReportAccountConfigResponse>;
243
246
 
247
+ /**
248
+ * Retrieve a custom reports
249
+ * @summary Get custom reports
250
+ * @param {*} [options] Override http request option.
251
+ * @throws {RequiredError}
252
+ * @memberof DatawarehouseApiInterface
253
+ */
254
+ getCustomReportsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CustomReportsResponse>>;
255
+
256
+ /**
257
+ * Retrieve a custom reports
258
+ * Get custom reports
259
+ */
260
+ getCustomReports(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CustomReportsResponse>;
261
+
244
262
  /**
245
263
  * Retrieve a report
246
264
  * @summary Get a report
@@ -702,6 +720,43 @@ export class DatawarehouseApi extends runtime.BaseAPI implements DatawarehouseAp
702
720
  return await response.value();
703
721
  }
704
722
 
723
+ /**
724
+ * Retrieve a custom reports
725
+ * Get custom reports
726
+ */
727
+ async getCustomReportsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CustomReportsResponse>> {
728
+ const queryParameters: any = {};
729
+
730
+ const headerParameters: runtime.HTTPHeaders = {};
731
+
732
+ if (this.configuration && this.configuration.accessToken) {
733
+ // oauth required
734
+ headerParameters["Authorization"] = await this.configuration.accessToken("ultraCartOauth", []);
735
+ }
736
+
737
+ if (this.configuration && this.configuration.apiKey) {
738
+ headerParameters["x-ultracart-simple-key"] = this.configuration.apiKey("x-ultracart-simple-key"); // ultraCartSimpleApiKey authentication
739
+ }
740
+
741
+ const response = await this.request({
742
+ path: `/datawarehouse/custom_reports`,
743
+ method: 'GET',
744
+ headers: headerParameters,
745
+ query: queryParameters,
746
+ }, initOverrides);
747
+
748
+ return new runtime.JSONApiResponse(response, (jsonValue) => CustomReportsResponseFromJSON(jsonValue));
749
+ }
750
+
751
+ /**
752
+ * Retrieve a custom reports
753
+ * Get custom reports
754
+ */
755
+ async getCustomReports(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CustomReportsResponse> {
756
+ const response = await this.getCustomReportsRaw(initOverrides);
757
+ return await response.value();
758
+ }
759
+
705
760
  /**
706
761
  * Retrieve a report
707
762
  * Get a report
@@ -229,19 +229,6 @@ export interface RefundOrderRequest {
229
229
  expand?: string;
230
230
  }
231
231
 
232
- export interface RefundOrderCompletelyRequest {
233
- orderId: string;
234
- rejectAfterRefund?: boolean;
235
- skipCustomerNotification?: boolean;
236
- autoOrderCancel?: boolean;
237
- manualRefund?: boolean;
238
- reverseAffiliateTransactions?: boolean;
239
- issueStoreCredit?: boolean;
240
- autoOrderCancelReason?: string;
241
- refundReason?: string;
242
- rejectReason?: string;
243
- }
244
-
245
232
  export interface ReplacementRequest {
246
233
  orderId: string;
247
234
  replacement: OrderReplacement;
@@ -687,31 +674,6 @@ export interface OrderApiInterface {
687
674
  */
688
675
  refundOrder(requestParameters: RefundOrderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OrderResponse>;
689
676
 
690
- /**
691
- * Perform a refund operation on an order and then update the order if successful.
692
- * @summary Refund an order completely
693
- * @param {string} orderId The order id to refund.
694
- * @param {boolean} [rejectAfterRefund] Reject order after refund
695
- * @param {boolean} [skipCustomerNotification] Skip customer email notification
696
- * @param {boolean} [autoOrderCancel] Cancel associated auto orders
697
- * @param {boolean} [manualRefund] Consider a manual refund done externally
698
- * @param {boolean} [reverseAffiliateTransactions] Reverse affiliate transactions
699
- * @param {boolean} [issueStoreCredit] Issue a store credit instead of refunding the original payment method, loyalty must be configured on merchant account
700
- * @param {string} [autoOrderCancelReason] Reason for auto orders cancellation
701
- * @param {string} [refundReason] Reason for refund
702
- * @param {string} [rejectReason] Reason for reject
703
- * @param {*} [options] Override http request option.
704
- * @throws {RequiredError}
705
- * @memberof OrderApiInterface
706
- */
707
- refundOrderCompletelyRaw(requestParameters: RefundOrderCompletelyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<OrderResponse>>;
708
-
709
- /**
710
- * Perform a refund operation on an order and then update the order if successful.
711
- * Refund an order completely
712
- */
713
- refundOrderCompletely(requestParameters: RefundOrderCompletelyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OrderResponse>;
714
-
715
677
  /**
716
678
  * Create a replacement order based upon a previous order
717
679
  * @summary Replacement order
@@ -907,7 +869,7 @@ export class OrderApi extends runtime.BaseAPI implements OrderApiInterface {
907
869
 
908
870
  const response = await this.request({
909
871
  path: `/order/orders/{order_id}/refund_block`.replace(`{${"order_id"}}`, encodeURIComponent(String(requestParameters.orderId))),
910
- method: 'POST',
872
+ method: 'GET',
911
873
  headers: headerParameters,
912
874
  query: queryParameters,
913
875
  }, initOverrides);
@@ -1975,83 +1937,6 @@ export class OrderApi extends runtime.BaseAPI implements OrderApiInterface {
1975
1937
  return await response.value();
1976
1938
  }
1977
1939
 
1978
- /**
1979
- * Perform a refund operation on an order and then update the order if successful.
1980
- * Refund an order completely
1981
- */
1982
- async refundOrderCompletelyRaw(requestParameters: RefundOrderCompletelyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<OrderResponse>> {
1983
- if (requestParameters.orderId === null || requestParameters.orderId === undefined) {
1984
- throw new runtime.RequiredError('orderId','Required parameter requestParameters.orderId was null or undefined when calling refundOrderCompletely.');
1985
- }
1986
-
1987
- const queryParameters: any = {};
1988
-
1989
- if (requestParameters.rejectAfterRefund !== undefined) {
1990
- queryParameters['reject_after_refund'] = requestParameters.rejectAfterRefund;
1991
- }
1992
-
1993
- if (requestParameters.skipCustomerNotification !== undefined) {
1994
- queryParameters['skip_customer_notification'] = requestParameters.skipCustomerNotification;
1995
- }
1996
-
1997
- if (requestParameters.autoOrderCancel !== undefined) {
1998
- queryParameters['auto_order_cancel'] = requestParameters.autoOrderCancel;
1999
- }
2000
-
2001
- if (requestParameters.manualRefund !== undefined) {
2002
- queryParameters['manual_refund'] = requestParameters.manualRefund;
2003
- }
2004
-
2005
- if (requestParameters.reverseAffiliateTransactions !== undefined) {
2006
- queryParameters['reverse_affiliate_transactions'] = requestParameters.reverseAffiliateTransactions;
2007
- }
2008
-
2009
- if (requestParameters.issueStoreCredit !== undefined) {
2010
- queryParameters['issue_store_credit'] = requestParameters.issueStoreCredit;
2011
- }
2012
-
2013
- if (requestParameters.autoOrderCancelReason !== undefined) {
2014
- queryParameters['auto_order_cancel_reason'] = requestParameters.autoOrderCancelReason;
2015
- }
2016
-
2017
- if (requestParameters.refundReason !== undefined) {
2018
- queryParameters['refund_reason'] = requestParameters.refundReason;
2019
- }
2020
-
2021
- if (requestParameters.rejectReason !== undefined) {
2022
- queryParameters['reject_reason'] = requestParameters.rejectReason;
2023
- }
2024
-
2025
- const headerParameters: runtime.HTTPHeaders = {};
2026
-
2027
- if (this.configuration && this.configuration.accessToken) {
2028
- // oauth required
2029
- headerParameters["Authorization"] = await this.configuration.accessToken("ultraCartOauth", ["order_write"]);
2030
- }
2031
-
2032
- if (this.configuration && this.configuration.apiKey) {
2033
- headerParameters["x-ultracart-simple-key"] = this.configuration.apiKey("x-ultracart-simple-key"); // ultraCartSimpleApiKey authentication
2034
- }
2035
-
2036
- const response = await this.request({
2037
- path: `/order/orders/{order_id}/refund_completely`.replace(`{${"order_id"}}`, encodeURIComponent(String(requestParameters.orderId))),
2038
- method: 'PUT',
2039
- headers: headerParameters,
2040
- query: queryParameters,
2041
- }, initOverrides);
2042
-
2043
- return new runtime.JSONApiResponse(response, (jsonValue) => OrderResponseFromJSON(jsonValue));
2044
- }
2045
-
2046
- /**
2047
- * Perform a refund operation on an order and then update the order if successful.
2048
- * Refund an order completely
2049
- */
2050
- async refundOrderCompletely(requestParameters: RefundOrderCompletelyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OrderResponse> {
2051
- const response = await this.refundOrderCompletelyRaw(requestParameters, initOverrides);
2052
- return await response.value();
2053
- }
2054
-
2055
1940
  /**
2056
1941
  * Create a replacement order based upon a previous order
2057
1942
  * Replacement order
@@ -2206,7 +2091,7 @@ export class OrderApi extends runtime.BaseAPI implements OrderApiInterface {
2206
2091
 
2207
2092
  const response = await this.request({
2208
2093
  path: `/order/orders/{order_id}/refund_unblock`.replace(`{${"order_id"}}`, encodeURIComponent(String(requestParameters.orderId))),
2209
- method: 'POST',
2094
+ method: 'GET',
2210
2095
  headers: headerParameters,
2211
2096
  query: queryParameters,
2212
2097
  }, initOverrides);
@@ -53,14 +53,6 @@ export interface GetWebhookLogRequest {
53
53
 
54
54
  export interface GetWebhookLogSummariesRequest {
55
55
  webhookOid: number;
56
- requestId?: string;
57
- beginDate?: string;
58
- endDate?: string;
59
- status?: string;
60
- event?: string;
61
- orderId?: string;
62
- request?: string;
63
- duration?: number;
64
56
  limit?: number;
65
57
  offset?: number;
66
58
  since?: string;
@@ -149,14 +141,6 @@ export interface WebhookApiInterface {
149
141
  * Retrieves the log summary information for a given webhook. This is useful for displaying all the various logs that can be viewed.
150
142
  * @summary Retrieve the log summaries
151
143
  * @param {number} webhookOid The webhook oid to retrieve log summaries for.
152
- * @param {string} [requestId]
153
- * @param {string} [beginDate]
154
- * @param {string} [endDate]
155
- * @param {string} [status]
156
- * @param {string} [event]
157
- * @param {string} [orderId]
158
- * @param {string} [request]
159
- * @param {number} [duration]
160
144
  * @param {number} [limit] The maximum number of records to return on this one API call.
161
145
  * @param {number} [offset] Pagination of the record set. Offset is a zero based index.
162
146
  * @param {string} [since] Fetch log summaries that have been delivered since this date/time.
@@ -390,38 +374,6 @@ export class WebhookApi extends runtime.BaseAPI implements WebhookApiInterface {
390
374
 
391
375
  const queryParameters: any = {};
392
376
 
393
- if (requestParameters.requestId !== undefined) {
394
- queryParameters['requestId'] = requestParameters.requestId;
395
- }
396
-
397
- if (requestParameters.beginDate !== undefined) {
398
- queryParameters['beginDate'] = requestParameters.beginDate;
399
- }
400
-
401
- if (requestParameters.endDate !== undefined) {
402
- queryParameters['endDate'] = requestParameters.endDate;
403
- }
404
-
405
- if (requestParameters.status !== undefined) {
406
- queryParameters['status'] = requestParameters.status;
407
- }
408
-
409
- if (requestParameters.event !== undefined) {
410
- queryParameters['event'] = requestParameters.event;
411
- }
412
-
413
- if (requestParameters.orderId !== undefined) {
414
- queryParameters['orderId'] = requestParameters.orderId;
415
- }
416
-
417
- if (requestParameters.request !== undefined) {
418
- queryParameters['request'] = requestParameters.request;
419
- }
420
-
421
- if (requestParameters.duration !== undefined) {
422
- queryParameters['duration'] = requestParameters.duration;
423
- }
424
-
425
377
  if (requestParameters.limit !== undefined) {
426
378
  queryParameters['_limit'] = requestParameters.limit;
427
379
  }
@@ -0,0 +1,124 @@
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
+ import {
17
+ CustomReport,
18
+ CustomReportFromJSON,
19
+ CustomReportFromJSONTyped,
20
+ CustomReportToJSON,
21
+ } from './CustomReport';
22
+ import {
23
+ ModelError,
24
+ ModelErrorFromJSON,
25
+ ModelErrorFromJSONTyped,
26
+ ModelErrorToJSON,
27
+ } from './ModelError';
28
+ import {
29
+ ResponseMetadata,
30
+ ResponseMetadataFromJSON,
31
+ ResponseMetadataFromJSONTyped,
32
+ ResponseMetadataToJSON,
33
+ } from './ResponseMetadata';
34
+ import {
35
+ Warning,
36
+ WarningFromJSON,
37
+ WarningFromJSONTyped,
38
+ WarningToJSON,
39
+ } from './Warning';
40
+
41
+ /**
42
+ *
43
+ * @export
44
+ * @interface CustomReportsResponse
45
+ */
46
+ export interface CustomReportsResponse {
47
+ /**
48
+ *
49
+ * @type {ModelError}
50
+ * @memberof CustomReportsResponse
51
+ */
52
+ error?: ModelError;
53
+ /**
54
+ *
55
+ * @type {ResponseMetadata}
56
+ * @memberof CustomReportsResponse
57
+ */
58
+ metadata?: ResponseMetadata;
59
+ /**
60
+ * reports
61
+ * @type {Array<CustomReport>}
62
+ * @memberof CustomReportsResponse
63
+ */
64
+ reports?: Array<CustomReport>;
65
+ /**
66
+ * Indicates if API call was successful
67
+ * @type {boolean}
68
+ * @memberof CustomReportsResponse
69
+ */
70
+ success?: boolean;
71
+ /**
72
+ *
73
+ * @type {Warning}
74
+ * @memberof CustomReportsResponse
75
+ */
76
+ warning?: Warning;
77
+ }
78
+
79
+
80
+
81
+ /**
82
+ * Check if a given object implements the CustomReportsResponse interface.
83
+ */
84
+ export function instanceOfCustomReportsResponse(value: object): boolean {
85
+ let isInstance = true;
86
+
87
+ return isInstance;
88
+ }
89
+
90
+ export function CustomReportsResponseFromJSON(json: any): CustomReportsResponse {
91
+ return CustomReportsResponseFromJSONTyped(json, false);
92
+ }
93
+
94
+ export function CustomReportsResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): CustomReportsResponse {
95
+ if ((json === undefined) || (json === null)) {
96
+ return json;
97
+ }
98
+ return {
99
+
100
+ 'error': !exists(json, 'error') ? undefined : ModelErrorFromJSON(json['error']),
101
+ 'metadata': !exists(json, 'metadata') ? undefined : ResponseMetadataFromJSON(json['metadata']),
102
+ 'reports': !exists(json, 'reports') ? undefined : ((json['reports'] as Array<any>).map(CustomReportFromJSON)),
103
+ 'success': !exists(json, 'success') ? undefined : json['success'],
104
+ 'warning': !exists(json, 'warning') ? undefined : WarningFromJSON(json['warning']),
105
+ };
106
+ }
107
+
108
+ export function CustomReportsResponseToJSON(value?: CustomReportsResponse | null): any {
109
+ if (value === undefined) {
110
+ return undefined;
111
+ }
112
+ if (value === null) {
113
+ return null;
114
+ }
115
+ return {
116
+
117
+ 'error': ModelErrorToJSON(value.error),
118
+ 'metadata': ResponseMetadataToJSON(value.metadata),
119
+ 'reports': value.reports === undefined ? undefined : ((value.reports as Array<any>).map(CustomReportToJSON)),
120
+ 'success': value.success,
121
+ 'warning': WarningToJSON(value.warning),
122
+ };
123
+ }
124
+
@@ -314,6 +314,7 @@ export * from './CustomReportParameterOption';
314
314
  export * from './CustomReportQuery';
315
315
  export * from './CustomReportResponse';
316
316
  export * from './CustomReportTooltip';
317
+ export * from './CustomReportsResponse';
317
318
  export * from './Customer';
318
319
  export * from './CustomerActivity';
319
320
  export * from './CustomerAffiliate';