ultracart_rest_api_v2_typescript 4.1.193 → 4.1.195

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.
@@ -1154,6 +1154,8 @@ src/models/SfvbTemplateResolveCandidate.ts
1154
1154
  src/models/SfvbTemplateResolvePath.ts
1155
1155
  src/models/SfvbTemplateResolveResponse.ts
1156
1156
  src/models/SfvbTemplatesResponse.ts
1157
+ src/models/SfvbTestOrder.ts
1158
+ src/models/SfvbTestOrdersResponse.ts
1157
1159
  src/models/SfvbTheme.ts
1158
1160
  src/models/SfvbThemeAttribute.ts
1159
1161
  src/models/SfvbThemeAttributeUpdate.ts
package/README.md CHANGED
@@ -1,12 +1,12 @@
1
1
  # UltraCart Typescript SDK
2
- ## ultracart_rest_api_v2_typescript@4.1.193
2
+ ## ultracart_rest_api_v2_typescript@4.1.195
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.193 --save
9
+ npm install ultracart_rest_api_v2_typescript@4.1.195 --save
10
10
  ```
11
11
 
12
12
  ```typescript
@@ -84,6 +84,8 @@ Not every change is committed to every SDK.
84
84
 
85
85
  | Version | Date | Comments |
86
86
  | --: | :-: | --- |
87
+ | 4.1.195 | 10/07/2026 | sfvb internal testing |
88
+ | 4.1.194 | 10/07/2026 | sfvb internal testing |
87
89
  | 4.1.193 | 10/06/2026 | sfvb internal testing |
88
90
  | 4.1.192 | 10/06/2026 | sfvb internal testing |
89
91
  | 4.1.191 | 10/06/2026 | sfvb internal testing |
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import { SfvbBlogPostDetail, SfvbBlogPostImageRequest, SfvbBlogPostRequest, SfvbBlogPostsResponse, SfvbCompileRequest, SfvbCompileResponse, SfvbContainerResponse, SfvbContainerRevertRequest, SfvbContainerVersion, SfvbContainerVersionsResponse, SfvbContainerWriteRequest, SfvbElementSchemaResponse, SfvbElementsResponse, SfvbExperiment, SfvbExperimentEndRequest, SfvbExperimentObjectivesResponse, SfvbExperimentStartRequest, SfvbExperimentVariationUpdateRequest, SfvbExperimentsResponse, SfvbFileContentResponse, SfvbFileRevertRequest, SfvbFileSearchRequest, SfvbFileSearchResponse, SfvbFileUploadRequest, SfvbFileUploadUrlResponse, SfvbFileVersionsResponse, SfvbFileWriteRequest, SfvbFileWriteResponse, SfvbFilesResponse, SfvbI18nGlossary, SfvbI18nGlossaryRequest, SfvbI18nLanguageEnableRequest, SfvbI18nLanguagesResponse, SfvbI18nMachineTranslationsResponse, SfvbI18nMessage, SfvbI18nMessageWriteRequest, SfvbI18nMessagesResponse, SfvbI18nResetResponse, SfvbItemAttributeUpdateRequest, SfvbItemContainersResponse, SfvbItemContentRequest, SfvbItemMultimediaRequest, SfvbItemResponse, SfvbItemSeoRequest, SfvbLibraryDeleteResult, SfvbLibraryEntry, SfvbLibraryEntryRequest, SfvbLibraryHistoryResponse, SfvbLibraryInstallReceipt, SfvbLibraryInstallRequest, SfvbLibraryInstallsResponse, SfvbLibraryPublishRequest, SfvbLibraryResponse, SfvbLibraryScreenshotRequest, SfvbLibraryShareRequest, SfvbLibraryShareTargetsResponse, SfvbLibraryTaxonomyCatalog, SfvbLibraryUnshareResult, SfvbMenu, SfvbMenuWriteRequest, SfvbMenusResponse, SfvbNotFoundEntry, SfvbNotFoundEntryResponse, SfvbNotFoundPage, SfvbNotFoundResponse, SfvbPageAttributeUpdateRequest, SfvbPageBlogPostsRequest, SfvbPageBlogPostsResponse, SfvbPageCreateRequest, SfvbPageDuplicateRequest, SfvbPageItemsAddRequest, SfvbPageItemsRemoveRequest, SfvbPageItemsResponse, SfvbPageListResponse, SfvbPageMultimediaRequest, SfvbPageRefreshRequest, SfvbPageRefreshResponse, SfvbPageResponse, SfvbPageSelectors, SfvbPageSettingsRequest, SfvbPreviewAccessRequest, SfvbPreviewAccessResponse, SfvbPreviewSessionRequest, SfvbPreviewSessionResponse, SfvbPreviewUrlResponse, SfvbRecordingEventsResponse, SfvbRecordingResponse, SfvbRecordingSettingsRequest, SfvbRecordingSettingsResponse, SfvbRedirect, SfvbRedirectCheckResponse, SfvbRedirectImportRequest, SfvbRedirectImportResponse, SfvbRedirectRequest, SfvbRedirectResolveResponse, SfvbRedirectResponse, SfvbRedirectsResponse, SfvbRenderRequest, SfvbRenderResponse, SfvbServerLogDetail, SfvbServerLogsResponse, SfvbSiteAttributeUpdateRequest, SfvbSiteAttributesResponse, SfvbStorefrontsResponse, SfvbTemplateResolveResponse, SfvbTemplatesResponse, SfvbTheme, SfvbThemeAttributeUpdateRequest, SfvbThemeAttributesResponse, SfvbThemeDuplicateRequest, SfvbThemeJobResponse, SfvbThemesResponse, SfvbUpsellOffer, SfvbUpsellOffersResponse, SfvbUpsellPath, SfvbUpsellPathDuplicateRequest, SfvbUpsellPathMoveRequest, SfvbUpsellPathsResponse, SfvbValidateRequest, SfvbValidationResponse, SfvbVelocityValidateRequest, SfvbVersionResponse, SfvbWhoamiResponse, SfvbWidgetIdsResponse } from '../models';
13
+ import { SfvbBlogPostDetail, SfvbBlogPostImageRequest, SfvbBlogPostRequest, SfvbBlogPostsResponse, SfvbCompileRequest, SfvbCompileResponse, SfvbContainerResponse, SfvbContainerRevertRequest, SfvbContainerVersion, SfvbContainerVersionsResponse, SfvbContainerWriteRequest, SfvbElementSchemaResponse, SfvbElementsResponse, SfvbExperiment, SfvbExperimentEndRequest, SfvbExperimentObjectivesResponse, SfvbExperimentStartRequest, SfvbExperimentVariationUpdateRequest, SfvbExperimentsResponse, SfvbFileContentResponse, SfvbFileRevertRequest, SfvbFileSearchRequest, SfvbFileSearchResponse, SfvbFileUploadRequest, SfvbFileUploadUrlResponse, SfvbFileVersionsResponse, SfvbFileWriteRequest, SfvbFileWriteResponse, SfvbFilesResponse, SfvbI18nGlossary, SfvbI18nGlossaryRequest, SfvbI18nLanguageEnableRequest, SfvbI18nLanguagesResponse, SfvbI18nMachineTranslationsResponse, SfvbI18nMessage, SfvbI18nMessageWriteRequest, SfvbI18nMessagesResponse, SfvbI18nResetResponse, SfvbItemAttributeUpdateRequest, SfvbItemContainersResponse, SfvbItemContentRequest, SfvbItemMultimediaRequest, SfvbItemResponse, SfvbItemSeoRequest, SfvbLibraryDeleteResult, SfvbLibraryEntry, SfvbLibraryEntryRequest, SfvbLibraryHistoryResponse, SfvbLibraryInstallReceipt, SfvbLibraryInstallRequest, SfvbLibraryInstallsResponse, SfvbLibraryPublishRequest, SfvbLibraryResponse, SfvbLibraryScreenshotRequest, SfvbLibraryShareRequest, SfvbLibraryShareTargetsResponse, SfvbLibraryTaxonomyCatalog, SfvbLibraryUnshareResult, SfvbMenu, SfvbMenuWriteRequest, SfvbMenusResponse, SfvbNotFoundEntry, SfvbNotFoundEntryResponse, SfvbNotFoundPage, SfvbNotFoundResponse, SfvbPageAttributeUpdateRequest, SfvbPageBlogPostsRequest, SfvbPageBlogPostsResponse, SfvbPageCreateRequest, SfvbPageDuplicateRequest, SfvbPageItemsAddRequest, SfvbPageItemsRemoveRequest, SfvbPageItemsResponse, SfvbPageListResponse, SfvbPageMultimediaRequest, SfvbPageRefreshRequest, SfvbPageRefreshResponse, SfvbPageResponse, SfvbPageSelectors, SfvbPageSettingsRequest, SfvbPreviewAccessRequest, SfvbPreviewAccessResponse, SfvbPreviewSessionRequest, SfvbPreviewSessionResponse, SfvbPreviewUrlResponse, SfvbRecordingEventsResponse, SfvbRecordingResponse, SfvbRecordingSettingsRequest, SfvbRecordingSettingsResponse, SfvbRedirect, SfvbRedirectCheckResponse, SfvbRedirectImportRequest, SfvbRedirectImportResponse, SfvbRedirectRequest, SfvbRedirectResolveResponse, SfvbRedirectResponse, SfvbRedirectsResponse, SfvbRenderRequest, SfvbRenderResponse, SfvbServerLogDetail, SfvbServerLogsResponse, SfvbSiteAttributeUpdateRequest, SfvbSiteAttributesResponse, SfvbStorefrontsResponse, SfvbTemplateResolveResponse, SfvbTemplatesResponse, SfvbTestOrdersResponse, SfvbTheme, SfvbThemeAttributeUpdateRequest, SfvbThemeAttributesResponse, SfvbThemeDuplicateRequest, SfvbThemeJobResponse, SfvbThemesResponse, SfvbUpsellOffer, SfvbUpsellOffersResponse, SfvbUpsellPath, SfvbUpsellPathDuplicateRequest, SfvbUpsellPathMoveRequest, SfvbUpsellPathsResponse, SfvbValidateRequest, SfvbValidationResponse, SfvbVelocityValidateRequest, SfvbVersionResponse, SfvbWhoamiResponse, SfvbWidgetIdsResponse } from '../models';
14
14
  export interface AddSfvbPageBlogPostsRequest {
15
15
  storefrontOid: number;
16
16
  path: string;
@@ -316,6 +316,12 @@ export interface GetSfvbServerLogRequest {
316
316
  export interface GetSfvbSiteAttributesRequest {
317
317
  storefrontOid: number;
318
318
  }
319
+ export interface GetSfvbTestOrdersRequest {
320
+ storefrontOid: number;
321
+ limit?: number;
322
+ digitalItems?: boolean;
323
+ autoOrder?: boolean;
324
+ }
319
325
  export interface GetSfvbThemeRequest {
320
326
  storefrontOid: number;
321
327
  themeOid: number;
@@ -1775,6 +1781,23 @@ export interface SfvbApiInterface {
1775
1781
  * Read a storefront\'s site attributes
1776
1782
  */
1777
1783
  getSfvbSiteAttributes(requestParameters: GetSfvbSiteAttributesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbSiteAttributesResponse>;
1784
+ /**
1785
+ * Test orders on this account only, newest first, with no customer details, so an agent can render the order pages (receipt, order tracking, digital downloads, auto order pages) with one. Use an order_id as a render\'s context_order_id; a real customer\'s order is refused there. The last 7 days are searched, widening to 30 and then 90 until enough are found. digital_items and auto_order keep only orders with downloads or an auto order. limit is 1 to 25, default 10.
1786
+ * @summary List recent test orders
1787
+ * @param {number} storefrontOid
1788
+ * @param {number} [limit]
1789
+ * @param {boolean} [digitalItems]
1790
+ * @param {boolean} [autoOrder]
1791
+ * @param {*} [options] Override http request option.
1792
+ * @throws {RequiredError}
1793
+ * @memberof SfvbApiInterface
1794
+ */
1795
+ getSfvbTestOrdersRaw(requestParameters: GetSfvbTestOrdersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SfvbTestOrdersResponse>>;
1796
+ /**
1797
+ * Test orders on this account only, newest first, with no customer details, so an agent can render the order pages (receipt, order tracking, digital downloads, auto order pages) with one. Use an order_id as a render\'s context_order_id; a real customer\'s order is refused there. The last 7 days are searched, widening to 30 and then 90 until enough are found. digital_items and auto_order keep only orders with downloads or an auto order. limit is 1 to 25, default 10.
1798
+ * List recent test orders
1799
+ */
1800
+ getSfvbTestOrders(requestParameters: GetSfvbTestOrdersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbTestOrdersResponse>;
1778
1801
  /**
1779
1802
  *
1780
1803
  * @summary Get a theme
@@ -3733,6 +3756,16 @@ export declare class SfvbApi extends runtime.BaseAPI implements SfvbApiInterface
3733
3756
  * Read a storefront\'s site attributes
3734
3757
  */
3735
3758
  getSfvbSiteAttributes(requestParameters: GetSfvbSiteAttributesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbSiteAttributesResponse>;
3759
+ /**
3760
+ * Test orders on this account only, newest first, with no customer details, so an agent can render the order pages (receipt, order tracking, digital downloads, auto order pages) with one. Use an order_id as a render\'s context_order_id; a real customer\'s order is refused there. The last 7 days are searched, widening to 30 and then 90 until enough are found. digital_items and auto_order keep only orders with downloads or an auto order. limit is 1 to 25, default 10.
3761
+ * List recent test orders
3762
+ */
3763
+ getSfvbTestOrdersRaw(requestParameters: GetSfvbTestOrdersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SfvbTestOrdersResponse>>;
3764
+ /**
3765
+ * Test orders on this account only, newest first, with no customer details, so an agent can render the order pages (receipt, order tracking, digital downloads, auto order pages) with one. Use an order_id as a render\'s context_order_id; a real customer\'s order is refused there. The last 7 days are searched, widening to 30 and then 90 until enough are found. digital_items and auto_order keep only orders with downloads or an auto order. limit is 1 to 25, default 10.
3766
+ * List recent test orders
3767
+ */
3768
+ getSfvbTestOrders(requestParameters: GetSfvbTestOrdersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbTestOrdersResponse>;
3736
3769
  /**
3737
3770
  * Get a theme
3738
3771
  */
@@ -4439,6 +4439,74 @@ var SfvbApi = /** @class */ (function (_super) {
4439
4439
  });
4440
4440
  });
4441
4441
  };
4442
+ /**
4443
+ * Test orders on this account only, newest first, with no customer details, so an agent can render the order pages (receipt, order tracking, digital downloads, auto order pages) with one. Use an order_id as a render\'s context_order_id; a real customer\'s order is refused there. The last 7 days are searched, widening to 30 and then 90 until enough are found. digital_items and auto_order keep only orders with downloads or an auto order. limit is 1 to 25, default 10.
4444
+ * List recent test orders
4445
+ */
4446
+ SfvbApi.prototype.getSfvbTestOrdersRaw = function (requestParameters, initOverrides) {
4447
+ return __awaiter(this, void 0, void 0, function () {
4448
+ var queryParameters, headerParameters, _a, _b, response;
4449
+ return __generator(this, function (_c) {
4450
+ switch (_c.label) {
4451
+ case 0:
4452
+ if (requestParameters.storefrontOid === null || requestParameters.storefrontOid === undefined) {
4453
+ throw new runtime.RequiredError('storefrontOid', 'Required parameter requestParameters.storefrontOid was null or undefined when calling getSfvbTestOrders.');
4454
+ }
4455
+ queryParameters = {};
4456
+ if (requestParameters.limit !== undefined) {
4457
+ queryParameters['limit'] = requestParameters.limit;
4458
+ }
4459
+ if (requestParameters.digitalItems !== undefined) {
4460
+ queryParameters['digital_items'] = requestParameters.digitalItems;
4461
+ }
4462
+ if (requestParameters.autoOrder !== undefined) {
4463
+ queryParameters['auto_order'] = requestParameters.autoOrder;
4464
+ }
4465
+ headerParameters = {};
4466
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
4467
+ // oauth required
4468
+ _a = headerParameters;
4469
+ _b = "Authorization";
4470
+ return [4 /*yield*/, this.configuration.accessToken("ultraCartOauth", [])];
4471
+ case 1:
4472
+ // oauth required
4473
+ _a[_b] = _c.sent();
4474
+ _c.label = 2;
4475
+ case 2:
4476
+ if (this.configuration && this.configuration.apiKey) {
4477
+ headerParameters["x-ultracart-simple-key"] = this.configuration.apiKey("x-ultracart-simple-key"); // ultraCartSimpleApiKey authentication
4478
+ }
4479
+ return [4 /*yield*/, this.request({
4480
+ path: "/sfvb/storefronts/{storefront_oid}/test_orders".replace("{".concat("storefront_oid", "}"), encodeURIComponent(String(requestParameters.storefrontOid))),
4481
+ method: 'GET',
4482
+ headers: headerParameters,
4483
+ query: queryParameters,
4484
+ }, initOverrides)];
4485
+ case 3:
4486
+ response = _c.sent();
4487
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, models_1.SfvbTestOrdersResponseFromJSON)(jsonValue); })];
4488
+ }
4489
+ });
4490
+ });
4491
+ };
4492
+ /**
4493
+ * Test orders on this account only, newest first, with no customer details, so an agent can render the order pages (receipt, order tracking, digital downloads, auto order pages) with one. Use an order_id as a render\'s context_order_id; a real customer\'s order is refused there. The last 7 days are searched, widening to 30 and then 90 until enough are found. digital_items and auto_order keep only orders with downloads or an auto order. limit is 1 to 25, default 10.
4494
+ * List recent test orders
4495
+ */
4496
+ SfvbApi.prototype.getSfvbTestOrders = function (requestParameters, initOverrides) {
4497
+ return __awaiter(this, void 0, void 0, function () {
4498
+ var response;
4499
+ return __generator(this, function (_a) {
4500
+ switch (_a.label) {
4501
+ case 0: return [4 /*yield*/, this.getSfvbTestOrdersRaw(requestParameters, initOverrides)];
4502
+ case 1:
4503
+ response = _a.sent();
4504
+ return [4 /*yield*/, response.value()];
4505
+ case 2: return [2 /*return*/, _a.sent()];
4506
+ }
4507
+ });
4508
+ });
4509
+ };
4442
4510
  /**
4443
4511
  * Get a theme
4444
4512
  */
@@ -0,0 +1,79 @@
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 SfvbTestOrder
16
+ */
17
+ export interface SfvbTestOrder {
18
+ /**
19
+ * True when the order started an auto order, for working on the subscription pages.
20
+ * @type {boolean}
21
+ * @memberof SfvbTestOrder
22
+ */
23
+ auto_order?: boolean;
24
+ /**
25
+ * When the order was placed, ISO-8601 in UTC.
26
+ * @type {string}
27
+ * @memberof SfvbTestOrder
28
+ */
29
+ created?: string;
30
+ /**
31
+ * The currency of the total.
32
+ * @type {string}
33
+ * @memberof SfvbTestOrder
34
+ */
35
+ currency_code?: string;
36
+ /**
37
+ * True when the order has digital downloads, for working on the digital download page.
38
+ * @type {boolean}
39
+ * @memberof SfvbTestOrder
40
+ */
41
+ digital_items?: boolean;
42
+ /**
43
+ * How many item lines the order has.
44
+ * @type {number}
45
+ * @memberof SfvbTestOrder
46
+ */
47
+ item_count?: number;
48
+ /**
49
+ * The order id. Pass it as a render's context_order_id.
50
+ * @type {string}
51
+ * @memberof SfvbTestOrder
52
+ */
53
+ order_id?: string;
54
+ /**
55
+ * How the order was paid, such as Credit Card or PayPal.
56
+ * @type {string}
57
+ * @memberof SfvbTestOrder
58
+ */
59
+ payment_method?: string;
60
+ /**
61
+ * The order's current stage code, such as CO (completed), SD (shipping department) or AR (accounts receivable).
62
+ * @type {string}
63
+ * @memberof SfvbTestOrder
64
+ */
65
+ stage?: string;
66
+ /**
67
+ * The order total as a decimal string.
68
+ * @type {string}
69
+ * @memberof SfvbTestOrder
70
+ */
71
+ total?: string;
72
+ }
73
+ /**
74
+ * Check if a given object implements the SfvbTestOrder interface.
75
+ */
76
+ export declare function instanceOfSfvbTestOrder(value: object): boolean;
77
+ export declare function SfvbTestOrderFromJSON(json: any): SfvbTestOrder;
78
+ export declare function SfvbTestOrderFromJSONTyped(json: any, ignoreDiscriminator: boolean): SfvbTestOrder;
79
+ export declare function SfvbTestOrderToJSON(value?: SfvbTestOrder | null): any;
@@ -0,0 +1,66 @@
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.SfvbTestOrderToJSON = exports.SfvbTestOrderFromJSONTyped = exports.SfvbTestOrderFromJSON = exports.instanceOfSfvbTestOrder = void 0;
17
+ var runtime_1 = require("../runtime");
18
+ /**
19
+ * Check if a given object implements the SfvbTestOrder interface.
20
+ */
21
+ function instanceOfSfvbTestOrder(value) {
22
+ var isInstance = true;
23
+ return isInstance;
24
+ }
25
+ exports.instanceOfSfvbTestOrder = instanceOfSfvbTestOrder;
26
+ function SfvbTestOrderFromJSON(json) {
27
+ return SfvbTestOrderFromJSONTyped(json, false);
28
+ }
29
+ exports.SfvbTestOrderFromJSON = SfvbTestOrderFromJSON;
30
+ function SfvbTestOrderFromJSONTyped(json, ignoreDiscriminator) {
31
+ if ((json === undefined) || (json === null)) {
32
+ return json;
33
+ }
34
+ return {
35
+ 'auto_order': !(0, runtime_1.exists)(json, 'auto_order') ? undefined : json['auto_order'],
36
+ 'created': !(0, runtime_1.exists)(json, 'created') ? undefined : json['created'],
37
+ 'currency_code': !(0, runtime_1.exists)(json, 'currency_code') ? undefined : json['currency_code'],
38
+ 'digital_items': !(0, runtime_1.exists)(json, 'digital_items') ? undefined : json['digital_items'],
39
+ 'item_count': !(0, runtime_1.exists)(json, 'item_count') ? undefined : json['item_count'],
40
+ 'order_id': !(0, runtime_1.exists)(json, 'order_id') ? undefined : json['order_id'],
41
+ 'payment_method': !(0, runtime_1.exists)(json, 'payment_method') ? undefined : json['payment_method'],
42
+ 'stage': !(0, runtime_1.exists)(json, 'stage') ? undefined : json['stage'],
43
+ 'total': !(0, runtime_1.exists)(json, 'total') ? undefined : json['total'],
44
+ };
45
+ }
46
+ exports.SfvbTestOrderFromJSONTyped = SfvbTestOrderFromJSONTyped;
47
+ function SfvbTestOrderToJSON(value) {
48
+ if (value === undefined) {
49
+ return undefined;
50
+ }
51
+ if (value === null) {
52
+ return null;
53
+ }
54
+ return {
55
+ 'auto_order': value.auto_order,
56
+ 'created': value.created,
57
+ 'currency_code': value.currency_code,
58
+ 'digital_items': value.digital_items,
59
+ 'item_count': value.item_count,
60
+ 'order_id': value.order_id,
61
+ 'payment_method': value.payment_method,
62
+ 'stage': value.stage,
63
+ 'total': value.total,
64
+ };
65
+ }
66
+ exports.SfvbTestOrderToJSON = SfvbTestOrderToJSON;
@@ -0,0 +1,38 @@
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 { SfvbTestOrder } from './SfvbTestOrder';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface SfvbTestOrdersResponse
17
+ */
18
+ export interface SfvbTestOrdersResponse {
19
+ /**
20
+ * Present when nothing matched.
21
+ * @type {string}
22
+ * @memberof SfvbTestOrdersResponse
23
+ */
24
+ hint?: string;
25
+ /**
26
+ * Test orders, newest first. Only orders marked as test orders are ever listed.
27
+ * @type {Array<SfvbTestOrder>}
28
+ * @memberof SfvbTestOrdersResponse
29
+ */
30
+ test_orders?: Array<SfvbTestOrder>;
31
+ }
32
+ /**
33
+ * Check if a given object implements the SfvbTestOrdersResponse interface.
34
+ */
35
+ export declare function instanceOfSfvbTestOrdersResponse(value: object): boolean;
36
+ export declare function SfvbTestOrdersResponseFromJSON(json: any): SfvbTestOrdersResponse;
37
+ export declare function SfvbTestOrdersResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): SfvbTestOrdersResponse;
38
+ export declare function SfvbTestOrdersResponseToJSON(value?: SfvbTestOrdersResponse | null): any;
@@ -0,0 +1,53 @@
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.SfvbTestOrdersResponseToJSON = exports.SfvbTestOrdersResponseFromJSONTyped = exports.SfvbTestOrdersResponseFromJSON = exports.instanceOfSfvbTestOrdersResponse = void 0;
17
+ var runtime_1 = require("../runtime");
18
+ var SfvbTestOrder_1 = require("./SfvbTestOrder");
19
+ /**
20
+ * Check if a given object implements the SfvbTestOrdersResponse interface.
21
+ */
22
+ function instanceOfSfvbTestOrdersResponse(value) {
23
+ var isInstance = true;
24
+ return isInstance;
25
+ }
26
+ exports.instanceOfSfvbTestOrdersResponse = instanceOfSfvbTestOrdersResponse;
27
+ function SfvbTestOrdersResponseFromJSON(json) {
28
+ return SfvbTestOrdersResponseFromJSONTyped(json, false);
29
+ }
30
+ exports.SfvbTestOrdersResponseFromJSON = SfvbTestOrdersResponseFromJSON;
31
+ function SfvbTestOrdersResponseFromJSONTyped(json, ignoreDiscriminator) {
32
+ if ((json === undefined) || (json === null)) {
33
+ return json;
34
+ }
35
+ return {
36
+ 'hint': !(0, runtime_1.exists)(json, 'hint') ? undefined : json['hint'],
37
+ 'test_orders': !(0, runtime_1.exists)(json, 'test_orders') ? undefined : (json['test_orders'].map(SfvbTestOrder_1.SfvbTestOrderFromJSON)),
38
+ };
39
+ }
40
+ exports.SfvbTestOrdersResponseFromJSONTyped = SfvbTestOrdersResponseFromJSONTyped;
41
+ function SfvbTestOrdersResponseToJSON(value) {
42
+ if (value === undefined) {
43
+ return undefined;
44
+ }
45
+ if (value === null) {
46
+ return null;
47
+ }
48
+ return {
49
+ 'hint': value.hint,
50
+ 'test_orders': value.test_orders === undefined ? undefined : (value.test_orders.map(SfvbTestOrder_1.SfvbTestOrderToJSON)),
51
+ };
52
+ }
53
+ exports.SfvbTestOrdersResponseToJSON = SfvbTestOrdersResponseToJSON;
@@ -1124,6 +1124,8 @@ export * from './SfvbTemplateResolveCandidate';
1124
1124
  export * from './SfvbTemplateResolvePath';
1125
1125
  export * from './SfvbTemplateResolveResponse';
1126
1126
  export * from './SfvbTemplatesResponse';
1127
+ export * from './SfvbTestOrder';
1128
+ export * from './SfvbTestOrdersResponse';
1127
1129
  export * from './SfvbTheme';
1128
1130
  export * from './SfvbThemeAttribute';
1129
1131
  export * from './SfvbThemeAttributeUpdate';
@@ -1142,6 +1142,8 @@ __exportStar(require("./SfvbTemplateResolveCandidate"), exports);
1142
1142
  __exportStar(require("./SfvbTemplateResolvePath"), exports);
1143
1143
  __exportStar(require("./SfvbTemplateResolveResponse"), exports);
1144
1144
  __exportStar(require("./SfvbTemplatesResponse"), exports);
1145
+ __exportStar(require("./SfvbTestOrder"), exports);
1146
+ __exportStar(require("./SfvbTestOrdersResponse"), exports);
1145
1147
  __exportStar(require("./SfvbTheme"), exports);
1146
1148
  __exportStar(require("./SfvbThemeAttribute"), exports);
1147
1149
  __exportStar(require("./SfvbThemeAttributeUpdate"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ultracart_rest_api_v2_typescript",
3
- "version": "4.1.193",
3
+ "version": "4.1.195",
4
4
  "description": "UltraCart Rest TypeScript SDK",
5
5
  "author": "UltraCart",
6
6
  "repository": {
@@ -336,6 +336,9 @@ import {
336
336
  SfvbTemplatesResponse,
337
337
  SfvbTemplatesResponseFromJSON,
338
338
  SfvbTemplatesResponseToJSON,
339
+ SfvbTestOrdersResponse,
340
+ SfvbTestOrdersResponseFromJSON,
341
+ SfvbTestOrdersResponseToJSON,
339
342
  SfvbTheme,
340
343
  SfvbThemeFromJSON,
341
344
  SfvbThemeToJSON,
@@ -765,6 +768,13 @@ export interface GetSfvbSiteAttributesRequest {
765
768
  storefrontOid: number;
766
769
  }
767
770
 
771
+ export interface GetSfvbTestOrdersRequest {
772
+ storefrontOid: number;
773
+ limit?: number;
774
+ digitalItems?: boolean;
775
+ autoOrder?: boolean;
776
+ }
777
+
768
778
  export interface GetSfvbThemeRequest {
769
779
  storefrontOid: number;
770
780
  themeOid: number;
@@ -2435,6 +2445,25 @@ export interface SfvbApiInterface {
2435
2445
  */
2436
2446
  getSfvbSiteAttributes(requestParameters: GetSfvbSiteAttributesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbSiteAttributesResponse>;
2437
2447
 
2448
+ /**
2449
+ * Test orders on this account only, newest first, with no customer details, so an agent can render the order pages (receipt, order tracking, digital downloads, auto order pages) with one. Use an order_id as a render\'s context_order_id; a real customer\'s order is refused there. The last 7 days are searched, widening to 30 and then 90 until enough are found. digital_items and auto_order keep only orders with downloads or an auto order. limit is 1 to 25, default 10.
2450
+ * @summary List recent test orders
2451
+ * @param {number} storefrontOid
2452
+ * @param {number} [limit]
2453
+ * @param {boolean} [digitalItems]
2454
+ * @param {boolean} [autoOrder]
2455
+ * @param {*} [options] Override http request option.
2456
+ * @throws {RequiredError}
2457
+ * @memberof SfvbApiInterface
2458
+ */
2459
+ getSfvbTestOrdersRaw(requestParameters: GetSfvbTestOrdersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SfvbTestOrdersResponse>>;
2460
+
2461
+ /**
2462
+ * Test orders on this account only, newest first, with no customer details, so an agent can render the order pages (receipt, order tracking, digital downloads, auto order pages) with one. Use an order_id as a render\'s context_order_id; a real customer\'s order is refused there. The last 7 days are searched, widening to 30 and then 90 until enough are found. digital_items and auto_order keep only orders with downloads or an auto order. limit is 1 to 25, default 10.
2463
+ * List recent test orders
2464
+ */
2465
+ getSfvbTestOrders(requestParameters: GetSfvbTestOrdersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbTestOrdersResponse>;
2466
+
2438
2467
  /**
2439
2468
  *
2440
2469
  * @summary Get a theme
@@ -7148,6 +7177,59 @@ export class SfvbApi extends runtime.BaseAPI implements SfvbApiInterface {
7148
7177
  return await response.value();
7149
7178
  }
7150
7179
 
7180
+ /**
7181
+ * Test orders on this account only, newest first, with no customer details, so an agent can render the order pages (receipt, order tracking, digital downloads, auto order pages) with one. Use an order_id as a render\'s context_order_id; a real customer\'s order is refused there. The last 7 days are searched, widening to 30 and then 90 until enough are found. digital_items and auto_order keep only orders with downloads or an auto order. limit is 1 to 25, default 10.
7182
+ * List recent test orders
7183
+ */
7184
+ async getSfvbTestOrdersRaw(requestParameters: GetSfvbTestOrdersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SfvbTestOrdersResponse>> {
7185
+ if (requestParameters.storefrontOid === null || requestParameters.storefrontOid === undefined) {
7186
+ throw new runtime.RequiredError('storefrontOid','Required parameter requestParameters.storefrontOid was null or undefined when calling getSfvbTestOrders.');
7187
+ }
7188
+
7189
+ const queryParameters: any = {};
7190
+
7191
+ if (requestParameters.limit !== undefined) {
7192
+ queryParameters['limit'] = requestParameters.limit;
7193
+ }
7194
+
7195
+ if (requestParameters.digitalItems !== undefined) {
7196
+ queryParameters['digital_items'] = requestParameters.digitalItems;
7197
+ }
7198
+
7199
+ if (requestParameters.autoOrder !== undefined) {
7200
+ queryParameters['auto_order'] = requestParameters.autoOrder;
7201
+ }
7202
+
7203
+ const headerParameters: runtime.HTTPHeaders = {};
7204
+
7205
+ if (this.configuration && this.configuration.accessToken) {
7206
+ // oauth required
7207
+ headerParameters["Authorization"] = await this.configuration.accessToken("ultraCartOauth", []);
7208
+ }
7209
+
7210
+ if (this.configuration && this.configuration.apiKey) {
7211
+ headerParameters["x-ultracart-simple-key"] = this.configuration.apiKey("x-ultracart-simple-key"); // ultraCartSimpleApiKey authentication
7212
+ }
7213
+
7214
+ const response = await this.request({
7215
+ path: `/sfvb/storefronts/{storefront_oid}/test_orders`.replace(`{${"storefront_oid"}}`, encodeURIComponent(String(requestParameters.storefrontOid))),
7216
+ method: 'GET',
7217
+ headers: headerParameters,
7218
+ query: queryParameters,
7219
+ }, initOverrides);
7220
+
7221
+ return new runtime.JSONApiResponse(response, (jsonValue) => SfvbTestOrdersResponseFromJSON(jsonValue));
7222
+ }
7223
+
7224
+ /**
7225
+ * Test orders on this account only, newest first, with no customer details, so an agent can render the order pages (receipt, order tracking, digital downloads, auto order pages) with one. Use an order_id as a render\'s context_order_id; a real customer\'s order is refused there. The last 7 days are searched, widening to 30 and then 90 until enough are found. digital_items and auto_order keep only orders with downloads or an auto order. limit is 1 to 25, default 10.
7226
+ * List recent test orders
7227
+ */
7228
+ async getSfvbTestOrders(requestParameters: GetSfvbTestOrdersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbTestOrdersResponse> {
7229
+ const response = await this.getSfvbTestOrdersRaw(requestParameters, initOverrides);
7230
+ return await response.value();
7231
+ }
7232
+
7151
7233
  /**
7152
7234
  * Get a theme
7153
7235
  */
@@ -0,0 +1,131 @@
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 SfvbTestOrder
20
+ */
21
+ export interface SfvbTestOrder {
22
+ /**
23
+ * True when the order started an auto order, for working on the subscription pages.
24
+ * @type {boolean}
25
+ * @memberof SfvbTestOrder
26
+ */
27
+ auto_order?: boolean;
28
+ /**
29
+ * When the order was placed, ISO-8601 in UTC.
30
+ * @type {string}
31
+ * @memberof SfvbTestOrder
32
+ */
33
+ created?: string;
34
+ /**
35
+ * The currency of the total.
36
+ * @type {string}
37
+ * @memberof SfvbTestOrder
38
+ */
39
+ currency_code?: string;
40
+ /**
41
+ * True when the order has digital downloads, for working on the digital download page.
42
+ * @type {boolean}
43
+ * @memberof SfvbTestOrder
44
+ */
45
+ digital_items?: boolean;
46
+ /**
47
+ * How many item lines the order has.
48
+ * @type {number}
49
+ * @memberof SfvbTestOrder
50
+ */
51
+ item_count?: number;
52
+ /**
53
+ * The order id. Pass it as a render's context_order_id.
54
+ * @type {string}
55
+ * @memberof SfvbTestOrder
56
+ */
57
+ order_id?: string;
58
+ /**
59
+ * How the order was paid, such as Credit Card or PayPal.
60
+ * @type {string}
61
+ * @memberof SfvbTestOrder
62
+ */
63
+ payment_method?: string;
64
+ /**
65
+ * The order's current stage code, such as CO (completed), SD (shipping department) or AR (accounts receivable).
66
+ * @type {string}
67
+ * @memberof SfvbTestOrder
68
+ */
69
+ stage?: string;
70
+ /**
71
+ * The order total as a decimal string.
72
+ * @type {string}
73
+ * @memberof SfvbTestOrder
74
+ */
75
+ total?: string;
76
+ }
77
+
78
+
79
+
80
+ /**
81
+ * Check if a given object implements the SfvbTestOrder interface.
82
+ */
83
+ export function instanceOfSfvbTestOrder(value: object): boolean {
84
+ let isInstance = true;
85
+
86
+ return isInstance;
87
+ }
88
+
89
+ export function SfvbTestOrderFromJSON(json: any): SfvbTestOrder {
90
+ return SfvbTestOrderFromJSONTyped(json, false);
91
+ }
92
+
93
+ export function SfvbTestOrderFromJSONTyped(json: any, ignoreDiscriminator: boolean): SfvbTestOrder {
94
+ if ((json === undefined) || (json === null)) {
95
+ return json;
96
+ }
97
+ return {
98
+
99
+ 'auto_order': !exists(json, 'auto_order') ? undefined : json['auto_order'],
100
+ 'created': !exists(json, 'created') ? undefined : json['created'],
101
+ 'currency_code': !exists(json, 'currency_code') ? undefined : json['currency_code'],
102
+ 'digital_items': !exists(json, 'digital_items') ? undefined : json['digital_items'],
103
+ 'item_count': !exists(json, 'item_count') ? undefined : json['item_count'],
104
+ 'order_id': !exists(json, 'order_id') ? undefined : json['order_id'],
105
+ 'payment_method': !exists(json, 'payment_method') ? undefined : json['payment_method'],
106
+ 'stage': !exists(json, 'stage') ? undefined : json['stage'],
107
+ 'total': !exists(json, 'total') ? undefined : json['total'],
108
+ };
109
+ }
110
+
111
+ export function SfvbTestOrderToJSON(value?: SfvbTestOrder | null): any {
112
+ if (value === undefined) {
113
+ return undefined;
114
+ }
115
+ if (value === null) {
116
+ return null;
117
+ }
118
+ return {
119
+
120
+ 'auto_order': value.auto_order,
121
+ 'created': value.created,
122
+ 'currency_code': value.currency_code,
123
+ 'digital_items': value.digital_items,
124
+ 'item_count': value.item_count,
125
+ 'order_id': value.order_id,
126
+ 'payment_method': value.payment_method,
127
+ 'stage': value.stage,
128
+ 'total': value.total,
129
+ };
130
+ }
131
+
@@ -0,0 +1,82 @@
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
+ SfvbTestOrder,
18
+ SfvbTestOrderFromJSON,
19
+ SfvbTestOrderFromJSONTyped,
20
+ SfvbTestOrderToJSON,
21
+ } from './SfvbTestOrder';
22
+
23
+ /**
24
+ *
25
+ * @export
26
+ * @interface SfvbTestOrdersResponse
27
+ */
28
+ export interface SfvbTestOrdersResponse {
29
+ /**
30
+ * Present when nothing matched.
31
+ * @type {string}
32
+ * @memberof SfvbTestOrdersResponse
33
+ */
34
+ hint?: string;
35
+ /**
36
+ * Test orders, newest first. Only orders marked as test orders are ever listed.
37
+ * @type {Array<SfvbTestOrder>}
38
+ * @memberof SfvbTestOrdersResponse
39
+ */
40
+ test_orders?: Array<SfvbTestOrder>;
41
+ }
42
+
43
+
44
+
45
+ /**
46
+ * Check if a given object implements the SfvbTestOrdersResponse interface.
47
+ */
48
+ export function instanceOfSfvbTestOrdersResponse(value: object): boolean {
49
+ let isInstance = true;
50
+
51
+ return isInstance;
52
+ }
53
+
54
+ export function SfvbTestOrdersResponseFromJSON(json: any): SfvbTestOrdersResponse {
55
+ return SfvbTestOrdersResponseFromJSONTyped(json, false);
56
+ }
57
+
58
+ export function SfvbTestOrdersResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): SfvbTestOrdersResponse {
59
+ if ((json === undefined) || (json === null)) {
60
+ return json;
61
+ }
62
+ return {
63
+
64
+ 'hint': !exists(json, 'hint') ? undefined : json['hint'],
65
+ 'test_orders': !exists(json, 'test_orders') ? undefined : ((json['test_orders'] as Array<any>).map(SfvbTestOrderFromJSON)),
66
+ };
67
+ }
68
+
69
+ export function SfvbTestOrdersResponseToJSON(value?: SfvbTestOrdersResponse | null): any {
70
+ if (value === undefined) {
71
+ return undefined;
72
+ }
73
+ if (value === null) {
74
+ return null;
75
+ }
76
+ return {
77
+
78
+ 'hint': value.hint,
79
+ 'test_orders': value.test_orders === undefined ? undefined : ((value.test_orders as Array<any>).map(SfvbTestOrderToJSON)),
80
+ };
81
+ }
82
+
@@ -1126,6 +1126,8 @@ export * from './SfvbTemplateResolveCandidate';
1126
1126
  export * from './SfvbTemplateResolvePath';
1127
1127
  export * from './SfvbTemplateResolveResponse';
1128
1128
  export * from './SfvbTemplatesResponse';
1129
+ export * from './SfvbTestOrder';
1130
+ export * from './SfvbTestOrdersResponse';
1129
1131
  export * from './SfvbTheme';
1130
1132
  export * from './SfvbThemeAttribute';
1131
1133
  export * from './SfvbThemeAttributeUpdate';