@digital8/lighting-illusions-ts-sdk 0.0.1739 → 0.0.1740
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 +8 -0
- package/README.md +8 -2
- package/dist/apis/ReviewApi.d.ts +30 -0
- package/dist/apis/ReviewApi.js +133 -0
- package/dist/models/AddressFrontendResource.d.ts +1 -1
- package/dist/models/AddressFrontendResource.js +1 -3
- package/dist/models/ProductReviewsResource.d.ts +63 -0
- package/dist/models/ProductReviewsResource.js +70 -0
- package/dist/models/ProductReviewsResourceArrayResponse.d.ts +33 -0
- package/dist/models/ProductReviewsResourceArrayResponse.js +50 -0
- package/dist/models/ReviewPublicResource.d.ts +86 -0
- package/dist/models/ReviewPublicResource.js +81 -0
- package/dist/models/ReviewPublicResourceArrayResponse.d.ts +33 -0
- package/dist/models/ReviewPublicResourceArrayResponse.js +50 -0
- package/dist/models/StoreFrontendResource.d.ts +2 -2
- package/dist/models/StoreFrontendResource.js +6 -2
- package/dist/models/StoreListResource.d.ts +1 -1
- package/dist/models/StoreListResource.js +1 -3
- package/dist/models/StoreSpecialDateFrontendResource.d.ts +2 -2
- package/dist/models/StoreSpecialDateFrontendResource.js +3 -1
- package/dist/models/StoreSpecialDateResource.d.ts +2 -2
- package/dist/models/StoreSpecialDateResource.js +3 -1
- package/dist/models/index.d.ts +4 -0
- package/dist/models/index.js +4 -0
- package/docs/ProductReviewsResource.md +44 -0
- package/docs/ProductReviewsResourceArrayResponse.md +34 -0
- package/docs/ReviewApi.md +132 -0
- package/docs/ReviewPublicResource.md +52 -0
- package/docs/ReviewPublicResourceArrayResponse.md +34 -0
- package/docs/StoreSpecialDateFrontendResource.md +1 -1
- package/docs/StoreSpecialDateResource.md +1 -1
- package/package.json +1 -1
- package/src/apis/ReviewApi.ts +113 -0
- package/src/models/AddressFrontendResource.ts +2 -3
- package/src/models/ProductReviewsResource.ts +118 -0
- package/src/models/ProductReviewsResourceArrayResponse.ts +73 -0
- package/src/models/ReviewPublicResource.ts +144 -0
- package/src/models/ReviewPublicResourceArrayResponse.ts +73 -0
- package/src/models/StoreFrontendResource.ts +6 -4
- package/src/models/StoreListResource.ts +2 -3
- package/src/models/StoreSpecialDateFrontendResource.ts +4 -3
- package/src/models/StoreSpecialDateResource.ts +4 -3
- package/src/models/index.ts +4 -0
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* My API
|
|
6
|
+
* API documentation for my Laravel app
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.0
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.instanceOfReviewPublicResource = instanceOfReviewPublicResource;
|
|
17
|
+
exports.ReviewPublicResourceFromJSON = ReviewPublicResourceFromJSON;
|
|
18
|
+
exports.ReviewPublicResourceFromJSONTyped = ReviewPublicResourceFromJSONTyped;
|
|
19
|
+
exports.ReviewPublicResourceToJSON = ReviewPublicResourceToJSON;
|
|
20
|
+
exports.ReviewPublicResourceToJSONTyped = ReviewPublicResourceToJSONTyped;
|
|
21
|
+
/**
|
|
22
|
+
* Check if a given object implements the ReviewPublicResource interface.
|
|
23
|
+
*/
|
|
24
|
+
function instanceOfReviewPublicResource(value) {
|
|
25
|
+
if (!('id' in value) || value['id'] === undefined)
|
|
26
|
+
return false;
|
|
27
|
+
if (!('overallRating' in value) || value['overallRating'] === undefined)
|
|
28
|
+
return false;
|
|
29
|
+
if (!('comment' in value) || value['comment'] === undefined)
|
|
30
|
+
return false;
|
|
31
|
+
if (!('reviewerName' in value) || value['reviewerName'] === undefined)
|
|
32
|
+
return false;
|
|
33
|
+
if (!('location' in value) || value['location'] === undefined)
|
|
34
|
+
return false;
|
|
35
|
+
if (!('productId' in value) || value['productId'] === undefined)
|
|
36
|
+
return false;
|
|
37
|
+
if (!('siteId' in value) || value['siteId'] === undefined)
|
|
38
|
+
return false;
|
|
39
|
+
return true;
|
|
40
|
+
}
|
|
41
|
+
function ReviewPublicResourceFromJSON(json) {
|
|
42
|
+
return ReviewPublicResourceFromJSONTyped(json, false);
|
|
43
|
+
}
|
|
44
|
+
function ReviewPublicResourceFromJSONTyped(json, ignoreDiscriminator) {
|
|
45
|
+
if (json == null) {
|
|
46
|
+
return json;
|
|
47
|
+
}
|
|
48
|
+
return {
|
|
49
|
+
'id': json['id'],
|
|
50
|
+
'overallRating': json['overallRating'],
|
|
51
|
+
'comment': json['comment'],
|
|
52
|
+
'replyText': json['replyText'] == null ? undefined : json['replyText'],
|
|
53
|
+
'reviewerName': json['reviewerName'],
|
|
54
|
+
'location': json['location'],
|
|
55
|
+
'createdAt': json['createdAt'] == null ? undefined : (new Date(json['createdAt'])),
|
|
56
|
+
'customerId': json['customerId'] == null ? undefined : json['customerId'],
|
|
57
|
+
'productId': json['productId'],
|
|
58
|
+
'siteId': json['siteId'],
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
function ReviewPublicResourceToJSON(json) {
|
|
62
|
+
return ReviewPublicResourceToJSONTyped(json, false);
|
|
63
|
+
}
|
|
64
|
+
function ReviewPublicResourceToJSONTyped(value, ignoreDiscriminator) {
|
|
65
|
+
if (ignoreDiscriminator === void 0) { ignoreDiscriminator = false; }
|
|
66
|
+
if (value == null) {
|
|
67
|
+
return value;
|
|
68
|
+
}
|
|
69
|
+
return {
|
|
70
|
+
'id': value['id'],
|
|
71
|
+
'overallRating': value['overallRating'],
|
|
72
|
+
'comment': value['comment'],
|
|
73
|
+
'replyText': value['replyText'],
|
|
74
|
+
'reviewerName': value['reviewerName'],
|
|
75
|
+
'location': value['location'],
|
|
76
|
+
'createdAt': value['createdAt'] == null ? value['createdAt'] : value['createdAt'].toISOString(),
|
|
77
|
+
'customerId': value['customerId'],
|
|
78
|
+
'productId': value['productId'],
|
|
79
|
+
'siteId': value['siteId'],
|
|
80
|
+
};
|
|
81
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* My API
|
|
3
|
+
* API documentation for my Laravel app
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import type { ReviewPublicResource } from './ReviewPublicResource';
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface ReviewPublicResourceArrayResponse
|
|
17
|
+
*/
|
|
18
|
+
export interface ReviewPublicResourceArrayResponse {
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @type {Array<ReviewPublicResource>}
|
|
22
|
+
* @memberof ReviewPublicResourceArrayResponse
|
|
23
|
+
*/
|
|
24
|
+
data?: Array<ReviewPublicResource>;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Check if a given object implements the ReviewPublicResourceArrayResponse interface.
|
|
28
|
+
*/
|
|
29
|
+
export declare function instanceOfReviewPublicResourceArrayResponse(value: object): value is ReviewPublicResourceArrayResponse;
|
|
30
|
+
export declare function ReviewPublicResourceArrayResponseFromJSON(json: any): ReviewPublicResourceArrayResponse;
|
|
31
|
+
export declare function ReviewPublicResourceArrayResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ReviewPublicResourceArrayResponse;
|
|
32
|
+
export declare function ReviewPublicResourceArrayResponseToJSON(json: any): ReviewPublicResourceArrayResponse;
|
|
33
|
+
export declare function ReviewPublicResourceArrayResponseToJSONTyped(value?: ReviewPublicResourceArrayResponse | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* My API
|
|
6
|
+
* API documentation for my Laravel app
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.0
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.instanceOfReviewPublicResourceArrayResponse = instanceOfReviewPublicResourceArrayResponse;
|
|
17
|
+
exports.ReviewPublicResourceArrayResponseFromJSON = ReviewPublicResourceArrayResponseFromJSON;
|
|
18
|
+
exports.ReviewPublicResourceArrayResponseFromJSONTyped = ReviewPublicResourceArrayResponseFromJSONTyped;
|
|
19
|
+
exports.ReviewPublicResourceArrayResponseToJSON = ReviewPublicResourceArrayResponseToJSON;
|
|
20
|
+
exports.ReviewPublicResourceArrayResponseToJSONTyped = ReviewPublicResourceArrayResponseToJSONTyped;
|
|
21
|
+
var ReviewPublicResource_1 = require("./ReviewPublicResource");
|
|
22
|
+
/**
|
|
23
|
+
* Check if a given object implements the ReviewPublicResourceArrayResponse interface.
|
|
24
|
+
*/
|
|
25
|
+
function instanceOfReviewPublicResourceArrayResponse(value) {
|
|
26
|
+
return true;
|
|
27
|
+
}
|
|
28
|
+
function ReviewPublicResourceArrayResponseFromJSON(json) {
|
|
29
|
+
return ReviewPublicResourceArrayResponseFromJSONTyped(json, false);
|
|
30
|
+
}
|
|
31
|
+
function ReviewPublicResourceArrayResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
32
|
+
if (json == null) {
|
|
33
|
+
return json;
|
|
34
|
+
}
|
|
35
|
+
return {
|
|
36
|
+
'data': json['data'] == null ? undefined : (json['data'].map(ReviewPublicResource_1.ReviewPublicResourceFromJSON)),
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
function ReviewPublicResourceArrayResponseToJSON(json) {
|
|
40
|
+
return ReviewPublicResourceArrayResponseToJSONTyped(json, false);
|
|
41
|
+
}
|
|
42
|
+
function ReviewPublicResourceArrayResponseToJSONTyped(value, ignoreDiscriminator) {
|
|
43
|
+
if (ignoreDiscriminator === void 0) { ignoreDiscriminator = false; }
|
|
44
|
+
if (value == null) {
|
|
45
|
+
return value;
|
|
46
|
+
}
|
|
47
|
+
return {
|
|
48
|
+
'data': value['data'] == null ? undefined : (value['data'].map(ReviewPublicResource_1.ReviewPublicResourceToJSON)),
|
|
49
|
+
};
|
|
50
|
+
}
|
|
@@ -44,7 +44,7 @@ export interface StoreFrontendResource {
|
|
|
44
44
|
* @type {string}
|
|
45
45
|
* @memberof StoreFrontendResource
|
|
46
46
|
*/
|
|
47
|
-
website
|
|
47
|
+
website: string;
|
|
48
48
|
/**
|
|
49
49
|
*
|
|
50
50
|
* @type {string}
|
|
@@ -74,7 +74,7 @@ export interface StoreFrontendResource {
|
|
|
74
74
|
* @type {string}
|
|
75
75
|
* @memberof StoreFrontendResource
|
|
76
76
|
*/
|
|
77
|
-
tagLine
|
|
77
|
+
tagLine: string;
|
|
78
78
|
/**
|
|
79
79
|
*
|
|
80
80
|
* @type {string}
|
|
@@ -28,12 +28,16 @@ function instanceOfStoreFrontendResource(value) {
|
|
|
28
28
|
return false;
|
|
29
29
|
if (!('email' in value) || value['email'] === undefined)
|
|
30
30
|
return false;
|
|
31
|
+
if (!('website' in value) || value['website'] === undefined)
|
|
32
|
+
return false;
|
|
31
33
|
if (!('phone' in value) || value['phone'] === undefined)
|
|
32
34
|
return false;
|
|
33
35
|
if (!('latitude' in value) || value['latitude'] === undefined)
|
|
34
36
|
return false;
|
|
35
37
|
if (!('longitude' in value) || value['longitude'] === undefined)
|
|
36
38
|
return false;
|
|
39
|
+
if (!('tagLine' in value) || value['tagLine'] === undefined)
|
|
40
|
+
return false;
|
|
37
41
|
if (!('specialDates' in value) || value['specialDates'] === undefined)
|
|
38
42
|
return false;
|
|
39
43
|
if (!('suppliers' in value) || value['suppliers'] === undefined)
|
|
@@ -52,12 +56,12 @@ function StoreFrontendResourceFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
52
56
|
'siteId': json['siteId'],
|
|
53
57
|
'name': json['name'],
|
|
54
58
|
'email': json['email'],
|
|
55
|
-
'website': json['website']
|
|
59
|
+
'website': json['website'],
|
|
56
60
|
'phone': json['phone'],
|
|
57
61
|
'address': json['address'] == null ? undefined : json['address'],
|
|
58
62
|
'latitude': json['latitude'],
|
|
59
63
|
'longitude': json['longitude'],
|
|
60
|
-
'tagLine': json['tagLine']
|
|
64
|
+
'tagLine': json['tagLine'],
|
|
61
65
|
'openingHours': json['openingHours'] == null ? undefined : json['openingHours'],
|
|
62
66
|
'specialDates': json['specialDates'],
|
|
63
67
|
'suppliers': json['suppliers'],
|
|
@@ -33,8 +33,6 @@ function instanceOfStoreListResource(value) {
|
|
|
33
33
|
return false;
|
|
34
34
|
if (!('latitude' in value) || value['latitude'] === undefined)
|
|
35
35
|
return false;
|
|
36
|
-
if (!('tagLine' in value) || value['tagLine'] === undefined)
|
|
37
|
-
return false;
|
|
38
36
|
if (!('email' in value) || value['email'] === undefined)
|
|
39
37
|
return false;
|
|
40
38
|
if (!('website' in value) || value['website'] === undefined)
|
|
@@ -55,7 +53,7 @@ function StoreListResourceFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
55
53
|
'phone': json['phone'],
|
|
56
54
|
'longitude': json['longitude'],
|
|
57
55
|
'latitude': json['latitude'],
|
|
58
|
-
'tagLine': json['tag_line'],
|
|
56
|
+
'tagLine': json['tag_line'] == null ? undefined : json['tag_line'],
|
|
59
57
|
'email': json['email'],
|
|
60
58
|
'website': json['website'],
|
|
61
59
|
'openingHours': json['opening_hours'] == null ? undefined : json['opening_hours'],
|
|
@@ -35,10 +35,10 @@ export interface StoreSpecialDateFrontendResource {
|
|
|
35
35
|
hours: string;
|
|
36
36
|
/**
|
|
37
37
|
*
|
|
38
|
-
* @type {
|
|
38
|
+
* @type {object}
|
|
39
39
|
* @memberof StoreSpecialDateFrontendResource
|
|
40
40
|
*/
|
|
41
|
-
date
|
|
41
|
+
date: object;
|
|
42
42
|
/**
|
|
43
43
|
*
|
|
44
44
|
* @type {boolean}
|
|
@@ -26,6 +26,8 @@ function instanceOfStoreSpecialDateFrontendResource(value) {
|
|
|
26
26
|
return false;
|
|
27
27
|
if (!('hours' in value) || value['hours'] === undefined)
|
|
28
28
|
return false;
|
|
29
|
+
if (!('date' in value) || value['date'] === undefined)
|
|
30
|
+
return false;
|
|
29
31
|
if (!('closed' in value) || value['closed'] === undefined)
|
|
30
32
|
return false;
|
|
31
33
|
if (!('displayStartDate' in value) || value['displayStartDate'] === undefined)
|
|
@@ -45,7 +47,7 @@ function StoreSpecialDateFrontendResourceFromJSONTyped(json, ignoreDiscriminator
|
|
|
45
47
|
'id': json['id'] == null ? undefined : json['id'],
|
|
46
48
|
'name': json['name'],
|
|
47
49
|
'hours': json['hours'],
|
|
48
|
-
'date': json['date']
|
|
50
|
+
'date': json['date'],
|
|
49
51
|
'closed': json['closed'],
|
|
50
52
|
'displayStartDate': json['displayStartDate'],
|
|
51
53
|
'displayEndDate': json['displayEndDate'],
|
|
@@ -26,6 +26,8 @@ function instanceOfStoreSpecialDateResource(value) {
|
|
|
26
26
|
return false;
|
|
27
27
|
if (!('hours' in value) || value['hours'] === undefined)
|
|
28
28
|
return false;
|
|
29
|
+
if (!('date' in value) || value['date'] === undefined)
|
|
30
|
+
return false;
|
|
29
31
|
if (!('closed' in value) || value['closed'] === undefined)
|
|
30
32
|
return false;
|
|
31
33
|
if (!('displayStartDate' in value) || value['displayStartDate'] === undefined)
|
|
@@ -45,7 +47,7 @@ function StoreSpecialDateResourceFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
45
47
|
'id': json['id'] == null ? undefined : json['id'],
|
|
46
48
|
'name': json['name'],
|
|
47
49
|
'hours': json['hours'],
|
|
48
|
-
'date': json['date']
|
|
50
|
+
'date': json['date'],
|
|
49
51
|
'closed': json['closed'],
|
|
50
52
|
'displayStartDate': json['display_start_date'],
|
|
51
53
|
'displayEndDate': json['display_end_date'],
|
package/dist/models/index.d.ts
CHANGED
|
@@ -272,6 +272,8 @@ export * from './ProductRangeSortBy';
|
|
|
272
272
|
export * from './ProductRating';
|
|
273
273
|
export * from './ProductResource';
|
|
274
274
|
export * from './ProductResourceArrayResponse';
|
|
275
|
+
export * from './ProductReviewsResource';
|
|
276
|
+
export * from './ProductReviewsResourceArrayResponse';
|
|
275
277
|
export * from './ProductSearchResponseResource';
|
|
276
278
|
export * from './ProductSearchResponseResourceArrayResponse';
|
|
277
279
|
export * from './ProductSearchResponseResourceMeta';
|
|
@@ -293,6 +295,8 @@ export * from './ReviewListResource';
|
|
|
293
295
|
export * from './ReviewListResourceArrayResponse';
|
|
294
296
|
export * from './ReviewLiteResource';
|
|
295
297
|
export * from './ReviewLiteResourceArrayResponse';
|
|
298
|
+
export * from './ReviewPublicResource';
|
|
299
|
+
export * from './ReviewPublicResourceArrayResponse';
|
|
296
300
|
export * from './ReviewResource';
|
|
297
301
|
export * from './ReviewResourceArrayResponse';
|
|
298
302
|
export * from './SEOResource';
|
package/dist/models/index.js
CHANGED
|
@@ -290,6 +290,8 @@ __exportStar(require("./ProductRangeSortBy"), exports);
|
|
|
290
290
|
__exportStar(require("./ProductRating"), exports);
|
|
291
291
|
__exportStar(require("./ProductResource"), exports);
|
|
292
292
|
__exportStar(require("./ProductResourceArrayResponse"), exports);
|
|
293
|
+
__exportStar(require("./ProductReviewsResource"), exports);
|
|
294
|
+
__exportStar(require("./ProductReviewsResourceArrayResponse"), exports);
|
|
293
295
|
__exportStar(require("./ProductSearchResponseResource"), exports);
|
|
294
296
|
__exportStar(require("./ProductSearchResponseResourceArrayResponse"), exports);
|
|
295
297
|
__exportStar(require("./ProductSearchResponseResourceMeta"), exports);
|
|
@@ -311,6 +313,8 @@ __exportStar(require("./ReviewListResource"), exports);
|
|
|
311
313
|
__exportStar(require("./ReviewListResourceArrayResponse"), exports);
|
|
312
314
|
__exportStar(require("./ReviewLiteResource"), exports);
|
|
313
315
|
__exportStar(require("./ReviewLiteResourceArrayResponse"), exports);
|
|
316
|
+
__exportStar(require("./ReviewPublicResource"), exports);
|
|
317
|
+
__exportStar(require("./ReviewPublicResourceArrayResponse"), exports);
|
|
314
318
|
__exportStar(require("./ReviewResource"), exports);
|
|
315
319
|
__exportStar(require("./ReviewResourceArrayResponse"), exports);
|
|
316
320
|
__exportStar(require("./SEOResource"), exports);
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
|
|
2
|
+
# ProductReviewsResource
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`reviews` | [Array<ReviewPublicResource>](ReviewPublicResource.md)
|
|
10
|
+
`totalReview` | number
|
|
11
|
+
`averageRating` | number
|
|
12
|
+
`stats` | Array<object>
|
|
13
|
+
`myReview` | string
|
|
14
|
+
`canReview` | boolean
|
|
15
|
+
|
|
16
|
+
## Example
|
|
17
|
+
|
|
18
|
+
```typescript
|
|
19
|
+
import type { ProductReviewsResource } from '@digital8/lighting-illusions-ts-sdk'
|
|
20
|
+
|
|
21
|
+
// TODO: Update the object below with actual values
|
|
22
|
+
const example = {
|
|
23
|
+
"reviews": null,
|
|
24
|
+
"totalReview": null,
|
|
25
|
+
"averageRating": null,
|
|
26
|
+
"stats": null,
|
|
27
|
+
"myReview": null,
|
|
28
|
+
"canReview": null,
|
|
29
|
+
} satisfies ProductReviewsResource
|
|
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 ProductReviewsResource
|
|
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
|
+
# ProductReviewsResourceArrayResponse
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`data` | [Array<ProductReviewsResource>](ProductReviewsResource.md)
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import type { ProductReviewsResourceArrayResponse } from '@digital8/lighting-illusions-ts-sdk'
|
|
15
|
+
|
|
16
|
+
// TODO: Update the object below with actual values
|
|
17
|
+
const example = {
|
|
18
|
+
"data": null,
|
|
19
|
+
} satisfies ProductReviewsResourceArrayResponse
|
|
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 ProductReviewsResourceArrayResponse
|
|
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/ReviewApi.md
CHANGED
|
@@ -5,7 +5,9 @@ All URIs are relative to *http://localhost/api*
|
|
|
5
5
|
| Method | HTTP request | Description |
|
|
6
6
|
|------------- | ------------- | -------------|
|
|
7
7
|
| [**destroyReview**](ReviewApi.md#destroyreview) | **DELETE** /admin-api/review/{review}/delete | Auto-generated: destroyReview |
|
|
8
|
+
| [**exportReview**](ReviewApi.md#exportreview) | **POST** /admin-api/review/export | Auto-generated: exportReview |
|
|
8
9
|
| [**getAllReview**](ReviewApi.md#getallreview) | **POST** /admin-api/review/all | Auto-generated: getAllReview |
|
|
10
|
+
| [**importReview**](ReviewApi.md#importreview) | **POST** /admin-api/review/import | Auto-generated: importReview |
|
|
9
11
|
| [**indexReview**](ReviewApi.md#indexreviewoperation) | **POST** /admin-api/review/list | Auto-generated: indexReview |
|
|
10
12
|
| [**showReview**](ReviewApi.md#showreview) | **GET** /admin-api/review/{review} | Auto-generated: showReview |
|
|
11
13
|
| [**storeReview**](ReviewApi.md#storereviewoperation) | **POST** /admin-api/review/create | Auto-generated: storeReview |
|
|
@@ -78,6 +80,71 @@ No authorization required
|
|
|
78
80
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
79
81
|
|
|
80
82
|
|
|
83
|
+
## exportReview
|
|
84
|
+
|
|
85
|
+
> Blob exportReview(indexReviewRequest)
|
|
86
|
+
|
|
87
|
+
Auto-generated: exportReview
|
|
88
|
+
|
|
89
|
+
### Example
|
|
90
|
+
|
|
91
|
+
```ts
|
|
92
|
+
import {
|
|
93
|
+
Configuration,
|
|
94
|
+
ReviewApi,
|
|
95
|
+
} from '@digital8/lighting-illusions-ts-sdk';
|
|
96
|
+
import type { ExportReviewRequest } from '@digital8/lighting-illusions-ts-sdk';
|
|
97
|
+
|
|
98
|
+
async function example() {
|
|
99
|
+
console.log("🚀 Testing @digital8/lighting-illusions-ts-sdk SDK...");
|
|
100
|
+
const api = new ReviewApi();
|
|
101
|
+
|
|
102
|
+
const body = {
|
|
103
|
+
// IndexReviewRequest (optional)
|
|
104
|
+
indexReviewRequest: ...,
|
|
105
|
+
} satisfies ExportReviewRequest;
|
|
106
|
+
|
|
107
|
+
try {
|
|
108
|
+
const data = await api.exportReview(body);
|
|
109
|
+
console.log(data);
|
|
110
|
+
} catch (error) {
|
|
111
|
+
console.error(error);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
// Run the test
|
|
116
|
+
example().catch(console.error);
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
### Parameters
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
| Name | Type | Description | Notes |
|
|
123
|
+
|------------- | ------------- | ------------- | -------------|
|
|
124
|
+
| **indexReviewRequest** | [IndexReviewRequest](IndexReviewRequest.md) | | [Optional] |
|
|
125
|
+
|
|
126
|
+
### Return type
|
|
127
|
+
|
|
128
|
+
**Blob**
|
|
129
|
+
|
|
130
|
+
### Authorization
|
|
131
|
+
|
|
132
|
+
No authorization required
|
|
133
|
+
|
|
134
|
+
### HTTP request headers
|
|
135
|
+
|
|
136
|
+
- **Content-Type**: `application/json`
|
|
137
|
+
- **Accept**: ``
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
### HTTP response details
|
|
141
|
+
| Status code | Description | Response headers |
|
|
142
|
+
|-------------|-------------|------------------|
|
|
143
|
+
| **200** | File download () | - |
|
|
144
|
+
|
|
145
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
146
|
+
|
|
147
|
+
|
|
81
148
|
## getAllReview
|
|
82
149
|
|
|
83
150
|
> ReviewLiteResourceArrayResponse getAllReview(indexReviewRequest)
|
|
@@ -143,6 +210,71 @@ No authorization required
|
|
|
143
210
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
144
211
|
|
|
145
212
|
|
|
213
|
+
## importReview
|
|
214
|
+
|
|
215
|
+
> GenericResponse importReview(file)
|
|
216
|
+
|
|
217
|
+
Auto-generated: importReview
|
|
218
|
+
|
|
219
|
+
### Example
|
|
220
|
+
|
|
221
|
+
```ts
|
|
222
|
+
import {
|
|
223
|
+
Configuration,
|
|
224
|
+
ReviewApi,
|
|
225
|
+
} from '@digital8/lighting-illusions-ts-sdk';
|
|
226
|
+
import type { ImportReviewRequest } from '@digital8/lighting-illusions-ts-sdk';
|
|
227
|
+
|
|
228
|
+
async function example() {
|
|
229
|
+
console.log("🚀 Testing @digital8/lighting-illusions-ts-sdk SDK...");
|
|
230
|
+
const api = new ReviewApi();
|
|
231
|
+
|
|
232
|
+
const body = {
|
|
233
|
+
// Blob
|
|
234
|
+
file: BINARY_DATA_HERE,
|
|
235
|
+
} satisfies ImportReviewRequest;
|
|
236
|
+
|
|
237
|
+
try {
|
|
238
|
+
const data = await api.importReview(body);
|
|
239
|
+
console.log(data);
|
|
240
|
+
} catch (error) {
|
|
241
|
+
console.error(error);
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
// Run the test
|
|
246
|
+
example().catch(console.error);
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
### Parameters
|
|
250
|
+
|
|
251
|
+
|
|
252
|
+
| Name | Type | Description | Notes |
|
|
253
|
+
|------------- | ------------- | ------------- | -------------|
|
|
254
|
+
| **file** | `Blob` | | [Defaults to `undefined`] |
|
|
255
|
+
|
|
256
|
+
### Return type
|
|
257
|
+
|
|
258
|
+
[**GenericResponse**](GenericResponse.md)
|
|
259
|
+
|
|
260
|
+
### Authorization
|
|
261
|
+
|
|
262
|
+
No authorization required
|
|
263
|
+
|
|
264
|
+
### HTTP request headers
|
|
265
|
+
|
|
266
|
+
- **Content-Type**: `application/x-www-form-urlencoded`
|
|
267
|
+
- **Accept**: `application/json`
|
|
268
|
+
|
|
269
|
+
|
|
270
|
+
### HTTP response details
|
|
271
|
+
| Status code | Description | Response headers |
|
|
272
|
+
|-------------|-------------|------------------|
|
|
273
|
+
| **200** | \\JsonResponse | - |
|
|
274
|
+
|
|
275
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
276
|
+
|
|
277
|
+
|
|
146
278
|
## indexReview
|
|
147
279
|
|
|
148
280
|
> PaginatedReviewListResourceResponse indexReview(indexReviewRequest)
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
|
|
2
|
+
# ReviewPublicResource
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`id` | number
|
|
10
|
+
`overallRating` | number
|
|
11
|
+
`comment` | string
|
|
12
|
+
`replyText` | string
|
|
13
|
+
`reviewerName` | string
|
|
14
|
+
`location` | string
|
|
15
|
+
`createdAt` | Date
|
|
16
|
+
`customerId` | number
|
|
17
|
+
`productId` | number
|
|
18
|
+
`siteId` | number
|
|
19
|
+
|
|
20
|
+
## Example
|
|
21
|
+
|
|
22
|
+
```typescript
|
|
23
|
+
import type { ReviewPublicResource } from '@digital8/lighting-illusions-ts-sdk'
|
|
24
|
+
|
|
25
|
+
// TODO: Update the object below with actual values
|
|
26
|
+
const example = {
|
|
27
|
+
"id": null,
|
|
28
|
+
"overallRating": null,
|
|
29
|
+
"comment": null,
|
|
30
|
+
"replyText": null,
|
|
31
|
+
"reviewerName": null,
|
|
32
|
+
"location": null,
|
|
33
|
+
"createdAt": null,
|
|
34
|
+
"customerId": null,
|
|
35
|
+
"productId": null,
|
|
36
|
+
"siteId": null,
|
|
37
|
+
} satisfies ReviewPublicResource
|
|
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 ReviewPublicResource
|
|
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,34 @@
|
|
|
1
|
+
|
|
2
|
+
# ReviewPublicResourceArrayResponse
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`data` | [Array<ReviewPublicResource>](ReviewPublicResource.md)
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import type { ReviewPublicResourceArrayResponse } from '@digital8/lighting-illusions-ts-sdk'
|
|
15
|
+
|
|
16
|
+
// TODO: Update the object below with actual values
|
|
17
|
+
const example = {
|
|
18
|
+
"data": null,
|
|
19
|
+
} satisfies ReviewPublicResourceArrayResponse
|
|
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 ReviewPublicResourceArrayResponse
|
|
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
|
+
|