@shuffl/api-contracts 0.5.4 → 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.
@@ -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'),
@@ -1109,6 +1110,16 @@ const exports_teamOutput = z.strictObject({
1109
1110
  z.literal('message'),
1110
1111
  z.literal('task'),
1111
1112
  ]),
1113
+ meet: z
1114
+ .union([
1115
+ z.literal('manager'),
1116
+ z.literal('person'),
1117
+ z.literal('skip_level'),
1118
+ z.literal('teammates'),
1119
+ ])
1120
+ .optional()
1121
+ .optional(),
1122
+ meetCount: z.number().optional().optional(),
1112
1123
  notFor: z.array(z.string()).optional().optional(),
1113
1124
  offsetDays: z.number(),
1114
1125
  onlyFor: z.array(z.string()).optional().optional(),
@@ -2100,6 +2111,7 @@ const credentials_api_listOutput = z.strictObject({
2100
2111
  z.literal('getStarted.intro'),
2101
2112
  z.literal('getStarted.wizard'),
2102
2113
  z.literal('groups.allAutomations'),
2114
+ z.literal('groups.automationChoices'),
2103
2115
  z.literal('groups.automations'),
2104
2116
  z.literal('groups.directory'),
2105
2117
  z.literal('groups.directoryGroup'),
@@ -2532,6 +2544,7 @@ const credentials_api_listOutput = z.strictObject({
2532
2544
  z.literal('getStarted.intro'),
2533
2545
  z.literal('getStarted.wizard'),
2534
2546
  z.literal('groups.allAutomations'),
2547
+ z.literal('groups.automationChoices'),
2535
2548
  z.literal('groups.automations'),
2536
2549
  z.literal('groups.directory'),
2537
2550
  z.literal('groups.directoryGroup'),
@@ -5092,6 +5105,7 @@ const groups_allAutomationsOutput = z.strictObject({
5092
5105
  ])
5093
5106
  .optional()
5094
5107
  .optional(),
5108
+ badgeId: z.string().optional().optional(),
5095
5109
  body: z.array(z.string()).optional().optional(),
5096
5110
  channel: z
5097
5111
  .union([
@@ -5103,11 +5117,15 @@ const groups_allAutomationsOutput = z.strictObject({
5103
5117
  .optional(),
5104
5118
  communityId: z.string().optional().optional(),
5105
5119
  note: z.string().optional().optional(),
5120
+ personId: z.string().optional().optional(),
5106
5121
  programId: z.string().optional().optional(),
5122
+ questionId: z.string().optional().optional(),
5107
5123
  subject: z.string().optional().optional(),
5124
+ targetGroupId: z.string().optional().optional(),
5108
5125
  }),
5109
5126
  createdAt: z.iso.datetime({ offset: true }),
5110
5127
  createdBy: z.union([z.null(), z.string()]),
5128
+ delayDays: z.number(),
5111
5129
  group: z.strictObject({
5112
5130
  id: z.string(),
5113
5131
  kind: z.union([z.literal('dynamic'), z.literal('list')]),
@@ -5117,12 +5135,17 @@ const groups_allAutomationsOutput = z.strictObject({
5117
5135
  groupId: z.string(),
5118
5136
  id: z.string(),
5119
5137
  kind: z.union([
5138
+ z.literal('add_to_group'),
5120
5139
  z.literal('add_to_program'),
5140
+ z.literal('ask_pulse'),
5141
+ z.literal('give_badge'),
5121
5142
  z.literal('invite_community'),
5143
+ z.literal('remove_from_group'),
5122
5144
  z.literal('send_message'),
5123
5145
  z.literal('start_playbook'),
5124
5146
  z.literal('tell_hr'),
5125
5147
  z.literal('tell_manager'),
5148
+ z.literal('tell_person'),
5126
5149
  ]),
5127
5150
  lastRunAt: z.union([z.null(), z.iso.datetime({ offset: true })]),
5128
5151
  runs: z.number(),
@@ -5137,6 +5160,7 @@ const groups_allAutomationsOutput = z.strictObject({
5137
5160
  ]),
5138
5161
  trigger: z.union([z.literal('entered'), z.literal('left')]),
5139
5162
  updatedAt: z.iso.datetime({ offset: true }),
5163
+ when: z.string(),
5140
5164
  })),
5141
5165
  playbookStarts: z.array(z.strictObject({
5142
5166
  group: z.union([
@@ -5176,22 +5200,29 @@ const groups_allAutomationsOutput = z.strictObject({
5176
5200
  at: z.iso.datetime({ offset: true }),
5177
5201
  automationId: z.string(),
5178
5202
  code: z.union([z.null(), z.string()]),
5203
+ dueAt: z.union([z.null(), z.iso.datetime({ offset: true })]),
5179
5204
  groupId: z.string(),
5180
5205
  groupName: z.union([z.null(), z.string()]),
5181
5206
  id: z.string(),
5182
5207
  kind: z.union([
5183
5208
  z.null(),
5209
+ z.literal('add_to_group'),
5184
5210
  z.literal('add_to_program'),
5211
+ z.literal('ask_pulse'),
5212
+ z.literal('give_badge'),
5185
5213
  z.literal('invite_community'),
5214
+ z.literal('remove_from_group'),
5186
5215
  z.literal('send_message'),
5187
5216
  z.literal('start_playbook'),
5188
5217
  z.literal('tell_hr'),
5189
5218
  z.literal('tell_manager'),
5219
+ z.literal('tell_person'),
5190
5220
  ]),
5191
5221
  name: z.union([z.null(), z.string()]),
5192
5222
  outcome: z.union([
5193
5223
  z.literal('done'),
5194
5224
  z.literal('failed'),
5225
+ z.literal('scheduled'),
5195
5226
  z.literal('skipped'),
5196
5227
  ]),
5197
5228
  personId: z.string(),
@@ -5204,6 +5235,7 @@ const groups_allAutomationsOutput = z.strictObject({
5204
5235
  failed30: z.number(),
5205
5236
  groups: z.number(),
5206
5237
  paused: z.number(),
5238
+ scheduled: z.number(),
5207
5239
  skipped30: z.number(),
5208
5240
  }),
5209
5241
  });
@@ -5218,6 +5250,7 @@ const groups_automationsOutput = z.strictObject({
5218
5250
  ])
5219
5251
  .optional()
5220
5252
  .optional(),
5253
+ badgeId: z.string().optional().optional(),
5221
5254
  body: z.array(z.string()).optional().optional(),
5222
5255
  channel: z
5223
5256
  .union([
@@ -5229,20 +5262,29 @@ const groups_automationsOutput = z.strictObject({
5229
5262
  .optional(),
5230
5263
  communityId: z.string().optional().optional(),
5231
5264
  note: z.string().optional().optional(),
5265
+ personId: z.string().optional().optional(),
5232
5266
  programId: z.string().optional().optional(),
5267
+ questionId: z.string().optional().optional(),
5233
5268
  subject: z.string().optional().optional(),
5269
+ targetGroupId: z.string().optional().optional(),
5234
5270
  }),
5235
5271
  createdAt: z.iso.datetime({ offset: true }),
5236
5272
  createdBy: z.union([z.null(), z.string()]),
5273
+ delayDays: z.number(),
5237
5274
  groupId: z.string(),
5238
5275
  id: z.string(),
5239
5276
  kind: z.union([
5277
+ z.literal('add_to_group'),
5240
5278
  z.literal('add_to_program'),
5279
+ z.literal('ask_pulse'),
5280
+ z.literal('give_badge'),
5241
5281
  z.literal('invite_community'),
5282
+ z.literal('remove_from_group'),
5242
5283
  z.literal('send_message'),
5243
5284
  z.literal('start_playbook'),
5244
5285
  z.literal('tell_hr'),
5245
5286
  z.literal('tell_manager'),
5287
+ z.literal('tell_person'),
5246
5288
  ]),
5247
5289
  lastRunAt: z.union([z.null(), z.iso.datetime({ offset: true })]),
5248
5290
  runs: z.number(),
@@ -5257,25 +5299,33 @@ const groups_automationsOutput = z.strictObject({
5257
5299
  ]),
5258
5300
  trigger: z.union([z.literal('entered'), z.literal('left')]),
5259
5301
  updatedAt: z.iso.datetime({ offset: true }),
5302
+ when: z.string(),
5260
5303
  })),
5261
5304
  groupId: z.string(),
5262
5305
  runs: z.array(z.strictObject({
5263
5306
  at: z.iso.datetime({ offset: true }),
5264
5307
  automationId: z.string(),
5265
5308
  code: z.union([z.null(), z.string()]),
5309
+ dueAt: z.union([z.null(), z.iso.datetime({ offset: true })]),
5266
5310
  id: z.string(),
5267
5311
  kind: z.union([
5312
+ z.literal('add_to_group'),
5268
5313
  z.literal('add_to_program'),
5314
+ z.literal('ask_pulse'),
5315
+ z.literal('give_badge'),
5269
5316
  z.literal('invite_community'),
5317
+ z.literal('remove_from_group'),
5270
5318
  z.literal('send_message'),
5271
5319
  z.literal('start_playbook'),
5272
5320
  z.literal('tell_hr'),
5273
5321
  z.literal('tell_manager'),
5322
+ z.literal('tell_person'),
5274
5323
  ]),
5275
5324
  name: z.union([z.null(), z.string()]),
5276
5325
  outcome: z.union([
5277
5326
  z.literal('done'),
5278
5327
  z.literal('failed'),
5328
+ z.literal('scheduled'),
5279
5329
  z.literal('skipped'),
5280
5330
  ]),
5281
5331
  personId: z.string(),
@@ -5283,6 +5333,16 @@ const groups_automationsOutput = z.strictObject({
5283
5333
  why: z.union([z.null(), z.string()]),
5284
5334
  })),
5285
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
+ });
5286
5346
  const groups_setAutomationInput = z
5287
5347
  .strictObject({
5288
5348
  config: z
@@ -5296,6 +5356,7 @@ const groups_setAutomationInput = z
5296
5356
  ])
5297
5357
  .optional()
5298
5358
  .optional(),
5359
+ badgeId: z.string().optional().optional(),
5299
5360
  body: z.array(z.string()).optional().optional(),
5300
5361
  channel: z
5301
5362
  .union([
@@ -5307,21 +5368,30 @@ const groups_setAutomationInput = z
5307
5368
  .optional(),
5308
5369
  communityId: z.string().optional().optional(),
5309
5370
  note: z.string().optional().optional(),
5371
+ personId: z.string().optional().optional(),
5310
5372
  programId: z.string().optional().optional(),
5373
+ questionId: z.string().optional().optional(),
5311
5374
  subject: z.string().optional().optional(),
5375
+ targetGroupId: z.string().optional().optional(),
5312
5376
  }),
5313
5377
  ])
5314
5378
  .optional()
5315
5379
  .optional(),
5380
+ delayDays: z.number().optional().optional(),
5316
5381
  groupId: z.string(),
5317
5382
  id: z.string().optional().optional(),
5318
5383
  kind: z.union([
5384
+ z.literal('add_to_group'),
5319
5385
  z.literal('add_to_program'),
5386
+ z.literal('ask_pulse'),
5387
+ z.literal('give_badge'),
5320
5388
  z.literal('invite_community'),
5389
+ z.literal('remove_from_group'),
5321
5390
  z.literal('send_message'),
5322
5391
  z.literal('start_playbook'),
5323
5392
  z.literal('tell_hr'),
5324
5393
  z.literal('tell_manager'),
5394
+ z.literal('tell_person'),
5325
5395
  ]),
5326
5396
  trigger: z.union([z.literal('entered'), z.literal('left')]),
5327
5397
  })
@@ -5342,6 +5412,7 @@ const groups_setAutomationOutput = z.object({
5342
5412
  ])
5343
5413
  .optional()
5344
5414
  .optional(),
5415
+ badgeId: z.string().optional().optional(),
5345
5416
  body: z.array(z.string()).optional().optional(),
5346
5417
  channel: z
5347
5418
  .union([
@@ -5353,20 +5424,29 @@ const groups_setAutomationOutput = z.object({
5353
5424
  .optional(),
5354
5425
  communityId: z.string().optional().optional(),
5355
5426
  note: z.string().optional().optional(),
5427
+ personId: z.string().optional().optional(),
5356
5428
  programId: z.string().optional().optional(),
5429
+ questionId: z.string().optional().optional(),
5357
5430
  subject: z.string().optional().optional(),
5431
+ targetGroupId: z.string().optional().optional(),
5358
5432
  }),
5359
5433
  createdAt: z.iso.datetime({ offset: true }),
5360
5434
  createdBy: z.union([z.null(), z.string()]),
5435
+ delayDays: z.number(),
5361
5436
  groupId: z.string(),
5362
5437
  id: z.string(),
5363
5438
  kind: z.union([
5439
+ z.literal('add_to_group'),
5364
5440
  z.literal('add_to_program'),
5441
+ z.literal('ask_pulse'),
5442
+ z.literal('give_badge'),
5365
5443
  z.literal('invite_community'),
5444
+ z.literal('remove_from_group'),
5366
5445
  z.literal('send_message'),
5367
5446
  z.literal('start_playbook'),
5368
5447
  z.literal('tell_hr'),
5369
5448
  z.literal('tell_manager'),
5449
+ z.literal('tell_person'),
5370
5450
  ]),
5371
5451
  lastRunAt: z.union([z.null(), z.iso.datetime({ offset: true })]),
5372
5452
  runs: z.number(),
@@ -5381,6 +5461,7 @@ const groups_setAutomationOutput = z.object({
5381
5461
  ]),
5382
5462
  trigger: z.union([z.literal('entered'), z.literal('left')]),
5383
5463
  updatedAt: z.iso.datetime({ offset: true }),
5464
+ when: z.string(),
5384
5465
  })
5385
5466
  .nullable(),
5386
5467
  });
@@ -9115,6 +9196,16 @@ const reports_overviewOutput = z.strictObject({
9115
9196
  z.literal('message'),
9116
9197
  z.literal('task'),
9117
9198
  ]),
9199
+ meet: z
9200
+ .union([
9201
+ z.literal('manager'),
9202
+ z.literal('person'),
9203
+ z.literal('skip_level'),
9204
+ z.literal('teammates'),
9205
+ ])
9206
+ .optional()
9207
+ .optional(),
9208
+ meetCount: z.number().optional().optional(),
9118
9209
  notFor: z.array(z.string()).optional().optional(),
9119
9210
  offsetDays: z.number(),
9120
9211
  onlyFor: z.array(z.string()).optional().optional(),
@@ -9674,6 +9765,16 @@ const playbooks_programOutput = z.strictObject({
9674
9765
  z.literal('message'),
9675
9766
  z.literal('task'),
9676
9767
  ]),
9768
+ meet: z
9769
+ .union([
9770
+ z.literal('manager'),
9771
+ z.literal('person'),
9772
+ z.literal('skip_level'),
9773
+ z.literal('teammates'),
9774
+ ])
9775
+ .optional()
9776
+ .optional(),
9777
+ meetCount: z.number().optional().optional(),
9677
9778
  notFor: z.array(z.string()).optional().optional(),
9678
9779
  offsetDays: z.number(),
9679
9780
  onlyFor: z.array(z.string()).optional().optional(),
@@ -9996,9 +10097,20 @@ const playbooks_saveProgramInput = z
9996
10097
  kind: z.union([
9997
10098
  z.literal('acknowledge'),
9998
10099
  z.literal('checkpoint'),
10100
+ z.literal('meet'),
9999
10101
  z.literal('message'),
10000
10102
  z.literal('task'),
10001
10103
  ]),
10104
+ meet: z
10105
+ .union([
10106
+ z.literal('manager'),
10107
+ z.literal('person'),
10108
+ z.literal('skip_level'),
10109
+ z.literal('teammates'),
10110
+ ])
10111
+ .optional()
10112
+ .optional(),
10113
+ meetCount: z.number().optional().optional(),
10002
10114
  notFor: z.array(z.string()).optional().optional(),
10003
10115
  offsetDays: z.number(),
10004
10116
  onlyFor: z.array(z.string()).optional().optional(),
@@ -10206,6 +10318,16 @@ const playbooks_saveProgramOutput = z.object({
10206
10318
  z.literal('message'),
10207
10319
  z.literal('task'),
10208
10320
  ]),
10321
+ meet: z
10322
+ .union([
10323
+ z.literal('manager'),
10324
+ z.literal('person'),
10325
+ z.literal('skip_level'),
10326
+ z.literal('teammates'),
10327
+ ])
10328
+ .optional()
10329
+ .optional(),
10330
+ meetCount: z.number().optional().optional(),
10209
10331
  notFor: z.array(z.string()).optional().optional(),
10210
10332
  offsetDays: z.number(),
10211
10333
  onlyFor: z.array(z.string()).optional().optional(),
@@ -10410,6 +10532,7 @@ const playbooks_enrollmentPreviewOutput = z.strictObject({
10410
10532
  z.literal('message'),
10411
10533
  z.literal('task'),
10412
10534
  ]),
10535
+ meets: z.union([z.null(), z.array(z.string())]),
10413
10536
  offsetDays: z.number(),
10414
10537
  pending: z.boolean(),
10415
10538
  preview: z.string(),
@@ -10836,6 +10959,7 @@ const playbooks_previewAsOutput = z.strictObject({
10836
10959
  z.literal('message'),
10837
10960
  z.literal('task'),
10838
10961
  ]),
10962
+ meets: z.array(z.string()),
10839
10963
  offsetDays: z.number(),
10840
10964
  recipient: z.union([
10841
10965
  z.null(),
@@ -10993,6 +11117,15 @@ const playbooks_runOutput = z.union([
10993
11117
  userId: z.union([z.null(), z.string()]),
10994
11118
  }),
10995
11119
  ]),
11120
+ met: z.array(z.strictObject({
11121
+ email: z.union([z.null(), z.string()]),
11122
+ id: z.string(),
11123
+ name: z.string(),
11124
+ photoUrl: z.union([z.null(), z.string()]),
11125
+ slackUserId: z.union([z.null(), z.string()]),
11126
+ title: z.union([z.null(), z.string()]),
11127
+ userId: z.union([z.null(), z.string()]),
11128
+ })),
10996
11129
  playbooks: z.array(z.strictObject({
10997
11130
  current: z.boolean(),
10998
11131
  dayZero: z.union([
@@ -11046,6 +11179,7 @@ const playbooks_runOutput = z.union([
11046
11179
  z.literal('check_in'),
11047
11180
  z.literal('checkpoint'),
11048
11181
  z.literal('introduction'),
11182
+ z.literal('meet'),
11049
11183
  z.literal('message'),
11050
11184
  z.literal('task'),
11051
11185
  ]),
@@ -13895,18 +14029,24 @@ const users_activityOutput = z.strictObject({
13895
14029
  z.strictObject({
13896
14030
  at: z.iso.datetime({ offset: true }),
13897
14031
  automation: z.union([
14032
+ z.literal('add_to_group'),
13898
14033
  z.literal('add_to_program'),
14034
+ z.literal('ask_pulse'),
14035
+ z.literal('give_badge'),
13899
14036
  z.literal('invite_community'),
14037
+ z.literal('remove_from_group'),
13900
14038
  z.literal('send_message'),
13901
14039
  z.literal('start_playbook'),
13902
14040
  z.literal('tell_hr'),
13903
14041
  z.literal('tell_manager'),
14042
+ z.literal('tell_person'),
13904
14043
  ]),
13905
14044
  group: z.strictObject({ id: z.string(), name: z.string() }),
13906
14045
  kind: z.literal('group_automation'),
13907
14046
  outcome: z.union([
13908
14047
  z.literal('done'),
13909
14048
  z.literal('failed'),
14049
+ z.literal('scheduled'),
13910
14050
  z.literal('skipped'),
13911
14051
  ]),
13912
14052
  trigger: z.union([z.literal('entered'), z.literal('left')]),
@@ -17446,10 +17586,19 @@ export const managementContract = {
17446
17586
  .route({
17447
17587
  method: 'POST',
17448
17588
  path: '/manage/groups/allAutomations',
17449
- summary: 'Every join and leave rule in the workspace: group automations with their group and last runs, playbooks that start on each start date and Connections programs whose people are a group; or only those that start one playbook, program or community',
17589
+ summary: 'Every join and leave automation in the workspace: group automations with their group and last runs, playbooks that start on each start date and Connections programs whose people are a group; or only those that start one playbook, program or community',
17450
17590
  })
17451
17591
  .input(groups_allAutomationsInput)
17452
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),
17453
17602
  automations: base
17454
17603
  .meta({ scope: 'users:read' })
17455
17604
  .route({
@@ -17635,7 +17784,7 @@ export const managementContract = {
17635
17784
  .route({
17636
17785
  method: 'POST',
17637
17786
  path: '/manage/groups/setAutomation',
17638
- 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',
17639
17788
  })
17640
17789
  .input(groups_setAutomationInput)
17641
17790
  .output(groups_setAutomationOutput),
@@ -17653,7 +17802,7 @@ export const managementContract = {
17653
17802
  .route({
17654
17803
  method: 'POST',
17655
17804
  path: '/manage/groups/setPlaybookAutoStart',
17656
- summary: 'Turn on, pause or remove a playbook’s rule that starts it on each new hire’s start date, for everyone or one group',
17805
+ summary: 'Turn on, pause or remove a playbook’s automation that starts it on each new hire’s start date, for everyone or one group',
17657
17806
  })
17658
17807
  .input(groups_setPlaybookAutoStartInput)
17659
17808
  .output(groups_setPlaybookAutoStartOutput),
@@ -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";