@digital8/lighting-illusions-ts-sdk 0.0.2161 → 0.0.2163
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 +18 -0
- package/README.md +12 -2
- package/dist/apis/LabelApi.d.ts +2 -3
- package/dist/apis/LabelApi.js +1 -2
- package/dist/apis/OrdersApi.d.ts +15 -0
- package/dist/apis/OrdersApi.js +59 -0
- package/dist/models/AdminOrderLineItemResource.d.ts +1 -8
- package/dist/models/AdminOrderLineItemResource.js +1 -8
- package/dist/models/CartCouponLiteResource.d.ts +56 -0
- package/dist/models/CartCouponLiteResource.js +67 -0
- package/dist/models/CartCouponLiteResourceArrayResponse.d.ts +33 -0
- package/dist/models/CartCouponLiteResourceArrayResponse.js +50 -0
- package/dist/models/CreateCartRequest.d.ts +0 -1
- package/dist/models/CreateCartRequest.js +0 -1
- package/dist/models/FrontendCartResource.d.ts +144 -0
- package/dist/models/FrontendCartResource.js +121 -0
- package/dist/models/FrontendCartResourceArrayResponse.d.ts +33 -0
- package/dist/models/FrontendCartResourceArrayResponse.js +50 -0
- package/dist/models/FrontendCartResourceCouponsInner.d.ts +56 -0
- package/dist/models/FrontendCartResourceCouponsInner.js +57 -0
- package/dist/models/FrontendLineItemResource.d.ts +81 -0
- package/dist/models/FrontendLineItemResource.js +82 -0
- package/dist/models/FrontendLineItemResourceArrayResponse.d.ts +33 -0
- package/dist/models/FrontendLineItemResourceArrayResponse.js +50 -0
- package/dist/models/FrontendOrderResource.d.ts +174 -0
- package/dist/models/FrontendOrderResource.js +141 -0
- package/dist/models/FrontendOrderResourceArrayResponse.d.ts +33 -0
- package/dist/models/FrontendOrderResourceArrayResponse.js +50 -0
- package/dist/models/LabelListResource.d.ts +4 -4
- package/dist/models/LabelListResource.js +4 -4
- package/dist/models/LabelResource.d.ts +4 -4
- package/dist/models/LabelResource.js +4 -4
- package/dist/models/OrderListResource.d.ts +2 -8
- package/dist/models/OrderListResource.js +3 -7
- package/dist/models/OrderStatusId.d.ts +6 -2
- package/dist/models/OrderStatusId.js +6 -2
- package/dist/models/PaymentSource.d.ts +1 -0
- package/dist/models/PaymentSource.js +2 -1
- package/dist/models/ProductChildLineItemLiteResource.d.ts +18 -0
- package/dist/models/ProductChildLineItemLiteResource.js +12 -0
- package/dist/models/ProductChildResource.d.ts +0 -6
- package/dist/models/ProductChildResource.js +0 -4
- package/dist/models/SearchAllFrontendComponentsRequest.d.ts +0 -15
- package/dist/models/SearchAllFrontendComponentsRequest.js +1 -11
- package/dist/models/SearchAllProductChildrenRequest.d.ts +0 -6
- package/dist/models/SearchAllProductChildrenRequest.js +0 -2
- package/dist/models/SearchProductChildrenRequest.d.ts +0 -14
- package/dist/models/SearchProductChildrenRequest.js +1 -10
- package/dist/models/ShippingType.d.ts +0 -1
- package/dist/models/ShippingType.js +0 -1
- package/dist/models/StoreFrontendResource.d.ts +1 -1
- package/dist/models/StoreFrontendResource.js +1 -3
- package/dist/models/StoreResource.d.ts +1 -1
- package/dist/models/StoreResource.js +3 -1
- package/dist/models/StoreSpecialDateResource.d.ts +2 -2
- package/dist/models/StoreSpecialDateResource.js +1 -3
- package/dist/models/UpdateCartRequest.d.ts +0 -1
- package/dist/models/UpdateCartRequest.js +0 -1
- package/dist/models/UpdateOrderRequest.d.ts +0 -1
- package/dist/models/UpdateOrderRequest.js +0 -1
- package/dist/models/index.d.ts +9 -0
- package/dist/models/index.js +9 -0
- package/docs/AdminOrderLineItemResource.md +0 -2
- package/docs/CartCouponLiteResource.md +42 -0
- package/docs/CartCouponLiteResourceArrayResponse.md +34 -0
- package/docs/FrontendCartResource.md +70 -0
- package/docs/FrontendCartResourceArrayResponse.md +34 -0
- package/docs/FrontendCartResourceCouponsInner.md +42 -0
- package/docs/FrontendLineItemResource.md +50 -0
- package/docs/FrontendLineItemResourceArrayResponse.md +34 -0
- package/docs/FrontendOrderResource.md +80 -0
- package/docs/FrontendOrderResourceArrayResponse.md +34 -0
- package/docs/LabelApi.md +3 -3
- package/docs/LabelListResource.md +2 -2
- package/docs/LabelResource.md +2 -2
- package/docs/OrderListResource.md +2 -4
- package/docs/OrdersApi.md +66 -0
- package/docs/ProductChildLineItemLiteResource.md +6 -0
- package/docs/ProductChildResource.md +0 -2
- package/docs/SearchAllFrontendComponentsRequest.md +0 -2
- package/docs/SearchAllProductChildrenRequest.md +0 -2
- package/docs/SearchProductChildrenRequest.md +0 -2
- package/docs/StoreSpecialDateResource.md +1 -1
- package/package.json +1 -1
- package/src/apis/LabelApi.ts +3 -8
- package/src/apis/OrdersApi.ts +49 -0
- package/src/models/AdminOrderLineItemResource.ts +2 -19
- package/src/models/CartCouponLiteResource.ts +102 -0
- package/src/models/CartCouponLiteResourceArrayResponse.ts +73 -0
- package/src/models/CreateCartRequest.ts +0 -1
- package/src/models/FrontendCartResource.ts +254 -0
- package/src/models/FrontendCartResourceArrayResponse.ts +73 -0
- package/src/models/FrontendCartResourceCouponsInner.ts +97 -0
- package/src/models/FrontendLineItemResource.ts +145 -0
- package/src/models/FrontendLineItemResourceArrayResponse.ts +73 -0
- package/src/models/FrontendOrderResource.ts +299 -0
- package/src/models/FrontendOrderResourceArrayResponse.ts +73 -0
- package/src/models/LabelListResource.ts +8 -8
- package/src/models/LabelResource.ts +8 -8
- package/src/models/OrderListResource.ts +5 -14
- package/src/models/OrderStatusId.ts +6 -2
- package/src/models/PaymentSource.ts +2 -1
- package/src/models/ProductChildLineItemLiteResource.ts +27 -0
- package/src/models/ProductChildResource.ts +0 -9
- package/src/models/SearchAllFrontendComponentsRequest.ts +0 -18
- package/src/models/SearchAllProductChildrenRequest.ts +0 -8
- package/src/models/SearchProductChildrenRequest.ts +0 -17
- package/src/models/ShippingType.ts +0 -1
- package/src/models/StoreFrontendResource.ts +2 -3
- package/src/models/StoreResource.ts +3 -2
- package/src/models/StoreSpecialDateResource.ts +3 -4
- package/src/models/UpdateCartRequest.ts +0 -1
- package/src/models/UpdateOrderRequest.ts +0 -1
- package/src/models/index.ts +9 -0
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
|
|
2
|
+
# FrontendLineItemResource
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`id` | number
|
|
10
|
+
`quantity` | number
|
|
11
|
+
`productPrice` | number
|
|
12
|
+
`subtotalAmount` | number
|
|
13
|
+
`totalAmount` | number
|
|
14
|
+
`promotionalSaving` | number
|
|
15
|
+
`isAvailable` | boolean
|
|
16
|
+
`isInStock` | boolean
|
|
17
|
+
`productChild` | [ProductChildLineItemLiteResource](ProductChildLineItemLiteResource.md)
|
|
18
|
+
|
|
19
|
+
## Example
|
|
20
|
+
|
|
21
|
+
```typescript
|
|
22
|
+
import type { FrontendLineItemResource } from '@digital8/lighting-illusions-ts-sdk'
|
|
23
|
+
|
|
24
|
+
// TODO: Update the object below with actual values
|
|
25
|
+
const example = {
|
|
26
|
+
"id": null,
|
|
27
|
+
"quantity": null,
|
|
28
|
+
"productPrice": null,
|
|
29
|
+
"subtotalAmount": null,
|
|
30
|
+
"totalAmount": null,
|
|
31
|
+
"promotionalSaving": null,
|
|
32
|
+
"isAvailable": null,
|
|
33
|
+
"isInStock": null,
|
|
34
|
+
"productChild": null,
|
|
35
|
+
} satisfies FrontendLineItemResource
|
|
36
|
+
|
|
37
|
+
console.log(example)
|
|
38
|
+
|
|
39
|
+
// Convert the instance to a JSON string
|
|
40
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
41
|
+
console.log(exampleJSON)
|
|
42
|
+
|
|
43
|
+
// Parse the JSON string back to an object
|
|
44
|
+
const exampleParsed = JSON.parse(exampleJSON) as FrontendLineItemResource
|
|
45
|
+
console.log(exampleParsed)
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
49
|
+
|
|
50
|
+
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
|
|
2
|
+
# FrontendLineItemResourceArrayResponse
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`data` | [Array<FrontendLineItemResource>](FrontendLineItemResource.md)
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import type { FrontendLineItemResourceArrayResponse } from '@digital8/lighting-illusions-ts-sdk'
|
|
15
|
+
|
|
16
|
+
// TODO: Update the object below with actual values
|
|
17
|
+
const example = {
|
|
18
|
+
"data": null,
|
|
19
|
+
} satisfies FrontendLineItemResourceArrayResponse
|
|
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 FrontendLineItemResourceArrayResponse
|
|
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,80 @@
|
|
|
1
|
+
|
|
2
|
+
# FrontendOrderResource
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`id` | number
|
|
10
|
+
`cartId` | number
|
|
11
|
+
`siteId` | number
|
|
12
|
+
`placedAt` | Date
|
|
13
|
+
`source` | string
|
|
14
|
+
`paymentToken` | string
|
|
15
|
+
`accessToken` | object
|
|
16
|
+
`shippingType` | string
|
|
17
|
+
`customer` | [CustomerListResource](CustomerListResource.md)
|
|
18
|
+
`status` | object
|
|
19
|
+
`shippingAddress` | [AddressResource](AddressResource.md)
|
|
20
|
+
`billingAddress` | [AddressResource](AddressResource.md)
|
|
21
|
+
`lineItems` | [Array<FrontendLineItemResource>](FrontendLineItemResource.md)
|
|
22
|
+
`coupons` | [Array<CartCouponLiteResource>](CartCouponLiteResource.md)
|
|
23
|
+
`subtotal` | number
|
|
24
|
+
`promotionalDiscount` | number
|
|
25
|
+
`couponSubtotalDiscount` | number
|
|
26
|
+
`couponShippingDiscount` | number
|
|
27
|
+
`shipping` | number
|
|
28
|
+
`transitInsurance` | number
|
|
29
|
+
`gst` | number
|
|
30
|
+
`grandTotal` | number
|
|
31
|
+
`amountPaid` | number
|
|
32
|
+
`amountDue` | number
|
|
33
|
+
|
|
34
|
+
## Example
|
|
35
|
+
|
|
36
|
+
```typescript
|
|
37
|
+
import type { FrontendOrderResource } from '@digital8/lighting-illusions-ts-sdk'
|
|
38
|
+
|
|
39
|
+
// TODO: Update the object below with actual values
|
|
40
|
+
const example = {
|
|
41
|
+
"id": null,
|
|
42
|
+
"cartId": null,
|
|
43
|
+
"siteId": null,
|
|
44
|
+
"placedAt": null,
|
|
45
|
+
"source": null,
|
|
46
|
+
"paymentToken": null,
|
|
47
|
+
"accessToken": null,
|
|
48
|
+
"shippingType": null,
|
|
49
|
+
"customer": null,
|
|
50
|
+
"status": null,
|
|
51
|
+
"shippingAddress": null,
|
|
52
|
+
"billingAddress": null,
|
|
53
|
+
"lineItems": null,
|
|
54
|
+
"coupons": null,
|
|
55
|
+
"subtotal": null,
|
|
56
|
+
"promotionalDiscount": null,
|
|
57
|
+
"couponSubtotalDiscount": null,
|
|
58
|
+
"couponShippingDiscount": null,
|
|
59
|
+
"shipping": null,
|
|
60
|
+
"transitInsurance": null,
|
|
61
|
+
"gst": null,
|
|
62
|
+
"grandTotal": null,
|
|
63
|
+
"amountPaid": null,
|
|
64
|
+
"amountDue": null,
|
|
65
|
+
} satisfies FrontendOrderResource
|
|
66
|
+
|
|
67
|
+
console.log(example)
|
|
68
|
+
|
|
69
|
+
// Convert the instance to a JSON string
|
|
70
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
71
|
+
console.log(exampleJSON)
|
|
72
|
+
|
|
73
|
+
// Parse the JSON string back to an object
|
|
74
|
+
const exampleParsed = JSON.parse(exampleJSON) as FrontendOrderResource
|
|
75
|
+
console.log(exampleParsed)
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
79
|
+
|
|
80
|
+
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
|
|
2
|
+
# FrontendOrderResourceArrayResponse
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`data` | [Array<FrontendOrderResource>](FrontendOrderResource.md)
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import type { FrontendOrderResourceArrayResponse } from '@digital8/lighting-illusions-ts-sdk'
|
|
15
|
+
|
|
16
|
+
// TODO: Update the object below with actual values
|
|
17
|
+
const example = {
|
|
18
|
+
"data": null,
|
|
19
|
+
} satisfies FrontendOrderResourceArrayResponse
|
|
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 FrontendOrderResourceArrayResponse
|
|
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/docs/LabelApi.md
CHANGED
|
@@ -80,7 +80,7 @@ No authorization required
|
|
|
80
80
|
|
|
81
81
|
## getAllLabel
|
|
82
82
|
|
|
83
|
-
>
|
|
83
|
+
> GenericResponse getAllLabel(searchLabelsRequest)
|
|
84
84
|
|
|
85
85
|
Auto-generated: getAllLabel
|
|
86
86
|
|
|
@@ -123,7 +123,7 @@ example().catch(console.error);
|
|
|
123
123
|
|
|
124
124
|
### Return type
|
|
125
125
|
|
|
126
|
-
[**
|
|
126
|
+
[**GenericResponse**](GenericResponse.md)
|
|
127
127
|
|
|
128
128
|
### Authorization
|
|
129
129
|
|
|
@@ -138,7 +138,7 @@ No authorization required
|
|
|
138
138
|
### HTTP response details
|
|
139
139
|
| Status code | Description | Response headers |
|
|
140
140
|
|-------------|-------------|------------------|
|
|
141
|
-
| **200** |
|
|
141
|
+
| **200** | \\JsonResponse<array{data: \\LabelLiteResource[]}> | - |
|
|
142
142
|
|
|
143
143
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
144
144
|
|
package/docs/LabelResource.md
CHANGED
|
@@ -17,8 +17,7 @@ Name | Type
|
|
|
17
17
|
`customer` | [CustomerListResource](CustomerListResource.md)
|
|
18
18
|
`status` | [OrderStatusLiteResource](OrderStatusLiteResource.md)
|
|
19
19
|
`lineItems` | [Array<LineItemListResource>](LineItemListResource.md)
|
|
20
|
-
`
|
|
21
|
-
`transactionsCount` | number
|
|
20
|
+
`transactions` | [Array<TransactionLiteResource>](TransactionLiteResource.md)
|
|
22
21
|
|
|
23
22
|
## Example
|
|
24
23
|
|
|
@@ -38,8 +37,7 @@ const example = {
|
|
|
38
37
|
"customer": null,
|
|
39
38
|
"status": null,
|
|
40
39
|
"lineItems": null,
|
|
41
|
-
"
|
|
42
|
-
"transactionsCount": null,
|
|
40
|
+
"transactions": null,
|
|
43
41
|
} satisfies OrderListResource
|
|
44
42
|
|
|
45
43
|
console.log(example)
|
package/docs/OrdersApi.md
CHANGED
|
@@ -12,6 +12,7 @@ All URIs are relative to *http://localhost/api*
|
|
|
12
12
|
| [**detachItemOrder**](OrdersApi.md#detachitemorder) | **DELETE** /admin-api/orders/{order}/line-items/{lineItem}/detach | Auto-generated: detachItemOrder |
|
|
13
13
|
| [**getAllOrder**](OrdersApi.md#getallorder) | **POST** /admin-api/orders/all | Auto-generated: getAllOrder |
|
|
14
14
|
| [**indexOrder**](OrdersApi.md#indexorder) | **POST** /admin-api/orders/list | Auto-generated: indexOrder |
|
|
15
|
+
| [**pdfOrder**](OrdersApi.md#pdforder) | **POST** /admin-api/orders/{order}/pdf | Auto-generated: pdfOrder |
|
|
15
16
|
| [**sendPaymentLinkOrder**](OrdersApi.md#sendpaymentlinkorder) | **POST** /admin-api/orders/{order}/send-payment-link | Auto-generated: sendPaymentLinkOrder |
|
|
16
17
|
| [**showOrder**](OrdersApi.md#showorder) | **GET** /admin-api/orders/{order} | Auto-generated: showOrder |
|
|
17
18
|
| [**statusesAllOrder**](OrdersApi.md#statusesallorder) | **POST** /admin-api/orders/statuses/all | Auto-generated: statusesAllOrder |
|
|
@@ -552,6 +553,71 @@ No authorization required
|
|
|
552
553
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
553
554
|
|
|
554
555
|
|
|
556
|
+
## pdfOrder
|
|
557
|
+
|
|
558
|
+
> GenericResponse pdfOrder(order)
|
|
559
|
+
|
|
560
|
+
Auto-generated: pdfOrder
|
|
561
|
+
|
|
562
|
+
### Example
|
|
563
|
+
|
|
564
|
+
```ts
|
|
565
|
+
import {
|
|
566
|
+
Configuration,
|
|
567
|
+
OrdersApi,
|
|
568
|
+
} from '@digital8/lighting-illusions-ts-sdk';
|
|
569
|
+
import type { PdfOrderRequest } from '@digital8/lighting-illusions-ts-sdk';
|
|
570
|
+
|
|
571
|
+
async function example() {
|
|
572
|
+
console.log("🚀 Testing @digital8/lighting-illusions-ts-sdk SDK...");
|
|
573
|
+
const api = new OrdersApi();
|
|
574
|
+
|
|
575
|
+
const body = {
|
|
576
|
+
// number | The id of the order
|
|
577
|
+
order: 56,
|
|
578
|
+
} satisfies PdfOrderRequest;
|
|
579
|
+
|
|
580
|
+
try {
|
|
581
|
+
const data = await api.pdfOrder(body);
|
|
582
|
+
console.log(data);
|
|
583
|
+
} catch (error) {
|
|
584
|
+
console.error(error);
|
|
585
|
+
}
|
|
586
|
+
}
|
|
587
|
+
|
|
588
|
+
// Run the test
|
|
589
|
+
example().catch(console.error);
|
|
590
|
+
```
|
|
591
|
+
|
|
592
|
+
### Parameters
|
|
593
|
+
|
|
594
|
+
|
|
595
|
+
| Name | Type | Description | Notes |
|
|
596
|
+
|------------- | ------------- | ------------- | -------------|
|
|
597
|
+
| **order** | `number` | The id of the order | [Defaults to `undefined`] |
|
|
598
|
+
|
|
599
|
+
### Return type
|
|
600
|
+
|
|
601
|
+
[**GenericResponse**](GenericResponse.md)
|
|
602
|
+
|
|
603
|
+
### Authorization
|
|
604
|
+
|
|
605
|
+
No authorization required
|
|
606
|
+
|
|
607
|
+
### HTTP request headers
|
|
608
|
+
|
|
609
|
+
- **Content-Type**: Not defined
|
|
610
|
+
- **Accept**: `application/json`
|
|
611
|
+
|
|
612
|
+
|
|
613
|
+
### HTTP response details
|
|
614
|
+
| Status code | Description | Response headers |
|
|
615
|
+
|-------------|-------------|------------------|
|
|
616
|
+
| **200** | \\Response | - |
|
|
617
|
+
|
|
618
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
619
|
+
|
|
620
|
+
|
|
555
621
|
## sendPaymentLinkOrder
|
|
556
622
|
|
|
557
623
|
> AdminOrderResource sendPaymentLinkOrder(order)
|
|
@@ -12,6 +12,9 @@ Name | Type
|
|
|
12
12
|
`model` | string
|
|
13
13
|
`modelNumber` | string
|
|
14
14
|
`name` | string
|
|
15
|
+
`parentName` | string
|
|
16
|
+
`variantName` | string
|
|
17
|
+
`slug` | string
|
|
15
18
|
`stock` | number
|
|
16
19
|
`salePrice` | number
|
|
17
20
|
`thumbnail` | [AssetLiteResource](AssetLiteResource.md)
|
|
@@ -30,6 +33,9 @@ const example = {
|
|
|
30
33
|
"model": null,
|
|
31
34
|
"modelNumber": null,
|
|
32
35
|
"name": null,
|
|
36
|
+
"parentName": null,
|
|
37
|
+
"variantName": null,
|
|
38
|
+
"slug": null,
|
|
33
39
|
"stock": null,
|
|
34
40
|
"salePrice": null,
|
|
35
41
|
"thumbnail": null,
|
|
@@ -8,7 +8,6 @@ Name | Type
|
|
|
8
8
|
------------ | -------------
|
|
9
9
|
`id` | number
|
|
10
10
|
`name` | string
|
|
11
|
-
`fullName` | string
|
|
12
11
|
`allowOversell` | boolean
|
|
13
12
|
`modelNumber` | string
|
|
14
13
|
`weight` | number
|
|
@@ -48,7 +47,6 @@ import type { ProductChildResource } from '@digital8/lighting-illusions-ts-sdk'
|
|
|
48
47
|
const example = {
|
|
49
48
|
"id": null,
|
|
50
49
|
"name": null,
|
|
51
|
-
"fullName": null,
|
|
52
50
|
"allowOversell": null,
|
|
53
51
|
"modelNumber": null,
|
|
54
52
|
"weight": null,
|
|
@@ -13,7 +13,6 @@ Name | Type
|
|
|
13
13
|
`relatedType` | string
|
|
14
14
|
`includesRelations` | boolean
|
|
15
15
|
`sitesId` | Array<string>
|
|
16
|
-
`pageType` | string
|
|
17
16
|
|
|
18
17
|
## Example
|
|
19
18
|
|
|
@@ -29,7 +28,6 @@ const example = {
|
|
|
29
28
|
"relatedType": null,
|
|
30
29
|
"includesRelations": null,
|
|
31
30
|
"sitesId": null,
|
|
32
|
-
"pageType": null,
|
|
33
31
|
} satisfies SearchAllFrontendComponentsRequest
|
|
34
32
|
|
|
35
33
|
console.log(example)
|
|
@@ -24,7 +24,6 @@ Name | Type
|
|
|
24
24
|
`enabledSitesId` | Array<string>
|
|
25
25
|
`siteDetailsSeoHasSeoTitle` | Array<string>
|
|
26
26
|
`siteDetailsSeoHasSeoDescription` | Array<string>
|
|
27
|
-
`omnisendSyncStatus` | Array<string>
|
|
28
27
|
|
|
29
28
|
## Example
|
|
30
29
|
|
|
@@ -51,7 +50,6 @@ const example = {
|
|
|
51
50
|
"enabledSitesId": null,
|
|
52
51
|
"siteDetailsSeoHasSeoTitle": null,
|
|
53
52
|
"siteDetailsSeoHasSeoDescription": null,
|
|
54
|
-
"omnisendSyncStatus": null,
|
|
55
53
|
} satisfies SearchAllProductChildrenRequest
|
|
56
54
|
|
|
57
55
|
console.log(example)
|
|
@@ -23,7 +23,6 @@ Name | Type
|
|
|
23
23
|
`enabledSitesId` | Array<string>
|
|
24
24
|
`siteDetailsSeoHasSeoTitle` | Array<string>
|
|
25
25
|
`siteDetailsSeoHasSeoDescription` | Array<string>
|
|
26
|
-
`omnisendSyncStatus` | string
|
|
27
26
|
`relatedId` | number
|
|
28
27
|
`relatedType` | string
|
|
29
28
|
`includesRelations` | boolean
|
|
@@ -52,7 +51,6 @@ const example = {
|
|
|
52
51
|
"enabledSitesId": null,
|
|
53
52
|
"siteDetailsSeoHasSeoTitle": null,
|
|
54
53
|
"siteDetailsSeoHasSeoDescription": null,
|
|
55
|
-
"omnisendSyncStatus": null,
|
|
56
54
|
"relatedId": null,
|
|
57
55
|
"relatedType": null,
|
|
58
56
|
"includesRelations": null,
|
package/package.json
CHANGED
package/src/apis/LabelApi.ts
CHANGED
|
@@ -23,11 +23,6 @@ import {
|
|
|
23
23
|
GenericResponseFromJSON,
|
|
24
24
|
GenericResponseToJSON,
|
|
25
25
|
} from '../models/GenericResponse';
|
|
26
|
-
import {
|
|
27
|
-
type LabelLiteResourceArrayResponse,
|
|
28
|
-
LabelLiteResourceArrayResponseFromJSON,
|
|
29
|
-
LabelLiteResourceArrayResponseToJSON,
|
|
30
|
-
} from '../models/LabelLiteResourceArrayResponse';
|
|
31
26
|
import {
|
|
32
27
|
type LabelResource,
|
|
33
28
|
LabelResourceFromJSON,
|
|
@@ -149,17 +144,17 @@ export class LabelApi extends runtime.BaseAPI {
|
|
|
149
144
|
/**
|
|
150
145
|
* Auto-generated: getAllLabel
|
|
151
146
|
*/
|
|
152
|
-
async getAllLabelRaw(requestParameters: GetAllLabelRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<
|
|
147
|
+
async getAllLabelRaw(requestParameters: GetAllLabelRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GenericResponse>> {
|
|
153
148
|
const requestOptions = await this.getAllLabelRequestOpts(requestParameters);
|
|
154
149
|
const response = await this.request(requestOptions, initOverrides);
|
|
155
150
|
|
|
156
|
-
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
|
151
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GenericResponseFromJSON(jsonValue));
|
|
157
152
|
}
|
|
158
153
|
|
|
159
154
|
/**
|
|
160
155
|
* Auto-generated: getAllLabel
|
|
161
156
|
*/
|
|
162
|
-
async getAllLabel(requestParameters: GetAllLabelRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<
|
|
157
|
+
async getAllLabel(requestParameters: GetAllLabelRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GenericResponse> {
|
|
163
158
|
const response = await this.getAllLabelRaw(requestParameters, initOverrides);
|
|
164
159
|
return await response.value();
|
|
165
160
|
}
|
package/src/apis/OrdersApi.ts
CHANGED
|
@@ -120,6 +120,10 @@ export interface IndexOrderRequest {
|
|
|
120
120
|
searchOrdersRequest?: SearchOrdersRequest;
|
|
121
121
|
}
|
|
122
122
|
|
|
123
|
+
export interface PdfOrderRequest {
|
|
124
|
+
order: number;
|
|
125
|
+
}
|
|
126
|
+
|
|
123
127
|
export interface SendPaymentLinkOrderRequest {
|
|
124
128
|
order: number;
|
|
125
129
|
}
|
|
@@ -506,6 +510,51 @@ export class OrdersApi extends runtime.BaseAPI {
|
|
|
506
510
|
return await response.value();
|
|
507
511
|
}
|
|
508
512
|
|
|
513
|
+
/**
|
|
514
|
+
* Creates request options for pdfOrder without sending the request
|
|
515
|
+
*/
|
|
516
|
+
async pdfOrderRequestOpts(requestParameters: PdfOrderRequest): Promise<runtime.RequestOpts> {
|
|
517
|
+
if (requestParameters['order'] == null) {
|
|
518
|
+
throw new runtime.RequiredError(
|
|
519
|
+
'order',
|
|
520
|
+
'Required parameter "order" was null or undefined when calling pdfOrder().'
|
|
521
|
+
);
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
const queryParameters: any = {};
|
|
525
|
+
|
|
526
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
527
|
+
|
|
528
|
+
|
|
529
|
+
let urlPath = `/admin-api/orders/{order}/pdf`;
|
|
530
|
+
urlPath = urlPath.replace('{order}', encodeURIComponent(String(requestParameters['order'])));
|
|
531
|
+
|
|
532
|
+
return {
|
|
533
|
+
path: urlPath,
|
|
534
|
+
method: 'POST',
|
|
535
|
+
headers: headerParameters,
|
|
536
|
+
query: queryParameters,
|
|
537
|
+
};
|
|
538
|
+
}
|
|
539
|
+
|
|
540
|
+
/**
|
|
541
|
+
* Auto-generated: pdfOrder
|
|
542
|
+
*/
|
|
543
|
+
async pdfOrderRaw(requestParameters: PdfOrderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GenericResponse>> {
|
|
544
|
+
const requestOptions = await this.pdfOrderRequestOpts(requestParameters);
|
|
545
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
546
|
+
|
|
547
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GenericResponseFromJSON(jsonValue));
|
|
548
|
+
}
|
|
549
|
+
|
|
550
|
+
/**
|
|
551
|
+
* Auto-generated: pdfOrder
|
|
552
|
+
*/
|
|
553
|
+
async pdfOrder(requestParameters: PdfOrderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GenericResponse> {
|
|
554
|
+
const response = await this.pdfOrderRaw(requestParameters, initOverrides);
|
|
555
|
+
return await response.value();
|
|
556
|
+
}
|
|
557
|
+
|
|
509
558
|
/**
|
|
510
559
|
* Creates request options for sendPaymentLinkOrder without sending the request
|
|
511
560
|
*/
|
|
@@ -13,13 +13,6 @@
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
import { mapValues } from '../runtime';
|
|
16
|
-
import type { LabelLiteResource } from './LabelLiteResource';
|
|
17
|
-
import {
|
|
18
|
-
LabelLiteResourceFromJSON,
|
|
19
|
-
LabelLiteResourceFromJSONTyped,
|
|
20
|
-
LabelLiteResourceToJSON,
|
|
21
|
-
LabelLiteResourceToJSONTyped,
|
|
22
|
-
} from './LabelLiteResource';
|
|
23
16
|
import type { ProductChildLineItemLiteResource } from './ProductChildLineItemLiteResource';
|
|
24
17
|
import {
|
|
25
18
|
ProductChildLineItemLiteResourceFromJSON,
|
|
@@ -57,13 +50,7 @@ export interface AdminOrderLineItemResource {
|
|
|
57
50
|
* @type {number}
|
|
58
51
|
* @memberof AdminOrderLineItemResource
|
|
59
52
|
*/
|
|
60
|
-
labelId
|
|
61
|
-
/**
|
|
62
|
-
*
|
|
63
|
-
* @type {LabelLiteResource}
|
|
64
|
-
* @memberof AdminOrderLineItemResource
|
|
65
|
-
*/
|
|
66
|
-
label: LabelLiteResource | null;
|
|
53
|
+
labelId?: number | null;
|
|
67
54
|
/**
|
|
68
55
|
*
|
|
69
56
|
* @type {number}
|
|
@@ -139,8 +126,6 @@ export function instanceOfAdminOrderLineItemResource(value: object): value is Ad
|
|
|
139
126
|
if (!('id' in value) || value['id'] === undefined) return false;
|
|
140
127
|
if (!('quantity' in value) || value['quantity'] === undefined) return false;
|
|
141
128
|
if (!('productPrice' in value) || value['productPrice'] === undefined) return false;
|
|
142
|
-
if (!('labelId' in value) || value['labelId'] === undefined) return false;
|
|
143
|
-
if (!('label' in value) || value['label'] === undefined) return false;
|
|
144
129
|
if (!('productDiscount' in value) || value['productDiscount'] === undefined) return false;
|
|
145
130
|
if (!('totalDiscount' in value) || value['totalDiscount'] === undefined) return false;
|
|
146
131
|
if (!('lineSubtotal' in value) || value['lineSubtotal'] === undefined) return false;
|
|
@@ -168,8 +153,7 @@ export function AdminOrderLineItemResourceFromJSONTyped(json: any, ignoreDiscrim
|
|
|
168
153
|
'id': json['id'],
|
|
169
154
|
'quantity': json['quantity'],
|
|
170
155
|
'productPrice': json['productPrice'],
|
|
171
|
-
'labelId': json['labelId'],
|
|
172
|
-
'label': LabelLiteResourceFromJSON(json['label']),
|
|
156
|
+
'labelId': json['labelId'] == null ? undefined : json['labelId'],
|
|
173
157
|
'productDiscount': json['productDiscount'],
|
|
174
158
|
'totalDiscount': json['totalDiscount'],
|
|
175
159
|
'lineSubtotal': json['lineSubtotal'],
|
|
@@ -199,7 +183,6 @@ export function AdminOrderLineItemResourceToJSONTyped(value?: AdminOrderLineItem
|
|
|
199
183
|
'quantity': value['quantity'],
|
|
200
184
|
'productPrice': value['productPrice'],
|
|
201
185
|
'labelId': value['labelId'],
|
|
202
|
-
'label': LabelLiteResourceToJSON(value['label']),
|
|
203
186
|
'productDiscount': value['productDiscount'],
|
|
204
187
|
'totalDiscount': value['totalDiscount'],
|
|
205
188
|
'lineSubtotal': value['lineSubtotal'],
|