@sayren/storefront-sdk 0.9.0 → 0.11.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/checkout-CHpxo2Ap.mjs +310 -0
- package/dist/{client-D9iQIWnV.mjs → client-CHfCafer.mjs} +134 -13
- package/dist/{http-BbFHVGBf.d.mts → http-CeRVoUGu.d.mts} +19 -1
- package/dist/{index-DvHOQm2-.d.mts → index-OqvbJ6Xi.d.mts} +459 -3
- package/dist/index.d.mts +3 -3
- package/dist/index.mjs +3 -3
- package/dist/payments/index.d.mts +5 -1
- package/dist/payments/index.mjs +4 -2
- package/package.json +1 -1
- package/src/auth/index.ts +18 -3
- package/src/client.ts +28 -0
- package/src/index.ts +1 -0
- package/src/payments/index.ts +11 -1
- package/src/schemas/auth.ts +16 -0
- package/src/schemas/checkout.ts +192 -1
- package/src/schemas/claim.ts +63 -3
- package/src/schemas/consent.ts +72 -0
- package/src/schemas/member.ts +6 -0
- package/src/schemas/order.ts +52 -8
- package/dist/checkout-JFk3b8RG.mjs +0 -189
|
@@ -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 };
|