@shuffl/api-contracts 0.5.5 → 0.5.6
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/dist/index.d.ts +81 -13
- package/dist/management-operations.d.ts +1 -1
- package/dist/management-operations.js +9 -1
- package/dist/management.generated.d.ts +79 -13
- package/dist/management.generated.js +87 -1
- package/dist/permissions.d.ts +2 -0
- package/openapi.json +1020 -268
- package/package.json +1 -1
|
@@ -139,6 +139,7 @@ const credentials_api_createInput = z
|
|
|
139
139
|
z.literal('getStarted.intro'),
|
|
140
140
|
z.literal('getStarted.wizard'),
|
|
141
141
|
z.literal('groups.allAutomations'),
|
|
142
|
+
z.literal('groups.automationChoices'),
|
|
142
143
|
z.literal('groups.automations'),
|
|
143
144
|
z.literal('groups.directory'),
|
|
144
145
|
z.literal('groups.directoryGroup'),
|
|
@@ -2110,6 +2111,7 @@ const credentials_api_listOutput = z.strictObject({
|
|
|
2110
2111
|
z.literal('getStarted.intro'),
|
|
2111
2112
|
z.literal('getStarted.wizard'),
|
|
2112
2113
|
z.literal('groups.allAutomations'),
|
|
2114
|
+
z.literal('groups.automationChoices'),
|
|
2113
2115
|
z.literal('groups.automations'),
|
|
2114
2116
|
z.literal('groups.directory'),
|
|
2115
2117
|
z.literal('groups.directoryGroup'),
|
|
@@ -2542,6 +2544,7 @@ const credentials_api_listOutput = z.strictObject({
|
|
|
2542
2544
|
z.literal('getStarted.intro'),
|
|
2543
2545
|
z.literal('getStarted.wizard'),
|
|
2544
2546
|
z.literal('groups.allAutomations'),
|
|
2547
|
+
z.literal('groups.automationChoices'),
|
|
2545
2548
|
z.literal('groups.automations'),
|
|
2546
2549
|
z.literal('groups.directory'),
|
|
2547
2550
|
z.literal('groups.directoryGroup'),
|
|
@@ -5102,6 +5105,7 @@ const groups_allAutomationsOutput = z.strictObject({
|
|
|
5102
5105
|
])
|
|
5103
5106
|
.optional()
|
|
5104
5107
|
.optional(),
|
|
5108
|
+
badgeId: z.string().optional().optional(),
|
|
5105
5109
|
body: z.array(z.string()).optional().optional(),
|
|
5106
5110
|
channel: z
|
|
5107
5111
|
.union([
|
|
@@ -5113,11 +5117,15 @@ const groups_allAutomationsOutput = z.strictObject({
|
|
|
5113
5117
|
.optional(),
|
|
5114
5118
|
communityId: z.string().optional().optional(),
|
|
5115
5119
|
note: z.string().optional().optional(),
|
|
5120
|
+
personId: z.string().optional().optional(),
|
|
5116
5121
|
programId: z.string().optional().optional(),
|
|
5122
|
+
questionId: z.string().optional().optional(),
|
|
5117
5123
|
subject: z.string().optional().optional(),
|
|
5124
|
+
targetGroupId: z.string().optional().optional(),
|
|
5118
5125
|
}),
|
|
5119
5126
|
createdAt: z.iso.datetime({ offset: true }),
|
|
5120
5127
|
createdBy: z.union([z.null(), z.string()]),
|
|
5128
|
+
delayDays: z.number(),
|
|
5121
5129
|
group: z.strictObject({
|
|
5122
5130
|
id: z.string(),
|
|
5123
5131
|
kind: z.union([z.literal('dynamic'), z.literal('list')]),
|
|
@@ -5127,12 +5135,17 @@ const groups_allAutomationsOutput = z.strictObject({
|
|
|
5127
5135
|
groupId: z.string(),
|
|
5128
5136
|
id: z.string(),
|
|
5129
5137
|
kind: z.union([
|
|
5138
|
+
z.literal('add_to_group'),
|
|
5130
5139
|
z.literal('add_to_program'),
|
|
5140
|
+
z.literal('ask_pulse'),
|
|
5141
|
+
z.literal('give_badge'),
|
|
5131
5142
|
z.literal('invite_community'),
|
|
5143
|
+
z.literal('remove_from_group'),
|
|
5132
5144
|
z.literal('send_message'),
|
|
5133
5145
|
z.literal('start_playbook'),
|
|
5134
5146
|
z.literal('tell_hr'),
|
|
5135
5147
|
z.literal('tell_manager'),
|
|
5148
|
+
z.literal('tell_person'),
|
|
5136
5149
|
]),
|
|
5137
5150
|
lastRunAt: z.union([z.null(), z.iso.datetime({ offset: true })]),
|
|
5138
5151
|
runs: z.number(),
|
|
@@ -5147,6 +5160,7 @@ const groups_allAutomationsOutput = z.strictObject({
|
|
|
5147
5160
|
]),
|
|
5148
5161
|
trigger: z.union([z.literal('entered'), z.literal('left')]),
|
|
5149
5162
|
updatedAt: z.iso.datetime({ offset: true }),
|
|
5163
|
+
when: z.string(),
|
|
5150
5164
|
})),
|
|
5151
5165
|
playbookStarts: z.array(z.strictObject({
|
|
5152
5166
|
group: z.union([
|
|
@@ -5186,22 +5200,29 @@ const groups_allAutomationsOutput = z.strictObject({
|
|
|
5186
5200
|
at: z.iso.datetime({ offset: true }),
|
|
5187
5201
|
automationId: z.string(),
|
|
5188
5202
|
code: z.union([z.null(), z.string()]),
|
|
5203
|
+
dueAt: z.union([z.null(), z.iso.datetime({ offset: true })]),
|
|
5189
5204
|
groupId: z.string(),
|
|
5190
5205
|
groupName: z.union([z.null(), z.string()]),
|
|
5191
5206
|
id: z.string(),
|
|
5192
5207
|
kind: z.union([
|
|
5193
5208
|
z.null(),
|
|
5209
|
+
z.literal('add_to_group'),
|
|
5194
5210
|
z.literal('add_to_program'),
|
|
5211
|
+
z.literal('ask_pulse'),
|
|
5212
|
+
z.literal('give_badge'),
|
|
5195
5213
|
z.literal('invite_community'),
|
|
5214
|
+
z.literal('remove_from_group'),
|
|
5196
5215
|
z.literal('send_message'),
|
|
5197
5216
|
z.literal('start_playbook'),
|
|
5198
5217
|
z.literal('tell_hr'),
|
|
5199
5218
|
z.literal('tell_manager'),
|
|
5219
|
+
z.literal('tell_person'),
|
|
5200
5220
|
]),
|
|
5201
5221
|
name: z.union([z.null(), z.string()]),
|
|
5202
5222
|
outcome: z.union([
|
|
5203
5223
|
z.literal('done'),
|
|
5204
5224
|
z.literal('failed'),
|
|
5225
|
+
z.literal('scheduled'),
|
|
5205
5226
|
z.literal('skipped'),
|
|
5206
5227
|
]),
|
|
5207
5228
|
personId: z.string(),
|
|
@@ -5214,6 +5235,7 @@ const groups_allAutomationsOutput = z.strictObject({
|
|
|
5214
5235
|
failed30: z.number(),
|
|
5215
5236
|
groups: z.number(),
|
|
5216
5237
|
paused: z.number(),
|
|
5238
|
+
scheduled: z.number(),
|
|
5217
5239
|
skipped30: z.number(),
|
|
5218
5240
|
}),
|
|
5219
5241
|
});
|
|
@@ -5228,6 +5250,7 @@ const groups_automationsOutput = z.strictObject({
|
|
|
5228
5250
|
])
|
|
5229
5251
|
.optional()
|
|
5230
5252
|
.optional(),
|
|
5253
|
+
badgeId: z.string().optional().optional(),
|
|
5231
5254
|
body: z.array(z.string()).optional().optional(),
|
|
5232
5255
|
channel: z
|
|
5233
5256
|
.union([
|
|
@@ -5239,20 +5262,29 @@ const groups_automationsOutput = z.strictObject({
|
|
|
5239
5262
|
.optional(),
|
|
5240
5263
|
communityId: z.string().optional().optional(),
|
|
5241
5264
|
note: z.string().optional().optional(),
|
|
5265
|
+
personId: z.string().optional().optional(),
|
|
5242
5266
|
programId: z.string().optional().optional(),
|
|
5267
|
+
questionId: z.string().optional().optional(),
|
|
5243
5268
|
subject: z.string().optional().optional(),
|
|
5269
|
+
targetGroupId: z.string().optional().optional(),
|
|
5244
5270
|
}),
|
|
5245
5271
|
createdAt: z.iso.datetime({ offset: true }),
|
|
5246
5272
|
createdBy: z.union([z.null(), z.string()]),
|
|
5273
|
+
delayDays: z.number(),
|
|
5247
5274
|
groupId: z.string(),
|
|
5248
5275
|
id: z.string(),
|
|
5249
5276
|
kind: z.union([
|
|
5277
|
+
z.literal('add_to_group'),
|
|
5250
5278
|
z.literal('add_to_program'),
|
|
5279
|
+
z.literal('ask_pulse'),
|
|
5280
|
+
z.literal('give_badge'),
|
|
5251
5281
|
z.literal('invite_community'),
|
|
5282
|
+
z.literal('remove_from_group'),
|
|
5252
5283
|
z.literal('send_message'),
|
|
5253
5284
|
z.literal('start_playbook'),
|
|
5254
5285
|
z.literal('tell_hr'),
|
|
5255
5286
|
z.literal('tell_manager'),
|
|
5287
|
+
z.literal('tell_person'),
|
|
5256
5288
|
]),
|
|
5257
5289
|
lastRunAt: z.union([z.null(), z.iso.datetime({ offset: true })]),
|
|
5258
5290
|
runs: z.number(),
|
|
@@ -5267,25 +5299,33 @@ const groups_automationsOutput = z.strictObject({
|
|
|
5267
5299
|
]),
|
|
5268
5300
|
trigger: z.union([z.literal('entered'), z.literal('left')]),
|
|
5269
5301
|
updatedAt: z.iso.datetime({ offset: true }),
|
|
5302
|
+
when: z.string(),
|
|
5270
5303
|
})),
|
|
5271
5304
|
groupId: z.string(),
|
|
5272
5305
|
runs: z.array(z.strictObject({
|
|
5273
5306
|
at: z.iso.datetime({ offset: true }),
|
|
5274
5307
|
automationId: z.string(),
|
|
5275
5308
|
code: z.union([z.null(), z.string()]),
|
|
5309
|
+
dueAt: z.union([z.null(), z.iso.datetime({ offset: true })]),
|
|
5276
5310
|
id: z.string(),
|
|
5277
5311
|
kind: z.union([
|
|
5312
|
+
z.literal('add_to_group'),
|
|
5278
5313
|
z.literal('add_to_program'),
|
|
5314
|
+
z.literal('ask_pulse'),
|
|
5315
|
+
z.literal('give_badge'),
|
|
5279
5316
|
z.literal('invite_community'),
|
|
5317
|
+
z.literal('remove_from_group'),
|
|
5280
5318
|
z.literal('send_message'),
|
|
5281
5319
|
z.literal('start_playbook'),
|
|
5282
5320
|
z.literal('tell_hr'),
|
|
5283
5321
|
z.literal('tell_manager'),
|
|
5322
|
+
z.literal('tell_person'),
|
|
5284
5323
|
]),
|
|
5285
5324
|
name: z.union([z.null(), z.string()]),
|
|
5286
5325
|
outcome: z.union([
|
|
5287
5326
|
z.literal('done'),
|
|
5288
5327
|
z.literal('failed'),
|
|
5328
|
+
z.literal('scheduled'),
|
|
5289
5329
|
z.literal('skipped'),
|
|
5290
5330
|
]),
|
|
5291
5331
|
personId: z.string(),
|
|
@@ -5293,6 +5333,16 @@ const groups_automationsOutput = z.strictObject({
|
|
|
5293
5333
|
why: z.union([z.null(), z.string()]),
|
|
5294
5334
|
})),
|
|
5295
5335
|
});
|
|
5336
|
+
const groups_automationChoicesInput = z.strictObject({});
|
|
5337
|
+
const groups_automationChoicesOutput = z.strictObject({
|
|
5338
|
+
badges: z.array(z.strictObject({ id: z.string(), name: z.string() })),
|
|
5339
|
+
groups: z.array(z.strictObject({
|
|
5340
|
+
department: z.boolean(),
|
|
5341
|
+
id: z.string(),
|
|
5342
|
+
name: z.string(),
|
|
5343
|
+
})),
|
|
5344
|
+
questions: z.array(z.strictObject({ id: z.string(), retired: z.boolean(), text: z.string() })),
|
|
5345
|
+
});
|
|
5296
5346
|
const groups_setAutomationInput = z
|
|
5297
5347
|
.strictObject({
|
|
5298
5348
|
config: z
|
|
@@ -5306,6 +5356,7 @@ const groups_setAutomationInput = z
|
|
|
5306
5356
|
])
|
|
5307
5357
|
.optional()
|
|
5308
5358
|
.optional(),
|
|
5359
|
+
badgeId: z.string().optional().optional(),
|
|
5309
5360
|
body: z.array(z.string()).optional().optional(),
|
|
5310
5361
|
channel: z
|
|
5311
5362
|
.union([
|
|
@@ -5317,21 +5368,30 @@ const groups_setAutomationInput = z
|
|
|
5317
5368
|
.optional(),
|
|
5318
5369
|
communityId: z.string().optional().optional(),
|
|
5319
5370
|
note: z.string().optional().optional(),
|
|
5371
|
+
personId: z.string().optional().optional(),
|
|
5320
5372
|
programId: z.string().optional().optional(),
|
|
5373
|
+
questionId: z.string().optional().optional(),
|
|
5321
5374
|
subject: z.string().optional().optional(),
|
|
5375
|
+
targetGroupId: z.string().optional().optional(),
|
|
5322
5376
|
}),
|
|
5323
5377
|
])
|
|
5324
5378
|
.optional()
|
|
5325
5379
|
.optional(),
|
|
5380
|
+
delayDays: z.number().optional().optional(),
|
|
5326
5381
|
groupId: z.string(),
|
|
5327
5382
|
id: z.string().optional().optional(),
|
|
5328
5383
|
kind: z.union([
|
|
5384
|
+
z.literal('add_to_group'),
|
|
5329
5385
|
z.literal('add_to_program'),
|
|
5386
|
+
z.literal('ask_pulse'),
|
|
5387
|
+
z.literal('give_badge'),
|
|
5330
5388
|
z.literal('invite_community'),
|
|
5389
|
+
z.literal('remove_from_group'),
|
|
5331
5390
|
z.literal('send_message'),
|
|
5332
5391
|
z.literal('start_playbook'),
|
|
5333
5392
|
z.literal('tell_hr'),
|
|
5334
5393
|
z.literal('tell_manager'),
|
|
5394
|
+
z.literal('tell_person'),
|
|
5335
5395
|
]),
|
|
5336
5396
|
trigger: z.union([z.literal('entered'), z.literal('left')]),
|
|
5337
5397
|
})
|
|
@@ -5352,6 +5412,7 @@ const groups_setAutomationOutput = z.object({
|
|
|
5352
5412
|
])
|
|
5353
5413
|
.optional()
|
|
5354
5414
|
.optional(),
|
|
5415
|
+
badgeId: z.string().optional().optional(),
|
|
5355
5416
|
body: z.array(z.string()).optional().optional(),
|
|
5356
5417
|
channel: z
|
|
5357
5418
|
.union([
|
|
@@ -5363,20 +5424,29 @@ const groups_setAutomationOutput = z.object({
|
|
|
5363
5424
|
.optional(),
|
|
5364
5425
|
communityId: z.string().optional().optional(),
|
|
5365
5426
|
note: z.string().optional().optional(),
|
|
5427
|
+
personId: z.string().optional().optional(),
|
|
5366
5428
|
programId: z.string().optional().optional(),
|
|
5429
|
+
questionId: z.string().optional().optional(),
|
|
5367
5430
|
subject: z.string().optional().optional(),
|
|
5431
|
+
targetGroupId: z.string().optional().optional(),
|
|
5368
5432
|
}),
|
|
5369
5433
|
createdAt: z.iso.datetime({ offset: true }),
|
|
5370
5434
|
createdBy: z.union([z.null(), z.string()]),
|
|
5435
|
+
delayDays: z.number(),
|
|
5371
5436
|
groupId: z.string(),
|
|
5372
5437
|
id: z.string(),
|
|
5373
5438
|
kind: z.union([
|
|
5439
|
+
z.literal('add_to_group'),
|
|
5374
5440
|
z.literal('add_to_program'),
|
|
5441
|
+
z.literal('ask_pulse'),
|
|
5442
|
+
z.literal('give_badge'),
|
|
5375
5443
|
z.literal('invite_community'),
|
|
5444
|
+
z.literal('remove_from_group'),
|
|
5376
5445
|
z.literal('send_message'),
|
|
5377
5446
|
z.literal('start_playbook'),
|
|
5378
5447
|
z.literal('tell_hr'),
|
|
5379
5448
|
z.literal('tell_manager'),
|
|
5449
|
+
z.literal('tell_person'),
|
|
5380
5450
|
]),
|
|
5381
5451
|
lastRunAt: z.union([z.null(), z.iso.datetime({ offset: true })]),
|
|
5382
5452
|
runs: z.number(),
|
|
@@ -5391,6 +5461,7 @@ const groups_setAutomationOutput = z.object({
|
|
|
5391
5461
|
]),
|
|
5392
5462
|
trigger: z.union([z.literal('entered'), z.literal('left')]),
|
|
5393
5463
|
updatedAt: z.iso.datetime({ offset: true }),
|
|
5464
|
+
when: z.string(),
|
|
5394
5465
|
})
|
|
5395
5466
|
.nullable(),
|
|
5396
5467
|
});
|
|
@@ -13958,18 +14029,24 @@ const users_activityOutput = z.strictObject({
|
|
|
13958
14029
|
z.strictObject({
|
|
13959
14030
|
at: z.iso.datetime({ offset: true }),
|
|
13960
14031
|
automation: z.union([
|
|
14032
|
+
z.literal('add_to_group'),
|
|
13961
14033
|
z.literal('add_to_program'),
|
|
14034
|
+
z.literal('ask_pulse'),
|
|
14035
|
+
z.literal('give_badge'),
|
|
13962
14036
|
z.literal('invite_community'),
|
|
14037
|
+
z.literal('remove_from_group'),
|
|
13963
14038
|
z.literal('send_message'),
|
|
13964
14039
|
z.literal('start_playbook'),
|
|
13965
14040
|
z.literal('tell_hr'),
|
|
13966
14041
|
z.literal('tell_manager'),
|
|
14042
|
+
z.literal('tell_person'),
|
|
13967
14043
|
]),
|
|
13968
14044
|
group: z.strictObject({ id: z.string(), name: z.string() }),
|
|
13969
14045
|
kind: z.literal('group_automation'),
|
|
13970
14046
|
outcome: z.union([
|
|
13971
14047
|
z.literal('done'),
|
|
13972
14048
|
z.literal('failed'),
|
|
14049
|
+
z.literal('scheduled'),
|
|
13973
14050
|
z.literal('skipped'),
|
|
13974
14051
|
]),
|
|
13975
14052
|
trigger: z.union([z.literal('entered'), z.literal('left')]),
|
|
@@ -17513,6 +17590,15 @@ export const managementContract = {
|
|
|
17513
17590
|
})
|
|
17514
17591
|
.input(groups_allAutomationsInput)
|
|
17515
17592
|
.output(groups_allAutomationsOutput),
|
|
17593
|
+
automationChoices: base
|
|
17594
|
+
.meta({ scope: 'users:read' })
|
|
17595
|
+
.route({
|
|
17596
|
+
method: 'POST',
|
|
17597
|
+
path: '/manage/groups/automationChoices',
|
|
17598
|
+
summary: 'The Pulse questions, badges and Shuffl lists a group automation can ask, give or add people to',
|
|
17599
|
+
})
|
|
17600
|
+
.input(groups_automationChoicesInput)
|
|
17601
|
+
.output(groups_automationChoicesOutput),
|
|
17516
17602
|
automations: base
|
|
17517
17603
|
.meta({ scope: 'users:read' })
|
|
17518
17604
|
.route({
|
|
@@ -17698,7 +17784,7 @@ export const managementContract = {
|
|
|
17698
17784
|
.route({
|
|
17699
17785
|
method: 'POST',
|
|
17700
17786
|
path: '/manage/groups/setAutomation',
|
|
17701
|
-
summary: 'Add or change an automation on a group; a new one starts paused',
|
|
17787
|
+
summary: 'Add or change an automation on a group: send a message, ask a Pulse question, start a playbook, invite to a community, add to Connections, give a badge, add to or remove from another group, or tell HR, their manager or someone named, right away or days later; a new one starts paused',
|
|
17702
17788
|
})
|
|
17703
17789
|
.input(groups_setAutomationInput)
|
|
17704
17790
|
.output(groups_setAutomationOutput),
|
package/dist/permissions.d.ts
CHANGED
|
@@ -98,6 +98,7 @@ export declare const permissionSchema: z.ZodEnum<{
|
|
|
98
98
|
"getStarted.intro": "getStarted.intro";
|
|
99
99
|
"getStarted.wizard": "getStarted.wizard";
|
|
100
100
|
"groups.allAutomations": "groups.allAutomations";
|
|
101
|
+
"groups.automationChoices": "groups.automationChoices";
|
|
101
102
|
"groups.automations": "groups.automations";
|
|
102
103
|
"groups.directory": "groups.directory";
|
|
103
104
|
"groups.directoryGroup": "groups.directoryGroup";
|
|
@@ -482,6 +483,7 @@ export declare const permissionDefinitionSchema: z.ZodObject<{
|
|
|
482
483
|
"getStarted.intro": "getStarted.intro";
|
|
483
484
|
"getStarted.wizard": "getStarted.wizard";
|
|
484
485
|
"groups.allAutomations": "groups.allAutomations";
|
|
486
|
+
"groups.automationChoices": "groups.automationChoices";
|
|
485
487
|
"groups.automations": "groups.automations";
|
|
486
488
|
"groups.directory": "groups.directory";
|
|
487
489
|
"groups.directoryGroup": "groups.directoryGroup";
|