@shuffl/api-contracts 0.5.0 → 0.5.2
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 +166 -3
- package/dist/management-operations.d.ts +1 -1
- package/dist/management-operations.js +16 -1
- package/dist/management.generated.d.ts +162 -3
- package/dist/management.generated.js +166 -1
- package/dist/permissions.d.ts +4 -0
- package/openapi.json +1989 -411
- package/package.json +1 -1
|
@@ -161,6 +161,7 @@ const credentials_api_createInput = z
|
|
|
161
161
|
z.literal('groups.sendMessage'),
|
|
162
162
|
z.literal('groups.setAutomation'),
|
|
163
163
|
z.literal('groups.setAutomationState'),
|
|
164
|
+
z.literal('groups.setPlaybookAutoStart'),
|
|
164
165
|
z.literal('groups.suggestions'),
|
|
165
166
|
z.literal('home.feed'),
|
|
166
167
|
z.literal('home.places'),
|
|
@@ -264,6 +265,7 @@ const credentials_api_createInput = z
|
|
|
264
265
|
z.literal('playbooks.firstDaysCheckIns'),
|
|
265
266
|
z.literal('playbooks.firstDaysResults'),
|
|
266
267
|
z.literal('playbooks.mine'),
|
|
268
|
+
z.literal('playbooks.nudge'),
|
|
267
269
|
z.literal('playbooks.person'),
|
|
268
270
|
z.literal('playbooks.plans'),
|
|
269
271
|
z.literal('playbooks.previewEnrollment'),
|
|
@@ -1045,6 +1047,10 @@ const exports_teamOutput = z.strictObject({
|
|
|
1045
1047
|
.union([z.null(), z.string()])
|
|
1046
1048
|
.optional()
|
|
1047
1049
|
.optional(),
|
|
1050
|
+
autoStartPaused: z
|
|
1051
|
+
.union([z.literal(false), z.literal(true)])
|
|
1052
|
+
.optional()
|
|
1053
|
+
.optional(),
|
|
1048
1054
|
buddy: z
|
|
1049
1055
|
.union([z.literal(false), z.literal(true)])
|
|
1050
1056
|
.optional()
|
|
@@ -2112,6 +2118,7 @@ const credentials_api_listOutput = z.strictObject({
|
|
|
2112
2118
|
z.literal('groups.sendMessage'),
|
|
2113
2119
|
z.literal('groups.setAutomation'),
|
|
2114
2120
|
z.literal('groups.setAutomationState'),
|
|
2121
|
+
z.literal('groups.setPlaybookAutoStart'),
|
|
2115
2122
|
z.literal('groups.suggestions'),
|
|
2116
2123
|
z.literal('home.feed'),
|
|
2117
2124
|
z.literal('home.places'),
|
|
@@ -2215,6 +2222,7 @@ const credentials_api_listOutput = z.strictObject({
|
|
|
2215
2222
|
z.literal('playbooks.firstDaysCheckIns'),
|
|
2216
2223
|
z.literal('playbooks.firstDaysResults'),
|
|
2217
2224
|
z.literal('playbooks.mine'),
|
|
2225
|
+
z.literal('playbooks.nudge'),
|
|
2218
2226
|
z.literal('playbooks.person'),
|
|
2219
2227
|
z.literal('playbooks.plans'),
|
|
2220
2228
|
z.literal('playbooks.previewEnrollment'),
|
|
@@ -2540,6 +2548,7 @@ const credentials_api_listOutput = z.strictObject({
|
|
|
2540
2548
|
z.literal('groups.sendMessage'),
|
|
2541
2549
|
z.literal('groups.setAutomation'),
|
|
2542
2550
|
z.literal('groups.setAutomationState'),
|
|
2551
|
+
z.literal('groups.setPlaybookAutoStart'),
|
|
2543
2552
|
z.literal('groups.suggestions'),
|
|
2544
2553
|
z.literal('home.feed'),
|
|
2545
2554
|
z.literal('home.places'),
|
|
@@ -2643,6 +2652,7 @@ const credentials_api_listOutput = z.strictObject({
|
|
|
2643
2652
|
z.literal('playbooks.firstDaysCheckIns'),
|
|
2644
2653
|
z.literal('playbooks.firstDaysResults'),
|
|
2645
2654
|
z.literal('playbooks.mine'),
|
|
2655
|
+
z.literal('playbooks.nudge'),
|
|
2646
2656
|
z.literal('playbooks.person'),
|
|
2647
2657
|
z.literal('playbooks.plans'),
|
|
2648
2658
|
z.literal('playbooks.previewEnrollment'),
|
|
@@ -5120,6 +5130,40 @@ const groups_allAutomationsOutput = z.strictObject({
|
|
|
5120
5130
|
trigger: z.union([z.literal('entered'), z.literal('left')]),
|
|
5121
5131
|
updatedAt: z.iso.datetime({ offset: true }),
|
|
5122
5132
|
})),
|
|
5133
|
+
playbookStarts: z.array(z.strictObject({
|
|
5134
|
+
group: z.union([
|
|
5135
|
+
z.null(),
|
|
5136
|
+
z.strictObject({
|
|
5137
|
+
id: z.string(),
|
|
5138
|
+
kind: z.union([z.literal('dynamic'), z.literal('list')]),
|
|
5139
|
+
members: z.number(),
|
|
5140
|
+
name: z.string(),
|
|
5141
|
+
}),
|
|
5142
|
+
]),
|
|
5143
|
+
lastRunAt: z.union([z.null(), z.iso.datetime({ offset: true })]),
|
|
5144
|
+
playbook: z.strictObject({
|
|
5145
|
+
id: z.string(),
|
|
5146
|
+
name: z.string(),
|
|
5147
|
+
status: z.union([
|
|
5148
|
+
z.literal('active'),
|
|
5149
|
+
z.literal('archived'),
|
|
5150
|
+
z.literal('paused'),
|
|
5151
|
+
]),
|
|
5152
|
+
}),
|
|
5153
|
+
runs: z.number(),
|
|
5154
|
+
runs30: z.number(),
|
|
5155
|
+
state: z.union([z.literal('active'), z.literal('paused')]),
|
|
5156
|
+
})),
|
|
5157
|
+
programRosters: z.array(z.strictObject({
|
|
5158
|
+
group: z.strictObject({
|
|
5159
|
+
id: z.string(),
|
|
5160
|
+
kind: z.union([z.literal('dynamic'), z.literal('list')]),
|
|
5161
|
+
members: z.number(),
|
|
5162
|
+
name: z.string(),
|
|
5163
|
+
}),
|
|
5164
|
+
program: z.strictObject({ id: z.string(), name: z.string() }),
|
|
5165
|
+
state: z.union([z.literal('active'), z.literal('paused')]),
|
|
5166
|
+
})),
|
|
5123
5167
|
runs: z.array(z.strictObject({
|
|
5124
5168
|
at: z.iso.datetime({ offset: true }),
|
|
5125
5169
|
automationId: z.string(),
|
|
@@ -5351,6 +5395,34 @@ const groups_setAutomationStateOutput = z.object({
|
|
|
5351
5395
|
})
|
|
5352
5396
|
.nullable(),
|
|
5353
5397
|
});
|
|
5398
|
+
const groups_setPlaybookAutoStartInput = z
|
|
5399
|
+
.strictObject({
|
|
5400
|
+
groupId: z.union([z.null(), z.string()]).optional().optional(),
|
|
5401
|
+
programId: z.string(),
|
|
5402
|
+
state: z.union([
|
|
5403
|
+
z.literal('active'),
|
|
5404
|
+
z.literal('off'),
|
|
5405
|
+
z.literal('paused'),
|
|
5406
|
+
]),
|
|
5407
|
+
})
|
|
5408
|
+
.extend({
|
|
5409
|
+
confirm: z.literal('groups.setPlaybookAutoStart'),
|
|
5410
|
+
requestKey: z.string().min(1).max(128),
|
|
5411
|
+
});
|
|
5412
|
+
const groups_setPlaybookAutoStartOutput = z.object({
|
|
5413
|
+
receipt: commandReceiptSchema,
|
|
5414
|
+
result: z
|
|
5415
|
+
.strictObject({
|
|
5416
|
+
changed: z.boolean(),
|
|
5417
|
+
id: z.string(),
|
|
5418
|
+
state: z.union([
|
|
5419
|
+
z.literal('active'),
|
|
5420
|
+
z.literal('off'),
|
|
5421
|
+
z.literal('paused'),
|
|
5422
|
+
]),
|
|
5423
|
+
})
|
|
5424
|
+
.nullable(),
|
|
5425
|
+
});
|
|
5354
5426
|
const groups_removeAutomationInput = z.strictObject({ id: z.string() }).extend({
|
|
5355
5427
|
confirm: z.literal('groups.removeAutomation'),
|
|
5356
5428
|
requestKey: z.string().min(1).max(128),
|
|
@@ -8934,6 +9006,10 @@ const reports_overviewOutput = z.strictObject({
|
|
|
8934
9006
|
.union([z.null(), z.string()])
|
|
8935
9007
|
.optional()
|
|
8936
9008
|
.optional(),
|
|
9009
|
+
autoStartPaused: z
|
|
9010
|
+
.union([z.literal(false), z.literal(true)])
|
|
9011
|
+
.optional()
|
|
9012
|
+
.optional(),
|
|
8937
9013
|
buddy: z
|
|
8938
9014
|
.union([z.literal(false), z.literal(true)])
|
|
8939
9015
|
.optional()
|
|
@@ -9487,6 +9563,10 @@ const playbooks_programOutput = z.strictObject({
|
|
|
9487
9563
|
.optional()
|
|
9488
9564
|
.optional(),
|
|
9489
9565
|
autoStartGroupId: z.union([z.null(), z.string()]).optional().optional(),
|
|
9566
|
+
autoStartPaused: z
|
|
9567
|
+
.union([z.literal(false), z.literal(true)])
|
|
9568
|
+
.optional()
|
|
9569
|
+
.optional(),
|
|
9490
9570
|
buddy: z
|
|
9491
9571
|
.union([z.literal(false), z.literal(true)])
|
|
9492
9572
|
.optional()
|
|
@@ -9596,6 +9676,12 @@ const playbooks_programOutput = z.strictObject({
|
|
|
9596
9676
|
.optional(),
|
|
9597
9677
|
timezone: z.string(),
|
|
9598
9678
|
}),
|
|
9679
|
+
hires: z.strictObject({
|
|
9680
|
+
active: z.number(),
|
|
9681
|
+
askedForHelp: z.number(),
|
|
9682
|
+
onTime: z.union([z.null(), z.number()]),
|
|
9683
|
+
overdue: z.number(),
|
|
9684
|
+
}),
|
|
9599
9685
|
intro: z.string(),
|
|
9600
9686
|
program: z.strictObject({
|
|
9601
9687
|
id: z.string(),
|
|
@@ -9655,6 +9741,36 @@ const playbooks_programOutput = z.strictObject({
|
|
|
9655
9741
|
total: z.number(),
|
|
9656
9742
|
}),
|
|
9657
9743
|
]),
|
|
9744
|
+
progress: z.union([
|
|
9745
|
+
z.null(),
|
|
9746
|
+
z.strictObject({
|
|
9747
|
+
day: z.number(),
|
|
9748
|
+
done: z.number(),
|
|
9749
|
+
help: z.boolean(),
|
|
9750
|
+
next: z.union([
|
|
9751
|
+
z.null(),
|
|
9752
|
+
z.strictObject({
|
|
9753
|
+
at: z.union([z.null(), z.iso.datetime({ offset: true })]),
|
|
9754
|
+
title: z.string(),
|
|
9755
|
+
}),
|
|
9756
|
+
]),
|
|
9757
|
+
overdue: z.array(z.strictObject({
|
|
9758
|
+
count: z.number(),
|
|
9759
|
+
nudgedAt: z.union([z.null(), z.iso.datetime({ offset: true })]),
|
|
9760
|
+
ownerId: z.string(),
|
|
9761
|
+
ownerName: z.string(),
|
|
9762
|
+
role: z.union([
|
|
9763
|
+
z.literal('buddy'),
|
|
9764
|
+
z.literal('hire'),
|
|
9765
|
+
z.literal('manager'),
|
|
9766
|
+
z.literal('other'),
|
|
9767
|
+
]),
|
|
9768
|
+
since: z.iso.datetime({ offset: true }),
|
|
9769
|
+
})),
|
|
9770
|
+
total: z.number(),
|
|
9771
|
+
unconfirmed: z.number(),
|
|
9772
|
+
}),
|
|
9773
|
+
]),
|
|
9658
9774
|
removalReason: z.union([
|
|
9659
9775
|
z.null(),
|
|
9660
9776
|
z.literal('access_suspended'),
|
|
@@ -9762,6 +9878,10 @@ const playbooks_saveProgramInput = z
|
|
|
9762
9878
|
.optional()
|
|
9763
9879
|
.optional(),
|
|
9764
9880
|
autoStartGroupId: z.union([z.null(), z.string()]).optional().optional(),
|
|
9881
|
+
autoStartPaused: z
|
|
9882
|
+
.union([z.literal(false), z.literal(true)])
|
|
9883
|
+
.optional()
|
|
9884
|
+
.optional(),
|
|
9765
9885
|
buddy: z
|
|
9766
9886
|
.union([z.literal(false), z.literal(true)])
|
|
9767
9887
|
.optional()
|
|
@@ -9961,6 +10081,10 @@ const playbooks_saveProgramOutput = z.object({
|
|
|
9961
10081
|
.union([z.null(), z.string()])
|
|
9962
10082
|
.optional()
|
|
9963
10083
|
.optional(),
|
|
10084
|
+
autoStartPaused: z
|
|
10085
|
+
.union([z.literal(false), z.literal(true)])
|
|
10086
|
+
.optional()
|
|
10087
|
+
.optional(),
|
|
9964
10088
|
buddy: z
|
|
9965
10089
|
.union([z.literal(false), z.literal(true)])
|
|
9966
10090
|
.optional()
|
|
@@ -10599,6 +10723,29 @@ const playbooks_retryOutput = z.object({
|
|
|
10599
10723
|
receipt: commandReceiptSchema,
|
|
10600
10724
|
result: z.strictObject({ status: z.literal('scheduled') }).nullable(),
|
|
10601
10725
|
});
|
|
10726
|
+
const playbooks_nudgeInput = z
|
|
10727
|
+
.strictObject({ enrollmentId: z.string(), ownerPersonId: z.string() })
|
|
10728
|
+
.extend({
|
|
10729
|
+
confirm: z.literal('playbooks.nudge'),
|
|
10730
|
+
requestKey: z.string().min(1).max(128),
|
|
10731
|
+
});
|
|
10732
|
+
const playbooks_nudgeOutput = z.object({
|
|
10733
|
+
receipt: commandReceiptSchema,
|
|
10734
|
+
result: z
|
|
10735
|
+
.strictObject({
|
|
10736
|
+
nudgedAt: z.union([z.null(), z.iso.datetime({ offset: true })]),
|
|
10737
|
+
status: z.union([
|
|
10738
|
+
z.literal('failed'),
|
|
10739
|
+
z.literal('no_slack'),
|
|
10740
|
+
z.literal('nothing_overdue'),
|
|
10741
|
+
z.literal('off'),
|
|
10742
|
+
z.literal('recent'),
|
|
10743
|
+
z.literal('sent'),
|
|
10744
|
+
]),
|
|
10745
|
+
todos: z.number(),
|
|
10746
|
+
})
|
|
10747
|
+
.nullable(),
|
|
10748
|
+
});
|
|
10602
10749
|
const playbooks_mineInput = z.strictObject({});
|
|
10603
10750
|
const playbooks_mineOutput = z.union([
|
|
10604
10751
|
z.strictObject({
|
|
@@ -17193,7 +17340,7 @@ export const managementContract = {
|
|
|
17193
17340
|
.route({
|
|
17194
17341
|
method: 'POST',
|
|
17195
17342
|
path: '/manage/groups/allAutomations',
|
|
17196
|
-
summary: 'Every
|
|
17343
|
+
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',
|
|
17197
17344
|
})
|
|
17198
17345
|
.input(groups_allAutomationsInput)
|
|
17199
17346
|
.output(groups_allAutomationsOutput),
|
|
@@ -17395,6 +17542,15 @@ export const managementContract = {
|
|
|
17395
17542
|
})
|
|
17396
17543
|
.input(groups_setAutomationStateInput)
|
|
17397
17544
|
.output(groups_setAutomationStateOutput),
|
|
17545
|
+
setPlaybookAutoStart: base
|
|
17546
|
+
.meta({ scope: 'users:write' })
|
|
17547
|
+
.route({
|
|
17548
|
+
method: 'POST',
|
|
17549
|
+
path: '/manage/groups/setPlaybookAutoStart',
|
|
17550
|
+
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',
|
|
17551
|
+
})
|
|
17552
|
+
.input(groups_setPlaybookAutoStartInput)
|
|
17553
|
+
.output(groups_setPlaybookAutoStartOutput),
|
|
17398
17554
|
suggestions: base
|
|
17399
17555
|
.meta({ scope: 'users:read' })
|
|
17400
17556
|
.route({
|
|
@@ -18299,6 +18455,15 @@ export const managementContract = {
|
|
|
18299
18455
|
})
|
|
18300
18456
|
.input(playbooks_mineInput)
|
|
18301
18457
|
.output(playbooks_mineOutput),
|
|
18458
|
+
nudge: base
|
|
18459
|
+
.meta({ scope: 'playbooks:write' })
|
|
18460
|
+
.route({
|
|
18461
|
+
method: 'POST',
|
|
18462
|
+
path: '/manage/playbooks/nudge',
|
|
18463
|
+
summary: 'Send someone one Slack nudge about a hire’s overdue playbook to-dos, at most once a day',
|
|
18464
|
+
})
|
|
18465
|
+
.input(playbooks_nudgeInput)
|
|
18466
|
+
.output(playbooks_nudgeOutput),
|
|
18302
18467
|
person: base
|
|
18303
18468
|
.meta({ scope: 'playbooks:read' })
|
|
18304
18469
|
.route({
|
package/dist/permissions.d.ts
CHANGED
|
@@ -120,6 +120,7 @@ export declare const permissionSchema: z.ZodEnum<{
|
|
|
120
120
|
"groups.sendMessage": "groups.sendMessage";
|
|
121
121
|
"groups.setAutomation": "groups.setAutomation";
|
|
122
122
|
"groups.setAutomationState": "groups.setAutomationState";
|
|
123
|
+
"groups.setPlaybookAutoStart": "groups.setPlaybookAutoStart";
|
|
123
124
|
"groups.suggestions": "groups.suggestions";
|
|
124
125
|
"home.feed": "home.feed";
|
|
125
126
|
"home.places": "home.places";
|
|
@@ -223,6 +224,7 @@ export declare const permissionSchema: z.ZodEnum<{
|
|
|
223
224
|
"playbooks.firstDaysCheckIns": "playbooks.firstDaysCheckIns";
|
|
224
225
|
"playbooks.firstDaysResults": "playbooks.firstDaysResults";
|
|
225
226
|
"playbooks.mine": "playbooks.mine";
|
|
227
|
+
"playbooks.nudge": "playbooks.nudge";
|
|
226
228
|
"playbooks.person": "playbooks.person";
|
|
227
229
|
"playbooks.plans": "playbooks.plans";
|
|
228
230
|
"playbooks.previewEnrollment": "playbooks.previewEnrollment";
|
|
@@ -500,6 +502,7 @@ export declare const permissionDefinitionSchema: z.ZodObject<{
|
|
|
500
502
|
"groups.sendMessage": "groups.sendMessage";
|
|
501
503
|
"groups.setAutomation": "groups.setAutomation";
|
|
502
504
|
"groups.setAutomationState": "groups.setAutomationState";
|
|
505
|
+
"groups.setPlaybookAutoStart": "groups.setPlaybookAutoStart";
|
|
503
506
|
"groups.suggestions": "groups.suggestions";
|
|
504
507
|
"home.feed": "home.feed";
|
|
505
508
|
"home.places": "home.places";
|
|
@@ -603,6 +606,7 @@ export declare const permissionDefinitionSchema: z.ZodObject<{
|
|
|
603
606
|
"playbooks.firstDaysCheckIns": "playbooks.firstDaysCheckIns";
|
|
604
607
|
"playbooks.firstDaysResults": "playbooks.firstDaysResults";
|
|
605
608
|
"playbooks.mine": "playbooks.mine";
|
|
609
|
+
"playbooks.nudge": "playbooks.nudge";
|
|
606
610
|
"playbooks.person": "playbooks.person";
|
|
607
611
|
"playbooks.plans": "playbooks.plans";
|
|
608
612
|
"playbooks.previewEnrollment": "playbooks.previewEnrollment";
|