@digital8/lighting-illusions-ts-sdk 0.0.1840 → 0.0.1841

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.
Files changed (57) hide show
  1. package/.openapi-generator/FILES +0 -10
  2. package/README.md +2 -7
  3. package/dist/apis/index.d.ts +0 -1
  4. package/dist/apis/index.js +0 -1
  5. package/dist/models/AddressFrontendResource.d.ts +1 -1
  6. package/dist/models/AddressFrontendResource.js +3 -1
  7. package/dist/models/AddressResource.d.ts +2 -2
  8. package/dist/models/AddressResource.js +4 -4
  9. package/dist/models/ExternalApiLogResource.d.ts +1 -1
  10. package/dist/models/ExternalApiLogResource.js +1 -3
  11. package/dist/models/StoreCartRequest.d.ts +2 -2
  12. package/dist/models/StoreCartRequest.js +2 -6
  13. package/dist/models/StoreCartRequestShippingAddress.d.ts +4 -4
  14. package/dist/models/StoreCartRequestShippingAddress.js +4 -12
  15. package/dist/models/StoreFrontendResource.d.ts +2 -2
  16. package/dist/models/StoreFrontendResource.js +6 -2
  17. package/dist/models/StoreResource.d.ts +2 -2
  18. package/dist/models/StoreResource.js +6 -2
  19. package/dist/models/StoreSpecialDateFrontendResource.d.ts +2 -2
  20. package/dist/models/StoreSpecialDateFrontendResource.js +3 -1
  21. package/dist/models/UpdateCartRequest.d.ts +2 -2
  22. package/dist/models/UpdateCartRequest.js +2 -6
  23. package/dist/models/index.d.ts +0 -4
  24. package/dist/models/index.js +0 -4
  25. package/docs/StoreSpecialDateFrontendResource.md +1 -1
  26. package/package.json +1 -1
  27. package/src/apis/index.ts +0 -1
  28. package/src/models/AddressFrontendResource.ts +3 -2
  29. package/src/models/AddressResource.ts +5 -5
  30. package/src/models/ExternalApiLogResource.ts +2 -3
  31. package/src/models/StoreCartRequest.ts +4 -6
  32. package/src/models/StoreCartRequestShippingAddress.ts +8 -12
  33. package/src/models/StoreFrontendResource.ts +6 -4
  34. package/src/models/StoreResource.ts +6 -4
  35. package/src/models/StoreSpecialDateFrontendResource.ts +4 -3
  36. package/src/models/UpdateCartRequest.ts +4 -6
  37. package/src/models/index.ts +0 -4
  38. package/dist/apis/CouponsApi.d.ts +0 -33
  39. package/dist/apis/CouponsApi.js +0 -138
  40. package/dist/models/VerifyCouponRequest.d.ts +0 -63
  41. package/dist/models/VerifyCouponRequest.js +0 -64
  42. package/dist/models/VerifyCouponRequestProductsInner.d.ts +0 -38
  43. package/dist/models/VerifyCouponRequestProductsInner.js +0 -51
  44. package/dist/models/VerifyCouponResource.d.ts +0 -38
  45. package/dist/models/VerifyCouponResource.js +0 -55
  46. package/dist/models/VerifyCouponResourceArrayResponse.d.ts +0 -33
  47. package/dist/models/VerifyCouponResourceArrayResponse.js +0 -50
  48. package/docs/CouponsApi.md +0 -74
  49. package/docs/VerifyCouponRequest.md +0 -44
  50. package/docs/VerifyCouponRequestProductsInner.md +0 -36
  51. package/docs/VerifyCouponResource.md +0 -36
  52. package/docs/VerifyCouponResourceArrayResponse.md +0 -34
  53. package/src/apis/CouponsApi.ts +0 -77
  54. package/src/models/VerifyCouponRequest.ts +0 -115
  55. package/src/models/VerifyCouponRequestProductsInner.ts +0 -73
  56. package/src/models/VerifyCouponResource.ts +0 -75
  57. package/src/models/VerifyCouponResourceArrayResponse.ts +0 -73
@@ -124,13 +124,13 @@ export interface StoreCartRequest {
124
124
  * @type {StoreCartRequestShippingAddress}
125
125
  * @memberof StoreCartRequest
126
126
  */
127
- shippingAddress: StoreCartRequestShippingAddress;
127
+ shippingAddress?: StoreCartRequestShippingAddress;
128
128
  /**
129
129
  *
130
130
  * @type {StoreCartRequestShippingAddress}
131
131
  * @memberof StoreCartRequest
132
132
  */
133
- billingAddress: StoreCartRequestShippingAddress;
133
+ billingAddress?: StoreCartRequestShippingAddress;
134
134
  }
135
135
 
136
136
 
@@ -166,8 +166,6 @@ export type StoreCartRequestShippingTypeEnum = typeof StoreCartRequestShippingTy
166
166
  export function instanceOfStoreCartRequest(value: object): value is StoreCartRequest {
167
167
  if (!('siteId' in value) || value['siteId'] === undefined) return false;
168
168
  if (!('source' in value) || value['source'] === undefined) return false;
169
- if (!('shippingAddress' in value) || value['shippingAddress'] === undefined) return false;
170
- if (!('billingAddress' in value) || value['billingAddress'] === undefined) return false;
171
169
  return true;
172
170
  }
173
171
 
@@ -194,8 +192,8 @@ export function StoreCartRequestFromJSONTyped(json: any, ignoreDiscriminator: bo
194
192
  'insuranceAmount': json['insurance_amount'] == null ? undefined : json['insurance_amount'],
195
193
  'overrideInsurance': json['override_insurance'] == null ? undefined : json['override_insurance'],
196
194
  'useAsBillingAddress': json['use_as_billing_address'] == null ? undefined : json['use_as_billing_address'],
197
- 'shippingAddress': StoreCartRequestShippingAddressFromJSON(json['shipping_address']),
198
- 'billingAddress': StoreCartRequestShippingAddressFromJSON(json['billing_address']),
195
+ 'shippingAddress': json['shipping_address'] == null ? undefined : StoreCartRequestShippingAddressFromJSON(json['shipping_address']),
196
+ 'billingAddress': json['billing_address'] == null ? undefined : StoreCartRequestShippingAddressFromJSON(json['billing_address']),
199
197
  };
200
198
  }
201
199
 
@@ -30,7 +30,7 @@ export interface StoreCartRequestShippingAddress {
30
30
  * @type {string}
31
31
  * @memberof StoreCartRequestShippingAddress
32
32
  */
33
- line1: string;
33
+ line1?: string | null;
34
34
  /**
35
35
  *
36
36
  * @type {string}
@@ -42,19 +42,19 @@ export interface StoreCartRequestShippingAddress {
42
42
  * @type {string}
43
43
  * @memberof StoreCartRequestShippingAddress
44
44
  */
45
- suburb: string;
45
+ suburb?: string | null;
46
46
  /**
47
47
  *
48
48
  * @type {string}
49
49
  * @memberof StoreCartRequestShippingAddress
50
50
  */
51
- state: string;
51
+ state?: string | null;
52
52
  /**
53
53
  *
54
54
  * @type {string}
55
55
  * @memberof StoreCartRequestShippingAddress
56
56
  */
57
- postcode: string;
57
+ postcode?: string | null;
58
58
  /**
59
59
  *
60
60
  * @type {string}
@@ -67,10 +67,6 @@ export interface StoreCartRequestShippingAddress {
67
67
  * Check if a given object implements the StoreCartRequestShippingAddress interface.
68
68
  */
69
69
  export function instanceOfStoreCartRequestShippingAddress(value: object): value is StoreCartRequestShippingAddress {
70
- if (!('line1' in value) || value['line1'] === undefined) return false;
71
- if (!('suburb' in value) || value['suburb'] === undefined) return false;
72
- if (!('state' in value) || value['state'] === undefined) return false;
73
- if (!('postcode' in value) || value['postcode'] === undefined) return false;
74
70
  return true;
75
71
  }
76
72
 
@@ -85,11 +81,11 @@ export function StoreCartRequestShippingAddressFromJSONTyped(json: any, ignoreDi
85
81
  return {
86
82
 
87
83
  'company': json['company'] == null ? undefined : json['company'],
88
- 'line1': json['line_1'],
84
+ 'line1': json['line_1'] == null ? undefined : json['line_1'],
89
85
  'line2': json['line_2'] == null ? undefined : json['line_2'],
90
- 'suburb': json['suburb'],
91
- 'state': json['state'],
92
- 'postcode': json['postcode'],
86
+ 'suburb': json['suburb'] == null ? undefined : json['suburb'],
87
+ 'state': json['state'] == null ? undefined : json['state'],
88
+ 'postcode': json['postcode'] == null ? undefined : json['postcode'],
93
89
  'country': json['country'] == null ? undefined : json['country'],
94
90
  };
95
91
  }
@@ -48,7 +48,7 @@ export interface StoreFrontendResource {
48
48
  * @type {string}
49
49
  * @memberof StoreFrontendResource
50
50
  */
51
- website?: string | null;
51
+ website: string;
52
52
  /**
53
53
  *
54
54
  * @type {string}
@@ -78,7 +78,7 @@ export interface StoreFrontendResource {
78
78
  * @type {string}
79
79
  * @memberof StoreFrontendResource
80
80
  */
81
- tagLine?: string | null;
81
+ tagLine: string;
82
82
  /**
83
83
  *
84
84
  * @type {string}
@@ -106,9 +106,11 @@ export function instanceOfStoreFrontendResource(value: object): value is StoreFr
106
106
  if (!('siteId' in value) || value['siteId'] === undefined) return false;
107
107
  if (!('name' in value) || value['name'] === undefined) return false;
108
108
  if (!('email' in value) || value['email'] === undefined) return false;
109
+ if (!('website' in value) || value['website'] === undefined) return false;
109
110
  if (!('phone' in value) || value['phone'] === undefined) return false;
110
111
  if (!('latitude' in value) || value['latitude'] === undefined) return false;
111
112
  if (!('longitude' in value) || value['longitude'] === undefined) return false;
113
+ if (!('tagLine' in value) || value['tagLine'] === undefined) return false;
112
114
  if (!('specialDates' in value) || value['specialDates'] === undefined) return false;
113
115
  if (!('suppliers' in value) || value['suppliers'] === undefined) return false;
114
116
  return true;
@@ -128,12 +130,12 @@ export function StoreFrontendResourceFromJSONTyped(json: any, ignoreDiscriminato
128
130
  'siteId': json['siteId'],
129
131
  'name': json['name'],
130
132
  'email': json['email'],
131
- 'website': json['website'] == null ? undefined : json['website'],
133
+ 'website': json['website'],
132
134
  'phone': json['phone'],
133
135
  'address': json['address'] == null ? undefined : json['address'],
134
136
  'latitude': json['latitude'],
135
137
  'longitude': json['longitude'],
136
- 'tagLine': json['tagLine'] == null ? undefined : json['tagLine'],
138
+ 'tagLine': json['tagLine'],
137
139
  'openingHours': json['openingHours'] == null ? undefined : json['openingHours'],
138
140
  'specialDates': json['specialDates'],
139
141
  'suppliers': json['suppliers'],
@@ -89,7 +89,7 @@ export interface StoreResource {
89
89
  * @type {string}
90
90
  * @memberof StoreResource
91
91
  */
92
- tagLine?: string | null;
92
+ tagLine: string;
93
93
  /**
94
94
  *
95
95
  * @type {string}
@@ -101,7 +101,7 @@ export interface StoreResource {
101
101
  * @type {string}
102
102
  * @memberof StoreResource
103
103
  */
104
- website?: string | null;
104
+ website: string;
105
105
  /**
106
106
  *
107
107
  * @type {string}
@@ -137,7 +137,9 @@ export function instanceOfStoreResource(value: object): value is StoreResource {
137
137
  if (!('phone' in value) || value['phone'] === undefined) return false;
138
138
  if (!('longitude' in value) || value['longitude'] === undefined) return false;
139
139
  if (!('latitude' in value) || value['latitude'] === undefined) return false;
140
+ if (!('tagLine' in value) || value['tagLine'] === undefined) return false;
140
141
  if (!('email' in value) || value['email'] === undefined) return false;
142
+ if (!('website' in value) || value['website'] === undefined) return false;
141
143
  if (!('suppliers' in value) || value['suppliers'] === undefined) return false;
142
144
  if (!('address' in value) || value['address'] === undefined) return false;
143
145
  if (!('specialDates' in value) || value['specialDates'] === undefined) return false;
@@ -160,9 +162,9 @@ export function StoreResourceFromJSONTyped(json: any, ignoreDiscriminator: boole
160
162
  'phone': json['phone'],
161
163
  'longitude': json['longitude'],
162
164
  'latitude': json['latitude'],
163
- 'tagLine': json['tag_line'] == null ? undefined : json['tag_line'],
165
+ 'tagLine': json['tag_line'],
164
166
  'email': json['email'],
165
- 'website': json['website'] == null ? undefined : json['website'],
167
+ 'website': json['website'],
166
168
  'openingHours': json['opening_hours'] == null ? undefined : json['opening_hours'],
167
169
  'suppliers': (json['suppliers'] == null ? null : (json['suppliers'] as Array<any>).map(SupplierLiteResourceFromJSON)),
168
170
  'address': AddressResourceFromJSON(json['address']),
@@ -39,10 +39,10 @@ export interface StoreSpecialDateFrontendResource {
39
39
  hours: string;
40
40
  /**
41
41
  *
42
- * @type {string}
42
+ * @type {object}
43
43
  * @memberof StoreSpecialDateFrontendResource
44
44
  */
45
- date?: string | null;
45
+ date: object;
46
46
  /**
47
47
  *
48
48
  * @type {boolean}
@@ -69,6 +69,7 @@ export interface StoreSpecialDateFrontendResource {
69
69
  export function instanceOfStoreSpecialDateFrontendResource(value: object): value is StoreSpecialDateFrontendResource {
70
70
  if (!('name' in value) || value['name'] === undefined) return false;
71
71
  if (!('hours' in value) || value['hours'] === undefined) return false;
72
+ if (!('date' in value) || value['date'] === undefined) return false;
72
73
  if (!('closed' in value) || value['closed'] === undefined) return false;
73
74
  if (!('displayStartDate' in value) || value['displayStartDate'] === undefined) return false;
74
75
  if (!('displayEndDate' in value) || value['displayEndDate'] === undefined) return false;
@@ -88,7 +89,7 @@ export function StoreSpecialDateFrontendResourceFromJSONTyped(json: any, ignoreD
88
89
  'id': json['id'] == null ? undefined : json['id'],
89
90
  'name': json['name'],
90
91
  'hours': json['hours'],
91
- 'date': json['date'] == null ? undefined : json['date'],
92
+ 'date': json['date'],
92
93
  'closed': json['closed'],
93
94
  'displayStartDate': json['displayStartDate'],
94
95
  'displayEndDate': json['displayEndDate'],
@@ -93,13 +93,13 @@ export interface UpdateCartRequest {
93
93
  * @type {StoreCartRequestShippingAddress}
94
94
  * @memberof UpdateCartRequest
95
95
  */
96
- shippingAddress: StoreCartRequestShippingAddress;
96
+ shippingAddress?: StoreCartRequestShippingAddress;
97
97
  /**
98
98
  *
99
99
  * @type {StoreCartRequestShippingAddress}
100
100
  * @memberof UpdateCartRequest
101
101
  */
102
- billingAddress: StoreCartRequestShippingAddress;
102
+ billingAddress?: StoreCartRequestShippingAddress;
103
103
  }
104
104
 
105
105
 
@@ -133,8 +133,6 @@ export type UpdateCartRequestShippingTypeEnum = typeof UpdateCartRequestShipping
133
133
  * Check if a given object implements the UpdateCartRequest interface.
134
134
  */
135
135
  export function instanceOfUpdateCartRequest(value: object): value is UpdateCartRequest {
136
- if (!('shippingAddress' in value) || value['shippingAddress'] === undefined) return false;
137
- if (!('billingAddress' in value) || value['billingAddress'] === undefined) return false;
138
136
  return true;
139
137
  }
140
138
 
@@ -157,8 +155,8 @@ export function UpdateCartRequestFromJSONTyped(json: any, ignoreDiscriminator: b
157
155
  'insuranceAmount': json['insurance_amount'] == null ? undefined : json['insurance_amount'],
158
156
  'overrideInsurance': json['override_insurance'] == null ? undefined : json['override_insurance'],
159
157
  'useAsBillingAddress': json['use_as_billing_address'] == null ? undefined : json['use_as_billing_address'],
160
- 'shippingAddress': StoreCartRequestShippingAddressFromJSON(json['shipping_address']),
161
- 'billingAddress': StoreCartRequestShippingAddressFromJSON(json['billing_address']),
158
+ 'shippingAddress': json['shipping_address'] == null ? undefined : StoreCartRequestShippingAddressFromJSON(json['shipping_address']),
159
+ 'billingAddress': json['billing_address'] == null ? undefined : StoreCartRequestShippingAddressFromJSON(json['billing_address']),
162
160
  };
163
161
  }
164
162
 
@@ -463,10 +463,6 @@ export * from './UpdateStoreRequest';
463
463
  export * from './UpdateStoreRequestSpecialDatesInner';
464
464
  export * from './UpdateSupplierRequest';
465
465
  export * from './UpdateTagRequest';
466
- export * from './VerifyCouponRequest';
467
- export * from './VerifyCouponRequestProductsInner';
468
- export * from './VerifyCouponResource';
469
- export * from './VerifyCouponResourceArrayResponse';
470
466
  export * from './WishlistCheckResource';
471
467
  export * from './WishlistCheckResourceArrayResponse';
472
468
  export * from './WishlistToggleResource';
@@ -1,33 +0,0 @@
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
- }
@@ -1,138 +0,0 @@
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;
@@ -1,63 +0,0 @@
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;
@@ -1,64 +0,0 @@
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
- }
@@ -1,38 +0,0 @@
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;
@@ -1,51 +0,0 @@
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.instanceOfVerifyCouponRequestProductsInner = instanceOfVerifyCouponRequestProductsInner;
17
- exports.VerifyCouponRequestProductsInnerFromJSON = VerifyCouponRequestProductsInnerFromJSON;
18
- exports.VerifyCouponRequestProductsInnerFromJSONTyped = VerifyCouponRequestProductsInnerFromJSONTyped;
19
- exports.VerifyCouponRequestProductsInnerToJSON = VerifyCouponRequestProductsInnerToJSON;
20
- exports.VerifyCouponRequestProductsInnerToJSONTyped = VerifyCouponRequestProductsInnerToJSONTyped;
21
- /**
22
- * Check if a given object implements the VerifyCouponRequestProductsInner interface.
23
- */
24
- function instanceOfVerifyCouponRequestProductsInner(value) {
25
- return true;
26
- }
27
- function VerifyCouponRequestProductsInnerFromJSON(json) {
28
- return VerifyCouponRequestProductsInnerFromJSONTyped(json, false);
29
- }
30
- function VerifyCouponRequestProductsInnerFromJSONTyped(json, ignoreDiscriminator) {
31
- if (json == null) {
32
- return json;
33
- }
34
- return {
35
- 'productChildId': json['product_child_id'] == null ? undefined : json['product_child_id'],
36
- 'quantity': json['quantity'] == null ? undefined : json['quantity'],
37
- };
38
- }
39
- function VerifyCouponRequestProductsInnerToJSON(json) {
40
- return VerifyCouponRequestProductsInnerToJSONTyped(json, false);
41
- }
42
- function VerifyCouponRequestProductsInnerToJSONTyped(value, ignoreDiscriminator) {
43
- if (ignoreDiscriminator === void 0) { ignoreDiscriminator = false; }
44
- if (value == null) {
45
- return value;
46
- }
47
- return {
48
- 'product_child_id': value['productChildId'],
49
- 'quantity': value['quantity'],
50
- };
51
- }