@shopby/shop-sdk 1.30.6 → 1.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/CHANGELOG.md CHANGED
@@ -2,6 +2,13 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ## [1.31.0](https://gitlab.e-ncp.com/ncp-client/shop-sdk/compare/v1.30.6...v1.31.0) (2023-01-16)
6
+
7
+
8
+ ### Features
9
+
10
+ * 상품 리뷰 조회 타입 정의 ([9032e96](https://gitlab.e-ncp.com/ncp-client/shop-sdk/commit/9032e969be5ea33a339750cfd05888833a3629ea))
11
+
5
12
  ### [1.30.6](https://gitlab.e-ncp.com/ncp-client/shop-sdk/compare/v1.30.5...v1.30.6) (2023-01-16)
6
13
 
7
14
 
@@ -1,3 +1,8 @@
1
1
  export * from './country';
2
2
  export * from './period';
3
3
  export * from './term';
4
+ export declare const PLATFORM_TYPE_MAP: {
5
+ readonly PC: "PC";
6
+ readonly MOBILE_WEB: "MOBILE_WEB";
7
+ readonly MOBILE_APP: "MOBILE_APP";
8
+ };
@@ -1,4 +1,9 @@
1
1
  export * from './country';
2
2
  export * from './period';
3
3
  export * from './term';
4
+ export var PLATFORM_TYPE_MAP = {
5
+ PC: 'PC',
6
+ MOBILE_WEB: 'MOBILE_WEB',
7
+ MOBILE_APP: 'MOBILE_APP',
8
+ };
4
9
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/common/maps/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/common/maps/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AAEvB,MAAM,CAAC,IAAM,iBAAiB,GAAG;IAC/B,EAAE,EAAE,IAAI;IACR,UAAU,EAAE,YAAY;IACxB,UAAU,EAAE,YAAY;CAChB,CAAC"}
@@ -28,3 +28,17 @@ export declare const SEARCH_TYPE_MAP: {
28
28
  PRODUCT_NAME: string;
29
29
  ALL: string;
30
30
  };
31
+ export declare const BEST_REVIEW_MAP: {
32
+ readonly Y: "Y";
33
+ readonly N: "N";
34
+ };
35
+ export declare const REVIEW_ORDER_DIRECTION_MAP: {
36
+ readonly ASC: "ASC";
37
+ readonly DESC: "DESC";
38
+ };
39
+ export declare const REVIEW_ORDER_BY_MAP: {
40
+ readonly RECOMMEND: "RECOMMEND";
41
+ readonly REGISTER_YMDT: "REGISTER_YMDT";
42
+ readonly RATING: "RATING";
43
+ readonly BEST_REVIEW: "BEST_REVIEW";
44
+ };
@@ -28,4 +28,18 @@ export var SEARCH_TYPE_MAP = {
28
28
  PRODUCT_NAME: "상품몀",
29
29
  ALL: "전체",
30
30
  };
31
+ export var BEST_REVIEW_MAP = {
32
+ Y: 'Y',
33
+ N: 'N', // 일반상품평
34
+ };
35
+ export var REVIEW_ORDER_DIRECTION_MAP = {
36
+ ASC: 'ASC',
37
+ DESC: 'DESC' // 내림차순
38
+ };
39
+ export var REVIEW_ORDER_BY_MAP = {
40
+ RECOMMEND: 'RECOMMEND',
41
+ REGISTER_YMDT: 'REGISTER_YMDT',
42
+ RATING: 'RATING',
43
+ BEST_REVIEW: 'BEST_REVIEW', // 베스트리뷰순
44
+ };
31
45
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/domain/display/maps/index.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,IAAM,wBAAwB,GAAG;IACpC,OAAO,EAAE,IAAI;IACb,QAAQ,EAAE,IAAI;IACd,MAAM,EAAE,IAAI;IACZ,MAAM,EAAE,IAAI;IACZ,QAAQ,EAAE,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,EAAE,MAAM;CAChB,CAAA;AAED,MAAM,CAAC,IAAM,eAAe,GAAG;IAC3B,OAAO,EAAE,IAAI;IACb,YAAY,EAAE,KAAK;IACnB,GAAG,EAAE,IAAI;CACZ,CAAA;AAED,MAAM,CAAC,IAAM,eAAe,GAAG;IAC3B,CAAC,EAAE,GAAG;IACN,CAAC,EAAE,GAAG,EAAE,QAAQ;CACV,CAAC;AAEX,MAAM,CAAC,IAAM,0BAA0B,GAAG;IACtC,GAAG,EAAE,KAAK;IACV,IAAI,EAAE,MAAM,CAAC,OAAO;CACd,CAAC;AAEX,MAAM,CAAC,IAAM,mBAAmB,GAAG;IAC/B,SAAS,EAAE,WAAW;IACtB,aAAa,EAAE,eAAe;IAC9B,MAAM,EAAE,QAAQ;IAChB,WAAW,EAAE,aAAa,EAAE,SAAS;CAC/B,CAAC"}
@@ -1,7 +1,9 @@
1
- import { RequestConfig } from '../../http';
2
- import { BannerGroupCode, OrderByType, SaleStatusType, SectionDisplayType } from '../../common/unions';
3
- import { ProductInquiryType, ProviderType, DisplayStatusType, SearchType } from './unions';
1
+ import { OptionalAccessTokenRequest, RequestConfig } from '../../http';
2
+ import { BannerGroupCode, OrderByType, SaleStatusType, SectionDisplayType, Yn } from '../../common/unions';
3
+ import { ProductInquiryType, ProviderType, DisplayStatusType, SearchType, ReviewOrderByType, ReviewOrderDirectionType, BestReviewType, PlatformType } from './unions';
4
4
  import { Space, SpaceMappingResult } from './space';
5
+ import { Nullable } from 'types/common';
6
+ import { DefaultOrderStatusType, OrderOptionType } from 'types';
5
7
  export * from './space';
6
8
  export * from './unions';
7
9
  export interface GetCategoriesRequest extends RequestConfig {
@@ -819,19 +821,6 @@ export interface ProductsProductNoProductReviewsReviewRatingResponses {
819
821
  countOfRating?: number;
820
822
  rating?: number;
821
823
  }
822
- export interface ProductsProductNoProductReviews {
823
- reviewNo?: number;
824
- }
825
- export interface ProductsProductNoProductReviews {
826
- password?: string;
827
- urls?: Array<object | boolean | string | number>;
828
- rate?: number;
829
- extraJson?: string;
830
- optionNo?: number;
831
- orderOptionNo?: number;
832
- writerName?: string;
833
- content?: string;
834
- }
835
824
  export interface ProductsProductNoProductReviewsReviewNo {
836
825
  productTotalCount?: number;
837
826
  myReview?: boolean;
@@ -931,14 +920,14 @@ export interface ProfileOrderOptionsProductReviewableDelivery {
931
920
  retrieveInvoiceUrl?: string;
932
921
  invoiceNo?: string;
933
922
  }
934
- export interface ProfileOrderOptionsProductReviewableInput {
935
- inputLabel?: string;
936
- inputValue?: string;
923
+ export interface OrderInputOption {
924
+ inputLabel: string;
925
+ inputValue: string;
937
926
  }
938
927
  export interface ProfileOrderOptionsProductReviewableItem {
939
928
  claimNo?: number;
940
929
  reservationDeliveryYmdt?: string;
941
- inputs?: Array<ProfileOrderOptionsProductReviewableInput>;
930
+ inputs?: Array<Partial<OrderInputOption>>;
942
931
  deliverable?: boolean;
943
932
  optionUsed?: boolean;
944
933
  productName?: string;
@@ -1176,3 +1165,75 @@ export interface DeleteSpacesMappingRequest {
1176
1165
  productNos: string;
1177
1166
  };
1178
1167
  }
1168
+ export interface GetProductsProductNoProductReviewsRequest extends OptionalAccessTokenRequest {
1169
+ pathVariable: {
1170
+ productNo: number;
1171
+ };
1172
+ queryString: {
1173
+ 'order.by': ReviewOrderByType;
1174
+ 'order.direction': ReviewOrderDirectionType;
1175
+ bestReviewYn: Nullable<BestReviewType>;
1176
+ pageNumber: number;
1177
+ pageSize: number;
1178
+ hasTotalCount: boolean;
1179
+ hasAttachmentFile?: boolean;
1180
+ };
1181
+ }
1182
+ export interface ReviewRating {
1183
+ countOfRating: number;
1184
+ rating: number;
1185
+ }
1186
+ export interface OrderedOption {
1187
+ optionType: Exclude<OrderOptionType, 'PRODUCT_ONLY'>;
1188
+ optionTitle: string;
1189
+ inputs: Array<OrderInputOption>;
1190
+ orderStatusType: DefaultOrderStatusType;
1191
+ optionValue: string;
1192
+ orderCnt: number;
1193
+ addPrice: number;
1194
+ optionName: string;
1195
+ optionUsed: boolean;
1196
+ orderOptionNo: number;
1197
+ }
1198
+ export interface ProductReview {
1199
+ productTotalCount: number;
1200
+ myReview: boolean;
1201
+ platformType: PlatformType;
1202
+ memberName: string;
1203
+ content: string;
1204
+ providerType: ProviderType;
1205
+ productName: string;
1206
+ updateYmdt: string;
1207
+ bestReviewYn: BestReviewType;
1208
+ rate: number;
1209
+ imageUrl: string;
1210
+ reviewNo: number;
1211
+ nickname: string;
1212
+ productNo: number;
1213
+ registerYmdt: string;
1214
+ memberId: string;
1215
+ brandName: string;
1216
+ recommendable: boolean;
1217
+ blindReportCnt: number;
1218
+ expelled: boolean;
1219
+ reportCnt: number;
1220
+ fileUrls: Array<string>;
1221
+ reportable: boolean;
1222
+ externalReview: boolean;
1223
+ orderedOption: OrderedOption;
1224
+ recommendCnt: number;
1225
+ commentCount: number;
1226
+ isDeletedProductReview: boolean;
1227
+ productDiscountPrice: number;
1228
+ brandNameEn: string;
1229
+ productRate: number;
1230
+ givenAccumulationYn: Yn;
1231
+ extraJson: string;
1232
+ registerName: string;
1233
+ }
1234
+ export interface GetProductsProductNoProductReviewsResponse {
1235
+ rate: number;
1236
+ totalCount: number;
1237
+ reviewRatingResponses: Array<ReviewRating>;
1238
+ items: Array<ProductReview>;
1239
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../types/domain/display/index.ts"],"names":[],"mappings":"AAeA,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../types/domain/display/index.ts"],"names":[],"mappings":"AAsBA,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC"}
@@ -1,5 +1,9 @@
1
- import { PRODUCT_INQUIRY_TYPE_MAP, PROVIDER_TYPE_MAP, DISPLAY_STATUS_TYPE_MAP, SEARCH_TYPE_MAP } from '../../../src';
1
+ import { PRODUCT_INQUIRY_TYPE_MAP, PROVIDER_TYPE_MAP, DISPLAY_STATUS_TYPE_MAP, SEARCH_TYPE_MAP, BEST_REVIEW_MAP, REVIEW_ORDER_DIRECTION_MAP, REVIEW_ORDER_BY_MAP, PLATFORM_TYPE_MAP } from '../../../src';
2
2
  export declare type ProductInquiryType = keyof typeof PRODUCT_INQUIRY_TYPE_MAP;
3
3
  export declare type ProviderType = keyof typeof PROVIDER_TYPE_MAP;
4
4
  export declare type DisplayStatusType = keyof typeof DISPLAY_STATUS_TYPE_MAP;
5
5
  export declare type SearchType = keyof typeof SEARCH_TYPE_MAP;
6
+ export declare type BestReviewType = keyof typeof BEST_REVIEW_MAP;
7
+ export declare type ReviewOrderDirectionType = keyof typeof REVIEW_ORDER_DIRECTION_MAP;
8
+ export declare type ReviewOrderByType = keyof typeof REVIEW_ORDER_BY_MAP;
9
+ export declare type PlatformType = keyof typeof PLATFORM_TYPE_MAP;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shopby/shop-sdk",
3
- "version": "1.30.6",
3
+ "version": "1.31.0",
4
4
  "description": "",
5
5
  "main": "build/src/index.js",
6
6
  "types": "build/types/index.d.ts",