@shuffl/api-contracts 0.2.1 → 0.4.0
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/company.d.ts +235 -0
- package/dist/company.js +177 -0
- package/dist/index.d.ts +662 -47
- package/dist/index.js +1 -0
- package/dist/management-operations.d.ts +1 -1
- package/dist/management-operations.js +50 -0
- package/dist/management.generated.d.ts +636 -47
- package/dist/management.generated.js +816 -118
- package/dist/permissions.d.ts +16 -0
- package/dist/permissions.js +4 -0
- package/dist/schemas.d.ts +3 -0
- package/dist/schemas.js +19 -1
- package/openapi.json +24285 -17191
- package/package.json +5 -1
package/dist/permissions.d.ts
CHANGED
|
@@ -53,8 +53,10 @@ export declare const permissionSchema: z.ZodEnum<{
|
|
|
53
53
|
"celebrations.removeCardNote": "celebrations.removeCardNote";
|
|
54
54
|
"celebrations.review": "celebrations.review";
|
|
55
55
|
"celebrations.save": "celebrations.save";
|
|
56
|
+
"celebrations.saveAnniversaryDate": "celebrations.saveAnniversaryDate";
|
|
56
57
|
"celebrations.savePreferences": "celebrations.savePreferences";
|
|
57
58
|
"celebrations.signCard": "celebrations.signCard";
|
|
59
|
+
"celebrations.startDates": "celebrations.startDates";
|
|
58
60
|
"channels.list": "channels.list";
|
|
59
61
|
"commands.get": "commands.get";
|
|
60
62
|
"communities.archive": "communities.archive";
|
|
@@ -94,6 +96,7 @@ export declare const permissionSchema: z.ZodEnum<{
|
|
|
94
96
|
"getStarted.intro": "getStarted.intro";
|
|
95
97
|
"getStarted.wizard": "getStarted.wizard";
|
|
96
98
|
"home.feed": "home.feed";
|
|
99
|
+
"home.places": "home.places";
|
|
97
100
|
"home.preferences": "home.preferences";
|
|
98
101
|
"home.react": "home.react";
|
|
99
102
|
"home.story": "home.story";
|
|
@@ -103,6 +106,7 @@ export declare const permissionSchema: z.ZodEnum<{
|
|
|
103
106
|
"hr.deliver": "hr.deliver";
|
|
104
107
|
"hr.get": "hr.get";
|
|
105
108
|
"hr.list": "hr.list";
|
|
109
|
+
"hr.mine": "hr.mine";
|
|
106
110
|
"hr.readiness": "hr.readiness";
|
|
107
111
|
"hr.rebuildCategories": "hr.rebuildCategories";
|
|
108
112
|
"hr.renameTeam": "hr.renameTeam";
|
|
@@ -168,10 +172,12 @@ export declare const permissionSchema: z.ZodEnum<{
|
|
|
168
172
|
"onboarding.assignBuddy": "onboarding.assignBuddy";
|
|
169
173
|
"onboarding.buddySuggestions": "onboarding.buddySuggestions";
|
|
170
174
|
"onboarding.candidates": "onboarding.candidates";
|
|
175
|
+
"onboarding.completeTodo": "onboarding.completeTodo";
|
|
171
176
|
"onboarding.enroll": "onboarding.enroll";
|
|
172
177
|
"onboarding.enrollmentPreview": "onboarding.enrollmentPreview";
|
|
173
178
|
"onboarding.firstDaysCheckIns": "onboarding.firstDaysCheckIns";
|
|
174
179
|
"onboarding.firstDaysResults": "onboarding.firstDaysResults";
|
|
180
|
+
"onboarding.journey": "onboarding.journey";
|
|
175
181
|
"onboarding.mine": "onboarding.mine";
|
|
176
182
|
"onboarding.person": "onboarding.person";
|
|
177
183
|
"onboarding.previewEnrollment": "onboarding.previewEnrollment";
|
|
@@ -294,6 +300,7 @@ export declare const permissionSchema: z.ZodEnum<{
|
|
|
294
300
|
"teams.saveSlackProfileLink": "teams.saveSlackProfileLink";
|
|
295
301
|
"teams.setup": "teams.setup";
|
|
296
302
|
"teams.slackChannels": "teams.slackChannels";
|
|
303
|
+
"teams.slackConnection": "teams.slackConnection";
|
|
297
304
|
"teams.slackJoinAccess": "teams.slackJoinAccess";
|
|
298
305
|
"teams.slackProfileLink": "teams.slackProfileLink";
|
|
299
306
|
"teams.status": "teams.status";
|
|
@@ -310,6 +317,7 @@ export declare const permissionSchema: z.ZodEnum<{
|
|
|
310
317
|
"users.details": "users.details";
|
|
311
318
|
"users.filterOptions": "users.filterOptions";
|
|
312
319
|
"users.get": "users.get";
|
|
320
|
+
"users.glance": "users.glance";
|
|
313
321
|
"users.list": "users.list";
|
|
314
322
|
"users.managerHistory": "users.managerHistory";
|
|
315
323
|
"users.managers": "users.managers";
|
|
@@ -366,8 +374,10 @@ export declare const permissionDefinitionSchema: z.ZodObject<{
|
|
|
366
374
|
"celebrations.removeCardNote": "celebrations.removeCardNote";
|
|
367
375
|
"celebrations.review": "celebrations.review";
|
|
368
376
|
"celebrations.save": "celebrations.save";
|
|
377
|
+
"celebrations.saveAnniversaryDate": "celebrations.saveAnniversaryDate";
|
|
369
378
|
"celebrations.savePreferences": "celebrations.savePreferences";
|
|
370
379
|
"celebrations.signCard": "celebrations.signCard";
|
|
380
|
+
"celebrations.startDates": "celebrations.startDates";
|
|
371
381
|
"channels.list": "channels.list";
|
|
372
382
|
"commands.get": "commands.get";
|
|
373
383
|
"communities.archive": "communities.archive";
|
|
@@ -407,6 +417,7 @@ export declare const permissionDefinitionSchema: z.ZodObject<{
|
|
|
407
417
|
"getStarted.intro": "getStarted.intro";
|
|
408
418
|
"getStarted.wizard": "getStarted.wizard";
|
|
409
419
|
"home.feed": "home.feed";
|
|
420
|
+
"home.places": "home.places";
|
|
410
421
|
"home.preferences": "home.preferences";
|
|
411
422
|
"home.react": "home.react";
|
|
412
423
|
"home.story": "home.story";
|
|
@@ -416,6 +427,7 @@ export declare const permissionDefinitionSchema: z.ZodObject<{
|
|
|
416
427
|
"hr.deliver": "hr.deliver";
|
|
417
428
|
"hr.get": "hr.get";
|
|
418
429
|
"hr.list": "hr.list";
|
|
430
|
+
"hr.mine": "hr.mine";
|
|
419
431
|
"hr.readiness": "hr.readiness";
|
|
420
432
|
"hr.rebuildCategories": "hr.rebuildCategories";
|
|
421
433
|
"hr.renameTeam": "hr.renameTeam";
|
|
@@ -481,10 +493,12 @@ export declare const permissionDefinitionSchema: z.ZodObject<{
|
|
|
481
493
|
"onboarding.assignBuddy": "onboarding.assignBuddy";
|
|
482
494
|
"onboarding.buddySuggestions": "onboarding.buddySuggestions";
|
|
483
495
|
"onboarding.candidates": "onboarding.candidates";
|
|
496
|
+
"onboarding.completeTodo": "onboarding.completeTodo";
|
|
484
497
|
"onboarding.enroll": "onboarding.enroll";
|
|
485
498
|
"onboarding.enrollmentPreview": "onboarding.enrollmentPreview";
|
|
486
499
|
"onboarding.firstDaysCheckIns": "onboarding.firstDaysCheckIns";
|
|
487
500
|
"onboarding.firstDaysResults": "onboarding.firstDaysResults";
|
|
501
|
+
"onboarding.journey": "onboarding.journey";
|
|
488
502
|
"onboarding.mine": "onboarding.mine";
|
|
489
503
|
"onboarding.person": "onboarding.person";
|
|
490
504
|
"onboarding.previewEnrollment": "onboarding.previewEnrollment";
|
|
@@ -607,6 +621,7 @@ export declare const permissionDefinitionSchema: z.ZodObject<{
|
|
|
607
621
|
"teams.saveSlackProfileLink": "teams.saveSlackProfileLink";
|
|
608
622
|
"teams.setup": "teams.setup";
|
|
609
623
|
"teams.slackChannels": "teams.slackChannels";
|
|
624
|
+
"teams.slackConnection": "teams.slackConnection";
|
|
610
625
|
"teams.slackJoinAccess": "teams.slackJoinAccess";
|
|
611
626
|
"teams.slackProfileLink": "teams.slackProfileLink";
|
|
612
627
|
"teams.status": "teams.status";
|
|
@@ -623,6 +638,7 @@ export declare const permissionDefinitionSchema: z.ZodObject<{
|
|
|
623
638
|
"users.details": "users.details";
|
|
624
639
|
"users.filterOptions": "users.filterOptions";
|
|
625
640
|
"users.get": "users.get";
|
|
641
|
+
"users.glance": "users.glance";
|
|
626
642
|
"users.list": "users.list";
|
|
627
643
|
"users.managerHistory": "users.managerHistory";
|
|
628
644
|
"users.managers": "users.managers";
|
package/dist/permissions.js
CHANGED
|
@@ -92,7 +92,9 @@ const operationDescriptions = {
|
|
|
92
92
|
'celebrations.program': 'Read the Celebrations settings',
|
|
93
93
|
'celebrations.refresh': 'Look for new birthdays and work anniversaries to celebrate now',
|
|
94
94
|
'celebrations.review': 'Review upcoming birthdays and work anniversaries',
|
|
95
|
+
'celebrations.saveAnniversaryDate': 'Choose which start date work anniversaries count from',
|
|
95
96
|
'celebrations.savePreferences': 'Save your birthday and work anniversary sharing preferences',
|
|
97
|
+
'celebrations.startDates': 'Read which start date anniversaries count from and the start dates that look wrong',
|
|
96
98
|
'communities.archive': 'Archive a community',
|
|
97
99
|
'communities.join': 'Join a community',
|
|
98
100
|
'communities.leave': 'Leave a community',
|
|
@@ -106,6 +108,7 @@ const operationDescriptions = {
|
|
|
106
108
|
'hr.command': 'Claim, release, reply to, note, categorize, resolve or reopen an HR request',
|
|
107
109
|
'hr.get': 'Read one HR request and its messages',
|
|
108
110
|
'hr.list': 'List the HR requests you asked or can answer',
|
|
111
|
+
'hr.mine': 'List the HR requests you asked, with HR’s latest reply',
|
|
109
112
|
'hr.readiness': 'Check whether HR requests have a destination and someone to answer them',
|
|
110
113
|
'hr.renameTeam': 'Rename the HR team employees send requests to',
|
|
111
114
|
'hr.settings': 'Read the HR team name and who answers HR requests',
|
|
@@ -187,6 +190,7 @@ const operationDescriptions = {
|
|
|
187
190
|
'teams.saveSlackProfileLink': 'Turn the Shuffl profile link on Slack profiles on or off',
|
|
188
191
|
'teams.setup': "Read the workspace's setup checklist",
|
|
189
192
|
'teams.slackChannels': 'List community channels in the connected Slack and what each would become',
|
|
193
|
+
'teams.slackConnection': "Read whether the workspace's Slack is connected, and why not",
|
|
190
194
|
'teams.slackJoinAccess': 'Read whether Slack members can join Shuffl on their own',
|
|
191
195
|
'teams.slackProfileLink': 'Read the Shuffl profile link setting for Slack profiles',
|
|
192
196
|
'teams.status': 'Pause or resume the whole workspace',
|
package/dist/schemas.d.ts
CHANGED
|
@@ -14,6 +14,7 @@ export declare const strategySchema: z.ZodEnum<{
|
|
|
14
14
|
}>;
|
|
15
15
|
export declare const nativeScheduleSchema: z.ZodObject<{
|
|
16
16
|
anchor: z.ZodString;
|
|
17
|
+
days: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
17
18
|
frequency: z.ZodEnum<{
|
|
18
19
|
days: "days";
|
|
19
20
|
hours: "hours";
|
|
@@ -84,6 +85,7 @@ export declare const legacyMonthlyScheduleSchema: z.ZodUnion<readonly [z.ZodObje
|
|
|
84
85
|
}, z.core.$strict>]>;
|
|
85
86
|
export declare const scheduleSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
86
87
|
anchor: z.ZodString;
|
|
88
|
+
days: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
87
89
|
frequency: z.ZodEnum<{
|
|
88
90
|
days: "days";
|
|
89
91
|
hours: "hours";
|
|
@@ -260,6 +262,7 @@ export declare const programInput: z.ZodObject<{
|
|
|
260
262
|
name: z.ZodString;
|
|
261
263
|
schedule: z.ZodUnion<readonly [z.ZodObject<{
|
|
262
264
|
anchor: z.ZodString;
|
|
265
|
+
days: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
263
266
|
frequency: z.ZodEnum<{
|
|
264
267
|
days: "days";
|
|
265
268
|
hours: "hours";
|
package/dist/schemas.js
CHANGED
|
@@ -17,6 +17,13 @@ export const strategySchema = z.enum([
|
|
|
17
17
|
export const nativeScheduleSchema = z
|
|
18
18
|
.object({
|
|
19
19
|
anchor: z.string().max(100),
|
|
20
|
+
// ISO weekdays, 1 = Monday (#1628).
|
|
21
|
+
days: z
|
|
22
|
+
.array(z.number().int().min(1).max(7))
|
|
23
|
+
.min(1, 'Choose at least one day')
|
|
24
|
+
.max(7)
|
|
25
|
+
.refine((d) => new Set(d).size === d.length, 'Choose each day once')
|
|
26
|
+
.optional(),
|
|
20
27
|
frequency: z.enum([
|
|
21
28
|
'minutes',
|
|
22
29
|
'hours',
|
|
@@ -31,7 +38,18 @@ export const nativeScheduleSchema = z
|
|
|
31
38
|
})
|
|
32
39
|
.superRefine((rule, ctx) => {
|
|
33
40
|
try {
|
|
34
|
-
Temporal.PlainDateTime.from(rule.anchor)
|
|
41
|
+
const anchor = Temporal.PlainDateTime.from(rule.anchor);
|
|
42
|
+
anchor.toZonedDateTime(rule.timezone);
|
|
43
|
+
// Every 7th day from a Sunday never lands on a Monday.
|
|
44
|
+
if (rule.frequency === 'days' &&
|
|
45
|
+
rule.days &&
|
|
46
|
+
rule.interval % 7 === 0 &&
|
|
47
|
+
!rule.days.includes(anchor.dayOfWeek))
|
|
48
|
+
ctx.addIssue({
|
|
49
|
+
code: 'custom',
|
|
50
|
+
message: 'Choose the first occurrence’s day, or a shorter interval',
|
|
51
|
+
path: ['days'],
|
|
52
|
+
});
|
|
35
53
|
}
|
|
36
54
|
catch {
|
|
37
55
|
ctx.addIssue({
|