@sayren/storefront-sdk 0.9.0 → 0.10.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/dist/auth/index.d.mts +12 -3
- package/dist/auth/index.mjs +13 -4
- package/dist/{client-D9iQIWnV.mjs → client-DEMo7UZc.mjs} +95 -8
- package/dist/{http-BbFHVGBf.d.mts → http-CeRVoUGu.d.mts} +19 -1
- package/dist/{index-DvHOQm2-.d.mts → index-UeHUNywG.d.mts} +187 -2
- package/dist/index.d.mts +3 -3
- package/dist/index.mjs +2 -2
- package/dist/payments/index.d.mts +1 -1
- package/package.json +1 -1
- package/src/auth/index.ts +18 -3
- package/src/client.ts +12 -0
- package/src/index.ts +1 -0
- package/src/schemas/auth.ts +16 -0
- package/src/schemas/claim.ts +40 -3
- package/src/schemas/consent.ts +72 -0
- package/src/schemas/member.ts +6 -0
- package/src/schemas/order.ts +12 -1
package/dist/auth/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as AnonymousSession, d as
|
|
1
|
+
import { a as AnonymousSession, d as MemberIdentities, f as SignupRequest, g as WithdrawalBlockedDetails, h as WithdrawRequest, m as TokenPair, p as SocialProvider, t as ApiError, u as LoginRequest } from "../http-CeRVoUGu.mjs";
|
|
2
2
|
//#region src/auth/index.d.ts
|
|
3
3
|
/** 소셜 로그인 시작 결과 — `codeVerifier`와 `state`는 돌아올 때까지 서버 세션(httpOnly 쿠키 등)에 보관한다 */
|
|
4
4
|
export interface IdpStart {
|
|
@@ -56,14 +56,23 @@ export declare function createStorefrontAuth(options: StorefrontAuthOptions): {
|
|
|
56
56
|
/**
|
|
57
57
|
* 소셜 로그인 시작 — PKCE(S256)와 state를 만들고 공급자 로그인 주소를 받는다. 반환한 `state`·`codeVerifier`를
|
|
58
58
|
* 서버 세션에 보관하고 구매자를 `url`로 보낸다. 로그인을 마치면 `redirectUri`로 `?code=&state=`가 붙어 돌아온다.
|
|
59
|
-
* `redirectUri`는 스토어프론트 도메인 목록 안이어야
|
|
59
|
+
* `redirectUri`는 스토어프론트 도메인 목록 안이어야 한다.
|
|
60
|
+
*
|
|
61
|
+
* 가입 화면에서 받은 약관 동의는 `agreements`로 함께 보낸다. **이 로그인으로 가입이 되는 경우에만** 이력에
|
|
62
|
+
* 남고(기존 회원의 로그인이면 무시한다), 보내지 않으면 가입은 되지만 필수 동의 이력이 없어
|
|
63
|
+
* `GET /me`의 `reconsentRequired`가 true다(첫 진입에서 `updateConsents()`로 받는다)
|
|
60
64
|
*/
|
|
61
65
|
idp(provider: SocialProvider, options: {
|
|
62
66
|
redirectUri: string;
|
|
67
|
+
agreements?: {
|
|
68
|
+
terms: true;
|
|
69
|
+
privacy: true;
|
|
70
|
+
marketing?: boolean;
|
|
71
|
+
};
|
|
63
72
|
}): Promise<IdpStart>;
|
|
64
73
|
/**
|
|
65
74
|
* 소셜 로그인 마무리 — 돌아온 `code`를 구매자 토큰으로 바꾼다. state가 다르거나 구매자가 취소했으면
|
|
66
|
-
* `IdpCallbackError`. code는 1회용이고 1분 안에 바꿔야
|
|
75
|
+
* `IdpCallbackError`. code는 1회용이고 1분 안에 바꿔야 한다. 약관 동의는 `idp()`에서 받는다
|
|
67
76
|
*/
|
|
68
77
|
idpCallback(input: IdpCallbackInput & {
|
|
69
78
|
error?: string | null;
|
package/dist/auth/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { dt as ApiError, t as createStorefrontClient } from "../client-DEMo7UZc.mjs";
|
|
2
2
|
//#region src/auth/index.ts
|
|
3
3
|
/** 소셜 로그인 실패 — 구매자가 취소했거나(`access_denied`) state가 맞지 않는다 */
|
|
4
4
|
var IdpCallbackError = class extends Error {
|
|
@@ -60,7 +60,11 @@ function createStorefrontAuth(options) {
|
|
|
60
60
|
/**
|
|
61
61
|
* 소셜 로그인 시작 — PKCE(S256)와 state를 만들고 공급자 로그인 주소를 받는다. 반환한 `state`·`codeVerifier`를
|
|
62
62
|
* 서버 세션에 보관하고 구매자를 `url`로 보낸다. 로그인을 마치면 `redirectUri`로 `?code=&state=`가 붙어 돌아온다.
|
|
63
|
-
* `redirectUri`는 스토어프론트 도메인 목록 안이어야
|
|
63
|
+
* `redirectUri`는 스토어프론트 도메인 목록 안이어야 한다.
|
|
64
|
+
*
|
|
65
|
+
* 가입 화면에서 받은 약관 동의는 `agreements`로 함께 보낸다. **이 로그인으로 가입이 되는 경우에만** 이력에
|
|
66
|
+
* 남고(기존 회원의 로그인이면 무시한다), 보내지 않으면 가입은 되지만 필수 동의 이력이 없어
|
|
67
|
+
* `GET /me`의 `reconsentRequired`가 true다(첫 진입에서 `updateConsents()`로 받는다)
|
|
64
68
|
*/
|
|
65
69
|
async idp(provider, options) {
|
|
66
70
|
const state = randomToken(24);
|
|
@@ -68,7 +72,12 @@ function createStorefrontAuth(options) {
|
|
|
68
72
|
const { url } = await client().auth.idpAuthorize(provider, {
|
|
69
73
|
redirectUri: options.redirectUri,
|
|
70
74
|
codeChallenge: await s256(codeVerifier),
|
|
71
|
-
state
|
|
75
|
+
state,
|
|
76
|
+
agreements: options.agreements && {
|
|
77
|
+
terms: true,
|
|
78
|
+
privacy: true,
|
|
79
|
+
marketing: options.agreements.marketing ?? false
|
|
80
|
+
}
|
|
72
81
|
});
|
|
73
82
|
return {
|
|
74
83
|
url,
|
|
@@ -78,7 +87,7 @@ function createStorefrontAuth(options) {
|
|
|
78
87
|
},
|
|
79
88
|
/**
|
|
80
89
|
* 소셜 로그인 마무리 — 돌아온 `code`를 구매자 토큰으로 바꾼다. state가 다르거나 구매자가 취소했으면
|
|
81
|
-
* `IdpCallbackError`. code는 1회용이고 1분 안에 바꿔야
|
|
90
|
+
* `IdpCallbackError`. code는 1회용이고 1분 안에 바꿔야 한다. 약관 동의는 `idp()`에서 받는다
|
|
82
91
|
*/
|
|
83
92
|
idpCallback(input) {
|
|
84
93
|
if (input.error) return Promise.reject(new IdpCallbackError(input.error));
|
|
@@ -177,6 +177,18 @@ const socialProviderSchema = z.enum([
|
|
|
177
177
|
"naver",
|
|
178
178
|
"google"
|
|
179
179
|
]);
|
|
180
|
+
/**
|
|
181
|
+
* 소셜 가입 화면에서 받은 필수·선택 동의 — 공급자로 보내기 전에 함께 보낸다.
|
|
182
|
+
*
|
|
183
|
+
* **이 흐름으로 회원이 처음 만들어질 때만 쓴다.** 이미 있는 회원의 로그인이면 무시한다(동의는 늘어나지 않는다).
|
|
184
|
+
* 보내지 않으면 필수 동의 이력이 남지 않아 `GET /me`의 `reconsentRequired`가 true가 되고,
|
|
185
|
+
* 스토어프론트가 첫 진입에서 `POST /me/consents`로 받는다(가입 자체는 거부하지 않는다).
|
|
186
|
+
*/
|
|
187
|
+
const idpAgreementsSchema = z.object({
|
|
188
|
+
terms: z.literal(true),
|
|
189
|
+
privacy: z.literal(true),
|
|
190
|
+
marketing: z.boolean().default(false)
|
|
191
|
+
});
|
|
180
192
|
/** `POST /auth/idp/{provider}/authorize` 본문 — PKCE(S256)와 state는 SDK가 만든다 */
|
|
181
193
|
const idpAuthorizeRequestSchema = z.object({
|
|
182
194
|
/** 로그인을 마치고 돌아올 스토어프론트 주소. 스토어프론트 도메인 목록 안이어야 한다 */
|
|
@@ -184,7 +196,9 @@ const idpAuthorizeRequestSchema = z.object({
|
|
|
184
196
|
/** base64url(SHA-256(codeVerifier)) */
|
|
185
197
|
codeChallenge: z.string().regex(/^[A-Za-z0-9_-]{43}$/),
|
|
186
198
|
/** 스토어프론트가 만든 값 — 돌아올 때 그대로 붙어 온다. 세션에 저장해 두고 비교한다 */
|
|
187
|
-
state: z.string().min(16).max(128)
|
|
199
|
+
state: z.string().min(16).max(128),
|
|
200
|
+
/** 가입이 되는 경우 남길 동의. 기존 회원 로그인이면 무시한다 */
|
|
201
|
+
agreements: idpAgreementsSchema.optional()
|
|
188
202
|
});
|
|
189
203
|
const idpAuthorizeResponseSchema = z.object({
|
|
190
204
|
/** 구매자를 보낼 공급자 로그인 주소 */
|
|
@@ -384,13 +398,16 @@ const createClaimRequestSchema = z.object({
|
|
|
384
398
|
reason: claimReasonSchema,
|
|
385
399
|
reasonDetail: z.string().max(1e3).optional(),
|
|
386
400
|
evidenceImages: z.array(z.url()).max(5).optional(),
|
|
387
|
-
exchangeOptionId: z.string().optional()
|
|
401
|
+
exchangeOptionId: z.string().optional(),
|
|
402
|
+
quantity: z.number().int().min(1).optional().describe("취소·반품·교환할 수량. 생략하면 남은 수량 전체다. 남은 수량보다 크면 400 `INVALID_QUANTITY`")
|
|
388
403
|
});
|
|
389
404
|
const createClaimResultSchema = z.object({
|
|
390
405
|
claimId: z.string(),
|
|
391
406
|
status: z.literal("REQUESTED"),
|
|
392
|
-
expectedRefundAmount: z.number().int().nullable(),
|
|
393
|
-
claimDeliveryFee: z.number().int()
|
|
407
|
+
expectedRefundAmount: z.number().int().nullable().describe("예상 환불액 — 수량 비율 상품 금액 − 반품 배송비. **배송비 환불은 여기 포함되지 않고 `deliveryFeeRefundAmount`로 따로 온다**(승인 시점의 배송 묶음 상태로 확정되기 때문이다). 교환은 환불이 없어 null이다"),
|
|
408
|
+
claimDeliveryFee: z.number().int().describe("구매자가 부담하는 반품·교환 배송비. 원 단위"),
|
|
409
|
+
quantity: z.number().int().describe("접수된 수량. 요청에서 생략하면 남은 수량 전체다"),
|
|
410
|
+
deliveryFeeRefundAmount: z.number().int().describe("환불 예정 배송비. 배송 묶음이 모두 취소되거나 판매자 귀책일 때만 0보다 크다")
|
|
394
411
|
});
|
|
395
412
|
const myClaimSchema = z.object({
|
|
396
413
|
claimId: z.string(),
|
|
@@ -398,13 +415,76 @@ const myClaimSchema = z.object({
|
|
|
398
415
|
status: claimStatusSchema,
|
|
399
416
|
orderItemId: z.string(),
|
|
400
417
|
productName: z.string(),
|
|
418
|
+
quantity: z.number().int().describe("접수된 수량"),
|
|
401
419
|
reason: z.string(),
|
|
402
|
-
expectedRefundAmount: z.number().int().nullable(),
|
|
420
|
+
expectedRefundAmount: z.number().int().nullable().describe("예상 환불액 — 수량 비율 상품 금액 − 반품 배송비 − 조건부 무료배송 미달 차감. **배송비 환불은 포함되지 않고 `expectedDeliveryFeeRefundAmount`로 따로 온다.** 교환은 null이다"),
|
|
421
|
+
expectedDeliveryFeeRefundAmount: z.number().int().nullable().describe("예상 배송비 환불액. 배송 묶음이 모두 취소되거나 판매자 귀책일 때만 0보다 크다. 이 필드가 생기기 전에 접수된 클레임은 null이다"),
|
|
403
422
|
rejectReason: z.string().nullable(),
|
|
404
423
|
requestedAt: z.string(),
|
|
405
424
|
completedAt: z.string().nullable()
|
|
406
425
|
});
|
|
407
426
|
//#endregion
|
|
427
|
+
//#region src/schemas/consent.ts
|
|
428
|
+
/**
|
|
429
|
+
* 동의 종류 — 이용약관(`TERMS`)·개인정보 수집이용(`PRIVACY`)은 가입 필수, 마케팅 수신(`MARKETING`)은 선택이다.
|
|
430
|
+
* 필수 동의는 철회할 수 없다(철회 = 탈퇴).
|
|
431
|
+
*/
|
|
432
|
+
const consentKindSchema = z.enum([
|
|
433
|
+
"TERMS",
|
|
434
|
+
"PRIVACY",
|
|
435
|
+
"MARKETING"
|
|
436
|
+
]);
|
|
437
|
+
/** 동의 이력의 한 줄이 무엇인가 — 동의했거나 철회했다 */
|
|
438
|
+
const consentActionSchema = z.enum(["AGREED", "WITHDRAWN"]);
|
|
439
|
+
/**
|
|
440
|
+
* 동의가 일어난 경로. 값이 추가될 수 있어 모르는 값은 그대로 보여 준다.
|
|
441
|
+
* `SIGNUP` 비밀번호 가입 · `SOCIAL_SIGNUP` 소셜 가입 · `DELEGATED` 셀러 자체 회원 연동 ·
|
|
442
|
+
* `RECONSENT` 약관 개정 재동의 · `MEMBER_UPDATE` 구매자가 직접 변경 · `SELLER` 셀러가 처리
|
|
443
|
+
*/
|
|
444
|
+
const consentSourceSchema = z.enum([
|
|
445
|
+
"SIGNUP",
|
|
446
|
+
"SOCIAL_SIGNUP",
|
|
447
|
+
"DELEGATED",
|
|
448
|
+
"RECONSENT",
|
|
449
|
+
"MEMBER_UPDATE",
|
|
450
|
+
"SELLER"
|
|
451
|
+
]);
|
|
452
|
+
/** 종류별 현재 동의 상태 */
|
|
453
|
+
const consentStateSchema = z.object({
|
|
454
|
+
kind: consentKindSchema,
|
|
455
|
+
agreed: z.boolean(),
|
|
456
|
+
/** 동의한 약관 버전. 마케팅은 버전이 없어 null이고, 동의 이력이 없으면 null이다 */
|
|
457
|
+
agreedVersion: z.string().nullable(),
|
|
458
|
+
/** 스토어의 현재 약관 버전. 마케팅은 null */
|
|
459
|
+
currentVersion: z.string().nullable(),
|
|
460
|
+
/**
|
|
461
|
+
* 스토어가 정한 현재 약관 문서 주소. 재동의 화면에서 이 주소를 보여 준다.
|
|
462
|
+
* 스토어가 정하지 않았거나 마케팅이면 null이다(동의한 시점의 주소는 셀러가 보는 이력에 남는다).
|
|
463
|
+
*/
|
|
464
|
+
currentDocumentUrl: z.string().nullable(),
|
|
465
|
+
/** 마지막으로 동의·철회한 시각. 이력이 없으면 null */
|
|
466
|
+
updatedAt: z.string().nullable(),
|
|
467
|
+
/** 약관이 개정돼 다시 받아야 하는가. 마케팅은 항상 false */
|
|
468
|
+
reconsentRequired: z.boolean()
|
|
469
|
+
});
|
|
470
|
+
/** `GET /storefront/v1/me/consents` 응답 */
|
|
471
|
+
const memberConsentsSchema = z.object({
|
|
472
|
+
terms: consentStateSchema,
|
|
473
|
+
privacy: consentStateSchema,
|
|
474
|
+
marketing: consentStateSchema,
|
|
475
|
+
/** 필수 동의 중 하나라도 다시 받아야 하면 true — `POST /me/consents`로 받는다 */
|
|
476
|
+
reconsentRequired: z.boolean()
|
|
477
|
+
});
|
|
478
|
+
/**
|
|
479
|
+
* `POST /storefront/v1/me/consents` 본문 — 바꿀 항목만 보낸다.
|
|
480
|
+
* 필수 동의는 동의(`true`)만 보낼 수 있다. 이미 현재 버전에 동의한 항목은 이력을 더 남기지 않는다.
|
|
481
|
+
*/
|
|
482
|
+
const consentUpdateRequestSchema = z.object({
|
|
483
|
+
terms: z.literal(true).optional().describe("이용약관 재동의"),
|
|
484
|
+
privacy: z.literal(true).optional().describe("개인정보 수집이용 재동의"),
|
|
485
|
+
marketing: z.boolean().optional().describe("마케팅 수신 동의(false면 철회)")
|
|
486
|
+
}).refine((value) => Object.values(value).some((v) => v !== void 0), { message: "최소 1개 항목이 필요합니다" });
|
|
487
|
+
//#endregion
|
|
408
488
|
//#region src/schemas/customer-inquiry.ts
|
|
409
489
|
const customerInquiryCategorySchema = z.enum([
|
|
410
490
|
"DELIVERY",
|
|
@@ -466,7 +546,8 @@ const memberSchema = z.object({
|
|
|
466
546
|
phone: z.string().nullable(),
|
|
467
547
|
point: z.number().int(),
|
|
468
548
|
marketingAgreed: z.boolean(),
|
|
469
|
-
joinedAt: z.string()
|
|
549
|
+
joinedAt: z.string(),
|
|
550
|
+
reconsentRequired: z.boolean().describe("약관이 개정돼 필수 동의를 다시 받아야 하는가. true면 `GET /me/consents`로 어떤 항목인지 확인하고 `POST /me/consents`로 받는다. 받기 전에도 스토어 이용은 막히지 않는다")
|
|
470
551
|
});
|
|
471
552
|
const updateProfileRequestSchema = z.object({
|
|
472
553
|
name: z.string().max(50).optional(),
|
|
@@ -505,7 +586,9 @@ const myOrderItemSchema = z.object({
|
|
|
505
586
|
productName: z.string(),
|
|
506
587
|
thumbnailUrl: z.url().nullable().describe("주문 시점의 대표 이미지. 없었으면 null"),
|
|
507
588
|
optionName: z.string().nullable(),
|
|
508
|
-
quantity: z.number().int(),
|
|
589
|
+
quantity: z.number().int().describe("주문 수량"),
|
|
590
|
+
canceledQuantity: z.number().int().describe("취소·반품으로 환불된 누적 수량. 부분 취소가 없었으면 0이다"),
|
|
591
|
+
activeQuantity: z.number().int().describe("남은 수량 (`quantity` − `canceledQuantity`). 취소·반품·교환 요청 수량의 상한이다"),
|
|
509
592
|
totalPrice: z.number().int(),
|
|
510
593
|
status: orderItemStatusSchema,
|
|
511
594
|
claimStatus: z.string().nullable(),
|
|
@@ -765,6 +848,10 @@ get: () => http.request("GET", "/store", storefrontStoreSchema) },
|
|
|
765
848
|
member: {
|
|
766
849
|
me: () => http.request("GET", "/me", memberSchema),
|
|
767
850
|
updateMe: (body) => http.requestVoid("PATCH", "/me", { body: updateProfileRequestSchema.parse(body) }),
|
|
851
|
+
/** 약관·개인정보·마케팅 동의의 현재 상태와 재동의 필요 여부 */
|
|
852
|
+
consents: () => http.request("GET", "/me/consents", memberConsentsSchema),
|
|
853
|
+
/** 재동의·마케팅 동의 변경 — 바꾼 뒤의 상태를 돌려준다 */
|
|
854
|
+
updateConsents: (body) => http.request("POST", "/me/consents", memberConsentsSchema, { body: consentUpdateRequestSchema.parse(body) }),
|
|
768
855
|
listAddresses: () => http.request("GET", "/me/addresses", z.array(memberAddressSchema)),
|
|
769
856
|
createAddress: (body) => http.requestVoid("POST", "/me/addresses", { body: memberAddressRequestSchema.parse(body) }),
|
|
770
857
|
updateAddress: (addressId, body) => http.requestVoid("PUT", path`/me/addresses/${addressId}`, { body: memberAddressRequestSchema.parse(body) }),
|
|
@@ -788,4 +875,4 @@ get: () => http.request("GET", "/store", storefrontStoreSchema) },
|
|
|
788
875
|
};
|
|
789
876
|
}
|
|
790
877
|
//#endregion
|
|
791
|
-
export {
|
|
878
|
+
export { idpAgreementsSchema as $, consentStateSchema as A, productDetailSchema as B, publicInquirySchema as C, consentActionSchema as D, customerInquirySchema as E, createClaimRequestSchema as F, orderItemStatusSchema as G, productPageSchema as H, createClaimResultSchema as I, addCartItemRequestSchema as J, pageInfoSchema as K, myClaimSchema as L, memberConsentsSchema as M, claimReasonSchema as N, consentKindSchema as O, claimTypeSchema as P, anonymousSessionSchema as Q, categoryNodeSchema as R, createInquiryResultSchema as S, customerInquiryCategorySchema as T, productSortSchema as U, productFacetsSchema as V, claimStatusSchema as W, cartSchema as X, cartItemSchema as Y, updateCartItemRequestSchema as Z, memberAddressSchema as _, publicReviewSchema as a, memberIdentitiesSchema as at, wishlistAddResultSchema as b, updateReviewRequestSchema as c, tokenPairSchema as ct, deliveryTrackingSchema as d, ApiError as dt, idpAuthorizeRequestSchema as et, myOrderItemSchema as f, buildQuery as ft, memberAddressRequestSchema as g, purchaseDecisionResultSchema as h, createReviewResultSchema as i, loginRequestSchema as it, consentUpdateRequestSchema as j, consentSourceSchema as k, updateReviewResultSchema as l, withdrawRequestSchema as lt, orderShippingAddressSchema as m, unwrapData as mt, storefrontStoreSchema as n, idpTokenRequestSchema as nt, reviewPageSchema as o, signupRequestSchema as ot, myOrderSchema as p, toApiError as pt, pageSchema as q, createReviewRequestSchema as r, linkIdentityRequestSchema as rt, reviewSummarySchema as s, socialProviderSchema as st, createStorefrontClient as t, idpAuthorizeResponseSchema as tt, writableReviewSchema as u, withdrawalBlockedDetailsSchema as ut, memberSchema as v, createCustomerInquiryRequestSchema as w, createInquiryRequestSchema as x, updateProfileRequestSchema as y, productCardSchema as z };
|
|
@@ -58,11 +58,29 @@ declare const socialProviderSchema: z.ZodEnum<{
|
|
|
58
58
|
google: "google";
|
|
59
59
|
}>;
|
|
60
60
|
type SocialProvider = z.infer<typeof socialProviderSchema>;
|
|
61
|
+
/**
|
|
62
|
+
* 소셜 가입 화면에서 받은 필수·선택 동의 — 공급자로 보내기 전에 함께 보낸다.
|
|
63
|
+
*
|
|
64
|
+
* **이 흐름으로 회원이 처음 만들어질 때만 쓴다.** 이미 있는 회원의 로그인이면 무시한다(동의는 늘어나지 않는다).
|
|
65
|
+
* 보내지 않으면 필수 동의 이력이 남지 않아 `GET /me`의 `reconsentRequired`가 true가 되고,
|
|
66
|
+
* 스토어프론트가 첫 진입에서 `POST /me/consents`로 받는다(가입 자체는 거부하지 않는다).
|
|
67
|
+
*/
|
|
68
|
+
declare const idpAgreementsSchema: z.ZodObject<{
|
|
69
|
+
terms: z.ZodLiteral<true>;
|
|
70
|
+
privacy: z.ZodLiteral<true>;
|
|
71
|
+
marketing: z.ZodDefault<z.ZodBoolean>;
|
|
72
|
+
}, z.core.$strip>;
|
|
73
|
+
type IdpAgreements = z.infer<typeof idpAgreementsSchema>;
|
|
61
74
|
/** `POST /auth/idp/{provider}/authorize` 본문 — PKCE(S256)와 state는 SDK가 만든다 */
|
|
62
75
|
declare const idpAuthorizeRequestSchema: z.ZodObject<{
|
|
63
76
|
redirectUri: z.ZodURL;
|
|
64
77
|
codeChallenge: z.ZodString;
|
|
65
78
|
state: z.ZodString;
|
|
79
|
+
agreements: z.ZodOptional<z.ZodObject<{
|
|
80
|
+
terms: z.ZodLiteral<true>;
|
|
81
|
+
privacy: z.ZodLiteral<true>;
|
|
82
|
+
marketing: z.ZodDefault<z.ZodBoolean>;
|
|
83
|
+
}, z.core.$strip>>;
|
|
66
84
|
}, z.core.$strip>;
|
|
67
85
|
type IdpAuthorizeRequest = z.infer<typeof idpAuthorizeRequestSchema>;
|
|
68
86
|
declare const idpAuthorizeResponseSchema: z.ZodObject<{
|
|
@@ -113,4 +131,4 @@ type TokenSource = string | null | undefined | (() => string | null | undefined)
|
|
|
113
131
|
type Query = Record<string, string | number | boolean | undefined>;
|
|
114
132
|
declare function buildQuery(query?: Query): string;
|
|
115
133
|
//#endregion
|
|
116
|
-
export {
|
|
134
|
+
export { loginRequestSchema as C, tokenPairSchema as D, socialProviderSchema as E, withdrawRequestSchema as O, linkIdentityRequestSchema as S, signupRequestSchema as T, anonymousSessionSchema as _, AnonymousSession as a, idpAuthorizeResponseSchema as b, IdpTokenRequest as c, MemberIdentities as d, SignupRequest as f, WithdrawalBlockedDetails as g, WithdrawRequest as h, buildQuery as i, withdrawalBlockedDetailsSchema as k, LinkIdentityRequest as l, TokenPair as m, Query as n, IdpAgreements as o, SocialProvider as p, TokenSource as r, IdpAuthorizeRequest as s, ApiError as t, LoginRequest as u, idpAgreementsSchema as v, memberIdentitiesSchema as w, idpTokenRequestSchema as x, idpAuthorizeRequestSchema as y };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as
|
|
1
|
+
import { c as IdpTokenRequest, f as SignupRequest, h as WithdrawRequest, l as LinkIdentityRequest, p as SocialProvider, r as TokenSource, s as IdpAuthorizeRequest, u as LoginRequest } from "./http-CeRVoUGu.mjs";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
//#region src/analytics-ids.d.ts
|
|
4
4
|
/**
|
|
@@ -718,6 +718,7 @@ declare const createClaimRequestSchema: z.ZodObject<{
|
|
|
718
718
|
reasonDetail: z.ZodOptional<z.ZodString>;
|
|
719
719
|
evidenceImages: z.ZodOptional<z.ZodArray<z.ZodURL>>;
|
|
720
720
|
exchangeOptionId: z.ZodOptional<z.ZodString>;
|
|
721
|
+
quantity: z.ZodOptional<z.ZodNumber>;
|
|
721
722
|
}, z.core.$strip>;
|
|
722
723
|
type CreateClaimRequest = z.infer<typeof createClaimRequestSchema>;
|
|
723
724
|
declare const createClaimResultSchema: z.ZodObject<{
|
|
@@ -725,6 +726,8 @@ declare const createClaimResultSchema: z.ZodObject<{
|
|
|
725
726
|
status: z.ZodLiteral<"REQUESTED">;
|
|
726
727
|
expectedRefundAmount: z.ZodNullable<z.ZodNumber>;
|
|
727
728
|
claimDeliveryFee: z.ZodNumber;
|
|
729
|
+
quantity: z.ZodNumber;
|
|
730
|
+
deliveryFeeRefundAmount: z.ZodNumber;
|
|
728
731
|
}, z.core.$strip>;
|
|
729
732
|
type CreateClaimResult = z.infer<typeof createClaimResultSchema>;
|
|
730
733
|
declare const myClaimSchema: z.ZodObject<{
|
|
@@ -747,14 +750,117 @@ declare const myClaimSchema: z.ZodObject<{
|
|
|
747
750
|
}>;
|
|
748
751
|
orderItemId: z.ZodString;
|
|
749
752
|
productName: z.ZodString;
|
|
753
|
+
quantity: z.ZodNumber;
|
|
750
754
|
reason: z.ZodString;
|
|
751
755
|
expectedRefundAmount: z.ZodNullable<z.ZodNumber>;
|
|
756
|
+
expectedDeliveryFeeRefundAmount: z.ZodNullable<z.ZodNumber>;
|
|
752
757
|
rejectReason: z.ZodNullable<z.ZodString>;
|
|
753
758
|
requestedAt: z.ZodString;
|
|
754
759
|
completedAt: z.ZodNullable<z.ZodString>;
|
|
755
760
|
}, z.core.$strip>;
|
|
756
761
|
type MyClaim = z.infer<typeof myClaimSchema>;
|
|
757
762
|
//#endregion
|
|
763
|
+
//#region src/schemas/consent.d.ts
|
|
764
|
+
/**
|
|
765
|
+
* 동의 종류 — 이용약관(`TERMS`)·개인정보 수집이용(`PRIVACY`)은 가입 필수, 마케팅 수신(`MARKETING`)은 선택이다.
|
|
766
|
+
* 필수 동의는 철회할 수 없다(철회 = 탈퇴).
|
|
767
|
+
*/
|
|
768
|
+
declare const consentKindSchema: z.ZodEnum<{
|
|
769
|
+
TERMS: "TERMS";
|
|
770
|
+
PRIVACY: "PRIVACY";
|
|
771
|
+
MARKETING: "MARKETING";
|
|
772
|
+
}>;
|
|
773
|
+
type ConsentKind = z.infer<typeof consentKindSchema>;
|
|
774
|
+
/** 동의 이력의 한 줄이 무엇인가 — 동의했거나 철회했다 */
|
|
775
|
+
declare const consentActionSchema: z.ZodEnum<{
|
|
776
|
+
WITHDRAWN: "WITHDRAWN";
|
|
777
|
+
AGREED: "AGREED";
|
|
778
|
+
}>;
|
|
779
|
+
type ConsentAction = z.infer<typeof consentActionSchema>;
|
|
780
|
+
/**
|
|
781
|
+
* 동의가 일어난 경로. 값이 추가될 수 있어 모르는 값은 그대로 보여 준다.
|
|
782
|
+
* `SIGNUP` 비밀번호 가입 · `SOCIAL_SIGNUP` 소셜 가입 · `DELEGATED` 셀러 자체 회원 연동 ·
|
|
783
|
+
* `RECONSENT` 약관 개정 재동의 · `MEMBER_UPDATE` 구매자가 직접 변경 · `SELLER` 셀러가 처리
|
|
784
|
+
*/
|
|
785
|
+
declare const consentSourceSchema: z.ZodEnum<{
|
|
786
|
+
SIGNUP: "SIGNUP";
|
|
787
|
+
SOCIAL_SIGNUP: "SOCIAL_SIGNUP";
|
|
788
|
+
DELEGATED: "DELEGATED";
|
|
789
|
+
RECONSENT: "RECONSENT";
|
|
790
|
+
MEMBER_UPDATE: "MEMBER_UPDATE";
|
|
791
|
+
SELLER: "SELLER";
|
|
792
|
+
}>;
|
|
793
|
+
type ConsentSource = z.infer<typeof consentSourceSchema>;
|
|
794
|
+
/** 종류별 현재 동의 상태 */
|
|
795
|
+
declare const consentStateSchema: z.ZodObject<{
|
|
796
|
+
kind: z.ZodEnum<{
|
|
797
|
+
TERMS: "TERMS";
|
|
798
|
+
PRIVACY: "PRIVACY";
|
|
799
|
+
MARKETING: "MARKETING";
|
|
800
|
+
}>;
|
|
801
|
+
agreed: z.ZodBoolean;
|
|
802
|
+
agreedVersion: z.ZodNullable<z.ZodString>;
|
|
803
|
+
currentVersion: z.ZodNullable<z.ZodString>;
|
|
804
|
+
currentDocumentUrl: z.ZodNullable<z.ZodString>;
|
|
805
|
+
updatedAt: z.ZodNullable<z.ZodString>;
|
|
806
|
+
reconsentRequired: z.ZodBoolean;
|
|
807
|
+
}, z.core.$strip>;
|
|
808
|
+
type ConsentState = z.infer<typeof consentStateSchema>;
|
|
809
|
+
/** `GET /storefront/v1/me/consents` 응답 */
|
|
810
|
+
declare const memberConsentsSchema: z.ZodObject<{
|
|
811
|
+
terms: z.ZodObject<{
|
|
812
|
+
kind: z.ZodEnum<{
|
|
813
|
+
TERMS: "TERMS";
|
|
814
|
+
PRIVACY: "PRIVACY";
|
|
815
|
+
MARKETING: "MARKETING";
|
|
816
|
+
}>;
|
|
817
|
+
agreed: z.ZodBoolean;
|
|
818
|
+
agreedVersion: z.ZodNullable<z.ZodString>;
|
|
819
|
+
currentVersion: z.ZodNullable<z.ZodString>;
|
|
820
|
+
currentDocumentUrl: z.ZodNullable<z.ZodString>;
|
|
821
|
+
updatedAt: z.ZodNullable<z.ZodString>;
|
|
822
|
+
reconsentRequired: z.ZodBoolean;
|
|
823
|
+
}, z.core.$strip>;
|
|
824
|
+
privacy: z.ZodObject<{
|
|
825
|
+
kind: z.ZodEnum<{
|
|
826
|
+
TERMS: "TERMS";
|
|
827
|
+
PRIVACY: "PRIVACY";
|
|
828
|
+
MARKETING: "MARKETING";
|
|
829
|
+
}>;
|
|
830
|
+
agreed: z.ZodBoolean;
|
|
831
|
+
agreedVersion: z.ZodNullable<z.ZodString>;
|
|
832
|
+
currentVersion: z.ZodNullable<z.ZodString>;
|
|
833
|
+
currentDocumentUrl: z.ZodNullable<z.ZodString>;
|
|
834
|
+
updatedAt: z.ZodNullable<z.ZodString>;
|
|
835
|
+
reconsentRequired: z.ZodBoolean;
|
|
836
|
+
}, z.core.$strip>;
|
|
837
|
+
marketing: z.ZodObject<{
|
|
838
|
+
kind: z.ZodEnum<{
|
|
839
|
+
TERMS: "TERMS";
|
|
840
|
+
PRIVACY: "PRIVACY";
|
|
841
|
+
MARKETING: "MARKETING";
|
|
842
|
+
}>;
|
|
843
|
+
agreed: z.ZodBoolean;
|
|
844
|
+
agreedVersion: z.ZodNullable<z.ZodString>;
|
|
845
|
+
currentVersion: z.ZodNullable<z.ZodString>;
|
|
846
|
+
currentDocumentUrl: z.ZodNullable<z.ZodString>;
|
|
847
|
+
updatedAt: z.ZodNullable<z.ZodString>;
|
|
848
|
+
reconsentRequired: z.ZodBoolean;
|
|
849
|
+
}, z.core.$strip>;
|
|
850
|
+
reconsentRequired: z.ZodBoolean;
|
|
851
|
+
}, z.core.$strip>;
|
|
852
|
+
type MemberConsents = z.infer<typeof memberConsentsSchema>;
|
|
853
|
+
/**
|
|
854
|
+
* `POST /storefront/v1/me/consents` 본문 — 바꿀 항목만 보낸다.
|
|
855
|
+
* 필수 동의는 동의(`true`)만 보낼 수 있다. 이미 현재 버전에 동의한 항목은 이력을 더 남기지 않는다.
|
|
856
|
+
*/
|
|
857
|
+
declare const consentUpdateRequestSchema: z.ZodObject<{
|
|
858
|
+
terms: z.ZodOptional<z.ZodLiteral<true>>;
|
|
859
|
+
privacy: z.ZodOptional<z.ZodLiteral<true>>;
|
|
860
|
+
marketing: z.ZodOptional<z.ZodBoolean>;
|
|
861
|
+
}, z.core.$strip>;
|
|
862
|
+
type ConsentUpdateRequest = z.infer<typeof consentUpdateRequestSchema>;
|
|
863
|
+
//#endregion
|
|
758
864
|
//#region src/schemas/customer-inquiry.d.ts
|
|
759
865
|
declare const customerInquiryCategorySchema: z.ZodEnum<{
|
|
760
866
|
RETURN: "RETURN";
|
|
@@ -834,6 +940,7 @@ declare const memberSchema: z.ZodObject<{
|
|
|
834
940
|
point: z.ZodNumber;
|
|
835
941
|
marketingAgreed: z.ZodBoolean;
|
|
836
942
|
joinedAt: z.ZodString;
|
|
943
|
+
reconsentRequired: z.ZodBoolean;
|
|
837
944
|
}, z.core.$strip>;
|
|
838
945
|
type Member = z.infer<typeof memberSchema>;
|
|
839
946
|
declare const updateProfileRequestSchema: z.ZodObject<{
|
|
@@ -1055,6 +1162,7 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
|
|
|
1055
1162
|
point: number;
|
|
1056
1163
|
marketingAgreed: boolean;
|
|
1057
1164
|
joinedAt: string;
|
|
1165
|
+
reconsentRequired: boolean;
|
|
1058
1166
|
} | null>;
|
|
1059
1167
|
auth: {
|
|
1060
1168
|
/** 비회원 익명 세션 발급 — 응답의 cartToken을 `cartToken` 옵션(X-Cart-Token)으로 쓴다 */
|
|
@@ -1470,6 +1578,8 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
|
|
|
1470
1578
|
thumbnailUrl: string | null;
|
|
1471
1579
|
optionName: string | null;
|
|
1472
1580
|
quantity: number;
|
|
1581
|
+
canceledQuantity: number;
|
|
1582
|
+
activeQuantity: number;
|
|
1473
1583
|
totalPrice: number;
|
|
1474
1584
|
status: "CANCELED" | "PAYMENT_WAITING" | "PAID" | "CONFIRMED" | "DISPATCHED" | "DELIVERING" | "DELIVERED" | "PURCHASE_DECIDED";
|
|
1475
1585
|
claimStatus: string | null;
|
|
@@ -1505,6 +1615,8 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
|
|
|
1505
1615
|
thumbnailUrl: string | null;
|
|
1506
1616
|
optionName: string | null;
|
|
1507
1617
|
quantity: number;
|
|
1618
|
+
canceledQuantity: number;
|
|
1619
|
+
activeQuantity: number;
|
|
1508
1620
|
totalPrice: number;
|
|
1509
1621
|
status: "CANCELED" | "PAYMENT_WAITING" | "PAID" | "CONFIRMED" | "DISPATCHED" | "DELIVERING" | "DELIVERED" | "PURCHASE_DECIDED";
|
|
1510
1622
|
claimStatus: string | null;
|
|
@@ -1542,6 +1654,8 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
|
|
|
1542
1654
|
thumbnailUrl: string | null;
|
|
1543
1655
|
optionName: string | null;
|
|
1544
1656
|
quantity: number;
|
|
1657
|
+
canceledQuantity: number;
|
|
1658
|
+
activeQuantity: number;
|
|
1545
1659
|
totalPrice: number;
|
|
1546
1660
|
status: "CANCELED" | "PAYMENT_WAITING" | "PAID" | "CONFIRMED" | "DISPATCHED" | "DELIVERING" | "DELIVERED" | "PURCHASE_DECIDED";
|
|
1547
1661
|
claimStatus: string | null;
|
|
@@ -1585,6 +1699,8 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
|
|
|
1585
1699
|
status: "REQUESTED";
|
|
1586
1700
|
expectedRefundAmount: number | null;
|
|
1587
1701
|
claimDeliveryFee: number;
|
|
1702
|
+
quantity: number;
|
|
1703
|
+
deliveryFeeRefundAmount: number;
|
|
1588
1704
|
}>;
|
|
1589
1705
|
list: (params?: PageParams & {
|
|
1590
1706
|
status?: ClaimStatus;
|
|
@@ -1599,8 +1715,10 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
|
|
|
1599
1715
|
status: "COMPLETED" | "REQUESTED" | "HELD" | "COLLECTING" | "COLLECTED" | "REDELIVERING" | "APPROVED" | "REJECTED" | "WITHDRAWN";
|
|
1600
1716
|
orderItemId: string;
|
|
1601
1717
|
productName: string;
|
|
1718
|
+
quantity: number;
|
|
1602
1719
|
reason: string;
|
|
1603
1720
|
expectedRefundAmount: number | null;
|
|
1721
|
+
expectedDeliveryFeeRefundAmount: number | null;
|
|
1604
1722
|
rejectReason: string | null;
|
|
1605
1723
|
requestedAt: string;
|
|
1606
1724
|
completedAt: string | null;
|
|
@@ -1617,8 +1735,71 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
|
|
|
1617
1735
|
point: number;
|
|
1618
1736
|
marketingAgreed: boolean;
|
|
1619
1737
|
joinedAt: string;
|
|
1738
|
+
reconsentRequired: boolean;
|
|
1620
1739
|
}>;
|
|
1621
1740
|
updateMe: (body: UpdateProfileRequest) => Promise<void>;
|
|
1741
|
+
/** 약관·개인정보·마케팅 동의의 현재 상태와 재동의 필요 여부 */
|
|
1742
|
+
consents: () => Promise<{
|
|
1743
|
+
terms: {
|
|
1744
|
+
kind: "TERMS" | "PRIVACY" | "MARKETING";
|
|
1745
|
+
agreed: boolean;
|
|
1746
|
+
agreedVersion: string | null;
|
|
1747
|
+
currentVersion: string | null;
|
|
1748
|
+
currentDocumentUrl: string | null;
|
|
1749
|
+
updatedAt: string | null;
|
|
1750
|
+
reconsentRequired: boolean;
|
|
1751
|
+
};
|
|
1752
|
+
privacy: {
|
|
1753
|
+
kind: "TERMS" | "PRIVACY" | "MARKETING";
|
|
1754
|
+
agreed: boolean;
|
|
1755
|
+
agreedVersion: string | null;
|
|
1756
|
+
currentVersion: string | null;
|
|
1757
|
+
currentDocumentUrl: string | null;
|
|
1758
|
+
updatedAt: string | null;
|
|
1759
|
+
reconsentRequired: boolean;
|
|
1760
|
+
};
|
|
1761
|
+
marketing: {
|
|
1762
|
+
kind: "TERMS" | "PRIVACY" | "MARKETING";
|
|
1763
|
+
agreed: boolean;
|
|
1764
|
+
agreedVersion: string | null;
|
|
1765
|
+
currentVersion: string | null;
|
|
1766
|
+
currentDocumentUrl: string | null;
|
|
1767
|
+
updatedAt: string | null;
|
|
1768
|
+
reconsentRequired: boolean;
|
|
1769
|
+
};
|
|
1770
|
+
reconsentRequired: boolean;
|
|
1771
|
+
}>;
|
|
1772
|
+
/** 재동의·마케팅 동의 변경 — 바꾼 뒤의 상태를 돌려준다 */
|
|
1773
|
+
updateConsents: (body: ConsentUpdateRequest) => Promise<{
|
|
1774
|
+
terms: {
|
|
1775
|
+
kind: "TERMS" | "PRIVACY" | "MARKETING";
|
|
1776
|
+
agreed: boolean;
|
|
1777
|
+
agreedVersion: string | null;
|
|
1778
|
+
currentVersion: string | null;
|
|
1779
|
+
currentDocumentUrl: string | null;
|
|
1780
|
+
updatedAt: string | null;
|
|
1781
|
+
reconsentRequired: boolean;
|
|
1782
|
+
};
|
|
1783
|
+
privacy: {
|
|
1784
|
+
kind: "TERMS" | "PRIVACY" | "MARKETING";
|
|
1785
|
+
agreed: boolean;
|
|
1786
|
+
agreedVersion: string | null;
|
|
1787
|
+
currentVersion: string | null;
|
|
1788
|
+
currentDocumentUrl: string | null;
|
|
1789
|
+
updatedAt: string | null;
|
|
1790
|
+
reconsentRequired: boolean;
|
|
1791
|
+
};
|
|
1792
|
+
marketing: {
|
|
1793
|
+
kind: "TERMS" | "PRIVACY" | "MARKETING";
|
|
1794
|
+
agreed: boolean;
|
|
1795
|
+
agreedVersion: string | null;
|
|
1796
|
+
currentVersion: string | null;
|
|
1797
|
+
currentDocumentUrl: string | null;
|
|
1798
|
+
updatedAt: string | null;
|
|
1799
|
+
reconsentRequired: boolean;
|
|
1800
|
+
};
|
|
1801
|
+
reconsentRequired: boolean;
|
|
1802
|
+
}>;
|
|
1622
1803
|
listAddresses: () => Promise<{
|
|
1623
1804
|
addressId: string;
|
|
1624
1805
|
alias: string;
|
|
@@ -1871,6 +2052,8 @@ declare const myOrderItemSchema: z.ZodObject<{
|
|
|
1871
2052
|
thumbnailUrl: z.ZodNullable<z.ZodURL>;
|
|
1872
2053
|
optionName: z.ZodNullable<z.ZodString>;
|
|
1873
2054
|
quantity: z.ZodNumber;
|
|
2055
|
+
canceledQuantity: z.ZodNumber;
|
|
2056
|
+
activeQuantity: z.ZodNumber;
|
|
1874
2057
|
totalPrice: z.ZodNumber;
|
|
1875
2058
|
status: z.ZodEnum<{
|
|
1876
2059
|
CANCELED: "CANCELED";
|
|
@@ -1911,6 +2094,8 @@ declare const myOrderSchema: z.ZodObject<{
|
|
|
1911
2094
|
thumbnailUrl: z.ZodNullable<z.ZodURL>;
|
|
1912
2095
|
optionName: z.ZodNullable<z.ZodString>;
|
|
1913
2096
|
quantity: z.ZodNumber;
|
|
2097
|
+
canceledQuantity: z.ZodNumber;
|
|
2098
|
+
activeQuantity: z.ZodNumber;
|
|
1914
2099
|
totalPrice: z.ZodNumber;
|
|
1915
2100
|
status: z.ZodEnum<{
|
|
1916
2101
|
CANCELED: "CANCELED";
|
|
@@ -1995,4 +2180,4 @@ declare const storefrontStoreSchema: z.ZodObject<{
|
|
|
1995
2180
|
}, z.core.$strip>;
|
|
1996
2181
|
type StorefrontStore = z.infer<typeof storefrontStoreSchema>;
|
|
1997
2182
|
//#endregion
|
|
1998
|
-
export { MemberAddress as $,
|
|
2183
|
+
export { MemberAddress as $, updateCartItemRequestSchema as $n, PaymentMethod as $t, createStorefrontClient as A, ProductSearchParams as An, consentUpdateRequestSchema as At, ReviewSummary as B, PageInfo as Bn, createClaimResultSchema as Bt, analyticsBatchSchema as C, shippingAddressInputSchema as Cn, ConsentState as Ct, analyticsServerEventNameSchema as D, ProductDetail as Dn, consentKindSchema as Dt, analyticsIdSchema as E, ProductCard as En, consentActionSchema as Et, createStorefrontSession as F, productFacetsSchema as Fn, CreateClaimResult as Ft, createReviewResultSchema as G, pageSchema as Gn, EasyPayProvider as Gt, UpdateReviewResult as H, claimStatusSchema as Hn, AvailablePaymentOption as Ht, CreateReviewRequest as I, productPageSchema as In, MyClaim as It, reviewSummarySchema as J, CartItem as Jn, KnownPaymentStatus as Jt, publicReviewSchema as K, AddCartItemRequest as Kn, GuestInfo as Kt, CreateReviewResult as L, productSortSchema as Ln, claimReasonSchema as Lt, SessionStorage as M, categoryNodeSchema as Mn, ClaimReason as Mt, StorefrontSession as N, productCardSchema as Nn, ClaimType as Nt, StorefrontClient as O, ProductFacets as On, consentSourceSchema as Ot, StorefrontSessionOptions as P, productDetailSchema as Pn, CreateClaimRequest as Pt, Member as Q, cartSchema as Qn, PaymentMessage as Qt, PublicReview as R, ClaimStatus as Rn, claimTypeSchema as Rt, AnalyticsServerEventName as S, retryPaymentRequestSchema as Sn, ConsentSource as St, analyticsClientEventSchema as T, CategoryNode as Tn, MemberConsents as Tt, WritableReview as U, orderItemStatusSchema as Un, CheckoutSession as Ut, UpdateReviewRequest as V, PageParams as Vn, myClaimSchema as Vt, createReviewRequestSchema as W, pageInfoSchema as Wn, CreateCheckoutRequest as Wt, updateReviewResultSchema as X, addCartItemRequestSchema as Xn, PAYMENT_STATUS_VALUES as Xt, updateReviewRequestSchema as Y, UpdateCartItemRequest as Yn, PAYMENT_RESULT_VALUES as Yt, writableReviewSchema as Z, cartItemSchema as Zn, PaymentFailureCategory as Zt, ANALYTICS_VISITOR_HEADER as _, paymentOptionListSchema as _n, createCustomerInquiryRequestSchema as _t, MyOrderItem as a, ShippingAddressInput as an, memberSchema as at, AnalyticsClientEventName as b, paymentStatusSchema as bn, ConsentAction as bt, deliveryTrackingSchema as c, checkoutSessionSchema as cn, CreateInquiryRequest as ct, orderShippingAddressSchema as d, easyPayProviderSchema as dn, createInquiryRequestSchema as dt, PaymentOption as en, analyticsIdsFromCookie as er, MemberAddressRequest as et, purchaseDecisionResultSchema as f, guestInfoSchema as fn, createInquiryResultSchema as ft, ANALYTICS_VISITOR_COOKIE as g, paymentOptionKey as gn, CustomerInquiryCategory as gt, ANALYTICS_SESSION_HEADER as h, paymentMethodSchema as hn, CustomerInquiry as ht, MyOrder as i, RetryPaymentRequest as in, memberAddressSchema as it, STOREFRONT_SESSION_KEYS as j, ProductSort as jn, memberConsentsSchema as jt, StorefrontClientOptions as k, ProductPage as kn, consentStateSchema as kt, myOrderItemSchema as l, createCheckoutRequestSchema as ln, CreateInquiryResult as lt, ANALYTICS_SESSION_COOKIE as m, paymentMessageSchema as mn, CreateCustomerInquiryRequest as mt, storefrontStoreSchema as n, PaymentStatus as nn, WishlistAddResult as nt, OrderShippingAddress as o, StartPaymentRequest as on, updateProfileRequestSchema as ot, ANALYTICS_MAX_BATCH_BYTES as p, paymentFailureCategorySchema as pn, publicInquirySchema as pt, reviewPageSchema as q, Cart as qn, KnownPaymentResult as qt, DeliveryTracking as r, PgProvider as rn, memberAddressRequestSchema as rt, PurchaseDecisionResult as s, availablePaymentOptionSchema as sn, wishlistAddResultSchema as st, StorefrontStore as t, PaymentStart as tn, UpdateProfileRequest as tt, myOrderSchema as u, easyPayProviderResponseSchema as un, PublicInquiry as ut, AnalyticsBatch as v, paymentOptionSchema as vn, customerInquiryCategorySchema as vt, analyticsClientEventNameSchema as w, startPaymentRequestSchema as wn, ConsentUpdateRequest as wt, AnalyticsEventName as x, pgProviderSchema as xn, ConsentKind as xt, AnalyticsClientEvent as y, paymentStartSchema as yn, customerInquirySchema as yt, ReviewPage as z, OrderItemStatus as zn, createClaimRequestSchema as zt };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { C as
|
|
2
|
-
import { $ as MemberAddress, $t as
|
|
3
|
-
export { ANALYTICS_MAX_BATCH_BYTES, ANALYTICS_SESSION_COOKIE, ANALYTICS_SESSION_HEADER, ANALYTICS_VISITOR_COOKIE, ANALYTICS_VISITOR_HEADER, AddCartItemRequest, AnalyticsBatch, AnalyticsClientEvent, AnalyticsClientEventName, AnalyticsEventName, AnalyticsServerEventName, AnonymousSession, ApiError, AvailablePaymentOption, Cart, CartItem, CategoryNode, CheckoutSession, ClaimReason, ClaimStatus, ClaimType, CreateCheckoutRequest, CreateClaimRequest, CreateClaimResult, CreateCustomerInquiryRequest, CreateInquiryRequest, CreateInquiryResult, CreateReviewRequest, CreateReviewResult, CustomerInquiry, CustomerInquiryCategory, DeliveryTracking, EasyPayProvider, GuestInfo, IdpAuthorizeRequest, IdpTokenRequest, KnownPaymentResult, KnownPaymentStatus, LinkIdentityRequest, LoginRequest, Member, MemberAddress, MemberAddressRequest, MemberIdentities, MyClaim, MyOrder, MyOrderItem, OrderItemStatus, OrderShippingAddress, PAYMENT_RESULT_VALUES, PAYMENT_STATUS_VALUES, PageInfo, PageParams, PaymentFailureCategory, PaymentMessage, PaymentMethod, PaymentOption, PaymentStart, PaymentStatus, PgProvider, ProductCard, ProductDetail, ProductFacets, ProductPage, ProductSearchParams, ProductSort, PublicInquiry, PublicReview, PurchaseDecisionResult, type Query, RetryPaymentRequest, ReviewPage, ReviewSummary, STOREFRONT_SESSION_KEYS, type SessionStorage, ShippingAddressInput, SignupRequest, SocialProvider, StartPaymentRequest, type StorefrontClient, type StorefrontClientOptions, type StorefrontSession, type StorefrontSessionOptions, StorefrontStore, TokenPair, type TokenSource, UpdateCartItemRequest, UpdateProfileRequest, UpdateReviewRequest, UpdateReviewResult, WishlistAddResult, WithdrawRequest, WithdrawalBlockedDetails, WritableReview, addCartItemRequestSchema, analyticsBatchSchema, analyticsClientEventNameSchema, analyticsClientEventSchema, analyticsIdSchema, analyticsIdsFromCookie, analyticsServerEventNameSchema, anonymousSessionSchema, availablePaymentOptionSchema, buildQuery, cartItemSchema, cartSchema, categoryNodeSchema, checkoutSessionSchema, claimReasonSchema, claimStatusSchema, claimTypeSchema, createCheckoutRequestSchema, createClaimRequestSchema, createClaimResultSchema, createCustomerInquiryRequestSchema, createInquiryRequestSchema, createInquiryResultSchema, createReviewRequestSchema, createReviewResultSchema, createStorefrontClient, createStorefrontSession, customerInquiryCategorySchema, customerInquirySchema, deliveryTrackingSchema, easyPayProviderResponseSchema, easyPayProviderSchema, guestInfoSchema, idpAuthorizeRequestSchema, idpAuthorizeResponseSchema, idpTokenRequestSchema, linkIdentityRequestSchema, loginRequestSchema, memberAddressRequestSchema, memberAddressSchema, memberIdentitiesSchema, memberSchema, myClaimSchema, myOrderItemSchema, myOrderSchema, orderItemStatusSchema, orderShippingAddressSchema, pageInfoSchema, pageSchema, paymentFailureCategorySchema, paymentMessageSchema, paymentMethodSchema, paymentOptionKey, paymentOptionListSchema, paymentOptionSchema, paymentStartSchema, paymentStatusSchema, pgProviderSchema, productCardSchema, productDetailSchema, productFacetsSchema, productPageSchema, productSortSchema, publicInquirySchema, publicReviewSchema, purchaseDecisionResultSchema, retryPaymentRequestSchema, reviewPageSchema, reviewSummarySchema, shippingAddressInputSchema, signupRequestSchema, socialProviderSchema, startPaymentRequestSchema, storefrontStoreSchema, tokenPairSchema, updateCartItemRequestSchema, updateProfileRequestSchema, updateReviewRequestSchema, updateReviewResultSchema, wishlistAddResultSchema, withdrawRequestSchema, withdrawalBlockedDetailsSchema, writableReviewSchema };
|
|
1
|
+
import { C as loginRequestSchema, D as tokenPairSchema, E as socialProviderSchema, O as withdrawRequestSchema, S as linkIdentityRequestSchema, T as signupRequestSchema, _ as anonymousSessionSchema, a as AnonymousSession, b as idpAuthorizeResponseSchema, c as IdpTokenRequest, d as MemberIdentities, f as SignupRequest, g as WithdrawalBlockedDetails, h as WithdrawRequest, i as buildQuery, k as withdrawalBlockedDetailsSchema, l as LinkIdentityRequest, m as TokenPair, n as Query, o as IdpAgreements, p as SocialProvider, r as TokenSource, s as IdpAuthorizeRequest, t as ApiError, u as LoginRequest, v as idpAgreementsSchema, w as memberIdentitiesSchema, x as idpTokenRequestSchema, y as idpAuthorizeRequestSchema } from "./http-CeRVoUGu.mjs";
|
|
2
|
+
import { $ as MemberAddress, $n as updateCartItemRequestSchema, $t as PaymentMethod, A as createStorefrontClient, An as ProductSearchParams, At as consentUpdateRequestSchema, B as ReviewSummary, Bn as PageInfo, Bt as createClaimResultSchema, C as analyticsBatchSchema, Cn as shippingAddressInputSchema, Ct as ConsentState, D as analyticsServerEventNameSchema, Dn as ProductDetail, Dt as consentKindSchema, E as analyticsIdSchema, En as ProductCard, Et as consentActionSchema, F as createStorefrontSession, Fn as productFacetsSchema, Ft as CreateClaimResult, G as createReviewResultSchema, Gn as pageSchema, Gt as EasyPayProvider, H as UpdateReviewResult, Hn as claimStatusSchema, Ht as AvailablePaymentOption, I as CreateReviewRequest, In as productPageSchema, It as MyClaim, J as reviewSummarySchema, Jn as CartItem, Jt as KnownPaymentStatus, K as publicReviewSchema, Kn as AddCartItemRequest, Kt as GuestInfo, L as CreateReviewResult, Ln as productSortSchema, Lt as claimReasonSchema, M as SessionStorage, Mn as categoryNodeSchema, Mt as ClaimReason, N as StorefrontSession, Nn as productCardSchema, Nt as ClaimType, O as StorefrontClient, On as ProductFacets, Ot as consentSourceSchema, P as StorefrontSessionOptions, Pn as productDetailSchema, Pt as CreateClaimRequest, Q as Member, Qn as cartSchema, Qt as PaymentMessage, R as PublicReview, Rn as ClaimStatus, Rt as claimTypeSchema, S as AnalyticsServerEventName, Sn as retryPaymentRequestSchema, St as ConsentSource, T as analyticsClientEventSchema, Tn as CategoryNode, Tt as MemberConsents, U as WritableReview, Un as orderItemStatusSchema, Ut as CheckoutSession, V as UpdateReviewRequest, Vn as PageParams, Vt as myClaimSchema, W as createReviewRequestSchema, Wn as pageInfoSchema, Wt as CreateCheckoutRequest, X as updateReviewResultSchema, Xn as addCartItemRequestSchema, Xt as PAYMENT_STATUS_VALUES, Y as updateReviewRequestSchema, Yn as UpdateCartItemRequest, Yt as PAYMENT_RESULT_VALUES, Z as writableReviewSchema, Zn as cartItemSchema, Zt as PaymentFailureCategory, _ as ANALYTICS_VISITOR_HEADER, _n as paymentOptionListSchema, _t as createCustomerInquiryRequestSchema, a as MyOrderItem, an as ShippingAddressInput, at as memberSchema, b as AnalyticsClientEventName, bn as paymentStatusSchema, bt as ConsentAction, c as deliveryTrackingSchema, cn as checkoutSessionSchema, ct as CreateInquiryRequest, d as orderShippingAddressSchema, dn as easyPayProviderSchema, dt as createInquiryRequestSchema, en as PaymentOption, er as analyticsIdsFromCookie, et as MemberAddressRequest, f as purchaseDecisionResultSchema, fn as guestInfoSchema, ft as createInquiryResultSchema, g as ANALYTICS_VISITOR_COOKIE, gn as paymentOptionKey, gt as CustomerInquiryCategory, h as ANALYTICS_SESSION_HEADER, hn as paymentMethodSchema, ht as CustomerInquiry, i as MyOrder, in as RetryPaymentRequest, it as memberAddressSchema, j as STOREFRONT_SESSION_KEYS, jn as ProductSort, jt as memberConsentsSchema, k as StorefrontClientOptions, kn as ProductPage, kt as consentStateSchema, l as myOrderItemSchema, ln as createCheckoutRequestSchema, lt as CreateInquiryResult, m as ANALYTICS_SESSION_COOKIE, mn as paymentMessageSchema, mt as CreateCustomerInquiryRequest, n as storefrontStoreSchema, nn as PaymentStatus, nt as WishlistAddResult, o as OrderShippingAddress, on as StartPaymentRequest, ot as updateProfileRequestSchema, p as ANALYTICS_MAX_BATCH_BYTES, pn as paymentFailureCategorySchema, pt as publicInquirySchema, q as reviewPageSchema, qn as Cart, qt as KnownPaymentResult, r as DeliveryTracking, rn as PgProvider, rt as memberAddressRequestSchema, s as PurchaseDecisionResult, sn as availablePaymentOptionSchema, st as wishlistAddResultSchema, t as StorefrontStore, tn as PaymentStart, tt as UpdateProfileRequest, u as myOrderSchema, un as easyPayProviderResponseSchema, ut as PublicInquiry, v as AnalyticsBatch, vn as paymentOptionSchema, vt as customerInquiryCategorySchema, w as analyticsClientEventNameSchema, wn as startPaymentRequestSchema, wt as ConsentUpdateRequest, x as AnalyticsEventName, xn as pgProviderSchema, xt as ConsentKind, y as AnalyticsClientEvent, yn as paymentStartSchema, yt as customerInquirySchema, z as ReviewPage, zn as OrderItemStatus, zt as createClaimRequestSchema } from "./index-UeHUNywG.mjs";
|
|
3
|
+
export { ANALYTICS_MAX_BATCH_BYTES, ANALYTICS_SESSION_COOKIE, ANALYTICS_SESSION_HEADER, ANALYTICS_VISITOR_COOKIE, ANALYTICS_VISITOR_HEADER, AddCartItemRequest, AnalyticsBatch, AnalyticsClientEvent, AnalyticsClientEventName, AnalyticsEventName, AnalyticsServerEventName, AnonymousSession, ApiError, AvailablePaymentOption, Cart, CartItem, CategoryNode, CheckoutSession, ClaimReason, ClaimStatus, ClaimType, ConsentAction, ConsentKind, ConsentSource, ConsentState, ConsentUpdateRequest, CreateCheckoutRequest, CreateClaimRequest, CreateClaimResult, CreateCustomerInquiryRequest, CreateInquiryRequest, CreateInquiryResult, CreateReviewRequest, CreateReviewResult, CustomerInquiry, CustomerInquiryCategory, DeliveryTracking, EasyPayProvider, GuestInfo, IdpAgreements, IdpAuthorizeRequest, IdpTokenRequest, KnownPaymentResult, KnownPaymentStatus, LinkIdentityRequest, LoginRequest, Member, MemberAddress, MemberAddressRequest, MemberConsents, MemberIdentities, MyClaim, MyOrder, MyOrderItem, OrderItemStatus, OrderShippingAddress, PAYMENT_RESULT_VALUES, PAYMENT_STATUS_VALUES, PageInfo, PageParams, PaymentFailureCategory, PaymentMessage, PaymentMethod, PaymentOption, PaymentStart, PaymentStatus, PgProvider, ProductCard, ProductDetail, ProductFacets, ProductPage, ProductSearchParams, ProductSort, PublicInquiry, PublicReview, PurchaseDecisionResult, type Query, RetryPaymentRequest, ReviewPage, ReviewSummary, STOREFRONT_SESSION_KEYS, type SessionStorage, ShippingAddressInput, SignupRequest, SocialProvider, StartPaymentRequest, type StorefrontClient, type StorefrontClientOptions, type StorefrontSession, type StorefrontSessionOptions, StorefrontStore, TokenPair, type TokenSource, UpdateCartItemRequest, UpdateProfileRequest, UpdateReviewRequest, UpdateReviewResult, WishlistAddResult, WithdrawRequest, WithdrawalBlockedDetails, WritableReview, addCartItemRequestSchema, analyticsBatchSchema, analyticsClientEventNameSchema, analyticsClientEventSchema, analyticsIdSchema, analyticsIdsFromCookie, analyticsServerEventNameSchema, anonymousSessionSchema, availablePaymentOptionSchema, buildQuery, cartItemSchema, cartSchema, categoryNodeSchema, checkoutSessionSchema, claimReasonSchema, claimStatusSchema, claimTypeSchema, consentActionSchema, consentKindSchema, consentSourceSchema, consentStateSchema, consentUpdateRequestSchema, createCheckoutRequestSchema, createClaimRequestSchema, createClaimResultSchema, createCustomerInquiryRequestSchema, createInquiryRequestSchema, createInquiryResultSchema, createReviewRequestSchema, createReviewResultSchema, createStorefrontClient, createStorefrontSession, customerInquiryCategorySchema, customerInquirySchema, deliveryTrackingSchema, easyPayProviderResponseSchema, easyPayProviderSchema, guestInfoSchema, idpAgreementsSchema, idpAuthorizeRequestSchema, idpAuthorizeResponseSchema, idpTokenRequestSchema, linkIdentityRequestSchema, loginRequestSchema, memberAddressRequestSchema, memberAddressSchema, memberConsentsSchema, memberIdentitiesSchema, memberSchema, myClaimSchema, myOrderItemSchema, myOrderSchema, orderItemStatusSchema, orderShippingAddressSchema, pageInfoSchema, pageSchema, paymentFailureCategorySchema, paymentMessageSchema, paymentMethodSchema, paymentOptionKey, paymentOptionListSchema, paymentOptionSchema, paymentStartSchema, paymentStatusSchema, pgProviderSchema, productCardSchema, productDetailSchema, productFacetsSchema, productPageSchema, productSortSchema, publicInquirySchema, publicReviewSchema, purchaseDecisionResultSchema, retryPaymentRequestSchema, reviewPageSchema, reviewSummarySchema, shippingAddressInputSchema, signupRequestSchema, socialProviderSchema, startPaymentRequestSchema, storefrontStoreSchema, tokenPairSchema, updateCartItemRequestSchema, updateProfileRequestSchema, updateReviewRequestSchema, updateReviewResultSchema, wishlistAddResultSchema, withdrawRequestSchema, withdrawalBlockedDetailsSchema, writableReviewSchema };
|
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as ANALYTICS_VISITOR_HEADER, c as analyticsClientEventSchema, i as ANALYTICS_VISITOR_COOKIE, l as analyticsIdSchema, n as ANALYTICS_SESSION_COOKIE, o as analyticsBatchSchema, r as ANALYTICS_SESSION_HEADER, s as analyticsClientEventNameSchema, t as ANALYTICS_MAX_BATCH_BYTES, u as analyticsServerEventNameSchema } from "./analytics-CgD70OqH.mjs";
|
|
2
2
|
import { t as analyticsIdsFromCookie } from "./analytics-ids-COElZiI3.mjs";
|
|
3
|
-
import { $ as
|
|
3
|
+
import { $ as idpAgreementsSchema, A as consentStateSchema, B as productDetailSchema, C as publicInquirySchema, D as consentActionSchema, E as customerInquirySchema, F as createClaimRequestSchema, G as orderItemStatusSchema, H as productPageSchema, I as createClaimResultSchema, J as addCartItemRequestSchema, K as pageInfoSchema, L as myClaimSchema, M as memberConsentsSchema, N as claimReasonSchema, O as consentKindSchema, P as claimTypeSchema, Q as anonymousSessionSchema, R as categoryNodeSchema, S as createInquiryResultSchema, T as customerInquiryCategorySchema, U as productSortSchema, V as productFacetsSchema, W as claimStatusSchema, X as cartSchema, Y as cartItemSchema, Z as updateCartItemRequestSchema, _ as memberAddressSchema, a as publicReviewSchema, at as memberIdentitiesSchema, b as wishlistAddResultSchema, c as updateReviewRequestSchema, ct as tokenPairSchema, d as deliveryTrackingSchema, dt as ApiError, et as idpAuthorizeRequestSchema, f as myOrderItemSchema, ft as buildQuery, g as memberAddressRequestSchema, h as purchaseDecisionResultSchema, i as createReviewResultSchema, it as loginRequestSchema, j as consentUpdateRequestSchema, k as consentSourceSchema, l as updateReviewResultSchema, lt as withdrawRequestSchema, m as orderShippingAddressSchema, mt as unwrapData, n as storefrontStoreSchema, nt as idpTokenRequestSchema, o as reviewPageSchema, ot as signupRequestSchema, p as myOrderSchema, pt as toApiError, q as pageSchema, r as createReviewRequestSchema, rt as linkIdentityRequestSchema, s as reviewSummarySchema, st as socialProviderSchema, t as createStorefrontClient, tt as idpAuthorizeResponseSchema, u as writableReviewSchema, ut as withdrawalBlockedDetailsSchema, v as memberSchema, w as createCustomerInquiryRequestSchema, x as createInquiryRequestSchema, y as updateProfileRequestSchema, z as productCardSchema } from "./client-DEMo7UZc.mjs";
|
|
4
4
|
import { _ as pgProviderSchema, a as createCheckoutRequestSchema, b as startPaymentRequestSchema, c as guestInfoSchema, d as paymentMethodSchema, f as paymentOptionKey, g as paymentStatusSchema, h as paymentStartSchema, i as checkoutSessionSchema, l as paymentFailureCategorySchema, m as paymentOptionSchema, n as PAYMENT_STATUS_VALUES, o as easyPayProviderResponseSchema, p as paymentOptionListSchema, r as availablePaymentOptionSchema, s as easyPayProviderSchema, t as PAYMENT_RESULT_VALUES, u as paymentMessageSchema, v as retryPaymentRequestSchema, y as shippingAddressInputSchema } from "./checkout-JFk3b8RG.mjs";
|
|
5
5
|
//#region src/session.ts
|
|
6
6
|
/** 세션 키 상수 — SDK가 소유한다. store-sdk와 겹치지 않는 별도 네임스페이스. */
|
|
@@ -125,4 +125,4 @@ function createStorefrontSession(options) {
|
|
|
125
125
|
};
|
|
126
126
|
}
|
|
127
127
|
//#endregion
|
|
128
|
-
export { ANALYTICS_MAX_BATCH_BYTES, ANALYTICS_SESSION_COOKIE, ANALYTICS_SESSION_HEADER, ANALYTICS_VISITOR_COOKIE, ANALYTICS_VISITOR_HEADER, ApiError, PAYMENT_RESULT_VALUES, PAYMENT_STATUS_VALUES, STOREFRONT_SESSION_KEYS, addCartItemRequestSchema, analyticsBatchSchema, analyticsClientEventNameSchema, analyticsClientEventSchema, analyticsIdSchema, analyticsIdsFromCookie, analyticsServerEventNameSchema, anonymousSessionSchema, availablePaymentOptionSchema, buildQuery, cartItemSchema, cartSchema, categoryNodeSchema, checkoutSessionSchema, claimReasonSchema, claimStatusSchema, claimTypeSchema, createCheckoutRequestSchema, createClaimRequestSchema, createClaimResultSchema, createCustomerInquiryRequestSchema, createInquiryRequestSchema, createInquiryResultSchema, createReviewRequestSchema, createReviewResultSchema, createStorefrontClient, createStorefrontSession, customerInquiryCategorySchema, customerInquirySchema, deliveryTrackingSchema, easyPayProviderResponseSchema, easyPayProviderSchema, guestInfoSchema, idpAuthorizeRequestSchema, idpAuthorizeResponseSchema, idpTokenRequestSchema, linkIdentityRequestSchema, loginRequestSchema, memberAddressRequestSchema, memberAddressSchema, memberIdentitiesSchema, memberSchema, myClaimSchema, myOrderItemSchema, myOrderSchema, orderItemStatusSchema, orderShippingAddressSchema, pageInfoSchema, pageSchema, paymentFailureCategorySchema, paymentMessageSchema, paymentMethodSchema, paymentOptionKey, paymentOptionListSchema, paymentOptionSchema, paymentStartSchema, paymentStatusSchema, pgProviderSchema, productCardSchema, productDetailSchema, productFacetsSchema, productPageSchema, productSortSchema, publicInquirySchema, publicReviewSchema, purchaseDecisionResultSchema, retryPaymentRequestSchema, reviewPageSchema, reviewSummarySchema, shippingAddressInputSchema, signupRequestSchema, socialProviderSchema, startPaymentRequestSchema, storefrontStoreSchema, tokenPairSchema, updateCartItemRequestSchema, updateProfileRequestSchema, updateReviewRequestSchema, updateReviewResultSchema, wishlistAddResultSchema, withdrawRequestSchema, withdrawalBlockedDetailsSchema, writableReviewSchema };
|
|
128
|
+
export { ANALYTICS_MAX_BATCH_BYTES, ANALYTICS_SESSION_COOKIE, ANALYTICS_SESSION_HEADER, ANALYTICS_VISITOR_COOKIE, ANALYTICS_VISITOR_HEADER, ApiError, PAYMENT_RESULT_VALUES, PAYMENT_STATUS_VALUES, STOREFRONT_SESSION_KEYS, addCartItemRequestSchema, analyticsBatchSchema, analyticsClientEventNameSchema, analyticsClientEventSchema, analyticsIdSchema, analyticsIdsFromCookie, analyticsServerEventNameSchema, anonymousSessionSchema, availablePaymentOptionSchema, buildQuery, cartItemSchema, cartSchema, categoryNodeSchema, checkoutSessionSchema, claimReasonSchema, claimStatusSchema, claimTypeSchema, consentActionSchema, consentKindSchema, consentSourceSchema, consentStateSchema, consentUpdateRequestSchema, createCheckoutRequestSchema, createClaimRequestSchema, createClaimResultSchema, createCustomerInquiryRequestSchema, createInquiryRequestSchema, createInquiryResultSchema, createReviewRequestSchema, createReviewResultSchema, createStorefrontClient, createStorefrontSession, customerInquiryCategorySchema, customerInquirySchema, deliveryTrackingSchema, easyPayProviderResponseSchema, easyPayProviderSchema, guestInfoSchema, idpAgreementsSchema, idpAuthorizeRequestSchema, idpAuthorizeResponseSchema, idpTokenRequestSchema, linkIdentityRequestSchema, loginRequestSchema, memberAddressRequestSchema, memberAddressSchema, memberConsentsSchema, memberIdentitiesSchema, memberSchema, myClaimSchema, myOrderItemSchema, myOrderSchema, orderItemStatusSchema, orderShippingAddressSchema, pageInfoSchema, pageSchema, paymentFailureCategorySchema, paymentMessageSchema, paymentMethodSchema, paymentOptionKey, paymentOptionListSchema, paymentOptionSchema, paymentStartSchema, paymentStatusSchema, pgProviderSchema, productCardSchema, productDetailSchema, productFacetsSchema, productPageSchema, productSortSchema, publicInquirySchema, publicReviewSchema, purchaseDecisionResultSchema, retryPaymentRequestSchema, reviewPageSchema, reviewSummarySchema, shippingAddressInputSchema, signupRequestSchema, socialProviderSchema, startPaymentRequestSchema, storefrontStoreSchema, tokenPairSchema, updateCartItemRequestSchema, updateProfileRequestSchema, updateReviewRequestSchema, updateReviewResultSchema, wishlistAddResultSchema, withdrawRequestSchema, withdrawalBlockedDetailsSchema, writableReviewSchema };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as createStorefrontClient,
|
|
1
|
+
import { A as createStorefrontClient, Kt as GuestInfo, an as ShippingAddressInput, en as PaymentOption, nn as PaymentStatus, tn as PaymentStart } from "../index-UeHUNywG.mjs";
|
|
2
2
|
//#region src/payments/index.d.ts
|
|
3
3
|
/**
|
|
4
4
|
* 스토어프론트 결제 — 브라우저 전용(`@sayren/storefront-sdk/payments`).
|
package/package.json
CHANGED
package/src/auth/index.ts
CHANGED
|
@@ -120,21 +120,36 @@ export function createStorefrontAuth(options: StorefrontAuthOptions) {
|
|
|
120
120
|
/**
|
|
121
121
|
* 소셜 로그인 시작 — PKCE(S256)와 state를 만들고 공급자 로그인 주소를 받는다. 반환한 `state`·`codeVerifier`를
|
|
122
122
|
* 서버 세션에 보관하고 구매자를 `url`로 보낸다. 로그인을 마치면 `redirectUri`로 `?code=&state=`가 붙어 돌아온다.
|
|
123
|
-
* `redirectUri`는 스토어프론트 도메인 목록 안이어야
|
|
123
|
+
* `redirectUri`는 스토어프론트 도메인 목록 안이어야 한다.
|
|
124
|
+
*
|
|
125
|
+
* 가입 화면에서 받은 약관 동의는 `agreements`로 함께 보낸다. **이 로그인으로 가입이 되는 경우에만** 이력에
|
|
126
|
+
* 남고(기존 회원의 로그인이면 무시한다), 보내지 않으면 가입은 되지만 필수 동의 이력이 없어
|
|
127
|
+
* `GET /me`의 `reconsentRequired`가 true다(첫 진입에서 `updateConsents()`로 받는다)
|
|
124
128
|
*/
|
|
125
|
-
async idp(
|
|
129
|
+
async idp(
|
|
130
|
+
provider: SocialProvider,
|
|
131
|
+
options: {
|
|
132
|
+
redirectUri: string;
|
|
133
|
+
agreements?: { terms: true; privacy: true; marketing?: boolean };
|
|
134
|
+
},
|
|
135
|
+
): Promise<IdpStart> {
|
|
126
136
|
const state = randomToken(24);
|
|
127
137
|
const codeVerifier = randomToken(32);
|
|
128
138
|
const { url } = await client().auth.idpAuthorize(provider, {
|
|
129
139
|
redirectUri: options.redirectUri,
|
|
130
140
|
codeChallenge: await s256(codeVerifier),
|
|
131
141
|
state,
|
|
142
|
+
agreements: options.agreements && {
|
|
143
|
+
terms: true,
|
|
144
|
+
privacy: true,
|
|
145
|
+
marketing: options.agreements.marketing ?? false,
|
|
146
|
+
},
|
|
132
147
|
});
|
|
133
148
|
return { url, state, codeVerifier };
|
|
134
149
|
},
|
|
135
150
|
/**
|
|
136
151
|
* 소셜 로그인 마무리 — 돌아온 `code`를 구매자 토큰으로 바꾼다. state가 다르거나 구매자가 취소했으면
|
|
137
|
-
* `IdpCallbackError`. code는 1회용이고 1분 안에 바꿔야
|
|
152
|
+
* `IdpCallbackError`. code는 1회용이고 1분 안에 바꿔야 한다. 약관 동의는 `idp()`에서 받는다
|
|
138
153
|
*/
|
|
139
154
|
idpCallback(input: IdpCallbackInput & { error?: string | null }): Promise<TokenPair> {
|
|
140
155
|
if (input.error) return Promise.reject(new IdpCallbackError(input.error));
|
package/src/client.ts
CHANGED
|
@@ -56,6 +56,11 @@ import {
|
|
|
56
56
|
type PageParams,
|
|
57
57
|
pageSchema,
|
|
58
58
|
} from "./schemas/common";
|
|
59
|
+
import {
|
|
60
|
+
type ConsentUpdateRequest,
|
|
61
|
+
consentUpdateRequestSchema,
|
|
62
|
+
memberConsentsSchema,
|
|
63
|
+
} from "./schemas/consent";
|
|
59
64
|
import {
|
|
60
65
|
type CreateCustomerInquiryRequest,
|
|
61
66
|
type CustomerInquiryCategory,
|
|
@@ -335,6 +340,13 @@ export function createStorefrontClient(options: StorefrontClientOptions) {
|
|
|
335
340
|
me: () => http.request("GET", "/me", memberSchema),
|
|
336
341
|
updateMe: (body: UpdateProfileRequest) =>
|
|
337
342
|
http.requestVoid("PATCH", "/me", { body: updateProfileRequestSchema.parse(body) }),
|
|
343
|
+
/** 약관·개인정보·마케팅 동의의 현재 상태와 재동의 필요 여부 */
|
|
344
|
+
consents: () => http.request("GET", "/me/consents", memberConsentsSchema),
|
|
345
|
+
/** 재동의·마케팅 동의 변경 — 바꾼 뒤의 상태를 돌려준다 */
|
|
346
|
+
updateConsents: (body: ConsentUpdateRequest) =>
|
|
347
|
+
http.request("POST", "/me/consents", memberConsentsSchema, {
|
|
348
|
+
body: consentUpdateRequestSchema.parse(body),
|
|
349
|
+
}),
|
|
338
350
|
listAddresses: () => http.request("GET", "/me/addresses", z.array(memberAddressSchema)),
|
|
339
351
|
createAddress: (body: MemberAddressRequest) =>
|
|
340
352
|
http.requestVoid("POST", "/me/addresses", { body: memberAddressRequestSchema.parse(body) }),
|
package/src/index.ts
CHANGED
|
@@ -10,6 +10,7 @@ export * from "./schemas/catalog";
|
|
|
10
10
|
export * from "./schemas/checkout";
|
|
11
11
|
export * from "./schemas/claim";
|
|
12
12
|
export * from "./schemas/common";
|
|
13
|
+
export * from "./schemas/consent";
|
|
13
14
|
export * from "./schemas/customer-inquiry";
|
|
14
15
|
export * from "./schemas/inquiry";
|
|
15
16
|
export * from "./schemas/member";
|
package/src/schemas/auth.ts
CHANGED
|
@@ -86,6 +86,20 @@ export type WithdrawalBlockedDetails = z.infer<typeof withdrawalBlockedDetailsSc
|
|
|
86
86
|
export const socialProviderSchema = z.enum(["kakao", "naver", "google"]);
|
|
87
87
|
export type SocialProvider = z.infer<typeof socialProviderSchema>;
|
|
88
88
|
|
|
89
|
+
/**
|
|
90
|
+
* 소셜 가입 화면에서 받은 필수·선택 동의 — 공급자로 보내기 전에 함께 보낸다.
|
|
91
|
+
*
|
|
92
|
+
* **이 흐름으로 회원이 처음 만들어질 때만 쓴다.** 이미 있는 회원의 로그인이면 무시한다(동의는 늘어나지 않는다).
|
|
93
|
+
* 보내지 않으면 필수 동의 이력이 남지 않아 `GET /me`의 `reconsentRequired`가 true가 되고,
|
|
94
|
+
* 스토어프론트가 첫 진입에서 `POST /me/consents`로 받는다(가입 자체는 거부하지 않는다).
|
|
95
|
+
*/
|
|
96
|
+
export const idpAgreementsSchema = z.object({
|
|
97
|
+
terms: z.literal(true),
|
|
98
|
+
privacy: z.literal(true),
|
|
99
|
+
marketing: z.boolean().default(false),
|
|
100
|
+
});
|
|
101
|
+
export type IdpAgreements = z.infer<typeof idpAgreementsSchema>;
|
|
102
|
+
|
|
89
103
|
/** `POST /auth/idp/{provider}/authorize` 본문 — PKCE(S256)와 state는 SDK가 만든다 */
|
|
90
104
|
export const idpAuthorizeRequestSchema = z.object({
|
|
91
105
|
/** 로그인을 마치고 돌아올 스토어프론트 주소. 스토어프론트 도메인 목록 안이어야 한다 */
|
|
@@ -94,6 +108,8 @@ export const idpAuthorizeRequestSchema = z.object({
|
|
|
94
108
|
codeChallenge: z.string().regex(/^[A-Za-z0-9_-]{43}$/),
|
|
95
109
|
/** 스토어프론트가 만든 값 — 돌아올 때 그대로 붙어 온다. 세션에 저장해 두고 비교한다 */
|
|
96
110
|
state: z.string().min(16).max(128),
|
|
111
|
+
/** 가입이 되는 경우 남길 동의. 기존 회원 로그인이면 무시한다 */
|
|
112
|
+
agreements: idpAgreementsSchema.optional(),
|
|
97
113
|
});
|
|
98
114
|
export type IdpAuthorizeRequest = z.infer<typeof idpAuthorizeRequestSchema>;
|
|
99
115
|
|
package/src/schemas/claim.ts
CHANGED
|
@@ -22,6 +22,14 @@ export const createClaimRequestSchema = z.object({
|
|
|
22
22
|
reasonDetail: z.string().max(1000).optional(),
|
|
23
23
|
evidenceImages: z.array(z.url()).max(5).optional(),
|
|
24
24
|
exchangeOptionId: z.string().optional(),
|
|
25
|
+
quantity: z
|
|
26
|
+
.number()
|
|
27
|
+
.int()
|
|
28
|
+
.min(1)
|
|
29
|
+
.optional()
|
|
30
|
+
.describe(
|
|
31
|
+
"취소·반품·교환할 수량. 생략하면 남은 수량 전체다. 남은 수량보다 크면 400 `INVALID_QUANTITY`",
|
|
32
|
+
),
|
|
25
33
|
});
|
|
26
34
|
|
|
27
35
|
export type CreateClaimRequest = z.infer<typeof createClaimRequestSchema>;
|
|
@@ -29,8 +37,21 @@ export type CreateClaimRequest = z.infer<typeof createClaimRequestSchema>;
|
|
|
29
37
|
export const createClaimResultSchema = z.object({
|
|
30
38
|
claimId: z.string(),
|
|
31
39
|
status: z.literal("REQUESTED"),
|
|
32
|
-
expectedRefundAmount: z
|
|
33
|
-
|
|
40
|
+
expectedRefundAmount: z
|
|
41
|
+
.number()
|
|
42
|
+
.int()
|
|
43
|
+
.nullable()
|
|
44
|
+
.describe(
|
|
45
|
+
"예상 환불액 — 수량 비율 상품 금액 − 반품 배송비. **배송비 환불은 여기 포함되지 않고 " +
|
|
46
|
+
"`deliveryFeeRefundAmount`로 따로 온다**(승인 시점의 배송 묶음 상태로 확정되기 때문이다). " +
|
|
47
|
+
"교환은 환불이 없어 null이다",
|
|
48
|
+
),
|
|
49
|
+
claimDeliveryFee: z.number().int().describe("구매자가 부담하는 반품·교환 배송비. 원 단위"),
|
|
50
|
+
quantity: z.number().int().describe("접수된 수량. 요청에서 생략하면 남은 수량 전체다"),
|
|
51
|
+
deliveryFeeRefundAmount: z
|
|
52
|
+
.number()
|
|
53
|
+
.int()
|
|
54
|
+
.describe("환불 예정 배송비. 배송 묶음이 모두 취소되거나 판매자 귀책일 때만 0보다 크다"),
|
|
34
55
|
});
|
|
35
56
|
|
|
36
57
|
export type CreateClaimResult = z.infer<typeof createClaimResultSchema>;
|
|
@@ -41,8 +62,24 @@ export const myClaimSchema = z.object({
|
|
|
41
62
|
status: claimStatusSchema,
|
|
42
63
|
orderItemId: z.string(),
|
|
43
64
|
productName: z.string(),
|
|
65
|
+
quantity: z.number().int().describe("접수된 수량"),
|
|
44
66
|
reason: z.string(),
|
|
45
|
-
expectedRefundAmount: z
|
|
67
|
+
expectedRefundAmount: z
|
|
68
|
+
.number()
|
|
69
|
+
.int()
|
|
70
|
+
.nullable()
|
|
71
|
+
.describe(
|
|
72
|
+
"예상 환불액 — 수량 비율 상품 금액 − 반품 배송비 − 조건부 무료배송 미달 차감. " +
|
|
73
|
+
"**배송비 환불은 포함되지 않고 `expectedDeliveryFeeRefundAmount`로 따로 온다.** 교환은 null이다",
|
|
74
|
+
),
|
|
75
|
+
expectedDeliveryFeeRefundAmount: z
|
|
76
|
+
.number()
|
|
77
|
+
.int()
|
|
78
|
+
.nullable()
|
|
79
|
+
.describe(
|
|
80
|
+
"예상 배송비 환불액. 배송 묶음이 모두 취소되거나 판매자 귀책일 때만 0보다 크다. " +
|
|
81
|
+
"이 필드가 생기기 전에 접수된 클레임은 null이다",
|
|
82
|
+
),
|
|
46
83
|
rejectReason: z.string().nullable(),
|
|
47
84
|
requestedAt: z.string(),
|
|
48
85
|
completedAt: z.string().nullable(),
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* 동의 종류 — 이용약관(`TERMS`)·개인정보 수집이용(`PRIVACY`)은 가입 필수, 마케팅 수신(`MARKETING`)은 선택이다.
|
|
5
|
+
* 필수 동의는 철회할 수 없다(철회 = 탈퇴).
|
|
6
|
+
*/
|
|
7
|
+
export const consentKindSchema = z.enum(["TERMS", "PRIVACY", "MARKETING"]);
|
|
8
|
+
export type ConsentKind = z.infer<typeof consentKindSchema>;
|
|
9
|
+
|
|
10
|
+
/** 동의 이력의 한 줄이 무엇인가 — 동의했거나 철회했다 */
|
|
11
|
+
export const consentActionSchema = z.enum(["AGREED", "WITHDRAWN"]);
|
|
12
|
+
export type ConsentAction = z.infer<typeof consentActionSchema>;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* 동의가 일어난 경로. 값이 추가될 수 있어 모르는 값은 그대로 보여 준다.
|
|
16
|
+
* `SIGNUP` 비밀번호 가입 · `SOCIAL_SIGNUP` 소셜 가입 · `DELEGATED` 셀러 자체 회원 연동 ·
|
|
17
|
+
* `RECONSENT` 약관 개정 재동의 · `MEMBER_UPDATE` 구매자가 직접 변경 · `SELLER` 셀러가 처리
|
|
18
|
+
*/
|
|
19
|
+
export const consentSourceSchema = z.enum([
|
|
20
|
+
"SIGNUP",
|
|
21
|
+
"SOCIAL_SIGNUP",
|
|
22
|
+
"DELEGATED",
|
|
23
|
+
"RECONSENT",
|
|
24
|
+
"MEMBER_UPDATE",
|
|
25
|
+
"SELLER",
|
|
26
|
+
]);
|
|
27
|
+
export type ConsentSource = z.infer<typeof consentSourceSchema>;
|
|
28
|
+
|
|
29
|
+
/** 종류별 현재 동의 상태 */
|
|
30
|
+
export const consentStateSchema = z.object({
|
|
31
|
+
kind: consentKindSchema,
|
|
32
|
+
agreed: z.boolean(),
|
|
33
|
+
/** 동의한 약관 버전. 마케팅은 버전이 없어 null이고, 동의 이력이 없으면 null이다 */
|
|
34
|
+
agreedVersion: z.string().nullable(),
|
|
35
|
+
/** 스토어의 현재 약관 버전. 마케팅은 null */
|
|
36
|
+
currentVersion: z.string().nullable(),
|
|
37
|
+
/**
|
|
38
|
+
* 스토어가 정한 현재 약관 문서 주소. 재동의 화면에서 이 주소를 보여 준다.
|
|
39
|
+
* 스토어가 정하지 않았거나 마케팅이면 null이다(동의한 시점의 주소는 셀러가 보는 이력에 남는다).
|
|
40
|
+
*/
|
|
41
|
+
currentDocumentUrl: z.string().nullable(),
|
|
42
|
+
/** 마지막으로 동의·철회한 시각. 이력이 없으면 null */
|
|
43
|
+
updatedAt: z.string().nullable(),
|
|
44
|
+
/** 약관이 개정돼 다시 받아야 하는가. 마케팅은 항상 false */
|
|
45
|
+
reconsentRequired: z.boolean(),
|
|
46
|
+
});
|
|
47
|
+
export type ConsentState = z.infer<typeof consentStateSchema>;
|
|
48
|
+
|
|
49
|
+
/** `GET /storefront/v1/me/consents` 응답 */
|
|
50
|
+
export const memberConsentsSchema = z.object({
|
|
51
|
+
terms: consentStateSchema,
|
|
52
|
+
privacy: consentStateSchema,
|
|
53
|
+
marketing: consentStateSchema,
|
|
54
|
+
/** 필수 동의 중 하나라도 다시 받아야 하면 true — `POST /me/consents`로 받는다 */
|
|
55
|
+
reconsentRequired: z.boolean(),
|
|
56
|
+
});
|
|
57
|
+
export type MemberConsents = z.infer<typeof memberConsentsSchema>;
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* `POST /storefront/v1/me/consents` 본문 — 바꿀 항목만 보낸다.
|
|
61
|
+
* 필수 동의는 동의(`true`)만 보낼 수 있다. 이미 현재 버전에 동의한 항목은 이력을 더 남기지 않는다.
|
|
62
|
+
*/
|
|
63
|
+
export const consentUpdateRequestSchema = z
|
|
64
|
+
.object({
|
|
65
|
+
terms: z.literal(true).optional().describe("이용약관 재동의"),
|
|
66
|
+
privacy: z.literal(true).optional().describe("개인정보 수집이용 재동의"),
|
|
67
|
+
marketing: z.boolean().optional().describe("마케팅 수신 동의(false면 철회)"),
|
|
68
|
+
})
|
|
69
|
+
.refine((value) => Object.values(value).some((v) => v !== undefined), {
|
|
70
|
+
message: "최소 1개 항목이 필요합니다",
|
|
71
|
+
});
|
|
72
|
+
export type ConsentUpdateRequest = z.infer<typeof consentUpdateRequestSchema>;
|
package/src/schemas/member.ts
CHANGED
|
@@ -9,6 +9,12 @@ export const memberSchema = z.object({
|
|
|
9
9
|
point: z.number().int(),
|
|
10
10
|
marketingAgreed: z.boolean(),
|
|
11
11
|
joinedAt: z.string(),
|
|
12
|
+
reconsentRequired: z
|
|
13
|
+
.boolean()
|
|
14
|
+
.describe(
|
|
15
|
+
"약관이 개정돼 필수 동의를 다시 받아야 하는가. true면 `GET /me/consents`로 어떤 항목인지 확인하고 " +
|
|
16
|
+
"`POST /me/consents`로 받는다. 받기 전에도 스토어 이용은 막히지 않는다",
|
|
17
|
+
),
|
|
12
18
|
});
|
|
13
19
|
|
|
14
20
|
export type Member = z.infer<typeof memberSchema>;
|
package/src/schemas/order.ts
CHANGED
|
@@ -8,7 +8,18 @@ export const myOrderItemSchema = z.object({
|
|
|
8
8
|
productName: z.string(),
|
|
9
9
|
thumbnailUrl: z.url().nullable().describe("주문 시점의 대표 이미지. 없었으면 null"),
|
|
10
10
|
optionName: z.string().nullable(),
|
|
11
|
-
quantity: z.number().int(),
|
|
11
|
+
quantity: z.number().int().describe("주문 수량"),
|
|
12
|
+
// 두 수량은 서버가 언제나 함께 싣는다. `store-sdk`의 `orderItemSchema`와 같은 규칙으로 **둘 다 필수**다 —
|
|
13
|
+
// 응답 스키마는 OpenAPI 계약이기도 해서 기본값을 두면 선택 필드로 문서화되고, 필드가 빠진 응답이
|
|
14
|
+
// 조용히 0으로 읽혀 남은 수량을 잘못 계산한다
|
|
15
|
+
canceledQuantity: z
|
|
16
|
+
.number()
|
|
17
|
+
.int()
|
|
18
|
+
.describe("취소·반품으로 환불된 누적 수량. 부분 취소가 없었으면 0이다"),
|
|
19
|
+
activeQuantity: z
|
|
20
|
+
.number()
|
|
21
|
+
.int()
|
|
22
|
+
.describe("남은 수량 (`quantity` − `canceledQuantity`). 취소·반품·교환 요청 수량의 상한이다"),
|
|
12
23
|
totalPrice: z.number().int(),
|
|
13
24
|
status: orderItemStatusSchema,
|
|
14
25
|
claimStatus: z.string().nullable(),
|