@tktb-tess/my-zod-schema 0.1.3 → 0.1.5

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/bundle.js CHANGED
@@ -5,7 +5,7 @@ const c = {
5
5
  message: r,
6
6
  cause: t
7
7
  })
8
- }, $ = (n, r) => {
8
+ }, k = (n, r) => {
9
9
  try {
10
10
  const t = r.safeParse(JSON.parse(n));
11
11
  return t.success ? {
@@ -24,27 +24,27 @@ const c = {
24
24
  }, a = e.object({
25
25
  id: e.int().nonnegative(),
26
26
  form: e.string()
27
- }).brand(), l = e.object({
27
+ }).brand(), m = e.object({
28
28
  title: e.string(),
29
29
  forms: e.string().array(),
30
30
  rawForms: e.string().optional()
31
- }), m = e.object({
31
+ }), l = e.object({
32
32
  title: e.string(),
33
33
  text: e.string()
34
34
  }), g = e.object({
35
35
  title: e.string(),
36
36
  form: e.string()
37
- }), p = e.object({
37
+ }), b = e.object({
38
38
  title: e.string(),
39
39
  entry: a
40
40
  }), d = {
41
41
  entry: a,
42
- translations: l.array(),
42
+ translations: m.array(),
43
43
  tags: e.string().array(),
44
- contents: m.array(),
44
+ contents: l.array(),
45
45
  variations: g.array(),
46
- relations: p.array()
47
- }, b = e.object(d), h = e.looseObject(d), S = e.object({
46
+ relations: b.array()
47
+ }, p = e.object(d), S = e.looseObject(d), h = e.object({
48
48
  id: e.int().nonnegative(),
49
49
  sentence: e.string(),
50
50
  translation: e.string(),
@@ -63,42 +63,42 @@ const c = {
63
63
  ignoredPattern: e.string().optional(),
64
64
  pronunciationTitle: e.string(),
65
65
  enableMarkdown: e.boolean()
66
- }), f = e.object({
66
+ }), j = e.object({
67
67
  version: e.literal(1).optional(),
68
- words: b.array()
68
+ words: p.array()
69
69
  }).brand(), o = e.looseObject({
70
70
  version: e.literal(2),
71
- words: h.array()
72
- }).brand(), w = e.discriminatedUnion("version", [
73
- f,
71
+ words: S.array()
72
+ }).brand(), z = e.discriminatedUnion("version", [
73
+ j,
74
74
  o
75
- ]), z = o.extend({
76
- examples: S.array(),
75
+ ]), E = o.extend({
76
+ examples: h.array(),
77
77
  zpdicOnline: u,
78
78
  snoj: e.string().optional(),
79
79
  zatlin: e.string().optional()
80
- }), k = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
80
+ }), A = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
81
81
  __proto__: null,
82
- contentSchema: m,
82
+ contentSchema: l,
83
83
  entrySchema: a,
84
- otmjsonSchema: w,
85
- relationSchema: p,
86
- translationSchema: l,
87
- v1Schema: f,
84
+ otmjsonSchema: z,
85
+ relationSchema: b,
86
+ translationSchema: m,
87
+ v1Schema: j,
88
88
  v2Schema: o,
89
89
  variationSchema: g,
90
- wordv1Schema: b,
91
- wordv2Schema: h,
90
+ wordv1Schema: p,
91
+ wordv2Schema: S,
92
92
  zpdicConfigSchema: u,
93
- zpdicExampleSchema: S,
94
- zpdicOtmSchema: z
93
+ zpdicExampleSchema: h,
94
+ zpdicOtmSchema: E
95
95
  }, Symbol.toStringTag, { value: "Module" })), _ = e.object({
96
96
  titles: e.string().array(),
97
97
  names: e.string().array(),
98
98
  nameString: e.string(),
99
99
  ignoredPattern: e.string(),
100
100
  hidden: e.boolean()
101
- }), s = e.string().brand(), E = e.object({
101
+ }), s = e.string().brand(), R = e.object({
102
102
  title: e.string(),
103
103
  text: e.string(),
104
104
  hidden: e.boolean()
@@ -108,15 +108,15 @@ const c = {
108
108
  terms: e.string().array(),
109
109
  termString: e.string(),
110
110
  ignoredPattern: e.string()
111
- }), R = e.object({
111
+ }), M = e.object({
112
112
  title: e.string(),
113
113
  name: e.string(),
114
114
  pronunciation: e.string()
115
- }), M = e.object({
115
+ }), T = e.object({
116
116
  titles: e.string().array(),
117
117
  number: e.int().nonnegative(),
118
118
  name: e.string()
119
- }), j = e.string(), y = e.object({
119
+ }), f = e.string(), y = e.object({
120
120
  sentence: e.string(),
121
121
  supplement: e.string(),
122
122
  translation: e.string(),
@@ -125,7 +125,7 @@ const c = {
125
125
  number: e.number()
126
126
  }).array(),
127
127
  offer: e.object({
128
- catalog: j,
128
+ catalog: f,
129
129
  number: e.number()
130
130
  }).nullable()
131
131
  }), i = y.extend({
@@ -137,50 +137,53 @@ const c = {
137
137
  equivalents: _.array(),
138
138
  tags: e.string().array(),
139
139
  phrases: P.array(),
140
- informations: E.array(),
141
- variations: R.array(),
142
- relations: M.array()
143
- }), T = v.extend({
140
+ informations: R.array(),
141
+ variations: M.array(),
142
+ relations: T.array()
143
+ }), x = v.extend({
144
144
  id: s,
145
145
  number: e.int().nonnegative()
146
- }), x = T.extend({
146
+ }), w = x.extend({
147
147
  examples: i.array()
148
- }), W = e.object({
149
- word: x
150
148
  }), q = e.object({
151
- words: x.array(),
152
- total: e.int().nonnegative()
149
+ word: x
153
150
  }), C = e.object({
154
- examples: i.array(),
155
- total: e.int().nonnegative()
151
+ word: w
156
152
  }), D = e.object({
153
+ words: w.array(),
154
+ total: e.int().nonnegative()
155
+ }), I = e.object({
157
156
  example: i
157
+ }), J = e.object({
158
+ examples: i.array(),
159
+ total: e.int().nonnegative()
158
160
  }), O = e.object({
159
161
  id: s,
160
- catalog: j,
162
+ catalog: f,
161
163
  number: e.int().nonnegative(),
162
164
  translation: e.string(),
163
165
  supplement: e.string(),
164
166
  author: e.string()
165
- }), I = e.object({
167
+ }), N = e.object({
168
+ exampleOffer: O
169
+ }), U = e.object({
166
170
  exampleOffers: O.array(),
167
171
  total: e.int().nonnegative()
168
- }), J = e.object({
169
- exampleOffer: O
170
- }), A = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
172
+ }), F = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
171
173
  __proto__: null,
172
174
  editableExampleSchema: y,
173
175
  editableWordSchema: v,
174
- exampleOfferResponseSchema: J,
175
- exampleOffersResponseSchema: I,
176
- exampleResponseSchema: D,
177
- examplesResponseSchema: C,
178
- wordWithExamplesResponseSchema: W,
179
- wordsResponseSchema: q
176
+ exOfferResponseSchema: N,
177
+ exResponseSchema: I,
178
+ mExOfferResponseSchema: U,
179
+ mExResponseSchema: J,
180
+ mwweResponseSchema: D,
181
+ wordResponseSchema: q,
182
+ wweResponseSchema: C
180
183
  }, Symbol.toStringTag, { value: "Module" }));
181
184
  export {
182
185
  c as MiscError,
183
- k as OTMJSON,
184
- A as ZpDIC,
185
- $ as parseAndValidate
186
+ A as OTMJSON,
187
+ F as ZpDIC,
188
+ k as parseAndValidate
186
189
  };
package/dist/zpdic.d.ts CHANGED
@@ -192,7 +192,46 @@ declare const wordWithExamplesSchema: z.ZodObject<{
192
192
  }, z.core.$strip>>;
193
193
  }, z.core.$strip>;
194
194
  export type WordWithExamples = z.infer<typeof wordWithExamplesSchema>;
195
- export declare const wordWithExamplesResponseSchema: z.ZodObject<{
195
+ export declare const wordResponseSchema: z.ZodObject<{
196
+ word: z.ZodObject<{
197
+ name: z.ZodString;
198
+ pronunciation: z.ZodString;
199
+ equivalents: z.ZodArray<z.ZodObject<{
200
+ titles: z.ZodArray<z.ZodString>;
201
+ names: z.ZodArray<z.ZodString>;
202
+ nameString: z.ZodString;
203
+ ignoredPattern: z.ZodString;
204
+ hidden: z.ZodBoolean;
205
+ }, z.core.$strip>>;
206
+ tags: z.ZodArray<z.ZodString>;
207
+ phrases: z.ZodArray<z.ZodObject<{
208
+ titles: z.ZodArray<z.ZodString>;
209
+ form: z.ZodString;
210
+ terms: z.ZodArray<z.ZodString>;
211
+ termString: z.ZodString;
212
+ ignoredPattern: z.ZodString;
213
+ }, z.core.$strip>>;
214
+ informations: z.ZodArray<z.ZodObject<{
215
+ title: z.ZodString;
216
+ text: z.ZodString;
217
+ hidden: z.ZodBoolean;
218
+ }, z.core.$strip>>;
219
+ variations: z.ZodArray<z.ZodObject<{
220
+ title: z.ZodString;
221
+ name: z.ZodString;
222
+ pronunciation: z.ZodString;
223
+ }, z.core.$strip>>;
224
+ relations: z.ZodArray<z.ZodObject<{
225
+ titles: z.ZodArray<z.ZodString>;
226
+ number: z.ZodInt;
227
+ name: z.ZodString;
228
+ }, z.core.$strip>>;
229
+ id: z.core.$ZodBranded<z.ZodString, typeof obj_id_brand>;
230
+ number: z.ZodInt;
231
+ }, z.core.$strip>;
232
+ }, z.core.$strip>;
233
+ export type WordResponse = z.infer<typeof wordResponseSchema>;
234
+ export declare const wweResponseSchema: z.ZodObject<{
196
235
  word: z.ZodObject<{
197
236
  name: z.ZodString;
198
237
  pronunciation: z.ZodString;
@@ -245,8 +284,8 @@ export declare const wordWithExamplesResponseSchema: z.ZodObject<{
245
284
  }, z.core.$strip>>;
246
285
  }, z.core.$strip>;
247
286
  }, z.core.$strip>;
248
- export type WordWithExamplesResponse = z.infer<typeof wordWithExamplesResponseSchema>;
249
- export declare const wordsResponseSchema: z.ZodObject<{
287
+ export type WWEResponse = z.infer<typeof wweResponseSchema>;
288
+ export declare const mwweResponseSchema: z.ZodObject<{
250
289
  words: z.ZodArray<z.ZodObject<{
251
290
  name: z.ZodString;
252
291
  pronunciation: z.ZodString;
@@ -300,9 +339,9 @@ export declare const wordsResponseSchema: z.ZodObject<{
300
339
  }, z.core.$strip>>;
301
340
  total: z.ZodInt;
302
341
  }, z.core.$strip>;
303
- export type WordsResponse = z.infer<typeof wordsResponseSchema>;
304
- export declare const examplesResponseSchema: z.ZodObject<{
305
- examples: z.ZodArray<z.ZodObject<{
342
+ export type MWWEResponse = z.infer<typeof mwweResponseSchema>;
343
+ export declare const exResponseSchema: z.ZodObject<{
344
+ example: z.ZodObject<{
306
345
  sentence: z.ZodString;
307
346
  supplement: z.ZodString;
308
347
  translation: z.ZodString;
@@ -316,12 +355,11 @@ export declare const examplesResponseSchema: z.ZodObject<{
316
355
  }, z.core.$strip>>;
317
356
  id: z.core.$ZodBranded<z.ZodString, typeof obj_id_brand>;
318
357
  number: z.ZodInt;
319
- }, z.core.$strip>>;
320
- total: z.ZodInt;
358
+ }, z.core.$strip>;
321
359
  }, z.core.$strip>;
322
- export type ExamplesResponse = z.infer<typeof examplesResponseSchema>;
323
- export declare const exampleResponseSchema: z.ZodObject<{
324
- example: z.ZodObject<{
360
+ export type ExResponse = z.infer<typeof exResponseSchema>;
361
+ export declare const mExResponseSchema: z.ZodObject<{
362
+ examples: z.ZodArray<z.ZodObject<{
325
363
  sentence: z.ZodString;
326
364
  supplement: z.ZodString;
327
365
  translation: z.ZodString;
@@ -335,9 +373,10 @@ export declare const exampleResponseSchema: z.ZodObject<{
335
373
  }, z.core.$strip>>;
336
374
  id: z.core.$ZodBranded<z.ZodString, typeof obj_id_brand>;
337
375
  number: z.ZodInt;
338
- }, z.core.$strip>;
376
+ }, z.core.$strip>>;
377
+ total: z.ZodInt;
339
378
  }, z.core.$strip>;
340
- export type ExampleResponse = z.infer<typeof exampleResponseSchema>;
379
+ export type MExResponse = z.infer<typeof mExResponseSchema>;
341
380
  declare const exampleOfferSchema: z.ZodObject<{
342
381
  id: z.core.$ZodBranded<z.ZodString, typeof obj_id_brand>;
343
382
  catalog: z.ZodString;
@@ -347,27 +386,27 @@ declare const exampleOfferSchema: z.ZodObject<{
347
386
  author: z.ZodString;
348
387
  }, z.core.$strip>;
349
388
  export type ExampleOffer = z.infer<typeof exampleOfferSchema>;
350
- export declare const exampleOffersResponseSchema: z.ZodObject<{
351
- exampleOffers: z.ZodArray<z.ZodObject<{
389
+ export declare const exOfferResponseSchema: z.ZodObject<{
390
+ exampleOffer: z.ZodObject<{
352
391
  id: z.core.$ZodBranded<z.ZodString, typeof obj_id_brand>;
353
392
  catalog: z.ZodString;
354
393
  number: z.ZodInt;
355
394
  translation: z.ZodString;
356
395
  supplement: z.ZodString;
357
396
  author: z.ZodString;
358
- }, z.core.$strip>>;
359
- total: z.ZodInt;
397
+ }, z.core.$strip>;
360
398
  }, z.core.$strip>;
361
- export type ExampleOffersResponse = z.infer<typeof exampleOffersResponseSchema>;
362
- export declare const exampleOfferResponseSchema: z.ZodObject<{
363
- exampleOffer: z.ZodObject<{
399
+ export type ExOfferResponse = z.infer<typeof exOfferResponseSchema>;
400
+ export declare const mExOfferResponseSchema: z.ZodObject<{
401
+ exampleOffers: z.ZodArray<z.ZodObject<{
364
402
  id: z.core.$ZodBranded<z.ZodString, typeof obj_id_brand>;
365
403
  catalog: z.ZodString;
366
404
  number: z.ZodInt;
367
405
  translation: z.ZodString;
368
406
  supplement: z.ZodString;
369
407
  author: z.ZodString;
370
- }, z.core.$strip>;
408
+ }, z.core.$strip>>;
409
+ total: z.ZodInt;
371
410
  }, z.core.$strip>;
372
- export type ExampleOfferResponse = z.infer<typeof exampleOfferResponseSchema>;
411
+ export type MExOfferResponse = z.infer<typeof mExOfferResponseSchema>;
373
412
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tktb-tess/my-zod-schema",
3
- "version": "0.1.3",
3
+ "version": "0.1.5",
4
4
  "type": "module",
5
5
  "license": "CC0-1.0",
6
6
  "publishConfig": {