@digital8/lighting-illusions-ts-sdk 0.0.1860 → 0.0.1862
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 +14 -0
- package/README.md +10 -3
- package/dist/apis/CartsApi.d.ts +6 -6
- package/dist/apis/CartsApi.js +3 -5
- package/dist/models/AddressFrontendResource.d.ts +2 -2
- package/dist/models/AddressFrontendResource.js +6 -2
- package/dist/models/AddressResource.d.ts +2 -2
- package/dist/models/AddressResource.js +3 -5
- package/dist/models/AttachCouponCartRequest.d.ts +2 -2
- package/dist/models/AttachCouponCartRequest.js +3 -3
- package/dist/models/CartResource.d.ts +34 -4
- package/dist/models/CartResource.js +32 -10
- package/dist/models/DetachCouponCartRequest.d.ts +32 -0
- package/dist/models/DetachCouponCartRequest.js +51 -0
- package/dist/models/DiscountType.d.ts +26 -0
- package/dist/models/DiscountType.js +52 -0
- package/dist/models/DiscountValueType.d.ts +25 -0
- package/dist/models/DiscountValueType.js +51 -0
- package/dist/models/ExternalApiLogResource.d.ts +1 -1
- package/dist/models/ExternalApiLogResource.js +1 -3
- package/dist/models/LineItemDiscountResource.d.ts +44 -0
- package/dist/models/LineItemDiscountResource.js +59 -0
- package/dist/models/LineItemDiscountResourceArrayResponse.d.ts +33 -0
- package/dist/models/LineItemDiscountResourceArrayResponse.js +50 -0
- package/dist/models/LineItemListResource.d.ts +27 -3
- package/dist/models/LineItemListResource.js +19 -3
- package/dist/models/ProductChildCartLiteResource.d.ts +70 -0
- package/dist/models/ProductChildCartLiteResource.js +77 -0
- package/dist/models/ProductChildCartLiteResourceArrayResponse.d.ts +33 -0
- package/dist/models/ProductChildCartLiteResourceArrayResponse.js +50 -0
- package/dist/models/StoreFrontendResource.d.ts +1 -1
- package/dist/models/StoreFrontendResource.js +3 -1
- package/dist/models/StoreResource.d.ts +1 -1
- package/dist/models/StoreResource.js +3 -1
- package/dist/models/index.d.ts +7 -0
- package/dist/models/index.js +7 -0
- package/docs/AddressResource.md +2 -2
- package/docs/AttachCouponCartRequest.md +2 -2
- package/docs/CartResource.md +16 -6
- package/docs/CartsApi.md +8 -8
- package/docs/DetachCouponCartRequest.md +34 -0
- package/docs/DiscountType.md +32 -0
- package/docs/DiscountValueType.md +32 -0
- package/docs/LineItemDiscountResource.md +38 -0
- package/docs/LineItemDiscountResourceArrayResponse.md +34 -0
- package/docs/LineItemListResource.md +9 -1
- package/docs/ProductChildCartLiteResource.md +46 -0
- package/docs/ProductChildCartLiteResourceArrayResponse.md +34 -0
- package/package.json +1 -1
- package/src/apis/CartsApi.ts +12 -14
- package/src/models/AddressFrontendResource.ts +6 -4
- package/src/models/AddressResource.ts +5 -6
- package/src/models/AttachCouponCartRequest.ts +5 -5
- package/src/models/CartResource.ts +60 -14
- package/src/models/DetachCouponCartRequest.ts +66 -0
- package/src/models/DiscountType.ts +54 -0
- package/src/models/DiscountValueType.ts +53 -0
- package/src/models/ExternalApiLogResource.ts +2 -3
- package/src/models/LineItemDiscountResource.ts +84 -0
- package/src/models/LineItemDiscountResourceArrayResponse.ts +73 -0
- package/src/models/LineItemListResource.ts +46 -10
- package/src/models/ProductChildCartLiteResource.ts +135 -0
- package/src/models/ProductChildCartLiteResourceArrayResponse.ts +73 -0
- package/src/models/StoreFrontendResource.ts +3 -2
- package/src/models/StoreResource.ts +3 -2
- package/src/models/index.ts +7 -0
|
@@ -36,6 +36,8 @@ function instanceOfStoreResource(value) {
|
|
|
36
36
|
return false;
|
|
37
37
|
if (!('latitude' in value) || value['latitude'] === undefined)
|
|
38
38
|
return false;
|
|
39
|
+
if (!('tagLine' in value) || value['tagLine'] === undefined)
|
|
40
|
+
return false;
|
|
39
41
|
if (!('email' in value) || value['email'] === undefined)
|
|
40
42
|
return false;
|
|
41
43
|
if (!('website' in value) || value['website'] === undefined)
|
|
@@ -62,7 +64,7 @@ function StoreResourceFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
62
64
|
'phone': json['phone'],
|
|
63
65
|
'longitude': json['longitude'],
|
|
64
66
|
'latitude': json['latitude'],
|
|
65
|
-
'tagLine': json['tag_line']
|
|
67
|
+
'tagLine': json['tag_line'],
|
|
66
68
|
'email': json['email'],
|
|
67
69
|
'website': json['website'],
|
|
68
70
|
'openingHours': json['opening_hours'] == null ? undefined : json['opening_hours'],
|
package/dist/models/index.d.ts
CHANGED
|
@@ -72,6 +72,7 @@ export * from './DestroyAttributeValueRequest';
|
|
|
72
72
|
export * from './DetachAccessoriesProductRangeRequest';
|
|
73
73
|
export * from './DetachAssetableOverlayTemplateRequest';
|
|
74
74
|
export * from './DetachAttributesProductRangeRequest';
|
|
75
|
+
export * from './DetachCouponCartRequest';
|
|
75
76
|
export * from './DetachDocumentablesDocumentRequest';
|
|
76
77
|
export * from './DetachDocumentablesDocumentRequestDocumentablesInner';
|
|
77
78
|
export * from './DetachDocumentsProductChildRequest';
|
|
@@ -79,6 +80,8 @@ export * from './DetachDocumentsProductRangeRequest';
|
|
|
79
80
|
export * from './DetachProductsProductCategoryRequest';
|
|
80
81
|
export * from './DetachStoresSupplierRequest';
|
|
81
82
|
export * from './DetachSuppliersStoreRequest';
|
|
83
|
+
export * from './DiscountType';
|
|
84
|
+
export * from './DiscountValueType';
|
|
82
85
|
export * from './DocumentFileForUploadResource';
|
|
83
86
|
export * from './DocumentFileForUploadResourceArrayResponse';
|
|
84
87
|
export * from './DocumentFrontendResource';
|
|
@@ -154,6 +157,8 @@ export * from './LabelResource';
|
|
|
154
157
|
export * from './LabelResourceArrayResponse';
|
|
155
158
|
export * from './LiAddressResource';
|
|
156
159
|
export * from './LiAddressResourceArrayResponse';
|
|
160
|
+
export * from './LineItemDiscountResource';
|
|
161
|
+
export * from './LineItemDiscountResourceArrayResponse';
|
|
157
162
|
export * from './LineItemListResource';
|
|
158
163
|
export * from './LineItemListResourceArrayResponse';
|
|
159
164
|
export * from './ListAssetsProductRegistrationRequest';
|
|
@@ -263,6 +268,8 @@ export * from './ProductChildAttributeGroupedResource';
|
|
|
263
268
|
export * from './ProductChildAttributeGroupedResourceArrayResponse';
|
|
264
269
|
export * from './ProductChildAttributeResource';
|
|
265
270
|
export * from './ProductChildAttributeResourceArrayResponse';
|
|
271
|
+
export * from './ProductChildCartLiteResource';
|
|
272
|
+
export * from './ProductChildCartLiteResourceArrayResponse';
|
|
266
273
|
export * from './ProductChildListResource';
|
|
267
274
|
export * from './ProductChildListResourceArrayResponse';
|
|
268
275
|
export * from './ProductChildLiteResource';
|
package/dist/models/index.js
CHANGED
|
@@ -90,6 +90,7 @@ __exportStar(require("./DestroyAttributeValueRequest"), exports);
|
|
|
90
90
|
__exportStar(require("./DetachAccessoriesProductRangeRequest"), exports);
|
|
91
91
|
__exportStar(require("./DetachAssetableOverlayTemplateRequest"), exports);
|
|
92
92
|
__exportStar(require("./DetachAttributesProductRangeRequest"), exports);
|
|
93
|
+
__exportStar(require("./DetachCouponCartRequest"), exports);
|
|
93
94
|
__exportStar(require("./DetachDocumentablesDocumentRequest"), exports);
|
|
94
95
|
__exportStar(require("./DetachDocumentablesDocumentRequestDocumentablesInner"), exports);
|
|
95
96
|
__exportStar(require("./DetachDocumentsProductChildRequest"), exports);
|
|
@@ -97,6 +98,8 @@ __exportStar(require("./DetachDocumentsProductRangeRequest"), exports);
|
|
|
97
98
|
__exportStar(require("./DetachProductsProductCategoryRequest"), exports);
|
|
98
99
|
__exportStar(require("./DetachStoresSupplierRequest"), exports);
|
|
99
100
|
__exportStar(require("./DetachSuppliersStoreRequest"), exports);
|
|
101
|
+
__exportStar(require("./DiscountType"), exports);
|
|
102
|
+
__exportStar(require("./DiscountValueType"), exports);
|
|
100
103
|
__exportStar(require("./DocumentFileForUploadResource"), exports);
|
|
101
104
|
__exportStar(require("./DocumentFileForUploadResourceArrayResponse"), exports);
|
|
102
105
|
__exportStar(require("./DocumentFrontendResource"), exports);
|
|
@@ -172,6 +175,8 @@ __exportStar(require("./LabelResource"), exports);
|
|
|
172
175
|
__exportStar(require("./LabelResourceArrayResponse"), exports);
|
|
173
176
|
__exportStar(require("./LiAddressResource"), exports);
|
|
174
177
|
__exportStar(require("./LiAddressResourceArrayResponse"), exports);
|
|
178
|
+
__exportStar(require("./LineItemDiscountResource"), exports);
|
|
179
|
+
__exportStar(require("./LineItemDiscountResourceArrayResponse"), exports);
|
|
175
180
|
__exportStar(require("./LineItemListResource"), exports);
|
|
176
181
|
__exportStar(require("./LineItemListResourceArrayResponse"), exports);
|
|
177
182
|
__exportStar(require("./ListAssetsProductRegistrationRequest"), exports);
|
|
@@ -281,6 +286,8 @@ __exportStar(require("./ProductChildAttributeGroupedResource"), exports);
|
|
|
281
286
|
__exportStar(require("./ProductChildAttributeGroupedResourceArrayResponse"), exports);
|
|
282
287
|
__exportStar(require("./ProductChildAttributeResource"), exports);
|
|
283
288
|
__exportStar(require("./ProductChildAttributeResourceArrayResponse"), exports);
|
|
289
|
+
__exportStar(require("./ProductChildCartLiteResource"), exports);
|
|
290
|
+
__exportStar(require("./ProductChildCartLiteResourceArrayResponse"), exports);
|
|
284
291
|
__exportStar(require("./ProductChildListResource"), exports);
|
|
285
292
|
__exportStar(require("./ProductChildListResourceArrayResponse"), exports);
|
|
286
293
|
__exportStar(require("./ProductChildLiteResource"), exports);
|
package/docs/AddressResource.md
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
Name | Type
|
|
8
8
|
------------ | -------------
|
|
9
9
|
`id` | number
|
|
10
|
-
`
|
|
10
|
+
`sourceAddressId` | string
|
|
11
11
|
`company` | string
|
|
12
12
|
`line1` | string
|
|
13
13
|
`line2` | string
|
|
@@ -25,7 +25,7 @@ import type { AddressResource } from '@digital8/lighting-illusions-ts-sdk'
|
|
|
25
25
|
// TODO: Update the object below with actual values
|
|
26
26
|
const example = {
|
|
27
27
|
"id": null,
|
|
28
|
-
"
|
|
28
|
+
"sourceAddressId": null,
|
|
29
29
|
"company": null,
|
|
30
30
|
"line1": null,
|
|
31
31
|
"line2": null,
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
Name | Type
|
|
8
8
|
------------ | -------------
|
|
9
|
-
`
|
|
9
|
+
`couponIds` | Array<number>
|
|
10
10
|
|
|
11
11
|
## Example
|
|
12
12
|
|
|
@@ -15,7 +15,7 @@ import type { AttachCouponCartRequest } from '@digital8/lighting-illusions-ts-sd
|
|
|
15
15
|
|
|
16
16
|
// TODO: Update the object below with actual values
|
|
17
17
|
const example = {
|
|
18
|
-
"
|
|
18
|
+
"couponIds": null,
|
|
19
19
|
} satisfies AttachCouponCartRequest
|
|
20
20
|
|
|
21
21
|
console.log(example)
|
package/docs/CartResource.md
CHANGED
|
@@ -31,10 +31,15 @@ Name | Type
|
|
|
31
31
|
`coupons` | object
|
|
32
32
|
`shippingAddress` | [AddressResource](AddressResource.md)
|
|
33
33
|
`billingAddress` | [AddressResource](AddressResource.md)
|
|
34
|
-
`subtotal` | number
|
|
35
34
|
`discountPreview` | number
|
|
36
|
-
`
|
|
37
|
-
`
|
|
35
|
+
`subtotal` | number
|
|
36
|
+
`shippingAmount` | number
|
|
37
|
+
`total` | number
|
|
38
|
+
`discountAmount` | number
|
|
39
|
+
`productDiscountAmount` | number
|
|
40
|
+
`shippingDiscountAmount` | number
|
|
41
|
+
`cartDiscountAmount` | number
|
|
42
|
+
`finalTotalAmount` | number
|
|
38
43
|
`status` | string
|
|
39
44
|
|
|
40
45
|
## Example
|
|
@@ -69,10 +74,15 @@ const example = {
|
|
|
69
74
|
"coupons": null,
|
|
70
75
|
"shippingAddress": null,
|
|
71
76
|
"billingAddress": null,
|
|
72
|
-
"subtotal": null,
|
|
73
77
|
"discountPreview": null,
|
|
74
|
-
"
|
|
75
|
-
"
|
|
78
|
+
"subtotal": null,
|
|
79
|
+
"shippingAmount": null,
|
|
80
|
+
"total": null,
|
|
81
|
+
"discountAmount": null,
|
|
82
|
+
"productDiscountAmount": null,
|
|
83
|
+
"shippingDiscountAmount": null,
|
|
84
|
+
"cartDiscountAmount": null,
|
|
85
|
+
"finalTotalAmount": null,
|
|
76
86
|
"status": null,
|
|
77
87
|
} satisfies CartResource
|
|
78
88
|
|
package/docs/CartsApi.md
CHANGED
|
@@ -7,7 +7,7 @@ All URIs are relative to *http://localhost/api*
|
|
|
7
7
|
| [**attachCouponCart**](CartsApi.md#attachcouponcartoperation) | **POST** /admin-api/carts/{cart}/coupons/attach | Auto-generated: attachCouponCart |
|
|
8
8
|
| [**attachItemCart**](CartsApi.md#attachitemcartoperation) | **POST** /admin-api/carts/{cart}/items/attach | Auto-generated: attachItemCart |
|
|
9
9
|
| [**destroyCart**](CartsApi.md#destroycart) | **DELETE** /admin-api/carts/{cart}/delete | Auto-generated: destroyCart |
|
|
10
|
-
| [**detachCouponCart**](CartsApi.md#
|
|
10
|
+
| [**detachCouponCart**](CartsApi.md#detachcouponcartoperation) | **DELETE** /admin-api/carts/{cart}/coupons/detach | Auto-generated: detachCouponCart |
|
|
11
11
|
| [**detachItemCart**](CartsApi.md#detachitemcart) | **DELETE** /admin-api/carts/{cart}/items/{lineItem}/detach | Auto-generated: detachItemCart |
|
|
12
12
|
| [**indexCart**](CartsApi.md#indexcartoperation) | **POST** /admin-api/carts/list | Auto-generated: indexCart |
|
|
13
13
|
| [**sendPaymentLinkCart**](CartsApi.md#sendpaymentlinkcart) | **POST** /admin-api/carts/{cart}/send-payment-link | Auto-generated: sendPaymentLinkCart |
|
|
@@ -221,7 +221,7 @@ No authorization required
|
|
|
221
221
|
|
|
222
222
|
## detachCouponCart
|
|
223
223
|
|
|
224
|
-
> CartResource detachCouponCart(cart,
|
|
224
|
+
> CartResource detachCouponCart(cart, detachCouponCartRequest)
|
|
225
225
|
|
|
226
226
|
Auto-generated: detachCouponCart
|
|
227
227
|
|
|
@@ -232,7 +232,7 @@ import {
|
|
|
232
232
|
Configuration,
|
|
233
233
|
CartsApi,
|
|
234
234
|
} from '@digital8/lighting-illusions-ts-sdk';
|
|
235
|
-
import type {
|
|
235
|
+
import type { DetachCouponCartOperationRequest } from '@digital8/lighting-illusions-ts-sdk';
|
|
236
236
|
|
|
237
237
|
async function example() {
|
|
238
238
|
console.log("🚀 Testing @digital8/lighting-illusions-ts-sdk SDK...");
|
|
@@ -241,9 +241,9 @@ async function example() {
|
|
|
241
241
|
const body = {
|
|
242
242
|
// number | The id of the cart
|
|
243
243
|
cart: 56,
|
|
244
|
-
//
|
|
245
|
-
|
|
246
|
-
} satisfies
|
|
244
|
+
// DetachCouponCartRequest (optional)
|
|
245
|
+
detachCouponCartRequest: ...,
|
|
246
|
+
} satisfies DetachCouponCartOperationRequest;
|
|
247
247
|
|
|
248
248
|
try {
|
|
249
249
|
const data = await api.detachCouponCart(body);
|
|
@@ -263,7 +263,7 @@ example().catch(console.error);
|
|
|
263
263
|
| Name | Type | Description | Notes |
|
|
264
264
|
|------------- | ------------- | ------------- | -------------|
|
|
265
265
|
| **cart** | `number` | The id of the cart | [Defaults to `undefined`] |
|
|
266
|
-
| **
|
|
266
|
+
| **detachCouponCartRequest** | [DetachCouponCartRequest](DetachCouponCartRequest.md) | | [Optional] |
|
|
267
267
|
|
|
268
268
|
### Return type
|
|
269
269
|
|
|
@@ -275,7 +275,7 @@ No authorization required
|
|
|
275
275
|
|
|
276
276
|
### HTTP request headers
|
|
277
277
|
|
|
278
|
-
- **Content-Type**:
|
|
278
|
+
- **Content-Type**: `application/json`
|
|
279
279
|
- **Accept**: `application/json`
|
|
280
280
|
|
|
281
281
|
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
|
|
2
|
+
# DetachCouponCartRequest
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`couponIds` | Array<number>
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import type { DetachCouponCartRequest } from '@digital8/lighting-illusions-ts-sdk'
|
|
15
|
+
|
|
16
|
+
// TODO: Update the object below with actual values
|
|
17
|
+
const example = {
|
|
18
|
+
"couponIds": null,
|
|
19
|
+
} satisfies DetachCouponCartRequest
|
|
20
|
+
|
|
21
|
+
console.log(example)
|
|
22
|
+
|
|
23
|
+
// Convert the instance to a JSON string
|
|
24
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
25
|
+
console.log(exampleJSON)
|
|
26
|
+
|
|
27
|
+
// Parse the JSON string back to an object
|
|
28
|
+
const exampleParsed = JSON.parse(exampleJSON) as DetachCouponCartRequest
|
|
29
|
+
console.log(exampleParsed)
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
33
|
+
|
|
34
|
+
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
|
|
2
|
+
# DiscountType
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
|
|
10
|
+
## Example
|
|
11
|
+
|
|
12
|
+
```typescript
|
|
13
|
+
import type { DiscountType } from '@digital8/lighting-illusions-ts-sdk'
|
|
14
|
+
|
|
15
|
+
// TODO: Update the object below with actual values
|
|
16
|
+
const example = {
|
|
17
|
+
} satisfies DiscountType
|
|
18
|
+
|
|
19
|
+
console.log(example)
|
|
20
|
+
|
|
21
|
+
// Convert the instance to a JSON string
|
|
22
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
23
|
+
console.log(exampleJSON)
|
|
24
|
+
|
|
25
|
+
// Parse the JSON string back to an object
|
|
26
|
+
const exampleParsed = JSON.parse(exampleJSON) as DiscountType
|
|
27
|
+
console.log(exampleParsed)
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
31
|
+
|
|
32
|
+
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
|
|
2
|
+
# DiscountValueType
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
|
|
10
|
+
## Example
|
|
11
|
+
|
|
12
|
+
```typescript
|
|
13
|
+
import type { DiscountValueType } from '@digital8/lighting-illusions-ts-sdk'
|
|
14
|
+
|
|
15
|
+
// TODO: Update the object below with actual values
|
|
16
|
+
const example = {
|
|
17
|
+
} satisfies DiscountValueType
|
|
18
|
+
|
|
19
|
+
console.log(example)
|
|
20
|
+
|
|
21
|
+
// Convert the instance to a JSON string
|
|
22
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
23
|
+
console.log(exampleJSON)
|
|
24
|
+
|
|
25
|
+
// Parse the JSON string back to an object
|
|
26
|
+
const exampleParsed = JSON.parse(exampleJSON) as DiscountValueType
|
|
27
|
+
console.log(exampleParsed)
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
31
|
+
|
|
32
|
+
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
|
|
2
|
+
# LineItemDiscountResource
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`id` | number
|
|
10
|
+
`name` | string
|
|
11
|
+
`discountTotal` | number
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
import type { LineItemDiscountResource } from '@digital8/lighting-illusions-ts-sdk'
|
|
17
|
+
|
|
18
|
+
// TODO: Update the object below with actual values
|
|
19
|
+
const example = {
|
|
20
|
+
"id": null,
|
|
21
|
+
"name": null,
|
|
22
|
+
"discountTotal": null,
|
|
23
|
+
} satisfies LineItemDiscountResource
|
|
24
|
+
|
|
25
|
+
console.log(example)
|
|
26
|
+
|
|
27
|
+
// Convert the instance to a JSON string
|
|
28
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
29
|
+
console.log(exampleJSON)
|
|
30
|
+
|
|
31
|
+
// Parse the JSON string back to an object
|
|
32
|
+
const exampleParsed = JSON.parse(exampleJSON) as LineItemDiscountResource
|
|
33
|
+
console.log(exampleParsed)
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
37
|
+
|
|
38
|
+
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
|
|
2
|
+
# LineItemDiscountResourceArrayResponse
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`data` | [Array<LineItemDiscountResource>](LineItemDiscountResource.md)
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import type { LineItemDiscountResourceArrayResponse } from '@digital8/lighting-illusions-ts-sdk'
|
|
15
|
+
|
|
16
|
+
// TODO: Update the object below with actual values
|
|
17
|
+
const example = {
|
|
18
|
+
"data": null,
|
|
19
|
+
} satisfies LineItemDiscountResourceArrayResponse
|
|
20
|
+
|
|
21
|
+
console.log(example)
|
|
22
|
+
|
|
23
|
+
// Convert the instance to a JSON string
|
|
24
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
25
|
+
console.log(exampleJSON)
|
|
26
|
+
|
|
27
|
+
// Parse the JSON string back to an object
|
|
28
|
+
const exampleParsed = JSON.parse(exampleJSON) as LineItemDiscountResourceArrayResponse
|
|
29
|
+
console.log(exampleParsed)
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
33
|
+
|
|
34
|
+
|
|
@@ -9,7 +9,11 @@ Name | Type
|
|
|
9
9
|
`id` | number
|
|
10
10
|
`quantity` | number
|
|
11
11
|
`productPrice` | number
|
|
12
|
-
`
|
|
12
|
+
`productDiscount` | number
|
|
13
|
+
`totalDiscount` | number
|
|
14
|
+
`lineSubtotal` | number
|
|
15
|
+
`discounts` | object
|
|
16
|
+
`productChild` | [ProductChildCartLiteResource](ProductChildCartLiteResource.md)
|
|
13
17
|
|
|
14
18
|
## Example
|
|
15
19
|
|
|
@@ -21,6 +25,10 @@ const example = {
|
|
|
21
25
|
"id": null,
|
|
22
26
|
"quantity": null,
|
|
23
27
|
"productPrice": null,
|
|
28
|
+
"productDiscount": null,
|
|
29
|
+
"totalDiscount": null,
|
|
30
|
+
"lineSubtotal": null,
|
|
31
|
+
"discounts": null,
|
|
24
32
|
"productChild": null,
|
|
25
33
|
} satisfies LineItemListResource
|
|
26
34
|
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
|
|
2
|
+
# ProductChildCartLiteResource
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`id` | number
|
|
10
|
+
`parentId` | number
|
|
11
|
+
`sku` | string
|
|
12
|
+
`model` | string
|
|
13
|
+
`name` | string
|
|
14
|
+
`thumbnail` | [AssetLiteResource](AssetLiteResource.md)
|
|
15
|
+
`label` | [LabelResource](LabelResource.md)
|
|
16
|
+
|
|
17
|
+
## Example
|
|
18
|
+
|
|
19
|
+
```typescript
|
|
20
|
+
import type { ProductChildCartLiteResource } from '@digital8/lighting-illusions-ts-sdk'
|
|
21
|
+
|
|
22
|
+
// TODO: Update the object below with actual values
|
|
23
|
+
const example = {
|
|
24
|
+
"id": null,
|
|
25
|
+
"parentId": null,
|
|
26
|
+
"sku": null,
|
|
27
|
+
"model": null,
|
|
28
|
+
"name": null,
|
|
29
|
+
"thumbnail": null,
|
|
30
|
+
"label": null,
|
|
31
|
+
} satisfies ProductChildCartLiteResource
|
|
32
|
+
|
|
33
|
+
console.log(example)
|
|
34
|
+
|
|
35
|
+
// Convert the instance to a JSON string
|
|
36
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
37
|
+
console.log(exampleJSON)
|
|
38
|
+
|
|
39
|
+
// Parse the JSON string back to an object
|
|
40
|
+
const exampleParsed = JSON.parse(exampleJSON) as ProductChildCartLiteResource
|
|
41
|
+
console.log(exampleParsed)
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
45
|
+
|
|
46
|
+
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
|
|
2
|
+
# ProductChildCartLiteResourceArrayResponse
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`data` | [Array<ProductChildCartLiteResource>](ProductChildCartLiteResource.md)
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import type { ProductChildCartLiteResourceArrayResponse } from '@digital8/lighting-illusions-ts-sdk'
|
|
15
|
+
|
|
16
|
+
// TODO: Update the object below with actual values
|
|
17
|
+
const example = {
|
|
18
|
+
"data": null,
|
|
19
|
+
} satisfies ProductChildCartLiteResourceArrayResponse
|
|
20
|
+
|
|
21
|
+
console.log(example)
|
|
22
|
+
|
|
23
|
+
// Convert the instance to a JSON string
|
|
24
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
25
|
+
console.log(exampleJSON)
|
|
26
|
+
|
|
27
|
+
// Parse the JSON string back to an object
|
|
28
|
+
const exampleParsed = JSON.parse(exampleJSON) as ProductChildCartLiteResourceArrayResponse
|
|
29
|
+
console.log(exampleParsed)
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
33
|
+
|
|
34
|
+
|
package/package.json
CHANGED
package/src/apis/CartsApi.ts
CHANGED
|
@@ -18,6 +18,7 @@ import type {
|
|
|
18
18
|
AttachCouponCartRequest,
|
|
19
19
|
AttachItemCartRequest,
|
|
20
20
|
CartResource,
|
|
21
|
+
DetachCouponCartRequest,
|
|
21
22
|
GenericResponse,
|
|
22
23
|
IndexCartRequest,
|
|
23
24
|
PaginatedCartListResourceResponse,
|
|
@@ -32,6 +33,8 @@ import {
|
|
|
32
33
|
AttachItemCartRequestToJSON,
|
|
33
34
|
CartResourceFromJSON,
|
|
34
35
|
CartResourceToJSON,
|
|
36
|
+
DetachCouponCartRequestFromJSON,
|
|
37
|
+
DetachCouponCartRequestToJSON,
|
|
35
38
|
GenericResponseFromJSON,
|
|
36
39
|
GenericResponseToJSON,
|
|
37
40
|
IndexCartRequestFromJSON,
|
|
@@ -60,9 +63,9 @@ export interface DestroyCartRequest {
|
|
|
60
63
|
cart: number;
|
|
61
64
|
}
|
|
62
65
|
|
|
63
|
-
export interface
|
|
66
|
+
export interface DetachCouponCartOperationRequest {
|
|
64
67
|
cart: number;
|
|
65
|
-
|
|
68
|
+
detachCouponCartRequest?: DetachCouponCartRequest;
|
|
66
69
|
}
|
|
67
70
|
|
|
68
71
|
export interface DetachItemCartRequest {
|
|
@@ -246,7 +249,7 @@ export class CartsApi extends runtime.BaseAPI {
|
|
|
246
249
|
/**
|
|
247
250
|
* Creates request options for detachCouponCart without sending the request
|
|
248
251
|
*/
|
|
249
|
-
async detachCouponCartRequestOpts(requestParameters:
|
|
252
|
+
async detachCouponCartRequestOpts(requestParameters: DetachCouponCartOperationRequest): Promise<runtime.RequestOpts> {
|
|
250
253
|
if (requestParameters['cart'] == null) {
|
|
251
254
|
throw new runtime.RequiredError(
|
|
252
255
|
'cart',
|
|
@@ -254,34 +257,29 @@ export class CartsApi extends runtime.BaseAPI {
|
|
|
254
257
|
);
|
|
255
258
|
}
|
|
256
259
|
|
|
257
|
-
if (requestParameters['coupon'] == null) {
|
|
258
|
-
throw new runtime.RequiredError(
|
|
259
|
-
'coupon',
|
|
260
|
-
'Required parameter "coupon" was null or undefined when calling detachCouponCart().'
|
|
261
|
-
);
|
|
262
|
-
}
|
|
263
|
-
|
|
264
260
|
const queryParameters: any = {};
|
|
265
261
|
|
|
266
262
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
267
263
|
|
|
264
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
265
|
+
|
|
268
266
|
|
|
269
|
-
let urlPath = `/admin-api/carts/{cart}/coupons/
|
|
267
|
+
let urlPath = `/admin-api/carts/{cart}/coupons/detach`;
|
|
270
268
|
urlPath = urlPath.replace(`{${"cart"}}`, encodeURIComponent(String(requestParameters['cart'])));
|
|
271
|
-
urlPath = urlPath.replace(`{${"coupon"}}`, encodeURIComponent(String(requestParameters['coupon'])));
|
|
272
269
|
|
|
273
270
|
return {
|
|
274
271
|
path: urlPath,
|
|
275
272
|
method: 'DELETE',
|
|
276
273
|
headers: headerParameters,
|
|
277
274
|
query: queryParameters,
|
|
275
|
+
body: DetachCouponCartRequestToJSON(requestParameters['detachCouponCartRequest']),
|
|
278
276
|
};
|
|
279
277
|
}
|
|
280
278
|
|
|
281
279
|
/**
|
|
282
280
|
* Auto-generated: detachCouponCart
|
|
283
281
|
*/
|
|
284
|
-
async detachCouponCartRaw(requestParameters:
|
|
282
|
+
async detachCouponCartRaw(requestParameters: DetachCouponCartOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CartResource>> {
|
|
285
283
|
const requestOptions = await this.detachCouponCartRequestOpts(requestParameters);
|
|
286
284
|
const response = await this.request(requestOptions, initOverrides);
|
|
287
285
|
|
|
@@ -291,7 +289,7 @@ export class CartsApi extends runtime.BaseAPI {
|
|
|
291
289
|
/**
|
|
292
290
|
* Auto-generated: detachCouponCart
|
|
293
291
|
*/
|
|
294
|
-
async detachCouponCart(requestParameters:
|
|
292
|
+
async detachCouponCart(requestParameters: DetachCouponCartOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CartResource> {
|
|
295
293
|
const response = await this.detachCouponCartRaw(requestParameters, initOverrides);
|
|
296
294
|
return await response.value();
|
|
297
295
|
}
|
|
@@ -24,7 +24,7 @@ export interface AddressFrontendResource {
|
|
|
24
24
|
* @type {string}
|
|
25
25
|
* @memberof AddressFrontendResource
|
|
26
26
|
*/
|
|
27
|
-
company
|
|
27
|
+
company: string;
|
|
28
28
|
/**
|
|
29
29
|
*
|
|
30
30
|
* @type {string}
|
|
@@ -36,7 +36,7 @@ export interface AddressFrontendResource {
|
|
|
36
36
|
* @type {string}
|
|
37
37
|
* @memberof AddressFrontendResource
|
|
38
38
|
*/
|
|
39
|
-
line2
|
|
39
|
+
line2: string;
|
|
40
40
|
/**
|
|
41
41
|
*
|
|
42
42
|
* @type {string}
|
|
@@ -73,7 +73,9 @@ export interface AddressFrontendResource {
|
|
|
73
73
|
* Check if a given object implements the AddressFrontendResource interface.
|
|
74
74
|
*/
|
|
75
75
|
export function instanceOfAddressFrontendResource(value: object): value is AddressFrontendResource {
|
|
76
|
+
if (!('company' in value) || value['company'] === undefined) return false;
|
|
76
77
|
if (!('line1' in value) || value['line1'] === undefined) return false;
|
|
78
|
+
if (!('line2' in value) || value['line2'] === undefined) return false;
|
|
77
79
|
if (!('postcode' in value) || value['postcode'] === undefined) return false;
|
|
78
80
|
if (!('suburb' in value) || value['suburb'] === undefined) return false;
|
|
79
81
|
if (!('country' in value) || value['country'] === undefined) return false;
|
|
@@ -92,9 +94,9 @@ export function AddressFrontendResourceFromJSONTyped(json: any, ignoreDiscrimina
|
|
|
92
94
|
}
|
|
93
95
|
return {
|
|
94
96
|
|
|
95
|
-
'company': json['company']
|
|
97
|
+
'company': json['company'],
|
|
96
98
|
'line1': json['line1'],
|
|
97
|
-
'line2': json['line2']
|
|
99
|
+
'line2': json['line2'],
|
|
98
100
|
'postcode': json['postcode'],
|
|
99
101
|
'suburb': json['suburb'],
|
|
100
102
|
'country': json['country'],
|