@sayren/store-sdk 0.23.0 → 0.28.1
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/index.d.mts +636 -482
- package/dist/index.mjs +370 -347
- package/dist/server.d.mts +19 -28
- package/dist/server.mjs +29 -42
- package/package.json +1 -1
- package/src/client.ts +55 -153
- package/src/http.ts +1 -1
- package/src/index.ts +3 -2
- package/src/member-delegation.ts +51 -77
- package/src/oauth.ts +28 -33
- package/src/schemas/api-log.ts +7 -5
- package/src/schemas/audit.ts +5 -5
- package/src/schemas/auth.ts +0 -64
- package/src/schemas/claim.ts +4 -4
- package/src/schemas/coupon.ts +2 -2
- package/src/schemas/customer-delegation.ts +48 -0
- package/src/schemas/customer.ts +3 -3
- package/src/schemas/fulfillment.ts +9 -11
- package/src/schemas/order.ts +1 -1
- package/src/schemas/payment.ts +7 -5
- package/src/schemas/product.ts +12 -5
- package/src/schemas/promotion.ts +4 -4
- package/src/schemas/refund-policy.ts +12 -12
- package/src/schemas/saved-option-set.ts +1 -1
- package/src/schemas/scope.ts +3 -4
- package/src/schemas/shipping-policy.ts +18 -18
- package/src/schemas/store.ts +9 -9
- package/src/schemas/storefront-hosting.ts +62 -38
- package/src/schemas/subscription.ts +222 -0
- package/src/schemas/telemetry.ts +2 -2
- package/src/schemas/upload.ts +1 -1
- package/src/schemas/webhook-event.ts +1 -1
- package/src/server.ts +1 -2
- package/src/session.ts +46 -29
- package/src/schemas/api-client.ts +0 -121
package/dist/index.d.mts
CHANGED
|
@@ -398,7 +398,7 @@ export declare const APPROVAL_ALREADY_DECIDED_CODE = "APPROVAL_ALREADY_DECIDED";
|
|
|
398
398
|
* 성공 값으로 돌려주지 않는다 — 돌려주면 호출부가 승인 요청을 상품·주문으로 읽는다.
|
|
399
399
|
*
|
|
400
400
|
* - `code = APPROVAL_REQUIRED`(202): 에이전트의 고위험 쓰기가 보류됐다. 아직 아무것도 바뀌지 않았다.
|
|
401
|
-
* 셀러가
|
|
401
|
+
* 셀러가 상점 플랫폼(`approval.approvalUrl`)에서 승인하면 서버가 원 요청을 실행한다. 같은 요청을 다시 보내지 말고
|
|
402
402
|
* `approvalRequests.get(approvalId)`로 결과를 확인한다.
|
|
403
403
|
* - `code = APPROVAL_ALREADY_DECIDED`(200): 같은 멱등키로 보낸 요청의 승인이 이미 끝났다. `status`가
|
|
404
404
|
* `SUCCEEDED`·`FAILED`·`UNKNOWN`이면 실행 결과(`approval.result`)를 보고, `REJECTED`·`EXPIRED`면 새 멱등키로 다시 요청한다.
|
|
@@ -839,117 +839,10 @@ export declare const analyticsCheckoutSchema: z.ZodObject<{
|
|
|
839
839
|
}, z.core.$strip>;
|
|
840
840
|
export type AnalyticsCheckout = z.infer<typeof analyticsCheckoutSchema>;
|
|
841
841
|
//#endregion
|
|
842
|
-
//#region src/schemas/api-client.d.ts
|
|
843
|
-
/**
|
|
844
|
-
* 앱(OAuth 클라이언트) 관리 — `/v1/store/api-clients` (auth-spec 부록 B-13).
|
|
845
|
-
* 등록은 DCR(`POST /v1/oauth2/register`, RFC 7591)이 담당하고, 이 스키마는 등록 이후의
|
|
846
|
-
* 목록·상세·시크릿 재발급·비활성화 응답 계약이다. 시크릿 해시는 어떤 응답에도 포함되지 않는다.
|
|
847
|
-
*/
|
|
848
|
-
export declare const apiClientTypeSchema: z.ZodEnum<{
|
|
849
|
-
public: "public";
|
|
850
|
-
confidential: "confidential";
|
|
851
|
-
}>;
|
|
852
|
-
export type ApiClientType = z.infer<typeof apiClientTypeSchema>;
|
|
853
|
-
export declare const apiClientStatusSchema: z.ZodEnum<{
|
|
854
|
-
ACTIVE: "ACTIVE";
|
|
855
|
-
REVOKED: "REVOKED";
|
|
856
|
-
}>;
|
|
857
|
-
export type ApiClientStatus = z.infer<typeof apiClientStatusSchema>;
|
|
858
|
-
export declare const apiClientSchema: z.ZodObject<{
|
|
859
|
-
clientId: z.ZodString;
|
|
860
|
-
name: z.ZodString;
|
|
861
|
-
type: z.ZodEnum<{
|
|
862
|
-
public: "public";
|
|
863
|
-
confidential: "confidential";
|
|
864
|
-
}>;
|
|
865
|
-
status: z.ZodEnum<{
|
|
866
|
-
ACTIVE: "ACTIVE";
|
|
867
|
-
REVOKED: "REVOKED";
|
|
868
|
-
}>;
|
|
869
|
-
redirectUris: z.ZodArray<z.ZodString>;
|
|
870
|
-
scopes: z.ZodArray<z.ZodString>;
|
|
871
|
-
grantTypes: z.ZodArray<z.ZodString>;
|
|
872
|
-
secretPrefix: z.ZodNullable<z.ZodString>;
|
|
873
|
-
createdBy: z.ZodNullable<z.ZodString>;
|
|
874
|
-
createdByName: z.ZodNullable<z.ZodString>;
|
|
875
|
-
createdByEmail: z.ZodNullable<z.ZodString>;
|
|
876
|
-
createdAt: z.ZodString;
|
|
877
|
-
revokedAt: z.ZodNullable<z.ZodString>;
|
|
878
|
-
}, z.core.$strip>;
|
|
879
|
-
export type ApiClient = z.infer<typeof apiClientSchema>;
|
|
880
|
-
/** 시크릿 재발급 응답 — 평문 시크릿은 이 응답에서 단 한 번만 노출된다 */
|
|
881
|
-
export declare const apiClientSecretRotatedSchema: z.ZodObject<{
|
|
882
|
-
clientId: z.ZodString;
|
|
883
|
-
name: z.ZodString;
|
|
884
|
-
type: z.ZodEnum<{
|
|
885
|
-
public: "public";
|
|
886
|
-
confidential: "confidential";
|
|
887
|
-
}>;
|
|
888
|
-
status: z.ZodEnum<{
|
|
889
|
-
ACTIVE: "ACTIVE";
|
|
890
|
-
REVOKED: "REVOKED";
|
|
891
|
-
}>;
|
|
892
|
-
redirectUris: z.ZodArray<z.ZodString>;
|
|
893
|
-
scopes: z.ZodArray<z.ZodString>;
|
|
894
|
-
grantTypes: z.ZodArray<z.ZodString>;
|
|
895
|
-
secretPrefix: z.ZodNullable<z.ZodString>;
|
|
896
|
-
createdBy: z.ZodNullable<z.ZodString>;
|
|
897
|
-
createdByName: z.ZodNullable<z.ZodString>;
|
|
898
|
-
createdByEmail: z.ZodNullable<z.ZodString>;
|
|
899
|
-
createdAt: z.ZodString;
|
|
900
|
-
revokedAt: z.ZodNullable<z.ZodString>;
|
|
901
|
-
clientSecret: z.ZodString;
|
|
902
|
-
}, z.core.$strip>;
|
|
903
|
-
export type ApiClientSecretRotated = z.infer<typeof apiClientSecretRotatedSchema>;
|
|
904
|
-
export declare const apiClientListQuerySchema: z.ZodObject<{
|
|
905
|
-
status: z.ZodOptional<z.ZodEnum<{
|
|
906
|
-
ACTIVE: "ACTIVE";
|
|
907
|
-
REVOKED: "REVOKED";
|
|
908
|
-
}>>;
|
|
909
|
-
}, z.core.$strip>;
|
|
910
|
-
export type ApiClientListParams = z.infer<typeof apiClientListQuerySchema>;
|
|
911
|
-
/**
|
|
912
|
-
* Dynamic Client Registration 요청 (RFC 7591 §2, auth-spec §12) — `POST /v1/oauth2/register`.
|
|
913
|
-
* OAuth 프로토콜 표면이라 필드명이 snake_case이고 응답·등록 오류는 평면 JSON이다.
|
|
914
|
-
* 생략한 필드는 서버 기본값을 따른다(SDK가 기본값을 채워 보내지 않는다).
|
|
915
|
-
*/
|
|
916
|
-
export declare const oauthClientRegistrationRequestSchema: z.ZodObject<{
|
|
917
|
-
client_name: z.ZodString;
|
|
918
|
-
token_endpoint_auth_method: z.ZodOptional<z.ZodEnum<{
|
|
919
|
-
none: "none";
|
|
920
|
-
client_secret_basic: "client_secret_basic";
|
|
921
|
-
}>>;
|
|
922
|
-
redirect_uris: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
923
|
-
grant_types: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
924
|
-
authorization_code: "authorization_code";
|
|
925
|
-
refresh_token: "refresh_token";
|
|
926
|
-
client_credentials: "client_credentials";
|
|
927
|
-
"urn:ietf:params:oauth:grant-type:token-exchange": "urn:ietf:params:oauth:grant-type:token-exchange";
|
|
928
|
-
}>>>;
|
|
929
|
-
scope: z.ZodOptional<z.ZodString>;
|
|
930
|
-
}, z.core.$strip>;
|
|
931
|
-
export type OAuthClientRegistrationRequest = z.infer<typeof oauthClientRegistrationRequestSchema>;
|
|
932
|
-
/** Dynamic Client Registration 응답 (RFC 7591 §3.2.1) — client_secret은 이 응답에서만 노출된다 */
|
|
933
|
-
export declare const oauthClientRegistrationResponseSchema: z.ZodObject<{
|
|
934
|
-
client_id: z.ZodString;
|
|
935
|
-
client_secret: z.ZodOptional<z.ZodString>;
|
|
936
|
-
client_secret_expires_at: z.ZodOptional<z.ZodNumber>;
|
|
937
|
-
client_id_issued_at: z.ZodNumber;
|
|
938
|
-
client_name: z.ZodString;
|
|
939
|
-
token_endpoint_auth_method: z.ZodEnum<{
|
|
940
|
-
none: "none";
|
|
941
|
-
client_secret_basic: "client_secret_basic";
|
|
942
|
-
}>;
|
|
943
|
-
redirect_uris: z.ZodArray<z.ZodString>;
|
|
944
|
-
grant_types: z.ZodArray<z.ZodString>;
|
|
945
|
-
scope: z.ZodString;
|
|
946
|
-
}, z.core.$strip>;
|
|
947
|
-
export type OAuthClientRegistrationResponse = z.infer<typeof oauthClientRegistrationResponseSchema>;
|
|
948
|
-
//#endregion
|
|
949
842
|
//#region src/schemas/api-log.d.ts
|
|
950
843
|
/**
|
|
951
|
-
* API 로그 — `/v1/api-logs`.
|
|
952
|
-
* 인증에 실패해
|
|
844
|
+
* API 로그 — `/v1/api-logs`. 상점이 해석된 관리 API(`/v1/**`) 요청을 7일간 보관한다.
|
|
845
|
+
* 인증에 실패해 상점을 알 수 없는 요청(401 등)은 기록되지 않는다.
|
|
953
846
|
* Authorization·쿠키 헤더, 요청 본문, 개인정보는 저장하지 않는다.
|
|
954
847
|
*/
|
|
955
848
|
export declare const apiLogPrincipalTypeSchema: z.ZodEnum<{
|
|
@@ -1061,7 +954,7 @@ export declare const apiLogPageSchema: z.ZodObject<{
|
|
|
1061
954
|
export type ApiLogPage = z.infer<typeof apiLogPageSchema>;
|
|
1062
955
|
/**
|
|
1063
956
|
* API 로그 요약 — `GET /api-logs/summary`. 연동 트래픽(호출 주체 `PAT`·`CLIENT`)만 집계하며
|
|
1064
|
-
*
|
|
957
|
+
* 상점 플랫폼 사용자(`USER`) 요청은 제외한다
|
|
1065
958
|
*/
|
|
1066
959
|
export declare const apiLogSummarySchema: z.ZodObject<{
|
|
1067
960
|
windowHours: z.ZodNumber;
|
|
@@ -1071,104 +964,6 @@ export declare const apiLogSummarySchema: z.ZodObject<{
|
|
|
1071
964
|
}, z.core.$strip>;
|
|
1072
965
|
export type ApiLogSummary = z.infer<typeof apiLogSummarySchema>;
|
|
1073
966
|
//#endregion
|
|
1074
|
-
//#region src/schemas/auth.d.ts
|
|
1075
|
-
export declare const storeRoleSchema: z.ZodEnum<{
|
|
1076
|
-
ADMIN: "ADMIN";
|
|
1077
|
-
STAFF: "STAFF";
|
|
1078
|
-
OWNER: "OWNER";
|
|
1079
|
-
}>;
|
|
1080
|
-
export type StoreRole = z.infer<typeof storeRoleSchema>;
|
|
1081
|
-
export declare const userTokenResponseSchema: z.ZodObject<{
|
|
1082
|
-
access_token: z.ZodString;
|
|
1083
|
-
token_type: z.ZodLiteral<"Bearer">;
|
|
1084
|
-
expires_in: z.ZodNumber;
|
|
1085
|
-
refresh_token: z.ZodOptional<z.ZodString>;
|
|
1086
|
-
}, z.core.$strip>;
|
|
1087
|
-
export type UserTokenResponse = z.infer<typeof userTokenResponseSchema>;
|
|
1088
|
-
/** client_credentials 응답 (RFC 6749 §4.4.3) — storeToken 직발급, refresh 없음 */
|
|
1089
|
-
export declare const clientCredentialsTokenResponseSchema: z.ZodObject<{
|
|
1090
|
-
access_token: z.ZodString;
|
|
1091
|
-
token_type: z.ZodLiteral<"Bearer">;
|
|
1092
|
-
expires_in: z.ZodNumber;
|
|
1093
|
-
scope: z.ZodString;
|
|
1094
|
-
}, z.core.$strip>;
|
|
1095
|
-
export type ClientCredentialsTokenResponse = z.infer<typeof clientCredentialsTokenResponseSchema>;
|
|
1096
|
-
export declare const storeTokenResponseSchema: z.ZodObject<{
|
|
1097
|
-
access_token: z.ZodString;
|
|
1098
|
-
token_type: z.ZodLiteral<"Bearer">;
|
|
1099
|
-
expires_in: z.ZodNumber;
|
|
1100
|
-
storeId: z.ZodString;
|
|
1101
|
-
role: z.ZodEnum<{
|
|
1102
|
-
ADMIN: "ADMIN";
|
|
1103
|
-
STAFF: "STAFF";
|
|
1104
|
-
OWNER: "OWNER";
|
|
1105
|
-
}>;
|
|
1106
|
-
scopes: z.ZodArray<z.ZodString>;
|
|
1107
|
-
}, z.core.$strip>;
|
|
1108
|
-
export type StoreTokenResponse = z.infer<typeof storeTokenResponseSchema>;
|
|
1109
|
-
export declare const myStoreSchema: z.ZodObject<{
|
|
1110
|
-
storeId: z.ZodString;
|
|
1111
|
-
storeName: z.ZodString;
|
|
1112
|
-
storeCode: z.ZodString;
|
|
1113
|
-
role: z.ZodEnum<{
|
|
1114
|
-
ADMIN: "ADMIN";
|
|
1115
|
-
STAFF: "STAFF";
|
|
1116
|
-
OWNER: "OWNER";
|
|
1117
|
-
}>;
|
|
1118
|
-
status: z.ZodEnum<{
|
|
1119
|
-
ACTIVE: "ACTIVE";
|
|
1120
|
-
SUSPENDED: "SUSPENDED";
|
|
1121
|
-
CLOSED: "CLOSED";
|
|
1122
|
-
}>;
|
|
1123
|
-
}, z.core.$strip>;
|
|
1124
|
-
export type MyStore = z.infer<typeof myStoreSchema>;
|
|
1125
|
-
export declare const myAccountSchema: z.ZodObject<{
|
|
1126
|
-
userId: z.ZodString;
|
|
1127
|
-
email: z.ZodEmail;
|
|
1128
|
-
name: z.ZodString;
|
|
1129
|
-
storeCount: z.ZodNumber;
|
|
1130
|
-
createdAt: z.ZodString;
|
|
1131
|
-
}, z.core.$strip>;
|
|
1132
|
-
export type MyAccount = z.infer<typeof myAccountSchema>;
|
|
1133
|
-
/** API 토큰(PAT) — 목록/조회 뷰 (평문·해시 미포함) */
|
|
1134
|
-
export declare const apiTokenSchema: z.ZodObject<{
|
|
1135
|
-
tokenId: z.ZodString;
|
|
1136
|
-
name: z.ZodString;
|
|
1137
|
-
prefix: z.ZodString;
|
|
1138
|
-
scopes: z.ZodArray<z.ZodString>;
|
|
1139
|
-
createdBy: z.ZodString;
|
|
1140
|
-
createdByName: z.ZodNullable<z.ZodString>;
|
|
1141
|
-
createdByEmail: z.ZodNullable<z.ZodString>;
|
|
1142
|
-
createdAt: z.ZodString;
|
|
1143
|
-
expiresAt: z.ZodNullable<z.ZodString>;
|
|
1144
|
-
lastUsedAt: z.ZodNullable<z.ZodString>;
|
|
1145
|
-
agent: z.ZodDefault<z.ZodBoolean>;
|
|
1146
|
-
}, z.core.$strip>;
|
|
1147
|
-
export type ApiToken = z.infer<typeof apiTokenSchema>;
|
|
1148
|
-
/** 생성 응답 — 평문 토큰은 이 응답에서 단 한 번만 노출된다 */
|
|
1149
|
-
export declare const apiTokenCreatedSchema: z.ZodObject<{
|
|
1150
|
-
tokenId: z.ZodString;
|
|
1151
|
-
name: z.ZodString;
|
|
1152
|
-
prefix: z.ZodString;
|
|
1153
|
-
scopes: z.ZodArray<z.ZodString>;
|
|
1154
|
-
createdBy: z.ZodString;
|
|
1155
|
-
createdByName: z.ZodNullable<z.ZodString>;
|
|
1156
|
-
createdByEmail: z.ZodNullable<z.ZodString>;
|
|
1157
|
-
createdAt: z.ZodString;
|
|
1158
|
-
expiresAt: z.ZodNullable<z.ZodString>;
|
|
1159
|
-
lastUsedAt: z.ZodNullable<z.ZodString>;
|
|
1160
|
-
agent: z.ZodDefault<z.ZodBoolean>;
|
|
1161
|
-
token: z.ZodString;
|
|
1162
|
-
}, z.core.$strip>;
|
|
1163
|
-
export type ApiTokenCreated = z.infer<typeof apiTokenCreatedSchema>;
|
|
1164
|
-
export declare const apiTokenCreateRequestSchema: z.ZodObject<{
|
|
1165
|
-
name: z.ZodString;
|
|
1166
|
-
scopes: z.ZodArray<z.ZodString>;
|
|
1167
|
-
expiresInDays: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
1168
|
-
agent: z.ZodOptional<z.ZodBoolean>;
|
|
1169
|
-
}, z.core.$strip>;
|
|
1170
|
-
export type ApiTokenCreateRequest = z.infer<typeof apiTokenCreateRequestSchema>;
|
|
1171
|
-
//#endregion
|
|
1172
967
|
//#region src/schemas/category.d.ts
|
|
1173
968
|
export declare const categoryProductSortSchema: z.ZodEnum<{
|
|
1174
969
|
NAME: "NAME";
|
|
@@ -1490,10 +1285,10 @@ export declare const claimReasonSchema: z.ZodEnum<{
|
|
|
1490
1285
|
}>;
|
|
1491
1286
|
export type ClaimReason = z.infer<typeof claimReasonSchema>;
|
|
1492
1287
|
/**
|
|
1493
|
-
* 반품지 (이슈 #30) — 반품·교환 수거가 안내하는 주소다.
|
|
1288
|
+
* 반품지 (이슈 #30) — 반품·교환 수거가 안내하는 주소다. 상점 주소록의 기본 반품지이거나,
|
|
1494
1289
|
* 상품이 반품지를 따로 지정했으면 그 주소다.
|
|
1495
1290
|
*
|
|
1496
|
-
* 취소 클레임은 보낼 물건이 없어 null이고, 반품지를 등록하지 않은
|
|
1291
|
+
* 취소 클레임은 보낼 물건이 없어 null이고, 반품지를 등록하지 않은 상점도 null이다.
|
|
1497
1292
|
* 구매자가 직접 보내는 수거(`BUYER_SEND`)에 이 주소가 필요하다.
|
|
1498
1293
|
*/
|
|
1499
1294
|
export declare const claimReturnAddressSchema: z.ZodObject<{
|
|
@@ -1919,10 +1714,10 @@ export declare const couponIssueListQuerySchema: z.ZodObject<{
|
|
|
1919
1714
|
page: z.ZodOptional<z.ZodString>;
|
|
1920
1715
|
size: z.ZodOptional<z.ZodString>;
|
|
1921
1716
|
status: z.ZodOptional<z.ZodEnum<{
|
|
1922
|
-
REVOKED: "REVOKED";
|
|
1923
1717
|
AVAILABLE: "AVAILABLE";
|
|
1924
1718
|
RESERVED: "RESERVED";
|
|
1925
1719
|
USED: "USED";
|
|
1720
|
+
REVOKED: "REVOKED";
|
|
1926
1721
|
}>>;
|
|
1927
1722
|
}, z.core.$strip>;
|
|
1928
1723
|
/** `POST /v1/coupons/{couponId}/issues` — 셀러 지급. 한 번에 1,000명까지 */
|
|
@@ -2588,8 +2383,8 @@ export declare const eventTypeSchema: z.ZodEnum<{
|
|
|
2588
2383
|
}>;
|
|
2589
2384
|
export type EventType = z.infer<typeof eventTypeSchema>;
|
|
2590
2385
|
export declare const webhookStatusSchema: z.ZodEnum<{
|
|
2591
|
-
ACTIVE: "ACTIVE";
|
|
2592
2386
|
SUSPENDED: "SUSPENDED";
|
|
2387
|
+
ACTIVE: "ACTIVE";
|
|
2593
2388
|
}>;
|
|
2594
2389
|
export type WebhookStatus = z.infer<typeof webhookStatusSchema>;
|
|
2595
2390
|
export declare const webhookSchema: z.ZodObject<{
|
|
@@ -2613,8 +2408,8 @@ export declare const webhookSchema: z.ZodObject<{
|
|
|
2613
2408
|
"PRODUCT.OUT_OF_STOCK": "PRODUCT.OUT_OF_STOCK";
|
|
2614
2409
|
}>>;
|
|
2615
2410
|
status: z.ZodEnum<{
|
|
2616
|
-
ACTIVE: "ACTIVE";
|
|
2617
2411
|
SUSPENDED: "SUSPENDED";
|
|
2412
|
+
ACTIVE: "ACTIVE";
|
|
2618
2413
|
}>;
|
|
2619
2414
|
secretPrefix: z.ZodString;
|
|
2620
2415
|
suspendedAt: z.ZodNullable<z.ZodString>;
|
|
@@ -2643,8 +2438,8 @@ export declare const webhookCreatedSchema: z.ZodObject<{
|
|
|
2643
2438
|
"PRODUCT.OUT_OF_STOCK": "PRODUCT.OUT_OF_STOCK";
|
|
2644
2439
|
}>>;
|
|
2645
2440
|
status: z.ZodEnum<{
|
|
2646
|
-
ACTIVE: "ACTIVE";
|
|
2647
2441
|
SUSPENDED: "SUSPENDED";
|
|
2442
|
+
ACTIVE: "ACTIVE";
|
|
2648
2443
|
}>;
|
|
2649
2444
|
secretPrefix: z.ZodString;
|
|
2650
2445
|
suspendedAt: z.ZodNullable<z.ZodString>;
|
|
@@ -3041,7 +2836,7 @@ export declare const deliveryTypeSchema: z.ZodEnum<{
|
|
|
3041
2836
|
}>;
|
|
3042
2837
|
export type DeliveryType = z.infer<typeof deliveryTypeSchema>;
|
|
3043
2838
|
/**
|
|
3044
|
-
* 상품 이행 — 등록(POST). 배송 상품의 `shipping`을 생략하면 기본값(유료
|
|
2839
|
+
* 상품 이행 — 등록(POST). 배송 상품의 `shipping`을 생략하면 기본값(유료 배송·상점 기본 배송비·기본 출고지·반품지)이다.
|
|
3045
2840
|
*/
|
|
3046
2841
|
export declare const productFulfillmentCreateSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
3047
2842
|
type: z.ZodLiteral<"SHIPPING">;
|
|
@@ -3813,9 +3608,9 @@ export declare const addressChangeRequestListSchema: z.ZodArray<z.ZodRecord<z.Zo
|
|
|
3813
3608
|
//#endregion
|
|
3814
3609
|
//#region src/schemas/payment.d.ts
|
|
3815
3610
|
/**
|
|
3816
|
-
*
|
|
3611
|
+
* 상점 결제(PG) 설정과 매출 리포트 계약.
|
|
3817
3612
|
*
|
|
3818
|
-
* PG는 셀러가 직접 계약한다. 자격 증명은
|
|
3613
|
+
* PG는 셀러가 직접 계약한다. 자격 증명은 상점별로 저장되고, 비밀 값(시크릿 키·API Secret·
|
|
3819
3614
|
* 웹훅 시크릿)은 저장 후 다시 조회할 수 없다. 응답에는 앞 4자리 마스킹만 나온다. 공개 값
|
|
3820
3615
|
* (클라이언트 키·Store ID·채널 키)은 원래 브라우저 결제창에 노출되는 값이라 그대로 돌려준다.
|
|
3821
3616
|
*/
|
|
@@ -3862,7 +3657,7 @@ export type PgVerificationResult = z.infer<typeof pgVerificationResultSchema>;
|
|
|
3862
3657
|
/**
|
|
3863
3658
|
* 토스페이먼츠 결제위젯 키 접두사. 결제창은 API 개별 연동(`*_ck_`·`*_sk_`)만 쓴다. 위젯 키는 결제창 SDK가
|
|
3864
3659
|
* `NOT_SUPPORTED_WIDGET_KEY`로, 서버 API가 404 `NOT_FOUND_MERCHANT`로 거부하므로 저장 전에 막는다.
|
|
3865
|
-
* 요청 스키마·api
|
|
3660
|
+
* 요청 스키마·api 어댑터·상점 플랫폼 폼이 같은 상수를 쓴다(원천). `g` 플래그가 없어 `.test()`가 상태를 갖지 않는다.
|
|
3866
3661
|
*/
|
|
3867
3662
|
export declare const TOSS_WIDGET_CLIENT_KEY_PATTERN: RegExp;
|
|
3868
3663
|
/** 토스페이먼츠 결제위젯 시크릿 키 접두사. {@link TOSS_WIDGET_CLIENT_KEY_PATTERN} 참고 */
|
|
@@ -4844,6 +4639,7 @@ export declare const productSummarySchema: z.ZodObject<{
|
|
|
4844
4639
|
type: z.ZodString;
|
|
4845
4640
|
}, z.core.$strip>;
|
|
4846
4641
|
updatedAt: z.ZodString;
|
|
4642
|
+
sample: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
4847
4643
|
}, z.core.$strip>;
|
|
4848
4644
|
export type ProductSummary = z.infer<typeof productSummarySchema>;
|
|
4849
4645
|
/** 옵션 축(그룹)이 가지는 값 하나 — 예: 축 "색상"의 값 "블랙" */
|
|
@@ -4896,7 +4692,7 @@ export declare const MAX_ADDON_GROUPS = 5;
|
|
|
4896
4692
|
export declare const MAX_CUSTOM_INPUTS = 5;
|
|
4897
4693
|
/** 직접 입력 항목 최대 글자 수의 상한 */
|
|
4898
4694
|
export declare const MAX_CUSTOM_INPUT_LENGTH = 200;
|
|
4899
|
-
/** 조합 수가 이 값 이상이면
|
|
4695
|
+
/** 조합 수가 이 값 이상이면 상점 플랫폼이 경고한다(상한은 `MAX_VARIANTS`) */
|
|
4900
4696
|
export declare const VARIANT_COUNT_WARNING = 100;
|
|
4901
4697
|
/**
|
|
4902
4698
|
* 옵션 값 정렬 순서 — 등록순·가나다순·낮은 추가금순·높은 추가금순. 서버가 저장할 때 이 순서로 값의 `sortOrder`를 매긴다.
|
|
@@ -4945,7 +4741,7 @@ export declare const customInputSchema: z.ZodObject<{
|
|
|
4945
4741
|
}, z.core.$strip>;
|
|
4946
4742
|
export type CustomInput = z.infer<typeof customInputSchema>;
|
|
4947
4743
|
/**
|
|
4948
|
-
* 직접 입력 항목명에 쓸 수 없는 개인정보성 단어 —
|
|
4744
|
+
* 직접 입력 항목명에 쓸 수 없는 개인정보성 단어 — 상점 플랫폼 검사와 서버 400(`CUSTOM_INPUT_LABEL_FORBIDDEN`)이 이 목록 하나를 쓴다.
|
|
4949
4745
|
* 구매자 개인정보는 주문 정보로 받는다. 직접 입력 항목으로 받으면 보관·파기 규칙 밖에 남는다.
|
|
4950
4746
|
*/
|
|
4951
4747
|
export declare const CUSTOM_INPUT_FORBIDDEN_WORDS: readonly ["연락처", "전화", "휴대폰", "핸드폰", "폰번호", "메일", "주소", "주민", "생년월일", "생일", "실명", "계좌", "카드번호", "비밀번호", "여권", "통관", "phone", "mobile", "mail", "address"];
|
|
@@ -5027,6 +4823,7 @@ export declare const productSchema: z.ZodObject<{
|
|
|
5027
4823
|
thumbnailUrl: z.ZodOptional<z.ZodURL>;
|
|
5028
4824
|
hasOptions: z.ZodBoolean;
|
|
5029
4825
|
updatedAt: z.ZodString;
|
|
4826
|
+
sample: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
5030
4827
|
description: z.ZodOptional<z.ZodString>;
|
|
5031
4828
|
descriptionJson: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
5032
4829
|
originalPrice: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
@@ -5513,9 +5310,9 @@ export declare const productPatchRequestSchema: z.ZodObject<{
|
|
|
5513
5310
|
}, z.core.$strict>;
|
|
5514
5311
|
export type ProductPatchRequest = z.infer<typeof productPatchRequestSchema>;
|
|
5515
5312
|
export declare const productSortSchema: z.ZodEnum<{
|
|
5313
|
+
"updatedAt.desc": "updatedAt.desc";
|
|
5516
5314
|
"createdAt.desc": "createdAt.desc";
|
|
5517
5315
|
"createdAt.asc": "createdAt.asc";
|
|
5518
|
-
"updatedAt.desc": "updatedAt.desc";
|
|
5519
5316
|
"salePrice.asc": "salePrice.asc";
|
|
5520
5317
|
"salePrice.desc": "salePrice.desc";
|
|
5521
5318
|
}>;
|
|
@@ -5541,9 +5338,9 @@ export declare const productListQuerySchema: z.ZodObject<{
|
|
|
5541
5338
|
keyword: z.ZodOptional<z.ZodString>;
|
|
5542
5339
|
sellerCode: z.ZodOptional<z.ZodString>;
|
|
5543
5340
|
sort: z.ZodOptional<z.ZodEnum<{
|
|
5341
|
+
"updatedAt.desc": "updatedAt.desc";
|
|
5544
5342
|
"createdAt.desc": "createdAt.desc";
|
|
5545
5343
|
"createdAt.asc": "createdAt.asc";
|
|
5546
|
-
"updatedAt.desc": "updatedAt.desc";
|
|
5547
5344
|
"salePrice.asc": "salePrice.asc";
|
|
5548
5345
|
"salePrice.desc": "salePrice.desc";
|
|
5549
5346
|
}>>;
|
|
@@ -5566,7 +5363,7 @@ export type DiscountRequest = z.infer<typeof discountRequestSchema>;
|
|
|
5566
5363
|
* **불러오기는 복사다.** 저장 옵션을 고치거나 지워도 이미 불러온 상품의 옵션은 그대로다. 재고·SKU·사용 여부는 상품마다
|
|
5567
5364
|
* 달라 저장하지 않는다. 추가금은 조합별이 아니라 **값별**로 둔다 — 조합 옵션으로 불러오면 조합 추가금은 고른 값 추가금의 합이다.
|
|
5568
5365
|
*/
|
|
5569
|
-
/**
|
|
5366
|
+
/** 상점당 저장 옵션 최대 개수 */
|
|
5570
5367
|
export declare const MAX_SAVED_OPTION_SETS = 200;
|
|
5571
5368
|
/** 저장 옵션 이름 최대 글자 수 */
|
|
5572
5369
|
export declare const MAX_SAVED_OPTION_SET_NAME = 50;
|
|
@@ -5765,14 +5562,14 @@ export declare const savedOptionSetListQuerySchema: z.ZodObject<{
|
|
|
5765
5562
|
//#endregion
|
|
5766
5563
|
//#region src/schemas/store.d.ts
|
|
5767
5564
|
/**
|
|
5768
|
-
*
|
|
5565
|
+
* 상점 코드 규칙 — 스토어프론트 API가 테넌트를 가르는 값이다(`X-Store-Code` 헤더).
|
|
5769
5566
|
* **개설할 때 서버가 랜덤으로 발급하고** 이후 바꿀 수 없다. 이미 나간 링크와 승인된 결제가
|
|
5770
5567
|
* 이 값에 묶여 있어서 바꾸면 함께 깨진다.
|
|
5771
5568
|
*
|
|
5772
5569
|
* 호스트 라벨로도 쓸 수 있게 DNS 라벨 규칙까지 좁힌다. 하이픈으로 시작하거나 끝나는 라벨은 호스트가 될 수 없다.
|
|
5773
5570
|
*/
|
|
5774
5571
|
export declare const STORE_CODE_PATTERN: RegExp;
|
|
5775
|
-
/** 플랫폼이 쓰거나 쓸 호스트 이름 —
|
|
5572
|
+
/** 플랫폼이 쓰거나 쓸 호스트 이름 — 상점 코드로 내주지 않는다 */
|
|
5776
5573
|
export declare const RESERVED_STORE_CODES: readonly string[];
|
|
5777
5574
|
export declare function isReservedStoreCode(code: string): boolean;
|
|
5778
5575
|
export declare const storeCodeSchema: z.ZodString;
|
|
@@ -5785,7 +5582,7 @@ export declare const MAX_ANALYTICS_ALLOWED_ORIGINS = 20;
|
|
|
5785
5582
|
/** 자동 배송완료·자동 구매확정 대기일 상한 */
|
|
5786
5583
|
export declare const MAX_AUTO_TRANSITION_DAYS = 30;
|
|
5787
5584
|
/**
|
|
5788
|
-
* 약관 버전 —
|
|
5585
|
+
* 약관 버전 — 상점이 정하는 문자열이다(`1`·`2`·`2026-09-26`·`v1.2` 등). 형식은 강제하지 않고 값이 다르면 다른 버전이다.
|
|
5789
5586
|
* 올리면 그 약관에 동의한 구매자의 `reconsentRequired`가 켜지고, 재동의가 이력에 남는다. 되돌리면 재동의 요구도 풀린다.
|
|
5790
5587
|
*/
|
|
5791
5588
|
export declare const policyVersionSchema: z.ZodString;
|
|
@@ -5831,9 +5628,9 @@ export declare const storeSchema: z.ZodObject<{
|
|
|
5831
5628
|
storeCode: z.ZodString;
|
|
5832
5629
|
storefrontUrl: z.ZodURL;
|
|
5833
5630
|
status: z.ZodEnum<{
|
|
5834
|
-
ACTIVE: "ACTIVE";
|
|
5835
5631
|
SUSPENDED: "SUSPENDED";
|
|
5836
5632
|
CLOSED: "CLOSED";
|
|
5633
|
+
ACTIVE: "ACTIVE";
|
|
5837
5634
|
}>;
|
|
5838
5635
|
logoUrl: z.ZodNullable<z.ZodURL>;
|
|
5839
5636
|
businessNumber: z.ZodNullable<z.ZodString>;
|
|
@@ -5882,7 +5679,7 @@ export declare const storeMemberSchema: z.ZodObject<{
|
|
|
5882
5679
|
export type StoreMember = z.infer<typeof storeMemberSchema>;
|
|
5883
5680
|
/**
|
|
5884
5681
|
* 초대 메일 발송 결과 — `SENDING`은 발송 요청 중(결과를 아직 적지 못함), `NOT_CONFIGURED`는 메일 발송이 설정되지 않아
|
|
5885
|
-
* 보내지 않은 것이다. 발송 실패는 초대를 무효로 만들지 않는다 — 재발송으로 다시 보낸다
|
|
5682
|
+
* 보내지 않은 것이다. 상점의 월 메일 한도(요금제)를 다 써서 보내지 않았으면 `FAILED` + `deliveryErrorCode: MAIL_QUOTA_EXCEEDED`다. 발송 실패는 초대를 무효로 만들지 않는다 — 재발송으로 다시 보낸다
|
|
5886
5683
|
*/
|
|
5887
5684
|
export declare const invitationDeliveryStatusSchema: z.ZodEnum<{
|
|
5888
5685
|
FAILED: "FAILED";
|
|
@@ -6003,7 +5800,7 @@ export type SellerAddressRequest = z.infer<typeof sellerAddressRequestSchema>;
|
|
|
6003
5800
|
/**
|
|
6004
5801
|
* 스토어프론트 호스팅 (이슈 #53, M1: 템플릿 발행) — 관리 API `/v1/storefront/**`의 계약이다.
|
|
6005
5802
|
*
|
|
6006
|
-
* 셀러는 템플릿을 골라 사이트를 만들고 `{slug}.{호스팅 도메인}` 주소를 받는다.
|
|
5803
|
+
* 셀러는 템플릿을 골라 사이트를 만들고 `{slug}.{호스팅 도메인}` 주소를 받는다. 상점을 만들어도 사이트는 생기지 않고
|
|
6007
5804
|
* `POST /v1/storefront/site`가 유일한 생성 경로다. 템플릿은 만들 때만 고르고 바꾸지 않는다. 발행은 버전 단위이고,
|
|
6008
5805
|
* 되돌리기는 이전 버전을 다시 발행하는 것이다(재빌드 없음). 상태의 원천은 api DB이고 Cloudflare 쪽 반영
|
|
6009
5806
|
* (라우팅 표·사이트 Worker)은 커밋 뒤 비동기다 — 반영 상태는 `provisioning`으로 본다.
|
|
@@ -6014,15 +5811,16 @@ export type SellerAddressRequest = z.infer<typeof sellerAddressRequestSchema>;
|
|
|
6014
5811
|
* 오류 코드:
|
|
6015
5812
|
* - 403 `STOREFRONT_HOSTING_DISABLED` — 플랫폼 스위치가 꺼져 새 사이트를 만들 수 없다
|
|
6016
5813
|
* - 404 `STOREFRONT_SITE_NOT_FOUND` · `STOREFRONT_TEMPLATE_NOT_FOUND` · `STOREFRONT_VERSION_NOT_FOUND`
|
|
6017
|
-
* - 409 `STOREFRONT_SITE_EXISTS` — 이미 사이트가 있다(
|
|
5814
|
+
* - 409 `STOREFRONT_SITE_EXISTS` — 이미 사이트가 있다(상점당 1개)
|
|
6018
5815
|
* - 409 `STOREFRONT_SLUG_TAKEN` — 다른 사이트가 쓰거나 보류 중인 슬러그다
|
|
6019
|
-
* - 409 `STOREFRONT_SLUG_CHANGE_LIMIT` — 슬러그는
|
|
6020
|
-
* - 409 `STOREFRONT_SITE_CREATE_LIMIT` — 사이트는
|
|
5816
|
+
* - 409 `STOREFRONT_SLUG_CHANGE_LIMIT` — 슬러그는 상점당 30일에 3번까지 바꾼다
|
|
5817
|
+
* - 409 `STOREFRONT_SITE_CREATE_LIMIT` — 사이트는 상점당 30일에 3번까지 만든다
|
|
6021
5818
|
* - 409 `STOREFRONT_SITE_CHANGED` — 읽은 상태(`expected*`)와 현재 상태가 다르다. 다시 읽고 시도한다
|
|
6022
5819
|
* - 409 `STOREFRONT_SITE_NOT_ACTIVE` — 정지(`SUSPENDED`)된 사이트는 바꾸거나 끌 수 없다
|
|
6023
|
-
* - 409 `STORE_SUSPENDED` — 정지된
|
|
5820
|
+
* - 409 `STORE_SUSPENDED` — 정지된 상점에는 사이트를 만들 수 없다
|
|
6024
5821
|
* - 409 `STOREFRONT_VERSION_NOT_READY` — 빌드가 끝나지 않았거나 실패한 버전은 발행할 수 없다
|
|
6025
5822
|
* - 409 `STOREFRONT_NO_ROLLBACK_TARGET` — 되돌릴 이전 발행 버전이 없다
|
|
5823
|
+
* - 409 `STOREFRONT_NOT_READY` — 공개 전환: 판매 중인 상품(샘플 제외)이 없다(이슈 #70). 상품을 등록한 뒤 공개한다
|
|
6026
5824
|
* - 409 `TEMPLATE_CHANGE_NOT_SUPPORTED` — 템플릿 변경(`POST /v1/storefront/site/template`, 폐기)은 항상 이 오류다
|
|
6027
5825
|
* - 400 `STOREFRONT_SLUG_CONFIRM_MISMATCH` — 호스팅 끄기 확인 입력이 현재 슬러그와 다르다
|
|
6028
5826
|
* - 503 `STOREFRONT_PREVIEW_NOT_CONFIGURED` — 미리보기 서명 키가 설정되지 않았다
|
|
@@ -6045,7 +5843,7 @@ export type SellerAddressRequest = z.infer<typeof sellerAddressRequestSchema>;
|
|
|
6045
5843
|
* - 502 `STOREFRONT_SANDBOX_UNAVAILABLE` — 편집 Sandbox 호출이 실패했다. 잠시 뒤 다시 한다
|
|
6046
5844
|
*
|
|
6047
5845
|
* 소스 내려받기·올리기(#60, `/v1/storefront/site/source/**`, `sayren` CLI):
|
|
6048
|
-
* - 409 `SOURCE_CHANGED` — 작업 트리가 내려받은 뒤(`expectedBaseRef`) 바뀌었다(
|
|
5846
|
+
* - 409 `SOURCE_CHANGED` — 작업 트리가 내려받은 뒤(`expectedBaseRef`) 바뀌었다(상점 플랫폼·AI 편집). `error.details.currentRef`
|
|
6049
5847
|
* - 409 `EDIT_SESSION_OPEN` — 편집 환경이 열려 있다. `endEditSession: true`로 끄고 진행할 수 있다
|
|
6050
5848
|
* - 409 `SOURCE_BLOBS_MISSING` — 올리지 않은 파일 내용이 있다(`error.details.hashes`). `POST source/blobs`로 올리고 다시 한다
|
|
6051
5849
|
* - 409 `DEPENDENCY_REJECTED` — 쓸 수 없는 npm 의존성이다(`error.details.rejected: [{ name, version, reason, detail }]`)
|
|
@@ -6055,17 +5853,23 @@ export type SellerAddressRequest = z.infer<typeof sellerAddressRequestSchema>;
|
|
|
6055
5853
|
* - 404 `STOREFRONT_SOURCE_NOT_FOUND` — 그 스냅샷이 없다
|
|
6056
5854
|
*/
|
|
6057
5855
|
/**
|
|
6058
|
-
* 슬러그 형식 —
|
|
5856
|
+
* 슬러그 형식 — 상점 코드와 같은 DNS 라벨 규칙(소문자·숫자·하이픈 3~30자, 하이픈으로 시작·끝 불가)에
|
|
6059
5857
|
* 연속 하이픈 금지를 더한다. `--`는 버전 미리보기 주소(`v3--{slug}`)와 punycode(`xn--`)가 쓰는 구분자다.
|
|
6060
5858
|
*/
|
|
6061
5859
|
export declare const STOREFRONT_SLUG_PATTERN: RegExp;
|
|
6062
|
-
/** 호스팅 도메인에서 플랫폼이 쓰거나 쓸 이름 —
|
|
5860
|
+
/** 호스팅 도메인에서 플랫폼이 쓰거나 쓸 이름 — 상점 코드 예약어에 호스팅 전용 이름을 더한다 */
|
|
6063
5861
|
export declare const RESERVED_STOREFRONT_SLUGS: readonly string[];
|
|
6064
5862
|
/**
|
|
6065
5863
|
* 편집 미리보기 호스트 접미사 — 편집 미리보기 주소는 `{사이트 id 정규화}-preview.{호스팅 도메인}`이다(M2b). 사이트 주소와 같은
|
|
6066
5864
|
* 1단계 이름이라 슬러그가 이 모양이면 남의 편집 미리보기 주소와 겹칠 수 있어 슬러그로 쓰지 못한다.
|
|
6067
5865
|
*/
|
|
6068
5866
|
export declare const STOREFRONT_EDIT_PREVIEW_SUFFIX = "-preview";
|
|
5867
|
+
/**
|
|
5868
|
+
* 공식 쇼케이스 슬러그 접두사(이슈 #72) — `demo-{템플릿 id}`는 템플릿 미리보기용 쇼케이스 사이트 주소다. 쇼케이스로 지정된
|
|
5869
|
+
* 상점만 쓸 수 있다(서버가 상점 용도로 판정한다). 공식 미리보기를 흉내 내는 주소를 막는다
|
|
5870
|
+
*/
|
|
5871
|
+
export declare const STOREFRONT_SHOWCASE_SLUG_PREFIX = "demo-";
|
|
5872
|
+
export declare function isShowcaseStorefrontSlug(slug: string): boolean;
|
|
6069
5873
|
export declare function isReservedStorefrontSlug(slug: string): boolean;
|
|
6070
5874
|
/**
|
|
6071
5875
|
* 편집 미리보기 호스트 이름의 라벨 — 사이트 id의 `_`를 `-`로 바꾸고 `-preview`를 붙인다(`sfs_ab12cd34` → `sfs-ab12cd34-preview`).
|
|
@@ -6078,9 +5882,9 @@ export declare const storefrontSlugSchema: z.ZodString;
|
|
|
6078
5882
|
export declare const STOREFRONT_SLUG_HOLD_DAYS = 90;
|
|
6079
5883
|
/** 슬러그 변경 한도 — 이 기간(일) 안에 */
|
|
6080
5884
|
export declare const STOREFRONT_SLUG_CHANGE_WINDOW_DAYS = 30;
|
|
6081
|
-
/** 슬러그 변경 한도 — 횟수(
|
|
5885
|
+
/** 슬러그 변경 한도 — 횟수(상점 단위. 끄고 다시 만들어도 이어서 센다) */
|
|
6082
5886
|
export declare const STOREFRONT_SLUG_CHANGE_LIMIT = 3;
|
|
6083
|
-
/** 사이트 만들기 한도 — 같은 창(30일) 안의 횟수(
|
|
5887
|
+
/** 사이트 만들기 한도 — 같은 창(30일) 안의 횟수(상점 단위). 끄고 만들기를 되풀이해 이름을 묶어 두지 못하게 한다 */
|
|
6084
5888
|
export declare const STOREFRONT_SITE_CREATE_LIMIT = 3;
|
|
6085
5889
|
export declare const storefrontTemplateSchema: z.ZodObject<{
|
|
6086
5890
|
templateId: z.ZodString;
|
|
@@ -6090,6 +5894,9 @@ export declare const storefrontTemplateSchema: z.ZodObject<{
|
|
|
6090
5894
|
thumbnailUrl: z.ZodNullable<z.ZodString>;
|
|
6091
5895
|
version: z.ZodString;
|
|
6092
5896
|
isDefault: z.ZodBoolean;
|
|
5897
|
+
tags: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
5898
|
+
supportsCheckout: z.ZodDefault<z.ZodBoolean>;
|
|
5899
|
+
previewUrl: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
6093
5900
|
}, z.core.$strip>;
|
|
6094
5901
|
export type StorefrontTemplate = z.infer<typeof storefrontTemplateSchema>;
|
|
6095
5902
|
/**
|
|
@@ -6128,9 +5935,9 @@ export declare const storefrontVersionSchema: z.ZodObject<{
|
|
|
6128
5935
|
}, z.core.$strip>;
|
|
6129
5936
|
export type StorefrontVersion = z.infer<typeof storefrontVersionSchema>;
|
|
6130
5937
|
export declare const storefrontSiteStatusSchema: z.ZodEnum<{
|
|
6131
|
-
ACTIVE: "ACTIVE";
|
|
6132
5938
|
SUSPENDED: "SUSPENDED";
|
|
6133
5939
|
CLOSED: "CLOSED";
|
|
5940
|
+
ACTIVE: "ACTIVE";
|
|
6134
5941
|
}>;
|
|
6135
5942
|
export type StorefrontSiteStatus = z.infer<typeof storefrontSiteStatusSchema>;
|
|
6136
5943
|
export declare const storefrontVisibilitySchema: z.ZodEnum<{
|
|
@@ -6172,7 +5979,7 @@ export declare const storefrontProvisioningSchema: z.ZodObject<{
|
|
|
6172
5979
|
export type StorefrontProvisioning = z.infer<typeof storefrontProvisioningSchema>;
|
|
6173
5980
|
/**
|
|
6174
5981
|
* 편집 미리보기 주소(M2b) — 사이트마다 `{사이트 id 정규화}-preview.{호스팅 도메인}` 호스트 하나다. 호스팅 도메인의 와일드카드
|
|
6175
|
-
* 인증서가 덮으므로 따로 준비할 것이 없다. 이 주소는 편집 미리보기 링크(
|
|
5982
|
+
* 인증서가 덮으므로 따로 준비할 것이 없다. 이 주소는 편집 미리보기 링크(상점 플랫폼 전용)로 받은 쿠키가 있어야 열린다.
|
|
6176
5983
|
*/
|
|
6177
5984
|
export declare const storefrontEditPreviewSchema: z.ZodObject<{
|
|
6178
5985
|
hostname: z.ZodNullable<z.ZodString>;
|
|
@@ -6211,9 +6018,9 @@ export declare const storefrontSiteSchema: z.ZodObject<{
|
|
|
6211
6018
|
MANAGED: "MANAGED";
|
|
6212
6019
|
}>;
|
|
6213
6020
|
status: z.ZodEnum<{
|
|
6214
|
-
ACTIVE: "ACTIVE";
|
|
6215
6021
|
SUSPENDED: "SUSPENDED";
|
|
6216
6022
|
CLOSED: "CLOSED";
|
|
6023
|
+
ACTIVE: "ACTIVE";
|
|
6217
6024
|
}>;
|
|
6218
6025
|
visibility: z.ZodEnum<{
|
|
6219
6026
|
COMING_SOON: "COMING_SOON";
|
|
@@ -6291,9 +6098,9 @@ export declare const storefrontHostingSchema: z.ZodObject<{
|
|
|
6291
6098
|
MANAGED: "MANAGED";
|
|
6292
6099
|
}>;
|
|
6293
6100
|
status: z.ZodEnum<{
|
|
6294
|
-
ACTIVE: "ACTIVE";
|
|
6295
6101
|
SUSPENDED: "SUSPENDED";
|
|
6296
6102
|
CLOSED: "CLOSED";
|
|
6103
|
+
ACTIVE: "ACTIVE";
|
|
6297
6104
|
}>;
|
|
6298
6105
|
visibility: z.ZodEnum<{
|
|
6299
6106
|
COMING_SOON: "COMING_SOON";
|
|
@@ -6355,7 +6162,7 @@ export declare const storefrontSlugAvailabilitySchema: z.ZodObject<{
|
|
|
6355
6162
|
}, z.core.$strip>;
|
|
6356
6163
|
export type StorefrontSlugAvailability = z.infer<typeof storefrontSlugAvailabilitySchema>;
|
|
6357
6164
|
/**
|
|
6358
|
-
* 배포 진행 — 사이트의 지금 발행 상태가 공개 주소에 반영되기까지의 단계와 기록이다(
|
|
6165
|
+
* 배포 진행 — 사이트의 지금 발행 상태가 공개 주소에 반영되기까지의 단계와 기록이다(상점 플랫폼의 스토어프론트 만들기 3단계가 폴링한다).
|
|
6359
6166
|
* 만들기(`POST /v1/storefront/site`)는 곧바로 201로 답하고 반영은 그 뒤에 비동기로 하므로, 끝났는지는 이 조회로 본다.
|
|
6360
6167
|
* 템플릿 사이트는 미리 빌드한 템플릿 산출물을 올리므로 빌드 단계가 없다. 기록은 사이트 상태에서 만든 요약이다.
|
|
6361
6168
|
*/
|
|
@@ -6475,7 +6282,7 @@ export declare const storefrontSlugAvailabilityQuerySchema: z.ZodObject<{
|
|
|
6475
6282
|
slug: z.ZodString;
|
|
6476
6283
|
}, z.core.$strip>;
|
|
6477
6284
|
/**
|
|
6478
|
-
* 오픈 준비 중 미리보기 링크 —
|
|
6285
|
+
* 오픈 준비 중 미리보기 링크 — 상점 플랫폼에서 로그인한 OWNER·ADMIN만 받는다(PAT·에이전트 불가). 링크는 5분 안에 한 번 열면
|
|
6479
6286
|
* 그 브라우저에 12시간짜리 미리보기 쿠키가 생기고 오픈 준비 중인 사이트의 실제 화면을 본다. 링크를 남에게 넘기면 그 사람도
|
|
6480
6287
|
* 볼 수 있으므로 공유하지 않는다.
|
|
6481
6288
|
*/
|
|
@@ -6498,7 +6305,7 @@ export declare const STOREFRONT_PLATFORM_DOMAINS: readonly string[];
|
|
|
6498
6305
|
* 것만 둔다(여기 없는 접미사도 TXT 소유 확인을 통과할 수 없어 연결되지 않는다 — 이 목록은 추가 단계에서 빨리 알려 주는 안내다).
|
|
6499
6306
|
*/
|
|
6500
6307
|
export declare const STOREFRONT_PUBLIC_SUFFIXES: readonly string[];
|
|
6501
|
-
/**
|
|
6308
|
+
/** 상점당 연결할 수 있는 도메인 수 기본값 — 요금제(#44) 전의 상한이다. 실제 값은 `GET …/domains`의 `limit` */
|
|
6502
6309
|
export declare const STOREFRONT_CUSTOM_DOMAIN_LIMIT_DEFAULT = 2;
|
|
6503
6310
|
/** DNS를 넣을 때까지 기다리는 기간(일) — 지나면 `FAILED`(`DNS_NOT_CONFIGURED`) */
|
|
6504
6311
|
export declare const STOREFRONT_DOMAIN_DNS_WAIT_DAYS = 7;
|
|
@@ -6673,7 +6480,7 @@ export declare const storefrontEditSessionStatusSchema: z.ZodEnum<{
|
|
|
6673
6480
|
RUNNING: "RUNNING";
|
|
6674
6481
|
STARTING: "STARTING";
|
|
6675
6482
|
}>;
|
|
6676
|
-
/** 편집 환경을 띄우는 단계 —
|
|
6483
|
+
/** 편집 환경을 띄우는 단계 — 상점 플랫폼 진행 표시용이다. 값은 늘어날 수 있다 */
|
|
6677
6484
|
export declare const STOREFRONT_EDIT_START_STAGES: readonly ["CONTAINER", "RESTORE", "DEV_SERVER"];
|
|
6678
6485
|
export declare const storefrontEditSessionSchema: z.ZodObject<{
|
|
6679
6486
|
sessionId: z.ZodString;
|
|
@@ -7234,7 +7041,7 @@ export declare const storefrontVersionCreatedSchema: z.ZodObject<{
|
|
|
7234
7041
|
}, z.core.$strip>;
|
|
7235
7042
|
export type StorefrontVersionCreated = z.infer<typeof storefrontVersionCreatedSchema>;
|
|
7236
7043
|
/**
|
|
7237
|
-
* `POST /v1/storefront/site/editing/preview-link` — 편집 미리보기(dev 서버) 링크.
|
|
7044
|
+
* `POST /v1/storefront/site/editing/preview-link` — 편집 미리보기(dev 서버) 링크. 상점 플랫폼에서 로그인한 OWNER·ADMIN만
|
|
7238
7045
|
* 받는다(PAT·에이전트 불가). 5분 안에 열면 그 브라우저에 미리보기 호스트 전용 쿠키(12시간)가 생긴다. 편집 환경이
|
|
7239
7046
|
* 없으면 409 `EDIT_SESSION_REQUIRED`다(편집 환경이 `STARTING`이면 링크는 주고, 미리보기 화면이 기동 대기를 보여 준다).
|
|
7240
7047
|
*/
|
|
@@ -7370,7 +7177,7 @@ export interface UploadRejection {
|
|
|
7370
7177
|
}
|
|
7371
7178
|
/**
|
|
7372
7179
|
* 용도 제한 위반 여부. 통과하면 `null`.
|
|
7373
|
-
* 서버가 던지는 오류와
|
|
7180
|
+
* 서버가 던지는 오류와 상점 플랫폼이 먼저 띄우는 안내가 갈리지 않도록 한 함수로 판정한다.
|
|
7374
7181
|
*/
|
|
7375
7182
|
export declare function uploadRejection(purpose: UploadPurpose, filename: string, size?: number): UploadRejection | null;
|
|
7376
7183
|
/**
|
|
@@ -7395,9 +7202,41 @@ export declare const uploadTicketSchema: z.ZodObject<{
|
|
|
7395
7202
|
}, z.core.$strip>;
|
|
7396
7203
|
export type UploadTicket = z.infer<typeof uploadTicketSchema>;
|
|
7397
7204
|
//#endregion
|
|
7205
|
+
//#region src/schemas/auth.d.ts
|
|
7206
|
+
export declare const storeRoleSchema: z.ZodEnum<{
|
|
7207
|
+
ADMIN: "ADMIN";
|
|
7208
|
+
STAFF: "STAFF";
|
|
7209
|
+
OWNER: "OWNER";
|
|
7210
|
+
}>;
|
|
7211
|
+
export type StoreRole = z.infer<typeof storeRoleSchema>;
|
|
7212
|
+
export declare const myStoreSchema: z.ZodObject<{
|
|
7213
|
+
storeId: z.ZodString;
|
|
7214
|
+
storeName: z.ZodString;
|
|
7215
|
+
storeCode: z.ZodString;
|
|
7216
|
+
role: z.ZodEnum<{
|
|
7217
|
+
ADMIN: "ADMIN";
|
|
7218
|
+
STAFF: "STAFF";
|
|
7219
|
+
OWNER: "OWNER";
|
|
7220
|
+
}>;
|
|
7221
|
+
status: z.ZodEnum<{
|
|
7222
|
+
SUSPENDED: "SUSPENDED";
|
|
7223
|
+
CLOSED: "CLOSED";
|
|
7224
|
+
ACTIVE: "ACTIVE";
|
|
7225
|
+
}>;
|
|
7226
|
+
}, z.core.$strip>;
|
|
7227
|
+
export type MyStore = z.infer<typeof myStoreSchema>;
|
|
7228
|
+
export declare const myAccountSchema: z.ZodObject<{
|
|
7229
|
+
userId: z.ZodString;
|
|
7230
|
+
email: z.ZodEmail;
|
|
7231
|
+
name: z.ZodString;
|
|
7232
|
+
storeCount: z.ZodNumber;
|
|
7233
|
+
createdAt: z.ZodString;
|
|
7234
|
+
}, z.core.$strip>;
|
|
7235
|
+
export type MyAccount = z.infer<typeof myAccountSchema>;
|
|
7236
|
+
//#endregion
|
|
7398
7237
|
//#region src/session.d.ts
|
|
7399
7238
|
/**
|
|
7400
|
-
* SDK 세션 매니저 —
|
|
7239
|
+
* SDK 세션 매니저 — 상점 플랫폼(액세스 토큰)의 저장·무음 갱신·회전을 캡슐화한다.
|
|
7401
7240
|
*
|
|
7402
7241
|
* 저장 매체(쿠키/localStorage/…)와 그 속성(Max-Age·SameSite·Secure·Path)은 **어댑터(앱) 책임**이다.
|
|
7403
7242
|
* SDK는 "무엇을 어떤 키로 저장할지"만 알고, "어떻게 저장할지"는 SessionStorage 어댑터에 위임한다.
|
|
@@ -7418,9 +7257,21 @@ export declare const STORE_SESSION_KEYS: {
|
|
|
7418
7257
|
/** authorize() → handleCallback() 간 1회용 PKCE 블롭({ verifier, state, redirectUri }) 저장 키 */
|
|
7419
7258
|
readonly pkce: "sayren.store.pkce";
|
|
7420
7259
|
};
|
|
7260
|
+
/**
|
|
7261
|
+
* 인가 서버(Sayren 계정, accounts) 주소 — `https://accounts.sayren.app/api/auth/oauth2/{authorize,token,revoke}`.
|
|
7262
|
+
* `resource`를 주면 authorize·code 교환·refresh에 RFC 8707 `resource`를 싣는다(JWT access token의 `aud`).
|
|
7263
|
+
*/
|
|
7264
|
+
interface StoreAuthServer {
|
|
7265
|
+
authorizeUrl: string;
|
|
7266
|
+
tokenUrl: string;
|
|
7267
|
+
revokeUrl: string;
|
|
7268
|
+
resource?: string;
|
|
7269
|
+
}
|
|
7421
7270
|
interface StoreSessionOptions {
|
|
7422
|
-
/** 예: https://api.example.com/v1 (/
|
|
7271
|
+
/** api 주소(예: https://api.example.com/v1) — `userinfo()`의 `GET /me`에 쓴다 */
|
|
7423
7272
|
baseUrl: string;
|
|
7273
|
+
/** 인가 서버(accounts) 주소들 */
|
|
7274
|
+
authServer: StoreAuthServer;
|
|
7424
7275
|
/** OAuth public client id (예: avarlabs) */
|
|
7425
7276
|
clientId: string;
|
|
7426
7277
|
/** 저장 매체 어댑터 (앱 소유) */
|
|
@@ -7430,13 +7281,13 @@ interface StoreSessionOptions {
|
|
|
7430
7281
|
interface AuthorizeOptions {
|
|
7431
7282
|
/** OAuth 콜백 URI (예: https://store.example.com/auth/callback) */
|
|
7432
7283
|
redirectUri: string;
|
|
7433
|
-
/** 생략 시
|
|
7284
|
+
/** 생략 시 발급자 기본. refresh가 필요하면 offline_access 포함 */
|
|
7434
7285
|
scope?: string;
|
|
7435
|
-
/**
|
|
7436
|
-
|
|
7286
|
+
/** OIDC `prompt` — `login`(재인증)·`create`(가입)·`consent` */
|
|
7287
|
+
prompt?: "login" | "create" | "consent";
|
|
7437
7288
|
}
|
|
7438
7289
|
interface StoreSession {
|
|
7439
|
-
/** 현재
|
|
7290
|
+
/** 현재 액세스 토큰 (없으면 null) */
|
|
7440
7291
|
getToken(): string | null;
|
|
7441
7292
|
/** 토큰 저장 + 구독자 통지. refresh_token이 있으면 함께 회전 저장한다(없으면 기존 유지) */
|
|
7442
7293
|
setTokens(tokens: {
|
|
@@ -7444,7 +7295,7 @@ interface StoreSession {
|
|
|
7444
7295
|
refresh_token?: string;
|
|
7445
7296
|
}): void;
|
|
7446
7297
|
/**
|
|
7447
|
-
* 무음 세션 갱신 — refresh 토큰으로 새
|
|
7298
|
+
* 무음 세션 갱신 — refresh 토큰으로 새 액세스 토큰을 받아 회전 저장한다.
|
|
7448
7299
|
* - 탭 내부: 동시 다발 호출을 single-flight로 합친다.
|
|
7449
7300
|
* - 탭 간: navigator.locks(있으면)로 회전을 직렬화하고, 락 진입 시 다른 탭이 이미
|
|
7450
7301
|
* 회전했으면(세션 토큰 변경) 내 refresh 토큰을 소비하지 않고 true를 반환한다.
|
|
@@ -7455,14 +7306,14 @@ interface StoreSession {
|
|
|
7455
7306
|
/** 세션/리프레시 키를 지우고 구독자에게 통지한다(서버의 토큰은 그대로다 — 로그아웃은 `logout()`) */
|
|
7456
7307
|
clear(): void;
|
|
7457
7308
|
/**
|
|
7458
|
-
* 로그아웃 — 서버에서 **refresh 토큰(패밀리째)과 access 토큰을 폐기**(`
|
|
7309
|
+
* 로그아웃 — 인가 서버에서 **refresh 토큰(패밀리째)과 access 토큰을 폐기**(`revokeUrl`, RFC 7009)한 뒤 세션을 지운다.
|
|
7459
7310
|
* refresh를 폐기하지 않으면 쿠키만 지워도 서버의 refresh 패밀리가 절대 만료까지 살아 있어, 새어 나간 refresh 토큰으로
|
|
7460
|
-
* 계속 새
|
|
7311
|
+
* 계속 새 액세스 토큰을 받을 수 있다. 폐기 요청 실패(네트워크·이미 무효)는 무시하고 세션은 항상 지운다.
|
|
7461
7312
|
*/
|
|
7462
7313
|
logout(): Promise<void>;
|
|
7463
7314
|
/** 변경 구독(useSyncExternalStore 소비용) — getToken을 스냅샷으로 쓴다. 해지 함수 반환 */
|
|
7464
7315
|
subscribe(cb: () => void): () => void;
|
|
7465
|
-
/** 현재
|
|
7316
|
+
/** 현재 액세스 토큰 (getToken()과 동일 — 게터 형태 소비용) */
|
|
7466
7317
|
readonly accessToken: string | null;
|
|
7467
7318
|
/** 현재 저장된 refresh 토큰 (없으면 null) */
|
|
7468
7319
|
readonly refreshToken: string | null;
|
|
@@ -7486,22 +7337,16 @@ export declare function createStoreSession(options: StoreSessionOptions): StoreS
|
|
|
7486
7337
|
interface StoreClientOptions {
|
|
7487
7338
|
/** 예: https://api.example.com/v1 */
|
|
7488
7339
|
baseUrl: string;
|
|
7489
|
-
/** 유저 토큰 (1단계). 인증/스토어 목록 API에 사용 */
|
|
7490
|
-
userToken?: TokenSource;
|
|
7491
|
-
/** 스토어 토큰 (3단계). 테넌트 리소스 API에 사용 */
|
|
7492
|
-
storeToken?: TokenSource;
|
|
7493
|
-
/** 테넌트 storeId — storeHttp(테넌트 리소스) 요청에 X-Store-Id로 실린다(userToken 직접 인가). */
|
|
7494
|
-
storeId?: TokenSource;
|
|
7495
7340
|
/**
|
|
7496
|
-
* 토큰
|
|
7497
|
-
*
|
|
7341
|
+
* 계정 토큰(accounts가 발급한 JWT — 상점 플랫폼 로그인, 개인 액세스 토큰, 연결된 앱의 토큰).
|
|
7342
|
+
* 계정 API(`/me/*`)와 상점 API 모두에 Bearer로 싣는다. `session`을 주면 생략해도 세션 토큰을 쓴다.
|
|
7498
7343
|
*/
|
|
7499
|
-
|
|
7500
|
-
|
|
7501
|
-
|
|
7344
|
+
accessToken?: TokenSource;
|
|
7345
|
+
/** 대상 상점 id — 상점 API 요청에 `X-Store-Id`로 싣는다. 계정 API(`/me/*`)에는 싣지 않는다 */
|
|
7346
|
+
storeId?: TokenSource;
|
|
7502
7347
|
/**
|
|
7503
|
-
* SDK 세션 매니저 — 전달하면
|
|
7504
|
-
* 이 세션에서 자동 배선한다. 개별 옵션(
|
|
7348
|
+
* SDK 세션 매니저 — 전달하면 Bearer 토큰·401 refresh·복구 불가 시 clear를
|
|
7349
|
+
* 이 세션에서 자동 배선한다. 개별 옵션(accessToken/refresh/onUnauthorized)을 명시하면 그쪽이 우선한다.
|
|
7505
7350
|
*/
|
|
7506
7351
|
session?: StoreSession;
|
|
7507
7352
|
/** 401 시 세션 갱신 시도 — true면 요청을 1회 재시도한다(refresh 토큰 회전) */
|
|
@@ -7511,7 +7356,7 @@ interface StoreClientOptions {
|
|
|
7511
7356
|
fetch?: typeof globalThis.fetch;
|
|
7512
7357
|
}
|
|
7513
7358
|
export declare function createStoreClient(options: StoreClientOptions): {
|
|
7514
|
-
/** session의 현재
|
|
7359
|
+
/** session의 현재 액세스 토큰 (session 미배선 시 null — 던지지 않음) */
|
|
7515
7360
|
readonly accessToken: string | null;
|
|
7516
7361
|
/** session의 현재 refresh 토큰 (session 미배선 시 null — 던지지 않음) */
|
|
7517
7362
|
readonly refreshToken: string | null;
|
|
@@ -7526,27 +7371,14 @@ export declare function createStoreClient(options: StoreClientOptions): {
|
|
|
7526
7371
|
createdAt: string;
|
|
7527
7372
|
} | null>;
|
|
7528
7373
|
auth: {
|
|
7529
|
-
/**
|
|
7530
|
-
* 서버 간 연동(M2M) — client_credentials grant (client_secret_basic).
|
|
7531
|
-
* 클라이언트가 스토어에 바인딩되어 있어 **storeToken이 곧바로 발급**된다.
|
|
7532
|
-
* ⚠ client_secret은 서버 환경에서만 사용할 것 (브라우저 반입 금지)
|
|
7533
|
-
*/
|
|
7534
|
-
issueStoreTokenByClientCredentials(clientId: string, clientSecret: string, scope?: string): Promise<{
|
|
7535
|
-
access_token: string;
|
|
7536
|
-
token_type: "Bearer";
|
|
7537
|
-
expires_in: number;
|
|
7538
|
-
scope: string;
|
|
7539
|
-
}>;
|
|
7540
|
-
/** 2단계 — 소속 스토어 목록 */
|
|
7374
|
+
/** 소속 상점 목록 */
|
|
7541
7375
|
listMyStores: () => Promise<{
|
|
7542
7376
|
storeId: string;
|
|
7543
7377
|
storeName: string;
|
|
7544
7378
|
storeCode: string;
|
|
7545
7379
|
role: "ADMIN" | "STAFF" | "OWNER";
|
|
7546
|
-
status: "
|
|
7380
|
+
status: "SUSPENDED" | "CLOSED" | "ACTIVE";
|
|
7547
7381
|
}[]>;
|
|
7548
|
-
/** RFC 7009 — token을 폐기한다 (public client는 client_id만 동반) */
|
|
7549
|
-
revoke(token: string, clientId: string): Promise<void>;
|
|
7550
7382
|
me: () => Promise<{
|
|
7551
7383
|
userId: string;
|
|
7552
7384
|
email: string;
|
|
@@ -7555,122 +7387,6 @@ export declare function createStoreClient(options: StoreClientOptions): {
|
|
|
7555
7387
|
createdAt: string;
|
|
7556
7388
|
}>;
|
|
7557
7389
|
};
|
|
7558
|
-
/** API 토큰(PAT) 관리 — OWNER/ADMIN 전용. 발급된 토큰은 storeToken처럼 Bearer로 사용 */
|
|
7559
|
-
apiTokens: {
|
|
7560
|
-
create: (body: ApiTokenCreateRequest) => Promise<{
|
|
7561
|
-
tokenId: string;
|
|
7562
|
-
name: string;
|
|
7563
|
-
prefix: string;
|
|
7564
|
-
scopes: string[];
|
|
7565
|
-
createdBy: string;
|
|
7566
|
-
createdByName: string | null;
|
|
7567
|
-
createdByEmail: string | null;
|
|
7568
|
-
createdAt: string;
|
|
7569
|
-
expiresAt: string | null;
|
|
7570
|
-
lastUsedAt: string | null;
|
|
7571
|
-
agent: boolean;
|
|
7572
|
-
token: string;
|
|
7573
|
-
}>;
|
|
7574
|
-
list: () => Promise<{
|
|
7575
|
-
tokenId: string;
|
|
7576
|
-
name: string;
|
|
7577
|
-
prefix: string;
|
|
7578
|
-
scopes: string[];
|
|
7579
|
-
createdBy: string;
|
|
7580
|
-
createdByName: string | null;
|
|
7581
|
-
createdByEmail: string | null;
|
|
7582
|
-
createdAt: string;
|
|
7583
|
-
expiresAt: string | null;
|
|
7584
|
-
lastUsedAt: string | null;
|
|
7585
|
-
agent: boolean;
|
|
7586
|
-
}[]>;
|
|
7587
|
-
revoke: (tokenId: string) => Promise<void>;
|
|
7588
|
-
};
|
|
7589
|
-
/**
|
|
7590
|
-
* 앱(OAuth 클라이언트) 관리 — OWNER/ADMIN storeToken 전용(PAT·M2M 거부). auth-spec §12, 부록 B-13.
|
|
7591
|
-
* 시크릿 평문은 register·rotateSecret 응답에서만 한 번 노출된다(apiTokens.create와 같은 성격).
|
|
7592
|
-
*/
|
|
7593
|
-
apiClients: {
|
|
7594
|
-
/**
|
|
7595
|
-
* DCR 등록 (RFC 7591) — `POST /v1/oauth2/register`. OAuth 프로토콜 표면이라 응답이 평면 JSON이다.
|
|
7596
|
-
* 등록 오류(`invalid_client_metadata`·`invalid_redirect_uri`)는 ApiError(code=error,
|
|
7597
|
-
* message=error_description)로, Bearer 인증 오류는 엔벨로프 그대로 ApiError로 던진다.
|
|
7598
|
-
*/
|
|
7599
|
-
register: (body: OAuthClientRegistrationRequest) => Promise<{
|
|
7600
|
-
client_id: string;
|
|
7601
|
-
client_id_issued_at: number;
|
|
7602
|
-
client_name: string;
|
|
7603
|
-
token_endpoint_auth_method: "none" | "client_secret_basic";
|
|
7604
|
-
redirect_uris: string[];
|
|
7605
|
-
grant_types: string[];
|
|
7606
|
-
scope: string;
|
|
7607
|
-
client_secret?: string | undefined;
|
|
7608
|
-
client_secret_expires_at?: number | undefined;
|
|
7609
|
-
}>;
|
|
7610
|
-
list: (params?: ApiClientListParams) => Promise<{
|
|
7611
|
-
clientId: string;
|
|
7612
|
-
name: string;
|
|
7613
|
-
type: "public" | "confidential";
|
|
7614
|
-
status: "ACTIVE" | "REVOKED";
|
|
7615
|
-
redirectUris: string[];
|
|
7616
|
-
scopes: string[];
|
|
7617
|
-
grantTypes: string[];
|
|
7618
|
-
secretPrefix: string | null;
|
|
7619
|
-
createdBy: string | null;
|
|
7620
|
-
createdByName: string | null;
|
|
7621
|
-
createdByEmail: string | null;
|
|
7622
|
-
createdAt: string;
|
|
7623
|
-
revokedAt: string | null;
|
|
7624
|
-
}[]>;
|
|
7625
|
-
get: (clientId: string) => Promise<{
|
|
7626
|
-
clientId: string;
|
|
7627
|
-
name: string;
|
|
7628
|
-
type: "public" | "confidential";
|
|
7629
|
-
status: "ACTIVE" | "REVOKED";
|
|
7630
|
-
redirectUris: string[];
|
|
7631
|
-
scopes: string[];
|
|
7632
|
-
grantTypes: string[];
|
|
7633
|
-
secretPrefix: string | null;
|
|
7634
|
-
createdBy: string | null;
|
|
7635
|
-
createdByName: string | null;
|
|
7636
|
-
createdByEmail: string | null;
|
|
7637
|
-
createdAt: string;
|
|
7638
|
-
revokedAt: string | null;
|
|
7639
|
-
}>;
|
|
7640
|
-
/** confidential 전용. 기존 시크릿은 즉시 무효(유예 없음) */
|
|
7641
|
-
rotateSecret: (clientId: string) => Promise<{
|
|
7642
|
-
clientId: string;
|
|
7643
|
-
name: string;
|
|
7644
|
-
type: "public" | "confidential";
|
|
7645
|
-
status: "ACTIVE" | "REVOKED";
|
|
7646
|
-
redirectUris: string[];
|
|
7647
|
-
scopes: string[];
|
|
7648
|
-
grantTypes: string[];
|
|
7649
|
-
secretPrefix: string | null;
|
|
7650
|
-
createdBy: string | null;
|
|
7651
|
-
createdByName: string | null;
|
|
7652
|
-
createdByEmail: string | null;
|
|
7653
|
-
createdAt: string;
|
|
7654
|
-
revokedAt: string | null;
|
|
7655
|
-
clientSecret: string;
|
|
7656
|
-
}>;
|
|
7657
|
-
/** REVOKED로 전환(되돌릴 수 없음). 이미 비활성이면 현재 상태를 그대로 돌려준다 */
|
|
7658
|
-
deactivate: (clientId: string) => Promise<{
|
|
7659
|
-
clientId: string;
|
|
7660
|
-
name: string;
|
|
7661
|
-
type: "public" | "confidential";
|
|
7662
|
-
status: "ACTIVE" | "REVOKED";
|
|
7663
|
-
redirectUris: string[];
|
|
7664
|
-
scopes: string[];
|
|
7665
|
-
grantTypes: string[];
|
|
7666
|
-
secretPrefix: string | null;
|
|
7667
|
-
createdBy: string | null;
|
|
7668
|
-
createdByName: string | null;
|
|
7669
|
-
createdByEmail: string | null;
|
|
7670
|
-
createdAt: string;
|
|
7671
|
-
revokedAt: string | null;
|
|
7672
|
-
}>;
|
|
7673
|
-
};
|
|
7674
7390
|
/**
|
|
7675
7391
|
* 미디어 업로드 — 자리를 받아(`POST /uploads`) 파일 바이트는 호출자가
|
|
7676
7392
|
* `uploadUrl`로 직접 PUT한다. 업로드가 끝나면 `url`이 공개 주소가 된다.
|
|
@@ -7710,6 +7426,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
|
|
|
7710
7426
|
type: string;
|
|
7711
7427
|
};
|
|
7712
7428
|
updatedAt: string;
|
|
7429
|
+
sample: boolean;
|
|
7713
7430
|
thumbnailUrl?: string | undefined;
|
|
7714
7431
|
}[];
|
|
7715
7432
|
}>;
|
|
@@ -7723,6 +7440,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
|
|
|
7723
7440
|
categoryId: string | null;
|
|
7724
7441
|
hasOptions: boolean;
|
|
7725
7442
|
updatedAt: string;
|
|
7443
|
+
sample: boolean;
|
|
7726
7444
|
optionGroups: {
|
|
7727
7445
|
groupId: string;
|
|
7728
7446
|
name: string;
|
|
@@ -7819,6 +7537,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
|
|
|
7819
7537
|
categoryId: string | null;
|
|
7820
7538
|
hasOptions: boolean;
|
|
7821
7539
|
updatedAt: string;
|
|
7540
|
+
sample: boolean;
|
|
7822
7541
|
optionGroups: {
|
|
7823
7542
|
groupId: string;
|
|
7824
7543
|
name: string;
|
|
@@ -7915,6 +7634,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
|
|
|
7915
7634
|
categoryId: string | null;
|
|
7916
7635
|
hasOptions: boolean;
|
|
7917
7636
|
updatedAt: string;
|
|
7637
|
+
sample: boolean;
|
|
7918
7638
|
optionGroups: {
|
|
7919
7639
|
groupId: string;
|
|
7920
7640
|
name: string;
|
|
@@ -8196,7 +7916,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
|
|
|
8196
7916
|
createdAt: string;
|
|
8197
7917
|
updatedAt: string;
|
|
8198
7918
|
}>;
|
|
8199
|
-
/** 이름이 겹치면 409 `OPTION_SET_NAME_TAKEN`,
|
|
7919
|
+
/** 이름이 겹치면 409 `OPTION_SET_NAME_TAKEN`, 상점당 200개를 넘으면 409 `OPTION_SET_LIMIT_EXCEEDED` */
|
|
8200
7920
|
create: (body: SavedOptionSetRequestInput) => Promise<{
|
|
8201
7921
|
optionSetId: string;
|
|
8202
7922
|
name: string;
|
|
@@ -8559,7 +8279,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
|
|
|
8559
8279
|
}>;
|
|
8560
8280
|
/**
|
|
8561
8281
|
* `POST /v1/orders/{orderId}/cash-receipt/reissue` — 실패했거나 재시도 대기 중인 현금영수증을 지금 다시 발급·취소한다.
|
|
8562
|
-
*
|
|
8282
|
+
* 상점 플랫폼 OWNER·ADMIN 전용(PAT·M2M 403 `INSUFFICIENT_ROLE`). 404 `CASH_RECEIPT_NOT_FOUND`, 409 `CASH_RECEIPT_NOT_REISSUABLE`
|
|
8563
8283
|
*/
|
|
8564
8284
|
reissueCashReceipt: (orderId: string) => Promise<{
|
|
8565
8285
|
cashReceiptId: string;
|
|
@@ -8699,7 +8419,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
|
|
|
8699
8419
|
updateTracking: (orderItemId: string, carrierCode: string, trackingNumber: string) => Promise<void>;
|
|
8700
8420
|
/**
|
|
8701
8421
|
* 배송완료 처리 — `DISPATCHED`·`DELIVERING`만 넘어간다. 응답의 `autoDecisionDate`가 자동 구매확정 예정일이다
|
|
8702
|
-
* (
|
|
8422
|
+
* (상점 설정 `autoConfirmDays`가 0이면 null).
|
|
8703
8423
|
*/
|
|
8704
8424
|
markDelivered: (orderItemId: string, idempotencyKey?: string) => Promise<{
|
|
8705
8425
|
orderItemId: string;
|
|
@@ -9061,7 +8781,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
|
|
|
9061
8781
|
updateAnswer: (inquiryId: string, content: string) => Promise<void>;
|
|
9062
8782
|
};
|
|
9063
8783
|
/**
|
|
9064
|
-
* 구매자 로그인 설정 — 이메일·비밀번호 허용, 소셜 공급자 연결. 비밀 값을 다루므로
|
|
8784
|
+
* 구매자 로그인 설정 — 이메일·비밀번호 허용, 소셜 공급자 연결. 비밀 값을 다루므로 상점 플랫폼에 로그인한 OWNER만 호출할 수 있다
|
|
9065
8785
|
*/
|
|
9066
8786
|
loginSettings: {
|
|
9067
8787
|
get: () => Promise<{
|
|
@@ -9157,7 +8877,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
|
|
|
9157
8877
|
}[];
|
|
9158
8878
|
}>;
|
|
9159
8879
|
};
|
|
9160
|
-
/** 구매자 관리 — 조회 `customer:r`, 탈퇴 처리 `customer:rw`(
|
|
8880
|
+
/** 구매자 관리 — 조회 `customer:r`, 탈퇴 처리 `customer:rw`(상점 플랫폼 OWNER·ADMIN) */
|
|
9161
8881
|
customers: {
|
|
9162
8882
|
list: (params?: PageParams & Omit<z.input<typeof customerListQuerySchema>, "page" | "size">) => Promise<{
|
|
9163
8883
|
page: number;
|
|
@@ -10106,9 +9826,9 @@ export declare function createStoreClient(options: StoreClientOptions): {
|
|
|
10106
9826
|
}>;
|
|
10107
9827
|
};
|
|
10108
9828
|
/**
|
|
10109
|
-
* 결제(PG) 설정 —
|
|
10110
|
-
* 403 `INSUFFICIENT_ROLE`이다(조회 포함). OWNER 여부는 요청 시점의
|
|
10111
|
-
* 양도·강등
|
|
9829
|
+
* 결제(PG) 설정 — **상점 플랫폼 OWNER 전용**. ADMIN·STAFF·PAT·M2M·3rd-party 앱 토큰은 스코프가 있어도
|
|
9830
|
+
* 403 `INSUFFICIENT_ROLE`이다(조회 포함). OWNER 여부는 요청 시점의 상점 멤버십으로 다시 확인하므로
|
|
9831
|
+
* 양도·강등 직후에도 바로 403이다. 비밀 값(시크릿 키·API Secret·웹훅 시크릿)은 요청으로만 보내고
|
|
10112
9832
|
* 응답에는 `secrets[].masked`(앞 4자리 마스킹)만 나온다.
|
|
10113
9833
|
*/
|
|
10114
9834
|
paymentSettings: {
|
|
@@ -10835,7 +10555,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
|
|
|
10835
10555
|
webhookId: string;
|
|
10836
10556
|
url: string;
|
|
10837
10557
|
eventTypes: ("ORDER.PAID" | "ORDER.CONFIRMED" | "ORDER.DISPATCHED" | "ORDER.DELIVERED" | "ORDER.PURCHASE_DECIDED" | "ORDER.ADDRESS_CHANGE_REQUESTED" | "ORDER.CANCELED" | "ORDER.FULFILLED" | "CLAIM.CANCEL_REQUESTED" | "CLAIM.RETURN_REQUESTED" | "CLAIM.EXCHANGE_REQUESTED" | "CLAIM.COMPLETED" | "INQUIRY.CREATED" | "REVIEW.CREATED" | "PRODUCT.OUT_OF_STOCK")[];
|
|
10838
|
-
status: "
|
|
10558
|
+
status: "SUSPENDED" | "ACTIVE";
|
|
10839
10559
|
secretPrefix: string;
|
|
10840
10560
|
suspendedAt: string | null;
|
|
10841
10561
|
createdAt: string;
|
|
@@ -10845,7 +10565,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
|
|
|
10845
10565
|
webhookId: string;
|
|
10846
10566
|
url: string;
|
|
10847
10567
|
eventTypes: ("ORDER.PAID" | "ORDER.CONFIRMED" | "ORDER.DISPATCHED" | "ORDER.DELIVERED" | "ORDER.PURCHASE_DECIDED" | "ORDER.ADDRESS_CHANGE_REQUESTED" | "ORDER.CANCELED" | "ORDER.FULFILLED" | "CLAIM.CANCEL_REQUESTED" | "CLAIM.RETURN_REQUESTED" | "CLAIM.EXCHANGE_REQUESTED" | "CLAIM.COMPLETED" | "INQUIRY.CREATED" | "REVIEW.CREATED" | "PRODUCT.OUT_OF_STOCK")[];
|
|
10848
|
-
status: "
|
|
10568
|
+
status: "SUSPENDED" | "ACTIVE";
|
|
10849
10569
|
secretPrefix: string;
|
|
10850
10570
|
suspendedAt: string | null;
|
|
10851
10571
|
createdAt: string;
|
|
@@ -10855,7 +10575,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
|
|
|
10855
10575
|
webhookId: string;
|
|
10856
10576
|
url: string;
|
|
10857
10577
|
eventTypes: ("ORDER.PAID" | "ORDER.CONFIRMED" | "ORDER.DISPATCHED" | "ORDER.DELIVERED" | "ORDER.PURCHASE_DECIDED" | "ORDER.ADDRESS_CHANGE_REQUESTED" | "ORDER.CANCELED" | "ORDER.FULFILLED" | "CLAIM.CANCEL_REQUESTED" | "CLAIM.RETURN_REQUESTED" | "CLAIM.EXCHANGE_REQUESTED" | "CLAIM.COMPLETED" | "INQUIRY.CREATED" | "REVIEW.CREATED" | "PRODUCT.OUT_OF_STOCK")[];
|
|
10858
|
-
status: "
|
|
10578
|
+
status: "SUSPENDED" | "ACTIVE";
|
|
10859
10579
|
secretPrefix: string;
|
|
10860
10580
|
suspendedAt: string | null;
|
|
10861
10581
|
createdAt: string;
|
|
@@ -10865,7 +10585,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
|
|
|
10865
10585
|
webhookId: string;
|
|
10866
10586
|
url: string;
|
|
10867
10587
|
eventTypes: ("ORDER.PAID" | "ORDER.CONFIRMED" | "ORDER.DISPATCHED" | "ORDER.DELIVERED" | "ORDER.PURCHASE_DECIDED" | "ORDER.ADDRESS_CHANGE_REQUESTED" | "ORDER.CANCELED" | "ORDER.FULFILLED" | "CLAIM.CANCEL_REQUESTED" | "CLAIM.RETURN_REQUESTED" | "CLAIM.EXCHANGE_REQUESTED" | "CLAIM.COMPLETED" | "INQUIRY.CREATED" | "REVIEW.CREATED" | "PRODUCT.OUT_OF_STOCK")[];
|
|
10868
|
-
status: "
|
|
10588
|
+
status: "SUSPENDED" | "ACTIVE";
|
|
10869
10589
|
secretPrefix: string;
|
|
10870
10590
|
suspendedAt: string | null;
|
|
10871
10591
|
createdAt: string;
|
|
@@ -10880,7 +10600,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
|
|
|
10880
10600
|
webhookId: string;
|
|
10881
10601
|
url: string;
|
|
10882
10602
|
eventTypes: ("ORDER.PAID" | "ORDER.CONFIRMED" | "ORDER.DISPATCHED" | "ORDER.DELIVERED" | "ORDER.PURCHASE_DECIDED" | "ORDER.ADDRESS_CHANGE_REQUESTED" | "ORDER.CANCELED" | "ORDER.FULFILLED" | "CLAIM.CANCEL_REQUESTED" | "CLAIM.RETURN_REQUESTED" | "CLAIM.EXCHANGE_REQUESTED" | "CLAIM.COMPLETED" | "INQUIRY.CREATED" | "REVIEW.CREATED" | "PRODUCT.OUT_OF_STOCK")[];
|
|
10883
|
-
status: "
|
|
10603
|
+
status: "SUSPENDED" | "ACTIVE";
|
|
10884
10604
|
secretPrefix: string;
|
|
10885
10605
|
suspendedAt: string | null;
|
|
10886
10606
|
createdAt: string;
|
|
@@ -10994,7 +10714,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
|
|
|
10994
10714
|
payload: string;
|
|
10995
10715
|
}>;
|
|
10996
10716
|
};
|
|
10997
|
-
/** API 로그 (보관 7일,
|
|
10717
|
+
/** API 로그 (보관 7일, 상점 플랫폼 OWNER/ADMIN) */
|
|
10998
10718
|
apiLogs: {
|
|
10999
10719
|
/** 최신순 커서 페이지네이션. 다음 페이지는 응답의 `nextCursor`를 `cursor`로 넘긴다 */
|
|
11000
10720
|
list: (params?: ApiLogListOptions) => Promise<{
|
|
@@ -11026,7 +10746,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
|
|
|
11026
10746
|
serverErrors: number;
|
|
11027
10747
|
}>;
|
|
11028
10748
|
};
|
|
11029
|
-
/** 감사 로그 (관리 API 쓰기의 행위자·대상·결과,
|
|
10749
|
+
/** 감사 로그 (관리 API 쓰기의 행위자·대상·결과, 상점 플랫폼 OWNER/ADMIN, `audit:r`) */
|
|
11030
10750
|
auditLogs: {
|
|
11031
10751
|
/** 최신순 커서 페이지네이션. 다음 페이지는 응답의 `nextCursor`를 `cursor`로 넘긴다 */
|
|
11032
10752
|
list: (params?: AuditLogListOptions) => Promise<{
|
|
@@ -11060,7 +10780,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
|
|
|
11060
10780
|
}>;
|
|
11061
10781
|
};
|
|
11062
10782
|
/**
|
|
11063
|
-
* 승인 요청 — 에이전트의 고위험 쓰기가 202로 보류된 건. 목록·승인·거절은
|
|
10783
|
+
* 승인 요청 — 에이전트의 고위험 쓰기가 202로 보류된 건. 목록·승인·거절은 상점 플랫폼 OWNER/ADMIN,
|
|
11064
10784
|
* 단건 조회는 요청한 토큰도 할 수 있다(상태 확인용).
|
|
11065
10785
|
*/
|
|
11066
10786
|
approvalRequests: {
|
|
@@ -11344,6 +11064,9 @@ export declare function createStoreClient(options: StoreClientOptions): {
|
|
|
11344
11064
|
thumbnailUrl: string | null;
|
|
11345
11065
|
version: string;
|
|
11346
11066
|
isDefault: boolean;
|
|
11067
|
+
tags: string[];
|
|
11068
|
+
supportsCheckout: boolean;
|
|
11069
|
+
previewUrl: string | null;
|
|
11347
11070
|
}[]>;
|
|
11348
11071
|
/** `GET /v1/storefront/site` — 스위치 상태와 현재 사이트(없으면 `site: null`) */
|
|
11349
11072
|
get: () => Promise<{
|
|
@@ -11364,7 +11087,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
|
|
|
11364
11087
|
}[];
|
|
11365
11088
|
templateId: string;
|
|
11366
11089
|
sourceMode: "CUSTOM" | "MANAGED";
|
|
11367
|
-
status: "
|
|
11090
|
+
status: "SUSPENDED" | "CLOSED" | "ACTIVE";
|
|
11368
11091
|
visibility: "COMING_SOON" | "PUBLIC";
|
|
11369
11092
|
publishedVersion: {
|
|
11370
11093
|
versionId: string;
|
|
@@ -11406,7 +11129,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
|
|
|
11406
11129
|
}>;
|
|
11407
11130
|
/**
|
|
11408
11131
|
* `POST /v1/storefront/site` (201) — 템플릿으로 사이트를 만들고 v1을 발행한다. 공개 상태는 오픈 준비 중이다.
|
|
11409
|
-
* 사이트를 만드는 유일한 경로다(
|
|
11132
|
+
* 사이트를 만드는 유일한 경로다(상점을 만들어도 사이트는 생기지 않는다). 템플릿은 여기서만 고른다
|
|
11410
11133
|
*/
|
|
11411
11134
|
create: (body: CreateStorefrontSiteRequest) => Promise<{
|
|
11412
11135
|
siteId: string;
|
|
@@ -11422,7 +11145,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
|
|
|
11422
11145
|
}[];
|
|
11423
11146
|
templateId: string;
|
|
11424
11147
|
sourceMode: "CUSTOM" | "MANAGED";
|
|
11425
|
-
status: "
|
|
11148
|
+
status: "SUSPENDED" | "CLOSED" | "ACTIVE";
|
|
11426
11149
|
visibility: "COMING_SOON" | "PUBLIC";
|
|
11427
11150
|
publishedVersion: {
|
|
11428
11151
|
versionId: string;
|
|
@@ -11518,7 +11241,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
|
|
|
11518
11241
|
}[];
|
|
11519
11242
|
templateId: string;
|
|
11520
11243
|
sourceMode: "CUSTOM" | "MANAGED";
|
|
11521
|
-
status: "
|
|
11244
|
+
status: "SUSPENDED" | "CLOSED" | "ACTIVE";
|
|
11522
11245
|
visibility: "COMING_SOON" | "PUBLIC";
|
|
11523
11246
|
publishedVersion: {
|
|
11524
11247
|
versionId: string;
|
|
@@ -11582,7 +11305,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
|
|
|
11582
11305
|
}[];
|
|
11583
11306
|
templateId: string;
|
|
11584
11307
|
sourceMode: "CUSTOM" | "MANAGED";
|
|
11585
|
-
status: "
|
|
11308
|
+
status: "SUSPENDED" | "CLOSED" | "ACTIVE";
|
|
11586
11309
|
visibility: "COMING_SOON" | "PUBLIC";
|
|
11587
11310
|
publishedVersion: {
|
|
11588
11311
|
versionId: string;
|
|
@@ -11630,7 +11353,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
|
|
|
11630
11353
|
}[];
|
|
11631
11354
|
templateId: string;
|
|
11632
11355
|
sourceMode: "CUSTOM" | "MANAGED";
|
|
11633
|
-
status: "
|
|
11356
|
+
status: "SUSPENDED" | "CLOSED" | "ACTIVE";
|
|
11634
11357
|
visibility: "COMING_SOON" | "PUBLIC";
|
|
11635
11358
|
publishedVersion: {
|
|
11636
11359
|
versionId: string;
|
|
@@ -11678,7 +11401,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
|
|
|
11678
11401
|
}[];
|
|
11679
11402
|
templateId: string;
|
|
11680
11403
|
sourceMode: "CUSTOM" | "MANAGED";
|
|
11681
|
-
status: "
|
|
11404
|
+
status: "SUSPENDED" | "CLOSED" | "ACTIVE";
|
|
11682
11405
|
visibility: "COMING_SOON" | "PUBLIC";
|
|
11683
11406
|
publishedVersion: {
|
|
11684
11407
|
versionId: string;
|
|
@@ -11726,7 +11449,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
|
|
|
11726
11449
|
}[];
|
|
11727
11450
|
templateId: string;
|
|
11728
11451
|
sourceMode: "CUSTOM" | "MANAGED";
|
|
11729
|
-
status: "
|
|
11452
|
+
status: "SUSPENDED" | "CLOSED" | "ACTIVE";
|
|
11730
11453
|
visibility: "COMING_SOON" | "PUBLIC";
|
|
11731
11454
|
publishedVersion: {
|
|
11732
11455
|
versionId: string;
|
|
@@ -11761,7 +11484,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
|
|
|
11761
11484
|
}>;
|
|
11762
11485
|
/**
|
|
11763
11486
|
* `POST /v1/storefront/site/preview-link` — 오픈 준비 중인 사이트를 구성원이 볼 수 있는 5분짜리 링크.
|
|
11764
|
-
*
|
|
11487
|
+
* 상점 플랫폼에서 로그인한 OWNER·ADMIN만 받는다
|
|
11765
11488
|
*/
|
|
11766
11489
|
createPreviewLink: (body?: CreateStorefrontPreviewLinkRequest) => Promise<{
|
|
11767
11490
|
url: string;
|
|
@@ -11877,7 +11600,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
|
|
|
11877
11600
|
}[];
|
|
11878
11601
|
templateId: string;
|
|
11879
11602
|
sourceMode: "CUSTOM" | "MANAGED";
|
|
11880
|
-
status: "
|
|
11603
|
+
status: "SUSPENDED" | "CLOSED" | "ACTIVE";
|
|
11881
11604
|
visibility: "COMING_SOON" | "PUBLIC";
|
|
11882
11605
|
publishedVersion: {
|
|
11883
11606
|
versionId: string;
|
|
@@ -11990,7 +11713,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
|
|
|
11990
11713
|
}>;
|
|
11991
11714
|
/**
|
|
11992
11715
|
* `POST /v1/storefront/site/editing/preview-link` — 편집 미리보기(dev 서버) 5분짜리 링크.
|
|
11993
|
-
*
|
|
11716
|
+
* 상점 플랫폼에서 로그인한 OWNER·ADMIN만 받는다(에이전트 불가)
|
|
11994
11717
|
*/
|
|
11995
11718
|
createEditPreviewLink: (body?: CreateStorefrontEditPreviewLinkRequest) => Promise<{
|
|
11996
11719
|
url: string;
|
|
@@ -12430,13 +12153,123 @@ export declare function createStoreClient(options: StoreClientOptions): {
|
|
|
12430
12153
|
}[];
|
|
12431
12154
|
}>;
|
|
12432
12155
|
};
|
|
12156
|
+
subscription: {
|
|
12157
|
+
/**
|
|
12158
|
+
* `GET /v1/store/subscription` — 스코프 `store:r`. 현재 요금제·상태·사용량 기간·한도·이번 기간 사용량.
|
|
12159
|
+
* 결제 수단·청구 금액은 싣지 않는다. 요금제 변경은 상점 플랫폼에서만 한다
|
|
12160
|
+
*/
|
|
12161
|
+
get: () => Promise<{
|
|
12162
|
+
plan: {
|
|
12163
|
+
code: string;
|
|
12164
|
+
name: string;
|
|
12165
|
+
};
|
|
12166
|
+
status: "ACTIVE" | "CANCELED" | "PAST_DUE" | "INCOMPLETE";
|
|
12167
|
+
interval: "MONTH" | null;
|
|
12168
|
+
cancelAtPeriodEnd: boolean;
|
|
12169
|
+
period: {
|
|
12170
|
+
start: string;
|
|
12171
|
+
end: string;
|
|
12172
|
+
};
|
|
12173
|
+
limits: {
|
|
12174
|
+
liveOrdersMonthly: number | null;
|
|
12175
|
+
seatsIncluded: number | null;
|
|
12176
|
+
aiActionsMonthly: number | null;
|
|
12177
|
+
aiReadsMonthly: number | null;
|
|
12178
|
+
customDomains: number | null;
|
|
12179
|
+
webhooks: number | null;
|
|
12180
|
+
socialProviders: number | null;
|
|
12181
|
+
emailsMonthly: number | null;
|
|
12182
|
+
storefrontRequestsMonthly: number | null;
|
|
12183
|
+
apiLogRetentionDays: number | null;
|
|
12184
|
+
auditLogRetentionDays: number | null;
|
|
12185
|
+
storefrontPreviewHoursMonthly: number | null;
|
|
12186
|
+
storefrontBuildMinutesMonthly: number | null;
|
|
12187
|
+
adminApiRequestsMonthly: number | null;
|
|
12188
|
+
};
|
|
12189
|
+
features: {
|
|
12190
|
+
adminApi: boolean;
|
|
12191
|
+
analytics: boolean;
|
|
12192
|
+
storeClone: boolean;
|
|
12193
|
+
removeBadge: boolean;
|
|
12194
|
+
};
|
|
12195
|
+
usage: {
|
|
12196
|
+
liveOrders: number;
|
|
12197
|
+
aiActions: number;
|
|
12198
|
+
aiReads: number;
|
|
12199
|
+
storefrontRequests: number;
|
|
12200
|
+
adminApiRequests: number;
|
|
12201
|
+
emails: number;
|
|
12202
|
+
storefrontPreviewMinutes: number;
|
|
12203
|
+
storefrontBuildMinutes: number;
|
|
12204
|
+
seats: number;
|
|
12205
|
+
customDomains: number;
|
|
12206
|
+
webhooks: number;
|
|
12207
|
+
};
|
|
12208
|
+
aiActions: {
|
|
12209
|
+
limit: number | null;
|
|
12210
|
+
used: number;
|
|
12211
|
+
resetsAt: string;
|
|
12212
|
+
};
|
|
12213
|
+
aiReads: {
|
|
12214
|
+
limit: number | null;
|
|
12215
|
+
used: number;
|
|
12216
|
+
resetsAt: string;
|
|
12217
|
+
};
|
|
12218
|
+
salesFeePercent: 0;
|
|
12219
|
+
}>;
|
|
12220
|
+
};
|
|
12221
|
+
plans: {
|
|
12222
|
+
/**
|
|
12223
|
+
* `GET /v1/public/plans` — 인증 없음. 공개 요금제의 지금 버전(가격·기능 키 값). 값은 서버가 관리하고 언제든 바뀔 수 있어
|
|
12224
|
+
* 코드에 요금제 수치를 두지 말고 이 값을 읽는다
|
|
12225
|
+
*/
|
|
12226
|
+
listPublic: () => Promise<{
|
|
12227
|
+
vatPercent: number;
|
|
12228
|
+
plans: {
|
|
12229
|
+
code: string;
|
|
12230
|
+
name: string;
|
|
12231
|
+
version: number;
|
|
12232
|
+
sort: number;
|
|
12233
|
+
purchasable: boolean;
|
|
12234
|
+
prices: {
|
|
12235
|
+
currency: "KRW";
|
|
12236
|
+
monthly: number | null;
|
|
12237
|
+
startingAt: boolean;
|
|
12238
|
+
vatIncluded: {
|
|
12239
|
+
monthly: number | null;
|
|
12240
|
+
};
|
|
12241
|
+
};
|
|
12242
|
+
entitlements: {
|
|
12243
|
+
"features.admin_api": boolean;
|
|
12244
|
+
"features.analytics": boolean;
|
|
12245
|
+
"limits.ai_reads_monthly": number | null;
|
|
12246
|
+
"limits.ai_actions_monthly": number | null;
|
|
12247
|
+
"limits.custom_domains": number | null;
|
|
12248
|
+
"limits.webhooks": number | null;
|
|
12249
|
+
"limits.storefront_preview_hours_monthly": number | null;
|
|
12250
|
+
"limits.storefront_build_minutes_monthly": number | null;
|
|
12251
|
+
"limits.storefront_requests_monthly": number | null;
|
|
12252
|
+
"limits.admin_api_requests_monthly": number | null;
|
|
12253
|
+
"rate_limit.admin_api": number | null;
|
|
12254
|
+
"storefront.cpu_ms": number;
|
|
12255
|
+
"storefront.subrequests": number;
|
|
12256
|
+
"storefront.rate_limit_per_minute": number;
|
|
12257
|
+
"seats.included": number | null;
|
|
12258
|
+
"retention.analytics_days": number;
|
|
12259
|
+
"retention.api_logs_days": number | null;
|
|
12260
|
+
"retention.audit_days": number | null;
|
|
12261
|
+
"support.tier": string;
|
|
12262
|
+
};
|
|
12263
|
+
}[];
|
|
12264
|
+
}>;
|
|
12265
|
+
};
|
|
12433
12266
|
store: {
|
|
12434
12267
|
get: () => Promise<{
|
|
12435
12268
|
storeId: string;
|
|
12436
12269
|
name: string;
|
|
12437
12270
|
storeCode: string;
|
|
12438
12271
|
storefrontUrl: string;
|
|
12439
|
-
status: "
|
|
12272
|
+
status: "SUSPENDED" | "CLOSED" | "ACTIVE";
|
|
12440
12273
|
logoUrl: string | null;
|
|
12441
12274
|
businessNumber: string | null;
|
|
12442
12275
|
customerCenterPhone: string | null;
|
|
@@ -12477,7 +12310,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
|
|
|
12477
12310
|
name: string;
|
|
12478
12311
|
storeCode: string;
|
|
12479
12312
|
storefrontUrl: string;
|
|
12480
|
-
status: "
|
|
12313
|
+
status: "SUSPENDED" | "CLOSED" | "ACTIVE";
|
|
12481
12314
|
logoUrl: string | null;
|
|
12482
12315
|
businessNumber: string | null;
|
|
12483
12316
|
customerCenterPhone: string | null;
|
|
@@ -12542,7 +12375,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
|
|
|
12542
12375
|
}[]>;
|
|
12543
12376
|
/**
|
|
12544
12377
|
* `POST /v1/store/invitations` (201) — 스코프 `member:rw`. 초대 메일을 보낸다. 발송 결과는 응답의
|
|
12545
|
-
* `deliveryStatus`다(발송이 실패해도 초대는 만들어진다).
|
|
12378
|
+
* `deliveryStatus`다(발송이 실패해도 초대는 만들어진다). 상점·초대한 사람·받는 주소별 발송 한도가 있다(429, `details.limit`).
|
|
12546
12379
|
*/
|
|
12547
12380
|
invite: (body: InviteMemberRequest) => Promise<{
|
|
12548
12381
|
invitationId: string;
|
|
@@ -12582,9 +12415,10 @@ type StoreClient = ReturnType<typeof createStoreClient>;
|
|
|
12582
12415
|
//#region src/oauth.d.ts
|
|
12583
12416
|
/**
|
|
12584
12417
|
* OAuth 2.1 브라우저 플로우 헬퍼 (authorization_code + PKCE).
|
|
12418
|
+
* 발급자는 Sayren 계정(accounts)이다 — 엔드포인트 주소는 호출부가 준다.
|
|
12585
12419
|
* Web Crypto만 사용 — 브라우저/Node 모두에서 동작하며 **시크릿을 다루지 않는다**.
|
|
12586
12420
|
*/
|
|
12587
|
-
/** RFC 6749 §5.1 토큰 응답
|
|
12421
|
+
/** RFC 6749 §5.1 토큰 응답 */
|
|
12588
12422
|
export declare const oauthTokenResponseSchema: z.ZodObject<{
|
|
12589
12423
|
access_token: z.ZodString;
|
|
12590
12424
|
token_type: z.ZodLiteral<"Bearer">;
|
|
@@ -12599,44 +12433,59 @@ export declare function createPkcePair(): Promise<{
|
|
|
12599
12433
|
challenge: string;
|
|
12600
12434
|
}>;
|
|
12601
12435
|
interface AuthorizeUrlOptions {
|
|
12602
|
-
/** 예: https://
|
|
12603
|
-
|
|
12436
|
+
/** authorize 엔드포인트 전체 주소(예: `https://accounts.sayren.app/api/auth/oauth2/authorize`) */
|
|
12437
|
+
authorizeUrl: string;
|
|
12604
12438
|
clientId: string;
|
|
12605
12439
|
redirectUri: string;
|
|
12606
12440
|
state: string;
|
|
12607
12441
|
codeChallenge: string;
|
|
12608
|
-
/** 생략 시
|
|
12442
|
+
/** 생략 시 발급자 기본. refresh가 필요하면 offline_access 포함 */
|
|
12609
12443
|
scope?: string;
|
|
12444
|
+
/** RFC 8707 리소스 지시자 — 주면 JWT access token(`aud` = 리소스)을 받는다 */
|
|
12445
|
+
resource?: string;
|
|
12446
|
+
/** OIDC `prompt` — `login`(재인증)·`create`(가입)·`consent`(동의 다시 받기) */
|
|
12447
|
+
prompt?: "login" | "create" | "consent";
|
|
12610
12448
|
}
|
|
12611
12449
|
/** authorize 엔드포인트 URL 구성 — 브라우저는 이 URL로 이동(top-level navigation) */
|
|
12612
12450
|
export declare function buildAuthorizeUrl(options: AuthorizeUrlOptions): string;
|
|
12613
|
-
/** 콜백에서 받은 code를
|
|
12451
|
+
/** 콜백에서 받은 code를 액세스 토큰으로 교환 (PKCE verifier 동반) */
|
|
12614
12452
|
export declare function exchangeAuthorizationCode(options: {
|
|
12615
|
-
|
|
12453
|
+
/** 토큰 엔드포인트 전체 주소 */
|
|
12454
|
+
tokenUrl: string;
|
|
12616
12455
|
clientId: string;
|
|
12617
12456
|
redirectUri: string;
|
|
12618
12457
|
code: string;
|
|
12619
12458
|
codeVerifier: string;
|
|
12459
|
+
/** RFC 8707 리소스 지시자 */
|
|
12460
|
+
resource?: string;
|
|
12620
12461
|
fetch?: typeof globalThis.fetch;
|
|
12621
12462
|
}): Promise<OAuthTokenResponse>;
|
|
12622
12463
|
/** refresh grant (rotation — 응답의 새 refresh_token으로 반드시 교체 저장할 것) */
|
|
12623
12464
|
export declare function refreshUserToken(options: {
|
|
12624
|
-
|
|
12465
|
+
/** 토큰 엔드포인트 전체 주소 */
|
|
12466
|
+
tokenUrl: string;
|
|
12625
12467
|
clientId: string;
|
|
12626
12468
|
refreshToken: string;
|
|
12469
|
+
/** RFC 8707 리소스 지시자 */
|
|
12470
|
+
resource?: string;
|
|
12627
12471
|
fetch?: typeof globalThis.fetch;
|
|
12628
12472
|
}): Promise<OAuthTokenResponse>;
|
|
12629
|
-
|
|
12630
|
-
|
|
12631
|
-
|
|
12632
|
-
|
|
12633
|
-
|
|
12634
|
-
|
|
12635
|
-
|
|
12636
|
-
}
|
|
12637
|
-
|
|
12638
|
-
|
|
12639
|
-
|
|
12473
|
+
//#endregion
|
|
12474
|
+
//#region src/schemas/customer-delegation.d.ts
|
|
12475
|
+
export declare const customerDelegationRequestSchema: z.ZodObject<{
|
|
12476
|
+
uid: z.ZodOptional<z.ZodString>;
|
|
12477
|
+
email: z.ZodOptional<z.ZodEmail>;
|
|
12478
|
+
name: z.ZodOptional<z.ZodString>;
|
|
12479
|
+
authenticatedAt: z.ZodOptional<z.ZodISODateTime>;
|
|
12480
|
+
}, z.core.$strip>;
|
|
12481
|
+
export type CustomerDelegationRequest = z.infer<typeof customerDelegationRequestSchema>;
|
|
12482
|
+
export declare const customerDelegationSchema: z.ZodObject<{
|
|
12483
|
+
accessToken: z.ZodString;
|
|
12484
|
+
tokenType: z.ZodLiteral<"Bearer">;
|
|
12485
|
+
expiresIn: z.ZodNumber;
|
|
12486
|
+
memberId: z.ZodString;
|
|
12487
|
+
}, z.core.$strip>;
|
|
12488
|
+
export type CustomerDelegation = z.infer<typeof customerDelegationSchema>;
|
|
12640
12489
|
//#endregion
|
|
12641
12490
|
//#region src/schemas/promotion.d.ts
|
|
12642
12491
|
/** 쿠폰 종류 */
|
|
@@ -12779,7 +12628,7 @@ export interface PricingInput {
|
|
|
12779
12628
|
coupons: readonly PricingCoupon[];
|
|
12780
12629
|
/** 배송비 견적. 없으면 배송비 0으로 계산하고 배송비 쿠폰은 할인할 금액이 없다 */
|
|
12781
12630
|
delivery?: PricingDelivery | null;
|
|
12782
|
-
/** 이
|
|
12631
|
+
/** 이 상점에서 결제 완료 주문이 없는 회원인가 */
|
|
12783
12632
|
firstOrder: boolean;
|
|
12784
12633
|
/** 회원 주문인가 */
|
|
12785
12634
|
isMember: boolean;
|
|
@@ -12901,7 +12750,7 @@ export interface CouponSettlementInput {
|
|
|
12901
12750
|
coupons: readonly AppliedCouponSnapshot[];
|
|
12902
12751
|
lines: readonly CouponSettlementLine[];
|
|
12903
12752
|
settlements: Readonly<Record<string, Partial<CouponSettlementState> | undefined>>;
|
|
12904
|
-
/**
|
|
12753
|
+
/** 상점 환불 정책 `couponShortfallCharge` */
|
|
12905
12754
|
shortfallCharge: boolean;
|
|
12906
12755
|
/** 판매자 귀책(직권취소, 불량·오배송 반품) — 미달분을 청구하지 않는다 */
|
|
12907
12756
|
sellerFault: boolean;
|
|
@@ -12967,7 +12816,7 @@ export declare function proratedPaidRefundBase(item: {
|
|
|
12967
12816
|
}, settledQuantity: number, cancelQuantity: number): number;
|
|
12968
12817
|
//#endregion
|
|
12969
12818
|
//#region src/schemas/refund-policy.d.ts
|
|
12970
|
-
/** 유효 환불 정책 —
|
|
12819
|
+
/** 유효 환불 정책 — 상점 기본 + 상품별 덮어쓰기를 합친 결과 */
|
|
12971
12820
|
export declare const refundPolicySchema: z.ZodObject<{
|
|
12972
12821
|
preShipmentDeliveryFeeRefund: z.ZodBoolean;
|
|
12973
12822
|
returnDeliveryFee: z.ZodNumber;
|
|
@@ -12978,14 +12827,14 @@ export declare const refundPolicySchema: z.ZodObject<{
|
|
|
12978
12827
|
}, z.core.$strip>;
|
|
12979
12828
|
export type RefundPolicy = z.infer<typeof refundPolicySchema>;
|
|
12980
12829
|
/**
|
|
12981
|
-
*
|
|
12830
|
+
* 상점이 정하지 않았을 때 서버가 쓰는 값.
|
|
12982
12831
|
*
|
|
12983
12832
|
* `as const`가 아니라 `RefundPolicy`로 타입을 좁힌다 — 리터럴 타입이면 `Partial<typeof …>`로 일부만 바꿀 때
|
|
12984
12833
|
* `true` 자리에 `false`를 넣을 수 없다.
|
|
12985
12834
|
*/
|
|
12986
12835
|
export declare const REFUND_POLICY_DEFAULTS: RefundPolicy;
|
|
12987
12836
|
/**
|
|
12988
|
-
* 부분 정책 —
|
|
12837
|
+
* 부분 정책 — 상점 설정 요청과 상품별 덮어쓰기가 쓴다. 준 항목만 바뀐다.
|
|
12989
12838
|
*
|
|
12990
12839
|
* `strictObject`라 모르는 키는 400이다. 오타(`returnFee` 등)를 조용히 무시하면 셀러는 저장됐다고
|
|
12991
12840
|
* 믿는데 정책은 기본값으로 남는다.
|
|
@@ -13001,7 +12850,7 @@ export declare const refundPolicyPatchSchema: z.ZodObject<{
|
|
|
13001
12850
|
export type RefundPolicyPatch = z.infer<typeof refundPolicyPatchSchema>;
|
|
13002
12851
|
/**
|
|
13003
12852
|
* 상품별 덮어쓰기 — 쿠폰 조건 미달 차감(`couponShortfallCharge`)은 주문 단위 규칙이라 상품이 정하지 않는다.
|
|
13004
|
-
*
|
|
12853
|
+
* 상점 정책만 읽는다(이슈 #47).
|
|
13005
12854
|
*/
|
|
13006
12855
|
export declare const productRefundPolicyPatchSchema: z.ZodObject<{
|
|
13007
12856
|
preShipmentDeliveryFeeRefund: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -13012,11 +12861,11 @@ export declare const productRefundPolicyPatchSchema: z.ZodObject<{
|
|
|
13012
12861
|
}, z.core.$strict>;
|
|
13013
12862
|
/** 정책 해석에 쓰는 상품 값 — 상품별 덮어쓰기 */
|
|
13014
12863
|
export interface RefundPolicyProductInput {
|
|
13015
|
-
/** 상품별 덮어쓰기. 없으면
|
|
12864
|
+
/** 상품별 덮어쓰기. 없으면 상점 기본을 그대로 쓴다 */
|
|
13016
12865
|
refundPolicy?: RefundPolicyPatch | null;
|
|
13017
12866
|
}
|
|
13018
12867
|
/**
|
|
13019
|
-
* 유효 정책 해석 — 상품별 덮어쓰기 →
|
|
12868
|
+
* 유효 정책 해석 — 상품별 덮어쓰기 → 상점 기본 → `REFUND_POLICY_DEFAULTS` 순이다.
|
|
13020
12869
|
*
|
|
13021
12870
|
* 반품·교환 배송비의 원천은 정책 하나다(이슈 #57 결정 3). 상품의 레거시 반품비·교환비 필드와의 연결은 없앴고,
|
|
13022
12871
|
* 레거시 값은 마이그레이션이 상품별 정책으로 옮겼다.
|
|
@@ -13025,9 +12874,9 @@ export declare function resolveRefundPolicy(storePolicy?: RefundPolicyPatch | nu
|
|
|
13025
12874
|
/**
|
|
13026
12875
|
* 상품의 **덮어쓰기 자체** — 덮어쓰기가 없으면 null.
|
|
13027
12876
|
*
|
|
13028
|
-
* `resolveRefundPolicy`가 합친 결과로는 "상품이 정한 값"과 "
|
|
13029
|
-
* 관리 API 응답의 `refundPolicy`와
|
|
13030
|
-
*
|
|
12877
|
+
* `resolveRefundPolicy`가 합친 결과로는 "상품이 정한 값"과 "상점 기본을 물려받은 값"을 가를 수 없다.
|
|
12878
|
+
* 관리 API 응답의 `refundPolicy`와 상점 플랫폼 폼의 덮어쓰기 스위치가 이 함수를 원천으로 쓴다 — 가르지 못하면
|
|
12879
|
+
* 상점 기본을 쓰는 상품을 저장할 때 그 순간의 기본값이 상품에 박힌다.
|
|
13031
12880
|
*/
|
|
13032
12881
|
export declare function productRefundPolicyOverride(product?: RefundPolicyProductInput | null): RefundPolicyPatch | null;
|
|
13033
12882
|
/** 반품·교환 배송비 키 — 배송이 없는 상품의 정책에는 두지 않는다 */
|
|
@@ -13049,10 +12898,10 @@ export declare function proratedRefundBase(totalPrice: number, quantity: number,
|
|
|
13049
12898
|
//#endregion
|
|
13050
12899
|
//#region src/schemas/scope.d.ts
|
|
13051
12900
|
/**
|
|
13052
|
-
*
|
|
12901
|
+
* 상점 스코프 카탈로그 (auth-spec §7) — 형식 `{리소스}:{r|rw}`, rw는 r을 함의한다.
|
|
13053
12902
|
*
|
|
13054
12903
|
* 관리 API가 요구하는 스코프와 역할별 자동 부여 스코프의 **단일 원천**이다.
|
|
13055
|
-
* 서버(apps/api)가 이 상수를 그대로 가져다 역할→스코프를 산출하므로,
|
|
12904
|
+
* 서버(apps/api)가 이 상수를 그대로 가져다 역할→스코프를 산출하므로, 상점 플랫폼 권한 매트릭스와
|
|
13056
12905
|
* 서버 인가가 갈라지지 않는다.
|
|
13057
12906
|
*/
|
|
13058
12907
|
export declare const scopeAccessSchema: z.ZodEnum<{
|
|
@@ -13081,13 +12930,13 @@ export declare const STORE_SCOPE_RESOURCES: {
|
|
|
13081
12930
|
export type StoreScopeResource = keyof typeof STORE_SCOPE_RESOURCES;
|
|
13082
12931
|
export declare const storeScopeResourceSchema: z.ZodEnum<{
|
|
13083
12932
|
category: "category";
|
|
12933
|
+
analytics: "analytics";
|
|
13084
12934
|
product: "product";
|
|
13085
12935
|
order: "order";
|
|
13086
12936
|
claim: "claim";
|
|
13087
12937
|
inquiry: "inquiry";
|
|
13088
12938
|
review: "review";
|
|
13089
12939
|
settlement: "settlement";
|
|
13090
|
-
analytics: "analytics";
|
|
13091
12940
|
webhook: "webhook";
|
|
13092
12941
|
store: "store";
|
|
13093
12942
|
member: "member";
|
|
@@ -13100,8 +12949,7 @@ export declare const storeScopeResourceSchema: z.ZodEnum<{
|
|
|
13100
12949
|
export declare function isStoreScope(scope: string): boolean;
|
|
13101
12950
|
/**
|
|
13102
12951
|
* 역할별 자동 부여 스코프 (auth-spec §7).
|
|
13103
|
-
*
|
|
13104
|
-
* 발급 시 지정한 스코프만 갖는다(발급자 보유 스코프 이내).
|
|
12952
|
+
* 계정 토큰으로 상점을 호출할 때의 스코프는 그 상점에서의 역할로 이 표에서 결정된다.
|
|
13105
12953
|
*/
|
|
13106
12954
|
export declare const STORE_ROLE_SCOPES: {
|
|
13107
12955
|
readonly OWNER: readonly ["product:rw", "category:rw", "order:rw", "claim:rw", "inquiry:rw", "review:rw", "settlement:r", "analytics:r", "webhook:rw", "store:rw", "member:rw", "customer:rw", "audit:r", "promotion:rw", "storefront:rw"];
|
|
@@ -13110,7 +12958,7 @@ export declare const STORE_ROLE_SCOPES: {
|
|
|
13110
12958
|
};
|
|
13111
12959
|
//#endregion
|
|
13112
12960
|
//#region src/schemas/shipping-policy.d.ts
|
|
13113
|
-
/** 유효 배송비 정책 —
|
|
12961
|
+
/** 유효 배송비 정책 — 상점이 정하지 않은 항목은 `SHIPPING_POLICY_DEFAULTS`로 채운 값이다 */
|
|
13114
12962
|
export declare const shippingPolicySchema: z.ZodObject<{
|
|
13115
12963
|
baseDeliveryFee: z.ZodNumber;
|
|
13116
12964
|
freeThreshold: z.ZodNullable<z.ZodNumber>;
|
|
@@ -13119,7 +12967,7 @@ export declare const shippingPolicySchema: z.ZodObject<{
|
|
|
13119
12967
|
}, z.core.$strip>;
|
|
13120
12968
|
export type ShippingPolicy = z.infer<typeof shippingPolicySchema>;
|
|
13121
12969
|
/**
|
|
13122
|
-
*
|
|
12970
|
+
* 상점이 정하지 않았을 때 서버가 쓰는 값.
|
|
13123
12971
|
*
|
|
13124
12972
|
* `as const`가 아니라 `ShippingPolicy`로 좁힌다 — 리터럴 타입이면 `Partial<typeof …>`로 일부만 바꿀 때
|
|
13125
12973
|
* `null` 자리에 숫자를 넣을 수 없다(`REFUND_POLICY_DEFAULTS`와 같은 이유).
|
|
@@ -13138,7 +12986,7 @@ export declare const shippingPolicyPatchSchema: z.ZodObject<{
|
|
|
13138
12986
|
isolatedSurcharge: z.ZodOptional<z.ZodNumber>;
|
|
13139
12987
|
}, z.core.$strict>;
|
|
13140
12988
|
export type ShippingPolicyPatch = z.infer<typeof shippingPolicyPatchSchema>;
|
|
13141
|
-
/** 유효 정책 해석 —
|
|
12989
|
+
/** 유효 정책 해석 — 상점이 정한 항목 + `SHIPPING_POLICY_DEFAULTS` */
|
|
13142
12990
|
export declare function resolveShippingPolicy(patch?: ShippingPolicyPatch | null): ShippingPolicy;
|
|
13143
12991
|
/** 지역 구분 — 우편번호로 판정한다 */
|
|
13144
12992
|
export declare const remoteAreaSchema: z.ZodEnum<{
|
|
@@ -13148,10 +12996,10 @@ export declare const remoteAreaSchema: z.ZodEnum<{
|
|
|
13148
12996
|
}>;
|
|
13149
12997
|
export type RemoteArea = z.infer<typeof remoteAreaSchema>;
|
|
13150
12998
|
/**
|
|
13151
|
-
* 제주·도서산간 우편번호 범위 — **코드 상수다.** 금액은
|
|
12999
|
+
* 제주·도서산간 우편번호 범위 — **코드 상수다.** 금액은 상점이 정하고 범위는 플랫폼이 고정한다.
|
|
13152
13000
|
*
|
|
13153
13001
|
* 국내 택배사가 공표하는 제주·도서산간 할증 구간을 5자리 우편번호 범위로 옮긴 표다. 셀러마다
|
|
13154
|
-
* 범위가 다르면 같은 주소에 다른 금액이 나가고 CS가 셀러 수만큼 갈라진다.
|
|
13002
|
+
* 범위가 다르면 같은 주소에 다른 금액이 나가고 CS가 셀러 수만큼 갈라진다. 상점별 범위 편집은
|
|
13155
13003
|
* 후속 과제이고, 지금은 이 표가 유일한 원천이다.
|
|
13156
13004
|
*
|
|
13157
13005
|
* ## 근거
|
|
@@ -13190,7 +13038,7 @@ export type RemoteArea = z.infer<typeof remoteAreaSchema>;
|
|
|
13190
13038
|
* 도로명주소·건물관리번호 단위 판정은 후속 과제다.
|
|
13191
13039
|
*
|
|
13192
13040
|
* 범위는 **닫힌 구간**(`from` ≤ zip ≤ `to`)이고 겹치지 않는다. 앞에서부터 처음 맞는 항목을 쓴다.
|
|
13193
|
-
* 순서는
|
|
13041
|
+
* 순서는 상점 플랫폼 「추가 배송비 지역」 표의 행 순서이기도 하다(`remoteAreaGroups`). 제주를 먼저 두고
|
|
13194
13042
|
* 도서산간은 우편번호 오름차순으로 둔다.
|
|
13195
13043
|
*/
|
|
13196
13044
|
export declare const REMOTE_AREA_ZIP_RANGES: ReadonlyArray<{
|
|
@@ -13215,7 +13063,7 @@ export interface DeliveryBundleProduct {
|
|
|
13215
13063
|
deliveryType: DeliveryType;
|
|
13216
13064
|
deliveryFee: number;
|
|
13217
13065
|
conditionalFreeAmount: number | null;
|
|
13218
|
-
/** 출고지 주소 id(`seller_addresses`). null이면
|
|
13066
|
+
/** 출고지 주소 id(`seller_addresses`). null이면 상점 기본 출고지를 쓰는 상품끼리 한 묶음이다 */
|
|
13219
13067
|
shippingAddressId?: string | null;
|
|
13220
13068
|
/**
|
|
13221
13069
|
* 상품 유형 (이슈 #48). 생략·null이면 배송 상품이다. 배송이 필요 없는 유형은 묶음을 만들지 않는다.
|
|
@@ -13249,7 +13097,7 @@ export interface DeliveryFeeLine {
|
|
|
13249
13097
|
* 기본 배송비를 면제한 근거 — 면제하지 않았으면 null이다.
|
|
13250
13098
|
*
|
|
13251
13099
|
* 환불 정산이 근거를 구분해야 한다. 조건부 무료 기준 미달 차감은 **상품별 조건부 무료(`CONDITIONAL`)로
|
|
13252
|
-
* 면제된 묶음만** 대상이다.
|
|
13100
|
+
* 면제된 묶음만** 대상이다. 상점 전체 무료 기준(`STORE_THRESHOLD`)이나 무료배송 상품(`FREE`)은 셀러가
|
|
13253
13101
|
* 배송비를 받지 않기로 한 것이므로, 일부 취소로 기준이 깨져도 구매자에게 배송비를 물리지 않는다.
|
|
13254
13102
|
*
|
|
13255
13103
|
* 세 값이 겹치면 `FREE` → `STORE_THRESHOLD` → `CONDITIONAL` 순으로 센 근거를 남긴다.
|
|
@@ -13263,7 +13111,7 @@ export type DeliveryFeeWaiver = z.infer<typeof deliveryFeeWaiverSchema>;
|
|
|
13263
13111
|
/** 묶음 하나의 견적 */
|
|
13264
13112
|
export interface DeliveryBundleQuote {
|
|
13265
13113
|
bundleKey: string;
|
|
13266
|
-
/** 이 묶음에 든 상품 id — 스냅샷 검증과
|
|
13114
|
+
/** 이 묶음에 든 상품 id — 스냅샷 검증과 상점 플랫폼 안내에 쓴다 */
|
|
13267
13115
|
productIds: string[];
|
|
13268
13116
|
/** 실제 청구한 기본 배송비 — 무료배송·무료 기준 충족이면 0 */
|
|
13269
13117
|
fee: number;
|
|
@@ -13286,10 +13134,10 @@ export interface DeliveryQuote {
|
|
|
13286
13134
|
/** 청구할 배송비 총액 = `baseFee` + `remoteSurcharge` */
|
|
13287
13135
|
deliveryFee: number;
|
|
13288
13136
|
remoteArea: RemoteArea;
|
|
13289
|
-
/**
|
|
13137
|
+
/** 상점 전체 무료 기준(`freeThreshold`) 충족으로 기본 배송비를 면제했는가 */
|
|
13290
13138
|
freeByThreshold: boolean;
|
|
13291
13139
|
/**
|
|
13292
|
-
* 배송이 필요한 줄의 상품 금액 합 —
|
|
13140
|
+
* 배송이 필요한 줄의 상품 금액 합 — 상점 전체 무료 기준의 판정 금액이다(이슈 #48). 비실물 줄은 빠진다.
|
|
13293
13141
|
* 주문 상품 금액 합(`productAmount`)과 다를 수 있다.
|
|
13294
13142
|
*/
|
|
13295
13143
|
shippableAmount: number;
|
|
@@ -13308,12 +13156,318 @@ export interface DeliveryQuoteInput {
|
|
|
13308
13156
|
* 배송비 계산 — **순수 함수다.** 장바구니 요약, 주문서 금액, 결제 시작의 최종 확정,
|
|
13309
13157
|
* 주문 배송비 스냅샷이 모두 이 한 곳을 쓴다.
|
|
13310
13158
|
*
|
|
13311
|
-
* 순서가 규칙이다. 묶음별 조건부 무료를 먼저 보고, 그다음
|
|
13159
|
+
* 순서가 규칙이다. 묶음별 조건부 무료를 먼저 보고, 그다음 상점 전체 무료 기준으로 기본 배송비를
|
|
13312
13160
|
* 한꺼번에 0으로 만들고, 마지막에 지역 추가 배송비를 묶음마다 더한다. 추가 배송비는 무료 기준에
|
|
13313
13161
|
* 걸리지 않는다.
|
|
13314
13162
|
*/
|
|
13315
13163
|
export declare function quoteDelivery(input: DeliveryQuoteInput): DeliveryQuote;
|
|
13316
13164
|
//#endregion
|
|
13165
|
+
//#region src/schemas/subscription.d.ts
|
|
13166
|
+
/**
|
|
13167
|
+
* 요금제·구독 — `GET /v1/store/subscription`(스코프 `store:r`). 구독 단위는 상점이다.
|
|
13168
|
+
* 결제 수단·청구 금액은 싣지 않는다. 요금제 변경은 상점 플랫폼에서만 한다.
|
|
13169
|
+
*/
|
|
13170
|
+
/** 요금제 코드 — 이름(`plan.name`)이 바뀌어도 코드는 바뀌지 않는다. 값은 추가만 한다 */
|
|
13171
|
+
export declare const planCodeSchema: z.ZodEnum<{
|
|
13172
|
+
FREE: "FREE";
|
|
13173
|
+
BETA: "BETA";
|
|
13174
|
+
BASIC: "BASIC";
|
|
13175
|
+
PRO: "PRO";
|
|
13176
|
+
BUSINESS: "BUSINESS";
|
|
13177
|
+
ENTERPRISE: "ENTERPRISE";
|
|
13178
|
+
PREMIUM: "PREMIUM";
|
|
13179
|
+
}>;
|
|
13180
|
+
export type PlanCode = z.infer<typeof planCodeSchema>;
|
|
13181
|
+
/**
|
|
13182
|
+
* 응답의 요금제 코드 — 아는 코드(`PlanCode`)거나 이 SDK가 모르는 새 코드(문자열)다. 요금제 코드는 추가될 수 있어 응답 파싱을 깨지 않게
|
|
13183
|
+
* 넓게 받는다(옛 SDK는 새 코드를 모르면 파싱에 실패했다, #44 리뷰 M3). 요청에는 `planCodeSchema`를 쓴다
|
|
13184
|
+
*/
|
|
13185
|
+
export declare const responsePlanCodeSchema: z.ZodUnion<readonly [z.ZodEnum<{
|
|
13186
|
+
FREE: "FREE";
|
|
13187
|
+
BETA: "BETA";
|
|
13188
|
+
BASIC: "BASIC";
|
|
13189
|
+
PRO: "PRO";
|
|
13190
|
+
BUSINESS: "BUSINESS";
|
|
13191
|
+
ENTERPRISE: "ENTERPRISE";
|
|
13192
|
+
PREMIUM: "PREMIUM";
|
|
13193
|
+
}>, z.ZodString]>;
|
|
13194
|
+
export type ResponsePlanCode = PlanCode | (string & {});
|
|
13195
|
+
export declare const subscriptionStatusSchema: z.ZodEnum<{
|
|
13196
|
+
ACTIVE: "ACTIVE";
|
|
13197
|
+
CANCELED: "CANCELED";
|
|
13198
|
+
PAST_DUE: "PAST_DUE";
|
|
13199
|
+
INCOMPLETE: "INCOMPLETE";
|
|
13200
|
+
}>;
|
|
13201
|
+
export type SubscriptionStatus = z.infer<typeof subscriptionStatusSchema>;
|
|
13202
|
+
export declare const subscriptionLimitsSchema: z.ZodObject<{
|
|
13203
|
+
liveOrdersMonthly: z.ZodNullable<z.ZodNumber>;
|
|
13204
|
+
seatsIncluded: z.ZodNullable<z.ZodNumber>;
|
|
13205
|
+
aiActionsMonthly: z.ZodNullable<z.ZodNumber>;
|
|
13206
|
+
aiReadsMonthly: z.ZodNullable<z.ZodNumber>;
|
|
13207
|
+
customDomains: z.ZodNullable<z.ZodNumber>;
|
|
13208
|
+
webhooks: z.ZodNullable<z.ZodNumber>;
|
|
13209
|
+
socialProviders: z.ZodNullable<z.ZodNumber>;
|
|
13210
|
+
emailsMonthly: z.ZodNullable<z.ZodNumber>;
|
|
13211
|
+
storefrontRequestsMonthly: z.ZodNullable<z.ZodNumber>;
|
|
13212
|
+
apiLogRetentionDays: z.ZodNullable<z.ZodNumber>;
|
|
13213
|
+
auditLogRetentionDays: z.ZodNullable<z.ZodNumber>;
|
|
13214
|
+
storefrontPreviewHoursMonthly: z.ZodNullable<z.ZodNumber>;
|
|
13215
|
+
storefrontBuildMinutesMonthly: z.ZodNullable<z.ZodNumber>;
|
|
13216
|
+
adminApiRequestsMonthly: z.ZodNullable<z.ZodNumber>;
|
|
13217
|
+
}, z.core.$strip>;
|
|
13218
|
+
export type SubscriptionLimits = z.infer<typeof subscriptionLimitsSchema>;
|
|
13219
|
+
export declare const subscriptionUsageSchema: z.ZodObject<{
|
|
13220
|
+
liveOrders: z.ZodNumber;
|
|
13221
|
+
aiActions: z.ZodNumber;
|
|
13222
|
+
aiReads: z.ZodNumber;
|
|
13223
|
+
storefrontRequests: z.ZodNumber;
|
|
13224
|
+
adminApiRequests: z.ZodNumber;
|
|
13225
|
+
emails: z.ZodNumber;
|
|
13226
|
+
storefrontPreviewMinutes: z.ZodNumber;
|
|
13227
|
+
storefrontBuildMinutes: z.ZodNumber;
|
|
13228
|
+
seats: z.ZodNumber;
|
|
13229
|
+
customDomains: z.ZodNumber;
|
|
13230
|
+
webhooks: z.ZodNumber;
|
|
13231
|
+
}, z.core.$strip>;
|
|
13232
|
+
export type SubscriptionUsage = z.infer<typeof subscriptionUsageSchema>;
|
|
13233
|
+
export declare const storeSubscriptionSchema: z.ZodObject<{
|
|
13234
|
+
plan: z.ZodObject<{
|
|
13235
|
+
code: z.ZodUnion<readonly [z.ZodEnum<{
|
|
13236
|
+
FREE: "FREE";
|
|
13237
|
+
BETA: "BETA";
|
|
13238
|
+
BASIC: "BASIC";
|
|
13239
|
+
PRO: "PRO";
|
|
13240
|
+
BUSINESS: "BUSINESS";
|
|
13241
|
+
ENTERPRISE: "ENTERPRISE";
|
|
13242
|
+
PREMIUM: "PREMIUM";
|
|
13243
|
+
}>, z.ZodString]>;
|
|
13244
|
+
name: z.ZodString;
|
|
13245
|
+
}, z.core.$strip>;
|
|
13246
|
+
status: z.ZodEnum<{
|
|
13247
|
+
ACTIVE: "ACTIVE";
|
|
13248
|
+
CANCELED: "CANCELED";
|
|
13249
|
+
PAST_DUE: "PAST_DUE";
|
|
13250
|
+
INCOMPLETE: "INCOMPLETE";
|
|
13251
|
+
}>;
|
|
13252
|
+
interval: z.ZodNullable<z.ZodEnum<{
|
|
13253
|
+
MONTH: "MONTH";
|
|
13254
|
+
}>>;
|
|
13255
|
+
cancelAtPeriodEnd: z.ZodBoolean;
|
|
13256
|
+
period: z.ZodObject<{
|
|
13257
|
+
start: z.ZodString;
|
|
13258
|
+
end: z.ZodString;
|
|
13259
|
+
}, z.core.$strip>;
|
|
13260
|
+
limits: z.ZodObject<{
|
|
13261
|
+
liveOrdersMonthly: z.ZodNullable<z.ZodNumber>;
|
|
13262
|
+
seatsIncluded: z.ZodNullable<z.ZodNumber>;
|
|
13263
|
+
aiActionsMonthly: z.ZodNullable<z.ZodNumber>;
|
|
13264
|
+
aiReadsMonthly: z.ZodNullable<z.ZodNumber>;
|
|
13265
|
+
customDomains: z.ZodNullable<z.ZodNumber>;
|
|
13266
|
+
webhooks: z.ZodNullable<z.ZodNumber>;
|
|
13267
|
+
socialProviders: z.ZodNullable<z.ZodNumber>;
|
|
13268
|
+
emailsMonthly: z.ZodNullable<z.ZodNumber>;
|
|
13269
|
+
storefrontRequestsMonthly: z.ZodNullable<z.ZodNumber>;
|
|
13270
|
+
apiLogRetentionDays: z.ZodNullable<z.ZodNumber>;
|
|
13271
|
+
auditLogRetentionDays: z.ZodNullable<z.ZodNumber>;
|
|
13272
|
+
storefrontPreviewHoursMonthly: z.ZodNullable<z.ZodNumber>;
|
|
13273
|
+
storefrontBuildMinutesMonthly: z.ZodNullable<z.ZodNumber>;
|
|
13274
|
+
adminApiRequestsMonthly: z.ZodNullable<z.ZodNumber>;
|
|
13275
|
+
}, z.core.$strip>;
|
|
13276
|
+
features: z.ZodObject<{
|
|
13277
|
+
adminApi: z.ZodBoolean;
|
|
13278
|
+
analytics: z.ZodBoolean;
|
|
13279
|
+
storeClone: z.ZodBoolean;
|
|
13280
|
+
removeBadge: z.ZodBoolean;
|
|
13281
|
+
}, z.core.$strip>;
|
|
13282
|
+
usage: z.ZodObject<{
|
|
13283
|
+
liveOrders: z.ZodNumber;
|
|
13284
|
+
aiActions: z.ZodNumber;
|
|
13285
|
+
aiReads: z.ZodNumber;
|
|
13286
|
+
storefrontRequests: z.ZodNumber;
|
|
13287
|
+
adminApiRequests: z.ZodNumber;
|
|
13288
|
+
emails: z.ZodNumber;
|
|
13289
|
+
storefrontPreviewMinutes: z.ZodNumber;
|
|
13290
|
+
storefrontBuildMinutes: z.ZodNumber;
|
|
13291
|
+
seats: z.ZodNumber;
|
|
13292
|
+
customDomains: z.ZodNumber;
|
|
13293
|
+
webhooks: z.ZodNumber;
|
|
13294
|
+
}, z.core.$strip>;
|
|
13295
|
+
aiActions: z.ZodObject<{
|
|
13296
|
+
limit: z.ZodNullable<z.ZodNumber>;
|
|
13297
|
+
used: z.ZodNumber;
|
|
13298
|
+
resetsAt: z.ZodString;
|
|
13299
|
+
}, z.core.$strip>;
|
|
13300
|
+
aiReads: z.ZodObject<{
|
|
13301
|
+
limit: z.ZodNullable<z.ZodNumber>;
|
|
13302
|
+
used: z.ZodNumber;
|
|
13303
|
+
resetsAt: z.ZodString;
|
|
13304
|
+
}, z.core.$strip>;
|
|
13305
|
+
salesFeePercent: z.ZodLiteral<0>;
|
|
13306
|
+
}, z.core.$strip>;
|
|
13307
|
+
export type StoreSubscription = z.infer<typeof storeSubscriptionSchema>;
|
|
13308
|
+
/**
|
|
13309
|
+
* 요금제 한도 오류의 `error.details` — 기존 오류 코드(`STORE_LIMIT_EXCEEDED`·`STOREFRONT_DOMAIN_LIMIT`·`WEBHOOK_LIMIT_EXCEEDED` 등)와
|
|
13310
|
+
* 요금제 오류(`PLAN_LIMIT_EXCEEDED`·`PLAN_AI_ACTIONS_EXCEEDED`·`PLAN_AI_READS_EXCEEDED`·`PLAN_FEATURE_REQUIRED`·`PLAN_API_QUOTA_EXCEEDED`)가 같은 형식을 싣는다.
|
|
13311
|
+
* 모든 필드가 선택이다(기존 코드는 요금제 판정 전 필드만 실을 수 있다).
|
|
13312
|
+
*/
|
|
13313
|
+
export declare const planErrorDetailsSchema: z.ZodObject<{
|
|
13314
|
+
feature: z.ZodOptional<z.ZodString>;
|
|
13315
|
+
limit: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
13316
|
+
used: z.ZodOptional<z.ZodNumber>;
|
|
13317
|
+
plan: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
13318
|
+
FREE: "FREE";
|
|
13319
|
+
BETA: "BETA";
|
|
13320
|
+
BASIC: "BASIC";
|
|
13321
|
+
PRO: "PRO";
|
|
13322
|
+
BUSINESS: "BUSINESS";
|
|
13323
|
+
ENTERPRISE: "ENTERPRISE";
|
|
13324
|
+
PREMIUM: "PREMIUM";
|
|
13325
|
+
}>, z.ZodString]>>;
|
|
13326
|
+
resetsAt: z.ZodOptional<z.ZodString>;
|
|
13327
|
+
upgradeUrl: z.ZodOptional<z.ZodString>;
|
|
13328
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
13329
|
+
}, z.core.$loose>;
|
|
13330
|
+
export type PlanErrorDetails = z.infer<typeof planErrorDetailsSchema>;
|
|
13331
|
+
/**
|
|
13332
|
+
* 요금제 기능 키 값 — 요금제 비교표·상점 플랫폼 요금제 화면이 쓴다. 키는 서버 판정의 기능 키와 같다(추가만 한다). 상위 요금제는 하위 요금제
|
|
13333
|
+
* 기능을 모두 포함한다
|
|
13334
|
+
*/
|
|
13335
|
+
export declare const planEntitlementsSchema: z.ZodObject<{
|
|
13336
|
+
"features.admin_api": z.ZodBoolean;
|
|
13337
|
+
"features.analytics": z.ZodBoolean;
|
|
13338
|
+
"limits.ai_reads_monthly": z.ZodNullable<z.ZodNumber>;
|
|
13339
|
+
"limits.ai_actions_monthly": z.ZodNullable<z.ZodNumber>;
|
|
13340
|
+
"limits.custom_domains": z.ZodNullable<z.ZodNumber>;
|
|
13341
|
+
"limits.webhooks": z.ZodNullable<z.ZodNumber>;
|
|
13342
|
+
"limits.storefront_preview_hours_monthly": z.ZodNullable<z.ZodNumber>;
|
|
13343
|
+
"limits.storefront_build_minutes_monthly": z.ZodNullable<z.ZodNumber>;
|
|
13344
|
+
"limits.storefront_requests_monthly": z.ZodNullable<z.ZodNumber>;
|
|
13345
|
+
"limits.admin_api_requests_monthly": z.ZodNullable<z.ZodNumber>;
|
|
13346
|
+
"rate_limit.admin_api": z.ZodNullable<z.ZodNumber>;
|
|
13347
|
+
"storefront.cpu_ms": z.ZodNumber;
|
|
13348
|
+
"storefront.subrequests": z.ZodNumber;
|
|
13349
|
+
"storefront.rate_limit_per_minute": z.ZodNumber;
|
|
13350
|
+
"seats.included": z.ZodNullable<z.ZodNumber>;
|
|
13351
|
+
"retention.analytics_days": z.ZodNumber;
|
|
13352
|
+
"retention.api_logs_days": z.ZodNullable<z.ZodNumber>;
|
|
13353
|
+
"retention.audit_days": z.ZodNullable<z.ZodNumber>;
|
|
13354
|
+
"support.tier": z.ZodUnion<readonly [z.ZodEnum<{
|
|
13355
|
+
EMAIL: "EMAIL";
|
|
13356
|
+
COMMUNITY: "COMMUNITY";
|
|
13357
|
+
EMAIL_PRIORITY: "EMAIL_PRIORITY";
|
|
13358
|
+
DEDICATED: "DEDICATED";
|
|
13359
|
+
SLA: "SLA";
|
|
13360
|
+
}>, z.ZodString]>;
|
|
13361
|
+
}, z.core.$strip>;
|
|
13362
|
+
export type PlanEntitlementValues = z.infer<typeof planEntitlementsSchema>;
|
|
13363
|
+
/** 공개 요금제 한 줄 — `GET /v1/public/plans` */
|
|
13364
|
+
export declare const publicPlanSchema: z.ZodObject<{
|
|
13365
|
+
code: z.ZodUnion<readonly [z.ZodEnum<{
|
|
13366
|
+
FREE: "FREE";
|
|
13367
|
+
BETA: "BETA";
|
|
13368
|
+
BASIC: "BASIC";
|
|
13369
|
+
PRO: "PRO";
|
|
13370
|
+
BUSINESS: "BUSINESS";
|
|
13371
|
+
ENTERPRISE: "ENTERPRISE";
|
|
13372
|
+
PREMIUM: "PREMIUM";
|
|
13373
|
+
}>, z.ZodString]>;
|
|
13374
|
+
name: z.ZodString;
|
|
13375
|
+
version: z.ZodNumber;
|
|
13376
|
+
sort: z.ZodNumber;
|
|
13377
|
+
purchasable: z.ZodBoolean;
|
|
13378
|
+
prices: z.ZodObject<{
|
|
13379
|
+
currency: z.ZodLiteral<"KRW">;
|
|
13380
|
+
monthly: z.ZodNullable<z.ZodNumber>;
|
|
13381
|
+
startingAt: z.ZodBoolean;
|
|
13382
|
+
vatIncluded: z.ZodObject<{
|
|
13383
|
+
monthly: z.ZodNullable<z.ZodNumber>;
|
|
13384
|
+
}, z.core.$strip>;
|
|
13385
|
+
}, z.core.$strip>;
|
|
13386
|
+
entitlements: z.ZodObject<{
|
|
13387
|
+
"features.admin_api": z.ZodBoolean;
|
|
13388
|
+
"features.analytics": z.ZodBoolean;
|
|
13389
|
+
"limits.ai_reads_monthly": z.ZodNullable<z.ZodNumber>;
|
|
13390
|
+
"limits.ai_actions_monthly": z.ZodNullable<z.ZodNumber>;
|
|
13391
|
+
"limits.custom_domains": z.ZodNullable<z.ZodNumber>;
|
|
13392
|
+
"limits.webhooks": z.ZodNullable<z.ZodNumber>;
|
|
13393
|
+
"limits.storefront_preview_hours_monthly": z.ZodNullable<z.ZodNumber>;
|
|
13394
|
+
"limits.storefront_build_minutes_monthly": z.ZodNullable<z.ZodNumber>;
|
|
13395
|
+
"limits.storefront_requests_monthly": z.ZodNullable<z.ZodNumber>;
|
|
13396
|
+
"limits.admin_api_requests_monthly": z.ZodNullable<z.ZodNumber>;
|
|
13397
|
+
"rate_limit.admin_api": z.ZodNullable<z.ZodNumber>;
|
|
13398
|
+
"storefront.cpu_ms": z.ZodNumber;
|
|
13399
|
+
"storefront.subrequests": z.ZodNumber;
|
|
13400
|
+
"storefront.rate_limit_per_minute": z.ZodNumber;
|
|
13401
|
+
"seats.included": z.ZodNullable<z.ZodNumber>;
|
|
13402
|
+
"retention.analytics_days": z.ZodNumber;
|
|
13403
|
+
"retention.api_logs_days": z.ZodNullable<z.ZodNumber>;
|
|
13404
|
+
"retention.audit_days": z.ZodNullable<z.ZodNumber>;
|
|
13405
|
+
"support.tier": z.ZodUnion<readonly [z.ZodEnum<{
|
|
13406
|
+
EMAIL: "EMAIL";
|
|
13407
|
+
COMMUNITY: "COMMUNITY";
|
|
13408
|
+
EMAIL_PRIORITY: "EMAIL_PRIORITY";
|
|
13409
|
+
DEDICATED: "DEDICATED";
|
|
13410
|
+
SLA: "SLA";
|
|
13411
|
+
}>, z.ZodString]>;
|
|
13412
|
+
}, z.core.$strip>;
|
|
13413
|
+
}, z.core.$strip>;
|
|
13414
|
+
export type PublicPlan = z.infer<typeof publicPlanSchema>;
|
|
13415
|
+
/** 요금제 비교표 — `GET /v1/public/plans`(인증 없음, 캐시 가능). 값은 서버가 관리하고 언제든 바뀔 수 있다 */
|
|
13416
|
+
export declare const publicPlansSchema: z.ZodObject<{
|
|
13417
|
+
vatPercent: z.ZodNumber;
|
|
13418
|
+
plans: z.ZodArray<z.ZodObject<{
|
|
13419
|
+
code: z.ZodUnion<readonly [z.ZodEnum<{
|
|
13420
|
+
FREE: "FREE";
|
|
13421
|
+
BETA: "BETA";
|
|
13422
|
+
BASIC: "BASIC";
|
|
13423
|
+
PRO: "PRO";
|
|
13424
|
+
BUSINESS: "BUSINESS";
|
|
13425
|
+
ENTERPRISE: "ENTERPRISE";
|
|
13426
|
+
PREMIUM: "PREMIUM";
|
|
13427
|
+
}>, z.ZodString]>;
|
|
13428
|
+
name: z.ZodString;
|
|
13429
|
+
version: z.ZodNumber;
|
|
13430
|
+
sort: z.ZodNumber;
|
|
13431
|
+
purchasable: z.ZodBoolean;
|
|
13432
|
+
prices: z.ZodObject<{
|
|
13433
|
+
currency: z.ZodLiteral<"KRW">;
|
|
13434
|
+
monthly: z.ZodNullable<z.ZodNumber>;
|
|
13435
|
+
startingAt: z.ZodBoolean;
|
|
13436
|
+
vatIncluded: z.ZodObject<{
|
|
13437
|
+
monthly: z.ZodNullable<z.ZodNumber>;
|
|
13438
|
+
}, z.core.$strip>;
|
|
13439
|
+
}, z.core.$strip>;
|
|
13440
|
+
entitlements: z.ZodObject<{
|
|
13441
|
+
"features.admin_api": z.ZodBoolean;
|
|
13442
|
+
"features.analytics": z.ZodBoolean;
|
|
13443
|
+
"limits.ai_reads_monthly": z.ZodNullable<z.ZodNumber>;
|
|
13444
|
+
"limits.ai_actions_monthly": z.ZodNullable<z.ZodNumber>;
|
|
13445
|
+
"limits.custom_domains": z.ZodNullable<z.ZodNumber>;
|
|
13446
|
+
"limits.webhooks": z.ZodNullable<z.ZodNumber>;
|
|
13447
|
+
"limits.storefront_preview_hours_monthly": z.ZodNullable<z.ZodNumber>;
|
|
13448
|
+
"limits.storefront_build_minutes_monthly": z.ZodNullable<z.ZodNumber>;
|
|
13449
|
+
"limits.storefront_requests_monthly": z.ZodNullable<z.ZodNumber>;
|
|
13450
|
+
"limits.admin_api_requests_monthly": z.ZodNullable<z.ZodNumber>;
|
|
13451
|
+
"rate_limit.admin_api": z.ZodNullable<z.ZodNumber>;
|
|
13452
|
+
"storefront.cpu_ms": z.ZodNumber;
|
|
13453
|
+
"storefront.subrequests": z.ZodNumber;
|
|
13454
|
+
"storefront.rate_limit_per_minute": z.ZodNumber;
|
|
13455
|
+
"seats.included": z.ZodNullable<z.ZodNumber>;
|
|
13456
|
+
"retention.analytics_days": z.ZodNumber;
|
|
13457
|
+
"retention.api_logs_days": z.ZodNullable<z.ZodNumber>;
|
|
13458
|
+
"retention.audit_days": z.ZodNullable<z.ZodNumber>;
|
|
13459
|
+
"support.tier": z.ZodUnion<readonly [z.ZodEnum<{
|
|
13460
|
+
EMAIL: "EMAIL";
|
|
13461
|
+
COMMUNITY: "COMMUNITY";
|
|
13462
|
+
EMAIL_PRIORITY: "EMAIL_PRIORITY";
|
|
13463
|
+
DEDICATED: "DEDICATED";
|
|
13464
|
+
SLA: "SLA";
|
|
13465
|
+
}>, z.ZodString]>;
|
|
13466
|
+
}, z.core.$strip>;
|
|
13467
|
+
}, z.core.$strip>>;
|
|
13468
|
+
}, z.core.$strip>;
|
|
13469
|
+
export type PublicPlans = z.infer<typeof publicPlansSchema>;
|
|
13470
|
+
//#endregion
|
|
13317
13471
|
//#region src/schemas/telemetry.d.ts
|
|
13318
13472
|
/**
|
|
13319
13473
|
* MCP 도구 호출 계측 (`POST /v1/telemetry/mcp`, 이슈 #34).
|
|
@@ -13323,7 +13477,7 @@ export declare function quoteDelivery(input: DeliveryQuoteInput): DeliveryQuote;
|
|
|
13323
13477
|
* 세는 것이다. 그 숫자가 규칙과 안내를 고치는 근거가 된다.
|
|
13324
13478
|
*
|
|
13325
13479
|
* **보내지 않는 것**: 파일 경로·소스 코드·위반 상세(`detail`)·토큰·사람 식별자. 규칙 id와 개수뿐이다.
|
|
13326
|
-
* 테넌트는 요청 토큰이 정한다(본문에
|
|
13480
|
+
* 테넌트는 요청 토큰이 정한다(본문에 상점 id가 없다). 옵트아웃은 클라이언트의 `SAYREN_TELEMETRY=0`이다.
|
|
13327
13481
|
*
|
|
13328
13482
|
* 알 수 없는 키는 저장하지 않고 버린다(`.strict()`를 쓰지 않는다) — 새 버전 클라이언트가 필드를
|
|
13329
13483
|
* 하나 더 실었다고 계측 전체가 400으로 날아가면 그 버전의 숫자가 통째로 빈다.
|
|
@@ -13960,4 +14114,4 @@ export type WebhookEventOf<T extends WebhookEventType> = WebhookEvent extends (i
|
|
|
13960
14114
|
type: T;
|
|
13961
14115
|
} : never : never : never;
|
|
13962
14116
|
//#endregion
|
|
13963
|
-
export { type AuthorizeOptions, type OAuthTokenResponse, type Query, type SessionStorage, type StoreClient, type StoreClientOptions, type StoreSession, type StoreSessionOptions, type TokenSource, WEBHOOK_DEFAULT_TOLERANCE_SEC, WEBHOOK_DELIVERY_ID_HEADER, WEBHOOK_EVENT_ID_HEADER, WEBHOOK_EVENT_TYPE_HEADER, WEBHOOK_HEADERS, WEBHOOK_SIGNATURE_HEADER, WEBHOOK_USER_AGENT };
|
|
14117
|
+
export { type AuthorizeOptions, type OAuthTokenResponse, type Query, type SessionStorage, type StoreAuthServer, type StoreClient, type StoreClientOptions, type StoreSession, type StoreSessionOptions, type TokenSource, WEBHOOK_DEFAULT_TOLERANCE_SEC, WEBHOOK_DELIVERY_ID_HEADER, WEBHOOK_EVENT_ID_HEADER, WEBHOOK_EVENT_TYPE_HEADER, WEBHOOK_HEADERS, WEBHOOK_SIGNATURE_HEADER, WEBHOOK_USER_AGENT };
|