@digital8/lighting-illusions-ts-sdk 0.0.2178 → 0.0.2179
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 -32
- package/README.md +12 -23
- package/dist/apis/OrdersApi.d.ts +15 -0
- package/dist/apis/OrdersApi.js +59 -0
- package/dist/apis/index.d.ts +0 -1
- package/dist/apis/index.js +0 -1
- package/dist/models/AddressFrontendResource.d.ts +1 -1
- package/dist/models/AddressFrontendResource.js +1 -3
- package/dist/models/AddressResource.d.ts +3 -3
- package/dist/models/AddressResource.js +4 -6
- 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 +1 -0
- package/dist/models/CreateCartRequest.js +1 -0
- package/dist/models/ExternalApiLogResource.d.ts +1 -1
- package/dist/models/ExternalApiLogResource.js +3 -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/OrderFulfillmentResource.d.ts +2 -2
- package/dist/models/OrderFulfillmentResource.js +2 -6
- package/dist/models/OrderStatusId.d.ts +2 -6
- package/dist/models/OrderStatusId.js +2 -6
- 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 +6 -0
- package/dist/models/ProductChildResource.js +4 -0
- package/dist/models/ShippingType.d.ts +1 -0
- package/dist/models/ShippingType.js +1 -0
- package/dist/models/StoreFrontendResource.d.ts +2 -2
- package/dist/models/StoreFrontendResource.js +6 -2
- package/dist/models/StoreListResource.d.ts +1 -1
- package/dist/models/StoreListResource.js +1 -3
- package/dist/models/StoreResource.d.ts +1 -1
- package/dist/models/StoreResource.js +3 -1
- package/dist/models/UpdateCartRequest.d.ts +1 -0
- package/dist/models/UpdateCartRequest.js +1 -0
- package/dist/models/UpdateOrderRequest.d.ts +1 -0
- package/dist/models/UpdateOrderRequest.js +1 -0
- package/dist/models/index.d.ts +9 -15
- package/dist/models/index.js +9 -15
- package/docs/{CouponLiteResource.md → CartCouponLiteResource.md} +10 -6
- package/docs/{CreateCouponRequestCouponablesInner.md → CartCouponLiteResourceArrayResponse.md} +6 -8
- package/docs/FrontendCartResource.md +70 -0
- package/docs/{CouponResourceArrayResponse.md → FrontendCartResourceArrayResponse.md} +5 -5
- package/docs/FrontendCartResourceCouponsInner.md +42 -0
- package/docs/FrontendLineItemResource.md +50 -0
- package/docs/{CouponLiteResourceArrayResponse.md → FrontendLineItemResourceArrayResponse.md} +5 -5
- package/docs/FrontendOrderResource.md +80 -0
- package/docs/{CouponListResourceArrayResponse.md → FrontendOrderResourceArrayResponse.md} +5 -5
- package/docs/OrdersApi.md +66 -0
- package/docs/ProductChildLineItemLiteResource.md +6 -0
- package/docs/ProductChildResource.md +2 -0
- package/package.json +1 -1
- package/src/apis/OrdersApi.ts +49 -0
- package/src/apis/index.ts +0 -1
- package/src/models/AddressFrontendResource.ts +2 -3
- package/src/models/AddressResource.ts +7 -8
- package/src/models/CartCouponLiteResource.ts +102 -0
- package/src/models/CartCouponLiteResourceArrayResponse.ts +73 -0
- package/src/models/CreateCartRequest.ts +1 -0
- package/src/models/ExternalApiLogResource.ts +3 -2
- 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/OrderFulfillmentResource.ts +4 -6
- package/src/models/OrderStatusId.ts +2 -6
- package/src/models/PaymentSource.ts +2 -1
- package/src/models/ProductChildLineItemLiteResource.ts +27 -0
- package/src/models/ProductChildResource.ts +9 -0
- package/src/models/ShippingType.ts +1 -0
- package/src/models/StoreFrontendResource.ts +6 -4
- package/src/models/StoreListResource.ts +2 -3
- package/src/models/StoreResource.ts +3 -2
- package/src/models/UpdateCartRequest.ts +1 -0
- package/src/models/UpdateOrderRequest.ts +1 -0
- package/src/models/index.ts +9 -15
- package/dist/apis/CouponsApi.d.ts +0 -116
- package/dist/apis/CouponsApi.js +0 -440
- package/dist/models/CouponListResource.d.ts +0 -87
- package/dist/models/CouponListResource.js +0 -82
- package/dist/models/CouponListResourceArrayResponse.d.ts +0 -33
- package/dist/models/CouponListResourceArrayResponse.js +0 -50
- package/dist/models/CouponLiteResource.d.ts +0 -44
- package/dist/models/CouponLiteResource.js +0 -57
- package/dist/models/CouponLiteResourceArrayResponse.d.ts +0 -33
- package/dist/models/CouponLiteResourceArrayResponse.js +0 -50
- package/dist/models/CouponResource.d.ts +0 -166
- package/dist/models/CouponResource.js +0 -135
- package/dist/models/CouponResourceArrayResponse.d.ts +0 -33
- package/dist/models/CouponResourceArrayResponse.js +0 -50
- package/dist/models/CouponType.d.ts +0 -26
- package/dist/models/CouponType.js +0 -52
- package/dist/models/CreateCouponRequest.d.ts +0 -134
- package/dist/models/CreateCouponRequest.js +0 -114
- package/dist/models/CreateCouponRequestCouponablesInner.d.ts +0 -48
- package/dist/models/CreateCouponRequestCouponablesInner.js +0 -61
- package/dist/models/PaginatedCouponListResourceResponse.d.ts +0 -40
- package/dist/models/PaginatedCouponListResourceResponse.js +0 -57
- package/dist/models/PaginatedCouponLiteResourceResponse.d.ts +0 -40
- package/dist/models/PaginatedCouponLiteResourceResponse.js +0 -57
- package/dist/models/PaginatedCouponResourceResponse.d.ts +0 -40
- package/dist/models/PaginatedCouponResourceResponse.js +0 -57
- package/dist/models/SearchAllCouponsRequest.d.ts +0 -101
- package/dist/models/SearchAllCouponsRequest.js +0 -85
- package/dist/models/SearchCouponsRequest.d.ts +0 -137
- package/dist/models/SearchCouponsRequest.js +0 -97
- package/dist/models/UpdateCouponRequest.d.ts +0 -128
- package/dist/models/UpdateCouponRequest.js +0 -110
- package/docs/CouponListResource.md +0 -52
- package/docs/CouponResource.md +0 -78
- package/docs/CouponType.md +0 -32
- package/docs/CouponsApi.md +0 -407
- package/docs/CreateCouponRequest.md +0 -62
- package/docs/PaginatedCouponListResourceResponse.md +0 -36
- package/docs/PaginatedCouponLiteResourceResponse.md +0 -36
- package/docs/PaginatedCouponResourceResponse.md +0 -36
- package/docs/SearchAllCouponsRequest.md +0 -50
- package/docs/SearchCouponsRequest.md +0 -62
- package/docs/UpdateCouponRequest.md +0 -60
- package/src/apis/CouponsApi.ts +0 -345
- package/src/models/CouponListResource.ts +0 -152
- package/src/models/CouponListResourceArrayResponse.ts +0 -73
- package/src/models/CouponLiteResource.ts +0 -83
- package/src/models/CouponLiteResourceArrayResponse.ts +0 -73
- package/src/models/CouponResource.ts +0 -276
- package/src/models/CouponResourceArrayResponse.ts +0 -73
- package/src/models/CouponType.ts +0 -54
- package/src/models/CreateCouponRequest.ts +0 -216
- package/src/models/CreateCouponRequestCouponablesInner.ts +0 -86
- package/src/models/PaginatedCouponListResourceResponse.ts +0 -90
- package/src/models/PaginatedCouponLiteResourceResponse.ts +0 -90
- package/src/models/PaginatedCouponResourceResponse.ts +0 -90
- package/src/models/SearchAllCouponsRequest.ts +0 -154
- package/src/models/SearchCouponsRequest.ts +0 -202
- package/src/models/UpdateCouponRequest.ts +0 -207
|
@@ -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
|
+
|
package/docs/{CouponLiteResourceArrayResponse.md → FrontendLineItemResourceArrayResponse.md}
RENAMED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
|
|
2
|
-
#
|
|
2
|
+
# FrontendLineItemResourceArrayResponse
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
## Properties
|
|
6
6
|
|
|
7
7
|
Name | Type
|
|
8
8
|
------------ | -------------
|
|
9
|
-
`data` | [Array<
|
|
9
|
+
`data` | [Array<FrontendLineItemResource>](FrontendLineItemResource.md)
|
|
10
10
|
|
|
11
11
|
## Example
|
|
12
12
|
|
|
13
13
|
```typescript
|
|
14
|
-
import type {
|
|
14
|
+
import type { FrontendLineItemResourceArrayResponse } from '@digital8/lighting-illusions-ts-sdk'
|
|
15
15
|
|
|
16
16
|
// TODO: Update the object below with actual values
|
|
17
17
|
const example = {
|
|
18
18
|
"data": null,
|
|
19
|
-
} satisfies
|
|
19
|
+
} satisfies FrontendLineItemResourceArrayResponse
|
|
20
20
|
|
|
21
21
|
console.log(example)
|
|
22
22
|
|
|
@@ -25,7 +25,7 @@ const exampleJSON: string = JSON.stringify(example)
|
|
|
25
25
|
console.log(exampleJSON)
|
|
26
26
|
|
|
27
27
|
// Parse the JSON string back to an object
|
|
28
|
-
const exampleParsed = JSON.parse(exampleJSON) as
|
|
28
|
+
const exampleParsed = JSON.parse(exampleJSON) as FrontendLineItemResourceArrayResponse
|
|
29
29
|
console.log(exampleParsed)
|
|
30
30
|
```
|
|
31
31
|
|
|
@@ -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
|
+
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
|
|
2
|
-
#
|
|
2
|
+
# FrontendOrderResourceArrayResponse
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
## Properties
|
|
6
6
|
|
|
7
7
|
Name | Type
|
|
8
8
|
------------ | -------------
|
|
9
|
-
`data` | [Array<
|
|
9
|
+
`data` | [Array<FrontendOrderResource>](FrontendOrderResource.md)
|
|
10
10
|
|
|
11
11
|
## Example
|
|
12
12
|
|
|
13
13
|
```typescript
|
|
14
|
-
import type {
|
|
14
|
+
import type { FrontendOrderResourceArrayResponse } from '@digital8/lighting-illusions-ts-sdk'
|
|
15
15
|
|
|
16
16
|
// TODO: Update the object below with actual values
|
|
17
17
|
const example = {
|
|
18
18
|
"data": null,
|
|
19
|
-
} satisfies
|
|
19
|
+
} satisfies FrontendOrderResourceArrayResponse
|
|
20
20
|
|
|
21
21
|
console.log(example)
|
|
22
22
|
|
|
@@ -25,7 +25,7 @@ const exampleJSON: string = JSON.stringify(example)
|
|
|
25
25
|
console.log(exampleJSON)
|
|
26
26
|
|
|
27
27
|
// Parse the JSON string back to an object
|
|
28
|
-
const exampleParsed = JSON.parse(exampleJSON) as
|
|
28
|
+
const exampleParsed = JSON.parse(exampleJSON) as FrontendOrderResourceArrayResponse
|
|
29
29
|
console.log(exampleParsed)
|
|
30
30
|
```
|
|
31
31
|
|
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,6 +8,7 @@ Name | Type
|
|
|
8
8
|
------------ | -------------
|
|
9
9
|
`id` | number
|
|
10
10
|
`name` | string
|
|
11
|
+
`fullName` | string
|
|
11
12
|
`allowOversell` | boolean
|
|
12
13
|
`modelNumber` | string
|
|
13
14
|
`weight` | number
|
|
@@ -47,6 +48,7 @@ import type { ProductChildResource } from '@digital8/lighting-illusions-ts-sdk'
|
|
|
47
48
|
const example = {
|
|
48
49
|
"id": null,
|
|
49
50
|
"name": null,
|
|
51
|
+
"fullName": null,
|
|
50
52
|
"allowOversell": null,
|
|
51
53
|
"modelNumber": null,
|
|
52
54
|
"weight": null,
|
package/package.json
CHANGED
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
|
*/
|
package/src/apis/index.ts
CHANGED
|
@@ -36,7 +36,7 @@ export interface AddressFrontendResource {
|
|
|
36
36
|
* @type {string}
|
|
37
37
|
* @memberof AddressFrontendResource
|
|
38
38
|
*/
|
|
39
|
-
line2
|
|
39
|
+
line2?: string | null;
|
|
40
40
|
/**
|
|
41
41
|
*
|
|
42
42
|
* @type {string}
|
|
@@ -75,7 +75,6 @@ export interface AddressFrontendResource {
|
|
|
75
75
|
export function instanceOfAddressFrontendResource(value: object): value is AddressFrontendResource {
|
|
76
76
|
if (!('company' in value) || value['company'] === undefined) return false;
|
|
77
77
|
if (!('line1' in value) || value['line1'] === undefined) return false;
|
|
78
|
-
if (!('line2' in value) || value['line2'] === undefined) return false;
|
|
79
78
|
if (!('postcode' in value) || value['postcode'] === undefined) return false;
|
|
80
79
|
if (!('suburb' in value) || value['suburb'] === undefined) return false;
|
|
81
80
|
if (!('country' in value) || value['country'] === undefined) return false;
|
|
@@ -96,7 +95,7 @@ export function AddressFrontendResourceFromJSONTyped(json: any, ignoreDiscrimina
|
|
|
96
95
|
|
|
97
96
|
'company': json['company'],
|
|
98
97
|
'line1': json['line1'],
|
|
99
|
-
'line2': json['line2'],
|
|
98
|
+
'line2': json['line2'] == null ? undefined : json['line2'],
|
|
100
99
|
'postcode': json['postcode'],
|
|
101
100
|
'suburb': json['suburb'],
|
|
102
101
|
'country': json['country'],
|
|
@@ -42,13 +42,13 @@ export interface AddressResource {
|
|
|
42
42
|
* @type {string}
|
|
43
43
|
* @memberof AddressResource
|
|
44
44
|
*/
|
|
45
|
-
addresseeName
|
|
45
|
+
addresseeName: string;
|
|
46
46
|
/**
|
|
47
47
|
*
|
|
48
48
|
* @type {string}
|
|
49
49
|
* @memberof AddressResource
|
|
50
50
|
*/
|
|
51
|
-
company
|
|
51
|
+
company?: string | null;
|
|
52
52
|
/**
|
|
53
53
|
*
|
|
54
54
|
* @type {string}
|
|
@@ -60,7 +60,7 @@ export interface AddressResource {
|
|
|
60
60
|
* @type {string}
|
|
61
61
|
* @memberof AddressResource
|
|
62
62
|
*/
|
|
63
|
-
line2
|
|
63
|
+
line2?: string | null;
|
|
64
64
|
/**
|
|
65
65
|
*
|
|
66
66
|
* @type {string}
|
|
@@ -97,9 +97,8 @@ export interface AddressResource {
|
|
|
97
97
|
* Check if a given object implements the AddressResource interface.
|
|
98
98
|
*/
|
|
99
99
|
export function instanceOfAddressResource(value: object): value is AddressResource {
|
|
100
|
-
if (!('
|
|
100
|
+
if (!('addresseeName' in value) || value['addresseeName'] === undefined) return false;
|
|
101
101
|
if (!('line1' in value) || value['line1'] === undefined) return false;
|
|
102
|
-
if (!('line2' in value) || value['line2'] === undefined) return false;
|
|
103
102
|
if (!('postcode' in value) || value['postcode'] === undefined) return false;
|
|
104
103
|
if (!('suburb' in value) || value['suburb'] === undefined) return false;
|
|
105
104
|
if (!('country' in value) || value['country'] === undefined) return false;
|
|
@@ -121,10 +120,10 @@ export function AddressResourceFromJSONTyped(json: any, ignoreDiscriminator: boo
|
|
|
121
120
|
'id': json['id'] == null ? undefined : json['id'],
|
|
122
121
|
'type': json['type'] == null ? undefined : json['type'],
|
|
123
122
|
'sourceAddressId': json['sourceAddressId'] == null ? undefined : json['sourceAddressId'],
|
|
124
|
-
'addresseeName': json['addresseeName']
|
|
125
|
-
'company': json['company'],
|
|
123
|
+
'addresseeName': json['addresseeName'],
|
|
124
|
+
'company': json['company'] == null ? undefined : json['company'],
|
|
126
125
|
'line1': json['line1'],
|
|
127
|
-
'line2': json['line2'],
|
|
126
|
+
'line2': json['line2'] == null ? undefined : json['line2'],
|
|
128
127
|
'postcode': json['postcode'],
|
|
129
128
|
'suburb': json['suburb'],
|
|
130
129
|
'country': json['country'],
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* My API
|
|
5
|
+
* API documentation for my Laravel app
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface CartCouponLiteResource
|
|
20
|
+
*/
|
|
21
|
+
export interface CartCouponLiteResource {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {number}
|
|
25
|
+
* @memberof CartCouponLiteResource
|
|
26
|
+
*/
|
|
27
|
+
id: number;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof CartCouponLiteResource
|
|
32
|
+
*/
|
|
33
|
+
code: string;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof CartCouponLiteResource
|
|
38
|
+
*/
|
|
39
|
+
name: string;
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @type {number}
|
|
43
|
+
* @memberof CartCouponLiteResource
|
|
44
|
+
*/
|
|
45
|
+
discount: number;
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
* @type {string}
|
|
49
|
+
* @memberof CartCouponLiteResource
|
|
50
|
+
*/
|
|
51
|
+
appliesTo: string;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Check if a given object implements the CartCouponLiteResource interface.
|
|
56
|
+
*/
|
|
57
|
+
export function instanceOfCartCouponLiteResource(value: object): value is CartCouponLiteResource {
|
|
58
|
+
if (!('id' in value) || value['id'] === undefined) return false;
|
|
59
|
+
if (!('code' in value) || value['code'] === undefined) return false;
|
|
60
|
+
if (!('name' in value) || value['name'] === undefined) return false;
|
|
61
|
+
if (!('discount' in value) || value['discount'] === undefined) return false;
|
|
62
|
+
if (!('appliesTo' in value) || value['appliesTo'] === undefined) return false;
|
|
63
|
+
return true;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export function CartCouponLiteResourceFromJSON(json: any): CartCouponLiteResource {
|
|
67
|
+
return CartCouponLiteResourceFromJSONTyped(json, false);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export function CartCouponLiteResourceFromJSONTyped(json: any, ignoreDiscriminator: boolean): CartCouponLiteResource {
|
|
71
|
+
if (json == null) {
|
|
72
|
+
return json;
|
|
73
|
+
}
|
|
74
|
+
return {
|
|
75
|
+
|
|
76
|
+
'id': json['id'],
|
|
77
|
+
'code': json['code'],
|
|
78
|
+
'name': json['name'],
|
|
79
|
+
'discount': json['discount'],
|
|
80
|
+
'appliesTo': json['appliesTo'],
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export function CartCouponLiteResourceToJSON(json: any): CartCouponLiteResource {
|
|
85
|
+
return CartCouponLiteResourceToJSONTyped(json, false);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export function CartCouponLiteResourceToJSONTyped(value?: CartCouponLiteResource | null, ignoreDiscriminator: boolean = false): any {
|
|
89
|
+
if (value == null) {
|
|
90
|
+
return value;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
return {
|
|
94
|
+
|
|
95
|
+
'id': value['id'],
|
|
96
|
+
'code': value['code'],
|
|
97
|
+
'name': value['name'],
|
|
98
|
+
'discount': value['discount'],
|
|
99
|
+
'appliesTo': value['appliesTo'],
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* My API
|
|
5
|
+
* API documentation for my Laravel app
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
import type { CartCouponLiteResource } from './CartCouponLiteResource';
|
|
17
|
+
import {
|
|
18
|
+
CartCouponLiteResourceFromJSON,
|
|
19
|
+
CartCouponLiteResourceFromJSONTyped,
|
|
20
|
+
CartCouponLiteResourceToJSON,
|
|
21
|
+
CartCouponLiteResourceToJSONTyped,
|
|
22
|
+
} from './CartCouponLiteResource';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @export
|
|
27
|
+
* @interface CartCouponLiteResourceArrayResponse
|
|
28
|
+
*/
|
|
29
|
+
export interface CartCouponLiteResourceArrayResponse {
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {Array<CartCouponLiteResource>}
|
|
33
|
+
* @memberof CartCouponLiteResourceArrayResponse
|
|
34
|
+
*/
|
|
35
|
+
data?: Array<CartCouponLiteResource>;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Check if a given object implements the CartCouponLiteResourceArrayResponse interface.
|
|
40
|
+
*/
|
|
41
|
+
export function instanceOfCartCouponLiteResourceArrayResponse(value: object): value is CartCouponLiteResourceArrayResponse {
|
|
42
|
+
return true;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export function CartCouponLiteResourceArrayResponseFromJSON(json: any): CartCouponLiteResourceArrayResponse {
|
|
46
|
+
return CartCouponLiteResourceArrayResponseFromJSONTyped(json, false);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export function CartCouponLiteResourceArrayResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): CartCouponLiteResourceArrayResponse {
|
|
50
|
+
if (json == null) {
|
|
51
|
+
return json;
|
|
52
|
+
}
|
|
53
|
+
return {
|
|
54
|
+
|
|
55
|
+
'data': json['data'] == null ? undefined : ((json['data'] as Array<any>).map(CartCouponLiteResourceFromJSON)),
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export function CartCouponLiteResourceArrayResponseToJSON(json: any): CartCouponLiteResourceArrayResponse {
|
|
60
|
+
return CartCouponLiteResourceArrayResponseToJSONTyped(json, false);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export function CartCouponLiteResourceArrayResponseToJSONTyped(value?: CartCouponLiteResourceArrayResponse | null, ignoreDiscriminator: boolean = false): any {
|
|
64
|
+
if (value == null) {
|
|
65
|
+
return value;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
return {
|
|
69
|
+
|
|
70
|
+
'data': value['data'] == null ? undefined : ((value['data'] as Array<any>).map(CartCouponLiteResourceToJSON)),
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
|
|
@@ -172,6 +172,7 @@ export type CreateCartRequestSourceEnum = typeof CreateCartRequestSourceEnum[key
|
|
|
172
172
|
export const CreateCartRequestShippingTypeEnum = {
|
|
173
173
|
Pickup: 'pickup',
|
|
174
174
|
Delivery: 'delivery',
|
|
175
|
+
AuspostStandard: 'auspost_standard',
|
|
175
176
|
Express: 'express',
|
|
176
177
|
Courier: 'courier',
|
|
177
178
|
DontShip: 'dont_ship'
|