@teemill/platform 0.30.5 → 0.31.0
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 +10 -2
- package/api.ts +372 -2
- package/base.ts +1 -1
- package/common.ts +1 -1
- package/configuration.ts +1 -1
- package/dist/api.d.ts +276 -2
- package/dist/api.js +124 -2
- package/dist/base.d.ts +1 -1
- package/dist/base.js +1 -1
- package/dist/common.d.ts +1 -1
- package/dist/common.js +1 -1
- package/dist/configuration.d.ts +1 -1
- package/dist/configuration.js +1 -1
- package/dist/esm/api.d.ts +276 -2
- package/dist/esm/api.js +123 -1
- package/dist/esm/base.d.ts +1 -1
- package/dist/esm/base.js +1 -1
- package/dist/esm/common.d.ts +1 -1
- package/dist/esm/common.js +1 -1
- package/dist/esm/configuration.d.ts +1 -1
- package/dist/esm/configuration.js +1 -1
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/docs/AmendmentLog.md +30 -0
- package/docs/BulkCreateReviewPayload.md +20 -0
- package/docs/BulkCreatedReviews.md +20 -0
- package/docs/CreateReview201Response.md +42 -0
- package/docs/CreateReviewPayload.md +34 -0
- package/docs/CreateReviewPayloadAuthor.md +22 -0
- package/docs/CreateReviewRequest.md +36 -0
- package/docs/OrderItem.md +2 -0
- package/docs/ReviewsApi.md +81 -0
- package/index.ts +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# BulkCreatedReviews
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Properties
|
|
5
|
+
|
|
6
|
+
Name | Type | Description | Notes
|
|
7
|
+
------------ | ------------- | ------------- | -------------
|
|
8
|
+
**reviews** | [**Array<Review>**](Review.md) | | [default to undefined]
|
|
9
|
+
|
|
10
|
+
## Example
|
|
11
|
+
|
|
12
|
+
```typescript
|
|
13
|
+
import { BulkCreatedReviews } from '@teemill/platform';
|
|
14
|
+
|
|
15
|
+
const instance: BulkCreatedReviews = {
|
|
16
|
+
reviews,
|
|
17
|
+
};
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# CreateReview201Response
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Properties
|
|
5
|
+
|
|
6
|
+
Name | Type | Description | Notes
|
|
7
|
+
------------ | ------------- | ------------- | -------------
|
|
8
|
+
**id** | **string** | Unique object identifier | [default to undefined]
|
|
9
|
+
**text** | **string** | Text content of the review | [default to undefined]
|
|
10
|
+
**product** | [**ReviewProduct**](ReviewProduct.md) | | [optional] [default to undefined]
|
|
11
|
+
**author** | [**ReviewAuthor**](ReviewAuthor.md) | | [optional] [default to undefined]
|
|
12
|
+
**rating** | **number** | Rating of the review | [optional] [default to undefined]
|
|
13
|
+
**sentiment** | **number** | Google\'s sentiment analysis score | [optional] [default to undefined]
|
|
14
|
+
**enabled** | **boolean** | Whether the review has been approved or not. If the review is not enabled, it will not be visible to the public. | [default to undefined]
|
|
15
|
+
**createdAt** | **string** | | [optional] [default to undefined]
|
|
16
|
+
**project** | [**Project**](Project.md) | | [default to undefined]
|
|
17
|
+
**images** | [**Array<ReviewImagesInner>**](ReviewImagesInner.md) | | [optional] [default to undefined]
|
|
18
|
+
**replies** | [**Array<ReviewReply>**](ReviewReply.md) | | [optional] [default to undefined]
|
|
19
|
+
**reviews** | [**Array<Review>**](Review.md) | | [default to undefined]
|
|
20
|
+
|
|
21
|
+
## Example
|
|
22
|
+
|
|
23
|
+
```typescript
|
|
24
|
+
import { CreateReview201Response } from '@teemill/platform';
|
|
25
|
+
|
|
26
|
+
const instance: CreateReview201Response = {
|
|
27
|
+
id,
|
|
28
|
+
text,
|
|
29
|
+
product,
|
|
30
|
+
author,
|
|
31
|
+
rating,
|
|
32
|
+
sentiment,
|
|
33
|
+
enabled,
|
|
34
|
+
createdAt,
|
|
35
|
+
project,
|
|
36
|
+
images,
|
|
37
|
+
replies,
|
|
38
|
+
reviews,
|
|
39
|
+
};
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# CreateReviewPayload
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Properties
|
|
5
|
+
|
|
6
|
+
Name | Type | Description | Notes
|
|
7
|
+
------------ | ------------- | ------------- | -------------
|
|
8
|
+
**author** | [**CreateReviewPayloadAuthor**](CreateReviewPayloadAuthor.md) | | [default to undefined]
|
|
9
|
+
**title** | **string** | The title of the review | [optional] [default to undefined]
|
|
10
|
+
**text** | **string** | The text of the review | [default to undefined]
|
|
11
|
+
**productRef** | **string** | A reference to the product being ordered | [default to undefined]
|
|
12
|
+
**rating** | **number** | The rating of the review | [default to undefined]
|
|
13
|
+
**images** | [**Array<Image>**](Image.md) | | [optional] [default to undefined]
|
|
14
|
+
**enabled** | **boolean** | Whether the review has been approved or not. If the review is not enabled, it will not be visible to the public. | [default to false]
|
|
15
|
+
**projectRef** | **string** | A reference to the project being ordered | [default to undefined]
|
|
16
|
+
|
|
17
|
+
## Example
|
|
18
|
+
|
|
19
|
+
```typescript
|
|
20
|
+
import { CreateReviewPayload } from '@teemill/platform';
|
|
21
|
+
|
|
22
|
+
const instance: CreateReviewPayload = {
|
|
23
|
+
author,
|
|
24
|
+
title,
|
|
25
|
+
text,
|
|
26
|
+
productRef,
|
|
27
|
+
rating,
|
|
28
|
+
images,
|
|
29
|
+
enabled,
|
|
30
|
+
projectRef,
|
|
31
|
+
};
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# CreateReviewPayloadAuthor
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Properties
|
|
5
|
+
|
|
6
|
+
Name | Type | Description | Notes
|
|
7
|
+
------------ | ------------- | ------------- | -------------
|
|
8
|
+
**name** | **string** | The name of the author | [optional] [default to undefined]
|
|
9
|
+
**email** | **string** | The email of the author | [optional] [default to undefined]
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import { CreateReviewPayloadAuthor } from '@teemill/platform';
|
|
15
|
+
|
|
16
|
+
const instance: CreateReviewPayloadAuthor = {
|
|
17
|
+
name,
|
|
18
|
+
email,
|
|
19
|
+
};
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# CreateReviewRequest
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Properties
|
|
5
|
+
|
|
6
|
+
Name | Type | Description | Notes
|
|
7
|
+
------------ | ------------- | ------------- | -------------
|
|
8
|
+
**author** | [**CreateReviewPayloadAuthor**](CreateReviewPayloadAuthor.md) | | [default to undefined]
|
|
9
|
+
**title** | **string** | The title of the review | [optional] [default to undefined]
|
|
10
|
+
**text** | **string** | The text of the review | [default to undefined]
|
|
11
|
+
**productRef** | **string** | A reference to the product being ordered | [default to undefined]
|
|
12
|
+
**rating** | **number** | The rating of the review | [default to undefined]
|
|
13
|
+
**images** | [**Array<Image>**](Image.md) | | [optional] [default to undefined]
|
|
14
|
+
**enabled** | **boolean** | Whether the review has been approved or not. If the review is not enabled, it will not be visible to the public. | [default to false]
|
|
15
|
+
**projectRef** | **string** | A reference to the project being ordered | [default to undefined]
|
|
16
|
+
**reviews** | [**Array<CreateReviewPayload>**](CreateReviewPayload.md) | | [default to undefined]
|
|
17
|
+
|
|
18
|
+
## Example
|
|
19
|
+
|
|
20
|
+
```typescript
|
|
21
|
+
import { CreateReviewRequest } from '@teemill/platform';
|
|
22
|
+
|
|
23
|
+
const instance: CreateReviewRequest = {
|
|
24
|
+
author,
|
|
25
|
+
title,
|
|
26
|
+
text,
|
|
27
|
+
productRef,
|
|
28
|
+
rating,
|
|
29
|
+
images,
|
|
30
|
+
enabled,
|
|
31
|
+
projectRef,
|
|
32
|
+
reviews,
|
|
33
|
+
};
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
package/docs/OrderItem.md
CHANGED
|
@@ -17,6 +17,7 @@ Name | Type | Description | Notes
|
|
|
17
17
|
**subtotalPrice** | [**Price**](Price.md) | | [optional] [readonly] [default to undefined]
|
|
18
18
|
**discountPrice** | [**Price**](Price.md) | | [optional] [readonly] [default to undefined]
|
|
19
19
|
**recipientCost** | [**Price**](Price.md) | The price you charged the recipient for each item. It\'s highly recommended if you have international orders as it aids customs issues. | [optional] [default to undefined]
|
|
20
|
+
**amendmentLogs** | [**Array<AmendmentLog>**](AmendmentLog.md) | | [optional] [default to undefined]
|
|
20
21
|
|
|
21
22
|
## Example
|
|
22
23
|
|
|
@@ -36,6 +37,7 @@ const instance: OrderItem = {
|
|
|
36
37
|
subtotalPrice,
|
|
37
38
|
discountPrice,
|
|
38
39
|
recipientCost,
|
|
40
|
+
amendmentLogs,
|
|
39
41
|
};
|
|
40
42
|
```
|
|
41
43
|
|
package/docs/ReviewsApi.md
CHANGED
|
@@ -4,11 +4,92 @@ All URIs are relative to *https://localhost:8080*
|
|
|
4
4
|
|
|
5
5
|
|Method | HTTP request | Description|
|
|
6
6
|
|------------- | ------------- | -------------|
|
|
7
|
+
|[**createReview**](#createreview) | **POST** /v1/platform/{platformId}/reviews | Create a review|
|
|
7
8
|
|[**exportReviews**](#exportreviews) | **GET** /v1/platform/{platformId}/reviews/export | Export reviews|
|
|
8
9
|
|[**getReview**](#getreview) | **GET** /v1/platform/{platformId}/reviews/{reviewId} | Get review|
|
|
9
10
|
|[**listReviews**](#listreviews) | **GET** /v1/platform/{platformId}/reviews | List reviews|
|
|
10
11
|
|[**moderateReview**](#moderatereview) | **PATCH** /v1/platform/{platformId}/reviews/{reviewId}/moderate | Moderate review|
|
|
11
12
|
|
|
13
|
+
# **createReview**
|
|
14
|
+
> CreateReview201Response createReview(createReviewRequest)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Example
|
|
18
|
+
|
|
19
|
+
```typescript
|
|
20
|
+
import {
|
|
21
|
+
ReviewsApi,
|
|
22
|
+
Configuration,
|
|
23
|
+
CreateReviewRequest
|
|
24
|
+
} from '@teemill/platform';
|
|
25
|
+
|
|
26
|
+
const configuration = new Configuration();
|
|
27
|
+
const apiInstance = new ReviewsApi(configuration);
|
|
28
|
+
|
|
29
|
+
let project: string; //Project unique identifier (default to undefined)
|
|
30
|
+
let platformId: string; //The platform identifier (default to undefined)
|
|
31
|
+
let createReviewRequest: CreateReviewRequest; //
|
|
32
|
+
let pageToken: number; //Page reference token (optional) (default to 1)
|
|
33
|
+
let pageSize: number; //Max page size. This is the maximum page size that will be returned, but it might be smaller. (optional) (default to 100)
|
|
34
|
+
let search: string; //Search term to filter results (optional) (default to undefined)
|
|
35
|
+
let sortBy: Array<string>; //An array of fields to sort by, prefixed with a \'-\' for descending order or \'+\' for ascending. Default is ascending. (optional) (default to undefined)
|
|
36
|
+
let start: string; //Start of date range to filter by (optional) (default to undefined)
|
|
37
|
+
let end: string; //End of date range to filter by (optional) (default to undefined)
|
|
38
|
+
|
|
39
|
+
const { status, data } = await apiInstance.createReview(
|
|
40
|
+
project,
|
|
41
|
+
platformId,
|
|
42
|
+
createReviewRequest,
|
|
43
|
+
pageToken,
|
|
44
|
+
pageSize,
|
|
45
|
+
search,
|
|
46
|
+
sortBy,
|
|
47
|
+
start,
|
|
48
|
+
end
|
|
49
|
+
);
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### Parameters
|
|
53
|
+
|
|
54
|
+
|Name | Type | Description | Notes|
|
|
55
|
+
|------------- | ------------- | ------------- | -------------|
|
|
56
|
+
| **createReviewRequest** | **CreateReviewRequest**| | |
|
|
57
|
+
| **project** | [**string**] | Project unique identifier | defaults to undefined|
|
|
58
|
+
| **platformId** | [**string**] | The platform identifier | defaults to undefined|
|
|
59
|
+
| **pageToken** | [**number**] | Page reference token | (optional) defaults to 1|
|
|
60
|
+
| **pageSize** | [**number**] | Max page size. This is the maximum page size that will be returned, but it might be smaller. | (optional) defaults to 100|
|
|
61
|
+
| **search** | [**string**] | Search term to filter results | (optional) defaults to undefined|
|
|
62
|
+
| **sortBy** | **Array<string>** | An array of fields to sort by, prefixed with a \'-\' for descending order or \'+\' for ascending. Default is ascending. | (optional) defaults to undefined|
|
|
63
|
+
| **start** | [**string**] | Start of date range to filter by | (optional) defaults to undefined|
|
|
64
|
+
| **end** | [**string**] | End of date range to filter by | (optional) defaults to undefined|
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
### Return type
|
|
68
|
+
|
|
69
|
+
**CreateReview201Response**
|
|
70
|
+
|
|
71
|
+
### Authorization
|
|
72
|
+
|
|
73
|
+
[session-oauth](../README.md#session-oauth), [api-key](../README.md#api-key)
|
|
74
|
+
|
|
75
|
+
### HTTP request headers
|
|
76
|
+
|
|
77
|
+
- **Content-Type**: application/json
|
|
78
|
+
- **Accept**: application/json
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
### HTTP response details
|
|
82
|
+
| Status code | Description | Response headers |
|
|
83
|
+
|-------------|-------------|------------------|
|
|
84
|
+
|**201** | Review created | - |
|
|
85
|
+
|**400** | Failed validation | - |
|
|
86
|
+
|**401** | Not authorised to access this resource | - |
|
|
87
|
+
|**403** | Refuse to authorize | - |
|
|
88
|
+
|**404** | Resource not found | - |
|
|
89
|
+
|**500** | Unknown server error | - |
|
|
90
|
+
|
|
91
|
+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
92
|
+
|
|
12
93
|
# **exportReviews**
|
|
13
94
|
> File exportReviews()
|
|
14
95
|
|
package/index.ts
CHANGED