@kubun/protocol 0.2.1 → 0.2.2

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.
@@ -56,6 +56,27 @@ export declare const numberModel: {
56
56
  readonly additionalProperties: false;
57
57
  };
58
58
  export type NumberModel = FromSchema<typeof numberModel>;
59
+ export declare const stringConstModel: {
60
+ readonly type: "object";
61
+ readonly properties: {
62
+ readonly type: {
63
+ readonly type: "string";
64
+ readonly const: "string";
65
+ };
66
+ readonly title: {
67
+ readonly type: "string";
68
+ };
69
+ readonly const: {
70
+ readonly type: "string";
71
+ };
72
+ readonly default: {
73
+ readonly type: "string";
74
+ };
75
+ };
76
+ readonly required: readonly ["type", "title", "const"];
77
+ readonly additionalProperties: false;
78
+ };
79
+ export type StringConstModel = FromSchema<typeof stringConstModel>;
59
80
  export declare const stringEnumModel: {
60
81
  readonly type: "object";
61
82
  readonly properties: {
@@ -98,6 +119,18 @@ export declare const stringFormatModel: {
98
119
  readonly type: "string";
99
120
  readonly enum: readonly ["date", "date-time", "duration", "time", "uri"];
100
121
  };
122
+ readonly title: {
123
+ readonly type: "string";
124
+ };
125
+ readonly default: {
126
+ readonly type: "string";
127
+ };
128
+ readonly minLength: {
129
+ readonly type: "integer";
130
+ };
131
+ readonly maxLength: {
132
+ readonly type: "integer";
133
+ };
101
134
  };
102
135
  readonly required: readonly ["type", "format"];
103
136
  readonly additionalProperties: false;
@@ -132,6 +165,25 @@ export declare const stringCustomModel: {
132
165
  export type StringCustomModel = FromSchema<typeof stringCustomModel>;
133
166
  export declare const stringModel: {
134
167
  readonly anyOf: readonly [{
168
+ readonly type: "object";
169
+ readonly properties: {
170
+ readonly type: {
171
+ readonly type: "string";
172
+ readonly const: "string";
173
+ };
174
+ readonly title: {
175
+ readonly type: "string";
176
+ };
177
+ readonly const: {
178
+ readonly type: "string";
179
+ };
180
+ readonly default: {
181
+ readonly type: "string";
182
+ };
183
+ };
184
+ readonly required: readonly ["type", "title", "const"];
185
+ readonly additionalProperties: false;
186
+ }, {
135
187
  readonly type: "object";
136
188
  readonly properties: {
137
189
  readonly type: {
@@ -191,6 +243,18 @@ export declare const stringModel: {
191
243
  readonly type: "string";
192
244
  readonly enum: readonly ["date", "date-time", "duration", "time", "uri"];
193
245
  };
246
+ readonly title: {
247
+ readonly type: "string";
248
+ };
249
+ readonly default: {
250
+ readonly type: "string";
251
+ };
252
+ readonly minLength: {
253
+ readonly type: "integer";
254
+ };
255
+ readonly maxLength: {
256
+ readonly type: "integer";
257
+ };
194
258
  };
195
259
  readonly required: readonly ["type", "format"];
196
260
  readonly additionalProperties: false;
@@ -251,6 +315,25 @@ export declare const scalarModel: {
251
315
  readonly additionalProperties: false;
252
316
  }, {
253
317
  readonly anyOf: readonly [{
318
+ readonly type: "object";
319
+ readonly properties: {
320
+ readonly type: {
321
+ readonly type: "string";
322
+ readonly const: "string";
323
+ };
324
+ readonly title: {
325
+ readonly type: "string";
326
+ };
327
+ readonly const: {
328
+ readonly type: "string";
329
+ };
330
+ readonly default: {
331
+ readonly type: "string";
332
+ };
333
+ };
334
+ readonly required: readonly ["type", "title", "const"];
335
+ readonly additionalProperties: false;
336
+ }, {
254
337
  readonly type: "object";
255
338
  readonly properties: {
256
339
  readonly type: {
@@ -310,6 +393,18 @@ export declare const scalarModel: {
310
393
  readonly type: "string";
311
394
  readonly enum: readonly ["date", "date-time", "duration", "time", "uri"];
312
395
  };
396
+ readonly title: {
397
+ readonly type: "string";
398
+ };
399
+ readonly default: {
400
+ readonly type: "string";
401
+ };
402
+ readonly minLength: {
403
+ readonly type: "integer";
404
+ };
405
+ readonly maxLength: {
406
+ readonly type: "integer";
407
+ };
313
408
  };
314
409
  readonly required: readonly ["type", "format"];
315
410
  readonly additionalProperties: false;
@@ -575,6 +670,25 @@ export declare const typeModel: {
575
670
  readonly additionalProperties: false;
576
671
  }, {
577
672
  readonly anyOf: readonly [{
673
+ readonly type: "object";
674
+ readonly properties: {
675
+ readonly type: {
676
+ readonly type: "string";
677
+ readonly const: "string";
678
+ };
679
+ readonly title: {
680
+ readonly type: "string";
681
+ };
682
+ readonly const: {
683
+ readonly type: "string";
684
+ };
685
+ readonly default: {
686
+ readonly type: "string";
687
+ };
688
+ };
689
+ readonly required: readonly ["type", "title", "const"];
690
+ readonly additionalProperties: false;
691
+ }, {
578
692
  readonly type: "object";
579
693
  readonly properties: {
580
694
  readonly type: {
@@ -634,6 +748,18 @@ export declare const typeModel: {
634
748
  readonly type: "string";
635
749
  readonly enum: readonly ["date", "date-time", "duration", "time", "uri"];
636
750
  };
751
+ readonly title: {
752
+ readonly type: "string";
753
+ };
754
+ readonly default: {
755
+ readonly type: "string";
756
+ };
757
+ readonly minLength: {
758
+ readonly type: "integer";
759
+ };
760
+ readonly maxLength: {
761
+ readonly type: "integer";
762
+ };
637
763
  };
638
764
  readonly required: readonly ["type", "format"];
639
765
  readonly additionalProperties: false;
@@ -773,6 +899,25 @@ export declare const referencesRecordModel: {
773
899
  readonly additionalProperties: false;
774
900
  }, {
775
901
  readonly anyOf: readonly [{
902
+ readonly type: "object";
903
+ readonly properties: {
904
+ readonly type: {
905
+ readonly type: "string";
906
+ readonly const: "string";
907
+ };
908
+ readonly title: {
909
+ readonly type: "string";
910
+ };
911
+ readonly const: {
912
+ readonly type: "string";
913
+ };
914
+ readonly default: {
915
+ readonly type: "string";
916
+ };
917
+ };
918
+ readonly required: readonly ["type", "title", "const"];
919
+ readonly additionalProperties: false;
920
+ }, {
776
921
  readonly type: "object";
777
922
  readonly properties: {
778
923
  readonly type: {
@@ -832,6 +977,18 @@ export declare const referencesRecordModel: {
832
977
  readonly type: "string";
833
978
  readonly enum: readonly ["date", "date-time", "duration", "time", "uri"];
834
979
  };
980
+ readonly title: {
981
+ readonly type: "string";
982
+ };
983
+ readonly default: {
984
+ readonly type: "string";
985
+ };
986
+ readonly minLength: {
987
+ readonly type: "integer";
988
+ };
989
+ readonly maxLength: {
990
+ readonly type: "integer";
991
+ };
835
992
  };
836
993
  readonly required: readonly ["type", "format"];
837
994
  readonly additionalProperties: false;
@@ -1 +1 @@
1
- {"version":3,"file":"json-schema.d.ts","sourceRoot":"","sources":["../../src/models/json-schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAU,MAAM,gBAAgB,CAAA;AAExD,eAAO,MAAM,YAAY;;;;;;;;;;;;;CAQE,CAAA;AAC3B,MAAM,MAAM,YAAY,GAAG,UAAU,CAAC,OAAO,YAAY,CAAC,CAAA;AAE1D,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;CAUE,CAAA;AAC3B,MAAM,MAAM,YAAY,GAAG,UAAU,CAAC,OAAO,YAAY,CAAC,CAAA;AAE1D,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;CAUG,CAAA;AAC3B,MAAM,MAAM,WAAW,GAAG,UAAU,CAAC,OAAO,WAAW,CAAC,CAAA;AAKxD,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;CAUD,CAAA;AAC3B,MAAM,MAAM,eAAe,GAAG,UAAU,CAAC,OAAO,eAAe,CAAC,CAAA;AAEhE,eAAO,MAAM,qBAAqB;;;CAGP,CAAA;AAC3B,MAAM,MAAM,qBAAqB,GAAG,UAAU,CAAC,OAAO,qBAAqB,CAAC,CAAA;AAE5E,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;CAQH,CAAA;AAC3B,MAAM,MAAM,iBAAiB,GAAG,UAAU,CAAC,OAAO,iBAAiB,CAAC,CAAA;AAEpE,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;CAYH,CAAA;AAC3B,MAAM,MAAM,iBAAiB,GAAG,UAAU,CAAC,OAAO,iBAAiB,CAAC,CAAA;AAEpE,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAEG,CAAA;AAC3B,MAAM,MAAM,WAAW,GAAG,UAAU,CAAC,O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
64
+ type: {
65
+ type: 'string',
66
+ const: 'string'
67
+ },
68
+ title: {
69
+ type: 'string'
70
+ },
71
+ const: {
72
+ type: 'string'
73
+ },
74
+ default: {
75
+ type: 'string'
76
+ }
77
+ },
78
+ required: [
79
+ 'type',
80
+ 'title',
81
+ 'const'
82
+ ],
83
+ additionalProperties: false
84
+ };
61
85
  // Uppercase characters and "_" to match GraphQL enum
62
86
  const enumString = {
63
87
  type: 'string',
@@ -103,7 +127,19 @@ export const stringFormatModel = {
103
127
  type: 'string',
104
128
  const: 'string'
105
129
  },
106
- format: supportedStringFormat
130
+ format: supportedStringFormat,
131
+ title: {
132
+ type: 'string'
133
+ },
134
+ default: {
135
+ type: 'string'
136
+ },
137
+ minLength: {
138
+ type: 'integer'
139
+ },
140
+ maxLength: {
141
+ type: 'integer'
142
+ }
107
143
  },
108
144
  required: [
109
145
  'type',
@@ -141,6 +177,7 @@ export const stringCustomModel = {
141
177
  };
142
178
  export const stringModel = {
143
179
  anyOf: [
180
+ stringConstModel,
144
181
  stringCustomModel,
145
182
  stringEnumModel,
146
183
  stringFormatModel