@sayren/store-sdk 0.37.0 → 0.37.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 CHANGED
@@ -165,8 +165,8 @@ export declare const auditLogPageSchema: z.ZodObject<{
165
165
  }, z.core.$strip>;
166
166
  export type AuditLogPage = z.infer<typeof auditLogPageSchema>;
167
167
  export declare const agentPolicyDecisionSchema: z.ZodEnum<{
168
- APPROVAL_REQUIRED: "APPROVAL_REQUIRED";
169
168
  DENIED: "DENIED";
169
+ APPROVAL_REQUIRED: "APPROVAL_REQUIRED";
170
170
  ALLOW: "ALLOW";
171
171
  }>;
172
172
  export type AgentPolicyDecision = z.infer<typeof agentPolicyDecisionSchema>;
@@ -191,8 +191,8 @@ export type WritePreview = z.infer<typeof writePreviewSchema>;
191
191
  export declare const writeDryRunResultSchema: z.ZodObject<{
192
192
  dryRun: z.ZodLiteral<true>;
193
193
  decision: z.ZodEnum<{
194
- APPROVAL_REQUIRED: "APPROVAL_REQUIRED";
195
194
  DENIED: "DENIED";
195
+ APPROVAL_REQUIRED: "APPROVAL_REQUIRED";
196
196
  ALLOW: "ALLOW";
197
197
  }>;
198
198
  reason: z.ZodNullable<z.ZodString>;
@@ -495,10 +495,10 @@ export type AiRun = z.infer<typeof aiRunSchema>;
495
495
  * AI가 지금 하는 일의 종류 — 도구 이름·operationId·파일 경로로 서버가 정한다(상점 만들기 진행 화면이 아이콘·문구를 고른다). 정하지 못한 도구는 없다
496
496
  */
497
497
  export declare const aiActivitySchema: z.ZodEnum<{
498
- code: "code";
499
- status: "status";
500
498
  check: "check";
499
+ code: "code";
501
500
  version: "version";
501
+ status: "status";
502
502
  shipping: "shipping";
503
503
  category: "category";
504
504
  brief: "brief";
@@ -721,16 +721,16 @@ export declare const aiMessagePartSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
721
721
  name: z.ZodString;
722
722
  label: z.ZodString;
723
723
  status: z.ZodEnum<{
724
- unknown: "unknown";
725
724
  error: "error";
725
+ unknown: "unknown";
726
726
  ok: "ok";
727
727
  }>;
728
728
  summary: z.ZodNullable<z.ZodString>;
729
729
  activity: z.ZodOptional<z.ZodEnum<{
730
- code: "code";
731
- status: "status";
732
730
  check: "check";
731
+ code: "code";
733
732
  version: "version";
733
+ status: "status";
734
734
  shipping: "shipping";
735
735
  category: "category";
736
736
  brief: "brief";
@@ -873,16 +873,16 @@ export declare const aiMessageSchema: z.ZodObject<{
873
873
  name: z.ZodString;
874
874
  label: z.ZodString;
875
875
  status: z.ZodEnum<{
876
- unknown: "unknown";
877
876
  error: "error";
877
+ unknown: "unknown";
878
878
  ok: "ok";
879
879
  }>;
880
880
  summary: z.ZodNullable<z.ZodString>;
881
881
  activity: z.ZodOptional<z.ZodEnum<{
882
- code: "code";
883
- status: "status";
884
882
  check: "check";
883
+ code: "code";
885
884
  version: "version";
885
+ status: "status";
886
886
  shipping: "shipping";
887
887
  category: "category";
888
888
  brief: "brief";
@@ -1040,16 +1040,16 @@ export declare const aiConversationSchema: z.ZodObject<{
1040
1040
  name: z.ZodString;
1041
1041
  label: z.ZodString;
1042
1042
  status: z.ZodEnum<{
1043
- unknown: "unknown";
1044
1043
  error: "error";
1044
+ unknown: "unknown";
1045
1045
  ok: "ok";
1046
1046
  }>;
1047
1047
  summary: z.ZodNullable<z.ZodString>;
1048
1048
  activity: z.ZodOptional<z.ZodEnum<{
1049
- code: "code";
1050
- status: "status";
1051
1049
  check: "check";
1050
+ code: "code";
1052
1051
  version: "version";
1052
+ status: "status";
1053
1053
  shipping: "shipping";
1054
1054
  category: "category";
1055
1055
  brief: "brief";
@@ -1537,10 +1537,10 @@ export declare const aiStreamEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1537
1537
  id: z.ZodOptional<z.ZodString>;
1538
1538
  }, z.core.$strip>>;
1539
1539
  activity: z.ZodOptional<z.ZodEnum<{
1540
- code: "code";
1541
- status: "status";
1542
1540
  check: "check";
1541
+ code: "code";
1543
1542
  version: "version";
1543
+ status: "status";
1544
1544
  shipping: "shipping";
1545
1545
  category: "category";
1546
1546
  brief: "brief";
@@ -1576,8 +1576,8 @@ export declare const aiStreamEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1576
1576
  messageId: z.ZodString;
1577
1577
  toolCallId: z.ZodString;
1578
1578
  status: z.ZodEnum<{
1579
- unknown: "unknown";
1580
1579
  error: "error";
1580
+ unknown: "unknown";
1581
1581
  ok: "ok";
1582
1582
  }>;
1583
1583
  summary: z.ZodNullable<z.ZodString>;
@@ -1640,16 +1640,16 @@ export declare const aiStreamEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1640
1640
  name: z.ZodString;
1641
1641
  label: z.ZodString;
1642
1642
  status: z.ZodEnum<{
1643
- unknown: "unknown";
1644
1643
  error: "error";
1644
+ unknown: "unknown";
1645
1645
  ok: "ok";
1646
1646
  }>;
1647
1647
  summary: z.ZodNullable<z.ZodString>;
1648
1648
  activity: z.ZodOptional<z.ZodEnum<{
1649
- code: "code";
1650
- status: "status";
1651
1649
  check: "check";
1650
+ code: "code";
1652
1651
  version: "version";
1652
+ status: "status";
1653
1653
  shipping: "shipping";
1654
1654
  category: "category";
1655
1655
  brief: "brief";
@@ -1869,10 +1869,10 @@ export declare const aiStreamRecordSchema: z.ZodObject<{
1869
1869
  id: z.ZodOptional<z.ZodString>;
1870
1870
  }, z.core.$strip>>;
1871
1871
  activity: z.ZodOptional<z.ZodEnum<{
1872
- code: "code";
1873
- status: "status";
1874
1872
  check: "check";
1873
+ code: "code";
1875
1874
  version: "version";
1875
+ status: "status";
1876
1876
  shipping: "shipping";
1877
1877
  category: "category";
1878
1878
  brief: "brief";
@@ -1908,8 +1908,8 @@ export declare const aiStreamRecordSchema: z.ZodObject<{
1908
1908
  messageId: z.ZodString;
1909
1909
  toolCallId: z.ZodString;
1910
1910
  status: z.ZodEnum<{
1911
- unknown: "unknown";
1912
1911
  error: "error";
1912
+ unknown: "unknown";
1913
1913
  ok: "ok";
1914
1914
  }>;
1915
1915
  summary: z.ZodNullable<z.ZodString>;
@@ -1972,16 +1972,16 @@ export declare const aiStreamRecordSchema: z.ZodObject<{
1972
1972
  name: z.ZodString;
1973
1973
  label: z.ZodString;
1974
1974
  status: z.ZodEnum<{
1975
- unknown: "unknown";
1976
1975
  error: "error";
1976
+ unknown: "unknown";
1977
1977
  ok: "ok";
1978
1978
  }>;
1979
1979
  summary: z.ZodNullable<z.ZodString>;
1980
1980
  activity: z.ZodOptional<z.ZodEnum<{
1981
- code: "code";
1982
- status: "status";
1983
1981
  check: "check";
1982
+ code: "code";
1984
1983
  version: "version";
1984
+ status: "status";
1985
1985
  shipping: "shipping";
1986
1986
  category: "category";
1987
1987
  brief: "brief";
@@ -11662,13 +11662,13 @@ export declare const discountSchema: z.ZodObject<{
11662
11662
  }, z.core.$strip>;
11663
11663
  export type Discount = z.infer<typeof discountSchema>;
11664
11664
  export declare const productSchema: z.ZodObject<{
11665
+ salePrice: z.ZodNumber;
11665
11666
  status: z.ZodEnum<{
11666
11667
  SALE: "SALE";
11667
11668
  SUSPENDED: "SUSPENDED";
11668
11669
  OUT_OF_STOCK: "OUT_OF_STOCK";
11669
11670
  CLOSED: "CLOSED";
11670
11671
  }>;
11671
- salePrice: z.ZodNumber;
11672
11672
  name: z.ZodString;
11673
11673
  stockQuantity: z.ZodNumber;
11674
11674
  categoryId: z.ZodNullable<z.ZodString>;
@@ -12722,9 +12722,9 @@ export type ProductPatchRequest = z.infer<typeof productPatchRequestSchema>;
12722
12722
  export declare const productSortSchema: z.ZodEnum<{
12723
12723
  "createdAt.desc": "createdAt.desc";
12724
12724
  "createdAt.asc": "createdAt.asc";
12725
- "updatedAt.desc": "updatedAt.desc";
12726
12725
  "salePrice.asc": "salePrice.asc";
12727
12726
  "salePrice.desc": "salePrice.desc";
12727
+ "updatedAt.desc": "updatedAt.desc";
12728
12728
  }>;
12729
12729
  export type ProductSort = z.infer<typeof productSortSchema>;
12730
12730
  export interface ProductListParams extends PageParams {
@@ -12753,9 +12753,9 @@ export declare const productListQuerySchema: z.ZodObject<{
12753
12753
  sort: z.ZodOptional<z.ZodEnum<{
12754
12754
  "createdAt.desc": "createdAt.desc";
12755
12755
  "createdAt.asc": "createdAt.asc";
12756
- "updatedAt.desc": "updatedAt.desc";
12757
12756
  "salePrice.asc": "salePrice.asc";
12758
12757
  "salePrice.desc": "salePrice.desc";
12758
+ "updatedAt.desc": "updatedAt.desc";
12759
12759
  }>>;
12760
12760
  }, z.core.$strip>;
12761
12761
  export declare const discountRequestSchema: z.ZodObject<{
@@ -13909,6 +13909,7 @@ export declare const storefrontVersionSchema: z.ZodObject<{
13909
13909
  createdVia: z.ZodOptional<z.ZodNullable<z.ZodString>>;
13910
13910
  gitRef: z.ZodOptional<z.ZodNullable<z.ZodString>>;
13911
13911
  commitSha: z.ZodOptional<z.ZodNullable<z.ZodString>>;
13912
+ mainChanged: z.ZodOptional<z.ZodBoolean>;
13912
13913
  createdAt: z.ZodString;
13913
13914
  previewable: z.ZodOptional<z.ZodBoolean>;
13914
13915
  }, z.core.$strip>;
@@ -14035,6 +14036,7 @@ export declare const storefrontSiteSchema: z.ZodObject<{
14035
14036
  createdVia: z.ZodOptional<z.ZodNullable<z.ZodString>>;
14036
14037
  gitRef: z.ZodOptional<z.ZodNullable<z.ZodString>>;
14037
14038
  commitSha: z.ZodOptional<z.ZodNullable<z.ZodString>>;
14039
+ mainChanged: z.ZodOptional<z.ZodBoolean>;
14038
14040
  createdAt: z.ZodString;
14039
14041
  previewable: z.ZodOptional<z.ZodBoolean>;
14040
14042
  }, z.core.$strip>>;
@@ -14124,6 +14126,7 @@ export declare const storefrontHostingSchema: z.ZodObject<{
14124
14126
  createdVia: z.ZodOptional<z.ZodNullable<z.ZodString>>;
14125
14127
  gitRef: z.ZodOptional<z.ZodNullable<z.ZodString>>;
14126
14128
  commitSha: z.ZodOptional<z.ZodNullable<z.ZodString>>;
14129
+ mainChanged: z.ZodOptional<z.ZodBoolean>;
14127
14130
  createdAt: z.ZodString;
14128
14131
  previewable: z.ZodOptional<z.ZodBoolean>;
14129
14132
  }, z.core.$strip>>;
@@ -14973,6 +14976,7 @@ export declare const storefrontVersionCreatedSchema: z.ZodObject<{
14973
14976
  createdVia: z.ZodOptional<z.ZodNullable<z.ZodString>>;
14974
14977
  gitRef: z.ZodOptional<z.ZodNullable<z.ZodString>>;
14975
14978
  commitSha: z.ZodOptional<z.ZodNullable<z.ZodString>>;
14979
+ mainChanged: z.ZodOptional<z.ZodBoolean>;
14976
14980
  createdAt: z.ZodString;
14977
14981
  previewable: z.ZodOptional<z.ZodBoolean>;
14978
14982
  }, z.core.$strip>;
@@ -15530,8 +15534,8 @@ export declare function createStoreClient(options: StoreClientOptions): {
15530
15534
  }[];
15531
15535
  }>;
15532
15536
  get: (productId: string) => Promise<{
15533
- status: "SALE" | "SUSPENDED" | "OUT_OF_STOCK" | "CLOSED";
15534
15537
  salePrice: number;
15538
+ status: "SALE" | "SUSPENDED" | "OUT_OF_STOCK" | "CLOSED";
15535
15539
  name: string;
15536
15540
  stockQuantity: number;
15537
15541
  categoryId: string | null;
@@ -15679,8 +15683,8 @@ export declare function createStoreClient(options: StoreClientOptions): {
15679
15683
  createdAt?: string | undefined;
15680
15684
  }>;
15681
15685
  create: (body: ProductCreateRequestInput, idempotencyKey?: string) => Promise<{
15682
- status: "SALE" | "SUSPENDED" | "OUT_OF_STOCK" | "CLOSED";
15683
15686
  salePrice: number;
15687
+ status: "SALE" | "SUSPENDED" | "OUT_OF_STOCK" | "CLOSED";
15684
15688
  name: string;
15685
15689
  stockQuantity: number;
15686
15690
  categoryId: string | null;
@@ -15828,8 +15832,8 @@ export declare function createStoreClient(options: StoreClientOptions): {
15828
15832
  createdAt?: string | undefined;
15829
15833
  }>;
15830
15834
  update: (productId: string, body: ProductReplaceRequestInput) => Promise<{
15831
- status: "SALE" | "SUSPENDED" | "OUT_OF_STOCK" | "CLOSED";
15832
15835
  salePrice: number;
15836
+ status: "SALE" | "SUSPENDED" | "OUT_OF_STOCK" | "CLOSED";
15833
15837
  name: string;
15834
15838
  stockQuantity: number;
15835
15839
  categoryId: string | null;
@@ -22550,9 +22554,9 @@ export declare function createStoreClient(options: StoreClientOptions): {
22550
22554
  toolCallId: string;
22551
22555
  name: string;
22552
22556
  label: string;
22553
- status: "unknown" | "error" | "ok";
22557
+ status: "error" | "unknown" | "ok";
22554
22558
  summary: string | null;
22555
- activity?: "code" | "status" | "check" | "version" | "shipping" | "category" | "brief" | "files" | "preview" | "template" | "site" | "info" | "upload" | "design" | "product" | "verify" | undefined;
22559
+ activity?: "check" | "code" | "version" | "status" | "shipping" | "category" | "brief" | "files" | "preview" | "template" | "site" | "info" | "upload" | "design" | "product" | "verify" | undefined;
22556
22560
  target?: string | undefined;
22557
22561
  changes?: {
22558
22562
  path: string;
@@ -22778,6 +22782,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
22778
22782
  createdVia?: string | null | undefined;
22779
22783
  gitRef?: string | null | undefined;
22780
22784
  commitSha?: string | null | undefined;
22785
+ mainChanged?: boolean | undefined;
22781
22786
  previewable?: boolean | undefined;
22782
22787
  } | null;
22783
22788
  provisioning: {
@@ -22845,6 +22850,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
22845
22850
  createdVia?: string | null | undefined;
22846
22851
  gitRef?: string | null | undefined;
22847
22852
  commitSha?: string | null | undefined;
22853
+ mainChanged?: boolean | undefined;
22848
22854
  previewable?: boolean | undefined;
22849
22855
  } | null;
22850
22856
  provisioning: {
@@ -22950,6 +22956,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
22950
22956
  createdVia?: string | null | undefined;
22951
22957
  gitRef?: string | null | undefined;
22952
22958
  commitSha?: string | null | undefined;
22959
+ mainChanged?: boolean | undefined;
22953
22960
  previewable?: boolean | undefined;
22954
22961
  } | null;
22955
22962
  provisioning: {
@@ -22991,6 +22998,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
22991
22998
  createdVia?: string | null | undefined;
22992
22999
  gitRef?: string | null | undefined;
22993
23000
  commitSha?: string | null | undefined;
23001
+ mainChanged?: boolean | undefined;
22994
23002
  previewable?: boolean | undefined;
22995
23003
  }[]>;
22996
23004
  /** `POST /v1/storefront/site/versions/{versionId}/publish` — 그 버전을 발행한다(이미 발행돼 있으면 그대로 200) */
@@ -23026,6 +23034,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
23026
23034
  createdVia?: string | null | undefined;
23027
23035
  gitRef?: string | null | undefined;
23028
23036
  commitSha?: string | null | undefined;
23037
+ mainChanged?: boolean | undefined;
23029
23038
  previewable?: boolean | undefined;
23030
23039
  } | null;
23031
23040
  provisioning: {
@@ -23083,6 +23092,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
23083
23092
  createdVia?: string | null | undefined;
23084
23093
  gitRef?: string | null | undefined;
23085
23094
  commitSha?: string | null | undefined;
23095
+ mainChanged?: boolean | undefined;
23086
23096
  previewable?: boolean | undefined;
23087
23097
  } | null;
23088
23098
  provisioning: {
@@ -23140,6 +23150,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
23140
23150
  createdVia?: string | null | undefined;
23141
23151
  gitRef?: string | null | undefined;
23142
23152
  commitSha?: string | null | undefined;
23153
+ mainChanged?: boolean | undefined;
23143
23154
  previewable?: boolean | undefined;
23144
23155
  } | null;
23145
23156
  provisioning: {
@@ -23197,6 +23208,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
23197
23208
  createdVia?: string | null | undefined;
23198
23209
  gitRef?: string | null | undefined;
23199
23210
  commitSha?: string | null | undefined;
23211
+ mainChanged?: boolean | undefined;
23200
23212
  previewable?: boolean | undefined;
23201
23213
  } | null;
23202
23214
  provisioning: {
@@ -23402,6 +23414,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
23402
23414
  createdVia?: string | null | undefined;
23403
23415
  gitRef?: string | null | undefined;
23404
23416
  commitSha?: string | null | undefined;
23417
+ mainChanged?: boolean | undefined;
23405
23418
  previewable?: boolean | undefined;
23406
23419
  } | null;
23407
23420
  provisioning: {
@@ -23650,6 +23663,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
23650
23663
  createdVia?: string | null | undefined;
23651
23664
  gitRef?: string | null | undefined;
23652
23665
  commitSha?: string | null | undefined;
23666
+ mainChanged?: boolean | undefined;
23653
23667
  previewable?: boolean | undefined;
23654
23668
  };
23655
23669
  build: {
@@ -23984,6 +23998,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
23984
23998
  createdVia?: string | null | undefined;
23985
23999
  gitRef?: string | null | undefined;
23986
24000
  commitSha?: string | null | undefined;
24001
+ mainChanged?: boolean | undefined;
23987
24002
  previewable?: boolean | undefined;
23988
24003
  } | null;
23989
24004
  provisioning: {
package/dist/index.mjs CHANGED
@@ -2026,6 +2026,7 @@ const storefrontVersionSchema = z.object({
2026
2026
  createdVia: z.string().nullable().optional().describe("만든 경로 (`CONSOLE` 상점 플랫폼 · `AI` AI 에이전트(MCP) · `CLI` `sayren` CLI · `API` 관리 API · `SYSTEM` 자동 · `GIT` 연결한 저장소 push). 늘어날 수 있다"),
2027
2027
  gitRef: z.string().nullable().optional().describe("연결한 저장소의 push로 만든 버전의 브랜치. 그 밖은 null"),
2028
2028
  commitSha: z.string().nullable().optional().describe("이 버전 소스를 담은 저장소 커밋(Git 원천 사이트). 저장소에 없는 버전은 null"),
2029
+ mainChanged: z.boolean().optional().describe("이 버전을 만든 뒤 운영 브랜치가 바뀌어 발행할 수 없다(발행하면 409 `STOREFRONT_MAIN_CHANGED`). 최신 운영 브랜치를 합친 버전을 만든다. 버전 목록에만 싣는다"),
2029
2030
  createdAt: z.string().describe("만든 시각 (ISO 8601)"),
2030
2031
  previewable: z.boolean().optional().describe("미리보기 주소로 열 수 있는가 (`POST /v1/storefront/site/preview-link`의 `versionId`). 보관 기간이 지난 버전은 false")
2031
2032
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sayren/store-sdk",
3
- "version": "0.37.0",
3
+ "version": "0.37.1",
4
4
  "main": "./dist/index.mjs",
5
5
  "types": "./dist/index.d.mts",
6
6
  "exports": {
@@ -285,6 +285,12 @@ export const storefrontVersionSchema = z.object({
285
285
  .nullable()
286
286
  .optional()
287
287
  .describe("이 버전 소스를 담은 저장소 커밋(Git 원천 사이트). 저장소에 없는 버전은 null"),
288
+ mainChanged: z
289
+ .boolean()
290
+ .optional()
291
+ .describe(
292
+ "이 버전을 만든 뒤 운영 브랜치가 바뀌어 발행할 수 없다(발행하면 409 `STOREFRONT_MAIN_CHANGED`). 최신 운영 브랜치를 합친 버전을 만든다. 버전 목록에만 싣는다",
293
+ ),
288
294
  createdAt: z.string().describe("만든 시각 (ISO 8601)"),
289
295
  previewable: z
290
296
  .boolean()