@epcc-sdk/sdks-files 0.2.0 → 0.3.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.
@@ -1,26 +1,54 @@
1
- import { z } from "zod";
1
+ import * as z from "zod";
2
2
  const zFileMeta = z.object({
3
3
  timestamps: z.object({
4
- created_at: z.string().optional()
4
+ created_at: z.string().register(z.globalRegistry, {
5
+ description: "The date and time the file was created."
6
+ }).optional()
7
+ }).register(z.globalRegistry, {
8
+ description: "The date and time the file was created."
5
9
  }).optional(),
6
10
  dimensions: z.object({
7
- width: z.number().int().optional(),
8
- height: z.number().int().optional()
11
+ width: z.int().register(z.globalRegistry, {
12
+ description: "The width of the file."
13
+ }).optional(),
14
+ height: z.int().register(z.globalRegistry, {
15
+ description: "The height of the file."
16
+ }).optional()
17
+ }).register(z.globalRegistry, {
18
+ description: "The file dimensions."
9
19
  }).optional()
10
20
  });
11
21
  const zResultsMeta = z.object({
12
22
  page: z.object({
13
- limit: z.number().int().optional(),
14
- offset: z.number().int().optional(),
15
- current: z.number().int().optional(),
16
- total: z.number().int().optional()
23
+ limit: z.int().register(z.globalRegistry, {
24
+ description: "The maximum number of records for all pages."
25
+ }).optional(),
26
+ offset: z.int().register(z.globalRegistry, {
27
+ description: "The current offset by number of pages."
28
+ }).optional(),
29
+ current: z.int().register(z.globalRegistry, {
30
+ description: "The current number of pages."
31
+ }).optional(),
32
+ total: z.int().register(z.globalRegistry, {
33
+ description: "The total number of records for the entire collection."
34
+ }).optional()
35
+ }).register(z.globalRegistry, {
36
+ description: "Contains the results for the entire collection."
17
37
  }).optional(),
18
38
  results: z.object({
19
- total: z.number().int().optional()
39
+ total: z.int().register(z.globalRegistry, {
40
+ description: "The total number of records for the entire collection."
41
+ }).optional()
42
+ }).register(z.globalRegistry, {
43
+ description: "Contains the results for the entire collection."
20
44
  }).optional()
21
45
  });
22
46
  const zLinks = z.object({
23
- self: z.string().optional()
47
+ self: z.string().register(z.globalRegistry, {
48
+ description: "Single entities use a self parameter with a link to that specific resource."
49
+ }).optional()
50
+ }).register(z.globalRegistry, {
51
+ description: "Links are used to allow you to move between requests."
24
52
  });
25
53
  const zResultsLinks = z.object({
26
54
  self: z.string().nullish(),
@@ -29,70 +57,122 @@ const zResultsLinks = z.object({
29
57
  last: z.string().nullish(),
30
58
  prev: z.string().nullish(),
31
59
  next: z.string().nullish()
60
+ }).register(z.globalRegistry, {
61
+ description: "Links are used to allow you to move between requests."
32
62
  });
33
63
  const zFileLink = z.object({
34
- href: z.string().optional()
64
+ href: z.string().register(z.globalRegistry, {
65
+ description: "The publicly available URL for this file."
66
+ }).optional()
67
+ }).register(z.globalRegistry, {
68
+ description: "The publicly available URL for this file."
35
69
  });
36
- const zUuid = z.string().uuid();
70
+ const zUuid = z.uuid();
37
71
  const zFile = z.object({
38
72
  id: zUuid.optional(),
39
- type: z.string().optional(),
40
- file_name: z.string().optional(),
41
- mime_type: z.string().optional(),
42
- file_size: z.number().int().optional(),
43
- public: z.boolean().optional(),
73
+ type: z.string().register(z.globalRegistry, {
74
+ description: "The type represents the object being returned."
75
+ }).optional(),
76
+ file_name: z.string().register(z.globalRegistry, {
77
+ description: "The name of the file."
78
+ }).optional(),
79
+ mime_type: z.string().register(z.globalRegistry, {
80
+ description: "The mime type of the file."
81
+ }).optional(),
82
+ file_size: z.int().register(z.globalRegistry, {
83
+ description: "The size of the file. Required when uploading files."
84
+ }).optional(),
85
+ public: z.boolean().register(z.globalRegistry, {
86
+ description: "DEPRECATED Whether the file public or not. Required when uploading files."
87
+ }).optional(),
44
88
  meta: zFileMeta.optional(),
45
89
  links: zLinks.optional(),
46
90
  link: zFileLink.optional()
47
91
  });
48
92
  const zError = z.object({
49
- status: z.number().int(),
50
- title: z.string(),
51
- detail: z.string().optional(),
52
- request_id: z.string().optional(),
53
- meta: z.record(z.unknown()).optional()
93
+ status: z.int().register(z.globalRegistry, {
94
+ description: "The HTTP response code of the error."
95
+ }),
96
+ title: z.string().register(z.globalRegistry, {
97
+ description: "A brief summary of the error."
98
+ }),
99
+ detail: z.string().register(z.globalRegistry, {
100
+ description: "Optional additional detail about the error."
101
+ }).optional(),
102
+ request_id: z.string().register(z.globalRegistry, {
103
+ description: "Internal request ID."
104
+ }).optional(),
105
+ meta: z.record(z.string(), z.unknown()).register(z.globalRegistry, {
106
+ description: "Additional supporting meta data for the error."
107
+ }).optional()
54
108
  });
55
109
  const zErrorResponse = z.object({
56
110
  errors: z.array(zError)
57
111
  });
58
- const zFilter = z.string();
112
+ const zFilter = z.string().register(z.globalRegistry, {
113
+ description: "\nFiltering is available for this endpoint. See [Filtering](/docs/api/pxm/files/get-all-files#filtering).\n"
114
+ });
59
115
  const zPageOffset = z.preprocess(
60
116
  (v) => typeof v === "string" ? Number(v) : v,
61
117
  z.number().int().gte(0).lte(1e4)
62
- );
118
+ ).register(z.globalRegistry, {
119
+ description: "The current offset by number of records, not pages. Offset is zero-based. The maximum records you can offset is 10,000. If no page size is set, the [**page length**](/docs/commerce-cloud/global-project-settings/settings-overview#page-length) store setting is used."
120
+ });
63
121
  const zPageLimit = z.preprocess(
64
122
  (v) => typeof v === "string" ? Number(v) : v,
65
123
  z.number().int().gte(0).lte(1e4)
66
- );
124
+ ).register(z.globalRegistry, {
125
+ description: "The maximum number of records per page for this response. You can set this value up to 100. If no page size is set, the the [**page length**](/docs/commerce-cloud/global-project-settings/settings-overview#page-length) store setting is used."
126
+ });
67
127
  const zGetAllFilesQuery = z.object({
68
- filter: z.string().optional(),
128
+ filter: z.string().register(z.globalRegistry, {
129
+ description: "\nFiltering is available for this endpoint. See [Filtering](/docs/api/pxm/files/get-all-files#filtering).\n"
130
+ }).optional(),
69
131
  "page[limit]": z.preprocess(
70
132
  (v) => typeof v === "string" ? Number(v) : v,
71
133
  z.number().int().gte(0).lte(1e4)
72
- ).optional(),
134
+ ).register(z.globalRegistry, {
135
+ description: "The maximum number of records per page for this response. You can set this value up to 100. If no page size is set, the the [**page length**](/docs/commerce-cloud/global-project-settings/settings-overview#page-length) store setting is used."
136
+ }).optional(),
73
137
  "page[offset]": z.preprocess(
74
138
  (v) => typeof v === "string" ? Number(v) : v,
75
139
  z.number().int().gte(0).lte(1e4)
76
- ).optional()
140
+ ).register(z.globalRegistry, {
141
+ description: "The current offset by number of records, not pages. Offset is zero-based. The maximum records you can offset is 10,000. If no page size is set, the [**page length**](/docs/commerce-cloud/global-project-settings/settings-overview#page-length) store setting is used."
142
+ }).optional()
77
143
  });
78
144
  const zGetAllFilesResponse = z.object({
79
145
  data: z.array(zFile).optional(),
80
146
  meta: zResultsMeta.optional(),
81
147
  links: zResultsLinks.optional()
148
+ }).register(z.globalRegistry, {
149
+ description: "OK"
82
150
  });
83
151
  const zCreateAFileBody = z.object({
84
- file: z.string().optional(),
85
- file_location: z.string().optional()
152
+ file: z.string().register(z.globalRegistry, {
153
+ description: "Indicates the file you want to upload."
154
+ }).optional(),
155
+ file_location: z.string().register(z.globalRegistry, {
156
+ description: "Use this parameter to reference a file stored at a specific location. This must be the URL that points to an image file."
157
+ }).optional()
86
158
  });
87
159
  const zCreateAFileResponse = z.object({
88
160
  data: zFile.optional()
161
+ }).register(z.globalRegistry, {
162
+ description: "Created"
89
163
  });
90
164
  const zDeleteAFilePath = z.object({
91
- fileID: z.string()
165
+ fileID: z.string().register(z.globalRegistry, {
166
+ description: "The unique identifier of the file you want to delete."
167
+ })
168
+ });
169
+ const zDeleteAFileResponse = z.void().register(z.globalRegistry, {
170
+ description: "No Content"
92
171
  });
93
- const zDeleteAFileResponse = z.void();
94
172
  const zGetAFilePath = z.object({
95
- fileID: z.string()
173
+ fileID: z.string().register(z.globalRegistry, {
174
+ description: "The unique identifier for a file."
175
+ })
96
176
  });
97
177
  const zGetAFileResponse = z.object({
98
178
  data: zFile.optional()
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/client/zod.gen.ts"],"sourcesContent":["// This file is auto-generated by @hey-api/openapi-ts\n\nimport { z } from \"zod\"\n\nexport const zFileMeta = z.object({\n timestamps: z\n .object({\n created_at: z.string().optional(),\n })\n .optional(),\n dimensions: z\n .object({\n width: z.number().int().optional(),\n height: z.number().int().optional(),\n })\n .optional(),\n})\n\nexport const zResultsMeta = z.object({\n page: z\n .object({\n limit: z.number().int().optional(),\n offset: z.number().int().optional(),\n current: z.number().int().optional(),\n total: z.number().int().optional(),\n })\n .optional(),\n results: z\n .object({\n total: z.number().int().optional(),\n })\n .optional(),\n})\n\n/**\n * Links are used to allow you to move between requests.\n */\nexport const zLinks = z.object({\n self: z.string().optional(),\n})\n\n/**\n * Links are used to allow you to move between requests.\n */\nexport const zResultsLinks = z.object({\n self: z.string().nullish(),\n current: z.string().nullish(),\n first: z.string().nullish(),\n last: z.string().nullish(),\n prev: z.string().nullish(),\n next: z.string().nullish(),\n})\n\n/**\n * The publicly available URL for this file.\n */\nexport const zFileLink = z.object({\n href: z.string().optional(),\n})\n\nexport const zUuid = z.string().uuid()\n\nexport const zFile = z.object({\n id: zUuid.optional(),\n type: z.string().optional(),\n file_name: z.string().optional(),\n mime_type: z.string().optional(),\n file_size: z.number().int().optional(),\n public: z.boolean().optional(),\n meta: zFileMeta.optional(),\n links: zLinks.optional(),\n link: zFileLink.optional(),\n})\n\nexport const zError = z.object({\n status: z.number().int(),\n title: z.string(),\n detail: z.string().optional(),\n request_id: z.string().optional(),\n meta: z.record(z.unknown()).optional(),\n})\n\nexport const zErrorResponse = z.object({\n errors: z.array(zError),\n})\n\n/**\n *\n * Filtering is available for this endpoint. See [Filtering](/docs/api/pxm/files/get-all-files#filtering).\n *\n */\nexport const zFilter = z.string()\n\n/**\n * The current offset by number of records, not pages. Offset is zero-based. The maximum records you can offset is 10,000. If no page size is set, the [**page length**](/docs/commerce-cloud/global-project-settings/settings-overview#page-length) store setting is used.\n */\nexport const zPageOffset = z.preprocess(\n (v) => (typeof v === \"string\" ? Number(v) : v),\n z.number().int().gte(0).lte(10000),\n)\n\n/**\n * The maximum number of records per page for this response. You can set this value up to 100. If no page size is set, the the [**page length**](/docs/commerce-cloud/global-project-settings/settings-overview#page-length) store setting is used.\n */\nexport const zPageLimit = z.preprocess(\n (v) => (typeof v === \"string\" ? Number(v) : v),\n z.number().int().gte(0).lte(10000),\n)\n\nexport const zGetAllFilesQuery = z.object({\n filter: z.string().optional(),\n \"page[limit]\": z\n .preprocess(\n (v) => (typeof v === \"string\" ? Number(v) : v),\n z.number().int().gte(0).lte(10000),\n )\n .optional(),\n \"page[offset]\": z\n .preprocess(\n (v) => (typeof v === \"string\" ? Number(v) : v),\n z.number().int().gte(0).lte(10000),\n )\n .optional(),\n})\n\n/**\n * OK\n */\nexport const zGetAllFilesResponse = z.object({\n data: z.array(zFile).optional(),\n meta: zResultsMeta.optional(),\n links: zResultsLinks.optional(),\n})\n\nexport const zCreateAFileBody = z.object({\n file: z.string().optional(),\n file_location: z.string().optional(),\n})\n\n/**\n * Created\n */\nexport const zCreateAFileResponse = z.object({\n data: zFile.optional(),\n})\n\nexport const zDeleteAFilePath = z.object({\n fileID: z.string(),\n})\n\n/**\n * No Content\n */\nexport const zDeleteAFileResponse = z.void()\n\nexport const zGetAFilePath = z.object({\n fileID: z.string(),\n})\n\nexport const zGetAFileResponse = z.object({\n data: zFile.optional(),\n})\n"],"mappings":"AAEA,SAAS,SAAS;AAEX,MAAM,YAAY,EAAE,OAAO;AAAA,EAChC,YAAY,EACT,OAAO;AAAA,IACN,YAAY,EAAE,OAAO,EAAE,SAAS;AAAA,EAClC,CAAC,EACA,SAAS;AAAA,EACZ,YAAY,EACT,OAAO;AAAA,IACN,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS;AAAA,IACjC,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS;AAAA,EACpC,CAAC,EACA,SAAS;AACd,CAAC;AAEM,MAAM,eAAe,EAAE,OAAO;AAAA,EACnC,MAAM,EACH,OAAO;AAAA,IACN,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS;AAAA,IACjC,QAAQ,EAAE,O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aAAa,SAAS;AAAA,EAC5B,OAAO,cAAc,SAAS;AAChC,CAAC;AAEM,MAAM,mBAAmB,EAAE,OAAO;AAAA,EACvC,MAAM,EAAE,OAAO,EAAE,SAAS;AAAA,EAC1B,eAAe,EAAE,OAAO,EAAE,SAAS;AACrC,CAAC;AAKM,MAAM,uBAAuB,EAAE,OAAO;AAAA,EAC3C,MAAM,MAAM,SAAS;AACvB,CAAC;AAEM,MAAM,mBAAmB,EAAE,OAAO;AAAA,EACvC,QAAQ,EAAE,OAAO;AACnB,CAAC;AAKM,MAAM,uBAAuB,EAAE,KAAK;AAEpC,MAAM,gBAAgB,EAAE,OAAO;AAAA,EACpC,QAAQ,EAAE,OAAO;AACnB,CAAC;AAEM,MAAM,oBAAoB,EAAE,OAAO;AAAA,EACxC,MAAM,MAAM,SAAS;AACvB,CAAC;","names":[]}
1
+ {"version":3,"sources":["../../src/client/zod.gen.ts"],"sourcesContent":["// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as z from \"zod\"\n\nexport const zFileMeta = z.object({\n timestamps: z\n .object({\n created_at: z\n .string()\n .register(z.globalRegistry, {\n description: \"The date and time the file was created.\",\n })\n .optional(),\n })\n .register(z.globalRegistry, {\n description: \"The date and time the file was created.\",\n })\n .optional(),\n dimensions: z\n .object({\n width: z\n .int()\n .register(z.globalRegistry, {\n description: \"The width of the file.\",\n })\n .optional(),\n height: z\n .int()\n .register(z.globalRegistry, {\n description: \"The height of the file.\",\n })\n .optional(),\n })\n .register(z.globalRegistry, {\n description: \"The file dimensions.\",\n })\n .optional(),\n})\n\nexport const zResultsMeta = z.object({\n page: z\n .object({\n limit: z\n .int()\n .register(z.globalRegistry, {\n description: \"The maximum number of records for all pages.\",\n })\n .optional(),\n offset: z\n .int()\n .register(z.globalRegistry, {\n description: \"The current offset by number of pages.\",\n })\n .optional(),\n current: z\n .int()\n .register(z.globalRegistry, {\n description: \"The current number of pages.\",\n })\n .optional(),\n total: z\n .int()\n .register(z.globalRegistry, {\n description: \"The total number of records for the entire collection.\",\n })\n .optional(),\n })\n .register(z.globalRegistry, {\n description: \"Contains the results for the entire collection.\",\n })\n .optional(),\n results: z\n .object({\n total: z\n .int()\n .register(z.globalRegistry, {\n description: \"The total number of records for the entire collection.\",\n })\n .optional(),\n })\n .register(z.globalRegistry, {\n description: \"Contains the results for the entire collection.\",\n })\n .optional(),\n})\n\n/**\n * Links are used to allow you to move between requests.\n */\nexport const zLinks = z\n .object({\n self: z\n .string()\n .register(z.globalRegistry, {\n description:\n \"Single entities use a self parameter with a link to that specific resource.\",\n })\n .optional(),\n })\n .register(z.globalRegistry, {\n description: \"Links are used to allow you to move between requests.\",\n })\n\n/**\n * Links are used to allow you to move between requests.\n */\nexport const zResultsLinks = z\n .object({\n self: z.string().nullish(),\n current: z.string().nullish(),\n first: z.string().nullish(),\n last: z.string().nullish(),\n prev: z.string().nullish(),\n next: z.string().nullish(),\n })\n .register(z.globalRegistry, {\n description: \"Links are used to allow you to move between requests.\",\n })\n\n/**\n * The publicly available URL for this file.\n */\nexport const zFileLink = z\n .object({\n href: z\n .string()\n .register(z.globalRegistry, {\n description: \"The publicly available URL for this file.\",\n })\n .optional(),\n })\n .register(z.globalRegistry, {\n description: \"The publicly available URL for this file.\",\n })\n\nexport const zUuid = z.uuid()\n\nexport const zFile = z.object({\n id: zUuid.optional(),\n type: z\n .string()\n .register(z.globalRegistry, {\n description: \"The type represents the object being returned.\",\n })\n .optional(),\n file_name: z\n .string()\n .register(z.globalRegistry, {\n description: \"The name of the file.\",\n })\n .optional(),\n mime_type: z\n .string()\n .register(z.globalRegistry, {\n description: \"The mime type of the file.\",\n })\n .optional(),\n file_size: z\n .int()\n .register(z.globalRegistry, {\n description: \"The size of the file. Required when uploading files.\",\n })\n .optional(),\n public: z\n .boolean()\n .register(z.globalRegistry, {\n description:\n \"DEPRECATED Whether the file public or not. Required when uploading files.\",\n })\n .optional(),\n meta: zFileMeta.optional(),\n links: zLinks.optional(),\n link: zFileLink.optional(),\n})\n\nexport const zError = z.object({\n status: z.int().register(z.globalRegistry, {\n description: \"The HTTP response code of the error.\",\n }),\n title: z.string().register(z.globalRegistry, {\n description: \"A brief summary of the error.\",\n }),\n detail: z\n .string()\n .register(z.globalRegistry, {\n description: \"Optional additional detail about the error.\",\n })\n .optional(),\n request_id: z\n .string()\n .register(z.globalRegistry, {\n description: \"Internal request ID.\",\n })\n .optional(),\n meta: z\n .record(z.string(), z.unknown())\n .register(z.globalRegistry, {\n description: \"Additional supporting meta data for the error.\",\n })\n .optional(),\n})\n\nexport const zErrorResponse = z.object({\n errors: z.array(zError),\n})\n\n/**\n *\n * Filtering is available for this endpoint. See [Filtering](/docs/api/pxm/files/get-all-files#filtering).\n *\n */\nexport const zFilter = z.string().register(z.globalRegistry, {\n description:\n \"\\nFiltering is available for this endpoint. See [Filtering](/docs/api/pxm/files/get-all-files#filtering).\\n\",\n})\n\n/**\n * The current offset by number of records, not pages. Offset is zero-based. The maximum records you can offset is 10,000. If no page size is set, the [**page length**](/docs/commerce-cloud/global-project-settings/settings-overview#page-length) store setting is used.\n */\nexport const zPageOffset = z\n .preprocess(\n (v) => (typeof v === \"string\" ? Number(v) : v),\n z.number().int().gte(0).lte(10000),\n )\n .register(z.globalRegistry, {\n description:\n \"The current offset by number of records, not pages. Offset is zero-based. The maximum records you can offset is 10,000. If no page size is set, the [**page length**](/docs/commerce-cloud/global-project-settings/settings-overview#page-length) store setting is used.\",\n })\n\n/**\n * The maximum number of records per page for this response. You can set this value up to 100. If no page size is set, the the [**page length**](/docs/commerce-cloud/global-project-settings/settings-overview#page-length) store setting is used.\n */\nexport const zPageLimit = z\n .preprocess(\n (v) => (typeof v === \"string\" ? Number(v) : v),\n z.number().int().gte(0).lte(10000),\n )\n .register(z.globalRegistry, {\n description:\n \"The maximum number of records per page for this response. You can set this value up to 100. If no page size is set, the the [**page length**](/docs/commerce-cloud/global-project-settings/settings-overview#page-length) store setting is used.\",\n })\n\nexport const zGetAllFilesQuery = z.object({\n filter: z\n .string()\n .register(z.globalRegistry, {\n description:\n \"\\nFiltering is available for this endpoint. See [Filtering](/docs/api/pxm/files/get-all-files#filtering).\\n\",\n })\n .optional(),\n \"page[limit]\": z\n .preprocess(\n (v) => (typeof v === \"string\" ? Number(v) : v),\n z.number().int().gte(0).lte(10000),\n )\n .register(z.globalRegistry, {\n description:\n \"The maximum number of records per page for this response. You can set this value up to 100. If no page size is set, the the [**page length**](/docs/commerce-cloud/global-project-settings/settings-overview#page-length) store setting is used.\",\n })\n .optional(),\n \"page[offset]\": z\n .preprocess(\n (v) => (typeof v === \"string\" ? Number(v) : v),\n z.number().int().gte(0).lte(10000),\n )\n .register(z.globalRegistry, {\n description:\n \"The current offset by number of records, not pages. Offset is zero-based. The maximum records you can offset is 10,000. If no page size is set, the [**page length**](/docs/commerce-cloud/global-project-settings/settings-overview#page-length) store setting is used.\",\n })\n .optional(),\n})\n\n/**\n * OK\n */\nexport const zGetAllFilesResponse = z\n .object({\n data: z.array(zFile).optional(),\n meta: zResultsMeta.optional(),\n links: zResultsLinks.optional(),\n })\n .register(z.globalRegistry, {\n description: \"OK\",\n })\n\nexport const zCreateAFileBody = z.object({\n file: z\n .string()\n .register(z.globalRegistry, {\n description: \"Indicates the file you want to upload.\",\n })\n .optional(),\n file_location: z\n .string()\n .register(z.globalRegistry, {\n description:\n \"Use this parameter to reference a file stored at a specific location. This must be the URL that points to an image file.\",\n })\n .optional(),\n})\n\n/**\n * Created\n */\nexport const zCreateAFileResponse = z\n .object({\n data: zFile.optional(),\n })\n .register(z.globalRegistry, {\n description: \"Created\",\n })\n\nexport const zDeleteAFilePath = z.object({\n fileID: z.string().register(z.globalRegistry, {\n description: \"The unique identifier of the file you want to delete.\",\n }),\n})\n\n/**\n * No Content\n */\nexport const zDeleteAFileResponse = z.void().register(z.globalRegistry, {\n description: \"No Content\",\n})\n\nexport const zGetAFilePath = z.object({\n fileID: z.string().register(z.globalRegistry, {\n description: \"The unique identifier for a file.\",\n }),\n})\n\nexport const zGetAFile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E,OAAO;AAAA,EACvC,MAAM,EACH,OAAO,EACP,SAAS,EAAE,gBAAgB;AAAA,IAC1B,aAAa;AAAA,EACf,CAAC,EACA,SAAS;AAAA,EACZ,eAAe,EACZ,OAAO,EACP,SAAS,EAAE,gBAAgB;AAAA,IAC1B,aACE;AAAA,EACJ,CAAC,EACA,SAAS;AACd,CAAC;AAKM,MAAM,uBAAuB,EACjC,OAAO;AAAA,EACN,MAAM,MAAM,SAAS;AACvB,CAAC,EACA,SAAS,EAAE,gBAAgB;AAAA,EAC1B,aAAa;AACf,CAAC;AAEI,MAAM,mBAAmB,EAAE,OAAO;AAAA,EACvC,QAAQ,EAAE,OAAO,EAAE,SAAS,EAAE,gBAAgB;AAAA,IAC5C,aAAa;AAAA,EACf,CAAC;AACH,CAAC;AAKM,MAAM,uBAAuB,EAAE,KAAK,EAAE,SAAS,EAAE,gBAAgB;AAAA,EACtE,aAAa;AACf,CAAC;AAEM,MAAM,gBAAgB,EAAE,OAAO;AAAA,EACpC,QAAQ,EAAE,OAAO,EAAE,SAAS,EAAE,gBAAgB;AAAA,IAC5C,aAAa;AAAA,EACf,CAAC;AACH,CAAC;AAEM,MAAM,oBAAoB,EAAE,OAAO;AAAA,EACxC,MAAM,MAAM,SAAS;AACvB,CAAC;","names":[]}
package/dist/zod.cjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/zod.ts"],"sourcesContent":["// Requires the optional `zod` peer dependency (3.x).\nexport * from \"./client/zod.gen\"\n"],"mappings":";;;;;;;;;;;;;;;AAAA;AAAA;AACA,wBAAc,6BADd;","names":[]}
1
+ {"version":3,"sources":["../src/zod.ts"],"sourcesContent":["export * from \"./client/zod.gen\"\n"],"mappings":";;;;;;;;;;;;;;;AAAA;AAAA;AAAA,wBAAc,6BAAd;","names":[]}
package/dist/zod.mjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/zod.ts"],"sourcesContent":["// Requires the optional `zod` peer dependency (3.x).\nexport * from \"./client/zod.gen\"\n"],"mappings":"AACA,cAAc;","names":[]}
1
+ {"version":3,"sources":["../src/zod.ts"],"sourcesContent":["export * from \"./client/zod.gen\"\n"],"mappings":"AAAA,cAAc;","names":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epcc-sdk/sdks-files",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -55,10 +55,10 @@
55
55
  "tsup": "^8.4.0",
56
56
  "typescript": "^5.5.3",
57
57
  "vitest": "^3.0.7",
58
- "zod": "3.25.76"
58
+ "zod": "4.6.5"
59
59
  },
60
60
  "peerDependencies": {
61
- "zod": "^3.22.0"
61
+ "zod": "^4.0.0"
62
62
  },
63
63
  "peerDependenciesMeta": {
64
64
  "zod": {