@nxtedition/types 23.0.1 → 23.0.3

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.
Files changed (43) hide show
  1. package/dist/app.d.ts +1 -12
  2. package/dist/asset.d.ts +10 -0
  3. package/dist/asset.js +1 -0
  4. package/dist/common/block.d.ts +1 -1
  5. package/dist/common/clone.d.ts +32 -0
  6. package/dist/common/clone.js +602 -0
  7. package/dist/common/index.d.ts +3 -0
  8. package/dist/common/index.js +3 -0
  9. package/dist/common/nxtpression.d.ts +19 -0
  10. package/dist/common/nxtpression.js +240 -0
  11. package/dist/common/search.d.ts +69 -0
  12. package/dist/common/search.js +1591 -0
  13. package/dist/common/settings.d.ts +6 -5
  14. package/dist/common/settings.js +89 -36
  15. package/dist/domains/asset.d.ts +22 -0
  16. package/dist/domains/asset.js +232 -0
  17. package/dist/domains/clone.d.ts +14 -0
  18. package/dist/domains/clone.js +192 -0
  19. package/dist/domains/connection.d.ts +39 -15
  20. package/dist/domains/connection.js +621 -174
  21. package/dist/domains/design.d.ts +24 -0
  22. package/dist/domains/design.js +303 -0
  23. package/dist/domains/file.d.ts +17 -0
  24. package/dist/domains/file.js +233 -0
  25. package/dist/domains/index.d.ts +11 -1
  26. package/dist/domains/index.js +5 -0
  27. package/dist/domains/media.d.ts +28 -0
  28. package/dist/domains/media.js +346 -0
  29. package/dist/domains/published.d.ts +18 -0
  30. package/dist/domains/published.js +164 -0
  31. package/dist/domains/revs.d.ts +13 -0
  32. package/dist/domains/revs.js +125 -0
  33. package/dist/domains/search.d.ts +3 -0
  34. package/dist/domains/search.js +62 -13
  35. package/dist/domains/settings.js +70 -26
  36. package/dist/domains/user.d.ts +14 -0
  37. package/dist/domains/user.js +141 -0
  38. package/dist/index.d.ts +20 -6
  39. package/dist/index.js +135 -0
  40. package/dist/rpc.d.ts +48 -13
  41. package/dist/rpc.js +505 -1
  42. package/dist/schema.json +3014 -0
  43. package/package.json +7 -3
@@ -0,0 +1,125 @@
1
+ import __typia from "typia";
2
+ export const isRevsRecord = input => {
3
+ const $io0 = input => undefined === input.value || Array.isArray(input.value) && input.value.every(elem => "string" === typeof elem);
4
+ return "object" === typeof input && null !== input && false === Array.isArray(input) && $io0(input);
5
+ };
6
+ export const assertRevsRecord = (input, errorFactory) => {
7
+ const __is = input => {
8
+ const $io0 = input => undefined === input.value || Array.isArray(input.value) && input.value.every(elem => "string" === typeof elem);
9
+ return "object" === typeof input && null !== input && false === Array.isArray(input) && $io0(input);
10
+ };
11
+ if (false === __is(input))
12
+ ((input, _path, _exceptionable = true) => {
13
+ const $guard = __typia.createAssert.guard;
14
+ const $ao0 = (input, _path, _exceptionable = true) => undefined === input.value || (Array.isArray(input.value) || $guard(_exceptionable, {
15
+ path: _path + ".value",
16
+ expected: "(Array<string> | undefined)",
17
+ value: input.value
18
+ }, errorFactory)) && input.value.every((elem, _index1) => "string" === typeof elem || $guard(_exceptionable, {
19
+ path: _path + ".value[" + _index1 + "]",
20
+ expected: "string",
21
+ value: elem
22
+ }, errorFactory)) || $guard(_exceptionable, {
23
+ path: _path + ".value",
24
+ expected: "(Array<string> | undefined)",
25
+ value: input.value
26
+ }, errorFactory);
27
+ return ("object" === typeof input && null !== input && false === Array.isArray(input) || $guard(true, {
28
+ path: _path + "",
29
+ expected: "RevsRecord",
30
+ value: input
31
+ }, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
32
+ path: _path + "",
33
+ expected: "RevsRecord",
34
+ value: input
35
+ }, errorFactory);
36
+ })(input, "$input", true);
37
+ return input;
38
+ };
39
+ export const randomRevsRecord = generator => {
40
+ const $generator = __typia.createRandom.generator;
41
+ const $pick = __typia.createRandom.pick;
42
+ const $ro0 = (_recursive = false, _depth = 0) => ({
43
+ value: $pick([
44
+ () => undefined,
45
+ () => (generator?.array ?? $generator.array)(() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)())
46
+ ])()
47
+ });
48
+ return $ro0();
49
+ };
50
+ export const assertGuardRevsRecord = (input, errorFactory) => {
51
+ const __is = input => {
52
+ const $io0 = input => undefined === input.value || Array.isArray(input.value) && input.value.every(elem => "string" === typeof elem);
53
+ return "object" === typeof input && null !== input && false === Array.isArray(input) && $io0(input);
54
+ };
55
+ if (false === __is(input))
56
+ ((input, _path, _exceptionable = true) => {
57
+ const $guard = __typia.createAssertGuard.guard;
58
+ const $ao0 = (input, _path, _exceptionable = true) => undefined === input.value || (Array.isArray(input.value) || $guard(_exceptionable, {
59
+ path: _path + ".value",
60
+ expected: "(Array<string> | undefined)",
61
+ value: input.value
62
+ }, errorFactory)) && input.value.every((elem, _index1) => "string" === typeof elem || $guard(_exceptionable, {
63
+ path: _path + ".value[" + _index1 + "]",
64
+ expected: "string",
65
+ value: elem
66
+ }, errorFactory)) || $guard(_exceptionable, {
67
+ path: _path + ".value",
68
+ expected: "(Array<string> | undefined)",
69
+ value: input.value
70
+ }, errorFactory);
71
+ return ("object" === typeof input && null !== input && false === Array.isArray(input) || $guard(true, {
72
+ path: _path + "",
73
+ expected: "RevsRecord",
74
+ value: input
75
+ }, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
76
+ path: _path + "",
77
+ expected: "RevsRecord",
78
+ value: input
79
+ }, errorFactory);
80
+ })(input, "$input", true);
81
+ };
82
+ export const stringifyRevsRecord = input => {
83
+ const $string = __typia.json.createStringify.string;
84
+ const $tail = __typia.json.createStringify.tail;
85
+ const $so0 = input => `{${$tail(`${undefined === input.value ? "" : `"value":${undefined !== input.value ? `[${input.value.map(elem => $string(elem)).join(",")}]` : undefined}`}`)}}`;
86
+ return $so0(input);
87
+ };
88
+ export const assertStringifyRevsRecord = (input, errorFactory) => { const assert = (input, errorFactory) => {
89
+ const __is = input => {
90
+ const $io0 = input => undefined === input.value || Array.isArray(input.value) && input.value.every(elem => "string" === typeof elem);
91
+ return "object" === typeof input && null !== input && false === Array.isArray(input) && $io0(input);
92
+ };
93
+ if (false === __is(input))
94
+ ((input, _path, _exceptionable = true) => {
95
+ const $guard = __typia.json.createAssertStringify.guard;
96
+ const $ao0 = (input, _path, _exceptionable = true) => undefined === input.value || (Array.isArray(input.value) || $guard(_exceptionable, {
97
+ path: _path + ".value",
98
+ expected: "(Array<string> | undefined)",
99
+ value: input.value
100
+ }, errorFactory)) && input.value.every((elem, _index1) => "string" === typeof elem || $guard(_exceptionable, {
101
+ path: _path + ".value[" + _index1 + "]",
102
+ expected: "string",
103
+ value: elem
104
+ }, errorFactory)) || $guard(_exceptionable, {
105
+ path: _path + ".value",
106
+ expected: "(Array<string> | undefined)",
107
+ value: input.value
108
+ }, errorFactory);
109
+ return ("object" === typeof input && null !== input && false === Array.isArray(input) || $guard(true, {
110
+ path: _path + "",
111
+ expected: "RevsRecord",
112
+ value: input
113
+ }, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
114
+ path: _path + "",
115
+ expected: "RevsRecord",
116
+ value: input
117
+ }, errorFactory);
118
+ })(input, "$input", true);
119
+ return input;
120
+ }; const stringify = input => {
121
+ const $string = __typia.json.createAssertStringify.string;
122
+ const $tail = __typia.json.createAssertStringify.tail;
123
+ const $so0 = input => `{${$tail(`${undefined === input.value ? "" : `"value":${undefined !== input.value ? `[${input.value.map(elem => $string(elem)).join(",")}]` : undefined}`}`)}}`;
124
+ return $so0(input);
125
+ }; return stringify(assert(input, errorFactory)); };
@@ -4,6 +4,9 @@ export interface SearchDomainRecords {
4
4
  }
5
5
  export interface SearchRecord {
6
6
  hits: string[];
7
+ total?: number;
8
+ relation?: string;
9
+ error?: string;
7
10
  }
8
11
  export declare const isSearchRecord: (input: unknown) => input is SearchRecord;
9
12
  export declare const assertSearchRecord: (input: unknown) => SearchRecord;
@@ -1,17 +1,17 @@
1
1
  import __typia from "typia";
2
2
  export const isSearchRecord = input => {
3
- const $io0 = input => Array.isArray(input.hits) && input.hits.every(elem => "string" === typeof elem);
3
+ const $io0 = input => Array.isArray(input.hits) && input.hits.every(elem => "string" === typeof elem) && (undefined === input.total || "number" === typeof input.total) && (undefined === input.relation || "string" === typeof input.relation) && (undefined === input.error || "string" === typeof input.error);
4
4
  return "object" === typeof input && null !== input && $io0(input);
5
5
  };
6
6
  export const assertSearchRecord = (input, errorFactory) => {
7
7
  const __is = input => {
8
- const $io0 = input => Array.isArray(input.hits) && input.hits.every(elem => "string" === typeof elem);
8
+ const $io0 = input => Array.isArray(input.hits) && input.hits.every(elem => "string" === typeof elem) && (undefined === input.total || "number" === typeof input.total) && (undefined === input.relation || "string" === typeof input.relation) && (undefined === input.error || "string" === typeof input.error);
9
9
  return "object" === typeof input && null !== input && $io0(input);
10
10
  };
11
11
  if (false === __is(input))
12
12
  ((input, _path, _exceptionable = true) => {
13
13
  const $guard = __typia.createAssert.guard;
14
- const $ao0 = (input, _path, _exceptionable = true) => (Array.isArray(input.hits) || $guard(_exceptionable, {
14
+ const $ao0 = (input, _path, _exceptionable = true) => ((Array.isArray(input.hits) || $guard(_exceptionable, {
15
15
  path: _path + ".hits",
16
16
  expected: "Array<string>",
17
17
  value: input.hits
@@ -23,7 +23,19 @@ export const assertSearchRecord = (input, errorFactory) => {
23
23
  path: _path + ".hits",
24
24
  expected: "Array<string>",
25
25
  value: input.hits
26
- }, errorFactory);
26
+ }, errorFactory)) && (undefined === input.total || "number" === typeof input.total || $guard(_exceptionable, {
27
+ path: _path + ".total",
28
+ expected: "(number | undefined)",
29
+ value: input.total
30
+ }, errorFactory)) && (undefined === input.relation || "string" === typeof input.relation || $guard(_exceptionable, {
31
+ path: _path + ".relation",
32
+ expected: "(string | undefined)",
33
+ value: input.relation
34
+ }, errorFactory)) && (undefined === input.error || "string" === typeof input.error || $guard(_exceptionable, {
35
+ path: _path + ".error",
36
+ expected: "(string | undefined)",
37
+ value: input.error
38
+ }, errorFactory));
27
39
  return ("object" === typeof input && null !== input || $guard(true, {
28
40
  path: _path + "",
29
41
  expected: "SearchRecord",
@@ -38,20 +50,33 @@ export const assertSearchRecord = (input, errorFactory) => {
38
50
  };
39
51
  export const randomSearchRecord = generator => {
40
52
  const $generator = __typia.createRandom.generator;
53
+ const $pick = __typia.createRandom.pick;
41
54
  const $ro0 = (_recursive = false, _depth = 0) => ({
42
- hits: (generator?.array ?? $generator.array)(() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)())
55
+ hits: (generator?.array ?? $generator.array)(() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()),
56
+ total: $pick([
57
+ () => undefined,
58
+ () => (generator?.customs ?? $generator.customs)?.number?.([]) ?? (generator?.number ?? $generator.number)(0, 100)
59
+ ])(),
60
+ relation: $pick([
61
+ () => undefined,
62
+ () => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
63
+ ])(),
64
+ error: $pick([
65
+ () => undefined,
66
+ () => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
67
+ ])()
43
68
  });
44
69
  return $ro0();
45
70
  };
46
71
  export const assertGuardSearchRecord = (input, errorFactory) => {
47
72
  const __is = input => {
48
- const $io0 = input => Array.isArray(input.hits) && input.hits.every(elem => "string" === typeof elem);
73
+ const $io0 = input => Array.isArray(input.hits) && input.hits.every(elem => "string" === typeof elem) && (undefined === input.total || "number" === typeof input.total) && (undefined === input.relation || "string" === typeof input.relation) && (undefined === input.error || "string" === typeof input.error);
49
74
  return "object" === typeof input && null !== input && $io0(input);
50
75
  };
51
76
  if (false === __is(input))
52
77
  ((input, _path, _exceptionable = true) => {
53
78
  const $guard = __typia.createAssertGuard.guard;
54
- const $ao0 = (input, _path, _exceptionable = true) => (Array.isArray(input.hits) || $guard(_exceptionable, {
79
+ const $ao0 = (input, _path, _exceptionable = true) => ((Array.isArray(input.hits) || $guard(_exceptionable, {
55
80
  path: _path + ".hits",
56
81
  expected: "Array<string>",
57
82
  value: input.hits
@@ -63,7 +88,19 @@ export const assertGuardSearchRecord = (input, errorFactory) => {
63
88
  path: _path + ".hits",
64
89
  expected: "Array<string>",
65
90
  value: input.hits
66
- }, errorFactory);
91
+ }, errorFactory)) && (undefined === input.total || "number" === typeof input.total || $guard(_exceptionable, {
92
+ path: _path + ".total",
93
+ expected: "(number | undefined)",
94
+ value: input.total
95
+ }, errorFactory)) && (undefined === input.relation || "string" === typeof input.relation || $guard(_exceptionable, {
96
+ path: _path + ".relation",
97
+ expected: "(string | undefined)",
98
+ value: input.relation
99
+ }, errorFactory)) && (undefined === input.error || "string" === typeof input.error || $guard(_exceptionable, {
100
+ path: _path + ".error",
101
+ expected: "(string | undefined)",
102
+ value: input.error
103
+ }, errorFactory));
67
104
  return ("object" === typeof input && null !== input || $guard(true, {
68
105
  path: _path + "",
69
106
  expected: "SearchRecord",
@@ -77,18 +114,18 @@ export const assertGuardSearchRecord = (input, errorFactory) => {
77
114
  };
78
115
  export const stringifySearchRecord = input => {
79
116
  const $string = __typia.json.createStringify.string;
80
- const $so0 = input => `{"hits":${`[${input.hits.map(elem => $string(elem)).join(",")}]`}}`;
117
+ const $so0 = input => `{${undefined === input.total ? "" : `"total":${undefined !== input.total ? input.total : undefined},`}${undefined === input.relation ? "" : `"relation":${undefined !== input.relation ? $string(input.relation) : undefined},`}${undefined === input.error ? "" : `"error":${undefined !== input.error ? $string(input.error) : undefined},`}"hits":${`[${input.hits.map(elem => $string(elem)).join(",")}]`}}`;
81
118
  return $so0(input);
82
119
  };
83
120
  export const assertStringifySearchRecord = (input, errorFactory) => { const assert = (input, errorFactory) => {
84
121
  const __is = input => {
85
- const $io0 = input => Array.isArray(input.hits) && input.hits.every(elem => "string" === typeof elem);
122
+ const $io0 = input => Array.isArray(input.hits) && input.hits.every(elem => "string" === typeof elem) && (undefined === input.total || "number" === typeof input.total && !Number.isNaN(input.total)) && (undefined === input.relation || "string" === typeof input.relation) && (undefined === input.error || "string" === typeof input.error);
86
123
  return "object" === typeof input && null !== input && $io0(input);
87
124
  };
88
125
  if (false === __is(input))
89
126
  ((input, _path, _exceptionable = true) => {
90
127
  const $guard = __typia.json.createAssertStringify.guard;
91
- const $ao0 = (input, _path, _exceptionable = true) => (Array.isArray(input.hits) || $guard(_exceptionable, {
128
+ const $ao0 = (input, _path, _exceptionable = true) => ((Array.isArray(input.hits) || $guard(_exceptionable, {
92
129
  path: _path + ".hits",
93
130
  expected: "Array<string>",
94
131
  value: input.hits
@@ -100,7 +137,19 @@ export const assertStringifySearchRecord = (input, errorFactory) => { const asse
100
137
  path: _path + ".hits",
101
138
  expected: "Array<string>",
102
139
  value: input.hits
103
- }, errorFactory);
140
+ }, errorFactory)) && (undefined === input.total || "number" === typeof input.total && !Number.isNaN(input.total) || $guard(_exceptionable, {
141
+ path: _path + ".total",
142
+ expected: "(number | undefined)",
143
+ value: input.total
144
+ }, errorFactory)) && (undefined === input.relation || "string" === typeof input.relation || $guard(_exceptionable, {
145
+ path: _path + ".relation",
146
+ expected: "(string | undefined)",
147
+ value: input.relation
148
+ }, errorFactory)) && (undefined === input.error || "string" === typeof input.error || $guard(_exceptionable, {
149
+ path: _path + ".error",
150
+ expected: "(string | undefined)",
151
+ value: input.error
152
+ }, errorFactory));
104
153
  return ("object" === typeof input && null !== input || $guard(true, {
105
154
  path: _path + "",
106
155
  expected: "SearchRecord",
@@ -114,6 +163,6 @@ export const assertStringifySearchRecord = (input, errorFactory) => { const asse
114
163
  return input;
115
164
  }; const stringify = input => {
116
165
  const $string = __typia.json.createAssertStringify.string;
117
- const $so0 = input => `{"hits":${`[${input.hits.map(elem => $string(elem)).join(",")}]`}}`;
166
+ const $so0 = input => `{${undefined === input.total ? "" : `"total":${undefined !== input.total ? input.total : undefined},`}${undefined === input.relation ? "" : `"relation":${undefined !== input.relation ? $string(input.relation) : undefined},`}${undefined === input.error ? "" : `"error":${undefined !== input.error ? $string(input.error) : undefined},`}"hits":${`[${input.hits.map(elem => $string(elem)).join(",")}]`}}`;
118
167
  return $so0(input);
119
168
  }; return stringify(assert(input, errorFactory)); };