@nxtedition/types 23.0.39 → 23.0.41

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 (243) hide show
  1. package/dist/app.d.ts +0 -51
  2. package/dist/app.js +1 -823
  3. package/dist/common/block.d.ts +6 -13
  4. package/dist/common/block.js +597 -1607
  5. package/dist/common/clone.d.ts +0 -19
  6. package/dist/common/clone.js +1 -602
  7. package/dist/common/date.d.ts +0 -7
  8. package/dist/common/date.js +1 -59
  9. package/dist/common/error.d.ts +0 -7
  10. package/dist/common/error.js +1 -404
  11. package/dist/common/file.d.ts +1 -21
  12. package/dist/common/file.js +782 -2521
  13. package/dist/common/index.d.ts +20 -26
  14. package/dist/common/index.js +20 -134
  15. package/dist/common/location.d.ts +0 -6
  16. package/dist/common/location.js +73 -238
  17. package/dist/common/lock.d.ts +1 -8
  18. package/dist/common/lock.js +1 -211
  19. package/dist/common/media.d.ts +0 -7
  20. package/dist/common/media.js +1 -83
  21. package/dist/common/nxtpression.d.ts +2 -9
  22. package/dist/common/nxtpression.js +1 -277
  23. package/dist/common/pipeline.d.ts +0 -7
  24. package/dist/common/pipeline.js +1 -97
  25. package/dist/common/promoted-tag.d.ts +0 -7
  26. package/dist/common/promoted-tag.js +1 -147
  27. package/dist/common/render-preset.d.ts +2 -15
  28. package/dist/common/render-preset.js +1 -1202
  29. package/dist/common/render-profile.d.ts +0 -19
  30. package/dist/common/render-profile.js +1 -1052
  31. package/dist/common/render-query.d.ts +2 -9
  32. package/dist/common/render-query.js +1 -1754
  33. package/dist/common/render-scene.d.ts +2 -15
  34. package/dist/common/render-scene.js +1 -2230
  35. package/dist/common/rule.d.ts +1 -7
  36. package/dist/common/rule.js +84 -254
  37. package/dist/common/search.d.ts +0 -25
  38. package/dist/common/search.js +1 -1591
  39. package/dist/common/settings.d.ts +128 -121
  40. package/dist/common/settings.js +1 -6936
  41. package/dist/common/subtitle-style.d.ts +25 -0
  42. package/dist/common/user-notification.d.ts +0 -7
  43. package/dist/common/user-notification.js +1 -85
  44. package/dist/index.d.ts +5 -85
  45. package/dist/index.js +5 -187
  46. package/dist/nxtpression.d.ts +732 -344
  47. package/dist/nxtpression.js +1 -323
  48. package/dist/records/domains/asset.d.ts +106 -0
  49. package/dist/records/domains/bundle.d.ts +12 -0
  50. package/dist/records/domains/bundle.js +1 -0
  51. package/dist/records/domains/clone.d.ts +7 -0
  52. package/dist/records/domains/clone.js +1 -0
  53. package/dist/records/domains/comment-reaction.d.ts +8 -0
  54. package/dist/records/domains/comment-reaction.js +1 -0
  55. package/dist/records/domains/comment-read-mark.d.ts +8 -0
  56. package/dist/records/domains/comment-read-mark.js +1 -0
  57. package/dist/records/domains/comment.d.ts +81 -0
  58. package/dist/records/domains/comment.js +19 -0
  59. package/dist/records/domains/connection.d.ts +77 -0
  60. package/dist/records/domains/connection.js +1 -0
  61. package/dist/records/domains/contact.d.ts +9 -0
  62. package/dist/records/domains/contact.js +1 -0
  63. package/dist/records/domains/deepstream.d.ts +7 -0
  64. package/dist/records/domains/deepstream.js +1 -0
  65. package/dist/records/domains/design.d.ts +11 -0
  66. package/dist/records/domains/design.js +1 -0
  67. package/dist/records/domains/edit.d.ts +10 -0
  68. package/dist/records/domains/edit.js +1 -0
  69. package/dist/records/domains/event.d.ts +66 -0
  70. package/dist/records/domains/event.js +1 -0
  71. package/dist/records/domains/file.d.ts +26 -0
  72. package/dist/records/domains/file.js +1 -0
  73. package/dist/records/domains/general.d.ts +41 -0
  74. package/dist/records/domains/general.js +1 -0
  75. package/dist/records/domains/index.d.ts +77 -0
  76. package/dist/records/domains/index.js +38 -0
  77. package/dist/records/domains/media.d.ts +64 -0
  78. package/dist/records/domains/media.js +1 -0
  79. package/dist/records/domains/monitor.d.ts +116 -0
  80. package/dist/records/domains/monitor.js +1 -0
  81. package/dist/records/domains/panel.d.ts +55 -0
  82. package/dist/records/domains/panel.js +1 -0
  83. package/dist/records/domains/permission.d.ts +25 -0
  84. package/dist/records/domains/permission.js +2 -0
  85. package/dist/records/domains/pipeline-preset.d.ts +10 -0
  86. package/dist/records/domains/pipeline-preset.js +1 -0
  87. package/dist/records/domains/pipeline.d.ts +17 -0
  88. package/dist/records/domains/pipeline.js +1 -0
  89. package/dist/records/domains/planning.d.ts +14 -0
  90. package/dist/records/domains/planning.js +1 -0
  91. package/dist/records/domains/prompter.d.ts +18 -0
  92. package/dist/records/domains/prompter.js +1 -0
  93. package/dist/records/domains/publish.d.ts +145 -0
  94. package/dist/records/domains/publish.js +1 -0
  95. package/dist/records/domains/published.d.ts +12 -0
  96. package/dist/records/domains/published.js +1 -0
  97. package/dist/records/domains/render-preset.d.ts +5 -0
  98. package/dist/records/domains/render-preset.js +1 -0
  99. package/dist/records/domains/render.d.ts +115 -0
  100. package/dist/records/domains/render.js +1 -0
  101. package/dist/records/domains/revs.d.ts +6 -0
  102. package/dist/records/domains/revs.js +1 -0
  103. package/dist/records/domains/role.d.ts +6 -0
  104. package/dist/records/domains/role.js +1 -0
  105. package/dist/records/domains/script.d.ts +101 -0
  106. package/dist/records/domains/script.js +1 -0
  107. package/dist/records/domains/search.d.ts +9 -0
  108. package/dist/records/domains/search.js +1 -0
  109. package/dist/records/domains/settings.d.ts +5 -0
  110. package/dist/records/domains/settings.js +1 -0
  111. package/dist/records/domains/storyboard.d.ts +10 -0
  112. package/dist/records/domains/storyboard.js +1 -0
  113. package/dist/records/domains/subtitle-style.d.ts +13 -0
  114. package/dist/records/domains/subtitle-style.js +1 -0
  115. package/dist/records/domains/subtitle.d.ts +12 -0
  116. package/dist/records/domains/subtitle.js +1 -0
  117. package/dist/records/domains/template.d.ts +10 -0
  118. package/dist/records/domains/template.js +1 -0
  119. package/dist/records/domains/user-notification-status.d.ts +30 -0
  120. package/dist/records/domains/user-notification-status.js +1 -0
  121. package/dist/records/domains/user-notification.d.ts +69 -0
  122. package/dist/records/domains/user-notification.js +1 -0
  123. package/dist/records/domains/user.d.ts +23 -0
  124. package/dist/records/domains/user.js +1 -0
  125. package/dist/records/exact/asset.d.ts +83 -0
  126. package/dist/records/exact/asset.js +1 -0
  127. package/dist/records/exact/index.d.ts +36 -0
  128. package/dist/records/exact/index.js +4 -0
  129. package/dist/records/exact/media.d.ts +52 -0
  130. package/dist/records/exact/media.js +1 -0
  131. package/dist/records/exact/monitor.d.ts +46 -0
  132. package/dist/records/exact/monitor.js +1 -0
  133. package/dist/records/exact/storage.d.ts +32 -0
  134. package/dist/records/exact/storage.js +1 -0
  135. package/dist/records/index.d.ts +10 -0
  136. package/dist/records/index.js +2 -0
  137. package/dist/records/utils.d.ts +7 -0
  138. package/dist/records/utils.js +1 -0
  139. package/dist/records/utils.tds.d.ts +1 -0
  140. package/dist/records/utils.tds.js +7 -0
  141. package/dist/records/validate/assert-guard.d.ts +4 -0
  142. package/dist/records/validate/assert-guard.js +15861 -0
  143. package/dist/records/validate/assert.d.ts +4 -0
  144. package/dist/records/validate/assert.js +15990 -0
  145. package/dist/records/validate/is.d.ts +4 -0
  146. package/dist/records/validate/is.js +1017 -0
  147. package/dist/records/validate/schemas.d.ts +9 -0
  148. package/dist/records/validate/schemas.js +12613 -0
  149. package/dist/records/validate/stringify.d.ts +4 -0
  150. package/dist/records/validate/stringify.js +1904 -0
  151. package/dist/records/validate/utils.d.ts +15 -0
  152. package/dist/records/validate/utils.js +18 -0
  153. package/dist/records/validate/utils.test.d.ts +1 -0
  154. package/dist/records/validate/utils.test.js +35 -0
  155. package/dist/records/validate/validate.d.ts +5 -0
  156. package/dist/records/validate/validate.js +14943 -0
  157. package/dist/rpc.d.ts +13 -14
  158. package/dist/rpc.js +126 -511
  159. package/dist/tsdoc-metadata.json +1 -1
  160. package/package.json +26 -15
  161. package/dist/asset.d.ts +0 -72
  162. package/dist/domains/asset.d.ts +0 -227
  163. package/dist/domains/asset.js +0 -2672
  164. package/dist/domains/bundle.d.ts +0 -25
  165. package/dist/domains/bundle.js +0 -512
  166. package/dist/domains/clone.d.ts +0 -14
  167. package/dist/domains/clone.js +0 -192
  168. package/dist/domains/comment-reaction.d.ts +0 -15
  169. package/dist/domains/comment-reaction.js +0 -115
  170. package/dist/domains/comment-read-mark.d.ts +0 -15
  171. package/dist/domains/comment-read-mark.js +0 -115
  172. package/dist/domains/comment.d.ts +0 -153
  173. package/dist/domains/comment.js +0 -5906
  174. package/dist/domains/connection.d.ts +0 -141
  175. package/dist/domains/connection.js +0 -5860
  176. package/dist/domains/contact.d.ts +0 -16
  177. package/dist/domains/contact.js +0 -149
  178. package/dist/domains/deepstream.d.ts +0 -14
  179. package/dist/domains/deepstream.js +0 -139
  180. package/dist/domains/design.d.ts +0 -24
  181. package/dist/domains/design.js +0 -303
  182. package/dist/domains/edit.d.ts +0 -17
  183. package/dist/domains/edit.js +0 -224
  184. package/dist/domains/event.d.ts +0 -42
  185. package/dist/domains/event.js +0 -754
  186. package/dist/domains/file.d.ts +0 -51
  187. package/dist/domains/file.js +0 -2506
  188. package/dist/domains/general.d.ts +0 -84
  189. package/dist/domains/general.js +0 -906
  190. package/dist/domains/index.d.ts +0 -75
  191. package/dist/domains/index.js +0 -37
  192. package/dist/domains/media.d.ts +0 -113
  193. package/dist/domains/media.js +0 -4553
  194. package/dist/domains/monitor.d.ts +0 -416
  195. package/dist/domains/monitor.js +0 -6382
  196. package/dist/domains/panel.d.ts +0 -371
  197. package/dist/domains/panel.js +0 -3198
  198. package/dist/domains/permission.d.ts +0 -61
  199. package/dist/domains/permission.js +0 -1926
  200. package/dist/domains/pipeline-preset.d.ts +0 -17
  201. package/dist/domains/pipeline-preset.js +0 -236
  202. package/dist/domains/pipeline.d.ts +0 -30
  203. package/dist/domains/pipeline.js +0 -460
  204. package/dist/domains/planning.d.ts +0 -33
  205. package/dist/domains/planning.js +0 -324
  206. package/dist/domains/publish.d.ts +0 -1397
  207. package/dist/domains/publish.js +0 -34436
  208. package/dist/domains/published.d.ts +0 -19
  209. package/dist/domains/published.js +0 -204
  210. package/dist/domains/render-preset.d.ts +0 -4
  211. package/dist/domains/render.d.ts +0 -172
  212. package/dist/domains/render.js +0 -4783
  213. package/dist/domains/revs.d.ts +0 -13
  214. package/dist/domains/revs.js +0 -125
  215. package/dist/domains/role.d.ts +0 -13
  216. package/dist/domains/role.js +0 -119
  217. package/dist/domains/script.d.ts +0 -13
  218. package/dist/domains/script.js +0 -125
  219. package/dist/domains/search.d.ts +0 -16
  220. package/dist/domains/search.js +0 -168
  221. package/dist/domains/settings.d.ts +0 -12
  222. package/dist/domains/settings.js +0 -6624
  223. package/dist/domains/storyboard.d.ts +0 -14
  224. package/dist/domains/storyboard.js +0 -125
  225. package/dist/domains/subtitle-style.d.ts +0 -37
  226. package/dist/domains/subtitle-style.js +0 -485
  227. package/dist/domains/subtitle.d.ts +0 -19
  228. package/dist/domains/subtitle.js +0 -212
  229. package/dist/domains/template.d.ts +0 -23
  230. package/dist/domains/template.js +0 -372
  231. package/dist/domains/user-notification-status.d.ts +0 -55
  232. package/dist/domains/user-notification-status.js +0 -715
  233. package/dist/domains/user-notification.d.ts +0 -118
  234. package/dist/domains/user-notification.js +0 -3040
  235. package/dist/domains/user.d.ts +0 -48
  236. package/dist/domains/user.js +0 -481
  237. package/dist/monitor.d.ts +0 -71
  238. package/dist/monitor.js +0 -1942
  239. package/dist/schema.json +0 -9075
  240. package/dist/storage.d.ts +0 -51
  241. package/dist/storage.js +0 -1036
  242. /package/dist/{asset.js → common/subtitle-style.js} +0 -0
  243. /package/dist/{domains/render-preset.js → records/domains/asset.js} +0 -0
@@ -1,1926 +0,0 @@
1
- import __typia from "typia";
2
- export const isProvidedPermissionRecord = input => {
3
- const $io0 = input => Array.isArray(input.permissions) && input.permissions.every(elem => "object" === typeof elem && null !== elem && $iu0(elem));
4
- const $io1 = input => "tag" === input.type && (null !== input.method && undefined === input.method) && (Array.isArray(input.tags) && input.tags.every(elem => "string" === typeof elem));
5
- const $io2 = input => "asset" === input.type && "string" === typeof input.method && (null !== input.tags && undefined === input.tags);
6
- const $io3 = input => "rpc" === input.type && "string" === typeof input.method && (null !== input.tags && undefined === input.tags);
7
- const $iu0 = input => (() => {
8
- if ("rpc" === input.type)
9
- return $io3(input);
10
- else if ("asset" === input.type)
11
- return $io2(input);
12
- else if ("tag" === input.type)
13
- return $io1(input);
14
- else
15
- return false;
16
- })();
17
- return "object" === typeof input && null !== input && $io0(input);
18
- };
19
- export const assertProvidedPermissionRecord = (input, errorFactory) => {
20
- const __is = input => {
21
- const $io0 = input => Array.isArray(input.permissions) && input.permissions.every(elem => "object" === typeof elem && null !== elem && $iu0(elem));
22
- const $io1 = input => "tag" === input.type && (null !== input.method && undefined === input.method) && (Array.isArray(input.tags) && input.tags.every(elem => "string" === typeof elem));
23
- const $io2 = input => "asset" === input.type && "string" === typeof input.method && (null !== input.tags && undefined === input.tags);
24
- const $io3 = input => "rpc" === input.type && "string" === typeof input.method && (null !== input.tags && undefined === input.tags);
25
- const $iu0 = input => (() => {
26
- if ("rpc" === input.type)
27
- return $io3(input);
28
- else if ("asset" === input.type)
29
- return $io2(input);
30
- else if ("tag" === input.type)
31
- return $io1(input);
32
- else
33
- return false;
34
- })();
35
- return "object" === typeof input && null !== input && $io0(input);
36
- };
37
- if (false === __is(input))
38
- ((input, _path, _exceptionable = true) => {
39
- const $guard = __typia.createAssert.guard;
40
- const $ao0 = (input, _path, _exceptionable = true) => (Array.isArray(input.permissions) || $guard(_exceptionable, {
41
- path: _path + ".permissions",
42
- expected: "Array<PermissionRecordPermisson>",
43
- value: input.permissions
44
- }, errorFactory)) && input.permissions.every((elem, _index1) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
45
- path: _path + ".permissions[" + _index1 + "]",
46
- expected: "(AssetPermission | RpcPermission | TagPermission)",
47
- value: elem
48
- }, errorFactory)) && $au0(elem, _path + ".permissions[" + _index1 + "]", true && _exceptionable) || $guard(_exceptionable, {
49
- path: _path + ".permissions[" + _index1 + "]",
50
- expected: "(AssetPermission | RpcPermission | TagPermission)",
51
- value: elem
52
- }, errorFactory)) || $guard(_exceptionable, {
53
- path: _path + ".permissions",
54
- expected: "Array<PermissionRecordPermisson>",
55
- value: input.permissions
56
- }, errorFactory);
57
- const $ao1 = (input, _path, _exceptionable = true) => ("tag" === input.type || $guard(_exceptionable, {
58
- path: _path + ".type",
59
- expected: "\"tag\"",
60
- value: input.type
61
- }, errorFactory)) && ((null !== input.method || $guard(_exceptionable, {
62
- path: _path + ".method",
63
- expected: "undefined",
64
- value: input.method
65
- }, errorFactory)) && (undefined === input.method || $guard(_exceptionable, {
66
- path: _path + ".method",
67
- expected: "undefined",
68
- value: input.method
69
- }, errorFactory))) && ((Array.isArray(input.tags) || $guard(_exceptionable, {
70
- path: _path + ".tags",
71
- expected: "Array<string>",
72
- value: input.tags
73
- }, errorFactory)) && input.tags.every((elem, _index2) => "string" === typeof elem || $guard(_exceptionable, {
74
- path: _path + ".tags[" + _index2 + "]",
75
- expected: "string",
76
- value: elem
77
- }, errorFactory)) || $guard(_exceptionable, {
78
- path: _path + ".tags",
79
- expected: "Array<string>",
80
- value: input.tags
81
- }, errorFactory));
82
- const $ao2 = (input, _path, _exceptionable = true) => ("asset" === input.type || $guard(_exceptionable, {
83
- path: _path + ".type",
84
- expected: "\"asset\"",
85
- value: input.type
86
- }, errorFactory)) && ("string" === typeof input.method || $guard(_exceptionable, {
87
- path: _path + ".method",
88
- expected: "string",
89
- value: input.method
90
- }, errorFactory)) && ((null !== input.tags || $guard(_exceptionable, {
91
- path: _path + ".tags",
92
- expected: "undefined",
93
- value: input.tags
94
- }, errorFactory)) && (undefined === input.tags || $guard(_exceptionable, {
95
- path: _path + ".tags",
96
- expected: "undefined",
97
- value: input.tags
98
- }, errorFactory)));
99
- const $ao3 = (input, _path, _exceptionable = true) => ("rpc" === input.type || $guard(_exceptionable, {
100
- path: _path + ".type",
101
- expected: "\"rpc\"",
102
- value: input.type
103
- }, errorFactory)) && ("string" === typeof input.method || $guard(_exceptionable, {
104
- path: _path + ".method",
105
- expected: "string",
106
- value: input.method
107
- }, errorFactory)) && ((null !== input.tags || $guard(_exceptionable, {
108
- path: _path + ".tags",
109
- expected: "undefined",
110
- value: input.tags
111
- }, errorFactory)) && (undefined === input.tags || $guard(_exceptionable, {
112
- path: _path + ".tags",
113
- expected: "undefined",
114
- value: input.tags
115
- }, errorFactory)));
116
- const $au0 = (input, _path, _exceptionable = true) => (() => {
117
- if ("rpc" === input.type)
118
- return $ao3(input, _path, true && _exceptionable);
119
- else if ("asset" === input.type)
120
- return $ao2(input, _path, true && _exceptionable);
121
- else if ("tag" === input.type)
122
- return $ao1(input, _path, true && _exceptionable);
123
- else
124
- return $guard(_exceptionable, {
125
- path: _path,
126
- expected: "(RpcPermission | AssetPermission | TagPermission)",
127
- value: input
128
- }, errorFactory);
129
- })();
130
- return ("object" === typeof input && null !== input || $guard(true, {
131
- path: _path + "",
132
- expected: "ProvidedPermissionRecord",
133
- value: input
134
- }, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
135
- path: _path + "",
136
- expected: "ProvidedPermissionRecord",
137
- value: input
138
- }, errorFactory);
139
- })(input, "$input", true);
140
- return input;
141
- };
142
- export const randomProvidedPermissionRecord = generator => {
143
- const $generator = __typia.createRandom.generator;
144
- const $pick = __typia.createRandom.pick;
145
- const $ro0 = (_recursive = false, _depth = 0) => ({
146
- permissions: (generator?.array ?? $generator.array)(() => $pick([
147
- () => $ro3(_recursive, _recursive ? 1 + _depth : _depth),
148
- () => $ro2(_recursive, _recursive ? 1 + _depth : _depth),
149
- () => $ro1(_recursive, _recursive ? 1 + _depth : _depth)
150
- ])())
151
- });
152
- const $ro1 = (_recursive = false, _depth = 0) => ({
153
- type: "tag",
154
- method: undefined,
155
- tags: (generator?.array ?? $generator.array)(() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)())
156
- });
157
- const $ro2 = (_recursive = false, _depth = 0) => ({
158
- type: "asset",
159
- method: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
160
- tags: undefined
161
- });
162
- const $ro3 = (_recursive = false, _depth = 0) => ({
163
- type: "rpc",
164
- method: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
165
- tags: undefined
166
- });
167
- return $ro0();
168
- };
169
- export const assertGuardProvidedPermissionRecord = (input, errorFactory) => {
170
- const __is = input => {
171
- const $io0 = input => Array.isArray(input.permissions) && input.permissions.every(elem => "object" === typeof elem && null !== elem && $iu0(elem));
172
- const $io1 = input => "tag" === input.type && (null !== input.method && undefined === input.method) && (Array.isArray(input.tags) && input.tags.every(elem => "string" === typeof elem));
173
- const $io2 = input => "asset" === input.type && "string" === typeof input.method && (null !== input.tags && undefined === input.tags);
174
- const $io3 = input => "rpc" === input.type && "string" === typeof input.method && (null !== input.tags && undefined === input.tags);
175
- const $iu0 = input => (() => {
176
- if ("rpc" === input.type)
177
- return $io3(input);
178
- else if ("asset" === input.type)
179
- return $io2(input);
180
- else if ("tag" === input.type)
181
- return $io1(input);
182
- else
183
- return false;
184
- })();
185
- return "object" === typeof input && null !== input && $io0(input);
186
- };
187
- if (false === __is(input))
188
- ((input, _path, _exceptionable = true) => {
189
- const $guard = __typia.createAssertGuard.guard;
190
- const $ao0 = (input, _path, _exceptionable = true) => (Array.isArray(input.permissions) || $guard(_exceptionable, {
191
- path: _path + ".permissions",
192
- expected: "Array<PermissionRecordPermisson>",
193
- value: input.permissions
194
- }, errorFactory)) && input.permissions.every((elem, _index1) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
195
- path: _path + ".permissions[" + _index1 + "]",
196
- expected: "(AssetPermission | RpcPermission | TagPermission)",
197
- value: elem
198
- }, errorFactory)) && $au0(elem, _path + ".permissions[" + _index1 + "]", true && _exceptionable) || $guard(_exceptionable, {
199
- path: _path + ".permissions[" + _index1 + "]",
200
- expected: "(AssetPermission | RpcPermission | TagPermission)",
201
- value: elem
202
- }, errorFactory)) || $guard(_exceptionable, {
203
- path: _path + ".permissions",
204
- expected: "Array<PermissionRecordPermisson>",
205
- value: input.permissions
206
- }, errorFactory);
207
- const $ao1 = (input, _path, _exceptionable = true) => ("tag" === input.type || $guard(_exceptionable, {
208
- path: _path + ".type",
209
- expected: "\"tag\"",
210
- value: input.type
211
- }, errorFactory)) && ((null !== input.method || $guard(_exceptionable, {
212
- path: _path + ".method",
213
- expected: "undefined",
214
- value: input.method
215
- }, errorFactory)) && (undefined === input.method || $guard(_exceptionable, {
216
- path: _path + ".method",
217
- expected: "undefined",
218
- value: input.method
219
- }, errorFactory))) && ((Array.isArray(input.tags) || $guard(_exceptionable, {
220
- path: _path + ".tags",
221
- expected: "Array<string>",
222
- value: input.tags
223
- }, errorFactory)) && input.tags.every((elem, _index2) => "string" === typeof elem || $guard(_exceptionable, {
224
- path: _path + ".tags[" + _index2 + "]",
225
- expected: "string",
226
- value: elem
227
- }, errorFactory)) || $guard(_exceptionable, {
228
- path: _path + ".tags",
229
- expected: "Array<string>",
230
- value: input.tags
231
- }, errorFactory));
232
- const $ao2 = (input, _path, _exceptionable = true) => ("asset" === input.type || $guard(_exceptionable, {
233
- path: _path + ".type",
234
- expected: "\"asset\"",
235
- value: input.type
236
- }, errorFactory)) && ("string" === typeof input.method || $guard(_exceptionable, {
237
- path: _path + ".method",
238
- expected: "string",
239
- value: input.method
240
- }, errorFactory)) && ((null !== input.tags || $guard(_exceptionable, {
241
- path: _path + ".tags",
242
- expected: "undefined",
243
- value: input.tags
244
- }, errorFactory)) && (undefined === input.tags || $guard(_exceptionable, {
245
- path: _path + ".tags",
246
- expected: "undefined",
247
- value: input.tags
248
- }, errorFactory)));
249
- const $ao3 = (input, _path, _exceptionable = true) => ("rpc" === input.type || $guard(_exceptionable, {
250
- path: _path + ".type",
251
- expected: "\"rpc\"",
252
- value: input.type
253
- }, errorFactory)) && ("string" === typeof input.method || $guard(_exceptionable, {
254
- path: _path + ".method",
255
- expected: "string",
256
- value: input.method
257
- }, errorFactory)) && ((null !== input.tags || $guard(_exceptionable, {
258
- path: _path + ".tags",
259
- expected: "undefined",
260
- value: input.tags
261
- }, errorFactory)) && (undefined === input.tags || $guard(_exceptionable, {
262
- path: _path + ".tags",
263
- expected: "undefined",
264
- value: input.tags
265
- }, errorFactory)));
266
- const $au0 = (input, _path, _exceptionable = true) => (() => {
267
- if ("rpc" === input.type)
268
- return $ao3(input, _path, true && _exceptionable);
269
- else if ("asset" === input.type)
270
- return $ao2(input, _path, true && _exceptionable);
271
- else if ("tag" === input.type)
272
- return $ao1(input, _path, true && _exceptionable);
273
- else
274
- return $guard(_exceptionable, {
275
- path: _path,
276
- expected: "(RpcPermission | AssetPermission | TagPermission)",
277
- value: input
278
- }, errorFactory);
279
- })();
280
- return ("object" === typeof input && null !== input || $guard(true, {
281
- path: _path + "",
282
- expected: "ProvidedPermissionRecord",
283
- value: input
284
- }, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
285
- path: _path + "",
286
- expected: "ProvidedPermissionRecord",
287
- value: input
288
- }, errorFactory);
289
- })(input, "$input", true);
290
- };
291
- export const stringifyProvidedPermissionRecord = input => {
292
- const $io1 = input => "tag" === input.type && (null !== input.method && undefined === input.method) && (Array.isArray(input.tags) && input.tags.every(elem => "string" === typeof elem));
293
- const $io2 = input => "asset" === input.type && "string" === typeof input.method && (null !== input.tags && undefined === input.tags);
294
- const $io3 = input => "rpc" === input.type && "string" === typeof input.method && (null !== input.tags && undefined === input.tags);
295
- const $iu0 = input => (() => {
296
- if ("rpc" === input.type)
297
- return $io3(input);
298
- else if ("asset" === input.type)
299
- return $io2(input);
300
- else if ("tag" === input.type)
301
- return $io1(input);
302
- else
303
- return false;
304
- })();
305
- const $string = __typia.json.createStringify.string;
306
- const $throws = __typia.json.createStringify.throws;
307
- const $so0 = input => `{"permissions":${`[${input.permissions.map(elem => $su0(elem)).join(",")}]`}}`;
308
- const $so1 = input => `{"type":${(() => {
309
- if ("string" === typeof input.type)
310
- return $string(input.type);
311
- if ("string" === typeof input.type)
312
- return "\"" + input.type + "\"";
313
- $throws({
314
- expected: "\"tag\"",
315
- value: input.type
316
- });
317
- })()},"tags":${`[${input.tags.map(elem => $string(elem)).join(",")}]`}}`;
318
- const $so2 = input => `{"type":${(() => {
319
- if ("string" === typeof input.type)
320
- return $string(input.type);
321
- if ("string" === typeof input.type)
322
- return "\"" + input.type + "\"";
323
- $throws({
324
- expected: "\"asset\"",
325
- value: input.type
326
- });
327
- })()},"method":${$string(input.method)}}`;
328
- const $so3 = input => `{"type":${(() => {
329
- if ("string" === typeof input.type)
330
- return $string(input.type);
331
- if ("string" === typeof input.type)
332
- return "\"" + input.type + "\"";
333
- $throws({
334
- expected: "\"rpc\"",
335
- value: input.type
336
- });
337
- })()},"method":${$string(input.method)}}`;
338
- const $su0 = input => (() => {
339
- if ("rpc" === input.type)
340
- return $so3(input);
341
- else if ("asset" === input.type)
342
- return $so2(input);
343
- else if ("tag" === input.type)
344
- return $so1(input);
345
- else
346
- $throws({
347
- expected: "(RpcPermission | AssetPermission | TagPermission)",
348
- value: input
349
- });
350
- })();
351
- return $so0(input);
352
- };
353
- export const assertStringifyProvidedPermissionRecord = (input, errorFactory) => { const assert = (input, errorFactory) => {
354
- const __is = input => {
355
- const $io0 = input => Array.isArray(input.permissions) && input.permissions.every(elem => "object" === typeof elem && null !== elem && $iu0(elem));
356
- const $io1 = input => "tag" === input.type && (null !== input.method && undefined === input.method) && (Array.isArray(input.tags) && input.tags.every(elem => "string" === typeof elem));
357
- const $io2 = input => "asset" === input.type && "string" === typeof input.method && (null !== input.tags && undefined === input.tags);
358
- const $io3 = input => "rpc" === input.type && "string" === typeof input.method && (null !== input.tags && undefined === input.tags);
359
- const $iu0 = input => (() => {
360
- if ("rpc" === input.type)
361
- return $io3(input);
362
- else if ("asset" === input.type)
363
- return $io2(input);
364
- else if ("tag" === input.type)
365
- return $io1(input);
366
- else
367
- return false;
368
- })();
369
- return "object" === typeof input && null !== input && $io0(input);
370
- };
371
- if (false === __is(input))
372
- ((input, _path, _exceptionable = true) => {
373
- const $guard = __typia.json.createAssertStringify.guard;
374
- const $ao0 = (input, _path, _exceptionable = true) => (Array.isArray(input.permissions) || $guard(_exceptionable, {
375
- path: _path + ".permissions",
376
- expected: "Array<PermissionRecordPermisson>",
377
- value: input.permissions
378
- }, errorFactory)) && input.permissions.every((elem, _index1) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
379
- path: _path + ".permissions[" + _index1 + "]",
380
- expected: "(AssetPermission | RpcPermission | TagPermission)",
381
- value: elem
382
- }, errorFactory)) && $au0(elem, _path + ".permissions[" + _index1 + "]", true && _exceptionable) || $guard(_exceptionable, {
383
- path: _path + ".permissions[" + _index1 + "]",
384
- expected: "(AssetPermission | RpcPermission | TagPermission)",
385
- value: elem
386
- }, errorFactory)) || $guard(_exceptionable, {
387
- path: _path + ".permissions",
388
- expected: "Array<PermissionRecordPermisson>",
389
- value: input.permissions
390
- }, errorFactory);
391
- const $ao1 = (input, _path, _exceptionable = true) => ("tag" === input.type || $guard(_exceptionable, {
392
- path: _path + ".type",
393
- expected: "\"tag\"",
394
- value: input.type
395
- }, errorFactory)) && ((null !== input.method || $guard(_exceptionable, {
396
- path: _path + ".method",
397
- expected: "undefined",
398
- value: input.method
399
- }, errorFactory)) && (undefined === input.method || $guard(_exceptionable, {
400
- path: _path + ".method",
401
- expected: "undefined",
402
- value: input.method
403
- }, errorFactory))) && ((Array.isArray(input.tags) || $guard(_exceptionable, {
404
- path: _path + ".tags",
405
- expected: "Array<string>",
406
- value: input.tags
407
- }, errorFactory)) && input.tags.every((elem, _index2) => "string" === typeof elem || $guard(_exceptionable, {
408
- path: _path + ".tags[" + _index2 + "]",
409
- expected: "string",
410
- value: elem
411
- }, errorFactory)) || $guard(_exceptionable, {
412
- path: _path + ".tags",
413
- expected: "Array<string>",
414
- value: input.tags
415
- }, errorFactory));
416
- const $ao2 = (input, _path, _exceptionable = true) => ("asset" === input.type || $guard(_exceptionable, {
417
- path: _path + ".type",
418
- expected: "\"asset\"",
419
- value: input.type
420
- }, errorFactory)) && ("string" === typeof input.method || $guard(_exceptionable, {
421
- path: _path + ".method",
422
- expected: "string",
423
- value: input.method
424
- }, errorFactory)) && ((null !== input.tags || $guard(_exceptionable, {
425
- path: _path + ".tags",
426
- expected: "undefined",
427
- value: input.tags
428
- }, errorFactory)) && (undefined === input.tags || $guard(_exceptionable, {
429
- path: _path + ".tags",
430
- expected: "undefined",
431
- value: input.tags
432
- }, errorFactory)));
433
- const $ao3 = (input, _path, _exceptionable = true) => ("rpc" === input.type || $guard(_exceptionable, {
434
- path: _path + ".type",
435
- expected: "\"rpc\"",
436
- value: input.type
437
- }, errorFactory)) && ("string" === typeof input.method || $guard(_exceptionable, {
438
- path: _path + ".method",
439
- expected: "string",
440
- value: input.method
441
- }, errorFactory)) && ((null !== input.tags || $guard(_exceptionable, {
442
- path: _path + ".tags",
443
- expected: "undefined",
444
- value: input.tags
445
- }, errorFactory)) && (undefined === input.tags || $guard(_exceptionable, {
446
- path: _path + ".tags",
447
- expected: "undefined",
448
- value: input.tags
449
- }, errorFactory)));
450
- const $au0 = (input, _path, _exceptionable = true) => (() => {
451
- if ("rpc" === input.type)
452
- return $ao3(input, _path, true && _exceptionable);
453
- else if ("asset" === input.type)
454
- return $ao2(input, _path, true && _exceptionable);
455
- else if ("tag" === input.type)
456
- return $ao1(input, _path, true && _exceptionable);
457
- else
458
- return $guard(_exceptionable, {
459
- path: _path,
460
- expected: "(RpcPermission | AssetPermission | TagPermission)",
461
- value: input
462
- }, errorFactory);
463
- })();
464
- return ("object" === typeof input && null !== input || $guard(true, {
465
- path: _path + "",
466
- expected: "ProvidedPermissionRecord",
467
- value: input
468
- }, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
469
- path: _path + "",
470
- expected: "ProvidedPermissionRecord",
471
- value: input
472
- }, errorFactory);
473
- })(input, "$input", true);
474
- return input;
475
- }; const stringify = input => {
476
- const $io1 = input => "tag" === input.type && (null !== input.method && undefined === input.method) && (Array.isArray(input.tags) && input.tags.every(elem => "string" === typeof elem));
477
- const $io2 = input => "asset" === input.type && "string" === typeof input.method && (null !== input.tags && undefined === input.tags);
478
- const $io3 = input => "rpc" === input.type && "string" === typeof input.method && (null !== input.tags && undefined === input.tags);
479
- const $iu0 = input => (() => {
480
- if ("rpc" === input.type)
481
- return $io3(input);
482
- else if ("asset" === input.type)
483
- return $io2(input);
484
- else if ("tag" === input.type)
485
- return $io1(input);
486
- else
487
- return false;
488
- })();
489
- const $string = __typia.json.createAssertStringify.string;
490
- const $throws = __typia.json.createAssertStringify.throws;
491
- const $so0 = input => `{"permissions":${`[${input.permissions.map(elem => $su0(elem)).join(",")}]`}}`;
492
- const $so1 = input => `{"type":${(() => {
493
- if ("string" === typeof input.type)
494
- return $string(input.type);
495
- if ("string" === typeof input.type)
496
- return "\"" + input.type + "\"";
497
- $throws({
498
- expected: "\"tag\"",
499
- value: input.type
500
- });
501
- })()},"tags":${`[${input.tags.map(elem => $string(elem)).join(",")}]`}}`;
502
- const $so2 = input => `{"type":${(() => {
503
- if ("string" === typeof input.type)
504
- return $string(input.type);
505
- if ("string" === typeof input.type)
506
- return "\"" + input.type + "\"";
507
- $throws({
508
- expected: "\"asset\"",
509
- value: input.type
510
- });
511
- })()},"method":${$string(input.method)}}`;
512
- const $so3 = input => `{"type":${(() => {
513
- if ("string" === typeof input.type)
514
- return $string(input.type);
515
- if ("string" === typeof input.type)
516
- return "\"" + input.type + "\"";
517
- $throws({
518
- expected: "\"rpc\"",
519
- value: input.type
520
- });
521
- })()},"method":${$string(input.method)}}`;
522
- const $su0 = input => (() => {
523
- if ("rpc" === input.type)
524
- return $so3(input);
525
- else if ("asset" === input.type)
526
- return $so2(input);
527
- else if ("tag" === input.type)
528
- return $so1(input);
529
- else
530
- $throws({
531
- expected: "(RpcPermission | AssetPermission | TagPermission)",
532
- value: input
533
- });
534
- })();
535
- return $so0(input);
536
- }; return stringify(assert(input, errorFactory)); };
537
- export const isPermissionRecord = input => {
538
- const $io0 = input => "tag" === input.type && (null !== input.method && undefined === input.method) && (Array.isArray(input.tags) && input.tags.every(elem => "string" === typeof elem));
539
- const $io1 = input => "asset" === input.type && "string" === typeof input.method && (null !== input.tags && undefined === input.tags);
540
- const $io2 = input => "rpc" === input.type && "string" === typeof input.method && (null !== input.tags && undefined === input.tags);
541
- const $iu0 = input => (() => {
542
- if ("rpc" === input.type)
543
- return $io2(input);
544
- else if ("asset" === input.type)
545
- return $io1(input);
546
- else if ("tag" === input.type)
547
- return $io0(input);
548
- else
549
- return false;
550
- })();
551
- return "object" === typeof input && null !== input && $iu0(input);
552
- };
553
- export const assertPermissionRecord = (input, errorFactory) => {
554
- const __is = input => {
555
- const $io0 = input => "tag" === input.type && (null !== input.method && undefined === input.method) && (Array.isArray(input.tags) && input.tags.every(elem => "string" === typeof elem));
556
- const $io1 = input => "asset" === input.type && "string" === typeof input.method && (null !== input.tags && undefined === input.tags);
557
- const $io2 = input => "rpc" === input.type && "string" === typeof input.method && (null !== input.tags && undefined === input.tags);
558
- const $iu0 = input => (() => {
559
- if ("rpc" === input.type)
560
- return $io2(input);
561
- else if ("asset" === input.type)
562
- return $io1(input);
563
- else if ("tag" === input.type)
564
- return $io0(input);
565
- else
566
- return false;
567
- })();
568
- return "object" === typeof input && null !== input && $iu0(input);
569
- };
570
- if (false === __is(input))
571
- ((input, _path, _exceptionable = true) => {
572
- const $guard = __typia.createAssert.guard;
573
- const $ao0 = (input, _path, _exceptionable = true) => ("tag" === input.type || $guard(_exceptionable, {
574
- path: _path + ".type",
575
- expected: "\"tag\"",
576
- value: input.type
577
- }, errorFactory)) && ((null !== input.method || $guard(_exceptionable, {
578
- path: _path + ".method",
579
- expected: "undefined",
580
- value: input.method
581
- }, errorFactory)) && (undefined === input.method || $guard(_exceptionable, {
582
- path: _path + ".method",
583
- expected: "undefined",
584
- value: input.method
585
- }, errorFactory))) && ((Array.isArray(input.tags) || $guard(_exceptionable, {
586
- path: _path + ".tags",
587
- expected: "Array<string>",
588
- value: input.tags
589
- }, errorFactory)) && input.tags.every((elem, _index1) => "string" === typeof elem || $guard(_exceptionable, {
590
- path: _path + ".tags[" + _index1 + "]",
591
- expected: "string",
592
- value: elem
593
- }, errorFactory)) || $guard(_exceptionable, {
594
- path: _path + ".tags",
595
- expected: "Array<string>",
596
- value: input.tags
597
- }, errorFactory));
598
- const $ao1 = (input, _path, _exceptionable = true) => ("asset" === input.type || $guard(_exceptionable, {
599
- path: _path + ".type",
600
- expected: "\"asset\"",
601
- value: input.type
602
- }, errorFactory)) && ("string" === typeof input.method || $guard(_exceptionable, {
603
- path: _path + ".method",
604
- expected: "string",
605
- value: input.method
606
- }, errorFactory)) && ((null !== input.tags || $guard(_exceptionable, {
607
- path: _path + ".tags",
608
- expected: "undefined",
609
- value: input.tags
610
- }, errorFactory)) && (undefined === input.tags || $guard(_exceptionable, {
611
- path: _path + ".tags",
612
- expected: "undefined",
613
- value: input.tags
614
- }, errorFactory)));
615
- const $ao2 = (input, _path, _exceptionable = true) => ("rpc" === input.type || $guard(_exceptionable, {
616
- path: _path + ".type",
617
- expected: "\"rpc\"",
618
- value: input.type
619
- }, errorFactory)) && ("string" === typeof input.method || $guard(_exceptionable, {
620
- path: _path + ".method",
621
- expected: "string",
622
- value: input.method
623
- }, errorFactory)) && ((null !== input.tags || $guard(_exceptionable, {
624
- path: _path + ".tags",
625
- expected: "undefined",
626
- value: input.tags
627
- }, errorFactory)) && (undefined === input.tags || $guard(_exceptionable, {
628
- path: _path + ".tags",
629
- expected: "undefined",
630
- value: input.tags
631
- }, errorFactory)));
632
- const $au0 = (input, _path, _exceptionable = true) => (() => {
633
- if ("rpc" === input.type)
634
- return $ao2(input, _path, true && _exceptionable);
635
- else if ("asset" === input.type)
636
- return $ao1(input, _path, true && _exceptionable);
637
- else if ("tag" === input.type)
638
- return $ao0(input, _path, true && _exceptionable);
639
- else
640
- return $guard(_exceptionable, {
641
- path: _path,
642
- expected: "(RpcPermission | AssetPermission | TagPermission)",
643
- value: input
644
- }, errorFactory);
645
- })();
646
- return ("object" === typeof input && null !== input || $guard(true, {
647
- path: _path + "",
648
- expected: "(AssetPermission | RpcPermission | TagPermission)",
649
- value: input
650
- }, errorFactory)) && $au0(input, _path + "", true) || $guard(true, {
651
- path: _path + "",
652
- expected: "(AssetPermission | RpcPermission | TagPermission)",
653
- value: input
654
- }, errorFactory);
655
- })(input, "$input", true);
656
- return input;
657
- };
658
- export const randomPermissionRecord = generator => {
659
- const $generator = __typia.createRandom.generator;
660
- const $pick = __typia.createRandom.pick;
661
- const $ro0 = (_recursive = false, _depth = 0) => ({
662
- type: "tag",
663
- method: undefined,
664
- tags: (generator?.array ?? $generator.array)(() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)())
665
- });
666
- const $ro1 = (_recursive = false, _depth = 0) => ({
667
- type: "asset",
668
- method: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
669
- tags: undefined
670
- });
671
- const $ro2 = (_recursive = false, _depth = 0) => ({
672
- type: "rpc",
673
- method: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
674
- tags: undefined
675
- });
676
- return $pick([
677
- () => $ro2(),
678
- () => $ro1(),
679
- () => $ro0()
680
- ])();
681
- };
682
- export const assertGuardPermissionRecord = (input, errorFactory) => {
683
- const __is = input => {
684
- const $io0 = input => "tag" === input.type && (null !== input.method && undefined === input.method) && (Array.isArray(input.tags) && input.tags.every(elem => "string" === typeof elem));
685
- const $io1 = input => "asset" === input.type && "string" === typeof input.method && (null !== input.tags && undefined === input.tags);
686
- const $io2 = input => "rpc" === input.type && "string" === typeof input.method && (null !== input.tags && undefined === input.tags);
687
- const $iu0 = input => (() => {
688
- if ("rpc" === input.type)
689
- return $io2(input);
690
- else if ("asset" === input.type)
691
- return $io1(input);
692
- else if ("tag" === input.type)
693
- return $io0(input);
694
- else
695
- return false;
696
- })();
697
- return "object" === typeof input && null !== input && $iu0(input);
698
- };
699
- if (false === __is(input))
700
- ((input, _path, _exceptionable = true) => {
701
- const $guard = __typia.createAssertGuard.guard;
702
- const $ao0 = (input, _path, _exceptionable = true) => ("tag" === input.type || $guard(_exceptionable, {
703
- path: _path + ".type",
704
- expected: "\"tag\"",
705
- value: input.type
706
- }, errorFactory)) && ((null !== input.method || $guard(_exceptionable, {
707
- path: _path + ".method",
708
- expected: "undefined",
709
- value: input.method
710
- }, errorFactory)) && (undefined === input.method || $guard(_exceptionable, {
711
- path: _path + ".method",
712
- expected: "undefined",
713
- value: input.method
714
- }, errorFactory))) && ((Array.isArray(input.tags) || $guard(_exceptionable, {
715
- path: _path + ".tags",
716
- expected: "Array<string>",
717
- value: input.tags
718
- }, errorFactory)) && input.tags.every((elem, _index1) => "string" === typeof elem || $guard(_exceptionable, {
719
- path: _path + ".tags[" + _index1 + "]",
720
- expected: "string",
721
- value: elem
722
- }, errorFactory)) || $guard(_exceptionable, {
723
- path: _path + ".tags",
724
- expected: "Array<string>",
725
- value: input.tags
726
- }, errorFactory));
727
- const $ao1 = (input, _path, _exceptionable = true) => ("asset" === input.type || $guard(_exceptionable, {
728
- path: _path + ".type",
729
- expected: "\"asset\"",
730
- value: input.type
731
- }, errorFactory)) && ("string" === typeof input.method || $guard(_exceptionable, {
732
- path: _path + ".method",
733
- expected: "string",
734
- value: input.method
735
- }, errorFactory)) && ((null !== input.tags || $guard(_exceptionable, {
736
- path: _path + ".tags",
737
- expected: "undefined",
738
- value: input.tags
739
- }, errorFactory)) && (undefined === input.tags || $guard(_exceptionable, {
740
- path: _path + ".tags",
741
- expected: "undefined",
742
- value: input.tags
743
- }, errorFactory)));
744
- const $ao2 = (input, _path, _exceptionable = true) => ("rpc" === input.type || $guard(_exceptionable, {
745
- path: _path + ".type",
746
- expected: "\"rpc\"",
747
- value: input.type
748
- }, errorFactory)) && ("string" === typeof input.method || $guard(_exceptionable, {
749
- path: _path + ".method",
750
- expected: "string",
751
- value: input.method
752
- }, errorFactory)) && ((null !== input.tags || $guard(_exceptionable, {
753
- path: _path + ".tags",
754
- expected: "undefined",
755
- value: input.tags
756
- }, errorFactory)) && (undefined === input.tags || $guard(_exceptionable, {
757
- path: _path + ".tags",
758
- expected: "undefined",
759
- value: input.tags
760
- }, errorFactory)));
761
- const $au0 = (input, _path, _exceptionable = true) => (() => {
762
- if ("rpc" === input.type)
763
- return $ao2(input, _path, true && _exceptionable);
764
- else if ("asset" === input.type)
765
- return $ao1(input, _path, true && _exceptionable);
766
- else if ("tag" === input.type)
767
- return $ao0(input, _path, true && _exceptionable);
768
- else
769
- return $guard(_exceptionable, {
770
- path: _path,
771
- expected: "(RpcPermission | AssetPermission | TagPermission)",
772
- value: input
773
- }, errorFactory);
774
- })();
775
- return ("object" === typeof input && null !== input || $guard(true, {
776
- path: _path + "",
777
- expected: "(AssetPermission | RpcPermission | TagPermission)",
778
- value: input
779
- }, errorFactory)) && $au0(input, _path + "", true) || $guard(true, {
780
- path: _path + "",
781
- expected: "(AssetPermission | RpcPermission | TagPermission)",
782
- value: input
783
- }, errorFactory);
784
- })(input, "$input", true);
785
- };
786
- export const stringifyPermissionRecord = input => {
787
- const $io0 = input => "tag" === input.type && (null !== input.method && undefined === input.method) && (Array.isArray(input.tags) && input.tags.every(elem => "string" === typeof elem));
788
- const $io1 = input => "asset" === input.type && "string" === typeof input.method && (null !== input.tags && undefined === input.tags);
789
- const $io2 = input => "rpc" === input.type && "string" === typeof input.method && (null !== input.tags && undefined === input.tags);
790
- const $string = __typia.json.createStringify.string;
791
- const $throws = __typia.json.createStringify.throws;
792
- const $so0 = input => `{"type":${(() => {
793
- if ("string" === typeof input.type)
794
- return $string(input.type);
795
- if ("string" === typeof input.type)
796
- return "\"" + input.type + "\"";
797
- $throws({
798
- expected: "\"tag\"",
799
- value: input.type
800
- });
801
- })()},"tags":${`[${input.tags.map(elem => $string(elem)).join(",")}]`}}`;
802
- const $so1 = input => `{"type":${(() => {
803
- if ("string" === typeof input.type)
804
- return $string(input.type);
805
- if ("string" === typeof input.type)
806
- return "\"" + input.type + "\"";
807
- $throws({
808
- expected: "\"asset\"",
809
- value: input.type
810
- });
811
- })()},"method":${$string(input.method)}}`;
812
- const $so2 = input => `{"type":${(() => {
813
- if ("string" === typeof input.type)
814
- return $string(input.type);
815
- if ("string" === typeof input.type)
816
- return "\"" + input.type + "\"";
817
- $throws({
818
- expected: "\"rpc\"",
819
- value: input.type
820
- });
821
- })()},"method":${$string(input.method)}}`;
822
- const $su0 = input => (() => {
823
- if ("rpc" === input.type)
824
- return $so2(input);
825
- else if ("asset" === input.type)
826
- return $so1(input);
827
- else if ("tag" === input.type)
828
- return $so0(input);
829
- else
830
- $throws({
831
- expected: "(RpcPermission | AssetPermission | TagPermission)",
832
- value: input
833
- });
834
- })();
835
- return $su0(input);
836
- };
837
- export const assertStringifyPermissionRecord = (input, errorFactory) => { const assert = (input, errorFactory) => {
838
- const __is = input => {
839
- const $io0 = input => "tag" === input.type && (null !== input.method && undefined === input.method) && (Array.isArray(input.tags) && input.tags.every(elem => "string" === typeof elem));
840
- const $io1 = input => "asset" === input.type && "string" === typeof input.method && (null !== input.tags && undefined === input.tags);
841
- const $io2 = input => "rpc" === input.type && "string" === typeof input.method && (null !== input.tags && undefined === input.tags);
842
- const $iu0 = input => (() => {
843
- if ("rpc" === input.type)
844
- return $io2(input);
845
- else if ("asset" === input.type)
846
- return $io1(input);
847
- else if ("tag" === input.type)
848
- return $io0(input);
849
- else
850
- return false;
851
- })();
852
- return "object" === typeof input && null !== input && $iu0(input);
853
- };
854
- if (false === __is(input))
855
- ((input, _path, _exceptionable = true) => {
856
- const $guard = __typia.json.createAssertStringify.guard;
857
- const $ao0 = (input, _path, _exceptionable = true) => ("tag" === input.type || $guard(_exceptionable, {
858
- path: _path + ".type",
859
- expected: "\"tag\"",
860
- value: input.type
861
- }, errorFactory)) && ((null !== input.method || $guard(_exceptionable, {
862
- path: _path + ".method",
863
- expected: "undefined",
864
- value: input.method
865
- }, errorFactory)) && (undefined === input.method || $guard(_exceptionable, {
866
- path: _path + ".method",
867
- expected: "undefined",
868
- value: input.method
869
- }, errorFactory))) && ((Array.isArray(input.tags) || $guard(_exceptionable, {
870
- path: _path + ".tags",
871
- expected: "Array<string>",
872
- value: input.tags
873
- }, errorFactory)) && input.tags.every((elem, _index1) => "string" === typeof elem || $guard(_exceptionable, {
874
- path: _path + ".tags[" + _index1 + "]",
875
- expected: "string",
876
- value: elem
877
- }, errorFactory)) || $guard(_exceptionable, {
878
- path: _path + ".tags",
879
- expected: "Array<string>",
880
- value: input.tags
881
- }, errorFactory));
882
- const $ao1 = (input, _path, _exceptionable = true) => ("asset" === input.type || $guard(_exceptionable, {
883
- path: _path + ".type",
884
- expected: "\"asset\"",
885
- value: input.type
886
- }, errorFactory)) && ("string" === typeof input.method || $guard(_exceptionable, {
887
- path: _path + ".method",
888
- expected: "string",
889
- value: input.method
890
- }, errorFactory)) && ((null !== input.tags || $guard(_exceptionable, {
891
- path: _path + ".tags",
892
- expected: "undefined",
893
- value: input.tags
894
- }, errorFactory)) && (undefined === input.tags || $guard(_exceptionable, {
895
- path: _path + ".tags",
896
- expected: "undefined",
897
- value: input.tags
898
- }, errorFactory)));
899
- const $ao2 = (input, _path, _exceptionable = true) => ("rpc" === input.type || $guard(_exceptionable, {
900
- path: _path + ".type",
901
- expected: "\"rpc\"",
902
- value: input.type
903
- }, errorFactory)) && ("string" === typeof input.method || $guard(_exceptionable, {
904
- path: _path + ".method",
905
- expected: "string",
906
- value: input.method
907
- }, errorFactory)) && ((null !== input.tags || $guard(_exceptionable, {
908
- path: _path + ".tags",
909
- expected: "undefined",
910
- value: input.tags
911
- }, errorFactory)) && (undefined === input.tags || $guard(_exceptionable, {
912
- path: _path + ".tags",
913
- expected: "undefined",
914
- value: input.tags
915
- }, errorFactory)));
916
- const $au0 = (input, _path, _exceptionable = true) => (() => {
917
- if ("rpc" === input.type)
918
- return $ao2(input, _path, true && _exceptionable);
919
- else if ("asset" === input.type)
920
- return $ao1(input, _path, true && _exceptionable);
921
- else if ("tag" === input.type)
922
- return $ao0(input, _path, true && _exceptionable);
923
- else
924
- return $guard(_exceptionable, {
925
- path: _path,
926
- expected: "(RpcPermission | AssetPermission | TagPermission)",
927
- value: input
928
- }, errorFactory);
929
- })();
930
- return ("object" === typeof input && null !== input || $guard(true, {
931
- path: _path + "",
932
- expected: "(AssetPermission | RpcPermission | TagPermission)",
933
- value: input
934
- }, errorFactory)) && $au0(input, _path + "", true) || $guard(true, {
935
- path: _path + "",
936
- expected: "(AssetPermission | RpcPermission | TagPermission)",
937
- value: input
938
- }, errorFactory);
939
- })(input, "$input", true);
940
- return input;
941
- }; const stringify = input => {
942
- const $io0 = input => "tag" === input.type && (null !== input.method && undefined === input.method) && (Array.isArray(input.tags) && input.tags.every(elem => "string" === typeof elem));
943
- const $io1 = input => "asset" === input.type && "string" === typeof input.method && (null !== input.tags && undefined === input.tags);
944
- const $io2 = input => "rpc" === input.type && "string" === typeof input.method && (null !== input.tags && undefined === input.tags);
945
- const $string = __typia.json.createAssertStringify.string;
946
- const $throws = __typia.json.createAssertStringify.throws;
947
- const $so0 = input => `{"type":${(() => {
948
- if ("string" === typeof input.type)
949
- return $string(input.type);
950
- if ("string" === typeof input.type)
951
- return "\"" + input.type + "\"";
952
- $throws({
953
- expected: "\"tag\"",
954
- value: input.type
955
- });
956
- })()},"tags":${`[${input.tags.map(elem => $string(elem)).join(",")}]`}}`;
957
- const $so1 = input => `{"type":${(() => {
958
- if ("string" === typeof input.type)
959
- return $string(input.type);
960
- if ("string" === typeof input.type)
961
- return "\"" + input.type + "\"";
962
- $throws({
963
- expected: "\"asset\"",
964
- value: input.type
965
- });
966
- })()},"method":${$string(input.method)}}`;
967
- const $so2 = input => `{"type":${(() => {
968
- if ("string" === typeof input.type)
969
- return $string(input.type);
970
- if ("string" === typeof input.type)
971
- return "\"" + input.type + "\"";
972
- $throws({
973
- expected: "\"rpc\"",
974
- value: input.type
975
- });
976
- })()},"method":${$string(input.method)}}`;
977
- const $su0 = input => (() => {
978
- if ("rpc" === input.type)
979
- return $so2(input);
980
- else if ("asset" === input.type)
981
- return $so1(input);
982
- else if ("tag" === input.type)
983
- return $so0(input);
984
- else
985
- $throws({
986
- expected: "(RpcPermission | AssetPermission | TagPermission)",
987
- value: input
988
- });
989
- })();
990
- return $su0(input);
991
- }; return stringify(assert(input, errorFactory)); };
992
- export const isPermissionRecordPermisson = input => {
993
- const $io0 = input => "tag" === input.type && (null !== input.method && undefined === input.method) && (Array.isArray(input.tags) && input.tags.every(elem => "string" === typeof elem));
994
- const $io1 = input => "asset" === input.type && "string" === typeof input.method && (null !== input.tags && undefined === input.tags);
995
- const $io2 = input => "rpc" === input.type && "string" === typeof input.method && (null !== input.tags && undefined === input.tags);
996
- const $iu0 = input => (() => {
997
- if ("rpc" === input.type)
998
- return $io2(input);
999
- else if ("asset" === input.type)
1000
- return $io1(input);
1001
- else if ("tag" === input.type)
1002
- return $io0(input);
1003
- else
1004
- return false;
1005
- })();
1006
- return "object" === typeof input && null !== input && $iu0(input);
1007
- };
1008
- export const assertPermissionRecordPermisson = (input, errorFactory) => {
1009
- const __is = input => {
1010
- const $io0 = input => "tag" === input.type && (null !== input.method && undefined === input.method) && (Array.isArray(input.tags) && input.tags.every(elem => "string" === typeof elem));
1011
- const $io1 = input => "asset" === input.type && "string" === typeof input.method && (null !== input.tags && undefined === input.tags);
1012
- const $io2 = input => "rpc" === input.type && "string" === typeof input.method && (null !== input.tags && undefined === input.tags);
1013
- const $iu0 = input => (() => {
1014
- if ("rpc" === input.type)
1015
- return $io2(input);
1016
- else if ("asset" === input.type)
1017
- return $io1(input);
1018
- else if ("tag" === input.type)
1019
- return $io0(input);
1020
- else
1021
- return false;
1022
- })();
1023
- return "object" === typeof input && null !== input && $iu0(input);
1024
- };
1025
- if (false === __is(input))
1026
- ((input, _path, _exceptionable = true) => {
1027
- const $guard = __typia.createAssert.guard;
1028
- const $ao0 = (input, _path, _exceptionable = true) => ("tag" === input.type || $guard(_exceptionable, {
1029
- path: _path + ".type",
1030
- expected: "\"tag\"",
1031
- value: input.type
1032
- }, errorFactory)) && ((null !== input.method || $guard(_exceptionable, {
1033
- path: _path + ".method",
1034
- expected: "undefined",
1035
- value: input.method
1036
- }, errorFactory)) && (undefined === input.method || $guard(_exceptionable, {
1037
- path: _path + ".method",
1038
- expected: "undefined",
1039
- value: input.method
1040
- }, errorFactory))) && ((Array.isArray(input.tags) || $guard(_exceptionable, {
1041
- path: _path + ".tags",
1042
- expected: "Array<string>",
1043
- value: input.tags
1044
- }, errorFactory)) && input.tags.every((elem, _index1) => "string" === typeof elem || $guard(_exceptionable, {
1045
- path: _path + ".tags[" + _index1 + "]",
1046
- expected: "string",
1047
- value: elem
1048
- }, errorFactory)) || $guard(_exceptionable, {
1049
- path: _path + ".tags",
1050
- expected: "Array<string>",
1051
- value: input.tags
1052
- }, errorFactory));
1053
- const $ao1 = (input, _path, _exceptionable = true) => ("asset" === input.type || $guard(_exceptionable, {
1054
- path: _path + ".type",
1055
- expected: "\"asset\"",
1056
- value: input.type
1057
- }, errorFactory)) && ("string" === typeof input.method || $guard(_exceptionable, {
1058
- path: _path + ".method",
1059
- expected: "string",
1060
- value: input.method
1061
- }, errorFactory)) && ((null !== input.tags || $guard(_exceptionable, {
1062
- path: _path + ".tags",
1063
- expected: "undefined",
1064
- value: input.tags
1065
- }, errorFactory)) && (undefined === input.tags || $guard(_exceptionable, {
1066
- path: _path + ".tags",
1067
- expected: "undefined",
1068
- value: input.tags
1069
- }, errorFactory)));
1070
- const $ao2 = (input, _path, _exceptionable = true) => ("rpc" === input.type || $guard(_exceptionable, {
1071
- path: _path + ".type",
1072
- expected: "\"rpc\"",
1073
- value: input.type
1074
- }, errorFactory)) && ("string" === typeof input.method || $guard(_exceptionable, {
1075
- path: _path + ".method",
1076
- expected: "string",
1077
- value: input.method
1078
- }, errorFactory)) && ((null !== input.tags || $guard(_exceptionable, {
1079
- path: _path + ".tags",
1080
- expected: "undefined",
1081
- value: input.tags
1082
- }, errorFactory)) && (undefined === input.tags || $guard(_exceptionable, {
1083
- path: _path + ".tags",
1084
- expected: "undefined",
1085
- value: input.tags
1086
- }, errorFactory)));
1087
- const $au0 = (input, _path, _exceptionable = true) => (() => {
1088
- if ("rpc" === input.type)
1089
- return $ao2(input, _path, true && _exceptionable);
1090
- else if ("asset" === input.type)
1091
- return $ao1(input, _path, true && _exceptionable);
1092
- else if ("tag" === input.type)
1093
- return $ao0(input, _path, true && _exceptionable);
1094
- else
1095
- return $guard(_exceptionable, {
1096
- path: _path,
1097
- expected: "(RpcPermission | AssetPermission | TagPermission)",
1098
- value: input
1099
- }, errorFactory);
1100
- })();
1101
- return ("object" === typeof input && null !== input || $guard(true, {
1102
- path: _path + "",
1103
- expected: "(AssetPermission | RpcPermission | TagPermission)",
1104
- value: input
1105
- }, errorFactory)) && $au0(input, _path + "", true) || $guard(true, {
1106
- path: _path + "",
1107
- expected: "(AssetPermission | RpcPermission | TagPermission)",
1108
- value: input
1109
- }, errorFactory);
1110
- })(input, "$input", true);
1111
- return input;
1112
- };
1113
- export const randomPermissionRecordPermisson = generator => {
1114
- const $generator = __typia.createRandom.generator;
1115
- const $pick = __typia.createRandom.pick;
1116
- const $ro0 = (_recursive = false, _depth = 0) => ({
1117
- type: "tag",
1118
- method: undefined,
1119
- tags: (generator?.array ?? $generator.array)(() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)())
1120
- });
1121
- const $ro1 = (_recursive = false, _depth = 0) => ({
1122
- type: "asset",
1123
- method: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
1124
- tags: undefined
1125
- });
1126
- const $ro2 = (_recursive = false, _depth = 0) => ({
1127
- type: "rpc",
1128
- method: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
1129
- tags: undefined
1130
- });
1131
- return $pick([
1132
- () => $ro2(),
1133
- () => $ro1(),
1134
- () => $ro0()
1135
- ])();
1136
- };
1137
- export const assertGuardPermissionRecordPermisson = (input, errorFactory) => {
1138
- const __is = input => {
1139
- const $io0 = input => "tag" === input.type && (null !== input.method && undefined === input.method) && (Array.isArray(input.tags) && input.tags.every(elem => "string" === typeof elem));
1140
- const $io1 = input => "asset" === input.type && "string" === typeof input.method && (null !== input.tags && undefined === input.tags);
1141
- const $io2 = input => "rpc" === input.type && "string" === typeof input.method && (null !== input.tags && undefined === input.tags);
1142
- const $iu0 = input => (() => {
1143
- if ("rpc" === input.type)
1144
- return $io2(input);
1145
- else if ("asset" === input.type)
1146
- return $io1(input);
1147
- else if ("tag" === input.type)
1148
- return $io0(input);
1149
- else
1150
- return false;
1151
- })();
1152
- return "object" === typeof input && null !== input && $iu0(input);
1153
- };
1154
- if (false === __is(input))
1155
- ((input, _path, _exceptionable = true) => {
1156
- const $guard = __typia.createAssertGuard.guard;
1157
- const $ao0 = (input, _path, _exceptionable = true) => ("tag" === input.type || $guard(_exceptionable, {
1158
- path: _path + ".type",
1159
- expected: "\"tag\"",
1160
- value: input.type
1161
- }, errorFactory)) && ((null !== input.method || $guard(_exceptionable, {
1162
- path: _path + ".method",
1163
- expected: "undefined",
1164
- value: input.method
1165
- }, errorFactory)) && (undefined === input.method || $guard(_exceptionable, {
1166
- path: _path + ".method",
1167
- expected: "undefined",
1168
- value: input.method
1169
- }, errorFactory))) && ((Array.isArray(input.tags) || $guard(_exceptionable, {
1170
- path: _path + ".tags",
1171
- expected: "Array<string>",
1172
- value: input.tags
1173
- }, errorFactory)) && input.tags.every((elem, _index1) => "string" === typeof elem || $guard(_exceptionable, {
1174
- path: _path + ".tags[" + _index1 + "]",
1175
- expected: "string",
1176
- value: elem
1177
- }, errorFactory)) || $guard(_exceptionable, {
1178
- path: _path + ".tags",
1179
- expected: "Array<string>",
1180
- value: input.tags
1181
- }, errorFactory));
1182
- const $ao1 = (input, _path, _exceptionable = true) => ("asset" === input.type || $guard(_exceptionable, {
1183
- path: _path + ".type",
1184
- expected: "\"asset\"",
1185
- value: input.type
1186
- }, errorFactory)) && ("string" === typeof input.method || $guard(_exceptionable, {
1187
- path: _path + ".method",
1188
- expected: "string",
1189
- value: input.method
1190
- }, errorFactory)) && ((null !== input.tags || $guard(_exceptionable, {
1191
- path: _path + ".tags",
1192
- expected: "undefined",
1193
- value: input.tags
1194
- }, errorFactory)) && (undefined === input.tags || $guard(_exceptionable, {
1195
- path: _path + ".tags",
1196
- expected: "undefined",
1197
- value: input.tags
1198
- }, errorFactory)));
1199
- const $ao2 = (input, _path, _exceptionable = true) => ("rpc" === input.type || $guard(_exceptionable, {
1200
- path: _path + ".type",
1201
- expected: "\"rpc\"",
1202
- value: input.type
1203
- }, errorFactory)) && ("string" === typeof input.method || $guard(_exceptionable, {
1204
- path: _path + ".method",
1205
- expected: "string",
1206
- value: input.method
1207
- }, errorFactory)) && ((null !== input.tags || $guard(_exceptionable, {
1208
- path: _path + ".tags",
1209
- expected: "undefined",
1210
- value: input.tags
1211
- }, errorFactory)) && (undefined === input.tags || $guard(_exceptionable, {
1212
- path: _path + ".tags",
1213
- expected: "undefined",
1214
- value: input.tags
1215
- }, errorFactory)));
1216
- const $au0 = (input, _path, _exceptionable = true) => (() => {
1217
- if ("rpc" === input.type)
1218
- return $ao2(input, _path, true && _exceptionable);
1219
- else if ("asset" === input.type)
1220
- return $ao1(input, _path, true && _exceptionable);
1221
- else if ("tag" === input.type)
1222
- return $ao0(input, _path, true && _exceptionable);
1223
- else
1224
- return $guard(_exceptionable, {
1225
- path: _path,
1226
- expected: "(RpcPermission | AssetPermission | TagPermission)",
1227
- value: input
1228
- }, errorFactory);
1229
- })();
1230
- return ("object" === typeof input && null !== input || $guard(true, {
1231
- path: _path + "",
1232
- expected: "(AssetPermission | RpcPermission | TagPermission)",
1233
- value: input
1234
- }, errorFactory)) && $au0(input, _path + "", true) || $guard(true, {
1235
- path: _path + "",
1236
- expected: "(AssetPermission | RpcPermission | TagPermission)",
1237
- value: input
1238
- }, errorFactory);
1239
- })(input, "$input", true);
1240
- };
1241
- export const stringifyPermissionRecordPermisson = input => {
1242
- const $io0 = input => "tag" === input.type && (null !== input.method && undefined === input.method) && (Array.isArray(input.tags) && input.tags.every(elem => "string" === typeof elem));
1243
- const $io1 = input => "asset" === input.type && "string" === typeof input.method && (null !== input.tags && undefined === input.tags);
1244
- const $io2 = input => "rpc" === input.type && "string" === typeof input.method && (null !== input.tags && undefined === input.tags);
1245
- const $string = __typia.json.createStringify.string;
1246
- const $throws = __typia.json.createStringify.throws;
1247
- const $so0 = input => `{"type":${(() => {
1248
- if ("string" === typeof input.type)
1249
- return $string(input.type);
1250
- if ("string" === typeof input.type)
1251
- return "\"" + input.type + "\"";
1252
- $throws({
1253
- expected: "\"tag\"",
1254
- value: input.type
1255
- });
1256
- })()},"tags":${`[${input.tags.map(elem => $string(elem)).join(",")}]`}}`;
1257
- const $so1 = input => `{"type":${(() => {
1258
- if ("string" === typeof input.type)
1259
- return $string(input.type);
1260
- if ("string" === typeof input.type)
1261
- return "\"" + input.type + "\"";
1262
- $throws({
1263
- expected: "\"asset\"",
1264
- value: input.type
1265
- });
1266
- })()},"method":${$string(input.method)}}`;
1267
- const $so2 = input => `{"type":${(() => {
1268
- if ("string" === typeof input.type)
1269
- return $string(input.type);
1270
- if ("string" === typeof input.type)
1271
- return "\"" + input.type + "\"";
1272
- $throws({
1273
- expected: "\"rpc\"",
1274
- value: input.type
1275
- });
1276
- })()},"method":${$string(input.method)}}`;
1277
- const $su0 = input => (() => {
1278
- if ("rpc" === input.type)
1279
- return $so2(input);
1280
- else if ("asset" === input.type)
1281
- return $so1(input);
1282
- else if ("tag" === input.type)
1283
- return $so0(input);
1284
- else
1285
- $throws({
1286
- expected: "(RpcPermission | AssetPermission | TagPermission)",
1287
- value: input
1288
- });
1289
- })();
1290
- return $su0(input);
1291
- };
1292
- export const assertStringifyPermissionRecordPermisson = (input, errorFactory) => { const assert = (input, errorFactory) => {
1293
- const __is = input => {
1294
- const $io0 = input => "tag" === input.type && (null !== input.method && undefined === input.method) && (Array.isArray(input.tags) && input.tags.every(elem => "string" === typeof elem));
1295
- const $io1 = input => "asset" === input.type && "string" === typeof input.method && (null !== input.tags && undefined === input.tags);
1296
- const $io2 = input => "rpc" === input.type && "string" === typeof input.method && (null !== input.tags && undefined === input.tags);
1297
- const $iu0 = input => (() => {
1298
- if ("rpc" === input.type)
1299
- return $io2(input);
1300
- else if ("asset" === input.type)
1301
- return $io1(input);
1302
- else if ("tag" === input.type)
1303
- return $io0(input);
1304
- else
1305
- return false;
1306
- })();
1307
- return "object" === typeof input && null !== input && $iu0(input);
1308
- };
1309
- if (false === __is(input))
1310
- ((input, _path, _exceptionable = true) => {
1311
- const $guard = __typia.json.createAssertStringify.guard;
1312
- const $ao0 = (input, _path, _exceptionable = true) => ("tag" === input.type || $guard(_exceptionable, {
1313
- path: _path + ".type",
1314
- expected: "\"tag\"",
1315
- value: input.type
1316
- }, errorFactory)) && ((null !== input.method || $guard(_exceptionable, {
1317
- path: _path + ".method",
1318
- expected: "undefined",
1319
- value: input.method
1320
- }, errorFactory)) && (undefined === input.method || $guard(_exceptionable, {
1321
- path: _path + ".method",
1322
- expected: "undefined",
1323
- value: input.method
1324
- }, errorFactory))) && ((Array.isArray(input.tags) || $guard(_exceptionable, {
1325
- path: _path + ".tags",
1326
- expected: "Array<string>",
1327
- value: input.tags
1328
- }, errorFactory)) && input.tags.every((elem, _index1) => "string" === typeof elem || $guard(_exceptionable, {
1329
- path: _path + ".tags[" + _index1 + "]",
1330
- expected: "string",
1331
- value: elem
1332
- }, errorFactory)) || $guard(_exceptionable, {
1333
- path: _path + ".tags",
1334
- expected: "Array<string>",
1335
- value: input.tags
1336
- }, errorFactory));
1337
- const $ao1 = (input, _path, _exceptionable = true) => ("asset" === input.type || $guard(_exceptionable, {
1338
- path: _path + ".type",
1339
- expected: "\"asset\"",
1340
- value: input.type
1341
- }, errorFactory)) && ("string" === typeof input.method || $guard(_exceptionable, {
1342
- path: _path + ".method",
1343
- expected: "string",
1344
- value: input.method
1345
- }, errorFactory)) && ((null !== input.tags || $guard(_exceptionable, {
1346
- path: _path + ".tags",
1347
- expected: "undefined",
1348
- value: input.tags
1349
- }, errorFactory)) && (undefined === input.tags || $guard(_exceptionable, {
1350
- path: _path + ".tags",
1351
- expected: "undefined",
1352
- value: input.tags
1353
- }, errorFactory)));
1354
- const $ao2 = (input, _path, _exceptionable = true) => ("rpc" === input.type || $guard(_exceptionable, {
1355
- path: _path + ".type",
1356
- expected: "\"rpc\"",
1357
- value: input.type
1358
- }, errorFactory)) && ("string" === typeof input.method || $guard(_exceptionable, {
1359
- path: _path + ".method",
1360
- expected: "string",
1361
- value: input.method
1362
- }, errorFactory)) && ((null !== input.tags || $guard(_exceptionable, {
1363
- path: _path + ".tags",
1364
- expected: "undefined",
1365
- value: input.tags
1366
- }, errorFactory)) && (undefined === input.tags || $guard(_exceptionable, {
1367
- path: _path + ".tags",
1368
- expected: "undefined",
1369
- value: input.tags
1370
- }, errorFactory)));
1371
- const $au0 = (input, _path, _exceptionable = true) => (() => {
1372
- if ("rpc" === input.type)
1373
- return $ao2(input, _path, true && _exceptionable);
1374
- else if ("asset" === input.type)
1375
- return $ao1(input, _path, true && _exceptionable);
1376
- else if ("tag" === input.type)
1377
- return $ao0(input, _path, true && _exceptionable);
1378
- else
1379
- return $guard(_exceptionable, {
1380
- path: _path,
1381
- expected: "(RpcPermission | AssetPermission | TagPermission)",
1382
- value: input
1383
- }, errorFactory);
1384
- })();
1385
- return ("object" === typeof input && null !== input || $guard(true, {
1386
- path: _path + "",
1387
- expected: "(AssetPermission | RpcPermission | TagPermission)",
1388
- value: input
1389
- }, errorFactory)) && $au0(input, _path + "", true) || $guard(true, {
1390
- path: _path + "",
1391
- expected: "(AssetPermission | RpcPermission | TagPermission)",
1392
- value: input
1393
- }, errorFactory);
1394
- })(input, "$input", true);
1395
- return input;
1396
- }; const stringify = input => {
1397
- const $io0 = input => "tag" === input.type && (null !== input.method && undefined === input.method) && (Array.isArray(input.tags) && input.tags.every(elem => "string" === typeof elem));
1398
- const $io1 = input => "asset" === input.type && "string" === typeof input.method && (null !== input.tags && undefined === input.tags);
1399
- const $io2 = input => "rpc" === input.type && "string" === typeof input.method && (null !== input.tags && undefined === input.tags);
1400
- const $string = __typia.json.createAssertStringify.string;
1401
- const $throws = __typia.json.createAssertStringify.throws;
1402
- const $so0 = input => `{"type":${(() => {
1403
- if ("string" === typeof input.type)
1404
- return $string(input.type);
1405
- if ("string" === typeof input.type)
1406
- return "\"" + input.type + "\"";
1407
- $throws({
1408
- expected: "\"tag\"",
1409
- value: input.type
1410
- });
1411
- })()},"tags":${`[${input.tags.map(elem => $string(elem)).join(",")}]`}}`;
1412
- const $so1 = input => `{"type":${(() => {
1413
- if ("string" === typeof input.type)
1414
- return $string(input.type);
1415
- if ("string" === typeof input.type)
1416
- return "\"" + input.type + "\"";
1417
- $throws({
1418
- expected: "\"asset\"",
1419
- value: input.type
1420
- });
1421
- })()},"method":${$string(input.method)}}`;
1422
- const $so2 = input => `{"type":${(() => {
1423
- if ("string" === typeof input.type)
1424
- return $string(input.type);
1425
- if ("string" === typeof input.type)
1426
- return "\"" + input.type + "\"";
1427
- $throws({
1428
- expected: "\"rpc\"",
1429
- value: input.type
1430
- });
1431
- })()},"method":${$string(input.method)}}`;
1432
- const $su0 = input => (() => {
1433
- if ("rpc" === input.type)
1434
- return $so2(input);
1435
- else if ("asset" === input.type)
1436
- return $so1(input);
1437
- else if ("tag" === input.type)
1438
- return $so0(input);
1439
- else
1440
- $throws({
1441
- expected: "(RpcPermission | AssetPermission | TagPermission)",
1442
- value: input
1443
- });
1444
- })();
1445
- return $su0(input);
1446
- }; return stringify(assert(input, errorFactory)); };
1447
- export const isTagPermission = input => {
1448
- const $io0 = input => "tag" === input.type && (null !== input.method && undefined === input.method) && (Array.isArray(input.tags) && input.tags.every(elem => "string" === typeof elem));
1449
- return "object" === typeof input && null !== input && $io0(input);
1450
- };
1451
- export const assertTagPermission = (input, errorFactory) => {
1452
- const __is = input => {
1453
- const $io0 = input => "tag" === input.type && (null !== input.method && undefined === input.method) && (Array.isArray(input.tags) && input.tags.every(elem => "string" === typeof elem));
1454
- return "object" === typeof input && null !== input && $io0(input);
1455
- };
1456
- if (false === __is(input))
1457
- ((input, _path, _exceptionable = true) => {
1458
- const $guard = __typia.createAssert.guard;
1459
- const $ao0 = (input, _path, _exceptionable = true) => ("tag" === input.type || $guard(_exceptionable, {
1460
- path: _path + ".type",
1461
- expected: "\"tag\"",
1462
- value: input.type
1463
- }, errorFactory)) && ((null !== input.method || $guard(_exceptionable, {
1464
- path: _path + ".method",
1465
- expected: "undefined",
1466
- value: input.method
1467
- }, errorFactory)) && (undefined === input.method || $guard(_exceptionable, {
1468
- path: _path + ".method",
1469
- expected: "undefined",
1470
- value: input.method
1471
- }, errorFactory))) && ((Array.isArray(input.tags) || $guard(_exceptionable, {
1472
- path: _path + ".tags",
1473
- expected: "Array<string>",
1474
- value: input.tags
1475
- }, errorFactory)) && input.tags.every((elem, _index1) => "string" === typeof elem || $guard(_exceptionable, {
1476
- path: _path + ".tags[" + _index1 + "]",
1477
- expected: "string",
1478
- value: elem
1479
- }, errorFactory)) || $guard(_exceptionable, {
1480
- path: _path + ".tags",
1481
- expected: "Array<string>",
1482
- value: input.tags
1483
- }, errorFactory));
1484
- return ("object" === typeof input && null !== input || $guard(true, {
1485
- path: _path + "",
1486
- expected: "TagPermission",
1487
- value: input
1488
- }, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
1489
- path: _path + "",
1490
- expected: "TagPermission",
1491
- value: input
1492
- }, errorFactory);
1493
- })(input, "$input", true);
1494
- return input;
1495
- };
1496
- export const randomTagPermission = generator => {
1497
- const $generator = __typia.createRandom.generator;
1498
- const $ro0 = (_recursive = false, _depth = 0) => ({
1499
- type: "tag",
1500
- method: undefined,
1501
- tags: (generator?.array ?? $generator.array)(() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)())
1502
- });
1503
- return $ro0();
1504
- };
1505
- export const assertGuardTagPermission = (input, errorFactory) => {
1506
- const __is = input => {
1507
- const $io0 = input => "tag" === input.type && (null !== input.method && undefined === input.method) && (Array.isArray(input.tags) && input.tags.every(elem => "string" === typeof elem));
1508
- return "object" === typeof input && null !== input && $io0(input);
1509
- };
1510
- if (false === __is(input))
1511
- ((input, _path, _exceptionable = true) => {
1512
- const $guard = __typia.createAssertGuard.guard;
1513
- const $ao0 = (input, _path, _exceptionable = true) => ("tag" === input.type || $guard(_exceptionable, {
1514
- path: _path + ".type",
1515
- expected: "\"tag\"",
1516
- value: input.type
1517
- }, errorFactory)) && ((null !== input.method || $guard(_exceptionable, {
1518
- path: _path + ".method",
1519
- expected: "undefined",
1520
- value: input.method
1521
- }, errorFactory)) && (undefined === input.method || $guard(_exceptionable, {
1522
- path: _path + ".method",
1523
- expected: "undefined",
1524
- value: input.method
1525
- }, errorFactory))) && ((Array.isArray(input.tags) || $guard(_exceptionable, {
1526
- path: _path + ".tags",
1527
- expected: "Array<string>",
1528
- value: input.tags
1529
- }, errorFactory)) && input.tags.every((elem, _index1) => "string" === typeof elem || $guard(_exceptionable, {
1530
- path: _path + ".tags[" + _index1 + "]",
1531
- expected: "string",
1532
- value: elem
1533
- }, errorFactory)) || $guard(_exceptionable, {
1534
- path: _path + ".tags",
1535
- expected: "Array<string>",
1536
- value: input.tags
1537
- }, errorFactory));
1538
- return ("object" === typeof input && null !== input || $guard(true, {
1539
- path: _path + "",
1540
- expected: "TagPermission",
1541
- value: input
1542
- }, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
1543
- path: _path + "",
1544
- expected: "TagPermission",
1545
- value: input
1546
- }, errorFactory);
1547
- })(input, "$input", true);
1548
- };
1549
- export const stringifyTagPermission = input => {
1550
- const $string = __typia.json.createStringify.string;
1551
- const $throws = __typia.json.createStringify.throws;
1552
- const $so0 = input => `{"type":${(() => {
1553
- if ("string" === typeof input.type)
1554
- return $string(input.type);
1555
- if ("string" === typeof input.type)
1556
- return "\"" + input.type + "\"";
1557
- $throws({
1558
- expected: "\"tag\"",
1559
- value: input.type
1560
- });
1561
- })()},"tags":${`[${input.tags.map(elem => $string(elem)).join(",")}]`}}`;
1562
- return $so0(input);
1563
- };
1564
- export const assertStringifyTagPermission = (input, errorFactory) => { const assert = (input, errorFactory) => {
1565
- const __is = input => {
1566
- const $io0 = input => "tag" === input.type && (null !== input.method && undefined === input.method) && (Array.isArray(input.tags) && input.tags.every(elem => "string" === typeof elem));
1567
- return "object" === typeof input && null !== input && $io0(input);
1568
- };
1569
- if (false === __is(input))
1570
- ((input, _path, _exceptionable = true) => {
1571
- const $guard = __typia.json.createAssertStringify.guard;
1572
- const $ao0 = (input, _path, _exceptionable = true) => ("tag" === input.type || $guard(_exceptionable, {
1573
- path: _path + ".type",
1574
- expected: "\"tag\"",
1575
- value: input.type
1576
- }, errorFactory)) && ((null !== input.method || $guard(_exceptionable, {
1577
- path: _path + ".method",
1578
- expected: "undefined",
1579
- value: input.method
1580
- }, errorFactory)) && (undefined === input.method || $guard(_exceptionable, {
1581
- path: _path + ".method",
1582
- expected: "undefined",
1583
- value: input.method
1584
- }, errorFactory))) && ((Array.isArray(input.tags) || $guard(_exceptionable, {
1585
- path: _path + ".tags",
1586
- expected: "Array<string>",
1587
- value: input.tags
1588
- }, errorFactory)) && input.tags.every((elem, _index1) => "string" === typeof elem || $guard(_exceptionable, {
1589
- path: _path + ".tags[" + _index1 + "]",
1590
- expected: "string",
1591
- value: elem
1592
- }, errorFactory)) || $guard(_exceptionable, {
1593
- path: _path + ".tags",
1594
- expected: "Array<string>",
1595
- value: input.tags
1596
- }, errorFactory));
1597
- return ("object" === typeof input && null !== input || $guard(true, {
1598
- path: _path + "",
1599
- expected: "TagPermission",
1600
- value: input
1601
- }, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
1602
- path: _path + "",
1603
- expected: "TagPermission",
1604
- value: input
1605
- }, errorFactory);
1606
- })(input, "$input", true);
1607
- return input;
1608
- }; const stringify = input => {
1609
- const $string = __typia.json.createAssertStringify.string;
1610
- const $throws = __typia.json.createAssertStringify.throws;
1611
- const $so0 = input => `{"type":${(() => {
1612
- if ("string" === typeof input.type)
1613
- return $string(input.type);
1614
- if ("string" === typeof input.type)
1615
- return "\"" + input.type + "\"";
1616
- $throws({
1617
- expected: "\"tag\"",
1618
- value: input.type
1619
- });
1620
- })()},"tags":${`[${input.tags.map(elem => $string(elem)).join(",")}]`}}`;
1621
- return $so0(input);
1622
- }; return stringify(assert(input, errorFactory)); };
1623
- export const isAssetPermission = input => {
1624
- const $io0 = input => "asset" === input.type && "string" === typeof input.method && (null !== input.tags && undefined === input.tags);
1625
- return "object" === typeof input && null !== input && $io0(input);
1626
- };
1627
- export const assertAssetPermission = (input, errorFactory) => {
1628
- const __is = input => {
1629
- const $io0 = input => "asset" === input.type && "string" === typeof input.method && (null !== input.tags && undefined === input.tags);
1630
- return "object" === typeof input && null !== input && $io0(input);
1631
- };
1632
- if (false === __is(input))
1633
- ((input, _path, _exceptionable = true) => {
1634
- const $guard = __typia.createAssert.guard;
1635
- const $ao0 = (input, _path, _exceptionable = true) => ("asset" === input.type || $guard(_exceptionable, {
1636
- path: _path + ".type",
1637
- expected: "\"asset\"",
1638
- value: input.type
1639
- }, errorFactory)) && ("string" === typeof input.method || $guard(_exceptionable, {
1640
- path: _path + ".method",
1641
- expected: "string",
1642
- value: input.method
1643
- }, errorFactory)) && ((null !== input.tags || $guard(_exceptionable, {
1644
- path: _path + ".tags",
1645
- expected: "undefined",
1646
- value: input.tags
1647
- }, errorFactory)) && (undefined === input.tags || $guard(_exceptionable, {
1648
- path: _path + ".tags",
1649
- expected: "undefined",
1650
- value: input.tags
1651
- }, errorFactory)));
1652
- return ("object" === typeof input && null !== input || $guard(true, {
1653
- path: _path + "",
1654
- expected: "AssetPermission",
1655
- value: input
1656
- }, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
1657
- path: _path + "",
1658
- expected: "AssetPermission",
1659
- value: input
1660
- }, errorFactory);
1661
- })(input, "$input", true);
1662
- return input;
1663
- };
1664
- export const randomAssetPermission = generator => {
1665
- const $generator = __typia.createRandom.generator;
1666
- const $ro0 = (_recursive = false, _depth = 0) => ({
1667
- type: "asset",
1668
- method: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
1669
- tags: undefined
1670
- });
1671
- return $ro0();
1672
- };
1673
- export const assertGuardAssetPermission = (input, errorFactory) => {
1674
- const __is = input => {
1675
- const $io0 = input => "asset" === input.type && "string" === typeof input.method && (null !== input.tags && undefined === input.tags);
1676
- return "object" === typeof input && null !== input && $io0(input);
1677
- };
1678
- if (false === __is(input))
1679
- ((input, _path, _exceptionable = true) => {
1680
- const $guard = __typia.createAssertGuard.guard;
1681
- const $ao0 = (input, _path, _exceptionable = true) => ("asset" === input.type || $guard(_exceptionable, {
1682
- path: _path + ".type",
1683
- expected: "\"asset\"",
1684
- value: input.type
1685
- }, errorFactory)) && ("string" === typeof input.method || $guard(_exceptionable, {
1686
- path: _path + ".method",
1687
- expected: "string",
1688
- value: input.method
1689
- }, errorFactory)) && ((null !== input.tags || $guard(_exceptionable, {
1690
- path: _path + ".tags",
1691
- expected: "undefined",
1692
- value: input.tags
1693
- }, errorFactory)) && (undefined === input.tags || $guard(_exceptionable, {
1694
- path: _path + ".tags",
1695
- expected: "undefined",
1696
- value: input.tags
1697
- }, errorFactory)));
1698
- return ("object" === typeof input && null !== input || $guard(true, {
1699
- path: _path + "",
1700
- expected: "AssetPermission",
1701
- value: input
1702
- }, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
1703
- path: _path + "",
1704
- expected: "AssetPermission",
1705
- value: input
1706
- }, errorFactory);
1707
- })(input, "$input", true);
1708
- };
1709
- export const stringifyAssetPermission = input => {
1710
- const $string = __typia.json.createStringify.string;
1711
- const $throws = __typia.json.createStringify.throws;
1712
- const $so0 = input => `{"type":${(() => {
1713
- if ("string" === typeof input.type)
1714
- return $string(input.type);
1715
- if ("string" === typeof input.type)
1716
- return "\"" + input.type + "\"";
1717
- $throws({
1718
- expected: "\"asset\"",
1719
- value: input.type
1720
- });
1721
- })()},"method":${$string(input.method)}}`;
1722
- return $so0(input);
1723
- };
1724
- export const assertStringifyAssetPermission = (input, errorFactory) => { const assert = (input, errorFactory) => {
1725
- const __is = input => {
1726
- const $io0 = input => "asset" === input.type && "string" === typeof input.method && (null !== input.tags && undefined === input.tags);
1727
- return "object" === typeof input && null !== input && $io0(input);
1728
- };
1729
- if (false === __is(input))
1730
- ((input, _path, _exceptionable = true) => {
1731
- const $guard = __typia.json.createAssertStringify.guard;
1732
- const $ao0 = (input, _path, _exceptionable = true) => ("asset" === input.type || $guard(_exceptionable, {
1733
- path: _path + ".type",
1734
- expected: "\"asset\"",
1735
- value: input.type
1736
- }, errorFactory)) && ("string" === typeof input.method || $guard(_exceptionable, {
1737
- path: _path + ".method",
1738
- expected: "string",
1739
- value: input.method
1740
- }, errorFactory)) && ((null !== input.tags || $guard(_exceptionable, {
1741
- path: _path + ".tags",
1742
- expected: "undefined",
1743
- value: input.tags
1744
- }, errorFactory)) && (undefined === input.tags || $guard(_exceptionable, {
1745
- path: _path + ".tags",
1746
- expected: "undefined",
1747
- value: input.tags
1748
- }, errorFactory)));
1749
- return ("object" === typeof input && null !== input || $guard(true, {
1750
- path: _path + "",
1751
- expected: "AssetPermission",
1752
- value: input
1753
- }, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
1754
- path: _path + "",
1755
- expected: "AssetPermission",
1756
- value: input
1757
- }, errorFactory);
1758
- })(input, "$input", true);
1759
- return input;
1760
- }; const stringify = input => {
1761
- const $string = __typia.json.createAssertStringify.string;
1762
- const $throws = __typia.json.createAssertStringify.throws;
1763
- const $so0 = input => `{"type":${(() => {
1764
- if ("string" === typeof input.type)
1765
- return $string(input.type);
1766
- if ("string" === typeof input.type)
1767
- return "\"" + input.type + "\"";
1768
- $throws({
1769
- expected: "\"asset\"",
1770
- value: input.type
1771
- });
1772
- })()},"method":${$string(input.method)}}`;
1773
- return $so0(input);
1774
- }; return stringify(assert(input, errorFactory)); };
1775
- export const isRpcPermission = input => {
1776
- const $io0 = input => "rpc" === input.type && "string" === typeof input.method && (null !== input.tags && undefined === input.tags);
1777
- return "object" === typeof input && null !== input && $io0(input);
1778
- };
1779
- export const assertRpcPermission = (input, errorFactory) => {
1780
- const __is = input => {
1781
- const $io0 = input => "rpc" === input.type && "string" === typeof input.method && (null !== input.tags && undefined === input.tags);
1782
- return "object" === typeof input && null !== input && $io0(input);
1783
- };
1784
- if (false === __is(input))
1785
- ((input, _path, _exceptionable = true) => {
1786
- const $guard = __typia.createAssert.guard;
1787
- const $ao0 = (input, _path, _exceptionable = true) => ("rpc" === input.type || $guard(_exceptionable, {
1788
- path: _path + ".type",
1789
- expected: "\"rpc\"",
1790
- value: input.type
1791
- }, errorFactory)) && ("string" === typeof input.method || $guard(_exceptionable, {
1792
- path: _path + ".method",
1793
- expected: "string",
1794
- value: input.method
1795
- }, errorFactory)) && ((null !== input.tags || $guard(_exceptionable, {
1796
- path: _path + ".tags",
1797
- expected: "undefined",
1798
- value: input.tags
1799
- }, errorFactory)) && (undefined === input.tags || $guard(_exceptionable, {
1800
- path: _path + ".tags",
1801
- expected: "undefined",
1802
- value: input.tags
1803
- }, errorFactory)));
1804
- return ("object" === typeof input && null !== input || $guard(true, {
1805
- path: _path + "",
1806
- expected: "RpcPermission",
1807
- value: input
1808
- }, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
1809
- path: _path + "",
1810
- expected: "RpcPermission",
1811
- value: input
1812
- }, errorFactory);
1813
- })(input, "$input", true);
1814
- return input;
1815
- };
1816
- export const randomRpcPermission = generator => {
1817
- const $generator = __typia.createRandom.generator;
1818
- const $ro0 = (_recursive = false, _depth = 0) => ({
1819
- type: "rpc",
1820
- method: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
1821
- tags: undefined
1822
- });
1823
- return $ro0();
1824
- };
1825
- export const assertGuardRpcPermission = (input, errorFactory) => {
1826
- const __is = input => {
1827
- const $io0 = input => "rpc" === input.type && "string" === typeof input.method && (null !== input.tags && undefined === input.tags);
1828
- return "object" === typeof input && null !== input && $io0(input);
1829
- };
1830
- if (false === __is(input))
1831
- ((input, _path, _exceptionable = true) => {
1832
- const $guard = __typia.createAssertGuard.guard;
1833
- const $ao0 = (input, _path, _exceptionable = true) => ("rpc" === input.type || $guard(_exceptionable, {
1834
- path: _path + ".type",
1835
- expected: "\"rpc\"",
1836
- value: input.type
1837
- }, errorFactory)) && ("string" === typeof input.method || $guard(_exceptionable, {
1838
- path: _path + ".method",
1839
- expected: "string",
1840
- value: input.method
1841
- }, errorFactory)) && ((null !== input.tags || $guard(_exceptionable, {
1842
- path: _path + ".tags",
1843
- expected: "undefined",
1844
- value: input.tags
1845
- }, errorFactory)) && (undefined === input.tags || $guard(_exceptionable, {
1846
- path: _path + ".tags",
1847
- expected: "undefined",
1848
- value: input.tags
1849
- }, errorFactory)));
1850
- return ("object" === typeof input && null !== input || $guard(true, {
1851
- path: _path + "",
1852
- expected: "RpcPermission",
1853
- value: input
1854
- }, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
1855
- path: _path + "",
1856
- expected: "RpcPermission",
1857
- value: input
1858
- }, errorFactory);
1859
- })(input, "$input", true);
1860
- };
1861
- export const stringifyRpcPermission = input => {
1862
- const $string = __typia.json.createStringify.string;
1863
- const $throws = __typia.json.createStringify.throws;
1864
- const $so0 = input => `{"type":${(() => {
1865
- if ("string" === typeof input.type)
1866
- return $string(input.type);
1867
- if ("string" === typeof input.type)
1868
- return "\"" + input.type + "\"";
1869
- $throws({
1870
- expected: "\"rpc\"",
1871
- value: input.type
1872
- });
1873
- })()},"method":${$string(input.method)}}`;
1874
- return $so0(input);
1875
- };
1876
- export const assertStringifyRpcPermission = (input, errorFactory) => { const assert = (input, errorFactory) => {
1877
- const __is = input => {
1878
- const $io0 = input => "rpc" === input.type && "string" === typeof input.method && (null !== input.tags && undefined === input.tags);
1879
- return "object" === typeof input && null !== input && $io0(input);
1880
- };
1881
- if (false === __is(input))
1882
- ((input, _path, _exceptionable = true) => {
1883
- const $guard = __typia.json.createAssertStringify.guard;
1884
- const $ao0 = (input, _path, _exceptionable = true) => ("rpc" === input.type || $guard(_exceptionable, {
1885
- path: _path + ".type",
1886
- expected: "\"rpc\"",
1887
- value: input.type
1888
- }, errorFactory)) && ("string" === typeof input.method || $guard(_exceptionable, {
1889
- path: _path + ".method",
1890
- expected: "string",
1891
- value: input.method
1892
- }, errorFactory)) && ((null !== input.tags || $guard(_exceptionable, {
1893
- path: _path + ".tags",
1894
- expected: "undefined",
1895
- value: input.tags
1896
- }, errorFactory)) && (undefined === input.tags || $guard(_exceptionable, {
1897
- path: _path + ".tags",
1898
- expected: "undefined",
1899
- value: input.tags
1900
- }, errorFactory)));
1901
- return ("object" === typeof input && null !== input || $guard(true, {
1902
- path: _path + "",
1903
- expected: "RpcPermission",
1904
- value: input
1905
- }, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
1906
- path: _path + "",
1907
- expected: "RpcPermission",
1908
- value: input
1909
- }, errorFactory);
1910
- })(input, "$input", true);
1911
- return input;
1912
- }; const stringify = input => {
1913
- const $string = __typia.json.createAssertStringify.string;
1914
- const $throws = __typia.json.createAssertStringify.throws;
1915
- const $so0 = input => `{"type":${(() => {
1916
- if ("string" === typeof input.type)
1917
- return $string(input.type);
1918
- if ("string" === typeof input.type)
1919
- return "\"" + input.type + "\"";
1920
- $throws({
1921
- expected: "\"rpc\"",
1922
- value: input.type
1923
- });
1924
- })()},"method":${$string(input.method)}}`;
1925
- return $so0(input);
1926
- }; return stringify(assert(input, errorFactory)); };