@digital8/lighting-illusions-ts-sdk 0.0.1125 → 0.0.1126

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/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # @digital8/lighting-illusions-ts-sdk@0.0.1125
1
+ # @digital8/lighting-illusions-ts-sdk@0.0.1126
2
2
 
3
3
  A TypeScript SDK client for the localhost API.
4
4
 
@@ -159,6 +159,7 @@ All URIs are relative to *http://localhost/api*
159
159
  *StoreApi* | [**storeStore**](docs/StoreApi.md#storestoreoperation) | **POST** /admin-api/store/create | Auto-generated: storeStore
160
160
  *StoreApi* | [**storeStoreSpecialDate**](docs/StoreApi.md#storestorespecialdateoperation) | **POST** /admin-api/store/{store}/special-dates | Auto-generated: storeStoreSpecialDate
161
161
  *StoreApi* | [**updateStore**](docs/StoreApi.md#updatestoreoperation) | **PUT** /admin-api/store/{store}/update | Auto-generated: updateStore
162
+ *StoreApi* | [**updateStoreSpecialDate**](docs/StoreApi.md#updatestorespecialdate) | **PUT** /admin-api/store/{store}/special-dates/{storeSpecialDate} | Auto-generated: updateStoreSpecialDate
162
163
  *SupplierApi* | [**attachStoresSupplier**](docs/SupplierApi.md#attachstoressupplieroperation) | **POST** /admin-api/supplier/{supplier}/attach-stores | Auto-generated: attachStoresSupplier
163
164
  *SupplierApi* | [**destroySupplier**](docs/SupplierApi.md#destroysupplier) | **DELETE** /admin-api/supplier/{supplier}/delete | Auto-generated: destroySupplier
164
165
  *SupplierApi* | [**detachStoresSupplier**](docs/SupplierApi.md#detachstoressupplieroperation) | **POST** /admin-api/supplier/{supplier}/detach-stores | Auto-generated: detachStoresSupplier
@@ -504,7 +505,7 @@ and is automatically generated by the
504
505
  [OpenAPI Generator](https://openapi-generator.tech) project:
505
506
 
506
507
  - API version: `1.0.0`
507
- - Package version: `0.0.1125`
508
+ - Package version: `0.0.1126`
508
509
  - Generator version: `7.20.0`
509
510
  - Build package: `org.openapitools.codegen.languages.TypeScriptFetchClientCodegen`
510
511
 
@@ -43,6 +43,11 @@ export interface UpdateStoreOperationRequest {
43
43
  store: number;
44
44
  updateStoreRequest?: UpdateStoreRequest;
45
45
  }
46
+ export interface UpdateStoreSpecialDateRequest {
47
+ store: number;
48
+ storeSpecialDate: number;
49
+ storeStoreSpecialDateRequest?: StoreStoreSpecialDateRequest;
50
+ }
46
51
  /**
47
52
  *
48
53
  */
@@ -155,4 +160,16 @@ export declare class StoreApi extends runtime.BaseAPI {
155
160
  * Auto-generated: updateStore
156
161
  */
157
162
  updateStore(requestParameters: UpdateStoreOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<StoreResource>;
163
+ /**
164
+ * Creates request options for updateStoreSpecialDate without sending the request
165
+ */
166
+ updateStoreSpecialDateRequestOpts(requestParameters: UpdateStoreSpecialDateRequest): Promise<runtime.RequestOpts>;
167
+ /**
168
+ * Auto-generated: updateStoreSpecialDate
169
+ */
170
+ updateStoreSpecialDateRaw(requestParameters: UpdateStoreSpecialDateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<StoreSpecialDateResource>>;
171
+ /**
172
+ * Auto-generated: updateStoreSpecialDate
173
+ */
174
+ updateStoreSpecialDate(requestParameters: UpdateStoreSpecialDateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<StoreSpecialDateResource>;
158
175
  }
@@ -616,6 +616,71 @@ var StoreApi = /** @class */ (function (_super) {
616
616
  });
617
617
  });
618
618
  };
619
+ /**
620
+ * Creates request options for updateStoreSpecialDate without sending the request
621
+ */
622
+ StoreApi.prototype.updateStoreSpecialDateRequestOpts = function (requestParameters) {
623
+ return __awaiter(this, void 0, void 0, function () {
624
+ var queryParameters, headerParameters, urlPath;
625
+ return __generator(this, function (_a) {
626
+ if (requestParameters['store'] == null) {
627
+ throw new runtime.RequiredError('store', 'Required parameter "store" was null or undefined when calling updateStoreSpecialDate().');
628
+ }
629
+ if (requestParameters['storeSpecialDate'] == null) {
630
+ throw new runtime.RequiredError('storeSpecialDate', 'Required parameter "storeSpecialDate" was null or undefined when calling updateStoreSpecialDate().');
631
+ }
632
+ queryParameters = {};
633
+ headerParameters = {};
634
+ headerParameters['Content-Type'] = 'application/json';
635
+ urlPath = "/admin-api/store/{store}/special-dates/{storeSpecialDate}";
636
+ urlPath = urlPath.replace("{".concat("store", "}"), encodeURIComponent(String(requestParameters['store'])));
637
+ urlPath = urlPath.replace("{".concat("storeSpecialDate", "}"), encodeURIComponent(String(requestParameters['storeSpecialDate'])));
638
+ return [2 /*return*/, {
639
+ path: urlPath,
640
+ method: 'PUT',
641
+ headers: headerParameters,
642
+ query: queryParameters,
643
+ body: (0, index_1.StoreStoreSpecialDateRequestToJSON)(requestParameters['storeStoreSpecialDateRequest']),
644
+ }];
645
+ });
646
+ });
647
+ };
648
+ /**
649
+ * Auto-generated: updateStoreSpecialDate
650
+ */
651
+ StoreApi.prototype.updateStoreSpecialDateRaw = function (requestParameters, initOverrides) {
652
+ return __awaiter(this, void 0, void 0, function () {
653
+ var requestOptions, response;
654
+ return __generator(this, function (_a) {
655
+ switch (_a.label) {
656
+ case 0: return [4 /*yield*/, this.updateStoreSpecialDateRequestOpts(requestParameters)];
657
+ case 1:
658
+ requestOptions = _a.sent();
659
+ return [4 /*yield*/, this.request(requestOptions, initOverrides)];
660
+ case 2:
661
+ response = _a.sent();
662
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.StoreSpecialDateResourceFromJSON)(jsonValue); })];
663
+ }
664
+ });
665
+ });
666
+ };
667
+ /**
668
+ * Auto-generated: updateStoreSpecialDate
669
+ */
670
+ StoreApi.prototype.updateStoreSpecialDate = function (requestParameters, initOverrides) {
671
+ return __awaiter(this, void 0, void 0, function () {
672
+ var response;
673
+ return __generator(this, function (_a) {
674
+ switch (_a.label) {
675
+ case 0: return [4 /*yield*/, this.updateStoreSpecialDateRaw(requestParameters, initOverrides)];
676
+ case 1:
677
+ response = _a.sent();
678
+ return [4 /*yield*/, response.value()];
679
+ case 2: return [2 /*return*/, _a.sent()];
680
+ }
681
+ });
682
+ });
683
+ };
619
684
  return StoreApi;
620
685
  }(runtime.BaseAPI));
621
686
  exports.StoreApi = StoreApi;
@@ -63,7 +63,7 @@ export interface ExternalApiLogResource {
63
63
  * @type {string}
64
64
  * @memberof ExternalApiLogResource
65
65
  */
66
- requestPayload: string;
66
+ requestPayload?: string | null;
67
67
  /**
68
68
  *
69
69
  * @type {string}
@@ -37,8 +37,6 @@ function instanceOfExternalApiLogResource(value) {
37
37
  return false;
38
38
  if (!('responseCode' in value) || value['responseCode'] === undefined)
39
39
  return false;
40
- if (!('requestPayload' in value) || value['requestPayload'] === undefined)
41
- return false;
42
40
  if (!('responsePayload' in value) || value['responsePayload'] === undefined)
43
41
  return false;
44
42
  if (!('site' in value) || value['site'] === undefined)
@@ -60,7 +58,7 @@ function ExternalApiLogResourceFromJSONTyped(json, ignoreDiscriminator) {
60
58
  'exteranlApiLoggableId': json['exteranlApiLoggableId'],
61
59
  'endpoint': json['endpoint'],
62
60
  'responseCode': json['responseCode'],
63
- 'requestPayload': json['requestPayload'],
61
+ 'requestPayload': json['requestPayload'] == null ? undefined : json['requestPayload'],
64
62
  'responsePayload': json['responsePayload'],
65
63
  'createdAt': json['createdAt'] == null ? undefined : json['createdAt'],
66
64
  'site': (0, SiteLiteResource_1.SiteLiteResourceFromJSON)(json['site']),
@@ -60,7 +60,7 @@ export interface StoreResource {
60
60
  * @type {string}
61
61
  * @memberof StoreResource
62
62
  */
63
- tagLine?: string | null;
63
+ tagLine: string;
64
64
  /**
65
65
  *
66
66
  * @type {string}
@@ -36,6 +36,8 @@ function instanceOfStoreResource(value) {
36
36
  return false;
37
37
  if (!('latitude' in value) || value['latitude'] === undefined)
38
38
  return false;
39
+ if (!('tagLine' in value) || value['tagLine'] === undefined)
40
+ return false;
39
41
  if (!('email' in value) || value['email'] === undefined)
40
42
  return false;
41
43
  if (!('suppliers' in value) || value['suppliers'] === undefined)
@@ -60,7 +62,7 @@ function StoreResourceFromJSONTyped(json, ignoreDiscriminator) {
60
62
  'phone': json['phone'],
61
63
  'longitude': json['longitude'],
62
64
  'latitude': json['latitude'],
63
- 'tagLine': json['tag_line'] == null ? undefined : json['tag_line'],
65
+ 'tagLine': json['tag_line'],
64
66
  'email': json['email'],
65
67
  'openingHours': json['opening_hours'] == null ? undefined : json['opening_hours'],
66
68
  'createdAt': json['created_at'] == null ? undefined : (new Date(json['created_at'])),
package/docs/StoreApi.md CHANGED
@@ -13,6 +13,7 @@ All URIs are relative to *http://localhost/api*
13
13
  | [**storeStore**](StoreApi.md#storestoreoperation) | **POST** /admin-api/store/create | Auto-generated: storeStore |
14
14
  | [**storeStoreSpecialDate**](StoreApi.md#storestorespecialdateoperation) | **POST** /admin-api/store/{store}/special-dates | Auto-generated: storeStoreSpecialDate |
15
15
  | [**updateStore**](StoreApi.md#updatestoreoperation) | **PUT** /admin-api/store/{store}/update | Auto-generated: updateStore |
16
+ | [**updateStoreSpecialDate**](StoreApi.md#updatestorespecialdate) | **PUT** /admin-api/store/{store}/special-dates/{storeSpecialDate} | Auto-generated: updateStoreSpecialDate |
16
17
 
17
18
 
18
19
 
@@ -615,3 +616,74 @@ No authorization required
615
616
 
616
617
  [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
617
618
 
619
+
620
+ ## updateStoreSpecialDate
621
+
622
+ > StoreSpecialDateResource updateStoreSpecialDate(store, storeSpecialDate, storeStoreSpecialDateRequest)
623
+
624
+ Auto-generated: updateStoreSpecialDate
625
+
626
+ ### Example
627
+
628
+ ```ts
629
+ import {
630
+ Configuration,
631
+ StoreApi,
632
+ } from '@digital8/lighting-illusions-ts-sdk';
633
+ import type { UpdateStoreSpecialDateRequest } from '@digital8/lighting-illusions-ts-sdk';
634
+
635
+ async function example() {
636
+ console.log("🚀 Testing @digital8/lighting-illusions-ts-sdk SDK...");
637
+ const api = new StoreApi();
638
+
639
+ const body = {
640
+ // number | The id of the store
641
+ store: 56,
642
+ // number | The id of the storeSpecialDate
643
+ storeSpecialDate: 56,
644
+ // StoreStoreSpecialDateRequest (optional)
645
+ storeStoreSpecialDateRequest: ...,
646
+ } satisfies UpdateStoreSpecialDateRequest;
647
+
648
+ try {
649
+ const data = await api.updateStoreSpecialDate(body);
650
+ console.log(data);
651
+ } catch (error) {
652
+ console.error(error);
653
+ }
654
+ }
655
+
656
+ // Run the test
657
+ example().catch(console.error);
658
+ ```
659
+
660
+ ### Parameters
661
+
662
+
663
+ | Name | Type | Description | Notes |
664
+ |------------- | ------------- | ------------- | -------------|
665
+ | **store** | `number` | The id of the store | [Defaults to `undefined`] |
666
+ | **storeSpecialDate** | `number` | The id of the storeSpecialDate | [Defaults to `undefined`] |
667
+ | **storeStoreSpecialDateRequest** | [StoreStoreSpecialDateRequest](StoreStoreSpecialDateRequest.md) | | [Optional] |
668
+
669
+ ### Return type
670
+
671
+ [**StoreSpecialDateResource**](StoreSpecialDateResource.md)
672
+
673
+ ### Authorization
674
+
675
+ No authorization required
676
+
677
+ ### HTTP request headers
678
+
679
+ - **Content-Type**: `application/json`
680
+ - **Accept**: `application/json`
681
+
682
+
683
+ ### HTTP response details
684
+ | Status code | Description | Response headers |
685
+ |-------------|-------------|------------------|
686
+ | **200** | Successful resource response | - |
687
+
688
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
689
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digital8/lighting-illusions-ts-sdk",
3
- "version": "0.0.1125",
3
+ "version": "0.0.1126",
4
4
  "description": "OpenAPI client for @digital8/lighting-illusions-ts-sdk",
5
5
  "author": "OpenAPI-Generator",
6
6
  "repository": {
@@ -90,6 +90,12 @@ export interface UpdateStoreOperationRequest {
90
90
  updateStoreRequest?: UpdateStoreRequest;
91
91
  }
92
92
 
93
+ export interface UpdateStoreSpecialDateRequest {
94
+ store: number;
95
+ storeSpecialDate: number;
96
+ storeStoreSpecialDateRequest?: StoreStoreSpecialDateRequest;
97
+ }
98
+
93
99
  /**
94
100
  *
95
101
  */
@@ -510,4 +516,60 @@ export class StoreApi extends runtime.BaseAPI {
510
516
  return await response.value();
511
517
  }
512
518
 
519
+ /**
520
+ * Creates request options for updateStoreSpecialDate without sending the request
521
+ */
522
+ async updateStoreSpecialDateRequestOpts(requestParameters: UpdateStoreSpecialDateRequest): Promise<runtime.RequestOpts> {
523
+ if (requestParameters['store'] == null) {
524
+ throw new runtime.RequiredError(
525
+ 'store',
526
+ 'Required parameter "store" was null or undefined when calling updateStoreSpecialDate().'
527
+ );
528
+ }
529
+
530
+ if (requestParameters['storeSpecialDate'] == null) {
531
+ throw new runtime.RequiredError(
532
+ 'storeSpecialDate',
533
+ 'Required parameter "storeSpecialDate" was null or undefined when calling updateStoreSpecialDate().'
534
+ );
535
+ }
536
+
537
+ const queryParameters: any = {};
538
+
539
+ const headerParameters: runtime.HTTPHeaders = {};
540
+
541
+ headerParameters['Content-Type'] = 'application/json';
542
+
543
+
544
+ let urlPath = `/admin-api/store/{store}/special-dates/{storeSpecialDate}`;
545
+ urlPath = urlPath.replace(`{${"store"}}`, encodeURIComponent(String(requestParameters['store'])));
546
+ urlPath = urlPath.replace(`{${"storeSpecialDate"}}`, encodeURIComponent(String(requestParameters['storeSpecialDate'])));
547
+
548
+ return {
549
+ path: urlPath,
550
+ method: 'PUT',
551
+ headers: headerParameters,
552
+ query: queryParameters,
553
+ body: StoreStoreSpecialDateRequestToJSON(requestParameters['storeStoreSpecialDateRequest']),
554
+ };
555
+ }
556
+
557
+ /**
558
+ * Auto-generated: updateStoreSpecialDate
559
+ */
560
+ async updateStoreSpecialDateRaw(requestParameters: UpdateStoreSpecialDateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<StoreSpecialDateResource>> {
561
+ const requestOptions = await this.updateStoreSpecialDateRequestOpts(requestParameters);
562
+ const response = await this.request(requestOptions, initOverrides);
563
+
564
+ return new runtime.JSONApiResponse(response, (jsonValue) => StoreSpecialDateResourceFromJSON(jsonValue));
565
+ }
566
+
567
+ /**
568
+ * Auto-generated: updateStoreSpecialDate
569
+ */
570
+ async updateStoreSpecialDate(requestParameters: UpdateStoreSpecialDateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<StoreSpecialDateResource> {
571
+ const response = await this.updateStoreSpecialDateRaw(requestParameters, initOverrides);
572
+ return await response.value();
573
+ }
574
+
513
575
  }
@@ -74,7 +74,7 @@ export interface ExternalApiLogResource {
74
74
  * @type {string}
75
75
  * @memberof ExternalApiLogResource
76
76
  */
77
- requestPayload: string;
77
+ requestPayload?: string | null;
78
78
  /**
79
79
  *
80
80
  * @type {string}
@@ -106,7 +106,6 @@ 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;
110
109
  if (!('responsePayload' in value) || value['responsePayload'] === undefined) return false;
111
110
  if (!('site' in value) || value['site'] === undefined) return false;
112
111
  return true;
@@ -129,7 +128,7 @@ export function ExternalApiLogResourceFromJSONTyped(json: any, ignoreDiscriminat
129
128
  'exteranlApiLoggableId': json['exteranlApiLoggableId'],
130
129
  'endpoint': json['endpoint'],
131
130
  'responseCode': json['responseCode'],
132
- 'requestPayload': json['requestPayload'],
131
+ 'requestPayload': json['requestPayload'] == null ? undefined : json['requestPayload'],
133
132
  'responsePayload': json['responsePayload'],
134
133
  'createdAt': json['createdAt'] == null ? undefined : json['createdAt'],
135
134
  'site': SiteLiteResourceFromJSON(json['site']),
@@ -89,7 +89,7 @@ export interface StoreResource {
89
89
  * @type {string}
90
90
  * @memberof StoreResource
91
91
  */
92
- tagLine?: string | null;
92
+ tagLine: string;
93
93
  /**
94
94
  *
95
95
  * @type {string}
@@ -143,6 +143,7 @@ export function instanceOfStoreResource(value: object): value is StoreResource {
143
143
  if (!('phone' in value) || value['phone'] === undefined) return false;
144
144
  if (!('longitude' in value) || value['longitude'] === undefined) return false;
145
145
  if (!('latitude' in value) || value['latitude'] === undefined) return false;
146
+ if (!('tagLine' in value) || value['tagLine'] === undefined) return false;
146
147
  if (!('email' in value) || value['email'] === undefined) return false;
147
148
  if (!('suppliers' in value) || value['suppliers'] === undefined) return false;
148
149
  if (!('address' in value) || value['address'] === undefined) return false;
@@ -166,7 +167,7 @@ export function StoreResourceFromJSONTyped(json: any, ignoreDiscriminator: boole
166
167
  'phone': json['phone'],
167
168
  'longitude': json['longitude'],
168
169
  'latitude': json['latitude'],
169
- 'tagLine': json['tag_line'] == null ? undefined : json['tag_line'],
170
+ 'tagLine': json['tag_line'],
170
171
  'email': json['email'],
171
172
  'openingHours': json['opening_hours'] == null ? undefined : json['opening_hours'],
172
173
  'createdAt': json['created_at'] == null ? undefined : (new Date(json['created_at'])),