@dimescheduler/setup 0.1.3 → 0.11.4
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/README.md +546 -404
- package/dist/{bundle-5KNZSFFQ.js → bundle-4UYBQOZO.js} +1 -1
- package/dist/{chunk-VHT6HO3N.js → chunk-3PMKH6IT.js} +174 -14
- package/dist/index.js +14 -3
- package/package.json +54 -53
package/README.md
CHANGED
|
@@ -1,404 +1,546 @@
|
|
|
1
|
-
# @dimescheduler/setup
|
|
2
|
-
|
|
3
|
-
CLI tool to validate, compile, and deploy Dime.Scheduler configurations.
|
|
4
|
-
|
|
5
|
-
## Installation
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
npm install -g @dimescheduler/setup
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
Or use with npx:
|
|
12
|
-
|
|
13
|
-
```bash
|
|
14
|
-
npx @dimescheduler/setup <command>
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
## Commands
|
|
18
|
-
|
|
19
|
-
### `validate`
|
|
20
|
-
|
|
21
|
-
Validate a configuration file against the Dime.Scheduler DSL schema.
|
|
22
|
-
|
|
23
|
-
```bash
|
|
24
|
-
dimescheduler-setup validate <file>
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
**Arguments:**
|
|
28
|
-
- `<file>` - Path to the configuration file (.json5 or .json)
|
|
29
|
-
|
|
30
|
-
**Options:**
|
|
31
|
-
- `--json` - Output results as JSON
|
|
32
|
-
|
|
33
|
-
**Examples:**
|
|
34
|
-
|
|
35
|
-
```bash
|
|
36
|
-
# Validate a configuration file
|
|
37
|
-
dimescheduler-setup validate my-profile.json5
|
|
38
|
-
|
|
39
|
-
# Get validation results as JSON (useful for CI/CD)
|
|
40
|
-
dimescheduler-setup validate my-profile.json5 --json
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
**Exit codes:**
|
|
44
|
-
- `0` - Configuration is valid
|
|
45
|
-
- `1` - Configuration has errors
|
|
46
|
-
|
|
47
|
-
---
|
|
48
|
-
|
|
49
|
-
### `compile`
|
|
50
|
-
|
|
51
|
-
Compile a JSON5 configuration to API-ready JSON format.
|
|
52
|
-
|
|
53
|
-
```bash
|
|
54
|
-
dimescheduler-setup compile <file> [options]
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
**Arguments:**
|
|
58
|
-
- `<file>` - Path to the configuration file (.json5)
|
|
59
|
-
|
|
60
|
-
**Options:**
|
|
61
|
-
- `-o, --output <dir>` - Output directory (default: same as input file)
|
|
62
|
-
- `--stdout` - Output to stdout instead of writing to a file
|
|
63
|
-
- `--skip-validation` - Skip validation before compiling
|
|
64
|
-
|
|
65
|
-
**Examples:**
|
|
66
|
-
|
|
67
|
-
```bash
|
|
68
|
-
# Compile to JSON (creates my-profile.json in the same directory)
|
|
69
|
-
dimescheduler-setup compile my-profile.json5
|
|
70
|
-
|
|
71
|
-
# Compile to a specific directory
|
|
72
|
-
dimescheduler-setup compile my-profile.json5 -o ./dist
|
|
73
|
-
|
|
74
|
-
# Output to stdout (useful for piping)
|
|
75
|
-
dimescheduler-setup compile my-profile.json5 --stdout
|
|
76
|
-
|
|
77
|
-
# Skip validation (not recommended)
|
|
78
|
-
dimescheduler-setup compile my-profile.json5 --skip-validation
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
---
|
|
82
|
-
|
|
83
|
-
### `deploy`
|
|
84
|
-
|
|
85
|
-
Deploy a configuration directly to a Dime.Scheduler instance.
|
|
86
|
-
|
|
87
|
-
```bash
|
|
88
|
-
dimescheduler-setup deploy <file> --api-key <key> --env <environment> [options]
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
**Arguments:**
|
|
92
|
-
- `<file>` - Path to the configuration file (.json5 or .json)
|
|
93
|
-
|
|
94
|
-
**Options:**
|
|
95
|
-
- `--api-key <key>` - API key for authentication (required, or set `DS_API_KEY` env var)
|
|
96
|
-
- `--env <environment>` - Environment: `production`, `sandbox`, or `test` (required)
|
|
97
|
-
- `--skip-validation` - Skip validation before deploying
|
|
98
|
-
- `--json` - Output results as JSON
|
|
99
|
-
- `--dry-run` - Validate and compile without actually deploying
|
|
100
|
-
- `-y, --yes` - Skip confirmation prompt
|
|
101
|
-
|
|
102
|
-
**Examples:**
|
|
103
|
-
|
|
104
|
-
```bash
|
|
105
|
-
# Deploy to sandbox (shows confirmation prompt)
|
|
106
|
-
dimescheduler-setup deploy my-profile.json5 --api-key YOUR_API_KEY --env sandbox
|
|
107
|
-
|
|
108
|
-
# Deploy to production with confirmation
|
|
109
|
-
dimescheduler-setup deploy my-profile.json5 --api-key YOUR_API_KEY --env production
|
|
110
|
-
|
|
111
|
-
# Skip confirmation prompt (for CI/CD)
|
|
112
|
-
dimescheduler-setup deploy my-profile.json5 --api-key YOUR_API_KEY --env sandbox -y
|
|
113
|
-
|
|
114
|
-
# Use environment variable for API key
|
|
115
|
-
export DS_API_KEY=YOUR_API_KEY
|
|
116
|
-
dimescheduler-setup deploy my-profile.json5 --env sandbox
|
|
117
|
-
|
|
118
|
-
# Dry run (validate and compile only)
|
|
119
|
-
dimescheduler-setup deploy my-profile.json5 --api-key YOUR_API_KEY --env sandbox --dry-run
|
|
120
|
-
|
|
121
|
-
# Get results as JSON (useful for CI/CD, skips confirmation)
|
|
122
|
-
dimescheduler-setup deploy my-profile.json5 --api-key YOUR_API_KEY --env sandbox --json
|
|
123
|
-
```
|
|
124
|
-
|
|
125
|
-
**Exit codes:**
|
|
126
|
-
- `0` - Deployment successful (or cancelled by user)
|
|
127
|
-
- `1` - Validation or compilation error
|
|
128
|
-
- `2` - Deployment failed (API error)
|
|
129
|
-
|
|
130
|
-
## Configuration Format
|
|
131
|
-
|
|
132
|
-
Configuration files use [JSON5](https://json5.org/) format, which supports:
|
|
133
|
-
- Comments (`//` and `/* */`)
|
|
134
|
-
- Trailing commas
|
|
135
|
-
- Unquoted keys
|
|
136
|
-
- Single-quoted strings
|
|
137
|
-
|
|
138
|
-
### Example Configuration
|
|
139
|
-
|
|
140
|
-
```json5
|
|
141
|
-
{
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
],
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
}
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
1
|
+
# @dimescheduler/setup
|
|
2
|
+
|
|
3
|
+
CLI tool to validate, compile, and deploy Dime.Scheduler configurations.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install -g @dimescheduler/setup
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Or use with npx:
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
npx @dimescheduler/setup <command>
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Commands
|
|
18
|
+
|
|
19
|
+
### `validate`
|
|
20
|
+
|
|
21
|
+
Validate a configuration file against the Dime.Scheduler DSL schema.
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
dimescheduler-setup validate <file>
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
**Arguments:**
|
|
28
|
+
- `<file>` - Path to the configuration file (.json5 or .json)
|
|
29
|
+
|
|
30
|
+
**Options:**
|
|
31
|
+
- `--json` - Output results as JSON
|
|
32
|
+
|
|
33
|
+
**Examples:**
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
# Validate a configuration file
|
|
37
|
+
dimescheduler-setup validate my-profile.json5
|
|
38
|
+
|
|
39
|
+
# Get validation results as JSON (useful for CI/CD)
|
|
40
|
+
dimescheduler-setup validate my-profile.json5 --json
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
**Exit codes:**
|
|
44
|
+
- `0` - Configuration is valid
|
|
45
|
+
- `1` - Configuration has errors
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
### `compile`
|
|
50
|
+
|
|
51
|
+
Compile a JSON5 configuration to API-ready JSON format.
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
dimescheduler-setup compile <file> [options]
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
**Arguments:**
|
|
58
|
+
- `<file>` - Path to the configuration file (.json5)
|
|
59
|
+
|
|
60
|
+
**Options:**
|
|
61
|
+
- `-o, --output <dir>` - Output directory (default: same as input file)
|
|
62
|
+
- `--stdout` - Output to stdout instead of writing to a file
|
|
63
|
+
- `--skip-validation` - Skip validation before compiling
|
|
64
|
+
|
|
65
|
+
**Examples:**
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
# Compile to JSON (creates my-profile.json in the same directory)
|
|
69
|
+
dimescheduler-setup compile my-profile.json5
|
|
70
|
+
|
|
71
|
+
# Compile to a specific directory
|
|
72
|
+
dimescheduler-setup compile my-profile.json5 -o ./dist
|
|
73
|
+
|
|
74
|
+
# Output to stdout (useful for piping)
|
|
75
|
+
dimescheduler-setup compile my-profile.json5 --stdout
|
|
76
|
+
|
|
77
|
+
# Skip validation (not recommended)
|
|
78
|
+
dimescheduler-setup compile my-profile.json5 --skip-validation
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
### `deploy`
|
|
84
|
+
|
|
85
|
+
Deploy a configuration directly to a Dime.Scheduler instance.
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
dimescheduler-setup deploy <file> --api-key <key> --env <environment> [options]
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
**Arguments:**
|
|
92
|
+
- `<file>` - Path to the configuration file (.json5 or .json)
|
|
93
|
+
|
|
94
|
+
**Options:**
|
|
95
|
+
- `--api-key <key>` - API key for authentication (required, or set `DS_API_KEY` env var)
|
|
96
|
+
- `--env <environment>` - Environment: `production`, `sandbox`, or `test` (required)
|
|
97
|
+
- `--skip-validation` - Skip validation before deploying
|
|
98
|
+
- `--json` - Output results as JSON
|
|
99
|
+
- `--dry-run` - Validate and compile without actually deploying
|
|
100
|
+
- `-y, --yes` - Skip confirmation prompt
|
|
101
|
+
|
|
102
|
+
**Examples:**
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
# Deploy to sandbox (shows confirmation prompt)
|
|
106
|
+
dimescheduler-setup deploy my-profile.json5 --api-key YOUR_API_KEY --env sandbox
|
|
107
|
+
|
|
108
|
+
# Deploy to production with confirmation
|
|
109
|
+
dimescheduler-setup deploy my-profile.json5 --api-key YOUR_API_KEY --env production
|
|
110
|
+
|
|
111
|
+
# Skip confirmation prompt (for CI/CD)
|
|
112
|
+
dimescheduler-setup deploy my-profile.json5 --api-key YOUR_API_KEY --env sandbox -y
|
|
113
|
+
|
|
114
|
+
# Use environment variable for API key
|
|
115
|
+
export DS_API_KEY=YOUR_API_KEY
|
|
116
|
+
dimescheduler-setup deploy my-profile.json5 --env sandbox
|
|
117
|
+
|
|
118
|
+
# Dry run (validate and compile only)
|
|
119
|
+
dimescheduler-setup deploy my-profile.json5 --api-key YOUR_API_KEY --env sandbox --dry-run
|
|
120
|
+
|
|
121
|
+
# Get results as JSON (useful for CI/CD, skips confirmation)
|
|
122
|
+
dimescheduler-setup deploy my-profile.json5 --api-key YOUR_API_KEY --env sandbox --json
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
**Exit codes:**
|
|
126
|
+
- `0` - Deployment successful (or cancelled by user)
|
|
127
|
+
- `1` - Validation or compilation error
|
|
128
|
+
- `2` - Deployment failed (API error)
|
|
129
|
+
|
|
130
|
+
## Configuration Format
|
|
131
|
+
|
|
132
|
+
Configuration files use [JSON5](https://json5.org/) format, which supports:
|
|
133
|
+
- Comments (`//` and `/* */`)
|
|
134
|
+
- Trailing commas
|
|
135
|
+
- Unquoted keys
|
|
136
|
+
- Single-quoted strings
|
|
137
|
+
|
|
138
|
+
### Example Configuration
|
|
139
|
+
|
|
140
|
+
```json5
|
|
141
|
+
{
|
|
142
|
+
type: "bundle",
|
|
143
|
+
name: "Field Service Complete Package",
|
|
144
|
+
version: "1.0.0",
|
|
145
|
+
|
|
146
|
+
// Owner and notification email apply to all documents in the bundle
|
|
147
|
+
owner: "admin@yourdomain.com",
|
|
148
|
+
notificationEmail: "admin@yourdomain.com",
|
|
149
|
+
|
|
150
|
+
// Array of DSL documents to deploy together
|
|
151
|
+
documents: [
|
|
152
|
+
// Profile document - defines the workspace layout and settings
|
|
153
|
+
{
|
|
154
|
+
type: "profile",
|
|
155
|
+
payload: {
|
|
156
|
+
name: "Field Service Planning",
|
|
157
|
+
code: "FIELD_SERVICE",
|
|
158
|
+
|
|
159
|
+
theme: {
|
|
160
|
+
color: "blue",
|
|
161
|
+
scheme: "sltl",
|
|
162
|
+
},
|
|
163
|
+
|
|
164
|
+
shared: {
|
|
165
|
+
global: false,
|
|
166
|
+
userGroup: "Planners",
|
|
167
|
+
},
|
|
168
|
+
|
|
169
|
+
route: {
|
|
170
|
+
profile: "car",
|
|
171
|
+
calculateRoutes: true,
|
|
172
|
+
showSequenceIndicators: true,
|
|
173
|
+
unitOfDistance: "km",
|
|
174
|
+
},
|
|
175
|
+
|
|
176
|
+
planning: {
|
|
177
|
+
snapInterval: "1hour",
|
|
178
|
+
range: { mode: "week" },
|
|
179
|
+
start: { mode: "startOfWeek" },
|
|
180
|
+
hours: { start: 7, end: 18 },
|
|
181
|
+
},
|
|
182
|
+
|
|
183
|
+
// Workspace layout
|
|
184
|
+
workspace: [
|
|
185
|
+
{
|
|
186
|
+
type: "row",
|
|
187
|
+
content: [
|
|
188
|
+
{
|
|
189
|
+
type: "column",
|
|
190
|
+
width: 25,
|
|
191
|
+
content: [
|
|
192
|
+
{
|
|
193
|
+
type: "stack",
|
|
194
|
+
content: [
|
|
195
|
+
{
|
|
196
|
+
type: "component",
|
|
197
|
+
component: "openTasks",
|
|
198
|
+
title: "Open Tasks",
|
|
199
|
+
id: "tasks",
|
|
200
|
+
layoutRef: "OPEN_TASKS_DEFAULT",
|
|
201
|
+
},
|
|
202
|
+
],
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
type: "component",
|
|
206
|
+
component: "resourceFilters",
|
|
207
|
+
title: "Filters",
|
|
208
|
+
id: "filters",
|
|
209
|
+
},
|
|
210
|
+
],
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
type: "column",
|
|
214
|
+
width: 55,
|
|
215
|
+
content: [
|
|
216
|
+
{
|
|
217
|
+
type: "component",
|
|
218
|
+
component: "planningBoard",
|
|
219
|
+
title: "Planning Board",
|
|
220
|
+
id: "scheduler",
|
|
221
|
+
layoutRef: "SCHEDULER_DEFAULT",
|
|
222
|
+
},
|
|
223
|
+
],
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
type: "column",
|
|
227
|
+
width: 20,
|
|
228
|
+
content: [
|
|
229
|
+
{
|
|
230
|
+
type: "stack",
|
|
231
|
+
content: [
|
|
232
|
+
{
|
|
233
|
+
type: "component",
|
|
234
|
+
component: "details",
|
|
235
|
+
title: "Details",
|
|
236
|
+
id: "details",
|
|
237
|
+
},
|
|
238
|
+
{
|
|
239
|
+
type: "component",
|
|
240
|
+
component: "map",
|
|
241
|
+
title: "Map",
|
|
242
|
+
id: "map",
|
|
243
|
+
},
|
|
244
|
+
],
|
|
245
|
+
},
|
|
246
|
+
],
|
|
247
|
+
},
|
|
248
|
+
],
|
|
249
|
+
},
|
|
250
|
+
],
|
|
251
|
+
},
|
|
252
|
+
},
|
|
253
|
+
|
|
254
|
+
// Users document - defines users and their permissions
|
|
255
|
+
{
|
|
256
|
+
type: "users",
|
|
257
|
+
payload: [
|
|
258
|
+
{
|
|
259
|
+
name: "Planning Manager",
|
|
260
|
+
email: "manager@yourdomain.com",
|
|
261
|
+
language: "en",
|
|
262
|
+
timeZone: "Europe/Brussels",
|
|
263
|
+
roles: ["Administrator"],
|
|
264
|
+
profiles: [
|
|
265
|
+
{ name: "FIELD_SERVICE", default: true },
|
|
266
|
+
],
|
|
267
|
+
},
|
|
268
|
+
{
|
|
269
|
+
name: "Field Planner",
|
|
270
|
+
email: "planner@yourdomain.com",
|
|
271
|
+
language: "en",
|
|
272
|
+
timeZone: "Europe/Brussels",
|
|
273
|
+
roles: ["Planner"],
|
|
274
|
+
profiles: [
|
|
275
|
+
{ name: "FIELD_SERVICE", default: true },
|
|
276
|
+
],
|
|
277
|
+
},
|
|
278
|
+
{
|
|
279
|
+
name: "Dispatcher",
|
|
280
|
+
email: "dispatcher@yourdomain.com",
|
|
281
|
+
language: "nl",
|
|
282
|
+
timeZone: "Europe/Brussels",
|
|
283
|
+
roles: ["Planner"],
|
|
284
|
+
profiles: [
|
|
285
|
+
{ name: "FIELD_SERVICE", default: true },
|
|
286
|
+
],
|
|
287
|
+
filterValues: ["Dispatch"],
|
|
288
|
+
},
|
|
289
|
+
],
|
|
290
|
+
},
|
|
291
|
+
|
|
292
|
+
// Layouts document - all layouts referenced by components
|
|
293
|
+
{
|
|
294
|
+
type: "layouts",
|
|
295
|
+
payload: [
|
|
296
|
+
// Default layout for open tasks grid
|
|
297
|
+
{
|
|
298
|
+
context: "unplannedTasksGrid",
|
|
299
|
+
code: "OPEN_TASKS_DEFAULT",
|
|
300
|
+
name: "Default View",
|
|
301
|
+
default: true,
|
|
302
|
+
columns: [
|
|
303
|
+
{ property: "SourceApp" },
|
|
304
|
+
{ property: "SourceType" },
|
|
305
|
+
{ property: "JobNo" },
|
|
306
|
+
{ property: "TaskNo" },
|
|
307
|
+
{ property: "ShortDescription" },
|
|
308
|
+
{ property: "RequestedStart" },
|
|
309
|
+
{ property: "RequestedEnd" },
|
|
310
|
+
],
|
|
311
|
+
sorters: [
|
|
312
|
+
{ property: "RequestedStart", direction: "ASC" },
|
|
313
|
+
],
|
|
314
|
+
pageSize: "50",
|
|
315
|
+
},
|
|
316
|
+
// Default layout for scheduler
|
|
317
|
+
{
|
|
318
|
+
context: "scheduler",
|
|
319
|
+
code: "SCHEDULER_DEFAULT",
|
|
320
|
+
name: "Default",
|
|
321
|
+
default: true,
|
|
322
|
+
viewPreset: "week",
|
|
323
|
+
rowHeight: "2rows",
|
|
324
|
+
resourcesGridWidth: "20%",
|
|
325
|
+
columns: [
|
|
326
|
+
{ property: "ResourceNo" },
|
|
327
|
+
{ property: "ResourceName" },
|
|
328
|
+
],
|
|
329
|
+
},
|
|
330
|
+
// Shared compact tasks view
|
|
331
|
+
{
|
|
332
|
+
context: "unplannedTasksGrid",
|
|
333
|
+
code: "COMPACT_TASKS",
|
|
334
|
+
name: "Compact View",
|
|
335
|
+
columns: [
|
|
336
|
+
{ property: "JobNo" },
|
|
337
|
+
{ property: "ShortDescription" },
|
|
338
|
+
{ property: "RequestedStart" },
|
|
339
|
+
],
|
|
340
|
+
sorters: [
|
|
341
|
+
{ property: "RequestedStart", direction: "ASC" },
|
|
342
|
+
],
|
|
343
|
+
pageSize: "100",
|
|
344
|
+
shared: {
|
|
345
|
+
public: true,
|
|
346
|
+
},
|
|
347
|
+
},
|
|
348
|
+
// Shared detailed tasks view
|
|
349
|
+
{
|
|
350
|
+
context: "unplannedTasksGrid",
|
|
351
|
+
code: "DETAILED_TASKS",
|
|
352
|
+
name: "Detailed View",
|
|
353
|
+
columns: [
|
|
354
|
+
{ property: "SourceApp" },
|
|
355
|
+
{ property: "SourceType" },
|
|
356
|
+
{ property: "JobNo" },
|
|
357
|
+
{ property: "TaskNo" },
|
|
358
|
+
{ property: "ShortDescription" },
|
|
359
|
+
{ property: "Description" },
|
|
360
|
+
{ property: "RequestedStart" },
|
|
361
|
+
{ property: "RequestedEnd" },
|
|
362
|
+
{ property: "Importance" },
|
|
363
|
+
{ property: "Category" },
|
|
364
|
+
{ property: "TimeMarker" },
|
|
365
|
+
],
|
|
366
|
+
sorters: [
|
|
367
|
+
{ property: "Importance", direction: "DESC" },
|
|
368
|
+
{ property: "RequestedStart", direction: "ASC" },
|
|
369
|
+
],
|
|
370
|
+
grouper: {
|
|
371
|
+
property: "Category",
|
|
372
|
+
direction: "ASC",
|
|
373
|
+
},
|
|
374
|
+
pageSize: "50",
|
|
375
|
+
shared: {
|
|
376
|
+
public: true,
|
|
377
|
+
},
|
|
378
|
+
},
|
|
379
|
+
// Monthly scheduler view for managers
|
|
380
|
+
{
|
|
381
|
+
context: "scheduler",
|
|
382
|
+
code: "MONTHLY_VIEW",
|
|
383
|
+
name: "Monthly Overview",
|
|
384
|
+
viewPreset: "month",
|
|
385
|
+
rowHeight: "1row",
|
|
386
|
+
resourcesGridWidth: "15%",
|
|
387
|
+
columns: [
|
|
388
|
+
{ property: "ResourceName" },
|
|
389
|
+
],
|
|
390
|
+
shared: {
|
|
391
|
+
userGroup: "Managers",
|
|
392
|
+
},
|
|
393
|
+
},
|
|
394
|
+
],
|
|
395
|
+
},
|
|
396
|
+
],
|
|
397
|
+
|
|
398
|
+
// Merge strategy for handling conflicts when deploying
|
|
399
|
+
mergeStrategy: {
|
|
400
|
+
layouts: "append",
|
|
401
|
+
users: "append",
|
|
402
|
+
profiles: "last-wins",
|
|
403
|
+
},
|
|
404
|
+
}
|
|
405
|
+
```
|
|
406
|
+
|
|
407
|
+
### Available Components
|
|
408
|
+
|
|
409
|
+
| Component | Description |
|
|
410
|
+
|-----------|-------------|
|
|
411
|
+
| `openTasks` | Grid showing unplanned tasks |
|
|
412
|
+
| `planningBoard` | Main scheduling board |
|
|
413
|
+
| `map` | Map view |
|
|
414
|
+
| `indicators` | Category indicators |
|
|
415
|
+
| `resourceFilters` | Resource filter panel |
|
|
416
|
+
| `plannedTasks` | Grid showing planned tasks |
|
|
417
|
+
| `details` | Details/properties panel |
|
|
418
|
+
| `datePicker` | Calendar date picker |
|
|
419
|
+
| `gantt` | Gantt chart view |
|
|
420
|
+
| `capacity` | Capacity planning view |
|
|
421
|
+
| `routeSequence` | Route sequence grid |
|
|
422
|
+
| `notifications` | Notifications panel |
|
|
423
|
+
|
|
424
|
+
### Layout Configuration
|
|
425
|
+
|
|
426
|
+
Components can include `layouts` for configuring grid columns, sorting, filtering, and grouping:
|
|
427
|
+
|
|
428
|
+
```json5
|
|
429
|
+
layouts: [{
|
|
430
|
+
id: "myGrid1",
|
|
431
|
+
code: "MY_LAYOUT",
|
|
432
|
+
name: "My Custom Layout",
|
|
433
|
+
default: true,
|
|
434
|
+
|
|
435
|
+
// Column configuration
|
|
436
|
+
columns: [
|
|
437
|
+
{ property: "Job.JobNo", width: 100 },
|
|
438
|
+
{ property: "Description" }
|
|
439
|
+
],
|
|
440
|
+
|
|
441
|
+
// Sorting
|
|
442
|
+
sorters: [
|
|
443
|
+
{ property: "Job.JobNo", direction: "ASC" },
|
|
444
|
+
{ property: "TaskNo", direction: "DESC" }
|
|
445
|
+
],
|
|
446
|
+
|
|
447
|
+
// Filtering
|
|
448
|
+
filters: [
|
|
449
|
+
{ property: "Status", operator: "eq", value: "Active" }
|
|
450
|
+
],
|
|
451
|
+
|
|
452
|
+
// Grouping
|
|
453
|
+
grouper: {
|
|
454
|
+
property: "Category",
|
|
455
|
+
direction: "ASC",
|
|
456
|
+
id: "Category"
|
|
457
|
+
},
|
|
458
|
+
|
|
459
|
+
// Grid settings
|
|
460
|
+
pageSize: 50,
|
|
461
|
+
rowHeight: "2rows", // "1row", "2rows", "3rows", "4rows", or pixel value
|
|
462
|
+
viewPreset: "week", // "day", "week", "workWeek", "month"
|
|
463
|
+
lockedGridWidth: "30%",
|
|
464
|
+
fitToScreen: false,
|
|
465
|
+
|
|
466
|
+
// Sharing (optional)
|
|
467
|
+
shared: {
|
|
468
|
+
public: true,
|
|
469
|
+
userGroup: "Planners"
|
|
470
|
+
}
|
|
471
|
+
}]
|
|
472
|
+
```
|
|
473
|
+
|
|
474
|
+
## CI/CD Integration
|
|
475
|
+
|
|
476
|
+
### GitHub Actions Example
|
|
477
|
+
|
|
478
|
+
```yaml
|
|
479
|
+
name: Deploy Configuration
|
|
480
|
+
|
|
481
|
+
on:
|
|
482
|
+
push:
|
|
483
|
+
branches: [master]
|
|
484
|
+
paths:
|
|
485
|
+
- 'configs/*.json5'
|
|
486
|
+
|
|
487
|
+
jobs:
|
|
488
|
+
deploy:
|
|
489
|
+
runs-on: ubuntu-latest
|
|
490
|
+
steps:
|
|
491
|
+
- uses: actions/checkout@v4
|
|
492
|
+
|
|
493
|
+
- uses: actions/setup-node@v4
|
|
494
|
+
with:
|
|
495
|
+
node-version: '20'
|
|
496
|
+
|
|
497
|
+
- name: Install CLI
|
|
498
|
+
run: npm install -g @dimescheduler/setup
|
|
499
|
+
|
|
500
|
+
- name: Validate
|
|
501
|
+
run: dimescheduler-setup validate configs/my-profile.json5
|
|
502
|
+
|
|
503
|
+
- name: Deploy
|
|
504
|
+
run: dimescheduler-setup deploy configs/my-profile.json5 --env sandbox --json
|
|
505
|
+
env:
|
|
506
|
+
DS_API_KEY: ${{ secrets.DS_API_KEY }}
|
|
507
|
+
```
|
|
508
|
+
|
|
509
|
+
### Azure DevOps Example
|
|
510
|
+
|
|
511
|
+
```yaml
|
|
512
|
+
trigger:
|
|
513
|
+
branches:
|
|
514
|
+
include:
|
|
515
|
+
- main
|
|
516
|
+
paths:
|
|
517
|
+
include:
|
|
518
|
+
- configs/*.json5
|
|
519
|
+
|
|
520
|
+
pool:
|
|
521
|
+
vmImage: 'ubuntu-latest'
|
|
522
|
+
|
|
523
|
+
steps:
|
|
524
|
+
- task: NodeTool@0
|
|
525
|
+
inputs:
|
|
526
|
+
versionSpec: '20.x'
|
|
527
|
+
|
|
528
|
+
- script: npm install -g @dimescheduler/setup
|
|
529
|
+
displayName: 'Install CLI'
|
|
530
|
+
|
|
531
|
+
- script: dimescheduler-setup validate configs/my-profile.json5
|
|
532
|
+
displayName: 'Validate Configuration'
|
|
533
|
+
|
|
534
|
+
- script: dimescheduler-setup deploy configs/my-profile.json5 --env sandbox -y
|
|
535
|
+
displayName: 'Deploy Configuration'
|
|
536
|
+
env:
|
|
537
|
+
DS_API_KEY: $(DS_API_KEY)
|
|
538
|
+
```
|
|
539
|
+
|
|
540
|
+
## Requirements
|
|
541
|
+
|
|
542
|
+
- Node.js 18 or higher
|
|
543
|
+
|
|
544
|
+
## License
|
|
545
|
+
|
|
546
|
+
MIT
|