@appsemble/utils 0.20.45 → 0.21.1
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/api/components/schemas/ObjectRemapperDefinition.js +6 -504
- package/api/components/schemas/RequestActionDefinition.js +1 -1
- package/api/components/schemas/ScimPatchOp.d.ts +2 -0
- package/api/components/schemas/ScimPatchOp.js +47 -0
- package/api/components/schemas/ScimSecret.d.ts +2 -0
- package/api/components/schemas/ScimSecret.js +16 -0
- package/api/components/schemas/ScimUser.d.ts +2 -0
- package/api/components/schemas/ScimUser.js +60 -0
- package/api/components/schemas/index.d.ts +3 -0
- package/api/components/schemas/index.js +3 -0
- package/api/components/securitySchemes/index.d.ts +1 -0
- package/api/components/securitySchemes/index.js +1 -0
- package/api/components/securitySchemes/scim.d.ts +2 -0
- package/api/components/securitySchemes/scim.js +6 -0
- package/api/index.test.js +1 -1
- package/api/paths/appScimEndpoints.d.ts +2 -0
- package/api/paths/appScimEndpoints.js +260 -0
- package/api/paths/appScimSecrets.d.ts +2 -0
- package/api/paths/appScimSecrets.js +45 -0
- package/api/paths/index.js +4 -0
- package/appMessages.test.js +1 -1
- package/convertToCsv.js +1 -1
- package/iterApp.test.js +44 -48
- package/jsonschema.test.js +8 -8
- package/normalize.js +2 -2
- package/package.json +4 -4
- package/pem.js +3 -3
- package/reference-schemas/remappers/arrays.d.ts +2 -0
- package/reference-schemas/remappers/arrays.js +334 -0
- package/reference-schemas/remappers/conditionals.d.ts +2 -0
- package/reference-schemas/remappers/conditionals.js +93 -0
- package/reference-schemas/remappers/data.d.ts +2 -0
- package/reference-schemas/remappers/data.js +321 -0
- package/reference-schemas/remappers/dates.d.ts +2 -0
- package/reference-schemas/remappers/dates.js +38 -0
- package/reference-schemas/remappers/history.d.ts +2 -0
- package/reference-schemas/remappers/history.js +246 -0
- package/reference-schemas/remappers/index.d.ts +9 -0
- package/reference-schemas/remappers/index.js +10 -0
- package/reference-schemas/remappers/objects.d.ts +2 -0
- package/reference-schemas/remappers/objects.js +157 -0
- package/reference-schemas/remappers/randoms.d.ts +2 -0
- package/reference-schemas/remappers/randoms.js +35 -0
- package/reference-schemas/remappers/strings.d.ts +2 -0
- package/reference-schemas/remappers/strings.js +81 -0
- package/reference-schemas/remappers/unsorted.d.ts +2 -0
- package/reference-schemas/remappers/unsorted.js +71 -0
- package/remap.js +1 -1
- package/remap.test.js +8 -9
- package/string.js +2 -2
- package/vitest.config.d.ts +2 -0
package/README.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
#  Appsemble Utilities
|
|
2
2
|
|
|
3
3
|
> Internal utility functions used across multiple Appsemble projects.
|
|
4
4
|
|
|
5
5
|
[](https://www.npmjs.com/package/@appsemble/utils)
|
|
6
|
-
[](https://gitlab.com/appsemble/appsemble/-/releases/0.21.1)
|
|
7
7
|
[](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.
|
|
29
|
+
[LGPL-3.0-only](https://gitlab.com/appsemble/appsemble/-/blob/0.21.1/LICENSE.md) ©
|
|
30
30
|
[Appsemble](https://appsemble.com)
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
import * as remapperSchemas from '../../../reference-schemas/remappers/index.js';
|
|
2
|
+
const remapperList = {};
|
|
3
|
+
for (const section of Object.values(remapperSchemas)) {
|
|
4
|
+
Object.assign(remapperList, section);
|
|
5
|
+
}
|
|
1
6
|
export const ObjectRemapperDefinition = {
|
|
2
7
|
type: 'object',
|
|
3
8
|
description: `An object based remapper is defined by a specific implementation
|
|
@@ -7,509 +12,6 @@ Object based remappers may only define 1 key. The allowed value depends on the r
|
|
|
7
12
|
minProperties: 1,
|
|
8
13
|
maxProperties: 1,
|
|
9
14
|
additionalProperties: false,
|
|
10
|
-
properties:
|
|
11
|
-
app: {
|
|
12
|
-
enum: ['id', 'locale', 'url'],
|
|
13
|
-
description: `Get app metadata.
|
|
14
|
-
|
|
15
|
-
Supported properties:
|
|
16
|
-
|
|
17
|
-
- \`id\`: Get the app id.
|
|
18
|
-
- \`locale\`: Get the current locale of the app.
|
|
19
|
-
- \`url\`: Get the base URL of the app.
|
|
20
|
-
`,
|
|
21
|
-
},
|
|
22
|
-
array: {
|
|
23
|
-
enum: ['index', 'length'],
|
|
24
|
-
description: `Get the current array.map’s index or length.
|
|
25
|
-
|
|
26
|
-
Returns nothing when not in the context of \`array.map’s\`.
|
|
27
|
-
`,
|
|
28
|
-
},
|
|
29
|
-
'array.map': {
|
|
30
|
-
$ref: '#/components/schemas/RemapperDefinition',
|
|
31
|
-
description: `Build an array based on the given data and remappers.
|
|
32
|
-
|
|
33
|
-
The remappers gets applied to each item in the array.
|
|
34
|
-
|
|
35
|
-
Always returns an array, can be empty if supplied data isn’t an array.
|
|
36
|
-
`,
|
|
37
|
-
},
|
|
38
|
-
'array.unique': {
|
|
39
|
-
$ref: '#/components/schemas/RemapperDefinition',
|
|
40
|
-
description: `Filters out unique entries from an array.
|
|
41
|
-
|
|
42
|
-
The value Remapper is applied to each entry in the array,
|
|
43
|
-
using its result to determine uniqueness.
|
|
44
|
-
|
|
45
|
-
If the value Remapper result in \`undefined\` or \`null\`, the entire entry is used for uniqueness.
|
|
46
|
-
|
|
47
|
-
If the input is not an array, the input is returned without any modifications.`,
|
|
48
|
-
},
|
|
49
|
-
'array.from': {
|
|
50
|
-
type: 'array',
|
|
51
|
-
items: {
|
|
52
|
-
$ref: '#/components/schemas/RemapperDefinition',
|
|
53
|
-
},
|
|
54
|
-
description: 'Create a new array with an array of predefined remappers.',
|
|
55
|
-
},
|
|
56
|
-
'array.append': {
|
|
57
|
-
type: 'array',
|
|
58
|
-
items: {
|
|
59
|
-
$ref: '#/components/schemas/RemapperDefinition',
|
|
60
|
-
},
|
|
61
|
-
description: `Append new values to the end of an array.
|
|
62
|
-
|
|
63
|
-
If the input is not an array an empty array is returned.`,
|
|
64
|
-
},
|
|
65
|
-
'array.omit': {
|
|
66
|
-
type: 'array',
|
|
67
|
-
items: {
|
|
68
|
-
$ref: '#/components/schemas/RemapperDefinition',
|
|
69
|
-
},
|
|
70
|
-
description: `Remove item(s) from an array given a predefined array of remappable indices.
|
|
71
|
-
|
|
72
|
-
Only the remapped values that are turned into numbers are applied.
|
|
73
|
-
|
|
74
|
-
If the input is not an array an empty array is returned.`,
|
|
75
|
-
},
|
|
76
|
-
context: {
|
|
77
|
-
type: 'string',
|
|
78
|
-
description: 'Get a property from the context.',
|
|
79
|
-
},
|
|
80
|
-
'date.add': {
|
|
81
|
-
type: 'string',
|
|
82
|
-
description: 'Add the specified value to a given date.',
|
|
83
|
-
},
|
|
84
|
-
'date.format': {
|
|
85
|
-
enum: [null],
|
|
86
|
-
description: 'Format a date according to rfc3339.',
|
|
87
|
-
},
|
|
88
|
-
'date.now': {
|
|
89
|
-
enum: [null],
|
|
90
|
-
description: 'Returns the current date.',
|
|
91
|
-
},
|
|
92
|
-
'date.parse': {
|
|
93
|
-
type: 'string',
|
|
94
|
-
description: `Convert a string to a date using a given format.
|
|
95
|
-
|
|
96
|
-
For example:
|
|
97
|
-
\`\`\`yaml
|
|
98
|
-
- static: 02/11/2014 # The date string to parse
|
|
99
|
-
- date.parse: MM/dd/yyyy # The given format to parse the date with
|
|
100
|
-
# => Tue Feb 11 2014 00:00:00
|
|
101
|
-
\`\`\`
|
|
102
|
-
|
|
103
|
-
See [date-fns](https://date-fns.org/v2.29.3/docs/parse) for the supported formats.
|
|
104
|
-
|
|
105
|
-
Leaving the format empty will try to parse the date using the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
|
|
106
|
-
For example:
|
|
107
|
-
\`\`\`yaml
|
|
108
|
-
date.parse:
|
|
109
|
-
- static: 2014-02-11T11:30:30 # The date string to parse
|
|
110
|
-
- date.parse: '' # The given format to parse the date with
|
|
111
|
-
# => Tue Feb 11 2014 11:30:30
|
|
112
|
-
\`\`\`
|
|
113
|
-
|
|
114
|
-
`,
|
|
115
|
-
},
|
|
116
|
-
equals: {
|
|
117
|
-
type: 'array',
|
|
118
|
-
items: {
|
|
119
|
-
$ref: '#/components/schemas/RemapperDefinition',
|
|
120
|
-
},
|
|
121
|
-
description: `Compare all computed remapper values against each other.
|
|
122
|
-
|
|
123
|
-
Returns \`true\` if all entries are equal, otherwise \`false\`.
|
|
124
|
-
`,
|
|
125
|
-
},
|
|
126
|
-
not: {
|
|
127
|
-
type: 'array',
|
|
128
|
-
items: {
|
|
129
|
-
$ref: '#/components/schemas/RemapperDefinition',
|
|
130
|
-
},
|
|
131
|
-
description: `Compare all computed remapper values against the first.
|
|
132
|
-
|
|
133
|
-
Returns \`false\` if all entries are equal to the first entry, otherwise \`true\`.
|
|
134
|
-
|
|
135
|
-
If only one remapper or none is passed, the remapper value gets computed and then inverted.
|
|
136
|
-
`,
|
|
137
|
-
},
|
|
138
|
-
step: {
|
|
139
|
-
type: 'string',
|
|
140
|
-
description: 'Get flow page step current data',
|
|
141
|
-
},
|
|
142
|
-
gt: {
|
|
143
|
-
type: 'array',
|
|
144
|
-
description: `Compare the first computed remapper value with the second computed remapper value.
|
|
145
|
-
|
|
146
|
-
Returns \`true\` if the first entry is greater than the second entry.`,
|
|
147
|
-
minItems: 2,
|
|
148
|
-
maxItems: 2,
|
|
149
|
-
items: {
|
|
150
|
-
$ref: '#/components/schemas/RemapperDefinition',
|
|
151
|
-
},
|
|
152
|
-
},
|
|
153
|
-
ics: {
|
|
154
|
-
type: 'object',
|
|
155
|
-
description: 'Create a calendar event',
|
|
156
|
-
additionalProperties: false,
|
|
157
|
-
required: ['start', 'title'],
|
|
158
|
-
properties: {
|
|
159
|
-
start: {
|
|
160
|
-
$ref: '#/components/schemas/RemapperDefinition',
|
|
161
|
-
description: 'The start of the icalendar event.',
|
|
162
|
-
},
|
|
163
|
-
end: {
|
|
164
|
-
$ref: '#/components/schemas/RemapperDefinition',
|
|
165
|
-
description: 'The end of the icalendar event.',
|
|
166
|
-
},
|
|
167
|
-
duration: {
|
|
168
|
-
$ref: '#/components/schemas/RemapperDefinition',
|
|
169
|
-
description: 'The duration of the event.',
|
|
170
|
-
example: '1w 3d 10h 30m',
|
|
171
|
-
},
|
|
172
|
-
title: {
|
|
173
|
-
$ref: '#/components/schemas/RemapperDefinition',
|
|
174
|
-
description: 'The title of the event.',
|
|
175
|
-
},
|
|
176
|
-
description: {
|
|
177
|
-
$ref: '#/components/schemas/RemapperDefinition',
|
|
178
|
-
description: 'An optional description of the event.',
|
|
179
|
-
},
|
|
180
|
-
url: {
|
|
181
|
-
$ref: '#/components/schemas/RemapperDefinition',
|
|
182
|
-
description: 'An optional link to attach to the event.',
|
|
183
|
-
},
|
|
184
|
-
location: {
|
|
185
|
-
$ref: '#/components/schemas/RemapperDefinition',
|
|
186
|
-
description: 'An optional location description to attach to the event.',
|
|
187
|
-
},
|
|
188
|
-
coordinates: {
|
|
189
|
-
$ref: '#/components/schemas/RemapperDefinition',
|
|
190
|
-
description: `An optional geolocation description to attach to the event.
|
|
191
|
-
|
|
192
|
-
This must be an object with the properties \`lat\` or \`latitude\`, and \`lon\`, \`lng\` or \`longitude\`.`,
|
|
193
|
-
},
|
|
194
|
-
},
|
|
195
|
-
},
|
|
196
|
-
if: {
|
|
197
|
-
type: 'object',
|
|
198
|
-
description: `Check if condition results in a truthy value.
|
|
199
|
-
|
|
200
|
-
Returns value of then if condition is truthy, otherwise it returns the value of else.
|
|
201
|
-
`,
|
|
202
|
-
additionalProperties: false,
|
|
203
|
-
required: ['condition', 'then', 'else'],
|
|
204
|
-
properties: {
|
|
205
|
-
condition: {
|
|
206
|
-
$ref: '#/components/schemas/RemapperDefinition',
|
|
207
|
-
description: 'The condition to check.',
|
|
208
|
-
},
|
|
209
|
-
then: {
|
|
210
|
-
$ref: '#/components/schemas/RemapperDefinition',
|
|
211
|
-
description: 'This remapper is used if the condition returns true.',
|
|
212
|
-
},
|
|
213
|
-
else: {
|
|
214
|
-
$ref: '#/components/schemas/RemapperDefinition',
|
|
215
|
-
description: 'This remapper is used if the condition returns false.',
|
|
216
|
-
},
|
|
217
|
-
},
|
|
218
|
-
},
|
|
219
|
-
match: {
|
|
220
|
-
type: 'array',
|
|
221
|
-
description: `Check if any case results in a truthy value.
|
|
222
|
-
|
|
223
|
-
Returns the value of the first case where the condition equals true, otherwise returns null.
|
|
224
|
-
`,
|
|
225
|
-
items: {
|
|
226
|
-
type: 'object',
|
|
227
|
-
additionalProperties: false,
|
|
228
|
-
required: ['case', 'value'],
|
|
229
|
-
description: '',
|
|
230
|
-
properties: {
|
|
231
|
-
case: {
|
|
232
|
-
$ref: '#/components/schemas/RemapperDefinition',
|
|
233
|
-
description: 'The condition to check.',
|
|
234
|
-
},
|
|
235
|
-
value: {
|
|
236
|
-
$ref: '#/components/schemas/RemapperDefinition',
|
|
237
|
-
description: 'This remapper is used if the case is true',
|
|
238
|
-
},
|
|
239
|
-
},
|
|
240
|
-
},
|
|
241
|
-
},
|
|
242
|
-
lt: {
|
|
243
|
-
type: 'array',
|
|
244
|
-
description: `Compare the first computed remapper value with the second computed remapper value.
|
|
245
|
-
|
|
246
|
-
Returns \`true\` if the first entry is lesser than the second entry.`,
|
|
247
|
-
minItems: 2,
|
|
248
|
-
maxItems: 2,
|
|
249
|
-
items: {
|
|
250
|
-
$ref: '#/components/schemas/RemapperDefinition',
|
|
251
|
-
},
|
|
252
|
-
},
|
|
253
|
-
log: {
|
|
254
|
-
enum: ['info', 'warn', 'error'],
|
|
255
|
-
description: `Logs its input data (returns it) and its context.
|
|
256
|
-
|
|
257
|
-
The value to set is the log level.`,
|
|
258
|
-
},
|
|
259
|
-
'null.strip': {
|
|
260
|
-
description: 'Strip all null, undefined, and empty array values from an object.',
|
|
261
|
-
anyOf: [
|
|
262
|
-
{ enum: [null] },
|
|
263
|
-
{
|
|
264
|
-
type: 'object',
|
|
265
|
-
required: ['depth'],
|
|
266
|
-
additionalProperties: false,
|
|
267
|
-
description: 'Options for the null.strip remapper.',
|
|
268
|
-
properties: {
|
|
269
|
-
depth: {
|
|
270
|
-
type: 'integer',
|
|
271
|
-
minimum: 1,
|
|
272
|
-
description: 'How deep to recurse into objects and arrays to remove null values.',
|
|
273
|
-
},
|
|
274
|
-
},
|
|
275
|
-
},
|
|
276
|
-
],
|
|
277
|
-
},
|
|
278
|
-
'object.assign': {
|
|
279
|
-
description: 'Assign properties to an existing object given some predefined mapper keys.',
|
|
280
|
-
additionalProperties: {
|
|
281
|
-
$ref: '#/components/schemas/RemapperDefinition',
|
|
282
|
-
},
|
|
283
|
-
},
|
|
284
|
-
'object.from': {
|
|
285
|
-
description: 'Create a new object given some predefined mapper keys.',
|
|
286
|
-
additionalProperties: {
|
|
287
|
-
$ref: '#/components/schemas/RemapperDefinition',
|
|
288
|
-
},
|
|
289
|
-
},
|
|
290
|
-
'object.omit': {
|
|
291
|
-
description: `Remove properties from an existing object based on the given the object keys.
|
|
292
|
-
|
|
293
|
-
Nested properties can be removed using arrays of keys.
|
|
294
|
-
|
|
295
|
-
For example:
|
|
296
|
-
\`\`\`yaml
|
|
297
|
-
object.omit:
|
|
298
|
-
- foo # Removes the property foo
|
|
299
|
-
- - bar # Removes the property baz inside of bar
|
|
300
|
-
- baz
|
|
301
|
-
\`\`\`
|
|
302
|
-
`,
|
|
303
|
-
type: 'array',
|
|
304
|
-
items: {
|
|
305
|
-
minItems: 1,
|
|
306
|
-
anyOf: [
|
|
307
|
-
{ type: 'string' },
|
|
308
|
-
{
|
|
309
|
-
type: 'array',
|
|
310
|
-
minItems: 2,
|
|
311
|
-
items: {
|
|
312
|
-
type: 'string',
|
|
313
|
-
},
|
|
314
|
-
},
|
|
315
|
-
],
|
|
316
|
-
},
|
|
317
|
-
},
|
|
318
|
-
page: {
|
|
319
|
-
enum: ['data', 'url'],
|
|
320
|
-
description: `Get page metadata.
|
|
321
|
-
|
|
322
|
-
Supported properties:
|
|
323
|
-
|
|
324
|
-
- \`data\`: Get the current page data.
|
|
325
|
-
- \`url\`: Get the URL of the current page.
|
|
326
|
-
`,
|
|
327
|
-
},
|
|
328
|
-
prop: {
|
|
329
|
-
anyOf: [
|
|
330
|
-
{ type: 'string' },
|
|
331
|
-
{ type: 'integer' },
|
|
332
|
-
{ type: 'array', minItems: 1, items: { anyOf: [{ type: 'string' }, { type: 'integer' }] } },
|
|
333
|
-
],
|
|
334
|
-
description: 'Get a property from an object.',
|
|
335
|
-
},
|
|
336
|
-
'random.choice': {
|
|
337
|
-
enum: [null],
|
|
338
|
-
description: 'Pick and return a random entry from an array. If the input is not an array, the input is returned as-is.',
|
|
339
|
-
},
|
|
340
|
-
'random.integer': {
|
|
341
|
-
type: 'array',
|
|
342
|
-
maxItems: 2,
|
|
343
|
-
minItems: 2,
|
|
344
|
-
items: {
|
|
345
|
-
type: 'integer',
|
|
346
|
-
},
|
|
347
|
-
description: 'Pick and return a random integer between the provided lowest and highest values.',
|
|
348
|
-
},
|
|
349
|
-
'random.float': {
|
|
350
|
-
type: 'array',
|
|
351
|
-
maxItems: 2,
|
|
352
|
-
minItems: 2,
|
|
353
|
-
items: {
|
|
354
|
-
type: 'number',
|
|
355
|
-
},
|
|
356
|
-
description: 'Pick and return a random number between the provided lowest and highest values.',
|
|
357
|
-
},
|
|
358
|
-
'random.string': {
|
|
359
|
-
type: 'object',
|
|
360
|
-
required: ['choice', 'length'],
|
|
361
|
-
additionalProperties: false,
|
|
362
|
-
properties: {
|
|
363
|
-
choice: { type: 'string', minLength: 1 },
|
|
364
|
-
length: { type: 'integer', minimum: 1 },
|
|
365
|
-
},
|
|
366
|
-
description: 'Pick and return a random string from a given length using characters from a given input string.',
|
|
367
|
-
},
|
|
368
|
-
root: {
|
|
369
|
-
enum: [null],
|
|
370
|
-
description: 'Get the input data as it was initially passed to the remap function.',
|
|
371
|
-
},
|
|
372
|
-
history: {
|
|
373
|
-
type: 'integer',
|
|
374
|
-
description: `Get the data at a certain index from the history stack prior to an action.
|
|
375
|
-
|
|
376
|
-
0 is the index of the first item in the history stack.`,
|
|
377
|
-
},
|
|
378
|
-
'from.history': {
|
|
379
|
-
type: 'object',
|
|
380
|
-
required: ['index', 'props'],
|
|
381
|
-
description: 'Create a new object with properties from the history stack at a certain index.',
|
|
382
|
-
additionalProperties: false,
|
|
383
|
-
properties: {
|
|
384
|
-
index: {
|
|
385
|
-
type: 'integer',
|
|
386
|
-
description: `The index of the history stack item to assign.
|
|
387
|
-
|
|
388
|
-
0 is the index of the first item in the history stack.
|
|
389
|
-
`,
|
|
390
|
-
},
|
|
391
|
-
props: {
|
|
392
|
-
description: 'Predefined mapper keys to choose what properties to apply.',
|
|
393
|
-
additionalProperties: {
|
|
394
|
-
$ref: '#/components/schemas/RemapperDefinition',
|
|
395
|
-
},
|
|
396
|
-
},
|
|
397
|
-
},
|
|
398
|
-
},
|
|
399
|
-
'assign.history': {
|
|
400
|
-
type: 'object',
|
|
401
|
-
required: ['index', 'props'],
|
|
402
|
-
description: 'Assign properties from the history stack at a certain index to an existing object.',
|
|
403
|
-
additionalProperties: false,
|
|
404
|
-
properties: {
|
|
405
|
-
index: {
|
|
406
|
-
type: 'integer',
|
|
407
|
-
description: `The index of the history stack item to assign.
|
|
408
|
-
|
|
409
|
-
0 is the index of the first item in the history stack.
|
|
410
|
-
`,
|
|
411
|
-
},
|
|
412
|
-
props: {
|
|
413
|
-
description: 'Predefined mapper keys to choose what properties to assign.',
|
|
414
|
-
additionalProperties: {
|
|
415
|
-
$ref: '#/components/schemas/RemapperDefinition',
|
|
416
|
-
},
|
|
417
|
-
},
|
|
418
|
-
},
|
|
419
|
-
},
|
|
420
|
-
'omit.history': {
|
|
421
|
-
type: 'object',
|
|
422
|
-
required: ['index', 'keys'],
|
|
423
|
-
description: 'Assign properties from the history stack at a certain index and exclude the unwanted properties.',
|
|
424
|
-
additionalProperties: false,
|
|
425
|
-
properties: {
|
|
426
|
-
index: {
|
|
427
|
-
type: 'integer',
|
|
428
|
-
description: `The index of the history stack item to assign.
|
|
429
|
-
|
|
430
|
-
0 is the index of the first item in the history stack.
|
|
431
|
-
`,
|
|
432
|
-
},
|
|
433
|
-
keys: {
|
|
434
|
-
description: `Exclude properties from the history stack item, based on the given object keys.
|
|
435
|
-
|
|
436
|
-
Nested properties can be excluded using arrays of keys.
|
|
437
|
-
|
|
438
|
-
For example:
|
|
439
|
-
\`\`\`yaml
|
|
440
|
-
omit.history:
|
|
441
|
-
index: 0
|
|
442
|
-
keys:
|
|
443
|
-
- foo # Excludes the property foo
|
|
444
|
-
- - bar # Excludes the property baz inside of bar
|
|
445
|
-
- baz
|
|
446
|
-
\`\`\`
|
|
447
|
-
`,
|
|
448
|
-
type: 'array',
|
|
449
|
-
items: {
|
|
450
|
-
minItems: 1,
|
|
451
|
-
anyOf: [
|
|
452
|
-
{ type: 'string' },
|
|
453
|
-
{
|
|
454
|
-
type: 'array',
|
|
455
|
-
minItems: 2,
|
|
456
|
-
items: {
|
|
457
|
-
type: 'string',
|
|
458
|
-
},
|
|
459
|
-
},
|
|
460
|
-
],
|
|
461
|
-
},
|
|
462
|
-
},
|
|
463
|
-
},
|
|
464
|
-
},
|
|
465
|
-
static: {
|
|
466
|
-
description: 'Use a static value.',
|
|
467
|
-
},
|
|
468
|
-
'string.case': {
|
|
469
|
-
enum: ['lower', 'upper'],
|
|
470
|
-
description: 'Convert an input to lower or upper case.',
|
|
471
|
-
},
|
|
472
|
-
'string.format': {
|
|
473
|
-
type: 'object',
|
|
474
|
-
description: 'Format a string using remapped input variables.',
|
|
475
|
-
additionalProperties: false,
|
|
476
|
-
properties: {
|
|
477
|
-
messageId: {
|
|
478
|
-
type: 'string',
|
|
479
|
-
description: 'The message id pointing to the template string to format.',
|
|
480
|
-
},
|
|
481
|
-
template: {
|
|
482
|
-
type: 'string',
|
|
483
|
-
description: 'The template default string to format.',
|
|
484
|
-
},
|
|
485
|
-
values: {
|
|
486
|
-
description: 'A set of remappers to convert the input to usable values.',
|
|
487
|
-
additionalProperties: {
|
|
488
|
-
$ref: '#/components/schemas/RemapperDefinition',
|
|
489
|
-
},
|
|
490
|
-
},
|
|
491
|
-
},
|
|
492
|
-
},
|
|
493
|
-
'string.replace': {
|
|
494
|
-
type: 'object',
|
|
495
|
-
description: 'Match the content with the regex in the key, and replace it with its value.',
|
|
496
|
-
minProperties: 1,
|
|
497
|
-
maxProperties: 1,
|
|
498
|
-
additionalProperties: {
|
|
499
|
-
type: 'string',
|
|
500
|
-
},
|
|
501
|
-
},
|
|
502
|
-
translate: {
|
|
503
|
-
type: 'string',
|
|
504
|
-
description: `Translate using a messageID.
|
|
505
|
-
|
|
506
|
-
This does not support parameters, for more nuanced translations use \`string.format\`.
|
|
507
|
-
`,
|
|
508
|
-
},
|
|
509
|
-
user: {
|
|
510
|
-
enum: ['sub', 'name', 'email', 'email_verified', 'picture', 'profile', 'locale'],
|
|
511
|
-
description: 'Get a user property from the OpenID user info.',
|
|
512
|
-
},
|
|
513
|
-
},
|
|
15
|
+
properties: remapperList,
|
|
514
16
|
};
|
|
515
17
|
//# sourceMappingURL=ObjectRemapperDefinition.js.map
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
export const ScimPatchOp = {
|
|
2
|
+
type: 'object',
|
|
3
|
+
description: 'A SCIM patch operation',
|
|
4
|
+
required: ['schemas', 'operations'],
|
|
5
|
+
additionalProperties: true,
|
|
6
|
+
properties: {
|
|
7
|
+
schemas: {
|
|
8
|
+
type: 'array',
|
|
9
|
+
maxItems: 1,
|
|
10
|
+
minItems: 1,
|
|
11
|
+
items: {
|
|
12
|
+
enum: ['urn:ietf:params:scim:api:messages:2.0:PatchOp'],
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
operations: {
|
|
16
|
+
type: 'array',
|
|
17
|
+
description: 'Patch operations to apply to the resource',
|
|
18
|
+
items: {
|
|
19
|
+
anyOf: [
|
|
20
|
+
{
|
|
21
|
+
type: 'object',
|
|
22
|
+
description: 'A SCIM patch single replace operation',
|
|
23
|
+
additionalProperties: false,
|
|
24
|
+
required: ['op', 'path', 'value'],
|
|
25
|
+
properties: {
|
|
26
|
+
op: { enum: ['add', 'replace'] },
|
|
27
|
+
name: { type: 'string' },
|
|
28
|
+
path: { type: 'string' },
|
|
29
|
+
value: {},
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
type: 'object',
|
|
34
|
+
description: 'A SCIM patch bulk replace operation',
|
|
35
|
+
additionalProperties: false,
|
|
36
|
+
required: ['op', 'path'],
|
|
37
|
+
properties: {
|
|
38
|
+
op: { enum: ['remove'] },
|
|
39
|
+
path: { type: 'string' },
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
],
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
};
|
|
47
|
+
//# sourceMappingURL=ScimPatchOp.js.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export const ScimSecret = {
|
|
2
|
+
type: 'object',
|
|
3
|
+
additionalProperties: false,
|
|
4
|
+
description: 'An app’s SCIM configuration.',
|
|
5
|
+
properties: {
|
|
6
|
+
enabled: {
|
|
7
|
+
type: 'boolean',
|
|
8
|
+
description: 'Whether or not SCIM is enabled for the app.',
|
|
9
|
+
},
|
|
10
|
+
token: {
|
|
11
|
+
type: 'string',
|
|
12
|
+
description: 'The secret SCIM token',
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=ScimSecret.js.map
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
export const ScimUser = {
|
|
2
|
+
type: 'object',
|
|
3
|
+
additionalProperties: true,
|
|
4
|
+
description: 'The definition of a user according to the SCIM documentation.',
|
|
5
|
+
required: ['emails', 'schemas', 'userName'],
|
|
6
|
+
properties: {
|
|
7
|
+
schemas: {
|
|
8
|
+
type: 'array',
|
|
9
|
+
items: { type: 'string' },
|
|
10
|
+
},
|
|
11
|
+
userName: {
|
|
12
|
+
type: 'string',
|
|
13
|
+
description: 'A unique identifier for the user (generally maps to the Azure AD user principal name)',
|
|
14
|
+
},
|
|
15
|
+
active: {
|
|
16
|
+
type: 'boolean',
|
|
17
|
+
},
|
|
18
|
+
meta: {
|
|
19
|
+
type: 'object',
|
|
20
|
+
additionalProperties: false,
|
|
21
|
+
description: 'Read-only metadata maintained by the service provider',
|
|
22
|
+
properties: {
|
|
23
|
+
resourceType: {
|
|
24
|
+
type: 'string',
|
|
25
|
+
},
|
|
26
|
+
created: {
|
|
27
|
+
type: 'string',
|
|
28
|
+
},
|
|
29
|
+
lastModified: {
|
|
30
|
+
type: 'string',
|
|
31
|
+
},
|
|
32
|
+
location: {
|
|
33
|
+
type: 'string',
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
emails: {
|
|
38
|
+
type: 'array',
|
|
39
|
+
minLength: 1,
|
|
40
|
+
items: {
|
|
41
|
+
type: 'object',
|
|
42
|
+
additionalProperties: false,
|
|
43
|
+
description: "A user's email. By default, one of these should be of type 'work' and have 'primary' set to true. Value contains actual address",
|
|
44
|
+
required: ['primary', 'type', 'value'],
|
|
45
|
+
properties: {
|
|
46
|
+
primary: {
|
|
47
|
+
type: 'boolean',
|
|
48
|
+
},
|
|
49
|
+
type: {
|
|
50
|
+
type: 'string',
|
|
51
|
+
},
|
|
52
|
+
value: {
|
|
53
|
+
type: 'string',
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
};
|
|
60
|
+
//# sourceMappingURL=ScimUser.js.map
|