@appsemble/lang-sdk 0.33.7

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 (377) hide show
  1. package/BasicValidator.d.ts +56 -0
  2. package/BasicValidator.js +174 -0
  3. package/LICENSE.md +126 -0
  4. package/README.md +119 -0
  5. package/allActions.d.ts +1 -0
  6. package/allActions.js +11 -0
  7. package/appMembers.d.ts +1 -0
  8. package/appMembers.js +9 -0
  9. package/authorization.d.ts +10 -0
  10. package/authorization.js +147 -0
  11. package/blockUtils.d.ts +31 -0
  12. package/blockUtils.js +65 -0
  13. package/constants/baseTheme.d.ts +2 -0
  14. package/constants/baseTheme.js +16 -0
  15. package/constants/fonts.d.ts +6 -0
  16. package/constants/fonts.js +1607 -0
  17. package/constants/index.d.ts +4 -0
  18. package/constants/index.js +5 -0
  19. package/constants/locale.d.ts +4 -0
  20. package/constants/locale.js +5 -0
  21. package/constants/patterns.d.ts +41 -0
  22. package/constants/patterns.js +42 -0
  23. package/examples.d.ts +23 -0
  24. package/examples.js +975 -0
  25. package/findPageByName.d.ts +2 -0
  26. package/findPageByName.js +15 -0
  27. package/ics.d.ts +3 -0
  28. package/ics.js +41 -0
  29. package/index.d.ts +18 -0
  30. package/index.js +19 -0
  31. package/iterApp.d.ts +64 -0
  32. package/iterApp.js +150 -0
  33. package/jsonPointer.d.ts +18 -0
  34. package/jsonPointer.js +24 -0
  35. package/jsonschema.d.ts +54 -0
  36. package/jsonschema.js +185 -0
  37. package/mapValues.d.ts +1 -0
  38. package/mapValues.js +8 -0
  39. package/miscellaneous.d.ts +38 -0
  40. package/miscellaneous.js +66 -0
  41. package/noop.d.ts +4 -0
  42. package/noop.js +6 -0
  43. package/normalize.d.ts +13 -0
  44. package/normalize.js +24 -0
  45. package/package.json +66 -0
  46. package/reference-schemas/actions/appMember.d.ts +2 -0
  47. package/reference-schemas/actions/appMember.js +21 -0
  48. package/reference-schemas/actions/flow.d.ts +2 -0
  49. package/reference-schemas/actions/flow.js +13 -0
  50. package/reference-schemas/actions/group.d.ts +2 -0
  51. package/reference-schemas/actions/group.js +13 -0
  52. package/reference-schemas/actions/index.d.ts +7 -0
  53. package/reference-schemas/actions/index.js +8 -0
  54. package/reference-schemas/actions/link.d.ts +2 -0
  55. package/reference-schemas/actions/link.js +9 -0
  56. package/reference-schemas/actions/miscellaneous.d.ts +2 -0
  57. package/reference-schemas/actions/miscellaneous.js +43 -0
  58. package/reference-schemas/actions/resources.d.ts +2 -0
  59. package/reference-schemas/actions/resources.js +19 -0
  60. package/reference-schemas/actions/storage.d.ts +2 -0
  61. package/reference-schemas/actions/storage.js +15 -0
  62. package/reference-schemas/index.d.ts +2 -0
  63. package/reference-schemas/index.js +3 -0
  64. package/reference-schemas/remappers/arrays.d.ts +2 -0
  65. package/reference-schemas/remappers/arrays.js +297 -0
  66. package/reference-schemas/remappers/conditionals.d.ts +2 -0
  67. package/reference-schemas/remappers/conditionals.js +167 -0
  68. package/reference-schemas/remappers/config.d.ts +2 -0
  69. package/reference-schemas/remappers/config.js +13 -0
  70. package/reference-schemas/remappers/data.d.ts +2 -0
  71. package/reference-schemas/remappers/data.js +394 -0
  72. package/reference-schemas/remappers/dates.d.ts +2 -0
  73. package/reference-schemas/remappers/dates.js +94 -0
  74. package/reference-schemas/remappers/history.d.ts +2 -0
  75. package/reference-schemas/remappers/history.js +246 -0
  76. package/reference-schemas/remappers/index.d.ts +12 -0
  77. package/reference-schemas/remappers/index.js +13 -0
  78. package/reference-schemas/remappers/numbers.d.ts +2 -0
  79. package/reference-schemas/remappers/numbers.js +30 -0
  80. package/reference-schemas/remappers/objects.d.ts +2 -0
  81. package/reference-schemas/remappers/objects.js +127 -0
  82. package/reference-schemas/remappers/odata.d.ts +2 -0
  83. package/reference-schemas/remappers/odata.js +95 -0
  84. package/reference-schemas/remappers/randoms.d.ts +2 -0
  85. package/reference-schemas/remappers/randoms.js +82 -0
  86. package/reference-schemas/remappers/strings.d.ts +2 -0
  87. package/reference-schemas/remappers/strings.js +93 -0
  88. package/reference-schemas/remappers/unsorted.d.ts +2 -0
  89. package/reference-schemas/remappers/unsorted.js +276 -0
  90. package/remap.d.ts +75 -0
  91. package/remap.js +691 -0
  92. package/schemas/AppDefinition.d.ts +2 -0
  93. package/schemas/AppDefinition.js +126 -0
  94. package/schemas/AppLayoutDefinition.d.ts +2 -0
  95. package/schemas/AppLayoutDefinition.js +59 -0
  96. package/schemas/AppMemberPropertyDefinition.d.ts +2 -0
  97. package/schemas/AppMemberPropertyDefinition.js +49 -0
  98. package/schemas/AppMembersDefinition.d.ts +2 -0
  99. package/schemas/AppMembersDefinition.js +17 -0
  100. package/schemas/ArrayRemapperDefinition.d.ts +2 -0
  101. package/schemas/ArrayRemapperDefinition.js +22 -0
  102. package/schemas/BasePageDefinition.d.ts +2 -0
  103. package/schemas/BasePageDefinition.js +92 -0
  104. package/schemas/BlockDefinition.d.ts +2 -0
  105. package/schemas/BlockDefinition.js +94 -0
  106. package/schemas/ContainerDefinition.d.ts +2 -0
  107. package/schemas/ContainerDefinition.js +52 -0
  108. package/schemas/ContainerPageDefinition.d.ts +1 -0
  109. package/schemas/ContainerPageDefinition.js +56 -0
  110. package/schemas/ControllerDefinition.d.ts +2 -0
  111. package/schemas/ControllerDefinition.js +17 -0
  112. package/schemas/CronDefinition.d.ts +2 -0
  113. package/schemas/CronDefinition.js +20 -0
  114. package/schemas/CustomFontDefinition.d.ts +2 -0
  115. package/schemas/CustomFontDefinition.js +20 -0
  116. package/schemas/EventsDefinition.d.ts +2 -0
  117. package/schemas/EventsDefinition.js +29 -0
  118. package/schemas/FilterParametersDefinition.d.ts +2 -0
  119. package/schemas/FilterParametersDefinition.js +15 -0
  120. package/schemas/FlowPageActionsDefinition.d.ts +2 -0
  121. package/schemas/FlowPageActionsDefinition.js +23 -0
  122. package/schemas/FlowPageDefinition.d.ts +1 -0
  123. package/schemas/FlowPageDefinition.js +37 -0
  124. package/schemas/GoogleFontDefinition.d.ts +2 -0
  125. package/schemas/GoogleFontDefinition.js +22 -0
  126. package/schemas/LoopPageActionsDefinition.d.ts +2 -0
  127. package/schemas/LoopPageActionsDefinition.js +24 -0
  128. package/schemas/LoopPageDefinition.d.ts +1 -0
  129. package/schemas/LoopPageDefinition.js +32 -0
  130. package/schemas/NotificationHookDataDefinition.d.ts +2 -0
  131. package/schemas/NotificationHookDataDefinition.js +24 -0
  132. package/schemas/NotificationHookDefinition.d.ts +2 -0
  133. package/schemas/NotificationHookDefinition.js +32 -0
  134. package/schemas/ObjectRemapperDefinition.d.ts +2 -0
  135. package/schemas/ObjectRemapperDefinition.js +17 -0
  136. package/schemas/PageActionsDefinition.d.ts +2 -0
  137. package/schemas/PageActionsDefinition.js +12 -0
  138. package/schemas/PageDefinition.d.ts +1 -0
  139. package/schemas/PageDefinition.js +26 -0
  140. package/schemas/RemapperDefinition.d.ts +2 -0
  141. package/schemas/RemapperDefinition.js +27 -0
  142. package/schemas/ResourceDefinition.d.ts +2 -0
  143. package/schemas/ResourceDefinition.js +263 -0
  144. package/schemas/ResourceHistoryDefinition.d.ts +2 -0
  145. package/schemas/ResourceHistoryDefinition.js +14 -0
  146. package/schemas/ResourceHooksDefinition.d.ts +2 -0
  147. package/schemas/ResourceHooksDefinition.js +10 -0
  148. package/schemas/ResourceViewDefinition.d.ts +2 -0
  149. package/schemas/ResourceViewDefinition.js +24 -0
  150. package/schemas/SecurityCronDefinition.d.ts +2 -0
  151. package/schemas/SecurityCronDefinition.js +26 -0
  152. package/schemas/SecurityDefaultDefinition.d.ts +2 -0
  153. package/schemas/SecurityDefaultDefinition.js +34 -0
  154. package/schemas/SecurityDefinition.d.ts +2 -0
  155. package/schemas/SecurityDefinition.js +17 -0
  156. package/schemas/SecurityGuestDefinition.d.ts +2 -0
  157. package/schemas/SecurityGuestDefinition.js +26 -0
  158. package/schemas/SecurityRoleDefinition.d.ts +2 -0
  159. package/schemas/SecurityRoleDefinition.js +35 -0
  160. package/schemas/SubPage.d.ts +2 -0
  161. package/schemas/SubPage.js +36 -0
  162. package/schemas/TabsPageDefinition.d.ts +1 -0
  163. package/schemas/TabsPageDefinition.js +46 -0
  164. package/schemas/Theme.d.ts +2 -0
  165. package/schemas/Theme.js +81 -0
  166. package/schemas/WebhookDefinition.d.ts +2 -0
  167. package/schemas/WebhookDefinition.js +17 -0
  168. package/schemas/actions/ActionDefinition.d.ts +2 -0
  169. package/schemas/actions/ActionDefinition.js +95 -0
  170. package/schemas/actions/AnalyticsActionDefinition.d.ts +1 -0
  171. package/schemas/actions/AnalyticsActionDefinition.js +25 -0
  172. package/schemas/actions/AppMemberCurrentPatchActionDefinition.d.ts +1 -0
  173. package/schemas/actions/AppMemberCurrentPatchActionDefinition.js +30 -0
  174. package/schemas/actions/AppMemberDeleteActionDefinition.d.ts +1 -0
  175. package/schemas/actions/AppMemberDeleteActionDefinition.js +20 -0
  176. package/schemas/actions/AppMemberInviteActionDefinition.d.ts +1 -0
  177. package/schemas/actions/AppMemberInviteActionDefinition.js +24 -0
  178. package/schemas/actions/AppMemberLoginActionDefinition.d.ts +1 -0
  179. package/schemas/actions/AppMemberLoginActionDefinition.js +24 -0
  180. package/schemas/actions/AppMemberLogoutActionDefinition.d.ts +1 -0
  181. package/schemas/actions/AppMemberLogoutActionDefinition.js +14 -0
  182. package/schemas/actions/AppMemberPropertiesPatchActionDefinition.d.ts +1 -0
  183. package/schemas/actions/AppMemberPropertiesPatchActionDefinition.js +26 -0
  184. package/schemas/actions/AppMemberQueryActionDefinition.d.ts +1 -0
  185. package/schemas/actions/AppMemberQueryActionDefinition.js +24 -0
  186. package/schemas/actions/AppMemberRegisterActionDefinition.d.ts +1 -0
  187. package/schemas/actions/AppMemberRegisterActionDefinition.js +43 -0
  188. package/schemas/actions/AppMemberRoleUpdateActionDefinition.d.ts +1 -0
  189. package/schemas/actions/AppMemberRoleUpdateActionDefinition.js +27 -0
  190. package/schemas/actions/BaseActionDefinition.d.ts +2 -0
  191. package/schemas/actions/BaseActionDefinition.js +10 -0
  192. package/schemas/actions/ConditionActionDefinition.d.ts +1 -0
  193. package/schemas/actions/ConditionActionDefinition.js +30 -0
  194. package/schemas/actions/ControllerActionDefinition.d.ts +1 -0
  195. package/schemas/actions/ControllerActionDefinition.js +18 -0
  196. package/schemas/actions/CsvParseActionDefinition.d.ts +1 -0
  197. package/schemas/actions/CsvParseActionDefinition.js +22 -0
  198. package/schemas/actions/DialogActionDefinition.d.ts +1 -0
  199. package/schemas/actions/DialogActionDefinition.js +40 -0
  200. package/schemas/actions/DialogErrorActionDefinition.d.ts +1 -0
  201. package/schemas/actions/DialogErrorActionDefinition.js +17 -0
  202. package/schemas/actions/DialogOkActionDefinition.d.ts +1 -0
  203. package/schemas/actions/DialogOkActionDefinition.js +17 -0
  204. package/schemas/actions/DownloadActionDefinition.d.ts +1 -0
  205. package/schemas/actions/DownloadActionDefinition.js +19 -0
  206. package/schemas/actions/EachActionDefinition.d.ts +1 -0
  207. package/schemas/actions/EachActionDefinition.js +26 -0
  208. package/schemas/actions/EmailActionDefinition.d.ts +1 -0
  209. package/schemas/actions/EmailActionDefinition.js +54 -0
  210. package/schemas/actions/EventActionDefinition.d.ts +1 -0
  211. package/schemas/actions/EventActionDefinition.js +27 -0
  212. package/schemas/actions/FlowBackActionDefinition.d.ts +1 -0
  213. package/schemas/actions/FlowBackActionDefinition.js +16 -0
  214. package/schemas/actions/FlowCancelActionDefinition.d.ts +1 -0
  215. package/schemas/actions/FlowCancelActionDefinition.js +14 -0
  216. package/schemas/actions/FlowFinishActionDefinition.d.ts +1 -0
  217. package/schemas/actions/FlowFinishActionDefinition.js +16 -0
  218. package/schemas/actions/FlowNextActionDefinition.d.ts +1 -0
  219. package/schemas/actions/FlowNextActionDefinition.js +17 -0
  220. package/schemas/actions/FlowToActionDefinition.d.ts +1 -0
  221. package/schemas/actions/FlowToActionDefinition.js +21 -0
  222. package/schemas/actions/GroupMemberDeleteActionDefinition.d.ts +1 -0
  223. package/schemas/actions/GroupMemberDeleteActionDefinition.js +18 -0
  224. package/schemas/actions/GroupMemberInviteActionDefinition.d.ts +1 -0
  225. package/schemas/actions/GroupMemberInviteActionDefinition.js +26 -0
  226. package/schemas/actions/GroupMemberQueryActionDefinition.d.ts +1 -0
  227. package/schemas/actions/GroupMemberQueryActionDefinition.js +18 -0
  228. package/schemas/actions/GroupMemberRoleUpdateActionDefinition.d.ts +1 -0
  229. package/schemas/actions/GroupMemberRoleUpdateActionDefinition.js +22 -0
  230. package/schemas/actions/GroupQueryActionDefinition.d.ts +1 -0
  231. package/schemas/actions/GroupQueryActionDefinition.js +14 -0
  232. package/schemas/actions/LinkActionDefinition.d.ts +1 -0
  233. package/schemas/actions/LinkActionDefinition.js +29 -0
  234. package/schemas/actions/LinkBackActionDefinition.d.ts +1 -0
  235. package/schemas/actions/LinkBackActionDefinition.js +14 -0
  236. package/schemas/actions/LinkNextActionDefinition.d.ts +1 -0
  237. package/schemas/actions/LinkNextActionDefinition.js +14 -0
  238. package/schemas/actions/LogActionDefinition.d.ts +1 -0
  239. package/schemas/actions/LogActionDefinition.js +22 -0
  240. package/schemas/actions/MatchActionDefinition.d.ts +1 -0
  241. package/schemas/actions/MatchActionDefinition.js +35 -0
  242. package/schemas/actions/MessageActionDefinition.d.ts +1 -0
  243. package/schemas/actions/MessageActionDefinition.js +40 -0
  244. package/schemas/actions/NoopActionDefinition.d.ts +1 -0
  245. package/schemas/actions/NoopActionDefinition.js +17 -0
  246. package/schemas/actions/NotifyActionDefinition.d.ts +1 -0
  247. package/schemas/actions/NotifyActionDefinition.js +32 -0
  248. package/schemas/actions/RequestActionDefinition.d.ts +1 -0
  249. package/schemas/actions/RequestActionDefinition.js +75 -0
  250. package/schemas/actions/ResourceCountActionDefinition.d.ts +1 -0
  251. package/schemas/actions/ResourceCountActionDefinition.js +22 -0
  252. package/schemas/actions/ResourceCreateActionDefinition.d.ts +1 -0
  253. package/schemas/actions/ResourceCreateActionDefinition.js +18 -0
  254. package/schemas/actions/ResourceDeleteActionDefinition.d.ts +1 -0
  255. package/schemas/actions/ResourceDeleteActionDefinition.js +18 -0
  256. package/schemas/actions/ResourceDeleteAllActionDefinition.d.ts +1 -0
  257. package/schemas/actions/ResourceDeleteAllActionDefinition.js +21 -0
  258. package/schemas/actions/ResourceDeleteBulkActionDefinition.d.ts +1 -0
  259. package/schemas/actions/ResourceDeleteBulkActionDefinition.js +18 -0
  260. package/schemas/actions/ResourceGetActionDefinition.d.ts +1 -0
  261. package/schemas/actions/ResourceGetActionDefinition.js +25 -0
  262. package/schemas/actions/ResourceHistoryGetActionDefinition.d.ts +1 -0
  263. package/schemas/actions/ResourceHistoryGetActionDefinition.js +18 -0
  264. package/schemas/actions/ResourcePatchActionDefinition.d.ts +1 -0
  265. package/schemas/actions/ResourcePatchActionDefinition.js +21 -0
  266. package/schemas/actions/ResourceQueryActionDefinition.d.ts +1 -0
  267. package/schemas/actions/ResourceQueryActionDefinition.js +26 -0
  268. package/schemas/actions/ResourceSubscriptionStatusActionDefinition.d.ts +1 -0
  269. package/schemas/actions/ResourceSubscriptionStatusActionDefinition.js +23 -0
  270. package/schemas/actions/ResourceSubscriptionSubscribeActionDefinition.d.ts +1 -0
  271. package/schemas/actions/ResourceSubscriptionSubscribeActionDefinition.js +23 -0
  272. package/schemas/actions/ResourceSubscriptionToggleActionDefinition.d.ts +1 -0
  273. package/schemas/actions/ResourceSubscriptionToggleActionDefinition.js +23 -0
  274. package/schemas/actions/ResourceSubscriptionUnsubscribeActionDefinition.d.ts +1 -0
  275. package/schemas/actions/ResourceSubscriptionUnsubscribeActionDefinition.js +23 -0
  276. package/schemas/actions/ResourceUpdateActionDefinition.d.ts +1 -0
  277. package/schemas/actions/ResourceUpdateActionDefinition.js +18 -0
  278. package/schemas/actions/ResourceUpdatePositionsActionDefinition.d.ts +1 -0
  279. package/schemas/actions/ResourceUpdatePositionsActionDefinition.js +21 -0
  280. package/schemas/actions/ShareActionDefinition.d.ts +1 -0
  281. package/schemas/actions/ShareActionDefinition.js +30 -0
  282. package/schemas/actions/StaticActionDefinition.d.ts +1 -0
  283. package/schemas/actions/StaticActionDefinition.js +20 -0
  284. package/schemas/actions/StorageAppendActionDefinition.d.ts +1 -0
  285. package/schemas/actions/StorageAppendActionDefinition.js +43 -0
  286. package/schemas/actions/StorageDeleteActionDefinition.d.ts +1 -0
  287. package/schemas/actions/StorageDeleteActionDefinition.js +31 -0
  288. package/schemas/actions/StorageReadActionDefinition.d.ts +1 -0
  289. package/schemas/actions/StorageReadActionDefinition.js +32 -0
  290. package/schemas/actions/StorageSubtractActionDefinition.d.ts +1 -0
  291. package/schemas/actions/StorageSubtractActionDefinition.js +35 -0
  292. package/schemas/actions/StorageUpdateActionDefinition.d.ts +1 -0
  293. package/schemas/actions/StorageUpdateActionDefinition.js +46 -0
  294. package/schemas/actions/StorageWriteActionDefinition.d.ts +1 -0
  295. package/schemas/actions/StorageWriteActionDefinition.js +46 -0
  296. package/schemas/actions/ThrowActionDefinition.d.ts +1 -0
  297. package/schemas/actions/ThrowActionDefinition.js +17 -0
  298. package/schemas/index.d.ts +121 -0
  299. package/schemas/index.js +122 -0
  300. package/schemas/json/BaseJSONSchema.d.ts +2 -0
  301. package/schemas/json/BaseJSONSchema.js +24 -0
  302. package/schemas/json/JSONPointer.d.ts +1 -0
  303. package/schemas/json/JSONPointer.js +20 -0
  304. package/schemas/json/JSONSchema.d.ts +2 -0
  305. package/schemas/json/JSONSchema.js +20 -0
  306. package/schemas/json/JSONSchemaAnyOf.d.ts +1 -0
  307. package/schemas/json/JSONSchemaAnyOf.js +26 -0
  308. package/schemas/json/JSONSchemaArray.d.ts +1 -0
  309. package/schemas/json/JSONSchemaArray.js +47 -0
  310. package/schemas/json/JSONSchemaBoolean.d.ts +1 -0
  311. package/schemas/json/JSONSchemaBoolean.js +37 -0
  312. package/schemas/json/JSONSchemaConst.d.ts +1 -0
  313. package/schemas/json/JSONSchemaConst.js +16 -0
  314. package/schemas/json/JSONSchemaEnum.d.ts +1 -0
  315. package/schemas/json/JSONSchemaEnum.js +36 -0
  316. package/schemas/json/JSONSchemaInteger.d.ts +1 -0
  317. package/schemas/json/JSONSchemaInteger.js +55 -0
  318. package/schemas/json/JSONSchemaMultiType.d.ts +1 -0
  319. package/schemas/json/JSONSchemaMultiType.js +48 -0
  320. package/schemas/json/JSONSchemaNot.d.ts +1 -0
  321. package/schemas/json/JSONSchemaNot.js +23 -0
  322. package/schemas/json/JSONSchemaNull.d.ts +1 -0
  323. package/schemas/json/JSONSchemaNull.js +16 -0
  324. package/schemas/json/JSONSchemaNumber.d.ts +1 -0
  325. package/schemas/json/JSONSchemaNumber.js +63 -0
  326. package/schemas/json/JSONSchemaObject.d.ts +1 -0
  327. package/schemas/json/JSONSchemaObject.js +74 -0
  328. package/schemas/json/JSONSchemaOneOf.d.ts +1 -0
  329. package/schemas/json/JSONSchemaOneOf.js +24 -0
  330. package/schemas/json/JSONSchemaRemapper.d.ts +1 -0
  331. package/schemas/json/JSONSchemaRemapper.js +19 -0
  332. package/schemas/json/JSONSchemaRoot.d.ts +1 -0
  333. package/schemas/json/JSONSchemaRoot.js +21 -0
  334. package/schemas/json/JSONSchemaString.d.ts +1 -0
  335. package/schemas/json/JSONSchemaString.js +107 -0
  336. package/schemas/utils/extendJSONSchema.d.ts +13 -0
  337. package/schemas/utils/extendJSONSchema.js +34 -0
  338. package/serverActions.d.ts +2 -0
  339. package/serverActions.js +21 -0
  340. package/string.d.ts +23 -0
  341. package/string.js +30 -0
  342. package/types/ActionError.d.ts +38 -0
  343. package/types/ActionError.js +30 -0
  344. package/types/action.d.ts +51 -0
  345. package/types/action.js +2 -0
  346. package/types/actionDefinition.d.ts +605 -0
  347. package/types/actionDefinition.js +2 -0
  348. package/types/block.d.ts +81 -0
  349. package/types/block.js +2 -0
  350. package/types/bulma.d.ts +5 -0
  351. package/types/bulma.js +2 -0
  352. package/types/container.d.ts +46 -0
  353. package/types/container.js +2 -0
  354. package/types/core.d.ts +322 -0
  355. package/types/core.js +2 -0
  356. package/types/http.d.ts +6 -0
  357. package/types/http.js +2 -0
  358. package/types/index.d.ts +115 -0
  359. package/types/index.js +17 -0
  360. package/types/layout.d.ts +2 -0
  361. package/types/layout.js +2 -0
  362. package/types/member.d.ts +43 -0
  363. package/types/member.js +2 -0
  364. package/types/permission.d.ts +102 -0
  365. package/types/permission.js +104 -0
  366. package/types/remapper.d.ts +584 -0
  367. package/types/remapper.js +2 -0
  368. package/types/resource.d.ts +145 -0
  369. package/types/resource.js +2 -0
  370. package/types/roles.d.ts +20 -0
  371. package/types/roles.js +61 -0
  372. package/types/security.d.ts +42 -0
  373. package/types/security.js +2 -0
  374. package/types/theme.d.ts +54 -0
  375. package/types/theme.js +2 -0
  376. package/validation.d.ts +25 -0
  377. package/validation.js +1237 -0
@@ -0,0 +1,104 @@
1
+ export var AppPermission;
2
+ (function (AppPermission) {
3
+ /**
4
+ * The permission to create app invites.
5
+ */
6
+ AppPermission["CreateAppInvites"] = "$member:invite";
7
+ /**
8
+ * The permission to query app members.
9
+ */
10
+ AppPermission["QueryAppMembers"] = "$member:query";
11
+ /**
12
+ * The permission to query app members.
13
+ */
14
+ AppPermission["DeleteAppMembers"] = "$member:delete";
15
+ /**
16
+ * The permission to update the role of app members.
17
+ */
18
+ AppPermission["UpdateAppMemberRoles"] = "$member:role:update";
19
+ /**
20
+ * The permission to patch the properties of app members.
21
+ */
22
+ AppPermission["PatchAppMemberProperties"] = "$member:properties:patch";
23
+ /**
24
+ * The permission to query app groups.
25
+ */
26
+ AppPermission["QueryGroups"] = "$group:query";
27
+ /**
28
+ * The permission to create app groups.
29
+ */
30
+ AppPermission["CreateGroups"] = "$group:create";
31
+ /**
32
+ * The permission to update app groups.
33
+ */
34
+ AppPermission["UpdateGroups"] = "$group:update";
35
+ /**
36
+ * The permission to create app groups.
37
+ */
38
+ AppPermission["DeleteGroups"] = "$group:delete";
39
+ /**
40
+ * The permission to create group invites.
41
+ */
42
+ AppPermission["CreateGroupInvites"] = "$group:member:invite";
43
+ /**
44
+ * The permission to query app members.
45
+ */
46
+ AppPermission["QueryGroupMembers"] = "$group:member:query";
47
+ /**
48
+ * The permission to delete group members.
49
+ */
50
+ AppPermission["RemoveGroupMembers"] = "$group:member:delete";
51
+ /**
52
+ * The permission to change the role of members in a group.
53
+ */
54
+ AppPermission["UpdateGroupMemberRoles"] = "$group:member:role:update";
55
+ /**
56
+ * The permission to create any app resources.
57
+ */
58
+ AppPermission["CreateResources"] = "$resource:all:create";
59
+ /**
60
+ * The permission to fetch history of a resource.
61
+ */
62
+ AppPermission["GetResourceHistory"] = "$resource:all:history:get";
63
+ /**
64
+ * The permission to query app resources.
65
+ */
66
+ AppPermission["QueryResources"] = "$resource:all:query";
67
+ /**
68
+ * The permission to get app resources.
69
+ */
70
+ AppPermission["GetResources"] = "$resource:all:get";
71
+ /**
72
+ * The permission to update app resources.
73
+ */
74
+ AppPermission["UpdateResources"] = "$resource:all:update";
75
+ /**
76
+ * The permission to patch app resources.
77
+ */
78
+ AppPermission["PatchResources"] = "$resource:all:patch";
79
+ /**
80
+ * The permission to delete app resources.
81
+ */
82
+ AppPermission["DeleteResources"] = "$resource:all:delete";
83
+ /**
84
+ * The permission to query own app resources.
85
+ */
86
+ AppPermission["QueryOwnResources"] = "$resource:all:own:query";
87
+ /**
88
+ * The permission to get own app resources.
89
+ */
90
+ AppPermission["GetOwnResources"] = "$resource:all:own:get";
91
+ /**
92
+ * The permission to update own app resources.
93
+ */
94
+ AppPermission["UpdateOwnResources"] = "$resource:all:own:update";
95
+ /**
96
+ * The permission to patch own app resources.
97
+ */
98
+ AppPermission["PatchOwnResources"] = "$resource:all:own:patch";
99
+ /**
100
+ * The permission to delete own app resources.
101
+ */
102
+ AppPermission["DeleteOwnResources"] = "$resource:all:own:delete";
103
+ })(AppPermission || (AppPermission = {}));
104
+ //# sourceMappingURL=permission.js.map
@@ -0,0 +1,584 @@
1
+ import { type RequireExactlyOne } from 'type-fest';
2
+ type AppMemberInfoKey = 'demo' | 'email_verified' | 'email' | 'locale' | 'name' | 'picture' | 'properties' | 'role' | 'sub' | 'zoneinfo';
3
+ interface BaseICSRemapper {
4
+ /**
5
+ * The start of the icalendar event.
6
+ */
7
+ start: Remapper;
8
+ /**
9
+ * The title of the event.
10
+ */
11
+ title: Remapper;
12
+ /**
13
+ * An optional description of the event.
14
+ */
15
+ description?: Remapper;
16
+ /**
17
+ * An optional link to attach to the event.
18
+ */
19
+ url?: Remapper;
20
+ /**
21
+ * An optional location description to attach to the event.
22
+ */
23
+ location?: Remapper;
24
+ /**
25
+ * An optional geolocation description to attach to the event.
26
+ *
27
+ * This must be an object with the properties `lat` or `latitude`, and `lon`, `lng` or
28
+ * `longitude`.
29
+ */
30
+ coordinates?: Remapper;
31
+ }
32
+ interface DurationICSRemapper extends BaseICSRemapper {
33
+ /**
34
+ * The duration of the event.
35
+ *
36
+ * @example '1w 3d 10h 30m'
37
+ */
38
+ duration: Remapper;
39
+ }
40
+ interface EndTimeICSRemapper extends BaseICSRemapper {
41
+ /**
42
+ * The end time of the event as a date or a date string.
43
+ */
44
+ end: Remapper;
45
+ }
46
+ export interface SubstringCaseType {
47
+ /**
48
+ * Whether to match the case of the substring.
49
+ */
50
+ strict?: boolean;
51
+ /**
52
+ * Substring to match.
53
+ */
54
+ substring: string;
55
+ }
56
+ type FilterParams = Record<string, {
57
+ type: 'Boolean' | 'Date' | 'Guid' | 'Number' | 'String';
58
+ value: Remapper;
59
+ comparator: 'eq' | 'ge' | 'gt' | 'le' | 'lt' | 'ne';
60
+ }>;
61
+ type OrderParams = Record<string, 'asc' | 'desc'>;
62
+ export interface Remappers {
63
+ /**
64
+ * Get app metadata.
65
+ *
66
+ * Supported properties:
67
+ *
68
+ * - `id`: Get the app id.
69
+ * - `locale`: Get the current locale of the app.
70
+ * - `url`: Get the base URL of the app.
71
+ */
72
+ app: 'id' | 'locale' | 'url';
73
+ /**
74
+ * Get property of the AppMember object.
75
+ *
76
+ * Supported properties:
77
+ *
78
+ * - `sub`: Get the id of the app member.
79
+ * - `name`: Get the name of the app member.
80
+ * - `email`: Get the email of the app member.
81
+ * - `email_verified`: Whether the email of the app member is verified.
82
+ * - `picture`: Get the picture of the app member.
83
+ * - `locale`: Get the locale of the app member.
84
+ * - `zoneinfo`: Get the zoneinfo of the app member.
85
+ * - `role`: Get the role of the app member.
86
+ * - `properties`: Get the custom properties of the app member.
87
+ */
88
+ 'app.member': AppMemberInfoKey;
89
+ /**
90
+ * Get a predefined app variable by name.
91
+ */
92
+ variable: string;
93
+ /**
94
+ * Get page metadata.
95
+ *
96
+ * Supported properties:
97
+ *
98
+ * - `data`: Get the current page data.
99
+ * - `url`: Get the URL of the current page.
100
+ */
101
+ page: 'data' | 'url';
102
+ /**
103
+ * Get a property from the context.
104
+ */
105
+ context: string;
106
+ /**
107
+ * Get the title of current page.
108
+ */
109
+ 'tab.name': string;
110
+ /**
111
+ * Convert a string to a number.
112
+ */
113
+ 'number.parse': Remapper;
114
+ /**
115
+ * Convert a string to a date using a given format.
116
+ */
117
+ 'date.parse': string;
118
+ /**
119
+ * Returns the current date.
120
+ */
121
+ 'date.now': unknown;
122
+ /**
123
+ * Adds to a date.
124
+ */
125
+ 'date.add': string;
126
+ /**
127
+ * Formats a date to an iso8601 / rfc3339 compatible string.
128
+ *
129
+ * An argument can also be specified to use a different output format.
130
+ *
131
+ * Please refer to https://date-fns.org/docs/format for the supported patterns.
132
+ */
133
+ 'date.format'?: string;
134
+ /**
135
+ * Compare all computed remapper values against each other.
136
+ *
137
+ * Returns `true` if all entries are equal, otherwise `false`.
138
+ */
139
+ equals: Remapper[];
140
+ /**
141
+ * Compare all computed remapper values against the first.
142
+ *
143
+ * Returns `false` if all entries are equal to the first entry, otherwise `true`.
144
+ *
145
+ * If only one remapper or none is passed, the remapper value gets computed and then inverted.
146
+ */
147
+ not: Remapper[];
148
+ /**
149
+ * Compare all computed remapper values against each other.
150
+ *
151
+ * Returns `true` if all entries are true, otherwise `false`.
152
+ *
153
+ * If only one remapper is passed, the remapper is returned.
154
+ */
155
+ and: Remapper[];
156
+ /**
157
+ * Compare all computed remapper values against each other.
158
+ *
159
+ * Returns `false` if all entries are false, otherwise `true`.
160
+ *
161
+ * If only one remapper is passed, the remapper is returned.
162
+ */
163
+ or: Remapper[];
164
+ /**
165
+ * Get data stored at the current flow page step
166
+ */
167
+ step: string;
168
+ /**
169
+ * Compares the first computed remapper value with the second computed remapper value.
170
+ *
171
+ * Returns `true` of the first entry is greater than the second entry.
172
+ */
173
+ gt: [Remapper, Remapper];
174
+ /**
175
+ * Compares the first computed remapper value with the second computed remapper value.
176
+ *
177
+ * Returns `true` of the first entry is less than the second entry.
178
+ */
179
+ lt: [Remapper, Remapper];
180
+ /**
181
+ * Logs its input data (returns it) and its context.
182
+ *
183
+ * The value to set is the log level.
184
+ */
185
+ log: 'error' | 'info' | 'warn';
186
+ /**
187
+ * Get input object type.
188
+ */
189
+ type: null;
190
+ /**
191
+ * Builds an array based on the given data and remappers.
192
+ *
193
+ * The remappers gets applied to each item in the array.
194
+ *
195
+ * Always returns an array, can be empty if supplied data isn’t an array.
196
+ */
197
+ 'array.map': Remapper;
198
+ /**
199
+ * Filters out unique entries from an array.
200
+ *
201
+ * The value Remapper is applied to each entry in the array,
202
+ * using its result to determine uniqueness.
203
+ *
204
+ * If the value Remapper result in `undefined` or `null`, the entire entry is used for uniqueness.
205
+ *
206
+ * If the input is not an array, the input is returned without any modifications.
207
+ */
208
+ 'array.unique': Remapper;
209
+ /**
210
+ * Flattens an array.
211
+ *
212
+ * The value of the remapper is used for the flattening depth.
213
+ *
214
+ * If the value Remapper result in `undefined` or `null`, the array will be flattened until
215
+ * the last layer.
216
+ *
217
+ * If the input is not an array, the input is returned without any modifications.
218
+ */
219
+ 'array.flatten': Remapper;
220
+ /**
221
+ * Create an icalendar event.
222
+ */
223
+ ics: DurationICSRemapper | EndTimeICSRemapper;
224
+ /**
225
+ * Checks if condition results in a truthy value.
226
+ *
227
+ * Returns value of then if condition is truthy, otherwise it returns the value of else.
228
+ */
229
+ if: {
230
+ condition: Remapper;
231
+ then: Remapper;
232
+ else: Remapper;
233
+ };
234
+ /**
235
+ * Check if any case results in a truthy value.
236
+ *
237
+ * Returns the value of the first case where the condition equals true, otherwise returns null.
238
+ */
239
+ match: {
240
+ case: Remapper;
241
+ value: Remapper;
242
+ }[];
243
+ /**
244
+ * Get the current array.map’s index or length.
245
+ *
246
+ * Returns nothing if array.map’s context isn’t set.
247
+ */
248
+ array: 'index' | 'item' | 'length' | 'nextItem' | 'prevItem';
249
+ /**
250
+ *
251
+ * Returns an array containing the items matching the specified conditions.
252
+ */
253
+ 'array.filter': Remapper;
254
+ /**
255
+ * Returns an object based on the specified condition
256
+ */
257
+ 'array.find': Remapper;
258
+ /**
259
+ * Create a new array with an array of predefined remappers.
260
+ */
261
+ 'array.from': Remapper[];
262
+ /**
263
+ * Append new values to the end of an array.
264
+ *
265
+ * If the input is not an array an empty array is returned.
266
+ */
267
+ 'array.append': Remapper[];
268
+ /**
269
+ * Remove item(s) from an array given a predefined array of remappable indices.
270
+ *
271
+ * Only the remapped values that are turned into numbers are applied.
272
+ *
273
+ * If the input is not an array an empty array is returned.
274
+ */
275
+ 'array.omit': Remapper[];
276
+ /**
277
+ * Create a new object given some predefined mapper keys.
278
+ */
279
+ 'object.from': Record<string, Remapper>;
280
+ /**
281
+ * Assign properties to an existing object given some predefined mapper keys.
282
+ */
283
+ 'object.assign': Record<string, Remapper>;
284
+ /**
285
+ * Remove properties from an existing object based on the given the object keys.
286
+ *
287
+ * Nested properties can be removed using arrays of keys.
288
+ *
289
+ * @example
290
+ * ```yaml
291
+ * object.omit:
292
+ * - foo # Removes the property foo
293
+ * - - bar # Removes the property baz inside of bar
294
+ * - baz
295
+ * ```
296
+ */
297
+ 'object.omit': (string[] | string)[];
298
+ /**
299
+ * Compare two objects to each other and get an array of differences
300
+ *
301
+ * Nested object keys are returned as a path array.
302
+ *
303
+ * @example
304
+ * ```yaml
305
+ * object.compare:
306
+ * - object.from:
307
+ * name: Alice
308
+ * age: 25
309
+ * address:
310
+ * object.from:
311
+ * city: Paris
312
+ * zip: 7500
313
+ * - object.from:
314
+ * name: Alice
315
+ * age: 26
316
+ * address:
317
+ * object.from:
318
+ * city: Lyon
319
+ * country: France
320
+ * ```
321
+ *
322
+ * Returns:
323
+ * ```javascript
324
+ * [
325
+ * { path: ['age'], type: 'changed', from: 25, to: 26 },
326
+ * { path: ['address', 'city'], type: 'changed', from: 'Paris', to: 'Lyon' },
327
+ * { path: ['address', 'zip'], type: 'removed', value: 7500 },
328
+ * { path: ['address', 'country'], type: 'added', value: 'France' }
329
+ * ]
330
+ * ```
331
+ */
332
+ 'object.compare': [Remapper, Remapper];
333
+ /**
334
+ * Takes an object with an array property and transforms it into an array of objects.
335
+ *
336
+ * Each object in the resulting array contains all the entries of the original object
337
+ * plus all the entries of the corresponding array item from the array property.
338
+ *
339
+ * > **Note**
340
+ * > If one of the items in the array contains a key, which exists in the original object
341
+ * > it will overwrite the original key
342
+ *
343
+ * > **Note**
344
+ * > Nested arrays or objects are not exploded
345
+ *
346
+ * @example
347
+ * Input:
348
+ * ```javascript
349
+ * {
350
+ * ownerName: 'John',
351
+ * country: 'USA',
352
+ * pets: [
353
+ * { name: 'Milka' },
354
+ * { name: 'Sven', country: 'Sweden' },
355
+ * { name: 'Tom', likes: ['mice', 'fish'] },
356
+ * { name: 'Jerry', looks: { color: 'brown' } }
357
+ * ]
358
+ * }
359
+ * ```
360
+ *
361
+ * Remapper:
362
+ * ```yaml
363
+ * object.explode: pets
364
+ * ```
365
+ *
366
+ * Returns:
367
+ * ```javascript
368
+ * [
369
+ * { ownerName: 'John', name: 'Milka', country: 'USA' },
370
+ * { ownerName: 'John', name: 'Sven', country: 'Sweden' },
371
+ * { ownerName: 'John', name: 'Tom', country: 'USA', likes: ['mice', 'fish'] },
372
+ * { ownerName: 'John', name: 'Jerry', country: 'USA', looks: { color: 'brown' } }
373
+ * ]
374
+ * ```
375
+ */
376
+ 'object.explode': string;
377
+ /**
378
+ * Use a static value.
379
+ */
380
+ static: any;
381
+ /**
382
+ * Get a property from an object.
383
+ *
384
+ * If the prop is an array, nested properties will be retrieved in sequence.
385
+ */
386
+ prop: number[] | Remapper | string[];
387
+ /**
388
+ * Recursively strip all nullish values from an object or array.
389
+ */
390
+ 'null.strip': {
391
+ depth: number;
392
+ } | null;
393
+ /**
394
+ * Pick and return a random entry from an array.
395
+ *
396
+ * If the input is not an array, the input is returned as-is.
397
+ */
398
+ 'random.choice': null;
399
+ /**
400
+ * Pick and return a random entry from an array.
401
+ *
402
+ * If the input is not an array, the input is returned as-is.
403
+ */
404
+ 'random.integer': [number, number];
405
+ /**
406
+ * Pick and return a random entry from an array.
407
+ *
408
+ * If the input is not an array, the input is returned as-is.
409
+ */
410
+ 'random.float': [number, number];
411
+ /**
412
+ * Pick and return a random entry from an array.
413
+ *
414
+ * If the input is not an array, the input is returned as-is.
415
+ */
416
+ 'random.string': {
417
+ choice: string;
418
+ length: number;
419
+ };
420
+ /**
421
+ * This remapper return true if the provided item is in the input array.
422
+ *
423
+ */
424
+ 'array.contains': Remapper;
425
+ /**
426
+ * This remapper return true if the provided string is a substring of the input string.
427
+ *
428
+ */
429
+ 'string.contains': string;
430
+ /**
431
+ * This remapper returns the length of the input array or a string, this remapper
432
+ * doesn't require array to be in the context unlike `{ array: length }` remapper.
433
+ */
434
+ len: null;
435
+ /**
436
+ * Get the input data as it was initially passed to the remap function.
437
+ */
438
+ root: null;
439
+ /**
440
+ * Get the data at a certain index from the history stack prior to an action.
441
+ *
442
+ * 0 is the index of the first item in the history stack.
443
+ */
444
+ history: number;
445
+ /**
446
+ * Create a new object with properties from the history stack at a certain index.
447
+ */
448
+ 'from.history': {
449
+ /**
450
+ * The index of the history stack item to apply.
451
+ *
452
+ * 0 is the index of the first item in the history stack.
453
+ */
454
+ index: number;
455
+ /**
456
+ * Predefined mapper keys to choose what properties to apply.
457
+ */
458
+ props: Record<string, Remapper>;
459
+ };
460
+ /**
461
+ * Assign properties from the history stack at a certain index to an existing object.
462
+ */
463
+ 'assign.history': {
464
+ /**
465
+ * The index of the history stack item to assign.
466
+ *
467
+ * 0 is the index of the first item in the history stack.
468
+ */
469
+ index: number;
470
+ /**
471
+ * Predefined mapper keys to choose what properties to assign.
472
+ */
473
+ props: Record<string, Remapper>;
474
+ };
475
+ /**
476
+ * Assign properties from the history stack at a certain index and exclude the unwanted.
477
+ */
478
+ 'omit.history': {
479
+ /**
480
+ * The index of the history stack item to assign.
481
+ *
482
+ * 0 is the index of the first item in the history stack.
483
+ */
484
+ index: number;
485
+ /**
486
+ * Exclude properties from the history stack item, based on the given object keys.
487
+ *
488
+ * Nested properties can be excluded using arrays of keys.
489
+ *
490
+ * @example
491
+ * ```yaml
492
+ * omit.history:
493
+ * index: 0
494
+ * keys:
495
+ * - foo # Excludes the property foo
496
+ * - - bar # Excludes the property baz inside of bar
497
+ * - baz
498
+ * ```
499
+ */
500
+ keys: (string[] | string)[];
501
+ };
502
+ /**
503
+ * Convert an input to lower or upper case.
504
+ */
505
+ 'string.case': 'lower' | 'upper';
506
+ /**
507
+ * Check if the initial characters of the string matches with the input string.
508
+ */
509
+ 'string.startsWith': SubstringCaseType | string;
510
+ /**
511
+ * Check if the last characters of the string matches with the input string.
512
+ */
513
+ 'string.endsWith': SubstringCaseType | string;
514
+ /**
515
+ * Extract a section of the string or an array.
516
+ */
517
+ slice: number | [number, number];
518
+ /**
519
+ * Format a string using remapped input variables.
520
+ */
521
+ 'string.format': {
522
+ /**
523
+ * The message id pointing to the template string to format.
524
+ */
525
+ messageId?: Remapper;
526
+ /**
527
+ * The template default string to format.
528
+ */
529
+ template?: string;
530
+ /**
531
+ * A set of remappers to convert the input to usable values.
532
+ */
533
+ values?: Record<string, Remapper>;
534
+ };
535
+ /**
536
+ * Match the content with the regex in the key, and replace it with its value.
537
+ */
538
+ 'string.replace': Record<string, string>;
539
+ /**
540
+ * Translate using a messageID.
541
+ *
542
+ * This does not support parameters, for more nuanced translations use `string.format`.
543
+ */
544
+ translate: Remapper;
545
+ container: string;
546
+ /**
547
+ * Construct an OData $filter
548
+ */
549
+ 'filter.from': FilterParams;
550
+ /**
551
+ * Construct an OData $orderby
552
+ */
553
+ 'order.from': OrderParams;
554
+ /**
555
+ * Parse an xml string to a JavaScript object
556
+ */
557
+ 'xml.parse': Remapper;
558
+ /**
559
+ * Check if the value is defined
560
+ *
561
+ * @example
562
+ * "" -> true
563
+ * 0 -> true
564
+ * null -> false
565
+ * undefined -> false
566
+ */
567
+ defined: Remapper;
568
+ /**
569
+ * Perform the specified mathematical operation on the two numbers.
570
+ *
571
+ * Where the position matters, `a` is the first input.
572
+ *
573
+ * If one of the inputs is not a number, or the operation is invalid, `-1` is returned.
574
+ */
575
+ maths: {
576
+ a: Remapper;
577
+ b: Remapper;
578
+ operation: 'add' | 'divide' | 'mod' | 'multiply' | 'subtract';
579
+ };
580
+ }
581
+ export type ObjectRemapper = RequireExactlyOne<Remappers>;
582
+ export type ArrayRemapper = (ArrayRemapper | ObjectRemapper)[];
583
+ export type Remapper = ArrayRemapper | ObjectRemapper | boolean | number | string | null;
584
+ export {};
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=remapper.js.map