@sayren/store-sdk 0.29.8 → 0.30.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +24 -45
- package/dist/index.mjs +13 -25
- package/package.json +1 -1
- package/src/client.ts +0 -23
- package/src/schemas/category.ts +14 -0
- package/src/schemas/commerce-flow.ts +3 -32
- package/src/schemas/product.ts +21 -0
package/dist/index.d.mts
CHANGED
|
@@ -995,6 +995,7 @@ export declare const categorySchema: z.ZodObject<{
|
|
|
995
995
|
metaTitle: z.ZodNullable<z.ZodString>;
|
|
996
996
|
metaDescription: z.ZodNullable<z.ZodString>;
|
|
997
997
|
metaKeywords: z.ZodNullable<z.ZodString>;
|
|
998
|
+
flowId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
998
999
|
createdAt: z.ZodString;
|
|
999
1000
|
updatedAt: z.ZodString;
|
|
1000
1001
|
}, z.core.$strip>;
|
|
@@ -1025,6 +1026,7 @@ export declare const categoryWithPathSchema: z.ZodObject<{
|
|
|
1025
1026
|
metaTitle: z.ZodNullable<z.ZodString>;
|
|
1026
1027
|
metaDescription: z.ZodNullable<z.ZodString>;
|
|
1027
1028
|
metaKeywords: z.ZodNullable<z.ZodString>;
|
|
1029
|
+
flowId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1028
1030
|
createdAt: z.ZodString;
|
|
1029
1031
|
updatedAt: z.ZodString;
|
|
1030
1032
|
fullPath: z.ZodString;
|
|
@@ -1050,6 +1052,7 @@ export declare const categoryWithPathSchema: z.ZodObject<{
|
|
|
1050
1052
|
metaTitle: z.ZodNullable<z.ZodString>;
|
|
1051
1053
|
metaDescription: z.ZodNullable<z.ZodString>;
|
|
1052
1054
|
metaKeywords: z.ZodNullable<z.ZodString>;
|
|
1055
|
+
flowId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1053
1056
|
createdAt: z.ZodString;
|
|
1054
1057
|
updatedAt: z.ZodString;
|
|
1055
1058
|
}, z.core.$strip>>;
|
|
@@ -1078,6 +1081,7 @@ export declare const categorySearchResultSchema: z.ZodObject<{
|
|
|
1078
1081
|
metaTitle: z.ZodNullable<z.ZodString>;
|
|
1079
1082
|
metaDescription: z.ZodNullable<z.ZodString>;
|
|
1080
1083
|
metaKeywords: z.ZodNullable<z.ZodString>;
|
|
1084
|
+
flowId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1081
1085
|
createdAt: z.ZodString;
|
|
1082
1086
|
updatedAt: z.ZodString;
|
|
1083
1087
|
fullPath: z.ZodString;
|
|
@@ -1103,6 +1107,7 @@ export declare const categorySearchResultSchema: z.ZodObject<{
|
|
|
1103
1107
|
metaTitle: z.ZodNullable<z.ZodString>;
|
|
1104
1108
|
metaDescription: z.ZodNullable<z.ZodString>;
|
|
1105
1109
|
metaKeywords: z.ZodNullable<z.ZodString>;
|
|
1110
|
+
flowId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1106
1111
|
createdAt: z.ZodString;
|
|
1107
1112
|
updatedAt: z.ZodString;
|
|
1108
1113
|
}, z.core.$strip>>;
|
|
@@ -1158,6 +1163,7 @@ export declare const categoryPatchRequestSchema: z.ZodObject<{
|
|
|
1158
1163
|
metaTitle: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1159
1164
|
metaDescription: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1160
1165
|
metaKeywords: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1166
|
+
flowId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1161
1167
|
}, z.core.$strip>;
|
|
1162
1168
|
export type CategoryPatchRequest = z.infer<typeof categoryPatchRequestSchema>;
|
|
1163
1169
|
export declare const categoryDeleteStrategySchema: z.ZodEnum<{
|
|
@@ -2351,37 +2357,16 @@ export declare const commerceFlowCheckSchema: z.ZodObject<{
|
|
|
2351
2357
|
}, z.core.$strip>>;
|
|
2352
2358
|
}, z.core.$strip>;
|
|
2353
2359
|
export type CommerceFlowCheck = z.infer<typeof commerceFlowCheckSchema>;
|
|
2354
|
-
export declare const flowAssignmentRuleSchema: z.ZodObject<{
|
|
2355
|
-
ruleId: z.ZodString;
|
|
2356
|
-
priority: z.ZodNumber;
|
|
2357
|
-
condition: z.ZodString;
|
|
2358
|
-
flowId: z.ZodString;
|
|
2359
|
-
}, z.core.$strip>;
|
|
2360
|
-
export type FlowAssignmentRule = z.infer<typeof flowAssignmentRuleSchema>;
|
|
2361
|
-
export declare const saveFlowAssignmentRulesRequestSchema: z.ZodObject<{
|
|
2362
|
-
rules: z.ZodArray<z.ZodObject<{
|
|
2363
|
-
condition: z.ZodString;
|
|
2364
|
-
flowId: z.ZodString;
|
|
2365
|
-
}, z.core.$strip>>;
|
|
2366
|
-
}, z.core.$strip>;
|
|
2367
|
-
export type SaveFlowAssignmentRulesRequest = z.infer<typeof saveFlowAssignmentRulesRequestSchema>;
|
|
2368
2360
|
export declare const resolvedFlowSchema: z.ZodObject<{
|
|
2369
2361
|
flowId: z.ZodString;
|
|
2370
2362
|
version: z.ZodNumber;
|
|
2371
2363
|
source: z.ZodEnum<{
|
|
2372
|
-
|
|
2364
|
+
PRODUCT: "PRODUCT";
|
|
2365
|
+
CATEGORY: "CATEGORY";
|
|
2373
2366
|
PLATFORM: "PLATFORM";
|
|
2374
2367
|
}>;
|
|
2375
|
-
ruleId: z.ZodOptional<z.ZodString>;
|
|
2376
2368
|
}, z.core.$strip>;
|
|
2377
2369
|
export type ResolvedFlow = z.infer<typeof resolvedFlowSchema>;
|
|
2378
|
-
export declare const testFlowAssignmentRequestSchema: z.ZodObject<{
|
|
2379
|
-
productId: z.ZodString;
|
|
2380
|
-
orderAmount: z.ZodOptional<z.ZodNumber>;
|
|
2381
|
-
paymentMethod: z.ZodOptional<z.ZodString>;
|
|
2382
|
-
member: z.ZodOptional<z.ZodBoolean>;
|
|
2383
|
-
}, z.core.$strip>;
|
|
2384
|
-
export type TestFlowAssignmentRequest = z.infer<typeof testFlowAssignmentRequestSchema>;
|
|
2385
2370
|
/** 시크릿 이름 — 플로우 변수 `secretRef`의 값이다 */
|
|
2386
2371
|
export declare const flowSecretNameSchema: z.ZodString;
|
|
2387
2372
|
/** HTTP 노드가 부를 셀러 API — 헤더 값은 응답에 싣지 않는다 */
|
|
@@ -6412,6 +6397,7 @@ export declare const productSchema: z.ZodObject<{
|
|
|
6412
6397
|
type: string;
|
|
6413
6398
|
}>>]>;
|
|
6414
6399
|
inventoryMode: z.ZodOptional<z.ZodString>;
|
|
6400
|
+
flowId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
6415
6401
|
fulfillmentTypeLocked: z.ZodBoolean;
|
|
6416
6402
|
refundPolicy: z.ZodNullable<z.ZodObject<{
|
|
6417
6403
|
preShipmentDeliveryFeeRefund: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -6664,6 +6650,7 @@ export declare const productCreateRequestSchema: z.ZodObject<{
|
|
|
6664
6650
|
STANDARD: "STANDARD";
|
|
6665
6651
|
DATED: "DATED";
|
|
6666
6652
|
}>>;
|
|
6653
|
+
flowId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
6667
6654
|
optionGroups: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
6668
6655
|
groupId: z.ZodOptional<z.ZodString>;
|
|
6669
6656
|
name: z.ZodString;
|
|
@@ -6777,6 +6764,7 @@ export declare const productReplaceRequestSchema: z.ZodObject<{
|
|
|
6777
6764
|
STANDARD: "STANDARD";
|
|
6778
6765
|
DATED: "DATED";
|
|
6779
6766
|
}>>;
|
|
6767
|
+
flowId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
6780
6768
|
optionGroups: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
6781
6769
|
groupId: z.ZodOptional<z.ZodString>;
|
|
6782
6770
|
name: z.ZodString;
|
|
@@ -6864,6 +6852,7 @@ export declare const productPatchRequestSchema: z.ZodObject<{
|
|
|
6864
6852
|
OUT_OF_STOCK: "OUT_OF_STOCK";
|
|
6865
6853
|
CLOSED: "CLOSED";
|
|
6866
6854
|
}>>;
|
|
6855
|
+
flowId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
6867
6856
|
images: z.ZodOptional<z.ZodArray<z.ZodURL>>;
|
|
6868
6857
|
fulfillment: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
6869
6858
|
type: z.ZodLiteral<"SHIPPING">;
|
|
@@ -9272,6 +9261,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
|
|
|
9272
9261
|
value: string;
|
|
9273
9262
|
}[] | undefined;
|
|
9274
9263
|
inventoryMode?: string | undefined;
|
|
9264
|
+
flowId?: string | null | undefined;
|
|
9275
9265
|
discount?: {
|
|
9276
9266
|
productId: string;
|
|
9277
9267
|
discountType: "RATE" | "AMOUNT";
|
|
@@ -9379,6 +9369,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
|
|
|
9379
9369
|
value: string;
|
|
9380
9370
|
}[] | undefined;
|
|
9381
9371
|
inventoryMode?: string | undefined;
|
|
9372
|
+
flowId?: string | null | undefined;
|
|
9382
9373
|
discount?: {
|
|
9383
9374
|
productId: string;
|
|
9384
9375
|
discountType: "RATE" | "AMOUNT";
|
|
@@ -9486,6 +9477,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
|
|
|
9486
9477
|
value: string;
|
|
9487
9478
|
}[] | undefined;
|
|
9488
9479
|
inventoryMode?: string | undefined;
|
|
9480
|
+
flowId?: string | null | undefined;
|
|
9489
9481
|
discount?: {
|
|
9490
9482
|
productId: string;
|
|
9491
9483
|
discountType: "RATE" | "AMOUNT";
|
|
@@ -10135,6 +10127,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
|
|
|
10135
10127
|
metaKeywords: string | null;
|
|
10136
10128
|
createdAt: string;
|
|
10137
10129
|
updatedAt: string;
|
|
10130
|
+
flowId?: string | null | undefined;
|
|
10138
10131
|
}[]>;
|
|
10139
10132
|
tree: () => Promise<CategoryTreeNode[]>;
|
|
10140
10133
|
search: (q: string) => Promise<{
|
|
@@ -10174,7 +10167,9 @@ export declare function createStoreClient(options: StoreClientOptions): {
|
|
|
10174
10167
|
metaKeywords: string | null;
|
|
10175
10168
|
createdAt: string;
|
|
10176
10169
|
updatedAt: string;
|
|
10170
|
+
flowId?: string | null | undefined;
|
|
10177
10171
|
}[];
|
|
10172
|
+
flowId?: string | null | undefined;
|
|
10178
10173
|
}[]>;
|
|
10179
10174
|
get: (categoryId: string) => Promise<{
|
|
10180
10175
|
categoryId: string;
|
|
@@ -10213,8 +10208,10 @@ export declare function createStoreClient(options: StoreClientOptions): {
|
|
|
10213
10208
|
metaKeywords: string | null;
|
|
10214
10209
|
createdAt: string;
|
|
10215
10210
|
updatedAt: string;
|
|
10211
|
+
flowId?: string | null | undefined;
|
|
10216
10212
|
}[];
|
|
10217
10213
|
childCount: number;
|
|
10214
|
+
flowId?: string | null | undefined;
|
|
10218
10215
|
}>;
|
|
10219
10216
|
listAttributes: (categoryId: string) => Promise<{
|
|
10220
10217
|
attributeId: string;
|
|
@@ -10242,6 +10239,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
|
|
|
10242
10239
|
metaKeywords: string | null;
|
|
10243
10240
|
createdAt: string;
|
|
10244
10241
|
updatedAt: string;
|
|
10242
|
+
flowId?: string | null | undefined;
|
|
10245
10243
|
}>;
|
|
10246
10244
|
update: (categoryId: string, body: CategoryPatchRequest) => Promise<{
|
|
10247
10245
|
categoryId: string;
|
|
@@ -10261,6 +10259,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
|
|
|
10261
10259
|
metaKeywords: string | null;
|
|
10262
10260
|
createdAt: string;
|
|
10263
10261
|
updatedAt: string;
|
|
10262
|
+
flowId?: string | null | undefined;
|
|
10264
10263
|
}>;
|
|
10265
10264
|
remove: (categoryId: string, opts?: {
|
|
10266
10265
|
strategy?: CategoryDeleteStrategy;
|
|
@@ -11135,31 +11134,11 @@ export declare function createStoreClient(options: StoreClientOptions): {
|
|
|
11135
11134
|
publishedAt: string | null;
|
|
11136
11135
|
}[];
|
|
11137
11136
|
}>;
|
|
11138
|
-
rules: () => Promise<{
|
|
11139
|
-
ruleId: string;
|
|
11140
|
-
priority: number;
|
|
11141
|
-
condition: string;
|
|
11142
|
-
flowId: string;
|
|
11143
|
-
}[]>;
|
|
11144
|
-
/** 할당 규칙 전체 교체(우선순위는 배열 순서). 에러: 400 `FLOW_ASSIGNMENT_CONDITION_INVALID`, 409 `FLOW_NOT_PUBLISHED` */
|
|
11145
|
-
saveRules: (body: SaveFlowAssignmentRulesRequest) => Promise<{
|
|
11146
|
-
ruleId: string;
|
|
11147
|
-
priority: number;
|
|
11148
|
-
condition: string;
|
|
11149
|
-
flowId: string;
|
|
11150
|
-
}[]>;
|
|
11151
|
-
testRules: (body: TestFlowAssignmentRequest) => Promise<{
|
|
11152
|
-
flowId: string;
|
|
11153
|
-
version: number;
|
|
11154
|
-
source: "RULE" | "PLATFORM";
|
|
11155
|
-
ruleId?: string | undefined;
|
|
11156
|
-
}>;
|
|
11157
11137
|
/** 이 상품에 지금 붙을 플로우 */
|
|
11158
11138
|
forProduct: (productId: string) => Promise<{
|
|
11159
11139
|
flowId: string;
|
|
11160
11140
|
version: number;
|
|
11161
|
-
source: "
|
|
11162
|
-
ruleId?: string | undefined;
|
|
11141
|
+
source: "PRODUCT" | "CATEGORY" | "PLATFORM";
|
|
11163
11142
|
}>;
|
|
11164
11143
|
/** HTTP 노드 시크릿 목록(헤더 값 제외) */
|
|
11165
11144
|
secrets: () => Promise<{
|
|
@@ -15815,7 +15794,6 @@ export declare const STORE_SCOPE_RESOURCES: {
|
|
|
15815
15794
|
export type StoreScopeResource = keyof typeof STORE_SCOPE_RESOURCES;
|
|
15816
15795
|
export declare const storeScopeResourceSchema: z.ZodEnum<{
|
|
15817
15796
|
category: "category";
|
|
15818
|
-
member: "member";
|
|
15819
15797
|
flow: "flow";
|
|
15820
15798
|
analytics: "analytics";
|
|
15821
15799
|
product: "product";
|
|
@@ -15826,6 +15804,7 @@ export declare const storeScopeResourceSchema: z.ZodEnum<{
|
|
|
15826
15804
|
settlement: "settlement";
|
|
15827
15805
|
webhook: "webhook";
|
|
15828
15806
|
store: "store";
|
|
15807
|
+
member: "member";
|
|
15829
15808
|
customer: "customer";
|
|
15830
15809
|
audit: "audit";
|
|
15831
15810
|
promotion: "promotion";
|
package/dist/index.mjs
CHANGED
|
@@ -665,6 +665,7 @@ const categorySchema = z.object({
|
|
|
665
665
|
metaTitle: z.string().nullable(),
|
|
666
666
|
metaDescription: z.string().nullable(),
|
|
667
667
|
metaKeywords: z.string().nullable(),
|
|
668
|
+
flowId: z.string().nullable().optional().describe("주문 흐름(이슈 #115) — 맨 아래 카테고리에만 있다. 흐름을 지정하지 않은 상품이 쓴다. null이면 기본 흐름"),
|
|
668
669
|
createdAt: z.string(),
|
|
669
670
|
updatedAt: z.string()
|
|
670
671
|
});
|
|
@@ -713,7 +714,8 @@ const categoryPatchRequestSchema = z.object({
|
|
|
713
714
|
productSort: categoryProductSortSchema.optional(),
|
|
714
715
|
metaTitle: z.string().max(100).nullable().optional(),
|
|
715
716
|
metaDescription: z.string().max(300).nullable().optional(),
|
|
716
|
-
metaKeywords: z.string().max(200).nullable().optional()
|
|
717
|
+
metaKeywords: z.string().max(200).nullable().optional(),
|
|
718
|
+
flowId: z.string().nullable().optional().describe("주문 흐름(이슈 #115) — 게시한 흐름 id, null이면 기본 흐름. 맨 아래 카테고리에만 지정한다(400 `CATEGORY_NOT_LEAF`). 게시하지 않은 흐름은 409 `FLOW_NOT_PUBLISHED`")
|
|
717
719
|
});
|
|
718
720
|
const categoryDeleteStrategySchema = z.enum(["reparent", "cascade"]);
|
|
719
721
|
/**
|
|
@@ -2000,6 +2002,7 @@ const productSchema = productSummarySchema.extend({
|
|
|
2000
2002
|
optionSort: optionSortSchema.optional().default("REGISTERED").describe("옵션 값 정렬 순서(이슈 #59). 서버는 항상 싣는다"),
|
|
2001
2003
|
fulfillment: productFulfillmentResponseSchema,
|
|
2002
2004
|
inventoryMode: z.string().optional().describe("재고 방식(이슈 #118). 날짜별 재고 상품만 `DATED`를 싣는다. 없으면 `STANDARD`"),
|
|
2005
|
+
flowId: z.string().nullable().optional().describe("주문 흐름(이슈 #115) — 상품에 지정한 흐름. null이면 카테고리의 흐름, 그것도 없으면 기본 흐름"),
|
|
2003
2006
|
fulfillmentTypeLocked: z.boolean().describe("판매 이력(주문상품)이 있어 상품 유형(`fulfillment.type`)을 바꿀 수 없는가. true면 다른 유형으로 수정하는 요청이 409 `FULFILLMENT_TYPE_LOCKED`다. 같은 유형 안의 속성은 바꿀 수 있다"),
|
|
2004
2007
|
refundPolicy: productRefundPolicyPatchSchema.nullable().describe("상품별 환불 정책 덮어쓰기(상품이 정한 항목만). null이면 상점 기본 환불 정책을 쓴다. 반품·교환 배송비(`returnDeliveryFee`·`exchangeDeliveryFee`)는 배송 상품에만 있다"),
|
|
2005
2008
|
/**
|
|
@@ -2156,7 +2159,8 @@ const productWriteShape = {
|
|
|
2156
2159
|
refundPolicy: productRefundPolicyPatchSchema.nullish().describe("상품별 환불 정책 — 준 항목만 상점 기본을 덮어쓴다. `null`이나 생략은 상점 기본을 그대로 쓴다는 뜻이다. 반품·교환 배송비(`returnDeliveryFee`·`exchangeDeliveryFee`)는 배송 상품에만 줄 수 있다(다른 유형은 400)"),
|
|
2157
2160
|
...optionModelRequestSchema.shape,
|
|
2158
2161
|
sourceOptionSetIds: z.array(z.string()).max(10).optional().describe("쓰기 전용(이슈 #59) — 이 저장으로 옵션을 불러온 저장 옵션 id. 상품 저장과 같은 트랜잭션에서 불러오기 기록을 남겨 저장 옵션의 `importedProductCount`를 센다. 없는 id는 무시한다"),
|
|
2159
|
-
inventoryMode: inventoryModeSchema.optional().describe("재고 방식(이슈 #118). `DATED`면 날짜별 달력(`PUT /products/{id}/calendar`)이 재고·가격이고 주문서 줄은 숙박 기간(`stay`)을 받는다. 생략하면 등록은 `STANDARD`, 수정은 지금 값. 판매 이력이 있으면 바꿀 수 없다(409 `INVENTORY_MODE_LOCKED`)")
|
|
2162
|
+
inventoryMode: inventoryModeSchema.optional().describe("재고 방식(이슈 #118). `DATED`면 날짜별 달력(`PUT /products/{id}/calendar`)이 재고·가격이고 주문서 줄은 숙박 기간(`stay`)을 받는다. 생략하면 등록은 `STANDARD`, 수정은 지금 값. 판매 이력이 있으면 바꿀 수 없다(409 `INVENTORY_MODE_LOCKED`)"),
|
|
2163
|
+
flowId: z.string().nullable().optional().describe("주문 흐름(이슈 #115) — 게시한 흐름 id. null이면 카테고리의 흐름(없으면 기본 흐름)을 쓴다. 생략하면 등록은 null, 수정은 지금 값. 게시하지 않은 흐름은 409 `FLOW_NOT_PUBLISHED`. 이미 결제된 주문은 결제 때 붙은 흐름을 그대로 따른다")
|
|
2160
2164
|
};
|
|
2161
2165
|
const productCreateRequestSchema = z.strictObject({
|
|
2162
2166
|
...productWriteShape,
|
|
@@ -2172,6 +2176,7 @@ const productPatchRequestSchema = z.strictObject({
|
|
|
2172
2176
|
name: z.string().max(100).optional(),
|
|
2173
2177
|
salePrice: z.number().int().multipleOf(10).optional(),
|
|
2174
2178
|
status: productStatusSchema.optional(),
|
|
2179
|
+
flowId: z.string().nullable().optional().describe("주문 흐름(이슈 #115) — 게시한 흐름 id, null이면 카테고리의 흐름(없으면 기본 흐름). 생략하면 바꾸지 않는다"),
|
|
2175
2180
|
images: productImagesRequestSchema.optional().describe("상품 이미지 주소 목록. 주면 통째로 바꾼다(현재 목록과 병합하지 않는다). 첫 장이 대표 이미지(썸네일)다. 생략하면 바꾸지 않는다"),
|
|
2176
2181
|
fulfillment: productFulfillmentUpdateSchema.optional().describe(fulfillmentUpdateDescription),
|
|
2177
2182
|
refundPolicy: productRefundPolicyPatchSchema.nullable().optional().describe("상품별 환불 정책. 주면 통째로 바꾼다(준 항목만 상점 기본을 덮어쓴다). `null`은 덮어쓰기를 지워 상점 기본을 따른다. 생략하면 바꾸지 않는다"),
|
|
@@ -2732,27 +2737,14 @@ const commerceFlowCheckSchema = z.object({
|
|
|
2732
2737
|
blocking: z.array(flowIssueSchema),
|
|
2733
2738
|
warnings: z.array(flowIssueSchema).describe("업무 논리 경고 — 게시를 막지 않는다")
|
|
2734
2739
|
});
|
|
2735
|
-
const flowAssignmentRuleSchema = z.object({
|
|
2736
|
-
ruleId: z.string(),
|
|
2737
|
-
priority: z.number().int().describe("작을수록 먼저 본다"),
|
|
2738
|
-
condition: z.string().describe("CEL 조건식. 읽는 값: product(id·category·categoryPath·tags), order(amount·paymentMethod), buyer(member). 예: `\"cat_1\" in product.categoryPath`"),
|
|
2739
|
-
flowId: z.string()
|
|
2740
|
-
});
|
|
2741
|
-
const saveFlowAssignmentRulesRequestSchema = z.object({ rules: z.array(z.object({
|
|
2742
|
-
condition: z.string().min(1).max(500),
|
|
2743
|
-
flowId: z.string()
|
|
2744
|
-
})).max(50).describe("위에서부터 처음 맞는 규칙의 게시된 플로우를 쓴다. 목록 전체를 바꾼다") });
|
|
2745
2740
|
const resolvedFlowSchema = z.object({
|
|
2746
2741
|
flowId: z.string(),
|
|
2747
2742
|
version: z.number().int(),
|
|
2748
|
-
source: z.enum([
|
|
2749
|
-
|
|
2750
|
-
|
|
2751
|
-
|
|
2752
|
-
|
|
2753
|
-
orderAmount: z.number().int().nonnegative().optional(),
|
|
2754
|
-
paymentMethod: z.string().optional(),
|
|
2755
|
-
member: z.boolean().optional()
|
|
2743
|
+
source: z.enum([
|
|
2744
|
+
"PRODUCT",
|
|
2745
|
+
"CATEGORY",
|
|
2746
|
+
"PLATFORM"
|
|
2747
|
+
]).describe("PRODUCT 상품에 지정한 흐름 · CATEGORY 카테고리의 흐름 · PLATFORM 기본 흐름")
|
|
2756
2748
|
});
|
|
2757
2749
|
/** 시크릿 이름 — 플로우 변수 `secretRef`의 값이다 */
|
|
2758
2750
|
const flowSecretNameSchema = z.string().regex(/^[a-z][a-z0-9-]{1,39}$/).describe("시크릿 이름(소문자·숫자·하이픈 2~40자). 플로우 변수(시크릿)의 값으로 쓴다");
|
|
@@ -6930,10 +6922,6 @@ function createStoreClient(options) {
|
|
|
6930
6922
|
check: (flowId) => storeHttp.request("POST", path`/commerce-flows/${flowId}/draft/check`, commerceFlowCheckSchema),
|
|
6931
6923
|
/** 게시. 차단 오류가 있으면 409 `PUBLISH_BLOCKED`(`details.blocking`) */
|
|
6932
6924
|
publish: (flowId) => storeHttp.request("POST", path`/commerce-flows/${flowId}/draft/publish`, commerceFlowSchema),
|
|
6933
|
-
rules: () => storeHttp.request("GET", "/commerce-flows/assignment-rules", z.array(flowAssignmentRuleSchema)),
|
|
6934
|
-
/** 할당 규칙 전체 교체(우선순위는 배열 순서). 에러: 400 `FLOW_ASSIGNMENT_CONDITION_INVALID`, 409 `FLOW_NOT_PUBLISHED` */
|
|
6935
|
-
saveRules: (body) => storeHttp.request("PUT", "/commerce-flows/assignment-rules", z.array(flowAssignmentRuleSchema), { body: saveFlowAssignmentRulesRequestSchema.parse(body) }),
|
|
6936
|
-
testRules: (body) => storeHttp.request("POST", "/commerce-flows/assignment-rules/test", resolvedFlowSchema, { body: testFlowAssignmentRequestSchema.parse(body) }),
|
|
6937
6925
|
/** 이 상품에 지금 붙을 플로우 */
|
|
6938
6926
|
forProduct: (productId) => storeHttp.request("GET", path`/products/${productId}/flow`, resolvedFlowSchema),
|
|
6939
6927
|
/** HTTP 노드 시크릿 목록(헤더 값 제외) */
|
|
@@ -8032,4 +8020,4 @@ function createStoreSession(options) {
|
|
|
8032
8020
|
};
|
|
8033
8021
|
}
|
|
8034
8022
|
//#endregion
|
|
8035
|
-
export { APPROVAL_ALREADY_DECIDED_CODE, APPROVAL_REQUIRED_CODE, ApiError, ApprovalPendingError, BUSINESS_INFO_MAX_LENGTH, BUSINESS_NUMBER_PATTERN, CASH_RECEIPT_STATUS_VALUES, COLLECTION_BEST_SELLING_DAYS, COLLECTION_PREVIEW_SIZE, COLLECTION_PRODUCT_SORTS, COLLECTION_SALES_SORT_DEFAULT_DAYS, COLLECTION_SLUG_PATTERN, COLLECTION_TYPES, COUPON_CODE_PATTERN, COUPON_CONDITIONS_DEFAULTS, COUPON_TARGET_ALL, COUPON_TARGET_LIST_MAX, CUSTOM_INPUT_FORBIDDEN_WORDS, CUSTOM_INPUT_TYPES, FULFILLMENT_METHODS, FULFILLMENT_METHODS_BY_TYPE, FULFILLMENT_METHOD_RULES, FULFILLMENT_RULES, KNOWN_WEBHOOK_EVENT_TYPES, MAX_ADDON_GROUPS, MAX_ANALYTICS_ALLOWED_ORIGINS, MAX_AUTO_TRANSITION_DAYS, MAX_CALENDAR_DAYS, MAX_COLLECTIONS, MAX_COLLECTION_BEST_SELLING_TOP, MAX_COLLECTION_CREATED_WITHIN_DAYS, MAX_COLLECTION_DESCRIPTION, MAX_COLLECTION_PRODUCTS, MAX_COLLECTION_PRODUCTS_PER_ADD, MAX_COLLECTION_RULES, MAX_COLLECTION_RULE_CATEGORIES, MAX_COLLECTION_TITLE, MAX_CUSTOM_INPUTS, MAX_CUSTOM_INPUT_LENGTH, MAX_OPTION_GROUPS, MAX_PICKUP_LOCATIONS, MAX_PRODUCT_IMAGES, MAX_SAVED_OPTION_SETS, MAX_SAVED_OPTION_SET_NAME, MAX_STAY_NIGHTS, MAX_VALUES_PER_GROUP, MAX_VARIANTS, MCP_TELEMETRY_MAX_RESULTS, MIN_PAYMENT_AMOUNT, NO_COUPON_SETTLEMENT, NO_SHIPPING_BUNDLE_KEY, PAYMENT_ROUTING_EXCLUSION_CODES, POINT_ADJUSTMENT_MAX, POINT_EARN_RATE_BP_MAX, POINT_ENTRY_TYPES, POINT_EXPIRY_DAYS_MAX, POINT_EXPIRY_DAYS_MIN, POINT_LOT_SOURCES, POINT_POLICY_DEFAULTS, POINT_REVIEW_REWARD_MAX, POINT_USE_UNITS, PORTONE_CHANNEL_NAME_MAX_LENGTH, PORTONE_MAX_CHANNELS, PORTONE_MIN_CHANNELS, REFUND_POLICY_DEFAULTS, REFUND_POLICY_DELIVERY_FEE_KEYS, REMOTE_AREA_ZIP_RANGES, RESERVED_STOREFRONT_SLUGS, RESERVED_STORE_CODES, SHIPPING_POLICY_DEFAULTS, STOREFRONT_BLOCKED_PATH_SEGMENTS, STOREFRONT_BUILD_STAGES, STOREFRONT_BUILD_TERMINAL_STATUSES, STOREFRONT_CHECK_TERMINAL_STATUSES, STOREFRONT_CUSTOM_DOMAIN_LIMIT_DEFAULT, STOREFRONT_DOMAIN_DNS_GRACE_DAYS, STOREFRONT_DOMAIN_DNS_WAIT_DAYS, STOREFRONT_DOMAIN_TXT_LABEL, STOREFRONT_EDIT_ACTIVITY_TIMEOUT_MINUTES, STOREFRONT_EDIT_CAPACITY, STOREFRONT_EDIT_IDLE_MINUTES, STOREFRONT_EDIT_PREVIEW_SUFFIX, STOREFRONT_EDIT_START_STAGES, STOREFRONT_FILE_BATCH_MAX, STOREFRONT_FILE_MAX_BYTES, STOREFRONT_PATH_SEGMENT_PATTERN, STOREFRONT_PLATFORM_DOMAINS, STOREFRONT_PUBLIC_SUFFIXES, STOREFRONT_SEARCH_REGEX_MAX_LENGTH, STOREFRONT_SHOWCASE_SLUG_PREFIX, STOREFRONT_SITE_CREATE_LIMIT, STOREFRONT_SLUG_CHANGE_LIMIT, STOREFRONT_SLUG_CHANGE_WINDOW_DAYS, STOREFRONT_SLUG_HOLD_DAYS, STOREFRONT_SLUG_PATTERN, STOREFRONT_SOURCE_BLOB_BATCH_MAX, STOREFRONT_SOURCE_PART_BYTES, STOREFRONT_WORKSPACE_MAX_BYTES, STOREFRONT_WORKSPACE_MAX_FILES, STORE_CODE_PATTERN, STORE_ROLE_SCOPES, STORE_SCOPE_RESOURCES, STORE_SESSION_KEYS, TOSS_WIDGET_CLIENT_KEY_PATTERN, TOSS_WIDGET_KEY_MESSAGE, TOSS_WIDGET_SECRET_KEY_PATTERN, UPLOAD_PURPOSE_LIMITS, VARIANT_COUNT_WARNING, VARIANT_STOCK_EXCLUSIVE_MESSAGE, WEBHOOK_DEFAULT_TOLERANCE_SEC, WEBHOOK_DELIVERY_ID_HEADER, WEBHOOK_EVENT_ID_HEADER, WEBHOOK_EVENT_TYPE_HEADER, WEBHOOK_FAILURE_REASONS, WEBHOOK_HEADERS, WEBHOOK_PAYLOAD_EXCERPT_MAX_BYTES, WEBHOOK_RESOURCE_TYPES, WEBHOOK_SIGNATURE_HEADER, WEBHOOK_USER_AGENT, addStorefrontDomainRequestSchema, addonGroupRequestSchema, addonGroupSchema, addonValueRequestSchema, addonValueSchema, addressChangeRequestListSchema, addressTypeSchema, agentPolicyDecisionSchema, allocateByWeight, analyticsChannelSchema, analyticsCheckoutOutcomeSchema, analyticsCheckoutSchema, analyticsDeviceRowSchema, analyticsDevicesSchema, analyticsFunnelStepSchema, analyticsOriginSchema, analyticsOverviewSchema, analyticsPagesQuerySchema, analyticsPagesSchema, analyticsProductRowSchema, analyticsProductSortSchema, analyticsProductsQuerySchema, analyticsProductsSchema, analyticsRangeQuerySchema, analyticsRealtimeSchema, analyticsSearchQuerySchema, analyticsSearchSchema, analyticsSourceGroupBySchema, analyticsSourceRowSchema, analyticsSourcesQuerySchema, analyticsSourcesSchema, analyticsTotalsSchema, apiLogErrorSchema, apiLogListQuerySchema, apiLogPageSchema, apiLogPrincipalSchema, apiLogPrincipalTypeSchema, apiLogSchema, apiLogStatusFilterSchema, apiLogSummarySchema, approvalDecisionRequestSchema, approvalListQuerySchema, approvalPageSchema, approvalRequestSchema, approvalStatusSchema, approveClaimResultSchema, auditActorSchema, auditActorTypeSchema, auditLogListQuerySchema, auditLogOutcomeSchema, auditLogPageSchema, auditLogSchema, auditLogSourceSchema, bestSellingRuleOf, buildAuthorizeUrl, buildQuery, bulkResultSchema, businessInfoPatchShape, businessInfoResponseShape, businessNumberSchema, calendarDateSchema, calendarDaySchema, calendarQuerySchema, cancelBySellerRequestSchema, cancelBySellerResultSchema, carrierSchema, cashReceiptSchema, categoryAttributeSchema, categoryCreateRequestSchema, categoryDeleteQuerySchema, categoryDeleteStrategySchema, categoryListQuerySchema, categoryPatchRequestSchema, categoryProductSortSchema, categorySchema, categorySearchResultSchema, categoryTreeNodeSchema, categoryWithPathSchema, changeStorefrontSlugRequestSchema, changeStorefrontTemplateRequestSchema, changeTypeSchema, claimDetailSchema, claimHoldResultSchema, claimListQuerySchema, claimReasonSchema, claimReturnAddressSchema, claimSchema, claimStatusSchema, claimTypeSchema, claimWebhookEventDataSchema, claimWebhookEventSchema, collectionCreateRequestSchema, collectionListQuerySchema, collectionPageSchema, collectionPatchRequestSchema, collectionPreviewRequestSchema, collectionPreviewSchema, collectionProductListQuerySchema, collectionProductSchema, collectionProductSortRequestSchema, collectionProductsAddRequestSchema, collectionProductsReplaceRequestSchema, collectionRuleCategoryIds, collectionRuleSchema, collectionRuleViewSchema, collectionRulesPredicate, collectionRulesSchema, collectionSchema, collectionStateCountsSchema, collectionStateOf, collectionStateSchema, commerceFlowCheckSchema, commerceFlowSchema, commerceFlowSummarySchema, commerceFlowVersionViewSchema, commerceNumberField, compareBySales, consentActionSchema, consentKindSchema, consentSourceSchema, couponBenefitSchema, couponConditionsInputSchema, couponConditionsSchema, couponDiscountOf, couponIssueListQuerySchema, couponIssueMethodSchema, couponIssueSchema, couponIssueStatusSchema, couponKindSchema, couponListQuerySchema, couponRedemptionListQuerySchema, couponRedemptionSchema, couponRejectReasonSchema, couponRuleSchema, couponSchema, couponStatsSchema, couponStatusSchema, couponTargetInputSchema, couponTargetSchema, createCommerceFlowRequestSchema, createCouponRequestSchema, createPkcePair, createStoreClient, createStoreSession, createStorefrontEditPreviewLinkRequestSchema, createStorefrontPreviewLinkRequestSchema, createStorefrontSiteRequestSchema, createStorefrontVersionRequestSchema, customInputLabelForbiddenWord, customInputRequestSchema, customInputSchema, customInputValueSchema, customerAddressSchema, customerConsentListQuerySchema, customerConsentSchema, customerConsentStateSchema, customerConsentsSchema, customerCouponSchema, customerDelegationRequestSchema, customerDelegationSchema, customerDetailSchema, customerInquiryCategorySchema, customerInquiryListQuerySchema, customerListQuerySchema, customerOrderSchema, customerPointsSchema, customerSortSchema, customerStatsSchema, customerSummarySchema, customerWithdrawalBlockedDetailsSchema, defaultFulfillmentMethodOf, deleteStorefrontFileRequestSchema, deliveryBundleKeyOf, deliveryFeeWaiverSchema, deliveryInfoSchema, deliveryMethodSchema, deliveryStatusSchema, deliveryTypeSchema, descendantCategoryIdsOf, disableStorefrontHostingRequestSchema, discountRequestSchema, discountSchema, dispatchRequestSchema, easyPayProviderResponseSchema, easyPayProviderSchema, eventTypeSchema, exchangeAuthorizationCode, flowActionRequestSchema, flowActionResultSchema, flowActionSchema, flowAssignmentRuleSchema, flowFieldValueSchema, flowInputFieldSchema, flowNotificationWebhookEventDataSchema, flowNotificationWebhookEventSchema, flowPresetSummarySchema, flowSecretNameSchema, flowSecretSchema, flowStateSchema, formatOrderNo, fulfillBulkRequestSchema, fulfillRequestSchema, fulfillmentMethodOf, fulfillmentMethodSchema, fulfillmentMethodsOf, fulfillmentRuleOf, fulfillmentTypeOf, fulfillmentTypeResponseSchema, fulfillmentTypeSchema, holdOrderItemRequestSchema, inquiryListQuerySchema, inquirySchema, inquiryWebhookEventDataSchema, inquiryWebhookEventSchema, inventoryModeSchema, invitationDeliveryStatusSchema, invitationListQuerySchema, invitationSchema, inviteMemberRequestSchema, isCouponTargetLine, isEditableStorefrontPath, isReservedStoreCode, isReservedStorefrontSlug, isShowcaseStorefrontSlug, isStoreScope, isWebOrigin, issueCouponRequestSchema, issueCouponResultSchema, liveGateConditionCodeSchema, liveGateConditionSchema, liveGateErrorDetailsSchema, liveGateSchema, loginProviderSchema, loginProviderStatusSchema, loginProviderTestSchema, loginSettingsSchema, maskedSecretSchema, matchesCollectionRules, mcpRuleResultSchema, mcpToolEventSchema, moveStorefrontFileRequestSchema, myAccountSchema, myStoreSchema, nightsOf, normalizeBusinessNumber, normalizeCouponCode, normalizeStorefrontHostname, normalizeStorefrontPath, oauthTokenResponseSchema, openFulfillmentUnion, optionGroupKindSchema, optionGroupRequestSchema, optionGroupSchema, optionModelRequestSchema, optionModelSchema, optionSelectionSchema, optionSortSchema, optionValueRequestSchema, optionValueSchema, orderCanceledWebhookEventDataSchema, orderCanceledWebhookEventSchema, orderDiscountSchema, orderFulfilledWebhookEventDataSchema, orderFulfilledWebhookEventSchema, orderItemFlowSchema, orderItemFulfillmentSchema, orderItemFulfillmentSnapshotResponseSchema, orderItemFulfillmentSnapshotSchema, orderItemListQuerySchema, orderItemMemoResultSchema, orderItemPageSchema, orderItemSchema, orderItemStatusSchema, orderListQuerySchema, orderSchema, orderSummaryPageSchema, orderSummarySchema, orderWebhookEventDataSchema, orderWebhookEventSchema, pageInfoSchema, pageQueryShape, pageSchema, parseOrderNo, parseWebhookEvent, paymentAttemptRecordSchema, paymentAttemptStatusSchema, paymentCredentialSetSchema, paymentFailureWarningSchema, paymentListQuerySchema, paymentProviderSchema, paymentProviderVerificationSchema, paymentRecordDetailSchema, paymentRecordPageSchema, paymentRecordSchema, paymentRecordStatusSchema, paymentRefundRecordSchema, paymentSettingsSchema, pgEnvironmentSchema, pgPaymentMethodSchema, pgProviderSchema, pgVerificationResultSchema, pickupLocationRequestSchema, pickupLocationSchema, pickupLocationSnapshotSchema, planCodeSchema, planEntitlementsSchema, planErrorDetailsSchema, pointAdjustmentRequestSchema, pointAdjustmentResultSchema, pointEarnOf, pointEarnRateBpSchema, pointEarningEnabled, pointEntrySchema, pointExpiresAtOf, pointHistoryQuerySchema, pointLotSchema, pointPolicyNoticeSchema, pointPolicySchema, pointRestoreExpiresAtOf, pointUseOf, pointUsePolicySchema, policyDocumentUrlSchema, policyVersionSchema, portOneChannelSchema, portOneCredentialsInputSchema, productCreateRequestSchema, productFulfillmentCreateSchema, productFulfillmentResponseSchema, productFulfillmentSchema, productFulfillmentUpdateSchema, productImageRejection, productImageUrlSchema, productListQuerySchema, productOutOfStockWebhookEventDataSchema, productOutOfStockWebhookEventSchema, productPatchRequestSchema, productRefundPolicyOverride, productRefundPolicyPatchSchema, productReplaceRequestSchema, productSchema, productSortSchema, productStatusSchema, productSummarySchema, productVariantRequestSchema, productVariantSchema, proratedPaidRefundBase, proratedPointRefund, proratedRefundBase, publicPlanSchema, publicPlansSchema, publishStorefrontVersionRequestSchema, purchaseDecisionExtendResultSchema, purchaseDecisionRequestResultSchema, purchaseEarnPolicySchema, purchaseEarnRateOf, quoteDelivery, quotePricing, rankBestSelling, refreshUserToken, refundPolicyPatchSchema, refundPolicySchema, rejectClaimRequestSchema, remoteAreaLabelOf, remoteAreaOf, remoteAreaSchema, remoteSurchargeOf, replaceStorefrontSourceRequestSchema, requiresCollection, requiresShipping, resolvePointPolicy, resolveRefundPolicy, resolveShippingPolicy, resolvedFlowSchema, responsePlanCodeSchema, responsePointEntryTypeSchema, reviewListQuerySchema, reviewReportResultSchema, reviewRewardPointOf, reviewRewardPolicySchema, reviewSchema, reviewSortSchema, reviewWebhookEventDataSchema, reviewWebhookEventSchema, rollbackStorefrontRequestSchema, runStorefrontCheckRequestSchema, salesReportGroupBySchema, salesReportQuerySchema, salesReportRowSchema, salesReportSchema, salesTotalsSchema, saveFlowAssignmentRulesRequestSchema, saveFlowDraftRequestSchema, saveFlowSecretRequestSchema, saveLoginProviderRequestSchema, savedCustomInputRequestSchema, savedCustomInputSchema, savedOptionGroupRequestSchema, savedOptionGroupSchema, savedOptionSetCompositionSchema, savedOptionSetFromProductRequestSchema, savedOptionSetFromProductResultSchema, savedOptionSetListQuerySchema, savedOptionSetRequestSchema, savedOptionSetSchema, savedOptionSetSortSchema, savedOptionValueRequestSchema, savedOptionValueSchema, scopeAccessSchema, searchStorefrontFilesRequestSchema, sellerAddressListQuerySchema, sellerAddressRequestSchema, sellerAddressSchema, sellerCustomerInquirySchema, setCalendarRequestSchema, setStorefrontVisibilityRequestSchema, settleCouponShortfall, settlementDetailQuerySchema, settlementDetailSchema, settlementListQuerySchema, settlementStatusSchema, settlementSummarySchema, settlementWithDetailsSchema, shippingAddressSchema, shippingPolicyPatchSchema, shippingPolicySchema, splitRefund, stayRangeSchema, staySnapshotSchema, storeCodeSchema, storeMemberRoleUpdatedSchema, storeMemberSchema, storePointPolicySchema, storeRoleSchema, storeSchema, storeScopeResourceSchema, storeSubscriptionSchema, storefrontBuildDependenciesSchema, storefrontBuildListQuerySchema, storefrontBuildSchema, storefrontBuildStatusSchema, storefrontCheckSchema, storefrontCheckStatusSchema, storefrontCustomDomainStatusSchema, storefrontCustomHostnameProblem, storefrontDependencyFindingSchema, storefrontDeploymentLogSchema, storefrontDeploymentSchema, storefrontDeploymentStepSchema, storefrontDnsRecordSchema, storefrontDomainSchema, storefrontDomainTxtNameOf, storefrontEditPreviewLabelOf, storefrontEditPreviewSchema, storefrontEditSessionSchema, storefrontEditSessionStatusSchema, storefrontEditingSchema, storefrontFileConflictDetailsSchema, storefrontFileContentQuerySchema, storefrontFileContentSchema, storefrontFileDeleteResultSchema, storefrontFileEncodingSchema, storefrontFileEntrySchema, storefrontFileHashSchema, storefrontFileListQuerySchema, storefrontFileListSchema, storefrontFileMoveResultSchema, storefrontFilePathSchema, storefrontFileSearchResultSchema, storefrontFileWriteResultSchema, storefrontHostingSchema, storefrontPreviewLinkSchema, storefrontProvisioningSchema, storefrontRuleResultSchema, storefrontRuleSeveritySchema, storefrontSiteDomainSchema, storefrontSiteDomainsSchema, storefrontSiteSchema, storefrontSiteStatusSchema, storefrontSlugAvailabilityQuerySchema, storefrontSlugAvailabilitySchema, storefrontSlugSchema, storefrontSourceArchivePartSchema, storefrontSourceArchiveQuerySchema, storefrontSourceBlobsResultSchema, storefrontSourceModeSchema, storefrontSourceRefSchema, storefrontSourceReplacedSchema, storefrontSourceSchema, storefrontSuspensionSchema, storefrontTemplateSchema, storefrontVerifyReportSchema, storefrontVersionCreatedSchema, storefrontVersionSchema, storefrontVersionStatusSchema, storefrontVisibilitySchema, subscriptionLimitsSchema, subscriptionStatusSchema, subscriptionUsageSchema, testFlowAssignmentRequestSchema, tossPaymentsCredentialsInputSchema, trackingStageResponseSchema, trackingUpdateResultSchema, unknownWebhookEventSchema, updateCouponRequestSchema, updateLoginProviderRequestSchema, updateLoginSettingsRequestSchema, updateMemberRoleRequestSchema, updatePaymentProviderRequestSchema, updatePaymentSettingsRequestSchema, updatePointPolicyRequestSchema, updateStoreRequestSchema, uploadExtensionOf, uploadPurposeSchema, uploadRejection, uploadRequestSchema, uploadStorefrontSourceBlobsRequestSchema, uploadTicketSchema, upsertPortOneProviderRequestSchema, upsertTossPaymentsProviderRequestSchema, variantStockRequestSchema, variantStockSchema, verifyPaymentProviderRequestSchema, webhookCreatedSchema, webhookDeliveryDetailSchema, webhookDeliveryErrorCodeSchema, webhookDeliveryListQuerySchema, webhookDeliveryResourceSchema, webhookDeliverySchema, webhookDeliveryStatusSchema, webhookEventSchema, webhookFailureReasonSchema, webhookRedeliverFailedResultSchema, webhookRequestHeaderSchema, webhookRequestSchema, webhookResourceTypeSchema, webhookSchema, webhookSecretRotatedSchema, webhookStatusSchema, webhookTestRequestSchema, webhookTestResultSchema, withdrawCustomerRequestSchema, writeDryRunResultSchema, writePreviewSchema, writeStorefrontFilesRequestSchema };
|
|
8023
|
+
export { APPROVAL_ALREADY_DECIDED_CODE, APPROVAL_REQUIRED_CODE, ApiError, ApprovalPendingError, BUSINESS_INFO_MAX_LENGTH, BUSINESS_NUMBER_PATTERN, CASH_RECEIPT_STATUS_VALUES, COLLECTION_BEST_SELLING_DAYS, COLLECTION_PREVIEW_SIZE, COLLECTION_PRODUCT_SORTS, COLLECTION_SALES_SORT_DEFAULT_DAYS, COLLECTION_SLUG_PATTERN, COLLECTION_TYPES, COUPON_CODE_PATTERN, COUPON_CONDITIONS_DEFAULTS, COUPON_TARGET_ALL, COUPON_TARGET_LIST_MAX, CUSTOM_INPUT_FORBIDDEN_WORDS, CUSTOM_INPUT_TYPES, FULFILLMENT_METHODS, FULFILLMENT_METHODS_BY_TYPE, FULFILLMENT_METHOD_RULES, FULFILLMENT_RULES, KNOWN_WEBHOOK_EVENT_TYPES, MAX_ADDON_GROUPS, MAX_ANALYTICS_ALLOWED_ORIGINS, MAX_AUTO_TRANSITION_DAYS, MAX_CALENDAR_DAYS, MAX_COLLECTIONS, MAX_COLLECTION_BEST_SELLING_TOP, MAX_COLLECTION_CREATED_WITHIN_DAYS, MAX_COLLECTION_DESCRIPTION, MAX_COLLECTION_PRODUCTS, MAX_COLLECTION_PRODUCTS_PER_ADD, MAX_COLLECTION_RULES, MAX_COLLECTION_RULE_CATEGORIES, MAX_COLLECTION_TITLE, MAX_CUSTOM_INPUTS, MAX_CUSTOM_INPUT_LENGTH, MAX_OPTION_GROUPS, MAX_PICKUP_LOCATIONS, MAX_PRODUCT_IMAGES, MAX_SAVED_OPTION_SETS, MAX_SAVED_OPTION_SET_NAME, MAX_STAY_NIGHTS, MAX_VALUES_PER_GROUP, MAX_VARIANTS, MCP_TELEMETRY_MAX_RESULTS, MIN_PAYMENT_AMOUNT, NO_COUPON_SETTLEMENT, NO_SHIPPING_BUNDLE_KEY, PAYMENT_ROUTING_EXCLUSION_CODES, POINT_ADJUSTMENT_MAX, POINT_EARN_RATE_BP_MAX, POINT_ENTRY_TYPES, POINT_EXPIRY_DAYS_MAX, POINT_EXPIRY_DAYS_MIN, POINT_LOT_SOURCES, POINT_POLICY_DEFAULTS, POINT_REVIEW_REWARD_MAX, POINT_USE_UNITS, PORTONE_CHANNEL_NAME_MAX_LENGTH, PORTONE_MAX_CHANNELS, PORTONE_MIN_CHANNELS, REFUND_POLICY_DEFAULTS, REFUND_POLICY_DELIVERY_FEE_KEYS, REMOTE_AREA_ZIP_RANGES, RESERVED_STOREFRONT_SLUGS, RESERVED_STORE_CODES, SHIPPING_POLICY_DEFAULTS, STOREFRONT_BLOCKED_PATH_SEGMENTS, STOREFRONT_BUILD_STAGES, STOREFRONT_BUILD_TERMINAL_STATUSES, STOREFRONT_CHECK_TERMINAL_STATUSES, STOREFRONT_CUSTOM_DOMAIN_LIMIT_DEFAULT, STOREFRONT_DOMAIN_DNS_GRACE_DAYS, STOREFRONT_DOMAIN_DNS_WAIT_DAYS, STOREFRONT_DOMAIN_TXT_LABEL, STOREFRONT_EDIT_ACTIVITY_TIMEOUT_MINUTES, STOREFRONT_EDIT_CAPACITY, STOREFRONT_EDIT_IDLE_MINUTES, STOREFRONT_EDIT_PREVIEW_SUFFIX, STOREFRONT_EDIT_START_STAGES, STOREFRONT_FILE_BATCH_MAX, STOREFRONT_FILE_MAX_BYTES, STOREFRONT_PATH_SEGMENT_PATTERN, STOREFRONT_PLATFORM_DOMAINS, STOREFRONT_PUBLIC_SUFFIXES, STOREFRONT_SEARCH_REGEX_MAX_LENGTH, STOREFRONT_SHOWCASE_SLUG_PREFIX, STOREFRONT_SITE_CREATE_LIMIT, STOREFRONT_SLUG_CHANGE_LIMIT, STOREFRONT_SLUG_CHANGE_WINDOW_DAYS, STOREFRONT_SLUG_HOLD_DAYS, STOREFRONT_SLUG_PATTERN, STOREFRONT_SOURCE_BLOB_BATCH_MAX, STOREFRONT_SOURCE_PART_BYTES, STOREFRONT_WORKSPACE_MAX_BYTES, STOREFRONT_WORKSPACE_MAX_FILES, STORE_CODE_PATTERN, STORE_ROLE_SCOPES, STORE_SCOPE_RESOURCES, STORE_SESSION_KEYS, TOSS_WIDGET_CLIENT_KEY_PATTERN, TOSS_WIDGET_KEY_MESSAGE, TOSS_WIDGET_SECRET_KEY_PATTERN, UPLOAD_PURPOSE_LIMITS, VARIANT_COUNT_WARNING, VARIANT_STOCK_EXCLUSIVE_MESSAGE, WEBHOOK_DEFAULT_TOLERANCE_SEC, WEBHOOK_DELIVERY_ID_HEADER, WEBHOOK_EVENT_ID_HEADER, WEBHOOK_EVENT_TYPE_HEADER, WEBHOOK_FAILURE_REASONS, WEBHOOK_HEADERS, WEBHOOK_PAYLOAD_EXCERPT_MAX_BYTES, WEBHOOK_RESOURCE_TYPES, WEBHOOK_SIGNATURE_HEADER, WEBHOOK_USER_AGENT, addStorefrontDomainRequestSchema, addonGroupRequestSchema, addonGroupSchema, addonValueRequestSchema, addonValueSchema, addressChangeRequestListSchema, addressTypeSchema, agentPolicyDecisionSchema, allocateByWeight, analyticsChannelSchema, analyticsCheckoutOutcomeSchema, analyticsCheckoutSchema, analyticsDeviceRowSchema, analyticsDevicesSchema, analyticsFunnelStepSchema, analyticsOriginSchema, analyticsOverviewSchema, analyticsPagesQuerySchema, analyticsPagesSchema, analyticsProductRowSchema, analyticsProductSortSchema, analyticsProductsQuerySchema, analyticsProductsSchema, analyticsRangeQuerySchema, analyticsRealtimeSchema, analyticsSearchQuerySchema, analyticsSearchSchema, analyticsSourceGroupBySchema, analyticsSourceRowSchema, analyticsSourcesQuerySchema, analyticsSourcesSchema, analyticsTotalsSchema, apiLogErrorSchema, apiLogListQuerySchema, apiLogPageSchema, apiLogPrincipalSchema, apiLogPrincipalTypeSchema, apiLogSchema, apiLogStatusFilterSchema, apiLogSummarySchema, approvalDecisionRequestSchema, approvalListQuerySchema, approvalPageSchema, approvalRequestSchema, approvalStatusSchema, approveClaimResultSchema, auditActorSchema, auditActorTypeSchema, auditLogListQuerySchema, auditLogOutcomeSchema, auditLogPageSchema, auditLogSchema, auditLogSourceSchema, bestSellingRuleOf, buildAuthorizeUrl, buildQuery, bulkResultSchema, businessInfoPatchShape, businessInfoResponseShape, businessNumberSchema, calendarDateSchema, calendarDaySchema, calendarQuerySchema, cancelBySellerRequestSchema, cancelBySellerResultSchema, carrierSchema, cashReceiptSchema, categoryAttributeSchema, categoryCreateRequestSchema, categoryDeleteQuerySchema, categoryDeleteStrategySchema, categoryListQuerySchema, categoryPatchRequestSchema, categoryProductSortSchema, categorySchema, categorySearchResultSchema, categoryTreeNodeSchema, categoryWithPathSchema, changeStorefrontSlugRequestSchema, changeStorefrontTemplateRequestSchema, changeTypeSchema, claimDetailSchema, claimHoldResultSchema, claimListQuerySchema, claimReasonSchema, claimReturnAddressSchema, claimSchema, claimStatusSchema, claimTypeSchema, claimWebhookEventDataSchema, claimWebhookEventSchema, collectionCreateRequestSchema, collectionListQuerySchema, collectionPageSchema, collectionPatchRequestSchema, collectionPreviewRequestSchema, collectionPreviewSchema, collectionProductListQuerySchema, collectionProductSchema, collectionProductSortRequestSchema, collectionProductsAddRequestSchema, collectionProductsReplaceRequestSchema, collectionRuleCategoryIds, collectionRuleSchema, collectionRuleViewSchema, collectionRulesPredicate, collectionRulesSchema, collectionSchema, collectionStateCountsSchema, collectionStateOf, collectionStateSchema, commerceFlowCheckSchema, commerceFlowSchema, commerceFlowSummarySchema, commerceFlowVersionViewSchema, commerceNumberField, compareBySales, consentActionSchema, consentKindSchema, consentSourceSchema, couponBenefitSchema, couponConditionsInputSchema, couponConditionsSchema, couponDiscountOf, couponIssueListQuerySchema, couponIssueMethodSchema, couponIssueSchema, couponIssueStatusSchema, couponKindSchema, couponListQuerySchema, couponRedemptionListQuerySchema, couponRedemptionSchema, couponRejectReasonSchema, couponRuleSchema, couponSchema, couponStatsSchema, couponStatusSchema, couponTargetInputSchema, couponTargetSchema, createCommerceFlowRequestSchema, createCouponRequestSchema, createPkcePair, createStoreClient, createStoreSession, createStorefrontEditPreviewLinkRequestSchema, createStorefrontPreviewLinkRequestSchema, createStorefrontSiteRequestSchema, createStorefrontVersionRequestSchema, customInputLabelForbiddenWord, customInputRequestSchema, customInputSchema, customInputValueSchema, customerAddressSchema, customerConsentListQuerySchema, customerConsentSchema, customerConsentStateSchema, customerConsentsSchema, customerCouponSchema, customerDelegationRequestSchema, customerDelegationSchema, customerDetailSchema, customerInquiryCategorySchema, customerInquiryListQuerySchema, customerListQuerySchema, customerOrderSchema, customerPointsSchema, customerSortSchema, customerStatsSchema, customerSummarySchema, customerWithdrawalBlockedDetailsSchema, defaultFulfillmentMethodOf, deleteStorefrontFileRequestSchema, deliveryBundleKeyOf, deliveryFeeWaiverSchema, deliveryInfoSchema, deliveryMethodSchema, deliveryStatusSchema, deliveryTypeSchema, descendantCategoryIdsOf, disableStorefrontHostingRequestSchema, discountRequestSchema, discountSchema, dispatchRequestSchema, easyPayProviderResponseSchema, easyPayProviderSchema, eventTypeSchema, exchangeAuthorizationCode, flowActionRequestSchema, flowActionResultSchema, flowActionSchema, flowFieldValueSchema, flowInputFieldSchema, flowNotificationWebhookEventDataSchema, flowNotificationWebhookEventSchema, flowPresetSummarySchema, flowSecretNameSchema, flowSecretSchema, flowStateSchema, formatOrderNo, fulfillBulkRequestSchema, fulfillRequestSchema, fulfillmentMethodOf, fulfillmentMethodSchema, fulfillmentMethodsOf, fulfillmentRuleOf, fulfillmentTypeOf, fulfillmentTypeResponseSchema, fulfillmentTypeSchema, holdOrderItemRequestSchema, inquiryListQuerySchema, inquirySchema, inquiryWebhookEventDataSchema, inquiryWebhookEventSchema, inventoryModeSchema, invitationDeliveryStatusSchema, invitationListQuerySchema, invitationSchema, inviteMemberRequestSchema, isCouponTargetLine, isEditableStorefrontPath, isReservedStoreCode, isReservedStorefrontSlug, isShowcaseStorefrontSlug, isStoreScope, isWebOrigin, issueCouponRequestSchema, issueCouponResultSchema, liveGateConditionCodeSchema, liveGateConditionSchema, liveGateErrorDetailsSchema, liveGateSchema, loginProviderSchema, loginProviderStatusSchema, loginProviderTestSchema, loginSettingsSchema, maskedSecretSchema, matchesCollectionRules, mcpRuleResultSchema, mcpToolEventSchema, moveStorefrontFileRequestSchema, myAccountSchema, myStoreSchema, nightsOf, normalizeBusinessNumber, normalizeCouponCode, normalizeStorefrontHostname, normalizeStorefrontPath, oauthTokenResponseSchema, openFulfillmentUnion, optionGroupKindSchema, optionGroupRequestSchema, optionGroupSchema, optionModelRequestSchema, optionModelSchema, optionSelectionSchema, optionSortSchema, optionValueRequestSchema, optionValueSchema, orderCanceledWebhookEventDataSchema, orderCanceledWebhookEventSchema, orderDiscountSchema, orderFulfilledWebhookEventDataSchema, orderFulfilledWebhookEventSchema, orderItemFlowSchema, orderItemFulfillmentSchema, orderItemFulfillmentSnapshotResponseSchema, orderItemFulfillmentSnapshotSchema, orderItemListQuerySchema, orderItemMemoResultSchema, orderItemPageSchema, orderItemSchema, orderItemStatusSchema, orderListQuerySchema, orderSchema, orderSummaryPageSchema, orderSummarySchema, orderWebhookEventDataSchema, orderWebhookEventSchema, pageInfoSchema, pageQueryShape, pageSchema, parseOrderNo, parseWebhookEvent, paymentAttemptRecordSchema, paymentAttemptStatusSchema, paymentCredentialSetSchema, paymentFailureWarningSchema, paymentListQuerySchema, paymentProviderSchema, paymentProviderVerificationSchema, paymentRecordDetailSchema, paymentRecordPageSchema, paymentRecordSchema, paymentRecordStatusSchema, paymentRefundRecordSchema, paymentSettingsSchema, pgEnvironmentSchema, pgPaymentMethodSchema, pgProviderSchema, pgVerificationResultSchema, pickupLocationRequestSchema, pickupLocationSchema, pickupLocationSnapshotSchema, planCodeSchema, planEntitlementsSchema, planErrorDetailsSchema, pointAdjustmentRequestSchema, pointAdjustmentResultSchema, pointEarnOf, pointEarnRateBpSchema, pointEarningEnabled, pointEntrySchema, pointExpiresAtOf, pointHistoryQuerySchema, pointLotSchema, pointPolicyNoticeSchema, pointPolicySchema, pointRestoreExpiresAtOf, pointUseOf, pointUsePolicySchema, policyDocumentUrlSchema, policyVersionSchema, portOneChannelSchema, portOneCredentialsInputSchema, productCreateRequestSchema, productFulfillmentCreateSchema, productFulfillmentResponseSchema, productFulfillmentSchema, productFulfillmentUpdateSchema, productImageRejection, productImageUrlSchema, productListQuerySchema, productOutOfStockWebhookEventDataSchema, productOutOfStockWebhookEventSchema, productPatchRequestSchema, productRefundPolicyOverride, productRefundPolicyPatchSchema, productReplaceRequestSchema, productSchema, productSortSchema, productStatusSchema, productSummarySchema, productVariantRequestSchema, productVariantSchema, proratedPaidRefundBase, proratedPointRefund, proratedRefundBase, publicPlanSchema, publicPlansSchema, publishStorefrontVersionRequestSchema, purchaseDecisionExtendResultSchema, purchaseDecisionRequestResultSchema, purchaseEarnPolicySchema, purchaseEarnRateOf, quoteDelivery, quotePricing, rankBestSelling, refreshUserToken, refundPolicyPatchSchema, refundPolicySchema, rejectClaimRequestSchema, remoteAreaLabelOf, remoteAreaOf, remoteAreaSchema, remoteSurchargeOf, replaceStorefrontSourceRequestSchema, requiresCollection, requiresShipping, resolvePointPolicy, resolveRefundPolicy, resolveShippingPolicy, resolvedFlowSchema, responsePlanCodeSchema, responsePointEntryTypeSchema, reviewListQuerySchema, reviewReportResultSchema, reviewRewardPointOf, reviewRewardPolicySchema, reviewSchema, reviewSortSchema, reviewWebhookEventDataSchema, reviewWebhookEventSchema, rollbackStorefrontRequestSchema, runStorefrontCheckRequestSchema, salesReportGroupBySchema, salesReportQuerySchema, salesReportRowSchema, salesReportSchema, salesTotalsSchema, saveFlowDraftRequestSchema, saveFlowSecretRequestSchema, saveLoginProviderRequestSchema, savedCustomInputRequestSchema, savedCustomInputSchema, savedOptionGroupRequestSchema, savedOptionGroupSchema, savedOptionSetCompositionSchema, savedOptionSetFromProductRequestSchema, savedOptionSetFromProductResultSchema, savedOptionSetListQuerySchema, savedOptionSetRequestSchema, savedOptionSetSchema, savedOptionSetSortSchema, savedOptionValueRequestSchema, savedOptionValueSchema, scopeAccessSchema, searchStorefrontFilesRequestSchema, sellerAddressListQuerySchema, sellerAddressRequestSchema, sellerAddressSchema, sellerCustomerInquirySchema, setCalendarRequestSchema, setStorefrontVisibilityRequestSchema, settleCouponShortfall, settlementDetailQuerySchema, settlementDetailSchema, settlementListQuerySchema, settlementStatusSchema, settlementSummarySchema, settlementWithDetailsSchema, shippingAddressSchema, shippingPolicyPatchSchema, shippingPolicySchema, splitRefund, stayRangeSchema, staySnapshotSchema, storeCodeSchema, storeMemberRoleUpdatedSchema, storeMemberSchema, storePointPolicySchema, storeRoleSchema, storeSchema, storeScopeResourceSchema, storeSubscriptionSchema, storefrontBuildDependenciesSchema, storefrontBuildListQuerySchema, storefrontBuildSchema, storefrontBuildStatusSchema, storefrontCheckSchema, storefrontCheckStatusSchema, storefrontCustomDomainStatusSchema, storefrontCustomHostnameProblem, storefrontDependencyFindingSchema, storefrontDeploymentLogSchema, storefrontDeploymentSchema, storefrontDeploymentStepSchema, storefrontDnsRecordSchema, storefrontDomainSchema, storefrontDomainTxtNameOf, storefrontEditPreviewLabelOf, storefrontEditPreviewSchema, storefrontEditSessionSchema, storefrontEditSessionStatusSchema, storefrontEditingSchema, storefrontFileConflictDetailsSchema, storefrontFileContentQuerySchema, storefrontFileContentSchema, storefrontFileDeleteResultSchema, storefrontFileEncodingSchema, storefrontFileEntrySchema, storefrontFileHashSchema, storefrontFileListQuerySchema, storefrontFileListSchema, storefrontFileMoveResultSchema, storefrontFilePathSchema, storefrontFileSearchResultSchema, storefrontFileWriteResultSchema, storefrontHostingSchema, storefrontPreviewLinkSchema, storefrontProvisioningSchema, storefrontRuleResultSchema, storefrontRuleSeveritySchema, storefrontSiteDomainSchema, storefrontSiteDomainsSchema, storefrontSiteSchema, storefrontSiteStatusSchema, storefrontSlugAvailabilityQuerySchema, storefrontSlugAvailabilitySchema, storefrontSlugSchema, storefrontSourceArchivePartSchema, storefrontSourceArchiveQuerySchema, storefrontSourceBlobsResultSchema, storefrontSourceModeSchema, storefrontSourceRefSchema, storefrontSourceReplacedSchema, storefrontSourceSchema, storefrontSuspensionSchema, storefrontTemplateSchema, storefrontVerifyReportSchema, storefrontVersionCreatedSchema, storefrontVersionSchema, storefrontVersionStatusSchema, storefrontVisibilitySchema, subscriptionLimitsSchema, subscriptionStatusSchema, subscriptionUsageSchema, tossPaymentsCredentialsInputSchema, trackingStageResponseSchema, trackingUpdateResultSchema, unknownWebhookEventSchema, updateCouponRequestSchema, updateLoginProviderRequestSchema, updateLoginSettingsRequestSchema, updateMemberRoleRequestSchema, updatePaymentProviderRequestSchema, updatePaymentSettingsRequestSchema, updatePointPolicyRequestSchema, updateStoreRequestSchema, uploadExtensionOf, uploadPurposeSchema, uploadRejection, uploadRequestSchema, uploadStorefrontSourceBlobsRequestSchema, uploadTicketSchema, upsertPortOneProviderRequestSchema, upsertTossPaymentsProviderRequestSchema, variantStockRequestSchema, variantStockSchema, verifyPaymentProviderRequestSchema, webhookCreatedSchema, webhookDeliveryDetailSchema, webhookDeliveryErrorCodeSchema, webhookDeliveryListQuerySchema, webhookDeliveryResourceSchema, webhookDeliverySchema, webhookDeliveryStatusSchema, webhookEventSchema, webhookFailureReasonSchema, webhookRedeliverFailedResultSchema, webhookRequestHeaderSchema, webhookRequestSchema, webhookResourceTypeSchema, webhookSchema, webhookSecretRotatedSchema, webhookStatusSchema, webhookTestRequestSchema, webhookTestResultSchema, withdrawCustomerRequestSchema, writeDryRunResultSchema, writePreviewSchema, writeStorefrontFilesRequestSchema };
|
package/package.json
CHANGED
package/src/client.ts
CHANGED
|
@@ -77,19 +77,14 @@ import {
|
|
|
77
77
|
createCommerceFlowRequestSchema,
|
|
78
78
|
flowActionRequestSchema,
|
|
79
79
|
flowActionResultSchema,
|
|
80
|
-
flowAssignmentRuleSchema,
|
|
81
80
|
flowPresetSummarySchema,
|
|
82
81
|
flowSecretSchema,
|
|
83
82
|
orderItemFlowSchema,
|
|
84
83
|
resolvedFlowSchema,
|
|
85
|
-
type SaveFlowAssignmentRulesRequest,
|
|
86
84
|
type SaveFlowDraftRequest,
|
|
87
85
|
type SaveFlowSecretRequest,
|
|
88
|
-
saveFlowAssignmentRulesRequestSchema,
|
|
89
86
|
saveFlowDraftRequestSchema,
|
|
90
87
|
saveFlowSecretRequestSchema,
|
|
91
|
-
type TestFlowAssignmentRequest,
|
|
92
|
-
testFlowAssignmentRequestSchema,
|
|
93
88
|
} from "./schemas/commerce-flow";
|
|
94
89
|
import { bulkResultSchema, type PageParams, pageSchema } from "./schemas/common";
|
|
95
90
|
import {
|
|
@@ -851,24 +846,6 @@ export function createStoreClient(options: StoreClientOptions) {
|
|
|
851
846
|
path`/commerce-flows/${flowId}/draft/publish`,
|
|
852
847
|
commerceFlowSchema,
|
|
853
848
|
),
|
|
854
|
-
rules: () =>
|
|
855
|
-
storeHttp.request(
|
|
856
|
-
"GET",
|
|
857
|
-
"/commerce-flows/assignment-rules",
|
|
858
|
-
z.array(flowAssignmentRuleSchema),
|
|
859
|
-
),
|
|
860
|
-
/** 할당 규칙 전체 교체(우선순위는 배열 순서). 에러: 400 `FLOW_ASSIGNMENT_CONDITION_INVALID`, 409 `FLOW_NOT_PUBLISHED` */
|
|
861
|
-
saveRules: (body: SaveFlowAssignmentRulesRequest) =>
|
|
862
|
-
storeHttp.request(
|
|
863
|
-
"PUT",
|
|
864
|
-
"/commerce-flows/assignment-rules",
|
|
865
|
-
z.array(flowAssignmentRuleSchema),
|
|
866
|
-
{ body: saveFlowAssignmentRulesRequestSchema.parse(body) },
|
|
867
|
-
),
|
|
868
|
-
testRules: (body: TestFlowAssignmentRequest) =>
|
|
869
|
-
storeHttp.request("POST", "/commerce-flows/assignment-rules/test", resolvedFlowSchema, {
|
|
870
|
-
body: testFlowAssignmentRequestSchema.parse(body),
|
|
871
|
-
}),
|
|
872
849
|
/** 이 상품에 지금 붙을 플로우 */
|
|
873
850
|
forProduct: (productId: string) =>
|
|
874
851
|
storeHttp.request("GET", path`/products/${productId}/flow`, resolvedFlowSchema),
|
package/src/schemas/category.ts
CHANGED
|
@@ -26,6 +26,13 @@ export const categorySchema = z.object({
|
|
|
26
26
|
metaTitle: z.string().nullable(),
|
|
27
27
|
metaDescription: z.string().nullable(),
|
|
28
28
|
metaKeywords: z.string().nullable(),
|
|
29
|
+
flowId: z
|
|
30
|
+
.string()
|
|
31
|
+
.nullable()
|
|
32
|
+
.optional()
|
|
33
|
+
.describe(
|
|
34
|
+
"주문 흐름(이슈 #115) — 맨 아래 카테고리에만 있다. 흐름을 지정하지 않은 상품이 쓴다. null이면 기본 흐름",
|
|
35
|
+
),
|
|
29
36
|
createdAt: z.string(),
|
|
30
37
|
updatedAt: z.string(),
|
|
31
38
|
});
|
|
@@ -89,6 +96,13 @@ export const categoryPatchRequestSchema = z.object({
|
|
|
89
96
|
metaTitle: z.string().max(100).nullable().optional(),
|
|
90
97
|
metaDescription: z.string().max(300).nullable().optional(),
|
|
91
98
|
metaKeywords: z.string().max(200).nullable().optional(),
|
|
99
|
+
flowId: z
|
|
100
|
+
.string()
|
|
101
|
+
.nullable()
|
|
102
|
+
.optional()
|
|
103
|
+
.describe(
|
|
104
|
+
"주문 흐름(이슈 #115) — 게시한 흐름 id, null이면 기본 흐름. 맨 아래 카테고리에만 지정한다(400 `CATEGORY_NOT_LEAF`). 게시하지 않은 흐름은 409 `FLOW_NOT_PUBLISHED`",
|
|
105
|
+
),
|
|
92
106
|
});
|
|
93
107
|
|
|
94
108
|
export type CategoryPatchRequest = z.infer<typeof categoryPatchRequestSchema>;
|
|
@@ -188,46 +188,17 @@ export const commerceFlowCheckSchema = z.object({
|
|
|
188
188
|
});
|
|
189
189
|
export type CommerceFlowCheck = z.infer<typeof commerceFlowCheckSchema>;
|
|
190
190
|
|
|
191
|
-
// ──
|
|
192
|
-
|
|
193
|
-
export const flowAssignmentRuleSchema = z.object({
|
|
194
|
-
ruleId: z.string(),
|
|
195
|
-
priority: z.number().int().describe("작을수록 먼저 본다"),
|
|
196
|
-
condition: z
|
|
197
|
-
.string()
|
|
198
|
-
.describe(
|
|
199
|
-
'CEL 조건식. 읽는 값: product(id·category·categoryPath·tags), order(amount·paymentMethod), buyer(member). 예: `"cat_1" in product.categoryPath`',
|
|
200
|
-
),
|
|
201
|
-
flowId: z.string(),
|
|
202
|
-
});
|
|
203
|
-
export type FlowAssignmentRule = z.infer<typeof flowAssignmentRuleSchema>;
|
|
204
|
-
|
|
205
|
-
export const saveFlowAssignmentRulesRequestSchema = z.object({
|
|
206
|
-
rules: z
|
|
207
|
-
.array(z.object({ condition: z.string().min(1).max(500), flowId: z.string() }))
|
|
208
|
-
.max(50)
|
|
209
|
-
.describe("위에서부터 처음 맞는 규칙의 게시된 플로우를 쓴다. 목록 전체를 바꾼다"),
|
|
210
|
-
});
|
|
211
|
-
export type SaveFlowAssignmentRulesRequest = z.infer<typeof saveFlowAssignmentRulesRequestSchema>;
|
|
191
|
+
// ── 흐름 해석(이슈 #115) — 상품의 흐름 → 카테고리(맨 아래)의 흐름 → 기본 흐름. 할당 규칙은 없앴다 ─────────────────
|
|
212
192
|
|
|
213
193
|
export const resolvedFlowSchema = z.object({
|
|
214
194
|
flowId: z.string(),
|
|
215
195
|
version: z.number().int(),
|
|
216
196
|
source: z
|
|
217
|
-
.enum(["
|
|
218
|
-
.describe("
|
|
219
|
-
ruleId: z.string().optional(),
|
|
197
|
+
.enum(["PRODUCT", "CATEGORY", "PLATFORM"])
|
|
198
|
+
.describe("PRODUCT 상품에 지정한 흐름 · CATEGORY 카테고리의 흐름 · PLATFORM 기본 흐름"),
|
|
220
199
|
});
|
|
221
200
|
export type ResolvedFlow = z.infer<typeof resolvedFlowSchema>;
|
|
222
201
|
|
|
223
|
-
export const testFlowAssignmentRequestSchema = z.object({
|
|
224
|
-
productId: z.string(),
|
|
225
|
-
orderAmount: z.number().int().nonnegative().optional(),
|
|
226
|
-
paymentMethod: z.string().optional(),
|
|
227
|
-
member: z.boolean().optional(),
|
|
228
|
-
});
|
|
229
|
-
export type TestFlowAssignmentRequest = z.infer<typeof testFlowAssignmentRequestSchema>;
|
|
230
|
-
|
|
231
202
|
// ─── 플로우 시크릿(이슈 #115 E5b) ─────────────────────────────
|
|
232
203
|
|
|
233
204
|
/** 시크릿 이름 — 플로우 변수 `secretRef`의 값이다 */
|
package/src/schemas/product.ts
CHANGED
|
@@ -397,6 +397,13 @@ export const productSchema = productSummarySchema.extend({
|
|
|
397
397
|
.string()
|
|
398
398
|
.optional()
|
|
399
399
|
.describe("재고 방식(이슈 #118). 날짜별 재고 상품만 `DATED`를 싣는다. 없으면 `STANDARD`"),
|
|
400
|
+
flowId: z
|
|
401
|
+
.string()
|
|
402
|
+
.nullable()
|
|
403
|
+
.optional()
|
|
404
|
+
.describe(
|
|
405
|
+
"주문 흐름(이슈 #115) — 상품에 지정한 흐름. null이면 카테고리의 흐름, 그것도 없으면 기본 흐름",
|
|
406
|
+
),
|
|
400
407
|
fulfillmentTypeLocked: z
|
|
401
408
|
.boolean()
|
|
402
409
|
.describe(
|
|
@@ -672,6 +679,13 @@ const productWriteShape = {
|
|
|
672
679
|
.describe(
|
|
673
680
|
"재고 방식(이슈 #118). `DATED`면 날짜별 달력(`PUT /products/{id}/calendar`)이 재고·가격이고 주문서 줄은 숙박 기간(`stay`)을 받는다. 생략하면 등록은 `STANDARD`, 수정은 지금 값. 판매 이력이 있으면 바꿀 수 없다(409 `INVENTORY_MODE_LOCKED`)",
|
|
674
681
|
),
|
|
682
|
+
flowId: z
|
|
683
|
+
.string()
|
|
684
|
+
.nullable()
|
|
685
|
+
.optional()
|
|
686
|
+
.describe(
|
|
687
|
+
"주문 흐름(이슈 #115) — 게시한 흐름 id. null이면 카테고리의 흐름(없으면 기본 흐름)을 쓴다. 생략하면 등록은 null, 수정은 지금 값. 게시하지 않은 흐름은 409 `FLOW_NOT_PUBLISHED`. 이미 결제된 주문은 결제 때 붙은 흐름을 그대로 따른다",
|
|
688
|
+
),
|
|
675
689
|
};
|
|
676
690
|
|
|
677
691
|
export const productCreateRequestSchema = z.strictObject({
|
|
@@ -705,6 +719,13 @@ export const productPatchRequestSchema = z
|
|
|
705
719
|
name: z.string().max(100).optional(),
|
|
706
720
|
salePrice: z.number().int().multipleOf(10).optional(),
|
|
707
721
|
status: productStatusSchema.optional(),
|
|
722
|
+
flowId: z
|
|
723
|
+
.string()
|
|
724
|
+
.nullable()
|
|
725
|
+
.optional()
|
|
726
|
+
.describe(
|
|
727
|
+
"주문 흐름(이슈 #115) — 게시한 흐름 id, null이면 카테고리의 흐름(없으면 기본 흐름). 생략하면 바꾸지 않는다",
|
|
728
|
+
),
|
|
708
729
|
images: productImagesRequestSchema
|
|
709
730
|
.optional()
|
|
710
731
|
.describe(
|