@digital8/lighting-illusions-ts-sdk 0.0.2073 → 0.0.2075
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/OrdersApi.d.ts +15 -0
- package/dist/apis/OrdersApi.js +59 -0
- package/dist/models/AddressFrontendResource.d.ts +2 -2
- package/dist/models/AddressFrontendResource.js +4 -4
- 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/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 +139 -0
- package/dist/models/FrontendOrderResourceArrayResponse.d.ts +33 -0
- package/dist/models/FrontendOrderResourceArrayResponse.js +50 -0
- 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/StoreFrontendResource.d.ts +1 -1
- package/dist/models/StoreFrontendResource.js +3 -1
- package/dist/models/StoreListResource.d.ts +1 -1
- package/dist/models/StoreListResource.js +3 -1
- package/dist/models/StoreResource.d.ts +1 -1
- package/dist/models/StoreResource.js +1 -3
- package/dist/models/index.d.ts +9 -0
- package/dist/models/index.js +9 -0
- 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/OrdersApi.md +66 -0
- package/docs/ProductChildLineItemLiteResource.md +6 -0
- package/package.json +1 -1
- package/src/apis/OrdersApi.ts +49 -0
- package/src/models/AddressFrontendResource.ts +5 -5
- package/src/models/CartCouponLiteResource.ts +102 -0
- package/src/models/CartCouponLiteResourceArrayResponse.ts +73 -0
- 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 +298 -0
- package/src/models/FrontendOrderResourceArrayResponse.ts +73 -0
- package/src/models/PaymentSource.ts +2 -1
- package/src/models/ProductChildLineItemLiteResource.ts +27 -0
- package/src/models/StoreFrontendResource.ts +3 -2
- package/src/models/StoreListResource.ts +3 -2
- package/src/models/StoreResource.ts +2 -3
- package/src/models/index.ts +9 -0
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
|
|
2
|
+
# CartCouponLiteResourceArrayResponse
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`data` | [Array<CartCouponLiteResource>](CartCouponLiteResource.md)
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import type { CartCouponLiteResourceArrayResponse } from '@digital8/lighting-illusions-ts-sdk'
|
|
15
|
+
|
|
16
|
+
// TODO: Update the object below with actual values
|
|
17
|
+
const example = {
|
|
18
|
+
"data": null,
|
|
19
|
+
} satisfies CartCouponLiteResourceArrayResponse
|
|
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 CartCouponLiteResourceArrayResponse
|
|
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,70 @@
|
|
|
1
|
+
|
|
2
|
+
# FrontendCartResource
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`id` | number
|
|
10
|
+
`lifecycleStatus` | string
|
|
11
|
+
`siteId` | number
|
|
12
|
+
`sessionToken` | string
|
|
13
|
+
`guestEmail` | string
|
|
14
|
+
`customer` | [CustomerListResource](CustomerListResource.md)
|
|
15
|
+
`shippingType` | string
|
|
16
|
+
`shippingAddress` | [AddressResource](AddressResource.md)
|
|
17
|
+
`billingAddress` | [AddressResource](AddressResource.md)
|
|
18
|
+
`lineItems` | [Array<FrontendLineItemResource>](FrontendLineItemResource.md)
|
|
19
|
+
`coupons` | [Array<FrontendCartResourceCouponsInner>](FrontendCartResourceCouponsInner.md)
|
|
20
|
+
`subtotal` | number
|
|
21
|
+
`promotionalDiscount` | number
|
|
22
|
+
`couponSubtotalDiscount` | number
|
|
23
|
+
`couponShippingDiscount` | number
|
|
24
|
+
`shipping` | number
|
|
25
|
+
`transitInsurance` | number
|
|
26
|
+
`gst` | number
|
|
27
|
+
`grandTotal` | number
|
|
28
|
+
|
|
29
|
+
## Example
|
|
30
|
+
|
|
31
|
+
```typescript
|
|
32
|
+
import type { FrontendCartResource } from '@digital8/lighting-illusions-ts-sdk'
|
|
33
|
+
|
|
34
|
+
// TODO: Update the object below with actual values
|
|
35
|
+
const example = {
|
|
36
|
+
"id": null,
|
|
37
|
+
"lifecycleStatus": null,
|
|
38
|
+
"siteId": null,
|
|
39
|
+
"sessionToken": null,
|
|
40
|
+
"guestEmail": null,
|
|
41
|
+
"customer": null,
|
|
42
|
+
"shippingType": null,
|
|
43
|
+
"shippingAddress": null,
|
|
44
|
+
"billingAddress": null,
|
|
45
|
+
"lineItems": null,
|
|
46
|
+
"coupons": null,
|
|
47
|
+
"subtotal": null,
|
|
48
|
+
"promotionalDiscount": null,
|
|
49
|
+
"couponSubtotalDiscount": null,
|
|
50
|
+
"couponShippingDiscount": null,
|
|
51
|
+
"shipping": null,
|
|
52
|
+
"transitInsurance": null,
|
|
53
|
+
"gst": null,
|
|
54
|
+
"grandTotal": null,
|
|
55
|
+
} satisfies FrontendCartResource
|
|
56
|
+
|
|
57
|
+
console.log(example)
|
|
58
|
+
|
|
59
|
+
// Convert the instance to a JSON string
|
|
60
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
61
|
+
console.log(exampleJSON)
|
|
62
|
+
|
|
63
|
+
// Parse the JSON string back to an object
|
|
64
|
+
const exampleParsed = JSON.parse(exampleJSON) as FrontendCartResource
|
|
65
|
+
console.log(exampleParsed)
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
69
|
+
|
|
70
|
+
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
|
|
2
|
+
# FrontendCartResourceArrayResponse
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`data` | [Array<FrontendCartResource>](FrontendCartResource.md)
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import type { FrontendCartResourceArrayResponse } from '@digital8/lighting-illusions-ts-sdk'
|
|
15
|
+
|
|
16
|
+
// TODO: Update the object below with actual values
|
|
17
|
+
const example = {
|
|
18
|
+
"data": null,
|
|
19
|
+
} satisfies FrontendCartResourceArrayResponse
|
|
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 FrontendCartResourceArrayResponse
|
|
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,42 @@
|
|
|
1
|
+
|
|
2
|
+
# FrontendCartResourceCouponsInner
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`id` | number
|
|
10
|
+
`code` | string
|
|
11
|
+
`name` | string
|
|
12
|
+
`discount` | number
|
|
13
|
+
`appliesTo` | string
|
|
14
|
+
|
|
15
|
+
## Example
|
|
16
|
+
|
|
17
|
+
```typescript
|
|
18
|
+
import type { FrontendCartResourceCouponsInner } from '@digital8/lighting-illusions-ts-sdk'
|
|
19
|
+
|
|
20
|
+
// TODO: Update the object below with actual values
|
|
21
|
+
const example = {
|
|
22
|
+
"id": null,
|
|
23
|
+
"code": null,
|
|
24
|
+
"name": null,
|
|
25
|
+
"discount": null,
|
|
26
|
+
"appliesTo": null,
|
|
27
|
+
} satisfies FrontendCartResourceCouponsInner
|
|
28
|
+
|
|
29
|
+
console.log(example)
|
|
30
|
+
|
|
31
|
+
// Convert the instance to a JSON string
|
|
32
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
33
|
+
console.log(exampleJSON)
|
|
34
|
+
|
|
35
|
+
// Parse the JSON string back to an object
|
|
36
|
+
const exampleParsed = JSON.parse(exampleJSON) as FrontendCartResourceCouponsInner
|
|
37
|
+
console.log(exampleParsed)
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
41
|
+
|
|
42
|
+
|
|
@@ -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` | string
|
|
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/OrdersApi.md
CHANGED
|
@@ -11,6 +11,7 @@ All URIs are relative to *http://localhost/api*
|
|
|
11
11
|
| [**detachItemOrder**](OrdersApi.md#detachitemorder) | **DELETE** /admin-api/orders/{order}/line-items/{lineItem}/detach | Auto-generated: detachItemOrder |
|
|
12
12
|
| [**getAllOrder**](OrdersApi.md#getallorder) | **POST** /admin-api/orders/all | Auto-generated: getAllOrder |
|
|
13
13
|
| [**indexOrder**](OrdersApi.md#indexorder) | **POST** /admin-api/orders/list | Auto-generated: indexOrder |
|
|
14
|
+
| [**pdfOrder**](OrdersApi.md#pdforder) | **POST** /admin-api/orders/{order}/pdf | Auto-generated: pdfOrder |
|
|
14
15
|
| [**sendPaymentLinkOrder**](OrdersApi.md#sendpaymentlinkorder) | **POST** /admin-api/orders/{order}/send-payment-link | Auto-generated: sendPaymentLinkOrder |
|
|
15
16
|
| [**showOrder**](OrdersApi.md#showorder) | **GET** /admin-api/orders/{order} | Auto-generated: showOrder |
|
|
16
17
|
| [**statusesAllOrder**](OrdersApi.md#statusesallorder) | **POST** /admin-api/orders/statuses/all | Auto-generated: statusesAllOrder |
|
|
@@ -486,6 +487,71 @@ No authorization required
|
|
|
486
487
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
487
488
|
|
|
488
489
|
|
|
490
|
+
## pdfOrder
|
|
491
|
+
|
|
492
|
+
> Blob pdfOrder(order)
|
|
493
|
+
|
|
494
|
+
Auto-generated: pdfOrder
|
|
495
|
+
|
|
496
|
+
### Example
|
|
497
|
+
|
|
498
|
+
```ts
|
|
499
|
+
import {
|
|
500
|
+
Configuration,
|
|
501
|
+
OrdersApi,
|
|
502
|
+
} from '@digital8/lighting-illusions-ts-sdk';
|
|
503
|
+
import type { PdfOrderRequest } from '@digital8/lighting-illusions-ts-sdk';
|
|
504
|
+
|
|
505
|
+
async function example() {
|
|
506
|
+
console.log("🚀 Testing @digital8/lighting-illusions-ts-sdk SDK...");
|
|
507
|
+
const api = new OrdersApi();
|
|
508
|
+
|
|
509
|
+
const body = {
|
|
510
|
+
// number | The id of the order
|
|
511
|
+
order: 56,
|
|
512
|
+
} satisfies PdfOrderRequest;
|
|
513
|
+
|
|
514
|
+
try {
|
|
515
|
+
const data = await api.pdfOrder(body);
|
|
516
|
+
console.log(data);
|
|
517
|
+
} catch (error) {
|
|
518
|
+
console.error(error);
|
|
519
|
+
}
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
// Run the test
|
|
523
|
+
example().catch(console.error);
|
|
524
|
+
```
|
|
525
|
+
|
|
526
|
+
### Parameters
|
|
527
|
+
|
|
528
|
+
|
|
529
|
+
| Name | Type | Description | Notes |
|
|
530
|
+
|------------- | ------------- | ------------- | -------------|
|
|
531
|
+
| **order** | `number` | The id of the order | [Defaults to `undefined`] |
|
|
532
|
+
|
|
533
|
+
### Return type
|
|
534
|
+
|
|
535
|
+
**Blob**
|
|
536
|
+
|
|
537
|
+
### Authorization
|
|
538
|
+
|
|
539
|
+
No authorization required
|
|
540
|
+
|
|
541
|
+
### HTTP request headers
|
|
542
|
+
|
|
543
|
+
- **Content-Type**: Not defined
|
|
544
|
+
- **Accept**: ``
|
|
545
|
+
|
|
546
|
+
|
|
547
|
+
### HTTP response details
|
|
548
|
+
| Status code | Description | Response headers |
|
|
549
|
+
|-------------|-------------|------------------|
|
|
550
|
+
| **200** | File download (application/pdf) | - |
|
|
551
|
+
|
|
552
|
+
[[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
|
+
|
|
489
555
|
## sendPaymentLinkOrder
|
|
490
556
|
|
|
491
557
|
> 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,
|
package/package.json
CHANGED
package/src/apis/OrdersApi.ts
CHANGED
|
@@ -106,6 +106,10 @@ export interface IndexOrderRequest {
|
|
|
106
106
|
searchOrdersRequest?: SearchOrdersRequest;
|
|
107
107
|
}
|
|
108
108
|
|
|
109
|
+
export interface PdfOrderRequest {
|
|
110
|
+
order: number;
|
|
111
|
+
}
|
|
112
|
+
|
|
109
113
|
export interface SendPaymentLinkOrderRequest {
|
|
110
114
|
order: number;
|
|
111
115
|
}
|
|
@@ -452,6 +456,51 @@ export class OrdersApi extends runtime.BaseAPI {
|
|
|
452
456
|
return await response.value();
|
|
453
457
|
}
|
|
454
458
|
|
|
459
|
+
/**
|
|
460
|
+
* Creates request options for pdfOrder without sending the request
|
|
461
|
+
*/
|
|
462
|
+
async pdfOrderRequestOpts(requestParameters: PdfOrderRequest): Promise<runtime.RequestOpts> {
|
|
463
|
+
if (requestParameters['order'] == null) {
|
|
464
|
+
throw new runtime.RequiredError(
|
|
465
|
+
'order',
|
|
466
|
+
'Required parameter "order" was null or undefined when calling pdfOrder().'
|
|
467
|
+
);
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
const queryParameters: any = {};
|
|
471
|
+
|
|
472
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
473
|
+
|
|
474
|
+
|
|
475
|
+
let urlPath = `/admin-api/orders/{order}/pdf`;
|
|
476
|
+
urlPath = urlPath.replace('{order}', encodeURIComponent(String(requestParameters['order'])));
|
|
477
|
+
|
|
478
|
+
return {
|
|
479
|
+
path: urlPath,
|
|
480
|
+
method: 'POST',
|
|
481
|
+
headers: headerParameters,
|
|
482
|
+
query: queryParameters,
|
|
483
|
+
};
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
/**
|
|
487
|
+
* Auto-generated: pdfOrder
|
|
488
|
+
*/
|
|
489
|
+
async pdfOrderRaw(requestParameters: PdfOrderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Blob>> {
|
|
490
|
+
const requestOptions = await this.pdfOrderRequestOpts(requestParameters);
|
|
491
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
492
|
+
|
|
493
|
+
return new runtime.BlobApiResponse(response);
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
/**
|
|
497
|
+
* Auto-generated: pdfOrder
|
|
498
|
+
*/
|
|
499
|
+
async pdfOrder(requestParameters: PdfOrderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Blob> {
|
|
500
|
+
const response = await this.pdfOrderRaw(requestParameters, initOverrides);
|
|
501
|
+
return await response.value();
|
|
502
|
+
}
|
|
503
|
+
|
|
455
504
|
/**
|
|
456
505
|
* Creates request options for sendPaymentLinkOrder without sending the request
|
|
457
506
|
*/
|
|
@@ -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 | null;
|
|
40
40
|
/**
|
|
41
41
|
*
|
|
42
42
|
* @type {string}
|
|
@@ -73,8 +73,8 @@ 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;
|
|
77
|
-
if (!('line2' in value) || value['line2'] === undefined) return false;
|
|
78
78
|
if (!('postcode' in value) || value['postcode'] === undefined) return false;
|
|
79
79
|
if (!('suburb' in value) || value['suburb'] === undefined) return false;
|
|
80
80
|
if (!('country' in value) || value['country'] === undefined) return false;
|
|
@@ -93,9 +93,9 @@ export function AddressFrontendResourceFromJSONTyped(json: any, ignoreDiscrimina
|
|
|
93
93
|
}
|
|
94
94
|
return {
|
|
95
95
|
|
|
96
|
-
'company': json['company']
|
|
96
|
+
'company': json['company'],
|
|
97
97
|
'line1': json['line1'],
|
|
98
|
-
'line2': json['line2'],
|
|
98
|
+
'line2': json['line2'] == null ? undefined : json['line2'],
|
|
99
99
|
'postcode': json['postcode'],
|
|
100
100
|
'suburb': json['suburb'],
|
|
101
101
|
'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
|
+
|