@incident-io/pulumi 0.1.0-alpha.1
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/LICENSE +7 -0
- package/README.md +69 -0
- package/alertAttribute.d.ts +230 -0
- package/alertAttribute.d.ts.map +1 -0
- package/alertAttribute.js +219 -0
- package/alertAttribute.js.map +1 -0
- package/alertRoute.d.ts +511 -0
- package/alertRoute.d.ts.map +1 -0
- package/alertRoute.js +432 -0
- package/alertRoute.js.map +1 -0
- package/alertSource.d.ts +347 -0
- package/alertSource.d.ts.map +1 -0
- package/alertSource.js +241 -0
- package/alertSource.js.map +1 -0
- package/alertSourceAttribute.d.ts +180 -0
- package/alertSourceAttribute.d.ts.map +1 -0
- package/alertSourceAttribute.js +107 -0
- package/alertSourceAttribute.js.map +1 -0
- package/alertSourceAttributeBeta.d.ts +188 -0
- package/alertSourceAttributeBeta.d.ts.map +1 -0
- package/alertSourceAttributeBeta.js +115 -0
- package/alertSourceAttributeBeta.js.map +1 -0
- package/alertSourceBeta.d.ts +244 -0
- package/alertSourceBeta.d.ts.map +1 -0
- package/alertSourceBeta.js +138 -0
- package/alertSourceBeta.js.map +1 -0
- package/apiKey.d.ts +276 -0
- package/apiKey.d.ts.map +1 -0
- package/apiKey.js +211 -0
- package/apiKey.js.map +1 -0
- package/catalogEntries.d.ts +241 -0
- package/catalogEntries.d.ts.map +1 -0
- package/catalogEntries.js +242 -0
- package/catalogEntries.js.map +1 -0
- package/catalogEntry.d.ts +183 -0
- package/catalogEntry.d.ts.map +1 -0
- package/catalogEntry.js +159 -0
- package/catalogEntry.js.map +1 -0
- package/catalogType.d.ts +169 -0
- package/catalogType.d.ts.map +1 -0
- package/catalogType.js +132 -0
- package/catalogType.js.map +1 -0
- package/catalogTypeAttribute.d.ts +190 -0
- package/catalogTypeAttribute.d.ts.map +1 -0
- package/catalogTypeAttribute.js +153 -0
- package/catalogTypeAttribute.js.map +1 -0
- package/config/index.d.ts +2 -0
- package/config/index.d.ts.map +1 -0
- package/config/index.js +21 -0
- package/config/index.js.map +1 -0
- package/config/vars.d.ts +13 -0
- package/config/vars.d.ts.map +1 -0
- package/config/vars.js +49 -0
- package/config/vars.js.map +1 -0
- package/customField.d.ts +260 -0
- package/customField.d.ts.map +1 -0
- package/customField.js +226 -0
- package/customField.js.map +1 -0
- package/customFieldOption.d.ts +107 -0
- package/customFieldOption.d.ts.map +1 -0
- package/customFieldOption.js +116 -0
- package/customFieldOption.js.map +1 -0
- package/escalationPath.d.ts +257 -0
- package/escalationPath.d.ts.map +1 -0
- package/escalationPath.js +228 -0
- package/escalationPath.js.map +1 -0
- package/escalationPathBeta.d.ts +134 -0
- package/escalationPathBeta.d.ts.map +1 -0
- package/escalationPathBeta.js +105 -0
- package/escalationPathBeta.js.map +1 -0
- package/getAlertAttribute.d.ts +81 -0
- package/getAlertAttribute.d.ts.map +1 -0
- package/getAlertAttribute.js +75 -0
- package/getAlertAttribute.js.map +1 -0
- package/getAlertSource.d.ts +169 -0
- package/getAlertSource.d.ts.map +1 -0
- package/getAlertSource.js +103 -0
- package/getAlertSource.js.map +1 -0
- package/getAlertSourceAttribute.d.ts +131 -0
- package/getAlertSourceAttribute.d.ts.map +1 -0
- package/getAlertSourceAttribute.js +85 -0
- package/getAlertSourceAttribute.js.map +1 -0
- package/getAlertSourceAttributeBeta.d.ts +131 -0
- package/getAlertSourceAttributeBeta.d.ts.map +1 -0
- package/getAlertSourceAttributeBeta.js +85 -0
- package/getAlertSourceAttributeBeta.js.map +1 -0
- package/getApiKey.d.ts +167 -0
- package/getApiKey.d.ts.map +1 -0
- package/getApiKey.js +145 -0
- package/getApiKey.js.map +1 -0
- package/getCatalogEntry.d.ts +77 -0
- package/getCatalogEntry.d.ts.map +1 -0
- package/getCatalogEntry.js +59 -0
- package/getCatalogEntry.js.map +1 -0
- package/getCatalogType.d.ts +163 -0
- package/getCatalogType.d.ts.map +1 -0
- package/getCatalogType.js +135 -0
- package/getCatalogType.js.map +1 -0
- package/getCatalogTypeAttribute.d.ts +73 -0
- package/getCatalogTypeAttribute.d.ts.map +1 -0
- package/getCatalogTypeAttribute.js +53 -0
- package/getCatalogTypeAttribute.js.map +1 -0
- package/getCustomField.d.ts +67 -0
- package/getCustomField.d.ts.map +1 -0
- package/getCustomField.js +51 -0
- package/getCustomField.js.map +1 -0
- package/getCustomFieldOption.d.ts +65 -0
- package/getCustomFieldOption.d.ts.map +1 -0
- package/getCustomFieldOption.js +55 -0
- package/getCustomFieldOption.js.map +1 -0
- package/getEscalationPath.d.ts +100 -0
- package/getEscalationPath.d.ts.map +1 -0
- package/getEscalationPath.js +83 -0
- package/getEscalationPath.js.map +1 -0
- package/getEscalationPathBeta.d.ts +100 -0
- package/getEscalationPathBeta.d.ts.map +1 -0
- package/getEscalationPathBeta.js +83 -0
- package/getEscalationPathBeta.js.map +1 -0
- package/getIncidentRole.d.ts +111 -0
- package/getIncidentRole.d.ts.map +1 -0
- package/getIncidentRole.js +105 -0
- package/getIncidentRole.js.map +1 -0
- package/getIncidentTemplate.d.ts +98 -0
- package/getIncidentTemplate.d.ts.map +1 -0
- package/getIncidentTemplate.js +95 -0
- package/getIncidentTemplate.js.map +1 -0
- package/getIncidentTimestamp.d.ts +107 -0
- package/getIncidentTimestamp.d.ts.map +1 -0
- package/getIncidentTimestamp.js +109 -0
- package/getIncidentTimestamp.js.map +1 -0
- package/getIncidentType.d.ts +121 -0
- package/getIncidentType.d.ts.map +1 -0
- package/getIncidentType.js +107 -0
- package/getIncidentType.js.map +1 -0
- package/getIpAllowlist.d.ts +62 -0
- package/getIpAllowlist.d.ts.map +1 -0
- package/getIpAllowlist.js +77 -0
- package/getIpAllowlist.js.map +1 -0
- package/getPolicy.d.ts +97 -0
- package/getPolicy.d.ts.map +1 -0
- package/getPolicy.js +91 -0
- package/getPolicy.js.map +1 -0
- package/getRichText.d.ts +111 -0
- package/getRichText.d.ts.map +1 -0
- package/getRichText.js +107 -0
- package/getRichText.js.map +1 -0
- package/getSchedule.d.ts +89 -0
- package/getSchedule.d.ts.map +1 -0
- package/getSchedule.js +87 -0
- package/getSchedule.js.map +1 -0
- package/getScheduleBeta.d.ts +85 -0
- package/getScheduleBeta.d.ts.map +1 -0
- package/getScheduleBeta.js +83 -0
- package/getScheduleBeta.js.map +1 -0
- package/getScheduleReplica.d.ts +116 -0
- package/getScheduleReplica.d.ts.map +1 -0
- package/getScheduleReplica.js +79 -0
- package/getScheduleReplica.js.map +1 -0
- package/getScheduleRotation.d.ts +166 -0
- package/getScheduleRotation.d.ts.map +1 -0
- package/getScheduleRotation.js +127 -0
- package/getScheduleRotation.js.map +1 -0
- package/getScheduleRotationBeta.d.ts +122 -0
- package/getScheduleRotationBeta.d.ts.map +1 -0
- package/getScheduleRotationBeta.js +83 -0
- package/getScheduleRotationBeta.js.map +1 -0
- package/getScheduleSyncRule.d.ts +91 -0
- package/getScheduleSyncRule.d.ts.map +1 -0
- package/getScheduleSyncRule.js +79 -0
- package/getScheduleSyncRule.js.map +1 -0
- package/getScheduleSyncTarget.d.ts +100 -0
- package/getScheduleSyncTarget.d.ts.map +1 -0
- package/getScheduleSyncTarget.js +93 -0
- package/getScheduleSyncTarget.js.map +1 -0
- package/getSecret.d.ts +115 -0
- package/getSecret.d.ts.map +1 -0
- package/getSecret.js +97 -0
- package/getSecret.js.map +1 -0
- package/getSeverity.d.ts +117 -0
- package/getSeverity.d.ts.map +1 -0
- package/getSeverity.js +115 -0
- package/getSeverity.js.map +1 -0
- package/getStatus.d.ts +125 -0
- package/getStatus.d.ts.map +1 -0
- package/getStatus.js +119 -0
- package/getStatus.js.map +1 -0
- package/getUser.d.ts +52 -0
- package/getUser.d.ts.map +1 -0
- package/getUser.js +61 -0
- package/getUser.js.map +1 -0
- package/getWorkflow.d.ts +103 -0
- package/getWorkflow.d.ts.map +1 -0
- package/getWorkflow.js +77 -0
- package/getWorkflow.js.map +1 -0
- package/incidentRole.d.ts +109 -0
- package/incidentRole.d.ts.map +1 -0
- package/incidentRole.js +111 -0
- package/incidentRole.js.map +1 -0
- package/incidentTemplate.d.ts +200 -0
- package/incidentTemplate.d.ts.map +1 -0
- package/incidentTemplate.js +207 -0
- package/incidentTemplate.js.map +1 -0
- package/index.d.ts +188 -0
- package/index.d.ts.map +1 -0
- package/index.js +303 -0
- package/index.js.map +1 -0
- package/maintenanceWindow.d.ts +255 -0
- package/maintenanceWindow.d.ts.map +1 -0
- package/maintenanceWindow.js +148 -0
- package/maintenanceWindow.js.map +1 -0
- package/package.json +33 -0
- package/policy.d.ts +476 -0
- package/policy.d.ts.map +1 -0
- package/policy.js +387 -0
- package/policy.js.map +1 -0
- package/provider.d.ts +62 -0
- package/provider.d.ts.map +1 -0
- package/provider.js +80 -0
- package/provider.js.map +1 -0
- package/schedule.d.ts +120 -0
- package/schedule.d.ts.map +1 -0
- package/schedule.js +114 -0
- package/schedule.js.map +1 -0
- package/scheduleBeta.d.ts +104 -0
- package/scheduleBeta.d.ts.map +1 -0
- package/scheduleBeta.js +98 -0
- package/scheduleBeta.js.map +1 -0
- package/scheduleReplica.d.ts +178 -0
- package/scheduleReplica.d.ts.map +1 -0
- package/scheduleReplica.js +134 -0
- package/scheduleReplica.js.map +1 -0
- package/scheduleRotation.d.ts +287 -0
- package/scheduleRotation.d.ts.map +1 -0
- package/scheduleRotation.js +224 -0
- package/scheduleRotation.js.map +1 -0
- package/scheduleRotationBeta.d.ts +184 -0
- package/scheduleRotationBeta.d.ts.map +1 -0
- package/scheduleRotationBeta.js +121 -0
- package/scheduleRotationBeta.js.map +1 -0
- package/scheduleSyncRule.d.ts +154 -0
- package/scheduleSyncRule.d.ts.map +1 -0
- package/scheduleSyncRule.js +146 -0
- package/scheduleSyncRule.js.map +1 -0
- package/scheduleSyncTarget.d.ts +108 -0
- package/scheduleSyncTarget.d.ts.map +1 -0
- package/scheduleSyncTarget.js +106 -0
- package/scheduleSyncTarget.js.map +1 -0
- package/secret.d.ts +276 -0
- package/secret.d.ts.map +1 -0
- package/secret.js +234 -0
- package/secret.js.map +1 -0
- package/severity.d.ts +96 -0
- package/severity.d.ts.map +1 -0
- package/severity.js +102 -0
- package/severity.js.map +1 -0
- package/status.d.ts +121 -0
- package/status.d.ts.map +1 -0
- package/status.js +120 -0
- package/status.js.map +1 -0
- package/types/index.d.ts +4 -0
- package/types/index.d.ts.map +1 -0
- package/types/index.js +34 -0
- package/types/index.js.map +1 -0
- package/types/input.d.ts +23630 -0
- package/types/input.d.ts.map +1 -0
- package/types/input.js +5 -0
- package/types/input.js.map +1 -0
- package/types/output.d.ts +19726 -0
- package/types/output.d.ts.map +1 -0
- package/types/output.js +5 -0
- package/types/output.js.map +1 -0
- package/utilities.d.ts +5 -0
- package/utilities.d.ts.map +1 -0
- package/utilities.js +114 -0
- package/utilities.js.map +1 -0
- package/workflow.d.ts +736 -0
- package/workflow.d.ts.map +1 -0
- package/workflow.js +608 -0
- package/workflow.js.map +1 -0
|
@@ -0,0 +1,287 @@
|
|
|
1
|
+
import * as pulumi from "@pulumi/pulumi";
|
|
2
|
+
import * as inputs from "./types/input";
|
|
3
|
+
import * as outputs from "./types/output";
|
|
4
|
+
/**
|
|
5
|
+
* Manage a rotation on an on-call schedule.
|
|
6
|
+
*
|
|
7
|
+
* A rotation is a group of people who take turns being on call, and the cadence they
|
|
8
|
+
* hand over on. A schedule can hold several, and each is managed independently — so
|
|
9
|
+
* changing one never rewrites the others.
|
|
10
|
+
*
|
|
11
|
+
* Editing a rotation takes effect straight away, unless `rollout` says otherwise.
|
|
12
|
+
*
|
|
13
|
+
* ## Changing when shifts hand over
|
|
14
|
+
*
|
|
15
|
+
* `firstIntervalStartsAt` is the point intervals are counted from. With
|
|
16
|
+
* `handovers` it fixes the time of day and day of week that shifts change hands —
|
|
17
|
+
* the dashboard calls it the handover time.
|
|
18
|
+
*
|
|
19
|
+
* It can't change in the same apply as `rollout`. Whenever `rollout` is set the
|
|
20
|
+
* rotation keeps the interval start it already runs: an immediate rollout copies that
|
|
21
|
+
* across so the cadence doesn't move, and a phased one works backwards from the next
|
|
22
|
+
* handover so the new line-up slots into the rhythm people are already working. Either
|
|
23
|
+
* way a new `firstIntervalStartsAt` is discarded, so the provider stops the apply
|
|
24
|
+
* rather than storing a value that won't be kept.
|
|
25
|
+
*
|
|
26
|
+
* To change both, take it in two applies:
|
|
27
|
+
*
|
|
28
|
+
* 1. Change `firstIntervalStartsAt` on its own, with `rollout` unset. The new
|
|
29
|
+
* cadence takes effect straight away.
|
|
30
|
+
* 2. Then make the line-up change, with `rollout` set.
|
|
31
|
+
*
|
|
32
|
+
* ## Choosing a scheduling mode
|
|
33
|
+
*
|
|
34
|
+
* `schedulingMode` decides who takes the next shift.
|
|
35
|
+
*
|
|
36
|
+
* `fair` shares time on call out evenly, tracking how much each person has already
|
|
37
|
+
* done and giving the next shift to whoever is behind. Someone newly added has done
|
|
38
|
+
* none, so `fair` tends to bring them on call sooner rather than adding them to
|
|
39
|
+
* the back of the queue.
|
|
40
|
+
*
|
|
41
|
+
* `sequential` goes around the list in order, so the next person on call is always
|
|
42
|
+
* the one after the last.
|
|
43
|
+
*
|
|
44
|
+
* For an even rotation — everyone on for the same length of time, no working hours,
|
|
45
|
+
* nobody joining or leaving — the two behave identically. They only diverge once
|
|
46
|
+
* shifts differ in length, `workingIntervals` is set, or the list of users
|
|
47
|
+
* changes. Reach for `sequential` when it matters that the running order is
|
|
48
|
+
* obvious to the people in it.
|
|
49
|
+
*
|
|
50
|
+
* ## Upgrading from v6
|
|
51
|
+
*
|
|
52
|
+
* Before v7, a rotation was declared inline on `incident.Schedule`, in its
|
|
53
|
+
* `rotations` attribute. It is now its own resource. See `incident.Schedule`
|
|
54
|
+
* for what that changes and how to import the rotations you already have.
|
|
55
|
+
*
|
|
56
|
+
* ## Example Usage
|
|
57
|
+
*
|
|
58
|
+
* ```typescript
|
|
59
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
60
|
+
* import * as incident from "@incident-io/pulumi";
|
|
61
|
+
*
|
|
62
|
+
* // A rotation is a group of people who take turns being on call. Each one is managed
|
|
63
|
+
* // on its own, so editing this rotation doesn't touch the others on the schedule.
|
|
64
|
+
* const primary = new incident.ScheduleRotation("primary", {
|
|
65
|
+
* scheduleId: platform.id,
|
|
66
|
+
* name: "Primary",
|
|
67
|
+
* users: [
|
|
68
|
+
* alice.id,
|
|
69
|
+
* bob.id,
|
|
70
|
+
* ],
|
|
71
|
+
* firstIntervalStartsAt: "2024-01-08T09:00:00Z",
|
|
72
|
+
* handovers: [{
|
|
73
|
+
* interval: 1,
|
|
74
|
+
* intervalType: "weekly",
|
|
75
|
+
* }],
|
|
76
|
+
* });
|
|
77
|
+
* // A rotation that only covers weekday working hours, with two people on call at
|
|
78
|
+
* // once and a place in the schedule's running order.
|
|
79
|
+
* const businessHours = new incident.ScheduleRotation("business_hours", {
|
|
80
|
+
* scheduleId: platform.id,
|
|
81
|
+
* name: "Business hours",
|
|
82
|
+
* rank: 2,
|
|
83
|
+
* users: [
|
|
84
|
+
* alice.id,
|
|
85
|
+
* bob.id,
|
|
86
|
+
* carol.id,
|
|
87
|
+
* ],
|
|
88
|
+
* firstIntervalStartsAt: "2024-01-08T09:00:00Z",
|
|
89
|
+
* handovers: [{
|
|
90
|
+
* interval: 1,
|
|
91
|
+
* intervalType: "daily",
|
|
92
|
+
* }],
|
|
93
|
+
* concurrentShifts: 2,
|
|
94
|
+
* workingIntervals: [
|
|
95
|
+
* {
|
|
96
|
+
* weekday: "monday",
|
|
97
|
+
* startTime: "09:00",
|
|
98
|
+
* endTime: "17:00",
|
|
99
|
+
* },
|
|
100
|
+
* {
|
|
101
|
+
* weekday: "tuesday",
|
|
102
|
+
* startTime: "09:00",
|
|
103
|
+
* endTime: "17:00",
|
|
104
|
+
* },
|
|
105
|
+
* {
|
|
106
|
+
* weekday: "wednesday",
|
|
107
|
+
* startTime: "09:00",
|
|
108
|
+
* endTime: "17:00",
|
|
109
|
+
* },
|
|
110
|
+
* {
|
|
111
|
+
* weekday: "thursday",
|
|
112
|
+
* startTime: "09:00",
|
|
113
|
+
* endTime: "17:00",
|
|
114
|
+
* },
|
|
115
|
+
* {
|
|
116
|
+
* weekday: "friday",
|
|
117
|
+
* startTime: "09:00",
|
|
118
|
+
* endTime: "17:00",
|
|
119
|
+
* },
|
|
120
|
+
* ],
|
|
121
|
+
* });
|
|
122
|
+
* ```
|
|
123
|
+
*/
|
|
124
|
+
export declare class ScheduleRotation extends pulumi.CustomResource {
|
|
125
|
+
/**
|
|
126
|
+
* Get an existing ScheduleRotation resource's state with the given name, ID, and optional extra
|
|
127
|
+
* properties used to qualify the lookup.
|
|
128
|
+
*
|
|
129
|
+
* @param name The _unique_ name of the resulting resource.
|
|
130
|
+
* @param id The _unique_ provider ID of the resource to lookup.
|
|
131
|
+
* @param state Any extra arguments used during the lookup.
|
|
132
|
+
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
133
|
+
*/
|
|
134
|
+
static get(name: string, id: pulumi.Input<pulumi.ID>, state?: ScheduleRotationState, opts?: pulumi.CustomResourceOptions): ScheduleRotation;
|
|
135
|
+
/**
|
|
136
|
+
* Returns true if the given object is an instance of ScheduleRotation. This is designed to work even
|
|
137
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
138
|
+
*/
|
|
139
|
+
static isInstance(obj: any): obj is ScheduleRotation;
|
|
140
|
+
/**
|
|
141
|
+
* How many shifts run at the same time, which is how many people are on call at once. Defaults to 1, one person on call at a time. Reducing this stops scheduling the last of them, and stops any overrides on those shifts from applying.
|
|
142
|
+
*/
|
|
143
|
+
readonly concurrentShifts: pulumi.Output<number>;
|
|
144
|
+
/**
|
|
145
|
+
* When this shape of the rotation took over. Unset when the rotation has only ever had one.
|
|
146
|
+
*/
|
|
147
|
+
readonly effectiveFrom: pulumi.Output<string>;
|
|
148
|
+
/**
|
|
149
|
+
* When the first handover interval starts being counted from, which fixes the time of day and day of week shifts change hands. The dashboard calls this the handover time.. Can't be changed in the same apply as `rollout` — see the resource description for why, and what to do instead.
|
|
150
|
+
*/
|
|
151
|
+
readonly firstIntervalStartsAt: pulumi.Output<string>;
|
|
152
|
+
/**
|
|
153
|
+
* The cadence shifts hand over on, applied in turn
|
|
154
|
+
*/
|
|
155
|
+
readonly handovers: pulumi.Output<outputs.ScheduleRotationHandover[]>;
|
|
156
|
+
/**
|
|
157
|
+
* Human readable name for the rotation, unique within the schedule
|
|
158
|
+
*/
|
|
159
|
+
readonly name: pulumi.Output<string>;
|
|
160
|
+
/**
|
|
161
|
+
* Where this rotation sits in the schedule's running order, lowest first. Unset when it has never been ordered.
|
|
162
|
+
*/
|
|
163
|
+
readonly rank: pulumi.Output<number | undefined>;
|
|
164
|
+
/**
|
|
165
|
+
* How a change to this rotation is introduced: `immediate` replaces the line-up now and can change who is on call this minute, `afterCurrentShift` lets the shift on call finish first, and `afterFullRotation` waits for everyone to have taken a turn. Leave it out to replace the line-up straight away. Creating a rotation ignores it, as there's no shift to protect yet.
|
|
166
|
+
*/
|
|
167
|
+
readonly rollout: pulumi.Output<string | undefined>;
|
|
168
|
+
/**
|
|
169
|
+
* ID of the schedule this rotation belongs to. Changing this replaces the rotation, as a rotation can't move between schedules.
|
|
170
|
+
*/
|
|
171
|
+
readonly scheduleId: pulumi.Output<string>;
|
|
172
|
+
/**
|
|
173
|
+
* How users are allocated across shifts of differing length. Possible values are: `fair`, `sequential`. Omit it to leave us to pick. For an even rotation the two behave identically — see the resource description for when they diverge.
|
|
174
|
+
*/
|
|
175
|
+
readonly schedulingMode: pulumi.Output<string | undefined>;
|
|
176
|
+
/**
|
|
177
|
+
* IDs of the people in the rotation, in the order they take shifts. Use the special ID `NOBODY` for a slot with nobody in it, which schedules the shift without putting anyone on call until an override covers it.
|
|
178
|
+
*/
|
|
179
|
+
readonly users: pulumi.Output<string[]>;
|
|
180
|
+
/**
|
|
181
|
+
* If set, restricts on-call to these weekday intervals. Omit it to keep the rotation on call around the clock. An empty list is not valid, and is rejected at plan time — it would leave a rotation nobody is ever on call for.
|
|
182
|
+
*/
|
|
183
|
+
readonly workingIntervals: pulumi.Output<outputs.ScheduleRotationWorkingInterval[] | undefined>;
|
|
184
|
+
/**
|
|
185
|
+
* Create a ScheduleRotation resource with the given unique name, arguments, and options.
|
|
186
|
+
*
|
|
187
|
+
* @param name The _unique_ name of the resource.
|
|
188
|
+
* @param args The arguments to use to populate this resource's properties.
|
|
189
|
+
* @param opts A bag of options that control this resource's behavior.
|
|
190
|
+
*/
|
|
191
|
+
constructor(name: string, args: ScheduleRotationArgs, opts?: pulumi.CustomResourceOptions);
|
|
192
|
+
}
|
|
193
|
+
/**
|
|
194
|
+
* Input properties used for looking up and filtering ScheduleRotation resources.
|
|
195
|
+
*/
|
|
196
|
+
export interface ScheduleRotationState {
|
|
197
|
+
/**
|
|
198
|
+
* How many shifts run at the same time, which is how many people are on call at once. Defaults to 1, one person on call at a time. Reducing this stops scheduling the last of them, and stops any overrides on those shifts from applying.
|
|
199
|
+
*/
|
|
200
|
+
concurrentShifts?: pulumi.Input<number | undefined>;
|
|
201
|
+
/**
|
|
202
|
+
* When this shape of the rotation took over. Unset when the rotation has only ever had one.
|
|
203
|
+
*/
|
|
204
|
+
effectiveFrom?: pulumi.Input<string | undefined>;
|
|
205
|
+
/**
|
|
206
|
+
* When the first handover interval starts being counted from, which fixes the time of day and day of week shifts change hands. The dashboard calls this the handover time.. Can't be changed in the same apply as `rollout` — see the resource description for why, and what to do instead.
|
|
207
|
+
*/
|
|
208
|
+
firstIntervalStartsAt?: pulumi.Input<string | undefined>;
|
|
209
|
+
/**
|
|
210
|
+
* The cadence shifts hand over on, applied in turn
|
|
211
|
+
*/
|
|
212
|
+
handovers?: pulumi.Input<pulumi.Input<inputs.ScheduleRotationHandover>[] | undefined>;
|
|
213
|
+
/**
|
|
214
|
+
* Human readable name for the rotation, unique within the schedule
|
|
215
|
+
*/
|
|
216
|
+
name?: pulumi.Input<string | undefined>;
|
|
217
|
+
/**
|
|
218
|
+
* Where this rotation sits in the schedule's running order, lowest first. Unset when it has never been ordered.
|
|
219
|
+
*/
|
|
220
|
+
rank?: pulumi.Input<number | undefined>;
|
|
221
|
+
/**
|
|
222
|
+
* How a change to this rotation is introduced: `immediate` replaces the line-up now and can change who is on call this minute, `afterCurrentShift` lets the shift on call finish first, and `afterFullRotation` waits for everyone to have taken a turn. Leave it out to replace the line-up straight away. Creating a rotation ignores it, as there's no shift to protect yet.
|
|
223
|
+
*/
|
|
224
|
+
rollout?: pulumi.Input<string | undefined>;
|
|
225
|
+
/**
|
|
226
|
+
* ID of the schedule this rotation belongs to. Changing this replaces the rotation, as a rotation can't move between schedules.
|
|
227
|
+
*/
|
|
228
|
+
scheduleId?: pulumi.Input<string | undefined>;
|
|
229
|
+
/**
|
|
230
|
+
* How users are allocated across shifts of differing length. Possible values are: `fair`, `sequential`. Omit it to leave us to pick. For an even rotation the two behave identically — see the resource description for when they diverge.
|
|
231
|
+
*/
|
|
232
|
+
schedulingMode?: pulumi.Input<string | undefined>;
|
|
233
|
+
/**
|
|
234
|
+
* IDs of the people in the rotation, in the order they take shifts. Use the special ID `NOBODY` for a slot with nobody in it, which schedules the shift without putting anyone on call until an override covers it.
|
|
235
|
+
*/
|
|
236
|
+
users?: pulumi.Input<pulumi.Input<string>[] | undefined>;
|
|
237
|
+
/**
|
|
238
|
+
* If set, restricts on-call to these weekday intervals. Omit it to keep the rotation on call around the clock. An empty list is not valid, and is rejected at plan time — it would leave a rotation nobody is ever on call for.
|
|
239
|
+
*/
|
|
240
|
+
workingIntervals?: pulumi.Input<pulumi.Input<inputs.ScheduleRotationWorkingInterval>[] | undefined>;
|
|
241
|
+
}
|
|
242
|
+
/**
|
|
243
|
+
* The set of arguments for constructing a ScheduleRotation resource.
|
|
244
|
+
*/
|
|
245
|
+
export interface ScheduleRotationArgs {
|
|
246
|
+
/**
|
|
247
|
+
* How many shifts run at the same time, which is how many people are on call at once. Defaults to 1, one person on call at a time. Reducing this stops scheduling the last of them, and stops any overrides on those shifts from applying.
|
|
248
|
+
*/
|
|
249
|
+
concurrentShifts?: pulumi.Input<number | undefined>;
|
|
250
|
+
/**
|
|
251
|
+
* When the first handover interval starts being counted from, which fixes the time of day and day of week shifts change hands. The dashboard calls this the handover time.. Can't be changed in the same apply as `rollout` — see the resource description for why, and what to do instead.
|
|
252
|
+
*/
|
|
253
|
+
firstIntervalStartsAt: pulumi.Input<string>;
|
|
254
|
+
/**
|
|
255
|
+
* The cadence shifts hand over on, applied in turn
|
|
256
|
+
*/
|
|
257
|
+
handovers: pulumi.Input<pulumi.Input<inputs.ScheduleRotationHandover>[]>;
|
|
258
|
+
/**
|
|
259
|
+
* Human readable name for the rotation, unique within the schedule
|
|
260
|
+
*/
|
|
261
|
+
name?: pulumi.Input<string | undefined>;
|
|
262
|
+
/**
|
|
263
|
+
* Where this rotation sits in the schedule's running order, lowest first. Unset when it has never been ordered.
|
|
264
|
+
*/
|
|
265
|
+
rank?: pulumi.Input<number | undefined>;
|
|
266
|
+
/**
|
|
267
|
+
* How a change to this rotation is introduced: `immediate` replaces the line-up now and can change who is on call this minute, `afterCurrentShift` lets the shift on call finish first, and `afterFullRotation` waits for everyone to have taken a turn. Leave it out to replace the line-up straight away. Creating a rotation ignores it, as there's no shift to protect yet.
|
|
268
|
+
*/
|
|
269
|
+
rollout?: pulumi.Input<string | undefined>;
|
|
270
|
+
/**
|
|
271
|
+
* ID of the schedule this rotation belongs to. Changing this replaces the rotation, as a rotation can't move between schedules.
|
|
272
|
+
*/
|
|
273
|
+
scheduleId: pulumi.Input<string>;
|
|
274
|
+
/**
|
|
275
|
+
* How users are allocated across shifts of differing length. Possible values are: `fair`, `sequential`. Omit it to leave us to pick. For an even rotation the two behave identically — see the resource description for when they diverge.
|
|
276
|
+
*/
|
|
277
|
+
schedulingMode?: pulumi.Input<string | undefined>;
|
|
278
|
+
/**
|
|
279
|
+
* IDs of the people in the rotation, in the order they take shifts. Use the special ID `NOBODY` for a slot with nobody in it, which schedules the shift without putting anyone on call until an override covers it.
|
|
280
|
+
*/
|
|
281
|
+
users: pulumi.Input<pulumi.Input<string>[]>;
|
|
282
|
+
/**
|
|
283
|
+
* If set, restricts on-call to these weekday intervals. Omit it to keep the rotation on call around the clock. An empty list is not valid, and is rejected at plan time — it would leave a rotation nobody is ever on call for.
|
|
284
|
+
*/
|
|
285
|
+
workingIntervals?: pulumi.Input<pulumi.Input<inputs.ScheduleRotationWorkingInterval>[] | undefined>;
|
|
286
|
+
}
|
|
287
|
+
//# sourceMappingURL=scheduleRotation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scheduleRotation.d.ts","sourceRoot":"","sources":["../scheduleRotation.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,MAAM,gBAAgB,CAAC;AACzC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAG1C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuHG;AACH,qBAAa,gBAAiB,SAAQ,MAAM,CAAC,cAAc;IACvD;;;;;;;;OAQG;WACW,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE,KAAK,CAAC,EAAE,qBAAqB,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,qBAAqB,GAAG,gBAAgB;IAOlJ;;;OAGG;WACW,UAAU,CAAC,GAAG,EAAE,GAAG,GAAG,GAAG,IAAI,gBAAgB;IAO3D;;OAEG;IACH,SAAwB,gBAAgB,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IAChE;;OAEG;IACH,SAAgC,aAAa,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IACrE;;OAEG;IACH,SAAwB,qBAAqB,EAAE,MAAM,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,MAAM,GAAG,SAAS,CAAC,CAAC;IACxC;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IACxC;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IAC3C;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IACjC;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IAClD;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;IAC5C;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,+BAA+B,CAAC,EAAE,GAAG,SAAS,CAAC,CAAC;CACvG"}
|
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
|
|
3
|
+
// *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
4
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
5
|
+
if (k2 === undefined) k2 = k;
|
|
6
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
7
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
8
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
9
|
+
}
|
|
10
|
+
Object.defineProperty(o, k2, desc);
|
|
11
|
+
}) : (function(o, m, k, k2) {
|
|
12
|
+
if (k2 === undefined) k2 = k;
|
|
13
|
+
o[k2] = m[k];
|
|
14
|
+
}));
|
|
15
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
16
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
17
|
+
}) : function(o, v) {
|
|
18
|
+
o["default"] = v;
|
|
19
|
+
});
|
|
20
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
21
|
+
if (mod && mod.__esModule) return mod;
|
|
22
|
+
var result = {};
|
|
23
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
24
|
+
__setModuleDefault(result, mod);
|
|
25
|
+
return result;
|
|
26
|
+
};
|
|
27
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
+
exports.ScheduleRotation = void 0;
|
|
29
|
+
const pulumi = __importStar(require("@pulumi/pulumi"));
|
|
30
|
+
const utilities = __importStar(require("./utilities"));
|
|
31
|
+
/**
|
|
32
|
+
* Manage a rotation on an on-call schedule.
|
|
33
|
+
*
|
|
34
|
+
* A rotation is a group of people who take turns being on call, and the cadence they
|
|
35
|
+
* hand over on. A schedule can hold several, and each is managed independently — so
|
|
36
|
+
* changing one never rewrites the others.
|
|
37
|
+
*
|
|
38
|
+
* Editing a rotation takes effect straight away, unless `rollout` says otherwise.
|
|
39
|
+
*
|
|
40
|
+
* ## Changing when shifts hand over
|
|
41
|
+
*
|
|
42
|
+
* `firstIntervalStartsAt` is the point intervals are counted from. With
|
|
43
|
+
* `handovers` it fixes the time of day and day of week that shifts change hands —
|
|
44
|
+
* the dashboard calls it the handover time.
|
|
45
|
+
*
|
|
46
|
+
* It can't change in the same apply as `rollout`. Whenever `rollout` is set the
|
|
47
|
+
* rotation keeps the interval start it already runs: an immediate rollout copies that
|
|
48
|
+
* across so the cadence doesn't move, and a phased one works backwards from the next
|
|
49
|
+
* handover so the new line-up slots into the rhythm people are already working. Either
|
|
50
|
+
* way a new `firstIntervalStartsAt` is discarded, so the provider stops the apply
|
|
51
|
+
* rather than storing a value that won't be kept.
|
|
52
|
+
*
|
|
53
|
+
* To change both, take it in two applies:
|
|
54
|
+
*
|
|
55
|
+
* 1. Change `firstIntervalStartsAt` on its own, with `rollout` unset. The new
|
|
56
|
+
* cadence takes effect straight away.
|
|
57
|
+
* 2. Then make the line-up change, with `rollout` set.
|
|
58
|
+
*
|
|
59
|
+
* ## Choosing a scheduling mode
|
|
60
|
+
*
|
|
61
|
+
* `schedulingMode` decides who takes the next shift.
|
|
62
|
+
*
|
|
63
|
+
* `fair` shares time on call out evenly, tracking how much each person has already
|
|
64
|
+
* done and giving the next shift to whoever is behind. Someone newly added has done
|
|
65
|
+
* none, so `fair` tends to bring them on call sooner rather than adding them to
|
|
66
|
+
* the back of the queue.
|
|
67
|
+
*
|
|
68
|
+
* `sequential` goes around the list in order, so the next person on call is always
|
|
69
|
+
* the one after the last.
|
|
70
|
+
*
|
|
71
|
+
* For an even rotation — everyone on for the same length of time, no working hours,
|
|
72
|
+
* nobody joining or leaving — the two behave identically. They only diverge once
|
|
73
|
+
* shifts differ in length, `workingIntervals` is set, or the list of users
|
|
74
|
+
* changes. Reach for `sequential` when it matters that the running order is
|
|
75
|
+
* obvious to the people in it.
|
|
76
|
+
*
|
|
77
|
+
* ## Upgrading from v6
|
|
78
|
+
*
|
|
79
|
+
* Before v7, a rotation was declared inline on `incident.Schedule`, in its
|
|
80
|
+
* `rotations` attribute. It is now its own resource. See `incident.Schedule`
|
|
81
|
+
* for what that changes and how to import the rotations you already have.
|
|
82
|
+
*
|
|
83
|
+
* ## Example Usage
|
|
84
|
+
*
|
|
85
|
+
* ```typescript
|
|
86
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
87
|
+
* import * as incident from "@incident-io/pulumi";
|
|
88
|
+
*
|
|
89
|
+
* // A rotation is a group of people who take turns being on call. Each one is managed
|
|
90
|
+
* // on its own, so editing this rotation doesn't touch the others on the schedule.
|
|
91
|
+
* const primary = new incident.ScheduleRotation("primary", {
|
|
92
|
+
* scheduleId: platform.id,
|
|
93
|
+
* name: "Primary",
|
|
94
|
+
* users: [
|
|
95
|
+
* alice.id,
|
|
96
|
+
* bob.id,
|
|
97
|
+
* ],
|
|
98
|
+
* firstIntervalStartsAt: "2024-01-08T09:00:00Z",
|
|
99
|
+
* handovers: [{
|
|
100
|
+
* interval: 1,
|
|
101
|
+
* intervalType: "weekly",
|
|
102
|
+
* }],
|
|
103
|
+
* });
|
|
104
|
+
* // A rotation that only covers weekday working hours, with two people on call at
|
|
105
|
+
* // once and a place in the schedule's running order.
|
|
106
|
+
* const businessHours = new incident.ScheduleRotation("business_hours", {
|
|
107
|
+
* scheduleId: platform.id,
|
|
108
|
+
* name: "Business hours",
|
|
109
|
+
* rank: 2,
|
|
110
|
+
* users: [
|
|
111
|
+
* alice.id,
|
|
112
|
+
* bob.id,
|
|
113
|
+
* carol.id,
|
|
114
|
+
* ],
|
|
115
|
+
* firstIntervalStartsAt: "2024-01-08T09:00:00Z",
|
|
116
|
+
* handovers: [{
|
|
117
|
+
* interval: 1,
|
|
118
|
+
* intervalType: "daily",
|
|
119
|
+
* }],
|
|
120
|
+
* concurrentShifts: 2,
|
|
121
|
+
* workingIntervals: [
|
|
122
|
+
* {
|
|
123
|
+
* weekday: "monday",
|
|
124
|
+
* startTime: "09:00",
|
|
125
|
+
* endTime: "17:00",
|
|
126
|
+
* },
|
|
127
|
+
* {
|
|
128
|
+
* weekday: "tuesday",
|
|
129
|
+
* startTime: "09:00",
|
|
130
|
+
* endTime: "17:00",
|
|
131
|
+
* },
|
|
132
|
+
* {
|
|
133
|
+
* weekday: "wednesday",
|
|
134
|
+
* startTime: "09:00",
|
|
135
|
+
* endTime: "17:00",
|
|
136
|
+
* },
|
|
137
|
+
* {
|
|
138
|
+
* weekday: "thursday",
|
|
139
|
+
* startTime: "09:00",
|
|
140
|
+
* endTime: "17:00",
|
|
141
|
+
* },
|
|
142
|
+
* {
|
|
143
|
+
* weekday: "friday",
|
|
144
|
+
* startTime: "09:00",
|
|
145
|
+
* endTime: "17:00",
|
|
146
|
+
* },
|
|
147
|
+
* ],
|
|
148
|
+
* });
|
|
149
|
+
* ```
|
|
150
|
+
*/
|
|
151
|
+
class ScheduleRotation extends pulumi.CustomResource {
|
|
152
|
+
/**
|
|
153
|
+
* Get an existing ScheduleRotation resource's state with the given name, ID, and optional extra
|
|
154
|
+
* properties used to qualify the lookup.
|
|
155
|
+
*
|
|
156
|
+
* @param name The _unique_ name of the resulting resource.
|
|
157
|
+
* @param id The _unique_ provider ID of the resource to lookup.
|
|
158
|
+
* @param state Any extra arguments used during the lookup.
|
|
159
|
+
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
160
|
+
*/
|
|
161
|
+
static get(name, id, state, opts) {
|
|
162
|
+
return new ScheduleRotation(name, state, { ...opts, id: id });
|
|
163
|
+
}
|
|
164
|
+
/** @internal */
|
|
165
|
+
static __pulumiType = 'incident:index/scheduleRotation:ScheduleRotation';
|
|
166
|
+
/**
|
|
167
|
+
* Returns true if the given object is an instance of ScheduleRotation. This is designed to work even
|
|
168
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
169
|
+
*/
|
|
170
|
+
static isInstance(obj) {
|
|
171
|
+
if (obj === undefined || obj === null) {
|
|
172
|
+
return false;
|
|
173
|
+
}
|
|
174
|
+
return obj['__pulumiType'] === ScheduleRotation.__pulumiType;
|
|
175
|
+
}
|
|
176
|
+
constructor(name, argsOrState, opts) {
|
|
177
|
+
let resourceInputs = {};
|
|
178
|
+
opts = opts || {};
|
|
179
|
+
if (opts.id) {
|
|
180
|
+
const state = argsOrState;
|
|
181
|
+
resourceInputs["concurrentShifts"] = state?.concurrentShifts;
|
|
182
|
+
resourceInputs["effectiveFrom"] = state?.effectiveFrom;
|
|
183
|
+
resourceInputs["firstIntervalStartsAt"] = state?.firstIntervalStartsAt;
|
|
184
|
+
resourceInputs["handovers"] = state?.handovers;
|
|
185
|
+
resourceInputs["name"] = state?.name;
|
|
186
|
+
resourceInputs["rank"] = state?.rank;
|
|
187
|
+
resourceInputs["rollout"] = state?.rollout;
|
|
188
|
+
resourceInputs["scheduleId"] = state?.scheduleId;
|
|
189
|
+
resourceInputs["schedulingMode"] = state?.schedulingMode;
|
|
190
|
+
resourceInputs["users"] = state?.users;
|
|
191
|
+
resourceInputs["workingIntervals"] = state?.workingIntervals;
|
|
192
|
+
}
|
|
193
|
+
else {
|
|
194
|
+
const args = argsOrState;
|
|
195
|
+
if (args?.firstIntervalStartsAt === undefined && !opts.urn) {
|
|
196
|
+
throw new Error("Missing required property 'firstIntervalStartsAt'");
|
|
197
|
+
}
|
|
198
|
+
if (args?.handovers === undefined && !opts.urn) {
|
|
199
|
+
throw new Error("Missing required property 'handovers'");
|
|
200
|
+
}
|
|
201
|
+
if (args?.scheduleId === undefined && !opts.urn) {
|
|
202
|
+
throw new Error("Missing required property 'scheduleId'");
|
|
203
|
+
}
|
|
204
|
+
if (args?.users === undefined && !opts.urn) {
|
|
205
|
+
throw new Error("Missing required property 'users'");
|
|
206
|
+
}
|
|
207
|
+
resourceInputs["concurrentShifts"] = args?.concurrentShifts;
|
|
208
|
+
resourceInputs["firstIntervalStartsAt"] = args?.firstIntervalStartsAt;
|
|
209
|
+
resourceInputs["handovers"] = args?.handovers;
|
|
210
|
+
resourceInputs["name"] = args?.name;
|
|
211
|
+
resourceInputs["rank"] = args?.rank;
|
|
212
|
+
resourceInputs["rollout"] = args?.rollout;
|
|
213
|
+
resourceInputs["scheduleId"] = args?.scheduleId;
|
|
214
|
+
resourceInputs["schedulingMode"] = args?.schedulingMode;
|
|
215
|
+
resourceInputs["users"] = args?.users;
|
|
216
|
+
resourceInputs["workingIntervals"] = args?.workingIntervals;
|
|
217
|
+
resourceInputs["effectiveFrom"] = undefined /*out*/;
|
|
218
|
+
}
|
|
219
|
+
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
|
|
220
|
+
super(ScheduleRotation.__pulumiType, name, resourceInputs, opts);
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
exports.ScheduleRotation = ScheduleRotation;
|
|
224
|
+
//# sourceMappingURL=schedu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