@digital8/lighting-illusions-ts-sdk 0.0.1613 → 0.0.1615
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.openapi-generator/FILES +14 -0
- package/README.md +9 -2
- package/dist/apis/RedirectApi.d.ts +33 -0
- package/dist/apis/RedirectApi.js +138 -0
- package/dist/apis/index.d.ts +1 -0
- package/dist/apis/index.js +1 -0
- package/dist/models/AddressFrontendResource.d.ts +1 -1
- package/dist/models/AddressFrontendResource.js +1 -3
- package/dist/models/AddressResource.d.ts +1 -1
- package/dist/models/AddressResource.js +3 -1
- package/dist/models/IndexRedirectRequest.d.ts +124 -0
- package/dist/models/IndexRedirectRequest.js +95 -0
- package/dist/models/PaginatedRedirectListResourceResponse.d.ts +40 -0
- package/dist/models/PaginatedRedirectListResourceResponse.js +57 -0
- package/dist/models/RedirectFrontendResource.d.ts +62 -0
- package/dist/models/RedirectFrontendResource.js +71 -0
- package/dist/models/RedirectFrontendResourceArrayResponse.d.ts +33 -0
- package/dist/models/RedirectFrontendResourceArrayResponse.js +50 -0
- package/dist/models/RedirectListResource.d.ts +69 -0
- package/dist/models/RedirectListResource.js +76 -0
- package/dist/models/RedirectListResourceArrayResponse.d.ts +33 -0
- package/dist/models/RedirectListResourceArrayResponse.js +50 -0
- 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/StoreSpecialDateResource.d.ts +2 -2
- package/dist/models/StoreSpecialDateResource.js +1 -3
- package/dist/models/index.d.ts +6 -0
- package/dist/models/index.js +6 -0
- package/docs/IndexRedirectRequest.md +56 -0
- package/docs/PaginatedRedirectListResourceResponse.md +36 -0
- package/docs/RedirectApi.md +74 -0
- package/docs/RedirectFrontendResource.md +44 -0
- package/docs/RedirectFrontendResourceArrayResponse.md +34 -0
- package/docs/RedirectListResource.md +46 -0
- package/docs/RedirectListResourceArrayResponse.md +34 -0
- package/docs/StoreSpecialDateResource.md +1 -1
- package/package.json +1 -1
- package/src/apis/RedirectApi.ts +77 -0
- package/src/apis/index.ts +1 -0
- package/src/models/AddressFrontendResource.ts +2 -3
- package/src/models/AddressResource.ts +3 -2
- package/src/models/IndexRedirectRequest.ts +184 -0
- package/src/models/PaginatedRedirectListResourceResponse.ts +90 -0
- package/src/models/RedirectFrontendResource.ts +111 -0
- package/src/models/RedirectFrontendResourceArrayResponse.ts +73 -0
- package/src/models/RedirectListResource.ts +128 -0
- package/src/models/RedirectListResourceArrayResponse.ts +73 -0
- package/src/models/StoreListResource.ts +2 -3
- package/src/models/StoreResource.ts +3 -2
- package/src/models/StoreSpecialDateResource.ts +3 -4
- package/src/models/index.ts +6 -0
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
|
|
2
|
+
# IndexRedirectRequest
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`search` | string
|
|
10
|
+
`sortBy` | string
|
|
11
|
+
`sortDirection` | string
|
|
12
|
+
`perPage` | number
|
|
13
|
+
`page` | number
|
|
14
|
+
`siteId` | Array<string>
|
|
15
|
+
`redirectableType` | Array<string>
|
|
16
|
+
`relatedId` | number
|
|
17
|
+
`relatedType` | string
|
|
18
|
+
`includesRelations` | boolean
|
|
19
|
+
`productChildId` | number
|
|
20
|
+
`productRangeId` | number
|
|
21
|
+
|
|
22
|
+
## Example
|
|
23
|
+
|
|
24
|
+
```typescript
|
|
25
|
+
import type { IndexRedirectRequest } from '@digital8/lighting-illusions-ts-sdk'
|
|
26
|
+
|
|
27
|
+
// TODO: Update the object below with actual values
|
|
28
|
+
const example = {
|
|
29
|
+
"search": null,
|
|
30
|
+
"sortBy": null,
|
|
31
|
+
"sortDirection": null,
|
|
32
|
+
"perPage": null,
|
|
33
|
+
"page": null,
|
|
34
|
+
"siteId": null,
|
|
35
|
+
"redirectableType": null,
|
|
36
|
+
"relatedId": null,
|
|
37
|
+
"relatedType": null,
|
|
38
|
+
"includesRelations": null,
|
|
39
|
+
"productChildId": null,
|
|
40
|
+
"productRangeId": null,
|
|
41
|
+
} satisfies IndexRedirectRequest
|
|
42
|
+
|
|
43
|
+
console.log(example)
|
|
44
|
+
|
|
45
|
+
// Convert the instance to a JSON string
|
|
46
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
47
|
+
console.log(exampleJSON)
|
|
48
|
+
|
|
49
|
+
// Parse the JSON string back to an object
|
|
50
|
+
const exampleParsed = JSON.parse(exampleJSON) as IndexRedirectRequest
|
|
51
|
+
console.log(exampleParsed)
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
55
|
+
|
|
56
|
+
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
|
|
2
|
+
# PaginatedRedirectListResourceResponse
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`data` | [Array<RedirectListResource>](RedirectListResource.md)
|
|
10
|
+
`meta` | [PagingMetadata](PagingMetadata.md)
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
import type { PaginatedRedirectListResourceResponse } from '@digital8/lighting-illusions-ts-sdk'
|
|
16
|
+
|
|
17
|
+
// TODO: Update the object below with actual values
|
|
18
|
+
const example = {
|
|
19
|
+
"data": null,
|
|
20
|
+
"meta": null,
|
|
21
|
+
} satisfies PaginatedRedirectListResourceResponse
|
|
22
|
+
|
|
23
|
+
console.log(example)
|
|
24
|
+
|
|
25
|
+
// Convert the instance to a JSON string
|
|
26
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
27
|
+
console.log(exampleJSON)
|
|
28
|
+
|
|
29
|
+
// Parse the JSON string back to an object
|
|
30
|
+
const exampleParsed = JSON.parse(exampleJSON) as PaginatedRedirectListResourceResponse
|
|
31
|
+
console.log(exampleParsed)
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
35
|
+
|
|
36
|
+
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# RedirectApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *http://localhost/api*
|
|
4
|
+
|
|
5
|
+
| Method | HTTP request | Description |
|
|
6
|
+
|------------- | ------------- | -------------|
|
|
7
|
+
| [**indexRedirect**](RedirectApi.md#indexredirectoperation) | **POST** /admin-api/redirect/list | Auto-generated: indexRedirect |
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
## indexRedirect
|
|
12
|
+
|
|
13
|
+
> PaginatedRedirectListResourceResponse indexRedirect(indexRedirectRequest)
|
|
14
|
+
|
|
15
|
+
Auto-generated: indexRedirect
|
|
16
|
+
|
|
17
|
+
### Example
|
|
18
|
+
|
|
19
|
+
```ts
|
|
20
|
+
import {
|
|
21
|
+
Configuration,
|
|
22
|
+
RedirectApi,
|
|
23
|
+
} from '@digital8/lighting-illusions-ts-sdk';
|
|
24
|
+
import type { IndexRedirectOperationRequest } from '@digital8/lighting-illusions-ts-sdk';
|
|
25
|
+
|
|
26
|
+
async function example() {
|
|
27
|
+
console.log("🚀 Testing @digital8/lighting-illusions-ts-sdk SDK...");
|
|
28
|
+
const api = new RedirectApi();
|
|
29
|
+
|
|
30
|
+
const body = {
|
|
31
|
+
// IndexRedirectRequest (optional)
|
|
32
|
+
indexRedirectRequest: ...,
|
|
33
|
+
} satisfies IndexRedirectOperationRequest;
|
|
34
|
+
|
|
35
|
+
try {
|
|
36
|
+
const data = await api.indexRedirect(body);
|
|
37
|
+
console.log(data);
|
|
38
|
+
} catch (error) {
|
|
39
|
+
console.error(error);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
// Run the test
|
|
44
|
+
example().catch(console.error);
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### Parameters
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
| Name | Type | Description | Notes |
|
|
51
|
+
|------------- | ------------- | ------------- | -------------|
|
|
52
|
+
| **indexRedirectRequest** | [IndexRedirectRequest](IndexRedirectRequest.md) | | [Optional] |
|
|
53
|
+
|
|
54
|
+
### Return type
|
|
55
|
+
|
|
56
|
+
[**PaginatedRedirectListResourceResponse**](PaginatedRedirectListResourceResponse.md)
|
|
57
|
+
|
|
58
|
+
### Authorization
|
|
59
|
+
|
|
60
|
+
No authorization required
|
|
61
|
+
|
|
62
|
+
### HTTP request headers
|
|
63
|
+
|
|
64
|
+
- **Content-Type**: `application/json`
|
|
65
|
+
- **Accept**: `application/json`
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
### HTTP response details
|
|
69
|
+
| Status code | Description | Response headers |
|
|
70
|
+
|-------------|-------------|------------------|
|
|
71
|
+
| **200** | Paginated response \\JsonResponse<\\ResourcePaginator<\\RedirectListResource[]>> | - |
|
|
72
|
+
|
|
73
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
74
|
+
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
|
|
2
|
+
# RedirectFrontendResource
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`id` | number
|
|
10
|
+
`siteId` | number
|
|
11
|
+
`fromSlug` | string
|
|
12
|
+
`toSlug` | string
|
|
13
|
+
`status` | number
|
|
14
|
+
`redirectableType` | string
|
|
15
|
+
|
|
16
|
+
## Example
|
|
17
|
+
|
|
18
|
+
```typescript
|
|
19
|
+
import type { RedirectFrontendResource } from '@digital8/lighting-illusions-ts-sdk'
|
|
20
|
+
|
|
21
|
+
// TODO: Update the object below with actual values
|
|
22
|
+
const example = {
|
|
23
|
+
"id": null,
|
|
24
|
+
"siteId": null,
|
|
25
|
+
"fromSlug": null,
|
|
26
|
+
"toSlug": null,
|
|
27
|
+
"status": null,
|
|
28
|
+
"redirectableType": null,
|
|
29
|
+
} satisfies RedirectFrontendResource
|
|
30
|
+
|
|
31
|
+
console.log(example)
|
|
32
|
+
|
|
33
|
+
// Convert the instance to a JSON string
|
|
34
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
35
|
+
console.log(exampleJSON)
|
|
36
|
+
|
|
37
|
+
// Parse the JSON string back to an object
|
|
38
|
+
const exampleParsed = JSON.parse(exampleJSON) as RedirectFrontendResource
|
|
39
|
+
console.log(exampleParsed)
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
43
|
+
|
|
44
|
+
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
|
|
2
|
+
# RedirectFrontendResourceArrayResponse
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`data` | [Array<RedirectFrontendResource>](RedirectFrontendResource.md)
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import type { RedirectFrontendResourceArrayResponse } from '@digital8/lighting-illusions-ts-sdk'
|
|
15
|
+
|
|
16
|
+
// TODO: Update the object below with actual values
|
|
17
|
+
const example = {
|
|
18
|
+
"data": null,
|
|
19
|
+
} satisfies RedirectFrontendResourceArrayResponse
|
|
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 RedirectFrontendResourceArrayResponse
|
|
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,46 @@
|
|
|
1
|
+
|
|
2
|
+
# RedirectListResource
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`id` | number
|
|
10
|
+
`site` | [SiteLiteResource](SiteLiteResource.md)
|
|
11
|
+
`redirectableType` | string
|
|
12
|
+
`redirectableId` | number
|
|
13
|
+
`fromSlug` | string
|
|
14
|
+
`toSlug` | string
|
|
15
|
+
`status` | number
|
|
16
|
+
|
|
17
|
+
## Example
|
|
18
|
+
|
|
19
|
+
```typescript
|
|
20
|
+
import type { RedirectListResource } from '@digital8/lighting-illusions-ts-sdk'
|
|
21
|
+
|
|
22
|
+
// TODO: Update the object below with actual values
|
|
23
|
+
const example = {
|
|
24
|
+
"id": null,
|
|
25
|
+
"site": null,
|
|
26
|
+
"redirectableType": null,
|
|
27
|
+
"redirectableId": null,
|
|
28
|
+
"fromSlug": null,
|
|
29
|
+
"toSlug": null,
|
|
30
|
+
"status": null,
|
|
31
|
+
} satisfies RedirectListResource
|
|
32
|
+
|
|
33
|
+
console.log(example)
|
|
34
|
+
|
|
35
|
+
// Convert the instance to a JSON string
|
|
36
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
37
|
+
console.log(exampleJSON)
|
|
38
|
+
|
|
39
|
+
// Parse the JSON string back to an object
|
|
40
|
+
const exampleParsed = JSON.parse(exampleJSON) as RedirectListResource
|
|
41
|
+
console.log(exampleParsed)
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
45
|
+
|
|
46
|
+
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
|
|
2
|
+
# RedirectListResourceArrayResponse
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`data` | [Array<RedirectListResource>](RedirectListResource.md)
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import type { RedirectListResourceArrayResponse } from '@digital8/lighting-illusions-ts-sdk'
|
|
15
|
+
|
|
16
|
+
// TODO: Update the object below with actual values
|
|
17
|
+
const example = {
|
|
18
|
+
"data": null,
|
|
19
|
+
} satisfies RedirectListResourceArrayResponse
|
|
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 RedirectListResourceArrayResponse
|
|
29
|
+
console.log(exampleParsed)
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
33
|
+
|
|
34
|
+
|
package/package.json
CHANGED
|
@@ -0,0 +1,77 @@
|
|
|
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
|
+
|
|
16
|
+
import * as runtime from '../runtime';
|
|
17
|
+
import type {
|
|
18
|
+
IndexRedirectRequest,
|
|
19
|
+
PaginatedRedirectListResourceResponse,
|
|
20
|
+
} from '../models/index';
|
|
21
|
+
import {
|
|
22
|
+
IndexRedirectRequestFromJSON,
|
|
23
|
+
IndexRedirectRequestToJSON,
|
|
24
|
+
PaginatedRedirectListResourceResponseFromJSON,
|
|
25
|
+
PaginatedRedirectListResourceResponseToJSON,
|
|
26
|
+
} from '../models/index';
|
|
27
|
+
|
|
28
|
+
export interface IndexRedirectOperationRequest {
|
|
29
|
+
indexRedirectRequest?: IndexRedirectRequest;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
*
|
|
34
|
+
*/
|
|
35
|
+
export class RedirectApi extends runtime.BaseAPI {
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Creates request options for indexRedirect without sending the request
|
|
39
|
+
*/
|
|
40
|
+
async indexRedirectRequestOpts(requestParameters: IndexRedirectOperationRequest): Promise<runtime.RequestOpts> {
|
|
41
|
+
const queryParameters: any = {};
|
|
42
|
+
|
|
43
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
44
|
+
|
|
45
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
let urlPath = `/admin-api/redirect/list`;
|
|
49
|
+
|
|
50
|
+
return {
|
|
51
|
+
path: urlPath,
|
|
52
|
+
method: 'POST',
|
|
53
|
+
headers: headerParameters,
|
|
54
|
+
query: queryParameters,
|
|
55
|
+
body: IndexRedirectRequestToJSON(requestParameters['indexRedirectRequest']),
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Auto-generated: indexRedirect
|
|
61
|
+
*/
|
|
62
|
+
async indexRedirectRaw(requestParameters: IndexRedirectOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedRedirectListResourceResponse>> {
|
|
63
|
+
const requestOptions = await this.indexRedirectRequestOpts(requestParameters);
|
|
64
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
65
|
+
|
|
66
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedRedirectListResourceResponseFromJSON(jsonValue));
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Auto-generated: indexRedirect
|
|
71
|
+
*/
|
|
72
|
+
async indexRedirect(requestParameters: IndexRedirectOperationRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedRedirectListResourceResponse> {
|
|
73
|
+
const response = await this.indexRedirectRaw(requestParameters, initOverrides);
|
|
74
|
+
return await response.value();
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
}
|
package/src/apis/index.ts
CHANGED
|
@@ -13,6 +13,7 @@ export * from './ProductApi';
|
|
|
13
13
|
export * from './ProductCategoryApi';
|
|
14
14
|
export * from './ProductRangeApi';
|
|
15
15
|
export * from './ProductTypeApi';
|
|
16
|
+
export * from './RedirectApi';
|
|
16
17
|
export * from './SiteApi';
|
|
17
18
|
export * from './StoreApi';
|
|
18
19
|
export * from './SupplierApi';
|
|
@@ -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'],
|
|
@@ -30,7 +30,7 @@ export interface AddressResource {
|
|
|
30
30
|
* @type {string}
|
|
31
31
|
* @memberof AddressResource
|
|
32
32
|
*/
|
|
33
|
-
company
|
|
33
|
+
company: string;
|
|
34
34
|
/**
|
|
35
35
|
*
|
|
36
36
|
* @type {string}
|
|
@@ -79,6 +79,7 @@ export interface AddressResource {
|
|
|
79
79
|
* Check if a given object implements the AddressResource interface.
|
|
80
80
|
*/
|
|
81
81
|
export function instanceOfAddressResource(value: object): value is AddressResource {
|
|
82
|
+
if (!('company' in value) || value['company'] === undefined) return false;
|
|
82
83
|
if (!('line1' in value) || value['line1'] === undefined) return false;
|
|
83
84
|
if (!('postcode' in value) || value['postcode'] === undefined) return false;
|
|
84
85
|
if (!('suburb' in value) || value['suburb'] === undefined) return false;
|
|
@@ -99,7 +100,7 @@ export function AddressResourceFromJSONTyped(json: any, ignoreDiscriminator: boo
|
|
|
99
100
|
return {
|
|
100
101
|
|
|
101
102
|
'id': json['id'] == null ? undefined : json['id'],
|
|
102
|
-
'company': json['company']
|
|
103
|
+
'company': json['company'],
|
|
103
104
|
'line1': json['line_1'],
|
|
104
105
|
'line2': json['line_2'] == null ? undefined : json['line_2'],
|
|
105
106
|
'postcode': json['postcode'],
|
|
@@ -0,0 +1,184 @@
|
|
|
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 IndexRedirectRequest
|
|
20
|
+
*/
|
|
21
|
+
export interface IndexRedirectRequest {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof IndexRedirectRequest
|
|
26
|
+
*/
|
|
27
|
+
search?: string | null;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {IndexRedirectRequestSortByEnum}
|
|
31
|
+
* @memberof IndexRedirectRequest
|
|
32
|
+
*/
|
|
33
|
+
sortBy?: IndexRedirectRequestSortByEnum;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {IndexRedirectRequestSortDirectionEnum}
|
|
37
|
+
* @memberof IndexRedirectRequest
|
|
38
|
+
*/
|
|
39
|
+
sortDirection?: IndexRedirectRequestSortDirectionEnum;
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @type {number}
|
|
43
|
+
* @memberof IndexRedirectRequest
|
|
44
|
+
*/
|
|
45
|
+
perPage?: number;
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
* @type {number}
|
|
49
|
+
* @memberof IndexRedirectRequest
|
|
50
|
+
*/
|
|
51
|
+
page?: number;
|
|
52
|
+
/**
|
|
53
|
+
*
|
|
54
|
+
* @type {Array<string>}
|
|
55
|
+
* @memberof IndexRedirectRequest
|
|
56
|
+
*/
|
|
57
|
+
siteId?: Array<string>;
|
|
58
|
+
/**
|
|
59
|
+
*
|
|
60
|
+
* @type {Array<string>}
|
|
61
|
+
* @memberof IndexRedirectRequest
|
|
62
|
+
*/
|
|
63
|
+
redirectableType?: Array<string>;
|
|
64
|
+
/**
|
|
65
|
+
*
|
|
66
|
+
* @type {number}
|
|
67
|
+
* @memberof IndexRedirectRequest
|
|
68
|
+
*/
|
|
69
|
+
relatedId?: number;
|
|
70
|
+
/**
|
|
71
|
+
*
|
|
72
|
+
* @type {IndexRedirectRequestRelatedTypeEnum}
|
|
73
|
+
* @memberof IndexRedirectRequest
|
|
74
|
+
*/
|
|
75
|
+
relatedType?: IndexRedirectRequestRelatedTypeEnum;
|
|
76
|
+
/**
|
|
77
|
+
*
|
|
78
|
+
* @type {boolean}
|
|
79
|
+
* @memberof IndexRedirectRequest
|
|
80
|
+
*/
|
|
81
|
+
includesRelations?: boolean;
|
|
82
|
+
/**
|
|
83
|
+
*
|
|
84
|
+
* @type {number}
|
|
85
|
+
* @memberof IndexRedirectRequest
|
|
86
|
+
*/
|
|
87
|
+
productChildId?: number | null;
|
|
88
|
+
/**
|
|
89
|
+
*
|
|
90
|
+
* @type {number}
|
|
91
|
+
* @memberof IndexRedirectRequest
|
|
92
|
+
*/
|
|
93
|
+
productRangeId?: number | null;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* @export
|
|
99
|
+
*/
|
|
100
|
+
export const IndexRedirectRequestSortByEnum = {
|
|
101
|
+
Id: 'id'
|
|
102
|
+
} as const;
|
|
103
|
+
export type IndexRedirectRequestSortByEnum = typeof IndexRedirectRequestSortByEnum[keyof typeof IndexRedirectRequestSortByEnum];
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* @export
|
|
107
|
+
*/
|
|
108
|
+
export const IndexRedirectRequestSortDirectionEnum = {
|
|
109
|
+
Asc: 'asc',
|
|
110
|
+
Desc: 'desc'
|
|
111
|
+
} as const;
|
|
112
|
+
export type IndexRedirectRequestSortDirectionEnum = typeof IndexRedirectRequestSortDirectionEnum[keyof typeof IndexRedirectRequestSortDirectionEnum];
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* @export
|
|
116
|
+
*/
|
|
117
|
+
export const IndexRedirectRequestRelatedTypeEnum = {
|
|
118
|
+
ProductChildSiteDetail: 'productChildSiteDetail',
|
|
119
|
+
ProductRangeSiteDetail: 'productRangeSiteDetail',
|
|
120
|
+
ProductCategory: 'productCategory',
|
|
121
|
+
Supplier: 'supplier',
|
|
122
|
+
Tag: 'tag'
|
|
123
|
+
} as const;
|
|
124
|
+
export type IndexRedirectRequestRelatedTypeEnum = typeof IndexRedirectRequestRelatedTypeEnum[keyof typeof IndexRedirectRequestRelatedTypeEnum];
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* Check if a given object implements the IndexRedirectRequest interface.
|
|
129
|
+
*/
|
|
130
|
+
export function instanceOfIndexRedirectRequest(value: object): value is IndexRedirectRequest {
|
|
131
|
+
return true;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
export function IndexRedirectRequestFromJSON(json: any): IndexRedirectRequest {
|
|
135
|
+
return IndexRedirectRequestFromJSONTyped(json, false);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
export function IndexRedirectRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): IndexRedirectRequest {
|
|
139
|
+
if (json == null) {
|
|
140
|
+
return json;
|
|
141
|
+
}
|
|
142
|
+
return {
|
|
143
|
+
|
|
144
|
+
'search': json['search'] == null ? undefined : json['search'],
|
|
145
|
+
'sortBy': json['sortBy'] == null ? undefined : json['sortBy'],
|
|
146
|
+
'sortDirection': json['sortDirection'] == null ? undefined : json['sortDirection'],
|
|
147
|
+
'perPage': json['per_page'] == null ? undefined : json['per_page'],
|
|
148
|
+
'page': json['page'] == null ? undefined : json['page'],
|
|
149
|
+
'siteId': json['site_id'] == null ? undefined : json['site_id'],
|
|
150
|
+
'redirectableType': json['redirectable_type'] == null ? undefined : json['redirectable_type'],
|
|
151
|
+
'relatedId': json['related_id'] == null ? undefined : json['related_id'],
|
|
152
|
+
'relatedType': json['related_type'] == null ? undefined : json['related_type'],
|
|
153
|
+
'includesRelations': json['includes_relations'] == null ? undefined : json['includes_relations'],
|
|
154
|
+
'productChildId': json['product_child_id'] == null ? undefined : json['product_child_id'],
|
|
155
|
+
'productRangeId': json['product_range_id'] == null ? undefined : json['product_range_id'],
|
|
156
|
+
};
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
export function IndexRedirectRequestToJSON(json: any): IndexRedirectRequest {
|
|
160
|
+
return IndexRedirectRequestToJSONTyped(json, false);
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
export function IndexRedirectRequestToJSONTyped(value?: IndexRedirectRequest | null, ignoreDiscriminator: boolean = false): any {
|
|
164
|
+
if (value == null) {
|
|
165
|
+
return value;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
return {
|
|
169
|
+
|
|
170
|
+
'search': value['search'],
|
|
171
|
+
'sortBy': value['sortBy'],
|
|
172
|
+
'sortDirection': value['sortDirection'],
|
|
173
|
+
'per_page': value['perPage'],
|
|
174
|
+
'page': value['page'],
|
|
175
|
+
'site_id': value['siteId'],
|
|
176
|
+
'redirectable_type': value['redirectableType'],
|
|
177
|
+
'related_id': value['relatedId'],
|
|
178
|
+
'related_type': value['relatedType'],
|
|
179
|
+
'includes_relations': value['includesRelations'],
|
|
180
|
+
'product_child_id': value['productChildId'],
|
|
181
|
+
'product_range_id': value['productRangeId'],
|
|
182
|
+
};
|
|
183
|
+
}
|
|
184
|
+
|