@shuffl/api-contracts 0.2.1 → 0.3.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/index.d.ts +394 -13
- package/dist/management-operations.d.ts +1 -1
- package/dist/management-operations.js +43 -0
- package/dist/management.generated.d.ts +371 -13
- package/dist/management.generated.js +436 -8
- package/dist/permissions.d.ts +14 -0
- package/dist/permissions.js +4 -0
- package/dist/schemas.d.ts +3 -0
- package/dist/schemas.js +19 -1
- package/openapi.json +6947 -2181
- package/package.json +1 -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";
|
|
@@ -172,6 +176,7 @@ export declare const permissionSchema: z.ZodEnum<{
|
|
|
172
176
|
"onboarding.enrollmentPreview": "onboarding.enrollmentPreview";
|
|
173
177
|
"onboarding.firstDaysCheckIns": "onboarding.firstDaysCheckIns";
|
|
174
178
|
"onboarding.firstDaysResults": "onboarding.firstDaysResults";
|
|
179
|
+
"onboarding.journey": "onboarding.journey";
|
|
175
180
|
"onboarding.mine": "onboarding.mine";
|
|
176
181
|
"onboarding.person": "onboarding.person";
|
|
177
182
|
"onboarding.previewEnrollment": "onboarding.previewEnrollment";
|
|
@@ -294,6 +299,7 @@ export declare const permissionSchema: z.ZodEnum<{
|
|
|
294
299
|
"teams.saveSlackProfileLink": "teams.saveSlackProfileLink";
|
|
295
300
|
"teams.setup": "teams.setup";
|
|
296
301
|
"teams.slackChannels": "teams.slackChannels";
|
|
302
|
+
"teams.slackConnection": "teams.slackConnection";
|
|
297
303
|
"teams.slackJoinAccess": "teams.slackJoinAccess";
|
|
298
304
|
"teams.slackProfileLink": "teams.slackProfileLink";
|
|
299
305
|
"teams.status": "teams.status";
|
|
@@ -310,6 +316,7 @@ export declare const permissionSchema: z.ZodEnum<{
|
|
|
310
316
|
"users.details": "users.details";
|
|
311
317
|
"users.filterOptions": "users.filterOptions";
|
|
312
318
|
"users.get": "users.get";
|
|
319
|
+
"users.glance": "users.glance";
|
|
313
320
|
"users.list": "users.list";
|
|
314
321
|
"users.managerHistory": "users.managerHistory";
|
|
315
322
|
"users.managers": "users.managers";
|
|
@@ -366,8 +373,10 @@ export declare const permissionDefinitionSchema: z.ZodObject<{
|
|
|
366
373
|
"celebrations.removeCardNote": "celebrations.removeCardNote";
|
|
367
374
|
"celebrations.review": "celebrations.review";
|
|
368
375
|
"celebrations.save": "celebrations.save";
|
|
376
|
+
"celebrations.saveAnniversaryDate": "celebrations.saveAnniversaryDate";
|
|
369
377
|
"celebrations.savePreferences": "celebrations.savePreferences";
|
|
370
378
|
"celebrations.signCard": "celebrations.signCard";
|
|
379
|
+
"celebrations.startDates": "celebrations.startDates";
|
|
371
380
|
"channels.list": "channels.list";
|
|
372
381
|
"commands.get": "commands.get";
|
|
373
382
|
"communities.archive": "communities.archive";
|
|
@@ -407,6 +416,7 @@ export declare const permissionDefinitionSchema: z.ZodObject<{
|
|
|
407
416
|
"getStarted.intro": "getStarted.intro";
|
|
408
417
|
"getStarted.wizard": "getStarted.wizard";
|
|
409
418
|
"home.feed": "home.feed";
|
|
419
|
+
"home.places": "home.places";
|
|
410
420
|
"home.preferences": "home.preferences";
|
|
411
421
|
"home.react": "home.react";
|
|
412
422
|
"home.story": "home.story";
|
|
@@ -416,6 +426,7 @@ export declare const permissionDefinitionSchema: z.ZodObject<{
|
|
|
416
426
|
"hr.deliver": "hr.deliver";
|
|
417
427
|
"hr.get": "hr.get";
|
|
418
428
|
"hr.list": "hr.list";
|
|
429
|
+
"hr.mine": "hr.mine";
|
|
419
430
|
"hr.readiness": "hr.readiness";
|
|
420
431
|
"hr.rebuildCategories": "hr.rebuildCategories";
|
|
421
432
|
"hr.renameTeam": "hr.renameTeam";
|
|
@@ -485,6 +496,7 @@ export declare const permissionDefinitionSchema: z.ZodObject<{
|
|
|
485
496
|
"onboarding.enrollmentPreview": "onboarding.enrollmentPreview";
|
|
486
497
|
"onboarding.firstDaysCheckIns": "onboarding.firstDaysCheckIns";
|
|
487
498
|
"onboarding.firstDaysResults": "onboarding.firstDaysResults";
|
|
499
|
+
"onboarding.journey": "onboarding.journey";
|
|
488
500
|
"onboarding.mine": "onboarding.mine";
|
|
489
501
|
"onboarding.person": "onboarding.person";
|
|
490
502
|
"onboarding.previewEnrollment": "onboarding.previewEnrollment";
|
|
@@ -607,6 +619,7 @@ export declare const permissionDefinitionSchema: z.ZodObject<{
|
|
|
607
619
|
"teams.saveSlackProfileLink": "teams.saveSlackProfileLink";
|
|
608
620
|
"teams.setup": "teams.setup";
|
|
609
621
|
"teams.slackChannels": "teams.slackChannels";
|
|
622
|
+
"teams.slackConnection": "teams.slackConnection";
|
|
610
623
|
"teams.slackJoinAccess": "teams.slackJoinAccess";
|
|
611
624
|
"teams.slackProfileLink": "teams.slackProfileLink";
|
|
612
625
|
"teams.status": "teams.status";
|
|
@@ -623,6 +636,7 @@ export declare const permissionDefinitionSchema: z.ZodObject<{
|
|
|
623
636
|
"users.details": "users.details";
|
|
624
637
|
"users.filterOptions": "users.filterOptions";
|
|
625
638
|
"users.get": "users.get";
|
|
639
|
+
"users.glance": "users.glance";
|
|
626
640
|
"users.list": "users.list";
|
|
627
641
|
"users.managerHistory": "users.managerHistory";
|
|
628
642
|
"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({
|