@digital8/lighting-illusions-ts-sdk 0.0.1838 → 0.0.1840
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.openapi-generator/FILES +10 -0
- package/README.md +7 -2
- package/dist/apis/CouponsApi.d.ts +33 -0
- package/dist/apis/CouponsApi.js +138 -0
- package/dist/apis/index.d.ts +1 -0
- package/dist/apis/index.js +1 -0
- package/dist/models/AddressResource.d.ts +2 -2
- package/dist/models/AddressResource.js +4 -4
- package/dist/models/ExternalApiLogResource.d.ts +1 -1
- package/dist/models/ExternalApiLogResource.js +3 -1
- package/dist/models/StoreFrontendResource.d.ts +1 -1
- package/dist/models/StoreFrontendResource.js +1 -3
- package/dist/models/StoreListResource.d.ts +1 -1
- package/dist/models/StoreListResource.js +3 -1
- package/dist/models/StoreResource.d.ts +1 -1
- package/dist/models/StoreResource.js +1 -3
- package/dist/models/StoreSpecialDateFrontendResource.d.ts +2 -2
- package/dist/models/StoreSpecialDateFrontendResource.js +1 -3
- package/dist/models/VerifyCouponRequest.d.ts +63 -0
- package/dist/models/VerifyCouponRequest.js +64 -0
- package/dist/models/VerifyCouponRequestProductsInner.d.ts +38 -0
- package/dist/models/VerifyCouponRequestProductsInner.js +51 -0
- package/dist/models/VerifyCouponResource.d.ts +38 -0
- package/dist/models/VerifyCouponResource.js +55 -0
- package/dist/models/VerifyCouponResourceArrayResponse.d.ts +33 -0
- package/dist/models/VerifyCouponResourceArrayResponse.js +50 -0
- package/dist/models/index.d.ts +4 -0
- package/dist/models/index.js +4 -0
- package/docs/CouponsApi.md +74 -0
- package/docs/StoreSpecialDateFrontendResource.md +1 -1
- package/docs/VerifyCouponRequest.md +44 -0
- package/docs/VerifyCouponRequestProductsInner.md +36 -0
- package/docs/VerifyCouponResource.md +36 -0
- package/docs/VerifyCouponResourceArrayResponse.md +34 -0
- package/package.json +1 -1
- package/src/apis/CouponsApi.ts +77 -0
- package/src/apis/index.ts +1 -0
- package/src/models/AddressResource.ts +5 -5
- package/src/models/ExternalApiLogResource.ts +3 -2
- package/src/models/StoreFrontendResource.ts +2 -3
- package/src/models/StoreListResource.ts +3 -2
- package/src/models/StoreResource.ts +2 -3
- package/src/models/StoreSpecialDateFrontendResource.ts +3 -4
- package/src/models/VerifyCouponRequest.ts +115 -0
- package/src/models/VerifyCouponRequestProductsInner.ts +73 -0
- package/src/models/VerifyCouponResource.ts +75 -0
- package/src/models/VerifyCouponResourceArrayResponse.ts +73 -0
- package/src/models/index.ts +4 -0
package/.openapi-generator/FILES
CHANGED
|
@@ -66,6 +66,7 @@ docs/CategoryFrontendResourceArrayResponse.md
|
|
|
66
66
|
docs/CategoryWithChildrenFrontendResource.md
|
|
67
67
|
docs/CategoryWithChildrenFrontendResourceArrayResponse.md
|
|
68
68
|
docs/CouponDiscountType.md
|
|
69
|
+
docs/CouponsApi.md
|
|
69
70
|
docs/CustomerListResource.md
|
|
70
71
|
docs/CustomerListResourceArrayResponse.md
|
|
71
72
|
docs/CustomerResource.md
|
|
@@ -488,6 +489,10 @@ docs/UpdateStoreRequest.md
|
|
|
488
489
|
docs/UpdateStoreRequestSpecialDatesInner.md
|
|
489
490
|
docs/UpdateSupplierRequest.md
|
|
490
491
|
docs/UpdateTagRequest.md
|
|
492
|
+
docs/VerifyCouponRequest.md
|
|
493
|
+
docs/VerifyCouponRequestProductsInner.md
|
|
494
|
+
docs/VerifyCouponResource.md
|
|
495
|
+
docs/VerifyCouponResourceArrayResponse.md
|
|
491
496
|
docs/WishlistCheckResource.md
|
|
492
497
|
docs/WishlistCheckResourceArrayResponse.md
|
|
493
498
|
docs/WishlistToggleResource.md
|
|
@@ -497,6 +502,7 @@ src/apis/AdminApi.ts
|
|
|
497
502
|
src/apis/AssetApi.ts
|
|
498
503
|
src/apis/AttributeApi.ts
|
|
499
504
|
src/apis/CartsApi.ts
|
|
505
|
+
src/apis/CouponsApi.ts
|
|
500
506
|
src/apis/CustomersApi.ts
|
|
501
507
|
src/apis/DefinitionApi.ts
|
|
502
508
|
src/apis/DocumentApi.ts
|
|
@@ -981,6 +987,10 @@ src/models/UpdateStoreRequest.ts
|
|
|
981
987
|
src/models/UpdateStoreRequestSpecialDatesInner.ts
|
|
982
988
|
src/models/UpdateSupplierRequest.ts
|
|
983
989
|
src/models/UpdateTagRequest.ts
|
|
990
|
+
src/models/VerifyCouponRequest.ts
|
|
991
|
+
src/models/VerifyCouponRequestProductsInner.ts
|
|
992
|
+
src/models/VerifyCouponResource.ts
|
|
993
|
+
src/models/VerifyCouponResourceArrayResponse.ts
|
|
984
994
|
src/models/WishlistCheckResource.ts
|
|
985
995
|
src/models/WishlistCheckResourceArrayResponse.ts
|
|
986
996
|
src/models/WishlistToggleResource.ts
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# @digital8/lighting-illusions-ts-sdk@0.0.
|
|
1
|
+
# @digital8/lighting-illusions-ts-sdk@0.0.1840
|
|
2
2
|
|
|
3
3
|
A TypeScript SDK client for the localhost API.
|
|
4
4
|
|
|
@@ -85,6 +85,7 @@ All URIs are relative to *http://localhost/api*
|
|
|
85
85
|
*CartsApi* | [**storeCart**](docs/CartsApi.md#storecartoperation) | **POST** /admin-api/carts/create | Auto-generated: storeCart
|
|
86
86
|
*CartsApi* | [**updateCart**](docs/CartsApi.md#updatecartoperation) | **PUT** /admin-api/carts/{cart}/update | Auto-generated: updateCart
|
|
87
87
|
*CartsApi* | [**updateItemCart**](docs/CartsApi.md#updateitemcartoperation) | **PUT** /admin-api/carts/{cart}/items/{lineItem}/update | Auto-generated: updateItemCart
|
|
88
|
+
*CouponsApi* | [**verifyCoupon**](docs/CouponsApi.md#verifycouponoperation) | **POST** /admin-api/coupons/verify | Auto-generated: verifyCoupon
|
|
88
89
|
*CustomersApi* | [**indexCustomer**](docs/CustomersApi.md#indexcustomeroperation) | **POST** /admin-api/customers/list | Auto-generated: indexCustomer
|
|
89
90
|
*CustomersApi* | [**showCustomer**](docs/CustomersApi.md#showcustomer) | **GET** /admin-api/customers/{customer} | Auto-generated: showCustomer
|
|
90
91
|
*CustomersApi* | [**storeCustomer**](docs/CustomersApi.md#storecustomeroperation) | **POST** /admin-api/customers/create | Auto-generated: storeCustomer
|
|
@@ -709,6 +710,10 @@ All URIs are relative to *http://localhost/api*
|
|
|
709
710
|
- [UpdateStoreRequestSpecialDatesInner](docs/UpdateStoreRequestSpecialDatesInner.md)
|
|
710
711
|
- [UpdateSupplierRequest](docs/UpdateSupplierRequest.md)
|
|
711
712
|
- [UpdateTagRequest](docs/UpdateTagRequest.md)
|
|
713
|
+
- [VerifyCouponRequest](docs/VerifyCouponRequest.md)
|
|
714
|
+
- [VerifyCouponRequestProductsInner](docs/VerifyCouponRequestProductsInner.md)
|
|
715
|
+
- [VerifyCouponResource](docs/VerifyCouponResource.md)
|
|
716
|
+
- [VerifyCouponResourceArrayResponse](docs/VerifyCouponResourceArrayResponse.md)
|
|
712
717
|
- [WishlistCheckResource](docs/WishlistCheckResource.md)
|
|
713
718
|
- [WishlistCheckResourceArrayResponse](docs/WishlistCheckResourceArrayResponse.md)
|
|
714
719
|
- [WishlistToggleResource](docs/WishlistToggleResource.md)
|
|
@@ -726,7 +731,7 @@ and is automatically generated by the
|
|
|
726
731
|
[OpenAPI Generator](https://openapi-generator.tech) project:
|
|
727
732
|
|
|
728
733
|
- API version: `1.0.0`
|
|
729
|
-
- Package version: `0.0.
|
|
734
|
+
- Package version: `0.0.1840`
|
|
730
735
|
- Generator version: `7.21.0`
|
|
731
736
|
- Build package: `org.openapitools.codegen.languages.TypeScriptFetchClientCodegen`
|
|
732
737
|
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* My API
|
|
3
|
+
* API documentation for my Laravel app
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
*
|
|
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 * as runtime from '../runtime';
|
|
13
|
+
import type { VerifyCouponRequest, VerifyCouponResourceArrayResponse } from '../models/index';
|
|
14
|
+
export interface VerifyCouponOperationRequest {
|
|
15
|
+
verifyCouponRequest?: VerifyCouponRequest;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
*
|
|
19
|
+
*/
|
|
20
|
+
export declare class CouponsApi extends runtime.BaseAPI {
|
|
21
|
+
/**
|
|
22
|
+
* Creates request options for verifyCoupon without sending the request
|
|
23
|
+
*/
|
|
24
|
+
verifyCouponRequestOpts(requestParameters: VerifyCouponOperationRequest): Promise<runtime.RequestOpts>;
|
|
25
|
+
/**
|
|
26
|
+
* Auto-generated: verifyCoupon
|
|
27
|
+
*/
|
|
28
|
+
verifyCouponRaw(requestParameters: VerifyCouponOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<VerifyCouponResourceArrayResponse>>;
|
|
29
|
+
/**
|
|
30
|
+
* Auto-generated: verifyCoupon
|
|
31
|
+
*/
|
|
32
|
+
verifyCoupon(requestParameters?: VerifyCouponOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<VerifyCouponResourceArrayResponse>;
|
|
33
|
+
}
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* My API
|
|
6
|
+
* API documentation for my Laravel app
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.0
|
|
9
|
+
*
|
|
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
|
+
var __extends = (this && this.__extends) || (function () {
|
|
16
|
+
var extendStatics = function (d, b) {
|
|
17
|
+
extendStatics = Object.setPrototypeOf ||
|
|
18
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
19
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
20
|
+
return extendStatics(d, b);
|
|
21
|
+
};
|
|
22
|
+
return function (d, b) {
|
|
23
|
+
if (typeof b !== "function" && b !== null)
|
|
24
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
25
|
+
extendStatics(d, b);
|
|
26
|
+
function __() { this.constructor = d; }
|
|
27
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
28
|
+
};
|
|
29
|
+
})();
|
|
30
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
31
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
32
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
33
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
34
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
35
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
36
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
37
|
+
});
|
|
38
|
+
};
|
|
39
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
40
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
41
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
42
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
43
|
+
function step(op) {
|
|
44
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
45
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
46
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
47
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
48
|
+
switch (op[0]) {
|
|
49
|
+
case 0: case 1: t = op; break;
|
|
50
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
51
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
52
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
53
|
+
default:
|
|
54
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
55
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
56
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
57
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
58
|
+
if (t[2]) _.ops.pop();
|
|
59
|
+
_.trys.pop(); continue;
|
|
60
|
+
}
|
|
61
|
+
op = body.call(thisArg, _);
|
|
62
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
63
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
67
|
+
exports.CouponsApi = void 0;
|
|
68
|
+
var runtime = require("../runtime");
|
|
69
|
+
var index_1 = require("../models/index");
|
|
70
|
+
/**
|
|
71
|
+
*
|
|
72
|
+
*/
|
|
73
|
+
var CouponsApi = /** @class */ (function (_super) {
|
|
74
|
+
__extends(CouponsApi, _super);
|
|
75
|
+
function CouponsApi() {
|
|
76
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Creates request options for verifyCoupon without sending the request
|
|
80
|
+
*/
|
|
81
|
+
CouponsApi.prototype.verifyCouponRequestOpts = function (requestParameters) {
|
|
82
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
83
|
+
var queryParameters, headerParameters, urlPath;
|
|
84
|
+
return __generator(this, function (_a) {
|
|
85
|
+
queryParameters = {};
|
|
86
|
+
headerParameters = {};
|
|
87
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
88
|
+
urlPath = "/admin-api/coupons/verify";
|
|
89
|
+
return [2 /*return*/, {
|
|
90
|
+
path: urlPath,
|
|
91
|
+
method: 'POST',
|
|
92
|
+
headers: headerParameters,
|
|
93
|
+
query: queryParameters,
|
|
94
|
+
body: (0, index_1.VerifyCouponRequestToJSON)(requestParameters['verifyCouponRequest']),
|
|
95
|
+
}];
|
|
96
|
+
});
|
|
97
|
+
});
|
|
98
|
+
};
|
|
99
|
+
/**
|
|
100
|
+
* Auto-generated: verifyCoupon
|
|
101
|
+
*/
|
|
102
|
+
CouponsApi.prototype.verifyCouponRaw = function (requestParameters, initOverrides) {
|
|
103
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
104
|
+
var requestOptions, response;
|
|
105
|
+
return __generator(this, function (_a) {
|
|
106
|
+
switch (_a.label) {
|
|
107
|
+
case 0: return [4 /*yield*/, this.verifyCouponRequestOpts(requestParameters)];
|
|
108
|
+
case 1:
|
|
109
|
+
requestOptions = _a.sent();
|
|
110
|
+
return [4 /*yield*/, this.request(requestOptions, initOverrides)];
|
|
111
|
+
case 2:
|
|
112
|
+
response = _a.sent();
|
|
113
|
+
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.VerifyCouponResourceArrayResponseFromJSON)(jsonValue); })];
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
});
|
|
117
|
+
};
|
|
118
|
+
/**
|
|
119
|
+
* Auto-generated: verifyCoupon
|
|
120
|
+
*/
|
|
121
|
+
CouponsApi.prototype.verifyCoupon = function () {
|
|
122
|
+
return __awaiter(this, arguments, void 0, function (requestParameters, initOverrides) {
|
|
123
|
+
var response;
|
|
124
|
+
if (requestParameters === void 0) { requestParameters = {}; }
|
|
125
|
+
return __generator(this, function (_a) {
|
|
126
|
+
switch (_a.label) {
|
|
127
|
+
case 0: return [4 /*yield*/, this.verifyCouponRaw(requestParameters, initOverrides)];
|
|
128
|
+
case 1:
|
|
129
|
+
response = _a.sent();
|
|
130
|
+
return [4 /*yield*/, response.value()];
|
|
131
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
132
|
+
}
|
|
133
|
+
});
|
|
134
|
+
});
|
|
135
|
+
};
|
|
136
|
+
return CouponsApi;
|
|
137
|
+
}(runtime.BaseAPI));
|
|
138
|
+
exports.CouponsApi = CouponsApi;
|
package/dist/apis/index.d.ts
CHANGED
package/dist/apis/index.js
CHANGED
|
@@ -20,6 +20,7 @@ __exportStar(require("./AdminApi"), exports);
|
|
|
20
20
|
__exportStar(require("./AssetApi"), exports);
|
|
21
21
|
__exportStar(require("./AttributeApi"), exports);
|
|
22
22
|
__exportStar(require("./CartsApi"), exports);
|
|
23
|
+
__exportStar(require("./CouponsApi"), exports);
|
|
23
24
|
__exportStar(require("./CustomersApi"), exports);
|
|
24
25
|
__exportStar(require("./DefinitionApi"), exports);
|
|
25
26
|
__exportStar(require("./DocumentApi"), exports);
|
|
@@ -26,7 +26,7 @@ export interface AddressResource {
|
|
|
26
26
|
* @type {string}
|
|
27
27
|
* @memberof AddressResource
|
|
28
28
|
*/
|
|
29
|
-
company
|
|
29
|
+
company?: string | null;
|
|
30
30
|
/**
|
|
31
31
|
*
|
|
32
32
|
* @type {string}
|
|
@@ -38,7 +38,7 @@ export interface AddressResource {
|
|
|
38
38
|
* @type {string}
|
|
39
39
|
* @memberof AddressResource
|
|
40
40
|
*/
|
|
41
|
-
line2
|
|
41
|
+
line2: string;
|
|
42
42
|
/**
|
|
43
43
|
*
|
|
44
44
|
* @type {string}
|
|
@@ -22,10 +22,10 @@ exports.AddressResourceToJSONTyped = AddressResourceToJSONTyped;
|
|
|
22
22
|
* Check if a given object implements the AddressResource interface.
|
|
23
23
|
*/
|
|
24
24
|
function instanceOfAddressResource(value) {
|
|
25
|
-
if (!('company' in value) || value['company'] === undefined)
|
|
26
|
-
return false;
|
|
27
25
|
if (!('line1' in value) || value['line1'] === undefined)
|
|
28
26
|
return false;
|
|
27
|
+
if (!('line2' in value) || value['line2'] === undefined)
|
|
28
|
+
return false;
|
|
29
29
|
if (!('postcode' in value) || value['postcode'] === undefined)
|
|
30
30
|
return false;
|
|
31
31
|
if (!('suburb' in value) || value['suburb'] === undefined)
|
|
@@ -47,9 +47,9 @@ function AddressResourceFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
47
47
|
}
|
|
48
48
|
return {
|
|
49
49
|
'id': json['id'] == null ? undefined : json['id'],
|
|
50
|
-
'company': json['company'],
|
|
50
|
+
'company': json['company'] == null ? undefined : json['company'],
|
|
51
51
|
'line1': json['line_1'],
|
|
52
|
-
'line2': json['line_2']
|
|
52
|
+
'line2': json['line_2'],
|
|
53
53
|
'postcode': json['postcode'],
|
|
54
54
|
'suburb': json['suburb'],
|
|
55
55
|
'country': json['country'],
|
|
@@ -37,6 +37,8 @@ function instanceOfExternalApiLogResource(value) {
|
|
|
37
37
|
return false;
|
|
38
38
|
if (!('responseCode' in value) || value['responseCode'] === undefined)
|
|
39
39
|
return false;
|
|
40
|
+
if (!('requestPayload' in value) || value['requestPayload'] === undefined)
|
|
41
|
+
return false;
|
|
40
42
|
if (!('responsePayload' in value) || value['responsePayload'] === undefined)
|
|
41
43
|
return false;
|
|
42
44
|
if (!('site' in value) || value['site'] === undefined)
|
|
@@ -58,7 +60,7 @@ function ExternalApiLogResourceFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
58
60
|
'exteranlApiLoggableId': json['exteranlApiLoggableId'],
|
|
59
61
|
'endpoint': json['endpoint'],
|
|
60
62
|
'responseCode': json['responseCode'],
|
|
61
|
-
'requestPayload': json['requestPayload']
|
|
63
|
+
'requestPayload': json['requestPayload'],
|
|
62
64
|
'responsePayload': json['responsePayload'],
|
|
63
65
|
'createdAt': json['createdAt'] == null ? undefined : json['createdAt'],
|
|
64
66
|
'site': (0, SiteLiteResource_1.SiteLiteResourceFromJSON)(json['site']),
|
|
@@ -34,8 +34,6 @@ function instanceOfStoreFrontendResource(value) {
|
|
|
34
34
|
return false;
|
|
35
35
|
if (!('longitude' in value) || value['longitude'] === undefined)
|
|
36
36
|
return false;
|
|
37
|
-
if (!('tagLine' in value) || value['tagLine'] === undefined)
|
|
38
|
-
return false;
|
|
39
37
|
if (!('specialDates' in value) || value['specialDates'] === undefined)
|
|
40
38
|
return false;
|
|
41
39
|
if (!('suppliers' in value) || value['suppliers'] === undefined)
|
|
@@ -59,7 +57,7 @@ function StoreFrontendResourceFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
59
57
|
'address': json['address'] == null ? undefined : json['address'],
|
|
60
58
|
'latitude': json['latitude'],
|
|
61
59
|
'longitude': json['longitude'],
|
|
62
|
-
'tagLine': json['tagLine'],
|
|
60
|
+
'tagLine': json['tagLine'] == null ? undefined : json['tagLine'],
|
|
63
61
|
'openingHours': json['openingHours'] == null ? undefined : json['openingHours'],
|
|
64
62
|
'specialDates': json['specialDates'],
|
|
65
63
|
'suppliers': json['suppliers'],
|
|
@@ -37,6 +37,8 @@ function instanceOfStoreListResource(value) {
|
|
|
37
37
|
return false;
|
|
38
38
|
if (!('email' in value) || value['email'] === undefined)
|
|
39
39
|
return false;
|
|
40
|
+
if (!('website' in value) || value['website'] === undefined)
|
|
41
|
+
return false;
|
|
40
42
|
return true;
|
|
41
43
|
}
|
|
42
44
|
function StoreListResourceFromJSON(json) {
|
|
@@ -55,7 +57,7 @@ function StoreListResourceFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
55
57
|
'latitude': json['latitude'],
|
|
56
58
|
'tagLine': json['tag_line'],
|
|
57
59
|
'email': json['email'],
|
|
58
|
-
'website': json['website']
|
|
60
|
+
'website': json['website'],
|
|
59
61
|
'openingHours': json['opening_hours'] == null ? undefined : json['opening_hours'],
|
|
60
62
|
};
|
|
61
63
|
}
|
|
@@ -38,8 +38,6 @@ function instanceOfStoreResource(value) {
|
|
|
38
38
|
return false;
|
|
39
39
|
if (!('email' in value) || value['email'] === undefined)
|
|
40
40
|
return false;
|
|
41
|
-
if (!('website' in value) || value['website'] === undefined)
|
|
42
|
-
return false;
|
|
43
41
|
if (!('suppliers' in value) || value['suppliers'] === undefined)
|
|
44
42
|
return false;
|
|
45
43
|
if (!('address' in value) || value['address'] === undefined)
|
|
@@ -64,7 +62,7 @@ function StoreResourceFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
64
62
|
'latitude': json['latitude'],
|
|
65
63
|
'tagLine': json['tag_line'] == null ? undefined : json['tag_line'],
|
|
66
64
|
'email': json['email'],
|
|
67
|
-
'website': json['website'],
|
|
65
|
+
'website': json['website'] == null ? undefined : json['website'],
|
|
68
66
|
'openingHours': json['opening_hours'] == null ? undefined : json['opening_hours'],
|
|
69
67
|
'suppliers': (json['suppliers'] == null ? null : json['suppliers'].map(SupplierLiteResource_1.SupplierLiteResourceFromJSON)),
|
|
70
68
|
'address': (0, AddressResource_1.AddressResourceFromJSON)(json['address']),
|
|
@@ -35,10 +35,10 @@ export interface StoreSpecialDateFrontendResource {
|
|
|
35
35
|
hours: string;
|
|
36
36
|
/**
|
|
37
37
|
*
|
|
38
|
-
* @type {
|
|
38
|
+
* @type {string}
|
|
39
39
|
* @memberof StoreSpecialDateFrontendResource
|
|
40
40
|
*/
|
|
41
|
-
date
|
|
41
|
+
date?: string | null;
|
|
42
42
|
/**
|
|
43
43
|
*
|
|
44
44
|
* @type {boolean}
|
|
@@ -26,8 +26,6 @@ function instanceOfStoreSpecialDateFrontendResource(value) {
|
|
|
26
26
|
return false;
|
|
27
27
|
if (!('hours' in value) || value['hours'] === undefined)
|
|
28
28
|
return false;
|
|
29
|
-
if (!('date' in value) || value['date'] === undefined)
|
|
30
|
-
return false;
|
|
31
29
|
if (!('closed' in value) || value['closed'] === undefined)
|
|
32
30
|
return false;
|
|
33
31
|
if (!('displayStartDate' in value) || value['displayStartDate'] === undefined)
|
|
@@ -47,7 +45,7 @@ function StoreSpecialDateFrontendResourceFromJSONTyped(json, ignoreDiscriminator
|
|
|
47
45
|
'id': json['id'] == null ? undefined : json['id'],
|
|
48
46
|
'name': json['name'],
|
|
49
47
|
'hours': json['hours'],
|
|
50
|
-
'date': json['date'],
|
|
48
|
+
'date': json['date'] == null ? undefined : json['date'],
|
|
51
49
|
'closed': json['closed'],
|
|
52
50
|
'displayStartDate': json['displayStartDate'],
|
|
53
51
|
'displayEndDate': json['displayEndDate'],
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* My API
|
|
3
|
+
* API documentation for my Laravel app
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
*
|
|
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 type { VerifyCouponRequestProductsInner } from './VerifyCouponRequestProductsInner';
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface VerifyCouponRequest
|
|
17
|
+
*/
|
|
18
|
+
export interface VerifyCouponRequest {
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @type {number}
|
|
22
|
+
* @memberof VerifyCouponRequest
|
|
23
|
+
*/
|
|
24
|
+
siteId: number;
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
* @type {number}
|
|
28
|
+
* @memberof VerifyCouponRequest
|
|
29
|
+
*/
|
|
30
|
+
customerId: number;
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @type {number}
|
|
34
|
+
* @memberof VerifyCouponRequest
|
|
35
|
+
*/
|
|
36
|
+
cartId?: number | null;
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
* @type {Array<VerifyCouponRequestProductsInner>}
|
|
40
|
+
* @memberof VerifyCouponRequest
|
|
41
|
+
*/
|
|
42
|
+
products?: Array<VerifyCouponRequestProductsInner>;
|
|
43
|
+
/**
|
|
44
|
+
*
|
|
45
|
+
* @type {string}
|
|
46
|
+
* @memberof VerifyCouponRequest
|
|
47
|
+
*/
|
|
48
|
+
couponCode?: string | null;
|
|
49
|
+
/**
|
|
50
|
+
*
|
|
51
|
+
* @type {Array<number>}
|
|
52
|
+
* @memberof VerifyCouponRequest
|
|
53
|
+
*/
|
|
54
|
+
couponIds?: Array<number>;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Check if a given object implements the VerifyCouponRequest interface.
|
|
58
|
+
*/
|
|
59
|
+
export declare function instanceOfVerifyCouponRequest(value: object): value is VerifyCouponRequest;
|
|
60
|
+
export declare function VerifyCouponRequestFromJSON(json: any): VerifyCouponRequest;
|
|
61
|
+
export declare function VerifyCouponRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): VerifyCouponRequest;
|
|
62
|
+
export declare function VerifyCouponRequestToJSON(json: any): VerifyCouponRequest;
|
|
63
|
+
export declare function VerifyCouponRequestToJSONTyped(value?: VerifyCouponRequest | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* My API
|
|
6
|
+
* API documentation for my Laravel app
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.0
|
|
9
|
+
*
|
|
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.instanceOfVerifyCouponRequest = instanceOfVerifyCouponRequest;
|
|
17
|
+
exports.VerifyCouponRequestFromJSON = VerifyCouponRequestFromJSON;
|
|
18
|
+
exports.VerifyCouponRequestFromJSONTyped = VerifyCouponRequestFromJSONTyped;
|
|
19
|
+
exports.VerifyCouponRequestToJSON = VerifyCouponRequestToJSON;
|
|
20
|
+
exports.VerifyCouponRequestToJSONTyped = VerifyCouponRequestToJSONTyped;
|
|
21
|
+
var VerifyCouponRequestProductsInner_1 = require("./VerifyCouponRequestProductsInner");
|
|
22
|
+
/**
|
|
23
|
+
* Check if a given object implements the VerifyCouponRequest interface.
|
|
24
|
+
*/
|
|
25
|
+
function instanceOfVerifyCouponRequest(value) {
|
|
26
|
+
if (!('siteId' in value) || value['siteId'] === undefined)
|
|
27
|
+
return false;
|
|
28
|
+
if (!('customerId' in value) || value['customerId'] === undefined)
|
|
29
|
+
return false;
|
|
30
|
+
return true;
|
|
31
|
+
}
|
|
32
|
+
function VerifyCouponRequestFromJSON(json) {
|
|
33
|
+
return VerifyCouponRequestFromJSONTyped(json, false);
|
|
34
|
+
}
|
|
35
|
+
function VerifyCouponRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
36
|
+
if (json == null) {
|
|
37
|
+
return json;
|
|
38
|
+
}
|
|
39
|
+
return {
|
|
40
|
+
'siteId': json['site_id'],
|
|
41
|
+
'customerId': json['customer_id'],
|
|
42
|
+
'cartId': json['cart_id'] == null ? undefined : json['cart_id'],
|
|
43
|
+
'products': json['products'] == null ? undefined : (json['products'].map(VerifyCouponRequestProductsInner_1.VerifyCouponRequestProductsInnerFromJSON)),
|
|
44
|
+
'couponCode': json['coupon_code'] == null ? undefined : json['coupon_code'],
|
|
45
|
+
'couponIds': json['coupon_ids'] == null ? undefined : json['coupon_ids'],
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
function VerifyCouponRequestToJSON(json) {
|
|
49
|
+
return VerifyCouponRequestToJSONTyped(json, false);
|
|
50
|
+
}
|
|
51
|
+
function VerifyCouponRequestToJSONTyped(value, ignoreDiscriminator) {
|
|
52
|
+
if (ignoreDiscriminator === void 0) { ignoreDiscriminator = false; }
|
|
53
|
+
if (value == null) {
|
|
54
|
+
return value;
|
|
55
|
+
}
|
|
56
|
+
return {
|
|
57
|
+
'site_id': value['siteId'],
|
|
58
|
+
'customer_id': value['customerId'],
|
|
59
|
+
'cart_id': value['cartId'],
|
|
60
|
+
'products': value['products'] == null ? undefined : (value['products'].map(VerifyCouponRequestProductsInner_1.VerifyCouponRequestProductsInnerToJSON)),
|
|
61
|
+
'coupon_code': value['couponCode'],
|
|
62
|
+
'coupon_ids': value['couponIds'],
|
|
63
|
+
};
|
|
64
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* My API
|
|
3
|
+
* API documentation for my Laravel app
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
*
|
|
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 VerifyCouponRequestProductsInner
|
|
16
|
+
*/
|
|
17
|
+
export interface VerifyCouponRequestProductsInner {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {number}
|
|
21
|
+
* @memberof VerifyCouponRequestProductsInner
|
|
22
|
+
*/
|
|
23
|
+
productChildId?: number;
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @type {number}
|
|
27
|
+
* @memberof VerifyCouponRequestProductsInner
|
|
28
|
+
*/
|
|
29
|
+
quantity?: number;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Check if a given object implements the VerifyCouponRequestProductsInner interface.
|
|
33
|
+
*/
|
|
34
|
+
export declare function instanceOfVerifyCouponRequestProductsInner(value: object): value is VerifyCouponRequestProductsInner;
|
|
35
|
+
export declare function VerifyCouponRequestProductsInnerFromJSON(json: any): VerifyCouponRequestProductsInner;
|
|
36
|
+
export declare function VerifyCouponRequestProductsInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): VerifyCouponRequestProductsInner;
|
|
37
|
+
export declare function VerifyCouponRequestProductsInnerToJSON(json: any): VerifyCouponRequestProductsInner;
|
|
38
|
+
export declare function VerifyCouponRequestProductsInnerToJSONTyped(value?: VerifyCouponRequestProductsInner | null, ignoreDiscriminator?: boolean): any;
|