@appsemble/utils 0.30.14-test.5 → 0.32.1-test.14

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 (172) hide show
  1. package/README.md +3 -3
  2. package/allActions.js +5 -3
  3. package/api/components/parameters/$orderby.js +2 -2
  4. package/api/components/parameters/index.d.ts +2 -1
  5. package/api/components/parameters/index.js +2 -1
  6. package/api/components/parameters/webhookName.d.ts +2 -0
  7. package/api/components/parameters/webhookName.js +10 -0
  8. package/api/components/parameters/webhookSecretId.d.ts +2 -0
  9. package/api/components/parameters/webhookSecretId.js +8 -0
  10. package/api/components/schemas/ActionDefinition.js +3 -0
  11. package/api/components/schemas/App.js +8 -0
  12. package/api/components/schemas/AppDefinition.js +6 -0
  13. package/api/components/schemas/AppLayoutDefinition.js +8 -0
  14. package/api/components/schemas/AppServiceSecret.js +5 -0
  15. package/api/components/schemas/AppWebhookSecret.d.ts +2 -0
  16. package/api/components/schemas/AppWebhookSecret.js +25 -0
  17. package/api/components/schemas/DialogOkActionDefinition.js +1 -1
  18. package/api/components/schemas/FilterParametersDefinition.d.ts +2 -0
  19. package/api/components/schemas/FilterParametersDefinition.js +15 -0
  20. package/api/components/schemas/FlowCancelActionDefinition.js +1 -1
  21. package/api/components/schemas/FlowFinishActionDefinition.js +1 -1
  22. package/api/components/schemas/GroupMemberDeleteActionDefinition.js +1 -1
  23. package/api/components/schemas/ResourceDefinition.js +5 -0
  24. package/api/components/schemas/ResourceDeleteAllActionDefinition.d.ts +1 -0
  25. package/api/components/schemas/ResourceDeleteAllActionDefinition.js +21 -0
  26. package/api/components/schemas/ResourceDeleteBulkActionDefinition.d.ts +1 -0
  27. package/api/components/schemas/ResourceDeleteBulkActionDefinition.js +18 -0
  28. package/api/components/schemas/ResourceGetActionDefinition.js +3 -0
  29. package/api/components/schemas/ResourcePatchActionDefinition.js +3 -0
  30. package/api/components/schemas/ResourceSubscriptionStatusActionDefinition.js +1 -0
  31. package/api/components/schemas/ResourceSubscriptionSubscribeActionDefinition.js +1 -0
  32. package/api/components/schemas/ResourceSubscriptionToggleActionDefinition.js +1 -0
  33. package/api/components/schemas/ResourceSubscriptionUnsubscribeActionDefinition.js +1 -0
  34. package/api/components/schemas/ResourceUpdatePositionsActionDefinition.d.ts +1 -0
  35. package/api/components/schemas/ResourceUpdatePositionsActionDefinition.js +21 -0
  36. package/api/components/schemas/SecurityCronDefinition.d.ts +2 -0
  37. package/api/components/schemas/SecurityCronDefinition.js +26 -0
  38. package/api/components/schemas/SecurityDefinition.js +1 -0
  39. package/api/components/schemas/StorageSubtractActionDefinition.js +2 -2
  40. package/api/components/schemas/StorageWriteActionDefinition.js +4 -0
  41. package/api/components/schemas/Training.js +2 -25
  42. package/api/components/schemas/TrainingCompleted.d.ts +2 -0
  43. package/api/components/schemas/TrainingCompleted.js +17 -0
  44. package/api/components/schemas/WebhookDefinition.d.ts +2 -0
  45. package/api/components/schemas/WebhookDefinition.js +17 -0
  46. package/api/components/schemas/index.d.ts +8 -1
  47. package/api/components/schemas/index.js +8 -1
  48. package/api/components/schemas/utils.js +1 -1
  49. package/api/components/securitySchemes/index.d.ts +1 -0
  50. package/api/components/securitySchemes/index.js +1 -0
  51. package/api/components/securitySchemes/webhook.d.ts +2 -0
  52. package/api/components/securitySchemes/webhook.js +6 -0
  53. package/api/paths/apps/appId/resources/resourceType/resourceId/positions.js +54 -0
  54. package/api/paths/apps/appId/secrets/webhook/secretId.js +61 -0
  55. package/api/paths/apps/appId/secrets/webhook.js +44 -0
  56. package/api/paths/apps/appId/webhooks/webhookName.js +35 -0
  57. package/api/paths/apps/appId.js +6 -0
  58. package/api/paths/auth/email/patchPassword.js +30 -0
  59. package/api/paths/index.d.ts +7 -5
  60. package/api/paths/index.js +16 -12
  61. package/api/paths/trainings/completeTraining.js +18 -0
  62. package/api/paths/trainings/completedTrainings.d.ts +2 -0
  63. package/api/paths/trainings/completedTrainings.js +21 -0
  64. package/api/paths/trainings/trainingIds.d.ts +2 -0
  65. package/api/paths/trainings/trainingIds.js +20 -0
  66. package/api/tags/index.js +4 -4
  67. package/appMessages.js +1 -1
  68. package/assets.js +1 -1
  69. package/authorization.d.ts +1 -1
  70. package/authorization.js +1 -1
  71. package/blockUtils.d.ts +1 -1
  72. package/blockUtils.js +1 -0
  73. package/convertToCsv.js +2 -0
  74. package/examples.js +214 -4
  75. package/formatRequestAction.js +2 -2
  76. package/has.d.ts +1 -1
  77. package/has.js +1 -1
  78. package/i18n.js +6 -8
  79. package/ics.js +1 -1
  80. package/iterApp.js +3 -3
  81. package/jsonschema.js +16 -3
  82. package/package.json +15 -11
  83. package/reference-schemas/actions/appMember.d.ts +2 -0
  84. package/reference-schemas/actions/appMember.js +21 -0
  85. package/reference-schemas/actions/flow.d.ts +2 -0
  86. package/reference-schemas/actions/flow.js +13 -0
  87. package/reference-schemas/actions/group.d.ts +2 -0
  88. package/reference-schemas/actions/group.js +13 -0
  89. package/reference-schemas/actions/index.d.ts +7 -0
  90. package/reference-schemas/actions/index.js +8 -0
  91. package/reference-schemas/actions/link.d.ts +2 -0
  92. package/reference-schemas/actions/link.js +9 -0
  93. package/reference-schemas/actions/miscellaneous.d.ts +2 -0
  94. package/reference-schemas/actions/miscellaneous.js +41 -0
  95. package/reference-schemas/actions/resources.d.ts +2 -0
  96. package/reference-schemas/actions/resources.js +19 -0
  97. package/reference-schemas/actions/storage.d.ts +2 -0
  98. package/reference-schemas/actions/storage.js +15 -0
  99. package/reference-schemas/remappers/conditionals.js +39 -0
  100. package/reference-schemas/remappers/data.js +26 -2
  101. package/reference-schemas/remappers/index.d.ts +1 -0
  102. package/reference-schemas/remappers/index.js +1 -0
  103. package/reference-schemas/remappers/objects.js +32 -0
  104. package/reference-schemas/remappers/odata.d.ts +2 -0
  105. package/reference-schemas/remappers/odata.js +95 -0
  106. package/reference-schemas/remappers/strings.js +33 -0
  107. package/reference-schemas/remappers/unsorted.js +9 -0
  108. package/remap.d.ts +2 -0
  109. package/remap.js +192 -15
  110. package/serializeResource.d.ts +7 -0
  111. package/serializeResource.js +7 -0
  112. package/serverActions.d.ts +1 -1
  113. package/serverActions.js +2 -0
  114. package/theme.js +5 -1
  115. package/validateStyle.js +2 -0
  116. package/validation.js +52 -16
  117. package/api/components/parameters/trainingBlockId.d.ts +0 -2
  118. package/api/components/parameters/trainingBlockId.js +0 -8
  119. package/api/components/schemas/TrainingBlock.d.ts +0 -2
  120. package/api/components/schemas/TrainingBlock.js +0 -38
  121. package/api/components/securitySchemes/cli.test.d.ts +0 -1
  122. package/api/components/securitySchemes/cli.test.js +0 -7
  123. package/api/index.test.d.ts +0 -1
  124. package/api/index.test.js +0 -180
  125. package/api/paths/trainingBlocks/trainingBlockId.js +0 -41
  126. package/api/paths/trainings/trainingId/blocks.js +0 -51
  127. package/api/paths/trainings/trainingId/users/current.js +0 -62
  128. package/api/paths/trainings/trainingId/users.js +0 -25
  129. package/api/paths/trainings/trainingId.js +0 -85
  130. package/api/paths/trainings.js +0 -44
  131. package/appMessages.test.d.ts +0 -1
  132. package/appMessages.test.js +0 -409
  133. package/blockUtils.test.d.ts +0 -1
  134. package/blockUtils.test.js +0 -77
  135. package/constants/patterns.test.d.ts +0 -1
  136. package/constants/patterns.test.js +0 -83
  137. package/convertToCsv.test.d.ts +0 -1
  138. package/convertToCsv.test.js +0 -55
  139. package/has.test.d.ts +0 -1
  140. package/has.test.js +0 -17
  141. package/i18n.test.d.ts +0 -1
  142. package/i18n.test.js +0 -76
  143. package/iterApp.test.d.ts +0 -1
  144. package/iterApp.test.js +0 -439
  145. package/jsonschema.test.d.ts +0 -1
  146. package/jsonschema.test.js +0 -256
  147. package/mapValues.test.d.ts +0 -1
  148. package/mapValues.test.js +0 -16
  149. package/miscellaneous.test.d.ts +0 -1
  150. package/miscellaneous.test.js +0 -87
  151. package/normalize.test.d.ts +0 -1
  152. package/normalize.test.js +0 -23
  153. package/objectCache.test.d.ts +0 -1
  154. package/objectCache.test.js +0 -20
  155. package/prefix.test.d.ts +0 -1
  156. package/prefix.test.js +0 -11
  157. package/remap.test.d.ts +0 -1
  158. package/remap.test.js +0 -1387
  159. package/string.test.d.ts +0 -1
  160. package/string.test.js +0 -27
  161. package/theme.test.d.ts +0 -1
  162. package/theme.test.js +0 -91
  163. package/validateStyle.test.d.ts +0 -1
  164. package/validateStyle.test.js +0 -13
  165. package/validation.test.d.ts +0 -1
  166. package/validation.test.js +0 -3121
  167. /package/api/paths/{trainingBlocks/trainingBlockId.d.ts → apps/appId/resources/resourceType/resourceId/positions.d.ts} +0 -0
  168. /package/api/paths/{trainings/trainingId.d.ts → apps/appId/secrets/webhook/secretId.d.ts} +0 -0
  169. /package/api/paths/{trainings.d.ts → apps/appId/secrets/webhook.d.ts} +0 -0
  170. /package/api/paths/{trainings/trainingId/blocks.d.ts → apps/appId/webhooks/webhookName.d.ts} +0 -0
  171. /package/api/paths/{trainings/trainingId/users.d.ts → auth/email/patchPassword.d.ts} +0 -0
  172. /package/api/paths/trainings/{trainingId/users/current.d.ts → completeTraining.d.ts} +0 -0
package/README.md CHANGED
@@ -1,9 +1,9 @@
1
- # ![](https://gitlab.com/appsemble/appsemble/-/raw/0.30.14-test.5/config/assets/logo.svg) Appsemble Utilities
1
+ # ![](https://gitlab.com/appsemble/appsemble/-/raw/0.32.1-test.14/config/assets/logo.svg) Appsemble Utilities
2
2
 
3
3
  > Internal utility functions used across multiple Appsemble projects.
4
4
 
5
5
  [![npm](https://img.shields.io/npm/v/@appsemble/utils)](https://www.npmjs.com/package/@appsemble/utils)
6
- [![GitLab CI](https://gitlab.com/appsemble/appsemble/badges/0.30.14-test.5/pipeline.svg)](https://gitlab.com/appsemble/appsemble/-/releases/0.30.14-test.5)
6
+ [![GitLab CI](https://gitlab.com/appsemble/appsemble/badges/0.32.1-test.14/pipeline.svg)](https://gitlab.com/appsemble/appsemble/-/releases/0.32.1-test.14)
7
7
  [![Prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://prettier.io)
8
8
 
9
9
  ## Table of Contents
@@ -26,5 +26,5 @@ not guaranteed.
26
26
 
27
27
  ## License
28
28
 
29
- [LGPL-3.0-only](https://gitlab.com/appsemble/appsemble/-/blob/0.30.14-test.5/LICENSE.md) ©
29
+ [LGPL-3.0-only](https://gitlab.com/appsemble/appsemble/-/blob/0.32.1-test.14/LICENSE.md) ©
30
30
  [Appsemble](https://appsemble.com)
package/allActions.js CHANGED
@@ -1,9 +1,11 @@
1
1
  import { schemas } from './index.js';
2
2
  const [, kinds] = schemas.ActionDefinition.allOf;
3
- export const allActions = new Set(kinds.anyOf.map(({ $ref }) => {
3
+ export const allActions = new Set(kinds.anyOf
4
+ .map(({ $ref }) => {
4
5
  const ref = $ref.split('/').at(-1);
5
6
  const action = schemas[ref];
6
- const name = action.properties.type.enum[0];
7
+ const name = (action.properties?.type).enum?.[0];
7
8
  return name;
8
- }));
9
+ })
10
+ .filter((x) => x !== undefined));
9
11
  //# sourceMappingURL=allActions.js.map
@@ -2,9 +2,9 @@ export const $orderby = {
2
2
  name: '$orderby',
3
3
  in: 'query',
4
4
  description: `
5
- An OData filter
5
+ An OData query option to fetch ordered data
6
6
 
7
- http://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html#sec_SystemQueryOptionfilter
7
+ https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html#sec_SystemQueryOptionorderby
8
8
  `,
9
9
  schema: { type: 'string' },
10
10
  };
@@ -14,7 +14,6 @@ export * from './resourceId.js';
14
14
  export * from './resourceType.js';
15
15
  export * from './screenshotId.js';
16
16
  export * from './serviceSecretId.js';
17
- export * from './trainingBlockId.js';
18
17
  export * from './trainingId.js';
19
18
  export * from './$filter.js';
20
19
  export * from './$orderby.js';
@@ -28,3 +27,5 @@ export * from './roles.js';
28
27
  export * from './view.js';
29
28
  export * from './seed.js';
30
29
  export * from './selectedGroupId.js';
30
+ export * from './webhookName.js';
31
+ export * from './webhookSecretId.js';
@@ -14,7 +14,6 @@ export * from './resourceId.js';
14
14
  export * from './resourceType.js';
15
15
  export * from './screenshotId.js';
16
16
  export * from './serviceSecretId.js';
17
- export * from './trainingBlockId.js';
18
17
  export * from './trainingId.js';
19
18
  export * from './$filter.js';
20
19
  export * from './$orderby.js';
@@ -28,4 +27,6 @@ export * from './roles.js';
28
27
  export * from './view.js';
29
28
  export * from './seed.js';
30
29
  export * from './selectedGroupId.js';
30
+ export * from './webhookName.js';
31
+ export * from './webhookSecretId.js';
31
32
  //# sourceMappingURL=index.js.map
@@ -0,0 +1,2 @@
1
+ import { type OpenAPIV3 } from 'openapi-types';
2
+ export declare const webhookName: OpenAPIV3.ParameterObject;
@@ -0,0 +1,10 @@
1
+ export const webhookName = {
2
+ name: 'webhookName',
3
+ in: 'path',
4
+ description: 'The name of the webhook to call',
5
+ required: true,
6
+ schema: {
7
+ type: 'string',
8
+ },
9
+ };
10
+ //# sourceMappingURL=webhookName.js.map
@@ -0,0 +1,2 @@
1
+ import { type OpenAPIV3 } from 'openapi-types';
2
+ export declare const webhookSecretId: OpenAPIV3.ParameterObject;
@@ -0,0 +1,8 @@
1
+ export const webhookSecretId = {
2
+ name: 'webhookSecretId',
3
+ in: 'path',
4
+ description: 'The id of the app webhook secret on which to perform an operation',
5
+ required: true,
6
+ schema: { type: 'string' },
7
+ };
8
+ //# sourceMappingURL=webhookSecretId.js.map
@@ -52,6 +52,8 @@ export const ActionDefinition = {
52
52
  { $ref: '#/components/schemas/ResourceCountActionDefinition' },
53
53
  { $ref: '#/components/schemas/ResourceCreateActionDefinition' },
54
54
  { $ref: '#/components/schemas/ResourceDeleteActionDefinition' },
55
+ { $ref: '#/components/schemas/ResourceDeleteAllActionDefinition' },
56
+ { $ref: '#/components/schemas/ResourceDeleteBulkActionDefinition' },
55
57
  { $ref: '#/components/schemas/ResourceGetActionDefinition' },
56
58
  { $ref: '#/components/schemas/ResourceHistoryGetActionDefinition' },
57
59
  { $ref: '#/components/schemas/ResourceQueryActionDefinition' },
@@ -60,6 +62,7 @@ export const ActionDefinition = {
60
62
  { $ref: '#/components/schemas/ResourceSubscriptionToggleActionDefinition' },
61
63
  { $ref: '#/components/schemas/ResourceSubscriptionUnsubscribeActionDefinition' },
62
64
  { $ref: '#/components/schemas/ResourceUpdateActionDefinition' },
65
+ { $ref: '#/components/schemas/ResourceUpdatePositionsActionDefinition' },
63
66
  { $ref: '#/components/schemas/ResourcePatchActionDefinition' },
64
67
  { $ref: '#/components/schemas/ShareActionDefinition' },
65
68
  { $ref: '#/components/schemas/StaticActionDefinition' },
@@ -65,6 +65,14 @@ This doesn’t affect whether or not the app can be accessed on its own domain.
65
65
  and to make any changes from the studio, this should be set to \`unlocked\`.
66
66
  `,
67
67
  },
68
+ displayAppMemberName: {
69
+ type: 'boolean',
70
+ description: 'Whether to display app member name in the title bar.',
71
+ },
72
+ displayInstallationPrompt: {
73
+ type: 'boolean',
74
+ description: 'Whether to display installtion prompt to the users of app',
75
+ },
68
76
  template: {
69
77
  type: 'boolean',
70
78
  description: 'Determines whether this app should be included when fetching for templates.',
@@ -97,6 +97,12 @@ The most basic resource has a \`schema\` property and defines the minimal securi
97
97
  description: 'A list of cron jobs that are associated with this app.',
98
98
  additionalProperties: { $ref: '#/components/schemas/CronDefinition' },
99
99
  },
100
+ webhooks: {
101
+ type: 'object',
102
+ minProperties: 1,
103
+ description: 'A list of callable webhooks that are associated with this app.',
104
+ additionalProperties: { $ref: '#/components/schemas/WebhookDefinition' },
105
+ },
100
106
  anchors: {
101
107
  type: 'array',
102
108
  minItems: 1,
@@ -22,6 +22,14 @@ If set to \`navigation\`, it will only be visible if \`login\` is also visible i
22
22
  default: 'navigation',
23
23
  description: `The location of the feedback button.
24
24
 
25
+ If set to \`navigation\`, it will only be visible if \`login\` is also visible in \`navigation\`.
26
+ `,
27
+ },
28
+ install: {
29
+ enum: ['navbar', 'navigation', 'hidden'],
30
+ default: 'navigation',
31
+ description: `The location of the install button.
32
+
25
33
  If set to \`navigation\`, it will only be visible if \`login\` is also visible in \`navigation\`.
26
34
  `,
27
35
  },
@@ -44,6 +44,11 @@ export const AppServiceSecret = {
44
44
  type: 'string',
45
45
  description: 'The scope to request access tokens for.',
46
46
  },
47
+ public: {
48
+ type: 'boolean',
49
+ description: 'If a secret is marked public, it can be applied to the unauthenticated users, e.g. in the requests originating in a custom sign up or login page.',
50
+ default: false,
51
+ },
47
52
  ca: {
48
53
  type: 'string',
49
54
  description: 'The custom certificate authority.',
@@ -0,0 +1,2 @@
1
+ import { type OpenAPIV3 } from 'openapi-types';
2
+ export declare const AppWebhookSecret: OpenAPIV3.NonArraySchemaObject;
@@ -0,0 +1,25 @@
1
+ export const AppWebhookSecret = {
2
+ type: 'object',
3
+ description: 'App webhook secret settings',
4
+ additionalProperties: false,
5
+ properties: {
6
+ id: {
7
+ type: 'number',
8
+ description: 'An autogenerated ID.',
9
+ readOnly: true,
10
+ },
11
+ name: {
12
+ type: 'string',
13
+ description: 'An optional name to give extra clarity what the secret is used for.',
14
+ },
15
+ webhookName: {
16
+ type: 'string',
17
+ description: 'The name of the webhook the secret is tied to',
18
+ },
19
+ secret: {
20
+ type: 'string',
21
+ description: 'The autogenerated secret to authenticate the webhook caller with.',
22
+ },
23
+ },
24
+ };
25
+ //# sourceMappingURL=AppWebhookSecret.js.map
@@ -9,7 +9,7 @@ export const DialogOkActionDefinition = extendJSONSchema(BaseActionDefinition, {
9
9
  enum: ['dialog.ok'],
10
10
  description: `Close an open dialog.
11
11
 
12
- The dialog action that opened the dialog will be rejected with the data passed to this action.
12
+ The dialog action that opened the dialog will be resolved with the data passed to this action.
13
13
  `,
14
14
  },
15
15
  },
@@ -0,0 +1,2 @@
1
+ import { type OpenAPIV3 } from 'openapi-types';
2
+ export declare const FilterParametersDefinition: OpenAPIV3.NonArraySchemaObject;
@@ -0,0 +1,15 @@
1
+ export const FilterParametersDefinition = {
2
+ type: 'object',
3
+ description: 'An object describing the comparison that should be applied to the key in an OData filter.',
4
+ additionalProperties: false,
5
+ properties: {
6
+ type: {
7
+ enum: ['Boolean', 'String', 'Number', 'Date', 'Guid'],
8
+ },
9
+ value: { $ref: '#/components/schemas/RemapperDefinition' },
10
+ comparator: {
11
+ enum: ['eq', 'ge', 'gt', 'le', 'lt', 'ne'],
12
+ },
13
+ },
14
+ };
15
+ //# sourceMappingURL=FilterParametersDefinition.js.map
@@ -7,7 +7,7 @@ export const FlowCancelActionDefinition = extendJSONSchema(BaseActionDefinition,
7
7
  properties: {
8
8
  type: {
9
9
  enum: ['flow.cancel'],
10
- description: "On [flow pages](#flow-page-definition-sub-pages), cancel the ongoing flow and invoke the page's [`onFlowFinish`](#flow-page-actions-definition-on-flow-finish) action.",
10
+ description: "On [flow pages](../guides/page-types#flow-page), cancel the ongoing flow and invoke the page's [`onFlowFinish`](#flow-page-actions-definition-on-flow-finish) action.",
11
11
  },
12
12
  },
13
13
  });
@@ -7,7 +7,7 @@ export const FlowFinishActionDefinition = extendJSONSchema(BaseActionDefinition,
7
7
  properties: {
8
8
  type: {
9
9
  enum: ['flow.finish'],
10
- description: `On [flow pages](#flow-page-definition-sub-pages), triggers the
10
+ description: `On [flow pages](../guides/page-types#flow-page), triggers the
11
11
  [\`onFlowFinish\`](#flow-page-actions-definition-on-flow-finish) action on the page.
12
12
  `,
13
13
  },
@@ -7,7 +7,7 @@ export const GroupMemberDeleteActionDefinition = extendJSONSchema(BaseActionDefi
7
7
  properties: {
8
8
  type: {
9
9
  enum: ['group.member.delete'],
10
- description: 'Allow a user to join a group.',
10
+ description: 'Delete a group member from the group in which the invoking user is a member',
11
11
  },
12
12
  id: {
13
13
  $ref: '#/components/schemas/RemapperDefinition',
@@ -82,6 +82,11 @@ name of the resource and how it should behave.
82
82
  },
83
83
  },
84
84
  },
85
+ positioning: {
86
+ type: 'boolean',
87
+ default: false,
88
+ description: 'Whether to enable position column for the instances of this resource. This is used for keeping an ordered list to enable custom sorting of the data using drag and drop features.',
89
+ },
85
90
  url: {
86
91
  type: 'string',
87
92
  default: '/api/apps/{appId}/{resource}',
@@ -0,0 +1 @@
1
+ export declare const ResourceDeleteAllActionDefinition: import("openapi-types").OpenAPIV3.SchemaObject;
@@ -0,0 +1,21 @@
1
+ import { RequestActionDefinition } from './RequestActionDefinition.js';
2
+ import { extendJSONSchema } from './utils.js';
3
+ export const ResourceDeleteAllActionDefinition = extendJSONSchema(RequestActionDefinition, {
4
+ type: 'object',
5
+ additionalProperties: false,
6
+ required: ['type', 'resource'],
7
+ properties: {
8
+ type: {
9
+ enum: ['resource.delete.all'],
10
+ description: `Delete all instances of a resource.
11
+ > **Warning!**
12
+ >
13
+ > Use this action with caution to avoid losing precious data!`,
14
+ },
15
+ resource: {
16
+ type: 'string',
17
+ description: 'The type of the resource to delete.',
18
+ },
19
+ },
20
+ }, ['url', 'method']);
21
+ //# sourceMappingURL=ResourceDeleteAllActionDefinition.js.map
@@ -0,0 +1 @@
1
+ export declare const ResourceDeleteBulkActionDefinition: import("openapi-types").OpenAPIV3.SchemaObject;
@@ -0,0 +1,18 @@
1
+ import { RequestActionDefinition } from './RequestActionDefinition.js';
2
+ import { extendJSONSchema } from './utils.js';
3
+ export const ResourceDeleteBulkActionDefinition = extendJSONSchema(RequestActionDefinition, {
4
+ type: 'object',
5
+ additionalProperties: false,
6
+ required: ['type', 'resource'],
7
+ properties: {
8
+ type: {
9
+ enum: ['resource.delete.bulk'],
10
+ description: 'Delete several instances of a resource.',
11
+ },
12
+ resource: {
13
+ type: 'string',
14
+ description: 'The type of the resource to delete.',
15
+ },
16
+ },
17
+ }, ['url', 'method']);
18
+ //# sourceMappingURL=ResourceDeleteBulkActionDefinition.js.map
@@ -17,6 +17,9 @@ export const ResourceGetActionDefinition = extendJSONSchema(RequestActionDefinit
17
17
  type: 'string',
18
18
  description: 'The view to use for the resource.',
19
19
  },
20
+ id: {
21
+ $ref: '#/components/schemas/RemapperDefinition',
22
+ },
20
23
  },
21
24
  }, ['url', 'method']);
22
25
  //# sourceMappingURL=ResourceGetActionDefinition.js.map
@@ -13,6 +13,9 @@ export const ResourcePatchActionDefinition = extendJSONSchema(RequestActionDefin
13
13
  type: 'string',
14
14
  description: 'The type of the resource to patch.',
15
15
  },
16
+ id: {
17
+ $ref: '#/components/schemas/RemapperDefinition',
18
+ },
16
19
  },
17
20
  }, ['url', 'method']);
18
21
  //# sourceMappingURL=ResourcePatchActionDefinition.js.map
@@ -16,6 +16,7 @@ export const ResourceSubscriptionStatusActionDefinition = extendJSONSchema(BaseA
16
16
  action: {
17
17
  enum: ['create', 'delete', 'update'],
18
18
  description: 'The resource action type to get the subscription state for.',
19
+ default: 'update',
19
20
  },
20
21
  },
21
22
  });
@@ -16,6 +16,7 @@ export const ResourceSubscriptionSubscribeActionDefinition = extendJSONSchema(Ba
16
16
  action: {
17
17
  enum: ['create', 'delete', 'update'],
18
18
  description: 'The resource action type to subscribe to.',
19
+ default: 'update',
19
20
  },
20
21
  },
21
22
  });
@@ -16,6 +16,7 @@ export const ResourceSubscriptionToggleActionDefinition = extendJSONSchema(BaseA
16
16
  action: {
17
17
  enum: ['create', 'delete', 'update'],
18
18
  description: 'The resource action type to toggle the subscription state for.',
19
+ default: 'update',
19
20
  },
20
21
  },
21
22
  });
@@ -16,6 +16,7 @@ export const ResourceSubscriptionUnsubscribeActionDefinition = extendJSONSchema(
16
16
  action: {
17
17
  enum: ['create', 'delete', 'update'],
18
18
  description: 'The resource action type to unsubscribe from.',
19
+ default: 'update',
19
20
  },
20
21
  },
21
22
  });
@@ -0,0 +1 @@
1
+ export declare const ResourceUpdatePositionsActionDefinition: import("openapi-types").OpenAPIV3.SchemaObject;
@@ -0,0 +1,21 @@
1
+ import { RequestActionDefinition } from './RequestActionDefinition.js';
2
+ import { extendJSONSchema } from './utils.js';
3
+ export const ResourceUpdatePositionsActionDefinition = extendJSONSchema(RequestActionDefinition, {
4
+ type: 'object',
5
+ additionalProperties: false,
6
+ required: ['type', 'resource'],
7
+ properties: {
8
+ type: {
9
+ enum: ['resource.update.positions'],
10
+ description: 'Update the position of a resource.',
11
+ },
12
+ resource: {
13
+ type: 'string',
14
+ description: 'The type of the resource to update.',
15
+ },
16
+ id: {
17
+ $ref: '#/components/schemas/RemapperDefinition',
18
+ },
19
+ },
20
+ }, ['url', 'method']);
21
+ //# sourceMappingURL=ResourceUpdatePositionsActionDefinition.js.map
@@ -0,0 +1,2 @@
1
+ import { type OpenAPIV3 } from 'openapi-types';
2
+ export declare const SecurityCronDefinition: OpenAPIV3.NonArraySchemaObject;
@@ -0,0 +1,26 @@
1
+ export const SecurityCronDefinition = {
2
+ type: 'object',
3
+ description: 'This describes the permissions that unauthenticated users have.',
4
+ additionalProperties: false,
5
+ properties: {
6
+ inherits: {
7
+ type: 'array',
8
+ minItems: 1,
9
+ description: `The name of the role to inherit from.
10
+
11
+ Note that this role must exist.
12
+ `,
13
+ items: {
14
+ type: 'string',
15
+ },
16
+ },
17
+ permissions: {
18
+ type: 'array',
19
+ description: 'Specific permissions within the app, which unauthenticated users should have',
20
+ items: {
21
+ type: 'string',
22
+ },
23
+ },
24
+ },
25
+ };
26
+ //# sourceMappingURL=SecurityCronDefinition.js.map
@@ -5,6 +5,7 @@ export const SecurityDefinition = {
5
5
  properties: {
6
6
  default: { $ref: '#/components/schemas/SecurityDefaultDefinition' },
7
7
  guest: { $ref: '#/components/schemas/SecurityGuestDefinition' },
8
+ cron: { $ref: '#/components/schemas/SecurityCronDefinition' },
8
9
  roles: {
9
10
  type: 'object',
10
11
  description: 'This property defines the app roles that are available within the app.',
@@ -9,9 +9,9 @@ export const StorageSubtractActionDefinition = extendJSONSchema(BaseActionDefini
9
9
  enum: ['storage.subtract'],
10
10
  description: `Subtract last item from a storage entry.
11
11
 
12
- If the entry consists of only one item, turns it into a singular object.
12
+ If the entry consists of only one item, turns it into a singular object.
13
13
 
14
- If the entry is a single item, the entry is removed entirely.
14
+ If the entry is a single item, the entry is removed entirely.
15
15
 
16
16
  For example:
17
17
  \`\`\`yaml
@@ -32,6 +32,10 @@ remapBefore:
32
32
  $ref: '#/components/schemas/RemapperDefinition',
33
33
  description: 'The data to write to the storage entry.',
34
34
  },
35
+ expiry: {
36
+ enum: ['1d', '3d', '7d', '12h'],
37
+ description: 'Set an expiry for your data, only works with the localStorage',
38
+ },
35
39
  storage: {
36
40
  enum: ['indexedDB', 'localStorage', 'sessionStorage', 'appStorage'],
37
41
  description: 'The mechanism used to store the data.',
@@ -2,34 +2,11 @@ export const Training = {
2
2
  type: 'object',
3
3
  description: 'Object representation of a training',
4
4
  additionalProperties: false,
5
- required: ['title', 'competences', 'difficultyLevel'],
5
+ required: ['id'],
6
6
  properties: {
7
7
  id: {
8
- type: 'number',
9
- readOnly: true,
10
- minimum: 0,
11
- description: 'The id of the training, will be generated automatically by the system.',
12
- },
13
- title: {
14
- type: 'string',
15
- description: 'Title of the training.',
16
- },
17
- description: {
18
8
  type: 'string',
19
- description: 'A brief overview of the training.',
20
- },
21
- competences: {
22
- type: 'array',
23
- description: 'Competence tags for the training',
24
- items: {
25
- type: 'string',
26
- },
27
- },
28
- difficultyLevel: {
29
- type: 'number',
30
- description: 'Difficulty level between 1 and 5',
31
- minimum: 1,
32
- maximum: 5,
9
+ description: 'Id of the training',
33
10
  },
34
11
  },
35
12
  };
@@ -0,0 +1,2 @@
1
+ import { type OpenAPIV3 } from 'openapi-types';
2
+ export declare const TrainingCompleted: OpenAPIV3.NonArraySchemaObject;
@@ -0,0 +1,17 @@
1
+ export const TrainingCompleted = {
2
+ type: 'object',
3
+ description: 'Object which stores that a user has completed a certain training',
4
+ additionalProperties: false,
5
+ properties: {
6
+ trainingId: {
7
+ type: 'string',
8
+ description: 'The training that the user has completed.',
9
+ readOnly: true,
10
+ },
11
+ userId: {
12
+ type: 'string',
13
+ description: 'The user who completed the training',
14
+ },
15
+ },
16
+ };
17
+ //# sourceMappingURL=TrainingCompleted.js.map
@@ -0,0 +1,2 @@
1
+ import { type OpenAPIV3 } from 'openapi-types';
2
+ export declare const WebhookDefinition: OpenAPIV3.NonArraySchemaObject;
@@ -0,0 +1,17 @@
1
+ export const WebhookDefinition = {
2
+ type: 'object',
3
+ required: ['schema', 'action'],
4
+ description: 'A webhook definition defines app specific callable endpoints that Appsemble can handle.',
5
+ additionalProperties: false,
6
+ properties: {
7
+ schema: {
8
+ $ref: '#/components/schemas/JSONSchemaRoot',
9
+ description: 'JSON schema definition of the payload.',
10
+ },
11
+ action: {
12
+ description: 'The action to run when the webhook is triggered.',
13
+ $ref: '#/components/schemas/ActionDefinition',
14
+ },
15
+ },
16
+ };
17
+ //# sourceMappingURL=WebhookDefinition.js.map
@@ -82,6 +82,8 @@ export * from './ResourceCountActionDefinition.js';
82
82
  export * from './ResourceCreateActionDefinition.js';
83
83
  export * from './ResourceDefinition.js';
84
84
  export * from './ResourceDeleteActionDefinition.js';
85
+ export * from './ResourceDeleteAllActionDefinition.js';
86
+ export * from './ResourceDeleteBulkActionDefinition.js';
85
87
  export * from './ResourceGetActionDefinition.js';
86
88
  export * from './ResourceHistoryGetActionDefinition.js';
87
89
  export * from './ResourceHistoryDefinition.js';
@@ -93,8 +95,10 @@ export * from './ResourceSubscriptionSubscribeActionDefinition.js';
93
95
  export * from './ResourceSubscriptionToggleActionDefinition.js';
94
96
  export * from './ResourceSubscriptionUnsubscribeActionDefinition.js';
95
97
  export * from './ResourceUpdateActionDefinition.js';
98
+ export * from './ResourceUpdatePositionsActionDefinition.js';
96
99
  export * from './ResourcePatchActionDefinition.js';
97
100
  export * from './ResourceViewDefinition.js';
101
+ export * from './SecurityCronDefinition.js';
98
102
  export * from './SecurityDefaultDefinition.js';
99
103
  export * from './SecurityDefinition.js';
100
104
  export * from './SecurityRoleDefinition.js';
@@ -124,7 +128,7 @@ export * from './ThrowActionDefinition.js';
124
128
  export * from './User.js';
125
129
  export * from './UserInfo.js';
126
130
  export * from './Training.js';
127
- export * from './TrainingBlock.js';
131
+ export * from './TrainingCompleted.js';
128
132
  export * from './UserEmail.js';
129
133
  export * from './AppMemberLogoutActionDefinition.js';
130
134
  export * from './AppMemberLoginActionDefinition.js';
@@ -142,3 +146,6 @@ export * from './AppMemberPropertyDefinition.js';
142
146
  export * from './GroupMember.js';
143
147
  export * from './AppAccount.js';
144
148
  export * from './PageActionsDefinition.js';
149
+ export * from './FilterParametersDefinition.js';
150
+ export * from './WebhookDefinition.js';
151
+ export * from './AppWebhookSecret.js';