@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.
- package/README.md +3 -3
- package/allActions.js +5 -3
- package/api/components/parameters/$orderby.js +2 -2
- package/api/components/parameters/index.d.ts +2 -1
- package/api/components/parameters/index.js +2 -1
- package/api/components/parameters/webhookName.d.ts +2 -0
- package/api/components/parameters/webhookName.js +10 -0
- package/api/components/parameters/webhookSecretId.d.ts +2 -0
- package/api/components/parameters/webhookSecretId.js +8 -0
- package/api/components/schemas/ActionDefinition.js +3 -0
- package/api/components/schemas/App.js +8 -0
- package/api/components/schemas/AppDefinition.js +6 -0
- package/api/components/schemas/AppLayoutDefinition.js +8 -0
- package/api/components/schemas/AppServiceSecret.js +5 -0
- package/api/components/schemas/AppWebhookSecret.d.ts +2 -0
- package/api/components/schemas/AppWebhookSecret.js +25 -0
- package/api/components/schemas/DialogOkActionDefinition.js +1 -1
- package/api/components/schemas/FilterParametersDefinition.d.ts +2 -0
- package/api/components/schemas/FilterParametersDefinition.js +15 -0
- package/api/components/schemas/FlowCancelActionDefinition.js +1 -1
- package/api/components/schemas/FlowFinishActionDefinition.js +1 -1
- package/api/components/schemas/GroupMemberDeleteActionDefinition.js +1 -1
- package/api/components/schemas/ResourceDefinition.js +5 -0
- package/api/components/schemas/ResourceDeleteAllActionDefinition.d.ts +1 -0
- package/api/components/schemas/ResourceDeleteAllActionDefinition.js +21 -0
- package/api/components/schemas/ResourceDeleteBulkActionDefinition.d.ts +1 -0
- package/api/components/schemas/ResourceDeleteBulkActionDefinition.js +18 -0
- package/api/components/schemas/ResourceGetActionDefinition.js +3 -0
- package/api/components/schemas/ResourcePatchActionDefinition.js +3 -0
- package/api/components/schemas/ResourceSubscriptionStatusActionDefinition.js +1 -0
- package/api/components/schemas/ResourceSubscriptionSubscribeActionDefinition.js +1 -0
- package/api/components/schemas/ResourceSubscriptionToggleActionDefinition.js +1 -0
- package/api/components/schemas/ResourceSubscriptionUnsubscribeActionDefinition.js +1 -0
- package/api/components/schemas/ResourceUpdatePositionsActionDefinition.d.ts +1 -0
- package/api/components/schemas/ResourceUpdatePositionsActionDefinition.js +21 -0
- package/api/components/schemas/SecurityCronDefinition.d.ts +2 -0
- package/api/components/schemas/SecurityCronDefinition.js +26 -0
- package/api/components/schemas/SecurityDefinition.js +1 -0
- package/api/components/schemas/StorageSubtractActionDefinition.js +2 -2
- package/api/components/schemas/StorageWriteActionDefinition.js +4 -0
- package/api/components/schemas/Training.js +2 -25
- package/api/components/schemas/TrainingCompleted.d.ts +2 -0
- package/api/components/schemas/TrainingCompleted.js +17 -0
- package/api/components/schemas/WebhookDefinition.d.ts +2 -0
- package/api/components/schemas/WebhookDefinition.js +17 -0
- package/api/components/schemas/index.d.ts +8 -1
- package/api/components/schemas/index.js +8 -1
- package/api/components/schemas/utils.js +1 -1
- package/api/components/securitySchemes/index.d.ts +1 -0
- package/api/components/securitySchemes/index.js +1 -0
- package/api/components/securitySchemes/webhook.d.ts +2 -0
- package/api/components/securitySchemes/webhook.js +6 -0
- package/api/paths/apps/appId/resources/resourceType/resourceId/positions.js +54 -0
- package/api/paths/apps/appId/secrets/webhook/secretId.js +61 -0
- package/api/paths/apps/appId/secrets/webhook.js +44 -0
- package/api/paths/apps/appId/webhooks/webhookName.js +35 -0
- package/api/paths/apps/appId.js +6 -0
- package/api/paths/auth/email/patchPassword.js +30 -0
- package/api/paths/index.d.ts +7 -5
- package/api/paths/index.js +16 -12
- package/api/paths/trainings/completeTraining.js +18 -0
- package/api/paths/trainings/completedTrainings.d.ts +2 -0
- package/api/paths/trainings/completedTrainings.js +21 -0
- package/api/paths/trainings/trainingIds.d.ts +2 -0
- package/api/paths/trainings/trainingIds.js +20 -0
- package/api/tags/index.js +4 -4
- package/appMessages.js +1 -1
- package/assets.js +1 -1
- package/authorization.d.ts +1 -1
- package/authorization.js +1 -1
- package/blockUtils.d.ts +1 -1
- package/blockUtils.js +1 -0
- package/convertToCsv.js +2 -0
- package/examples.js +214 -4
- package/formatRequestAction.js +2 -2
- package/has.d.ts +1 -1
- package/has.js +1 -1
- package/i18n.js +6 -8
- package/ics.js +1 -1
- package/iterApp.js +3 -3
- package/jsonschema.js +16 -3
- package/package.json +15 -11
- package/reference-schemas/actions/appMember.d.ts +2 -0
- package/reference-schemas/actions/appMember.js +21 -0
- package/reference-schemas/actions/flow.d.ts +2 -0
- package/reference-schemas/actions/flow.js +13 -0
- package/reference-schemas/actions/group.d.ts +2 -0
- package/reference-schemas/actions/group.js +13 -0
- package/reference-schemas/actions/index.d.ts +7 -0
- package/reference-schemas/actions/index.js +8 -0
- package/reference-schemas/actions/link.d.ts +2 -0
- package/reference-schemas/actions/link.js +9 -0
- package/reference-schemas/actions/miscellaneous.d.ts +2 -0
- package/reference-schemas/actions/miscellaneous.js +41 -0
- package/reference-schemas/actions/resources.d.ts +2 -0
- package/reference-schemas/actions/resources.js +19 -0
- package/reference-schemas/actions/storage.d.ts +2 -0
- package/reference-schemas/actions/storage.js +15 -0
- package/reference-schemas/remappers/conditionals.js +39 -0
- package/reference-schemas/remappers/data.js +26 -2
- package/reference-schemas/remappers/index.d.ts +1 -0
- package/reference-schemas/remappers/index.js +1 -0
- package/reference-schemas/remappers/objects.js +32 -0
- package/reference-schemas/remappers/odata.d.ts +2 -0
- package/reference-schemas/remappers/odata.js +95 -0
- package/reference-schemas/remappers/strings.js +33 -0
- package/reference-schemas/remappers/unsorted.js +9 -0
- package/remap.d.ts +2 -0
- package/remap.js +192 -15
- package/serializeResource.d.ts +7 -0
- package/serializeResource.js +7 -0
- package/serverActions.d.ts +1 -1
- package/serverActions.js +2 -0
- package/theme.js +5 -1
- package/validateStyle.js +2 -0
- package/validation.js +52 -16
- package/api/components/parameters/trainingBlockId.d.ts +0 -2
- package/api/components/parameters/trainingBlockId.js +0 -8
- package/api/components/schemas/TrainingBlock.d.ts +0 -2
- package/api/components/schemas/TrainingBlock.js +0 -38
- package/api/components/securitySchemes/cli.test.d.ts +0 -1
- package/api/components/securitySchemes/cli.test.js +0 -7
- package/api/index.test.d.ts +0 -1
- package/api/index.test.js +0 -180
- package/api/paths/trainingBlocks/trainingBlockId.js +0 -41
- package/api/paths/trainings/trainingId/blocks.js +0 -51
- package/api/paths/trainings/trainingId/users/current.js +0 -62
- package/api/paths/trainings/trainingId/users.js +0 -25
- package/api/paths/trainings/trainingId.js +0 -85
- package/api/paths/trainings.js +0 -44
- package/appMessages.test.d.ts +0 -1
- package/appMessages.test.js +0 -409
- package/blockUtils.test.d.ts +0 -1
- package/blockUtils.test.js +0 -77
- package/constants/patterns.test.d.ts +0 -1
- package/constants/patterns.test.js +0 -83
- package/convertToCsv.test.d.ts +0 -1
- package/convertToCsv.test.js +0 -55
- package/has.test.d.ts +0 -1
- package/has.test.js +0 -17
- package/i18n.test.d.ts +0 -1
- package/i18n.test.js +0 -76
- package/iterApp.test.d.ts +0 -1
- package/iterApp.test.js +0 -439
- package/jsonschema.test.d.ts +0 -1
- package/jsonschema.test.js +0 -256
- package/mapValues.test.d.ts +0 -1
- package/mapValues.test.js +0 -16
- package/miscellaneous.test.d.ts +0 -1
- package/miscellaneous.test.js +0 -87
- package/normalize.test.d.ts +0 -1
- package/normalize.test.js +0 -23
- package/objectCache.test.d.ts +0 -1
- package/objectCache.test.js +0 -20
- package/prefix.test.d.ts +0 -1
- package/prefix.test.js +0 -11
- package/remap.test.d.ts +0 -1
- package/remap.test.js +0 -1387
- package/string.test.d.ts +0 -1
- package/string.test.js +0 -27
- package/theme.test.d.ts +0 -1
- package/theme.test.js +0 -91
- package/validateStyle.test.d.ts +0 -1
- package/validateStyle.test.js +0 -13
- package/validation.test.d.ts +0 -1
- package/validation.test.js +0 -3121
- /package/api/paths/{trainingBlocks/trainingBlockId.d.ts → apps/appId/resources/resourceType/resourceId/positions.d.ts} +0 -0
- /package/api/paths/{trainings/trainingId.d.ts → apps/appId/secrets/webhook/secretId.d.ts} +0 -0
- /package/api/paths/{trainings.d.ts → apps/appId/secrets/webhook.d.ts} +0 -0
- /package/api/paths/{trainings/trainingId/blocks.d.ts → apps/appId/webhooks/webhookName.d.ts} +0 -0
- /package/api/paths/{trainings/trainingId/users.d.ts → auth/email/patchPassword.d.ts} +0 -0
- /package/api/paths/trainings/{trainingId/users/current.d.ts → completeTraining.d.ts} +0 -0
|
@@ -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 './
|
|
131
|
+
export * from './TrainingCompleted.js';
|
|
128
132
|
export * from './UserEmail.js';
|
|
129
133
|
export * from './AppMemberLogoutActionDefinition.js';
|
|
130
134
|
export * from './AppMemberLoginActionDefinition.js';
|
|
@@ -142,4 +146,7 @@ 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';
|
|
145
152
|
//# sourceMappingURL=index.js.map
|
|
@@ -24,7 +24,7 @@ export function extendJSONSchema(base, schema, omit = []) {
|
|
|
24
24
|
result.required = required;
|
|
25
25
|
}
|
|
26
26
|
result.properties = { ...schema.properties };
|
|
27
|
-
for (const [name, property] of Object.entries(base.properties)) {
|
|
27
|
+
for (const [name, property] of Object.entries(base.properties ?? {})) {
|
|
28
28
|
if (!omit.includes(name) && !has(result.properties, name)) {
|
|
29
29
|
result.properties[name] = property;
|
|
30
30
|
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
export const pathItems = {
|
|
2
|
+
parameters: [
|
|
3
|
+
{ $ref: '#/components/parameters/appId' },
|
|
4
|
+
{ $ref: '#/components/parameters/resourceType' },
|
|
5
|
+
{ $ref: '#/components/parameters/resourceId' },
|
|
6
|
+
],
|
|
7
|
+
put: {
|
|
8
|
+
tags: ['app', 'resource', 'positioning', 'custom-sort'],
|
|
9
|
+
description: 'Update the current position of the resource in the order.',
|
|
10
|
+
operationId: 'updateAppResourcePosition',
|
|
11
|
+
requestBody: {
|
|
12
|
+
content: {
|
|
13
|
+
'application/json': {
|
|
14
|
+
schema: {
|
|
15
|
+
type: 'object',
|
|
16
|
+
description: '',
|
|
17
|
+
required: ['prevResourcePosition', 'nextResourcePosition'],
|
|
18
|
+
properties: {
|
|
19
|
+
prevResourcePosition: {
|
|
20
|
+
oneOf: [
|
|
21
|
+
{
|
|
22
|
+
type: 'number',
|
|
23
|
+
minimum: 0,
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
enum: [null],
|
|
27
|
+
},
|
|
28
|
+
],
|
|
29
|
+
},
|
|
30
|
+
nextResourcePosition: {
|
|
31
|
+
oneOf: [{ type: 'number', minimum: 0 }, { enum: [null] }],
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
responses: {
|
|
39
|
+
200: {
|
|
40
|
+
description: 'The subscription status of the resource that matches the given id.',
|
|
41
|
+
content: {
|
|
42
|
+
'application/json': {
|
|
43
|
+
schema: {
|
|
44
|
+
type: 'number',
|
|
45
|
+
description: 'The updated position',
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
security: [{ app: ['resources:manage'] }, {}],
|
|
52
|
+
},
|
|
53
|
+
};
|
|
54
|
+
//# sourceMappingURL=positions.js.map
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
export const pathItems = {
|
|
2
|
+
parameters: [
|
|
3
|
+
{ $ref: '#/components/parameters/appId' },
|
|
4
|
+
{ $ref: '#/components/parameters/webhookSecretId' },
|
|
5
|
+
],
|
|
6
|
+
get: {
|
|
7
|
+
tags: ['main', 'app', 'secret', 'webhook'],
|
|
8
|
+
operationId: 'getAppWebhookSecret',
|
|
9
|
+
security: [{ studio: [] }],
|
|
10
|
+
responses: {
|
|
11
|
+
200: {
|
|
12
|
+
description: 'The requested webhook secret.',
|
|
13
|
+
content: {
|
|
14
|
+
'application/json': {
|
|
15
|
+
schema: {
|
|
16
|
+
type: 'object',
|
|
17
|
+
properties: {
|
|
18
|
+
secret: {
|
|
19
|
+
type: 'string',
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
put: {
|
|
29
|
+
tags: ['main', 'app', 'secret', 'webhook'],
|
|
30
|
+
operationId: 'updateAppWebhookSecret',
|
|
31
|
+
requestBody: {
|
|
32
|
+
content: {
|
|
33
|
+
'application/json': {
|
|
34
|
+
schema: { $ref: '#/components/schemas/AppWebhookSecret' },
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
security: [{ studio: [] }],
|
|
39
|
+
responses: {
|
|
40
|
+
200: {
|
|
41
|
+
description: 'The updated app webhook secret.',
|
|
42
|
+
content: {
|
|
43
|
+
'application/json': {
|
|
44
|
+
schema: { $ref: '#/components/schemas/AppWebhookSecret' },
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
delete: {
|
|
51
|
+
tags: ['main', 'app', 'secret', 'webhook'],
|
|
52
|
+
operationId: 'deleteAppWebhookSecret',
|
|
53
|
+
security: [{ studio: [] }],
|
|
54
|
+
responses: {
|
|
55
|
+
204: {
|
|
56
|
+
description: 'The deleted app webhook secret.',
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
};
|
|
61
|
+
//# sourceMappingURL=secretId.js.map
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
export const pathItems = {
|
|
2
|
+
parameters: [{ $ref: '#/components/parameters/appId' }],
|
|
3
|
+
post: {
|
|
4
|
+
tags: ['main', 'app', 'secret', 'webhook'],
|
|
5
|
+
operationId: 'createAppWebhookSecret',
|
|
6
|
+
requestBody: {
|
|
7
|
+
content: {
|
|
8
|
+
'application/json': {
|
|
9
|
+
schema: { $ref: '#/components/schemas/AppWebhookSecret' },
|
|
10
|
+
},
|
|
11
|
+
},
|
|
12
|
+
},
|
|
13
|
+
security: [{ studio: [] }, { cli: ['apps:write'] }],
|
|
14
|
+
responses: {
|
|
15
|
+
201: {
|
|
16
|
+
description: 'The created app webhook secret.',
|
|
17
|
+
content: {
|
|
18
|
+
'application/json': {
|
|
19
|
+
schema: { $ref: '#/components/schemas/AppWebhookSecret' },
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
get: {
|
|
26
|
+
tags: ['main', 'app', 'secret', 'webhook'],
|
|
27
|
+
operationId: 'getAppWebhookSecrets',
|
|
28
|
+
security: [{ studio: [] }],
|
|
29
|
+
responses: {
|
|
30
|
+
200: {
|
|
31
|
+
description: 'The list of app webhook secrets.',
|
|
32
|
+
content: {
|
|
33
|
+
'application/json': {
|
|
34
|
+
schema: {
|
|
35
|
+
type: 'array',
|
|
36
|
+
items: { $ref: '#/components/schemas/AppWebhookSecret' },
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
};
|
|
44
|
+
//# sourceMappingURL=webhook.js.map
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export const pathItems = {
|
|
2
|
+
parameters: [
|
|
3
|
+
{ $ref: '#/components/parameters/appId' },
|
|
4
|
+
{ $ref: '#/components/parameters/webhookName' },
|
|
5
|
+
],
|
|
6
|
+
post: {
|
|
7
|
+
tags: ['main', 'app', 'webhook'],
|
|
8
|
+
description: 'Call a webhook defined in the app',
|
|
9
|
+
operationId: 'callAppWebhook',
|
|
10
|
+
responses: {
|
|
11
|
+
200: {
|
|
12
|
+
description: 'The webhook was called successfully.',
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
requestBody: {
|
|
16
|
+
required: true,
|
|
17
|
+
content: {
|
|
18
|
+
'multipart/form-data': {
|
|
19
|
+
schema: {
|
|
20
|
+
type: 'object',
|
|
21
|
+
additionalProperties: true,
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
'application/json': {
|
|
25
|
+
schema: {
|
|
26
|
+
type: 'object',
|
|
27
|
+
additionalProperties: true,
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
security: [{ webhook: [] }],
|
|
33
|
+
},
|
|
34
|
+
};
|
|
35
|
+
//# sourceMappingURL=webhookName.js.map
|
package/api/paths/apps/appId.js
CHANGED
|
@@ -112,6 +112,12 @@ export const pathItems = {
|
|
|
112
112
|
type: 'boolean',
|
|
113
113
|
description: 'Whether new users should be able to register themselves.',
|
|
114
114
|
},
|
|
115
|
+
displayAppMemberName: {
|
|
116
|
+
$ref: '#/components/schemas/App/properties/displayAppMemberName',
|
|
117
|
+
},
|
|
118
|
+
displayInstallationPrompt: {
|
|
119
|
+
$ref: '#/components/schemas/App/properties/displayInstallationPrompt',
|
|
120
|
+
},
|
|
115
121
|
emailName: {
|
|
116
122
|
type: 'string',
|
|
117
123
|
description: 'The name used for emails.',
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export const pathItems = {
|
|
2
|
+
post: {
|
|
3
|
+
tags: ['main', 'auth', 'email'],
|
|
4
|
+
description: 'Update password',
|
|
5
|
+
operationId: 'patchPassword',
|
|
6
|
+
responses: { 200: { description: 'Password changed.' } },
|
|
7
|
+
security: [{ studio: [] }],
|
|
8
|
+
requestBody: {
|
|
9
|
+
required: true,
|
|
10
|
+
content: {
|
|
11
|
+
'application/json': {
|
|
12
|
+
schema: {
|
|
13
|
+
type: 'object',
|
|
14
|
+
required: ['newPassword', 'currentPassword'],
|
|
15
|
+
properties: {
|
|
16
|
+
newPassword: {
|
|
17
|
+
type: 'string',
|
|
18
|
+
minLength: 8,
|
|
19
|
+
},
|
|
20
|
+
currentPassword: {
|
|
21
|
+
type: 'string',
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=patchPassword.js.map
|
package/api/paths/index.d.ts
CHANGED
|
@@ -43,6 +43,7 @@ export declare const paths: {
|
|
|
43
43
|
'/api/apps/{appId}/resources/{resourceType}/subscriptions': import("openapi-types").OpenAPIV3.PathItemObject<{}>;
|
|
44
44
|
'/api/apps/{appId}/resources/{resourceType}': import("openapi-types").OpenAPIV3.PathItemObject<{}>;
|
|
45
45
|
'/api/apps/{appId}/resources/{resourceType}/{resourceId}/versions': import("openapi-types").OpenAPIV3.PathItemObject<{}>;
|
|
46
|
+
'/api/apps/{appId}/resources/{resourceType}/{resourceId}/positions': import("openapi-types").OpenAPIV3.PathItemObject<{}>;
|
|
46
47
|
'/api/apps/{appId}/resources': import("openapi-types").OpenAPIV3.PathItemObject<{}>;
|
|
47
48
|
'/api/apps/{appId}/saml/{appSamlSecretId}/acs': import("openapi-types").OpenAPIV3.PathItemObject<{}>;
|
|
48
49
|
'/api/apps/{appId}/saml/{appSamlSecretId}/authn': import("openapi-types").OpenAPIV3.PathItemObject<{}>;
|
|
@@ -65,6 +66,8 @@ export declare const paths: {
|
|
|
65
66
|
'/api/apps/{appId}/secrets/service/{serviceSecretId}': import("openapi-types").OpenAPIV3.PathItemObject<{}>;
|
|
66
67
|
'/api/apps/{appId}/secrets/service': import("openapi-types").OpenAPIV3.PathItemObject<{}>;
|
|
67
68
|
'/api/apps/{appId}/secrets/ssl': import("openapi-types").OpenAPIV3.PathItemObject<{}>;
|
|
69
|
+
'/api/apps/{appId}/secrets/webhook/{webhookSecretId}': import("openapi-types").OpenAPIV3.PathItemObject<{}>;
|
|
70
|
+
'/api/apps/{appId}/secrets/webhook': import("openapi-types").OpenAPIV3.PathItemObject<{}>;
|
|
68
71
|
'/api/apps/{appId}/snapshots/{snapshotId}': import("openapi-types").OpenAPIV3.PathItemObject<{}>;
|
|
69
72
|
'/api/apps/{appId}/snapshots': import("openapi-types").OpenAPIV3.PathItemObject<{}>;
|
|
70
73
|
'/api/apps/{appId}/style/block/@{organizationId}/{blockId}': import("openapi-types").OpenAPIV3.PathItemObject<{}>;
|
|
@@ -73,6 +76,7 @@ export declare const paths: {
|
|
|
73
76
|
'/api/apps/{appId}/subscriptions': import("openapi-types").OpenAPIV3.PathItemObject<{}>;
|
|
74
77
|
'/api/apps/{appId}/variables/{appVariableId}': import("openapi-types").OpenAPIV3.PathItemObject<{}>;
|
|
75
78
|
'/api/apps/{appId}/variables': import("openapi-types").OpenAPIV3.PathItemObject<{}>;
|
|
79
|
+
'/api/apps/{appId}/webhooks/{webhookName}': import("openapi-types").OpenAPIV3.PathItemObject<{}>;
|
|
76
80
|
'/api/apps/{appId}': import("openapi-types").OpenAPIV3.PathItemObject<{}>;
|
|
77
81
|
'/api/apps/{appId}/auth/email/login': import("openapi-types").OpenAPIV3.PathItemObject<{}>;
|
|
78
82
|
'/api/apps/{appId}/auth/email/register': import("openapi-types").OpenAPIV3.PathItemObject<{}>;
|
|
@@ -85,6 +89,7 @@ export declare const paths: {
|
|
|
85
89
|
'/api/auth/email/login': import("openapi-types").OpenAPIV3.PathItemObject<{}>;
|
|
86
90
|
'/api/auth/email/register': import("openapi-types").OpenAPIV3.PathItemObject<{}>;
|
|
87
91
|
'/api/auth/email/reset-password': import("openapi-types").OpenAPIV3.PathItemObject<{}>;
|
|
92
|
+
'/api/auth/email/patch-password': import("openapi-types").OpenAPIV3.PathItemObject<{}>;
|
|
88
93
|
'/api/auth/email/resend-verification': import("openapi-types").OpenAPIV3.PathItemObject<{}>;
|
|
89
94
|
'/api/auth/email/request-password-reset': import("openapi-types").OpenAPIV3.PathItemObject<{}>;
|
|
90
95
|
'/api/auth/email/verify': import("openapi-types").OpenAPIV3.PathItemObject<{}>;
|
|
@@ -127,11 +132,8 @@ export declare const paths: {
|
|
|
127
132
|
'/api/groups/{groupId}/members': import("openapi-types").OpenAPIV3.PathItemObject<{}>;
|
|
128
133
|
'/api/groups/{groupId}': import("openapi-types").OpenAPIV3.PathItemObject<{}>;
|
|
129
134
|
'/api/timezones': import("openapi-types").OpenAPIV3.PathItemObject<{}>;
|
|
130
|
-
'/api/
|
|
131
|
-
'/api/trainings/{trainingId}
|
|
132
|
-
'/api/trainings/{trainingId}/users/current': import("openapi-types").OpenAPIV3.PathItemObject<{}>;
|
|
133
|
-
'/api/trainings/{trainingId}/users': import("openapi-types").OpenAPIV3.PathItemObject<{}>;
|
|
134
|
-
'/api/trainings/{trainingId}': import("openapi-types").OpenAPIV3.PathItemObject<{}>;
|
|
135
|
+
'/api/trainings/completed': import("openapi-types").OpenAPIV3.PathItemObject<{}>;
|
|
136
|
+
'/api/trainings/completed/{trainingId}': import("openapi-types").OpenAPIV3.PathItemObject<{}>;
|
|
135
137
|
'/api/trainings': import("openapi-types").OpenAPIV3.PathItemObject<{}>;
|
|
136
138
|
'/api/users/current/apps/accounts': import("openapi-types").OpenAPIV3.PathItemObject<{}>;
|
|
137
139
|
'/api/users/current/apps/{appId}/account': import("openapi-types").OpenAPIV3.PathItemObject<{}>;
|
package/api/paths/index.js
CHANGED
|
@@ -43,6 +43,7 @@ import { pathItems as appsAppIdRatings } from './apps/appId/ratings.js';
|
|
|
43
43
|
import { pathItems as appsAppIdReadmesReadmeId } from './apps/appId/readmes/readmeId.js';
|
|
44
44
|
import { pathItems as appsAppIdReseed } from './apps/appId/reseed.js';
|
|
45
45
|
import { pathItems as appsAppIdResourcesResourceType$Count } from './apps/appId/resources/resourceType/count.js';
|
|
46
|
+
import { pathItems as appsAppIdResourcesResourceTypeResourceIdPositioning } from './apps/appId/resources/resourceType/resourceId/positions.js';
|
|
46
47
|
import { pathItems as appsAppIdResourcesResourceTypeResourceIdSubscriptions } from './apps/appId/resources/resourceType/resourceId/subscriptions.js';
|
|
47
48
|
import { pathItems as appsAppIdResourcesResourceTypeResourceId } from './apps/appId/resources/resourceType/resourceId.js';
|
|
48
49
|
import { pathItems as appsAppIdResourcesResourceTypeSubscriptions } from './apps/appId/resources/resourceType/subscriptions.js';
|
|
@@ -70,6 +71,8 @@ import { pathItems as appsAppIdSecretsScim } from './apps/appId/secrets/scim.js'
|
|
|
70
71
|
import { pathItems as appsAppIdSecretsServiceSecretId } from './apps/appId/secrets/service/secretId.js';
|
|
71
72
|
import { pathItems as appsAppIdSecretsService } from './apps/appId/secrets/service.js';
|
|
72
73
|
import { pathItems as appsAppIdSecretsSsl } from './apps/appId/secrets/ssl.js';
|
|
74
|
+
import { pathItems as appsAppIdSecretsWebhookSecretId } from './apps/appId/secrets/webhook/secretId.js';
|
|
75
|
+
import { pathItems as appsAppIdSecretsWebhook } from './apps/appId/secrets/webhook.js';
|
|
73
76
|
import { pathItems as appsAppIdSnapshotsSnapshotId } from './apps/appId/snapshots/snapshotId.js';
|
|
74
77
|
import { pathItems as appsAppIdSnapshots } from './apps/appId/snapshots.js';
|
|
75
78
|
import { pathItems as appsAppIdStyleBlockOrganizationIdBLockId } from './apps/appId/style/block/organizationId/blockId.js';
|
|
@@ -78,10 +81,12 @@ import { pathItems as appsAppIdStyleShared } from './apps/appId/style/shared.js'
|
|
|
78
81
|
import { pathItems as appsAppIdSubscriptions } from './apps/appId/subscriptions.js';
|
|
79
82
|
import { pathItems as appsAppIdVariablesAppVariableId } from './apps/appId/variables/variableId.js';
|
|
80
83
|
import { pathItems as appsAppIdVariables } from './apps/appId/variables.js';
|
|
84
|
+
import { pathItems as appsAppIdWebhooksWebhookName } from './apps/appId/webhooks/webhookName.js';
|
|
81
85
|
import { pathItems as appsAppId } from './apps/appId.js';
|
|
82
86
|
import { pathItems as apps } from './apps.js';
|
|
83
87
|
import { pathItems as appTemplates } from './appTemplates.js';
|
|
84
88
|
import { pathItems as authEmailLogin } from './auth/email/login.js';
|
|
89
|
+
import { pathItems as authEmailPatchPassword } from './auth/email/patchPassword.js';
|
|
85
90
|
import { pathItems as authEmailRegister } from './auth/email/register.js';
|
|
86
91
|
import { pathItems as authEmailRequestPasswordReset } from './auth/email/requestResetPassword.js';
|
|
87
92
|
import { pathItems as authEmailResendVerification } from './auth/email/resendVerification.js';
|
|
@@ -126,12 +131,9 @@ import { pathItems as organizationsOrganizationId } from './organizations/organi
|
|
|
126
131
|
import { pathItems as organizations } from './organizations.js';
|
|
127
132
|
import { pathItems as ssl } from './ssl.js';
|
|
128
133
|
import { pathItems as timezones } from './timezones.js';
|
|
129
|
-
import { pathItems as
|
|
130
|
-
import { pathItems as
|
|
131
|
-
import { pathItems as
|
|
132
|
-
import { pathItems as trainingsTrainingIdUsers } from './trainings/trainingId/users.js';
|
|
133
|
-
import { pathItems as trainingsTrainingId } from './trainings/trainingId.js';
|
|
134
|
-
import { pathItems as trainings } from './trainings.js';
|
|
134
|
+
import { pathItems as completedTrainings } from './trainings/completedTrainings.js';
|
|
135
|
+
import { pathItems as completeTraining } from './trainings/completeTraining.js';
|
|
136
|
+
import { pathItems as trainingIds } from './trainings/trainingIds.js';
|
|
135
137
|
import { pathItems as usersCurrentAppsAccounts } from './users/current/apps/accounts.js';
|
|
136
138
|
import { pathItems as usersCurrentAppsAppIdAccount } from './users/current/apps/appId/account.js';
|
|
137
139
|
import { pathItems as usersCurrentApps } from './users/current/apps.js';
|
|
@@ -194,6 +196,7 @@ export const paths = {
|
|
|
194
196
|
'/api/apps/{appId}/resources/{resourceType}/subscriptions': appsAppIdResourcesResourceTypeSubscriptions,
|
|
195
197
|
'/api/apps/{appId}/resources/{resourceType}': appsAppIdResourcesResourceType,
|
|
196
198
|
'/api/apps/{appId}/resources/{resourceType}/{resourceId}/versions': appsAppIdResourcesResourceTypeResourceIdVersions,
|
|
199
|
+
'/api/apps/{appId}/resources/{resourceType}/{resourceId}/positions': appsAppIdResourcesResourceTypeResourceIdPositioning,
|
|
197
200
|
'/api/apps/{appId}/resources': appsAppIdResources,
|
|
198
201
|
'/api/apps/{appId}/saml/{appSamlSecretId}/acs': appsAppIdSamlSecretIdAcs,
|
|
199
202
|
'/api/apps/{appId}/saml/{appSamlSecretId}/authn': appsAppIdSamlSecretIdAuthn,
|
|
@@ -216,6 +219,8 @@ export const paths = {
|
|
|
216
219
|
'/api/apps/{appId}/secrets/service/{serviceSecretId}': appsAppIdSecretsServiceSecretId,
|
|
217
220
|
'/api/apps/{appId}/secrets/service': appsAppIdSecretsService,
|
|
218
221
|
'/api/apps/{appId}/secrets/ssl': appsAppIdSecretsSsl,
|
|
222
|
+
'/api/apps/{appId}/secrets/webhook/{webhookSecretId}': appsAppIdSecretsWebhookSecretId,
|
|
223
|
+
'/api/apps/{appId}/secrets/webhook': appsAppIdSecretsWebhook,
|
|
219
224
|
'/api/apps/{appId}/snapshots/{snapshotId}': appsAppIdSnapshotsSnapshotId,
|
|
220
225
|
'/api/apps/{appId}/snapshots': appsAppIdSnapshots,
|
|
221
226
|
'/api/apps/{appId}/style/block/@{organizationId}/{blockId}': appsAppIdStyleBlockOrganizationIdBLockId,
|
|
@@ -224,6 +229,7 @@ export const paths = {
|
|
|
224
229
|
'/api/apps/{appId}/subscriptions': appsAppIdSubscriptions,
|
|
225
230
|
'/api/apps/{appId}/variables/{appVariableId}': appsAppIdVariablesAppVariableId,
|
|
226
231
|
'/api/apps/{appId}/variables': appsAppIdVariables,
|
|
232
|
+
'/api/apps/{appId}/webhooks/{webhookName}': appsAppIdWebhooksWebhookName,
|
|
227
233
|
'/api/apps/{appId}': appsAppId,
|
|
228
234
|
'/api/apps/{appId}/auth/email/login': appsAppIdAuthEmailLogin,
|
|
229
235
|
'/api/apps/{appId}/auth/email/register': appsAppIdAuthEmailRegister,
|
|
@@ -236,6 +242,7 @@ export const paths = {
|
|
|
236
242
|
'/api/auth/email/login': authEmailLogin,
|
|
237
243
|
'/api/auth/email/register': authEmailRegister,
|
|
238
244
|
'/api/auth/email/reset-password': authEmailResetPassword,
|
|
245
|
+
'/api/auth/email/patch-password': authEmailPatchPassword,
|
|
239
246
|
'/api/auth/email/resend-verification': authEmailResendVerification,
|
|
240
247
|
'/api/auth/email/request-password-reset': authEmailRequestPasswordReset,
|
|
241
248
|
'/api/auth/email/verify': authEmailVerify,
|
|
@@ -278,12 +285,9 @@ export const paths = {
|
|
|
278
285
|
'/api/groups/{groupId}/members': groupsGroupIdMembers,
|
|
279
286
|
'/api/groups/{groupId}': groupsGroupId,
|
|
280
287
|
'/api/timezones': timezones,
|
|
281
|
-
'/api/
|
|
282
|
-
'/api/trainings/{trainingId}
|
|
283
|
-
'/api/trainings
|
|
284
|
-
'/api/trainings/{trainingId}/users': trainingsTrainingIdUsers,
|
|
285
|
-
'/api/trainings/{trainingId}': trainingsTrainingId,
|
|
286
|
-
'/api/trainings': trainings,
|
|
288
|
+
'/api/trainings/completed': completedTrainings,
|
|
289
|
+
'/api/trainings/completed/{trainingId}': completeTraining,
|
|
290
|
+
'/api/trainings': trainingIds,
|
|
287
291
|
'/api/users/current/apps/accounts': usersCurrentAppsAccounts,
|
|
288
292
|
'/api/users/current/apps/{appId}/account': usersCurrentAppsAppIdAccount,
|
|
289
293
|
'/api/users/current/apps': usersCurrentApps,
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export const pathItems = {
|
|
2
|
+
post: {
|
|
3
|
+
description: 'Sets the status of this training to "completed" for this user',
|
|
4
|
+
operationId: 'completeTraining',
|
|
5
|
+
parameters: [
|
|
6
|
+
{
|
|
7
|
+
in: 'path',
|
|
8
|
+
name: 'trainingId',
|
|
9
|
+
schema: { type: 'string' },
|
|
10
|
+
required: true,
|
|
11
|
+
description: 'The ID of the training to complete',
|
|
12
|
+
},
|
|
13
|
+
],
|
|
14
|
+
responses: { 201: { description: 'Training successfully set to "completed"' } },
|
|
15
|
+
security: [{ studio: [] }],
|
|
16
|
+
},
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=completeTraining.js.map
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export const pathItems = {
|
|
2
|
+
get: {
|
|
3
|
+
description: 'Fetch all completed trainings',
|
|
4
|
+
operationId: 'getCompletedTrainings',
|
|
5
|
+
responses: {
|
|
6
|
+
200: {
|
|
7
|
+
description: 'An array of training IDs that the user has completed',
|
|
8
|
+
content: {
|
|
9
|
+
'application/json': {
|
|
10
|
+
schema: {
|
|
11
|
+
type: 'array',
|
|
12
|
+
items: { type: 'string' },
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
security: [{ studio: [] }],
|
|
19
|
+
},
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=completedTrainings.js.map
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export const pathItems = {
|
|
2
|
+
get: {
|
|
3
|
+
description: 'Fetch all training ids stored on the server',
|
|
4
|
+
operationId: 'getTrainingIds',
|
|
5
|
+
responses: {
|
|
6
|
+
200: {
|
|
7
|
+
description: "An array of all training Id's",
|
|
8
|
+
content: {
|
|
9
|
+
'application/json': {
|
|
10
|
+
schema: {
|
|
11
|
+
type: 'array',
|
|
12
|
+
items: { type: 'string' },
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=trainingIds.js.map
|
package/api/tags/index.js
CHANGED
|
@@ -147,10 +147,6 @@ export const tags = [
|
|
|
147
147
|
name: 'training',
|
|
148
148
|
description: 'Operations related to trainings',
|
|
149
149
|
},
|
|
150
|
-
{
|
|
151
|
-
name: 'training-block',
|
|
152
|
-
description: 'Operations related to training blocks.',
|
|
153
|
-
},
|
|
154
150
|
{
|
|
155
151
|
name: 'translation',
|
|
156
152
|
description: 'Operations related to translations',
|
|
@@ -167,5 +163,9 @@ export const tags = [
|
|
|
167
163
|
name: 'version',
|
|
168
164
|
description: 'Operations related to versions.',
|
|
169
165
|
},
|
|
166
|
+
{
|
|
167
|
+
name: 'webhook',
|
|
168
|
+
description: 'Operations related to webhooks.',
|
|
169
|
+
},
|
|
170
170
|
];
|
|
171
171
|
//# sourceMappingURL=index.js.map
|
package/appMessages.js
CHANGED
|
@@ -38,7 +38,7 @@ export function extractAppMessages(app, onBlock) {
|
|
|
38
38
|
const messages = {
|
|
39
39
|
app: {
|
|
40
40
|
name: app.name,
|
|
41
|
-
description: app.description,
|
|
41
|
+
description: app.description ?? '',
|
|
42
42
|
...Object.fromEntries(Object.entries(app.security?.roles ?? {}).flatMap(([role, roleDefinition]) => [
|
|
43
43
|
[`app.roles.${role}`, role],
|
|
44
44
|
[`app.roles.${role}.description`, roleDefinition.description],
|
package/assets.js
CHANGED
|
@@ -43,7 +43,7 @@ export function getMimeTypeCategory(mimeType) {
|
|
|
43
43
|
return category;
|
|
44
44
|
}
|
|
45
45
|
export function getMimeTypeCategories(mimeTypes) {
|
|
46
|
-
return Array.from(new Set(mimeTypes.map(getMimeTypeCategory).filter(
|
|
46
|
+
return Array.from(new Set(mimeTypes.map(getMimeTypeCategory).filter((cat) => cat != null)));
|
|
47
47
|
}
|
|
48
48
|
export function getMimeTypeIcon(category) {
|
|
49
49
|
switch (category) {
|
package/authorization.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ export declare function getAppInheritedRoles(appSecurityDefinition: Security, ro
|
|
|
3
3
|
export declare function getAppRolePermissions(appSecurityDefinition: Security, roles: AppRole[]): CustomAppPermission[];
|
|
4
4
|
export declare function getGuestAppPermissions(appSecurityDefinition: Security): CustomAppPermission[];
|
|
5
5
|
export declare function checkGuestAppPermissions(appSecurityDefinition: Security, requiredPermissions: CustomAppPermission[]): boolean;
|
|
6
|
-
export declare function getAppRoles(appSecurityDefinition
|
|
6
|
+
export declare function getAppRoles(appSecurityDefinition?: Security): AppRole[];
|
|
7
7
|
export declare function getAppPossibleGuestPermissions(appDefinition: AppDefinition): CustomAppGuestPermission[];
|
|
8
8
|
export declare function getAppPossiblePermissions(appDefinition: AppDefinition): CustomAppPermission[];
|
|
9
9
|
export declare function getAppRolesByPermissions(appSecurityDefinition: Security, requiredPermissions: CustomAppPermission[]): (AppRole | 'Guest')[];
|
package/authorization.js
CHANGED
|
@@ -66,7 +66,7 @@ export function getGuestAppPermissions(appSecurityDefinition) {
|
|
|
66
66
|
}
|
|
67
67
|
return [
|
|
68
68
|
...(appSecurityDefinition.guest.permissions || []),
|
|
69
|
-
...getAppRolePermissions(appSecurityDefinition, appSecurityDefinition.guest.inherits),
|
|
69
|
+
...getAppRolePermissions(appSecurityDefinition, appSecurityDefinition.guest.inherits ?? []),
|
|
70
70
|
];
|
|
71
71
|
}
|
|
72
72
|
export function checkGuestAppPermissions(appSecurityDefinition, requiredPermissions) {
|
package/blockUtils.d.ts
CHANGED
|
@@ -20,7 +20,7 @@ export declare function stripBlockName(name: string): string;
|
|
|
20
20
|
* @param name The block name to parse.
|
|
21
21
|
* @returns A tuple containing the organization id and block id.
|
|
22
22
|
*/
|
|
23
|
-
export declare function parseBlockName(name: string): [string, string];
|
|
23
|
+
export declare function parseBlockName(name: string): [string, string] | undefined;
|
|
24
24
|
/**
|
|
25
25
|
* Find unique block types in an app.
|
|
26
26
|
*
|
package/blockUtils.js
CHANGED
|
@@ -32,6 +32,7 @@ export function stripBlockName(name) {
|
|
|
32
32
|
* @returns A tuple containing the organization id and block id.
|
|
33
33
|
*/
|
|
34
34
|
export function parseBlockName(name) {
|
|
35
|
+
// TODO: should this not throw an error? Most call sites are not well-prepared for undefined.
|
|
35
36
|
const match = blockNamePattern.exec(normalizeBlockName(name));
|
|
36
37
|
if (match) {
|
|
37
38
|
return match.slice(1, 3);
|
package/convertToCsv.js
CHANGED
|
@@ -23,6 +23,8 @@ export function convertToCsv(body) {
|
|
|
23
23
|
}
|
|
24
24
|
const data = Array.isArray(body) ? body : [body];
|
|
25
25
|
if (data.length === 0) {
|
|
26
|
+
// eslint-disable-next-line @typescript-eslint/prefer-ts-expect-error
|
|
27
|
+
// @ts-ignore 2322 null is not assignable to type (strictNullChecks)
|
|
26
28
|
return null;
|
|
27
29
|
}
|
|
28
30
|
const headers = [...new Set(data.flatMap((value) => Object.keys(value)))].sort(compareStrings);
|