@digital8/lighting-illusions-ts-sdk 0.0.1570 → 0.0.1571

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.
Files changed (57) hide show
  1. package/.openapi-generator/FILES +14 -0
  2. package/README.md +9 -2
  3. package/dist/apis/RedirectApi.d.ts +33 -0
  4. package/dist/apis/RedirectApi.js +138 -0
  5. package/dist/apis/index.d.ts +1 -0
  6. package/dist/apis/index.js +1 -0
  7. package/dist/models/AddressFrontendResource.d.ts +1 -1
  8. package/dist/models/AddressFrontendResource.js +3 -1
  9. package/dist/models/AddressResource.d.ts +2 -2
  10. package/dist/models/AddressResource.js +6 -2
  11. package/dist/models/ExternalApiLogResource.d.ts +1 -1
  12. package/dist/models/ExternalApiLogResource.js +3 -1
  13. package/dist/models/IndexRedirectRequest.d.ts +112 -0
  14. package/dist/models/IndexRedirectRequest.js +91 -0
  15. package/dist/models/PaginatedRedirectListResourceResponse.d.ts +40 -0
  16. package/dist/models/PaginatedRedirectListResourceResponse.js +57 -0
  17. package/dist/models/RedirectFrontendResource.d.ts +62 -0
  18. package/dist/models/RedirectFrontendResource.js +71 -0
  19. package/dist/models/RedirectFrontendResourceArrayResponse.d.ts +33 -0
  20. package/dist/models/RedirectFrontendResourceArrayResponse.js +50 -0
  21. package/dist/models/RedirectListResource.d.ts +69 -0
  22. package/dist/models/RedirectListResource.js +76 -0
  23. package/dist/models/RedirectListResourceArrayResponse.d.ts +33 -0
  24. package/dist/models/RedirectListResourceArrayResponse.js +50 -0
  25. package/dist/models/StoreResource.d.ts +1 -1
  26. package/dist/models/StoreResource.js +1 -3
  27. package/dist/models/StoreSpecialDateFrontendResource.d.ts +2 -2
  28. package/dist/models/StoreSpecialDateFrontendResource.js +1 -3
  29. package/dist/models/StoreSpecialDateResource.d.ts +2 -2
  30. package/dist/models/StoreSpecialDateResource.js +1 -3
  31. package/dist/models/index.d.ts +6 -0
  32. package/dist/models/index.js +6 -0
  33. package/docs/IndexRedirectRequest.md +52 -0
  34. package/docs/PaginatedRedirectListResourceResponse.md +36 -0
  35. package/docs/RedirectApi.md +74 -0
  36. package/docs/RedirectFrontendResource.md +44 -0
  37. package/docs/RedirectFrontendResourceArrayResponse.md +34 -0
  38. package/docs/RedirectListResource.md +46 -0
  39. package/docs/RedirectListResourceArrayResponse.md +34 -0
  40. package/docs/StoreSpecialDateFrontendResource.md +1 -1
  41. package/docs/StoreSpecialDateResource.md +1 -1
  42. package/package.json +1 -1
  43. package/src/apis/RedirectApi.ts +77 -0
  44. package/src/apis/index.ts +1 -0
  45. package/src/models/AddressFrontendResource.ts +3 -2
  46. package/src/models/AddressResource.ts +6 -4
  47. package/src/models/ExternalApiLogResource.ts +3 -2
  48. package/src/models/IndexRedirectRequest.ts +168 -0
  49. package/src/models/PaginatedRedirectListResourceResponse.ts +90 -0
  50. package/src/models/RedirectFrontendResource.ts +111 -0
  51. package/src/models/RedirectFrontendResourceArrayResponse.ts +73 -0
  52. package/src/models/RedirectListResource.ts +128 -0
  53. package/src/models/RedirectListResourceArrayResponse.ts +73 -0
  54. package/src/models/StoreResource.ts +2 -3
  55. package/src/models/StoreSpecialDateFrontendResource.ts +3 -4
  56. package/src/models/StoreSpecialDateResource.ts +3 -4
  57. package/src/models/index.ts +6 -0
@@ -0,0 +1,52 @@
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
+
20
+ ## Example
21
+
22
+ ```typescript
23
+ import type { IndexRedirectRequest } from '@digital8/lighting-illusions-ts-sdk'
24
+
25
+ // TODO: Update the object below with actual values
26
+ const example = {
27
+ "search": null,
28
+ "sortBy": null,
29
+ "sortDirection": null,
30
+ "perPage": null,
31
+ "page": null,
32
+ "siteId": null,
33
+ "redirectableType": null,
34
+ "relatedId": null,
35
+ "relatedType": null,
36
+ "includesRelations": null,
37
+ } satisfies IndexRedirectRequest
38
+
39
+ console.log(example)
40
+
41
+ // Convert the instance to a JSON string
42
+ const exampleJSON: string = JSON.stringify(example)
43
+ console.log(exampleJSON)
44
+
45
+ // Parse the JSON string back to an object
46
+ const exampleParsed = JSON.parse(exampleJSON) as IndexRedirectRequest
47
+ console.log(exampleParsed)
48
+ ```
49
+
50
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
51
+
52
+
@@ -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
+
@@ -9,7 +9,7 @@ Name | Type
9
9
  `id` | number
10
10
  `name` | string
11
11
  `hours` | string
12
- `date` | object
12
+ `date` | string
13
13
  `closed` | boolean
14
14
  `displayStartDate` | object
15
15
  `displayEndDate` | object
@@ -9,7 +9,7 @@ Name | Type
9
9
  `id` | number
10
10
  `name` | string
11
11
  `hours` | string
12
- `date` | object
12
+ `date` | string
13
13
  `closed` | boolean
14
14
  `displayStartDate` | string
15
15
  `displayEndDate` | string
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digital8/lighting-illusions-ts-sdk",
3
- "version": "0.0.1570",
3
+ "version": "0.0.1571",
4
4
  "description": "OpenAPI client for @digital8/lighting-illusions-ts-sdk",
5
5
  "author": "OpenAPI-Generator",
6
6
  "repository": {
@@ -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';
@@ -24,7 +24,7 @@ export interface AddressFrontendResource {
24
24
  * @type {string}
25
25
  * @memberof AddressFrontendResource
26
26
  */
27
- company?: string | null;
27
+ company: string;
28
28
  /**
29
29
  *
30
30
  * @type {string}
@@ -73,6 +73,7 @@ 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
78
  if (!('line2' in value) || value['line2'] === undefined) return false;
78
79
  if (!('postcode' in value) || value['postcode'] === undefined) return false;
@@ -93,7 +94,7 @@ export function AddressFrontendResourceFromJSONTyped(json: any, ignoreDiscrimina
93
94
  }
94
95
  return {
95
96
 
96
- 'company': json['company'] == null ? undefined : json['company'],
97
+ 'company': json['company'],
97
98
  'line1': json['line1'],
98
99
  'line2': json['line2'],
99
100
  'postcode': json['postcode'],
@@ -30,7 +30,7 @@ export interface AddressResource {
30
30
  * @type {string}
31
31
  * @memberof AddressResource
32
32
  */
33
- company?: string | null;
33
+ company: string;
34
34
  /**
35
35
  *
36
36
  * @type {string}
@@ -42,7 +42,7 @@ export interface AddressResource {
42
42
  * @type {string}
43
43
  * @memberof AddressResource
44
44
  */
45
- line2?: string | null;
45
+ line2: string;
46
46
  /**
47
47
  *
48
48
  * @type {string}
@@ -79,7 +79,9 @@ 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;
84
+ if (!('line2' in value) || value['line2'] === undefined) return false;
83
85
  if (!('postcode' in value) || value['postcode'] === undefined) return false;
84
86
  if (!('suburb' in value) || value['suburb'] === undefined) return false;
85
87
  if (!('country' in value) || value['country'] === undefined) return false;
@@ -99,9 +101,9 @@ export function AddressResourceFromJSONTyped(json: any, ignoreDiscriminator: boo
99
101
  return {
100
102
 
101
103
  'id': json['id'] == null ? undefined : json['id'],
102
- 'company': json['company'] == null ? undefined : json['company'],
104
+ 'company': json['company'],
103
105
  'line1': json['line_1'],
104
- 'line2': json['line_2'] == null ? undefined : json['line_2'],
106
+ 'line2': json['line_2'],
105
107
  'postcode': json['postcode'],
106
108
  'suburb': json['suburb'],
107
109
  'country': json['country'],
@@ -74,7 +74,7 @@ export interface ExternalApiLogResource {
74
74
  * @type {string}
75
75
  * @memberof ExternalApiLogResource
76
76
  */
77
- requestPayload?: string | null;
77
+ requestPayload: string;
78
78
  /**
79
79
  *
80
80
  * @type {string}
@@ -106,6 +106,7 @@ export function instanceOfExternalApiLogResource(value: object): value is Extern
106
106
  if (!('exteranlApiLoggableId' in value) || value['exteranlApiLoggableId'] === undefined) return false;
107
107
  if (!('endpoint' in value) || value['endpoint'] === undefined) return false;
108
108
  if (!('responseCode' in value) || value['responseCode'] === undefined) return false;
109
+ if (!('requestPayload' in value) || value['requestPayload'] === undefined) return false;
109
110
  if (!('responsePayload' in value) || value['responsePayload'] === undefined) return false;
110
111
  if (!('site' in value) || value['site'] === undefined) return false;
111
112
  return true;
@@ -128,7 +129,7 @@ export function ExternalApiLogResourceFromJSONTyped(json: any, ignoreDiscriminat
128
129
  'exteranlApiLoggableId': json['exteranlApiLoggableId'],
129
130
  'endpoint': json['endpoint'],
130
131
  'responseCode': json['responseCode'],
131
- 'requestPayload': json['requestPayload'] == null ? undefined : json['requestPayload'],
132
+ 'requestPayload': json['requestPayload'],
132
133
  'responsePayload': json['responsePayload'],
133
134
  'createdAt': json['createdAt'] == null ? undefined : json['createdAt'],
134
135
  'site': SiteLiteResourceFromJSON(json['site']),