@olyzon/sdk 0.0.0-stage → 0.1.0-stg.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.
Files changed (92) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +18 -2
  3. package/dist/client.d.ts +62 -0
  4. package/dist/client.js +104 -0
  5. package/dist/core/config.d.ts +153 -0
  6. package/dist/core/config.js +368 -0
  7. package/dist/core/contracts.d.ts +52 -0
  8. package/dist/core/contracts.js +12 -0
  9. package/dist/core/dpop.d.ts +39 -0
  10. package/dist/core/dpop.js +63 -0
  11. package/dist/core/errors.d.ts +34 -0
  12. package/dist/core/errors.js +43 -0
  13. package/dist/core/session.d.ts +82 -0
  14. package/dist/core/session.js +170 -0
  15. package/dist/core/transport.d.ts +38 -0
  16. package/dist/core/transport.js +84 -0
  17. package/dist/generated/index.d.ts +24 -0
  18. package/dist/generated/index.js +20 -0
  19. package/dist/generated/manifest.json +13 -0
  20. package/dist/generated/projects/client/client.gen.d.ts +2 -0
  21. package/dist/generated/projects/client/client.gen.js +216 -0
  22. package/dist/generated/projects/client/index.d.ts +10 -0
  23. package/dist/generated/projects/client/index.js +6 -0
  24. package/dist/generated/projects/client/types.gen.d.ts +120 -0
  25. package/dist/generated/projects/client/types.gen.js +2 -0
  26. package/dist/generated/projects/client/utils.gen.d.ts +37 -0
  27. package/dist/generated/projects/client/utils.gen.js +228 -0
  28. package/dist/generated/projects/client.gen.d.ts +12 -0
  29. package/dist/generated/projects/client.gen.js +3 -0
  30. package/dist/generated/projects/core/auth.gen.d.ts +25 -0
  31. package/dist/generated/projects/core/auth.gen.js +14 -0
  32. package/dist/generated/projects/core/bodySerializer.gen.d.ts +25 -0
  33. package/dist/generated/projects/core/bodySerializer.gen.js +57 -0
  34. package/dist/generated/projects/core/params.gen.d.ts +43 -0
  35. package/dist/generated/projects/core/params.gen.js +109 -0
  36. package/dist/generated/projects/core/pathSerializer.gen.d.ts +33 -0
  37. package/dist/generated/projects/core/pathSerializer.gen.js +106 -0
  38. package/dist/generated/projects/core/queryKeySerializer.gen.d.ts +18 -0
  39. package/dist/generated/projects/core/queryKeySerializer.gen.js +92 -0
  40. package/dist/generated/projects/core/serverSentEvents.gen.d.ts +71 -0
  41. package/dist/generated/projects/core/serverSentEvents.gen.js +132 -0
  42. package/dist/generated/projects/core/types.gen.d.ts +83 -0
  43. package/dist/generated/projects/core/types.gen.js +2 -0
  44. package/dist/generated/projects/core/utils.gen.d.ts +19 -0
  45. package/dist/generated/projects/core/utils.gen.js +87 -0
  46. package/dist/generated/projects/index.d.ts +2 -0
  47. package/dist/generated/projects/index.js +2 -0
  48. package/dist/generated/projects/sdk.gen.d.ts +47 -0
  49. package/dist/generated/projects/sdk.gen.js +55 -0
  50. package/dist/generated/projects/types.gen.d.ts +388 -0
  51. package/dist/generated/projects/types.gen.js +2 -0
  52. package/dist/generated/projects.d.ts +54 -0
  53. package/dist/generated/projects.js +58 -0
  54. package/dist/generated/specs/projects.json +872 -0
  55. package/dist/generated/specs/sts.json +942 -0
  56. package/dist/generated/sts/client/client.gen.d.ts +2 -0
  57. package/dist/generated/sts/client/client.gen.js +216 -0
  58. package/dist/generated/sts/client/index.d.ts +10 -0
  59. package/dist/generated/sts/client/index.js +6 -0
  60. package/dist/generated/sts/client/types.gen.d.ts +120 -0
  61. package/dist/generated/sts/client/types.gen.js +2 -0
  62. package/dist/generated/sts/client/utils.gen.d.ts +37 -0
  63. package/dist/generated/sts/client/utils.gen.js +228 -0
  64. package/dist/generated/sts/client.gen.d.ts +12 -0
  65. package/dist/generated/sts/client.gen.js +3 -0
  66. package/dist/generated/sts/core/auth.gen.d.ts +25 -0
  67. package/dist/generated/sts/core/auth.gen.js +14 -0
  68. package/dist/generated/sts/core/bodySerializer.gen.d.ts +25 -0
  69. package/dist/generated/sts/core/bodySerializer.gen.js +57 -0
  70. package/dist/generated/sts/core/params.gen.d.ts +43 -0
  71. package/dist/generated/sts/core/params.gen.js +109 -0
  72. package/dist/generated/sts/core/pathSerializer.gen.d.ts +33 -0
  73. package/dist/generated/sts/core/pathSerializer.gen.js +106 -0
  74. package/dist/generated/sts/core/queryKeySerializer.gen.d.ts +18 -0
  75. package/dist/generated/sts/core/queryKeySerializer.gen.js +92 -0
  76. package/dist/generated/sts/core/serverSentEvents.gen.d.ts +71 -0
  77. package/dist/generated/sts/core/serverSentEvents.gen.js +132 -0
  78. package/dist/generated/sts/core/types.gen.d.ts +83 -0
  79. package/dist/generated/sts/core/types.gen.js +2 -0
  80. package/dist/generated/sts/core/utils.gen.d.ts +19 -0
  81. package/dist/generated/sts/core/utils.gen.js +87 -0
  82. package/dist/generated/sts/index.d.ts +2 -0
  83. package/dist/generated/sts/index.js +2 -0
  84. package/dist/generated/sts/sdk.gen.d.ts +41 -0
  85. package/dist/generated/sts/sdk.gen.js +44 -0
  86. package/dist/generated/sts/types.gen.d.ts +445 -0
  87. package/dist/generated/sts/types.gen.js +2 -0
  88. package/dist/generated/sts.d.ts +44 -0
  89. package/dist/generated/sts.js +49 -0
  90. package/dist/index.d.ts +14 -0
  91. package/dist/index.js +13 -0
  92. package/package.json +43 -3
@@ -0,0 +1,872 @@
1
+ {
2
+ "openapi": "3.1.0",
3
+ "info": {
4
+ "title": "Olyzon Projects",
5
+ "description": "A workspace's projects: the tree they form.",
6
+ "version": "0.0.0"
7
+ },
8
+ "tags": [],
9
+ "paths": {
10
+ "/v1/projects": {
11
+ "get": {
12
+ "operationId": "listProjects",
13
+ "description": "The caller's workspace's projects, as a flat list: build the tree from `parentId` and `rank`.\nWith `archived=true`, the archived ones instead: those whose parent is live can be restored.",
14
+ "parameters": [
15
+ {
16
+ "name": "archived",
17
+ "in": "query",
18
+ "required": false,
19
+ "schema": {
20
+ "type": "boolean"
21
+ },
22
+ "explode": false
23
+ }
24
+ ],
25
+ "responses": {
26
+ "200": {
27
+ "description": "The request has succeeded.",
28
+ "content": {
29
+ "application/json": {
30
+ "schema": {
31
+ "type": "object",
32
+ "properties": {
33
+ "projects": {
34
+ "type": "array",
35
+ "items": {
36
+ "$ref": "#/components/schemas/Project"
37
+ }
38
+ }
39
+ },
40
+ "required": [
41
+ "projects"
42
+ ]
43
+ }
44
+ }
45
+ }
46
+ },
47
+ "401": {
48
+ "description": "Missing, invalid or expired session, or a proof that does not match this request.",
49
+ "headers": {
50
+ "WWW-Authenticate": {
51
+ "required": true,
52
+ "description": "`DPoP error=\"…\", algs=\"ES256\", error_description=\"…\"` (RFC 9449 §7.1).",
53
+ "schema": {
54
+ "type": "string"
55
+ }
56
+ }
57
+ },
58
+ "content": {
59
+ "application/json": {
60
+ "schema": {
61
+ "$ref": "#/components/schemas/Unauthorized"
62
+ }
63
+ }
64
+ }
65
+ },
66
+ "403": {
67
+ "description": "The session may not perform this action (Cedar).",
68
+ "content": {
69
+ "application/json": {
70
+ "schema": {
71
+ "$ref": "#/components/schemas/Forbidden"
72
+ }
73
+ }
74
+ }
75
+ },
76
+ "404": {
77
+ "description": "No such resource or route, or a resource the session's org cannot see.",
78
+ "content": {
79
+ "application/json": {
80
+ "schema": {
81
+ "$ref": "#/components/schemas/NotFound"
82
+ }
83
+ }
84
+ }
85
+ },
86
+ "500": {
87
+ "description": "Unexpected failure: logged by the service, answered without details.",
88
+ "content": {
89
+ "application/json": {
90
+ "schema": {
91
+ "$ref": "#/components/schemas/ServerError"
92
+ }
93
+ }
94
+ }
95
+ }
96
+ }
97
+ },
98
+ "post": {
99
+ "operationId": "createProject",
100
+ "description": "Creates a project at the end of its parent's children, or the workspace's root.",
101
+ "parameters": [],
102
+ "responses": {
103
+ "201": {
104
+ "description": "The request has succeeded and a new resource has been created as a result.",
105
+ "content": {
106
+ "application/json": {
107
+ "schema": {
108
+ "$ref": "#/components/schemas/Project"
109
+ }
110
+ }
111
+ }
112
+ },
113
+ "400": {
114
+ "description": "The request does not match the operation's input: every invalid field is named.",
115
+ "content": {
116
+ "application/json": {
117
+ "schema": {
118
+ "$ref": "#/components/schemas/InvalidRequest"
119
+ }
120
+ }
121
+ }
122
+ },
123
+ "401": {
124
+ "description": "Missing, invalid or expired session, or a proof that does not match this request.",
125
+ "headers": {
126
+ "WWW-Authenticate": {
127
+ "required": true,
128
+ "description": "`DPoP error=\"…\", algs=\"ES256\", error_description=\"…\"` (RFC 9449 §7.1).",
129
+ "schema": {
130
+ "type": "string"
131
+ }
132
+ }
133
+ },
134
+ "content": {
135
+ "application/json": {
136
+ "schema": {
137
+ "$ref": "#/components/schemas/Unauthorized"
138
+ }
139
+ }
140
+ }
141
+ },
142
+ "403": {
143
+ "description": "The session may not perform this action (Cedar).",
144
+ "content": {
145
+ "application/json": {
146
+ "schema": {
147
+ "$ref": "#/components/schemas/Forbidden"
148
+ }
149
+ }
150
+ }
151
+ },
152
+ "404": {
153
+ "description": "No such resource or route, or a resource the session's org cannot see.",
154
+ "content": {
155
+ "application/json": {
156
+ "schema": {
157
+ "$ref": "#/components/schemas/NotFound"
158
+ }
159
+ }
160
+ }
161
+ },
162
+ "500": {
163
+ "description": "Unexpected failure: logged by the service, answered without details.",
164
+ "content": {
165
+ "application/json": {
166
+ "schema": {
167
+ "$ref": "#/components/schemas/ServerError"
168
+ }
169
+ }
170
+ }
171
+ }
172
+ },
173
+ "requestBody": {
174
+ "required": true,
175
+ "content": {
176
+ "application/json": {
177
+ "schema": {
178
+ "$ref": "#/components/schemas/NewProject"
179
+ }
180
+ }
181
+ }
182
+ }
183
+ }
184
+ },
185
+ "/v1/projects/{id}": {
186
+ "get": {
187
+ "operationId": "getProject",
188
+ "description": "A project of the caller's workspace, archived or not (`archivedAt` says which).",
189
+ "parameters": [
190
+ {
191
+ "name": "id",
192
+ "in": "path",
193
+ "required": true,
194
+ "schema": {
195
+ "type": "string"
196
+ }
197
+ }
198
+ ],
199
+ "responses": {
200
+ "200": {
201
+ "description": "The request has succeeded.",
202
+ "content": {
203
+ "application/json": {
204
+ "schema": {
205
+ "$ref": "#/components/schemas/Project"
206
+ }
207
+ }
208
+ }
209
+ },
210
+ "401": {
211
+ "description": "Missing, invalid or expired session, or a proof that does not match this request.",
212
+ "headers": {
213
+ "WWW-Authenticate": {
214
+ "required": true,
215
+ "description": "`DPoP error=\"…\", algs=\"ES256\", error_description=\"…\"` (RFC 9449 §7.1).",
216
+ "schema": {
217
+ "type": "string"
218
+ }
219
+ }
220
+ },
221
+ "content": {
222
+ "application/json": {
223
+ "schema": {
224
+ "$ref": "#/components/schemas/Unauthorized"
225
+ }
226
+ }
227
+ }
228
+ },
229
+ "403": {
230
+ "description": "The session may not perform this action (Cedar).",
231
+ "content": {
232
+ "application/json": {
233
+ "schema": {
234
+ "$ref": "#/components/schemas/Forbidden"
235
+ }
236
+ }
237
+ }
238
+ },
239
+ "404": {
240
+ "description": "No such resource or route, or a resource the session's org cannot see.",
241
+ "content": {
242
+ "application/json": {
243
+ "schema": {
244
+ "$ref": "#/components/schemas/NotFound"
245
+ }
246
+ }
247
+ }
248
+ },
249
+ "500": {
250
+ "description": "Unexpected failure: logged by the service, answered without details.",
251
+ "content": {
252
+ "application/json": {
253
+ "schema": {
254
+ "$ref": "#/components/schemas/ServerError"
255
+ }
256
+ }
257
+ }
258
+ }
259
+ }
260
+ },
261
+ "patch": {
262
+ "operationId": "updateProject",
263
+ "description": "Changes a project.",
264
+ "parameters": [
265
+ {
266
+ "name": "id",
267
+ "in": "path",
268
+ "required": true,
269
+ "schema": {
270
+ "type": "string"
271
+ }
272
+ }
273
+ ],
274
+ "responses": {
275
+ "200": {
276
+ "description": "The request has succeeded.",
277
+ "content": {
278
+ "application/json": {
279
+ "schema": {
280
+ "$ref": "#/components/schemas/Project"
281
+ }
282
+ }
283
+ }
284
+ },
285
+ "400": {
286
+ "description": "The request does not match the operation's input: every invalid field is named.",
287
+ "content": {
288
+ "application/json": {
289
+ "schema": {
290
+ "$ref": "#/components/schemas/InvalidRequest"
291
+ }
292
+ }
293
+ }
294
+ },
295
+ "401": {
296
+ "description": "Missing, invalid or expired session, or a proof that does not match this request.",
297
+ "headers": {
298
+ "WWW-Authenticate": {
299
+ "required": true,
300
+ "description": "`DPoP error=\"…\", algs=\"ES256\", error_description=\"…\"` (RFC 9449 §7.1).",
301
+ "schema": {
302
+ "type": "string"
303
+ }
304
+ }
305
+ },
306
+ "content": {
307
+ "application/json": {
308
+ "schema": {
309
+ "$ref": "#/components/schemas/Unauthorized"
310
+ }
311
+ }
312
+ }
313
+ },
314
+ "403": {
315
+ "description": "The session may not perform this action (Cedar).",
316
+ "content": {
317
+ "application/json": {
318
+ "schema": {
319
+ "$ref": "#/components/schemas/Forbidden"
320
+ }
321
+ }
322
+ }
323
+ },
324
+ "404": {
325
+ "description": "No such resource or route, or a resource the session's org cannot see.",
326
+ "content": {
327
+ "application/json": {
328
+ "schema": {
329
+ "$ref": "#/components/schemas/NotFound"
330
+ }
331
+ }
332
+ }
333
+ },
334
+ "500": {
335
+ "description": "Unexpected failure: logged by the service, answered without details.",
336
+ "content": {
337
+ "application/json": {
338
+ "schema": {
339
+ "$ref": "#/components/schemas/ServerError"
340
+ }
341
+ }
342
+ }
343
+ }
344
+ },
345
+ "requestBody": {
346
+ "required": true,
347
+ "content": {
348
+ "application/json": {
349
+ "schema": {
350
+ "$ref": "#/components/schemas/ProjectChange"
351
+ }
352
+ }
353
+ }
354
+ }
355
+ }
356
+ },
357
+ "/v1/projects/{id}/archive": {
358
+ "post": {
359
+ "operationId": "archiveProject",
360
+ "description": "Archives a project with its live descendants: the list leaves them out, and nothing is created or\nmoved under them. The root is never archived.",
361
+ "parameters": [
362
+ {
363
+ "name": "id",
364
+ "in": "path",
365
+ "required": true,
366
+ "schema": {
367
+ "type": "string"
368
+ }
369
+ }
370
+ ],
371
+ "responses": {
372
+ "200": {
373
+ "description": "The request has succeeded.",
374
+ "content": {
375
+ "application/json": {
376
+ "schema": {
377
+ "$ref": "#/components/schemas/Project"
378
+ }
379
+ }
380
+ }
381
+ },
382
+ "400": {
383
+ "description": "The request does not match the operation's input: every invalid field is named.",
384
+ "content": {
385
+ "application/json": {
386
+ "schema": {
387
+ "$ref": "#/components/schemas/InvalidRequest"
388
+ }
389
+ }
390
+ }
391
+ },
392
+ "401": {
393
+ "description": "Missing, invalid or expired session, or a proof that does not match this request.",
394
+ "headers": {
395
+ "WWW-Authenticate": {
396
+ "required": true,
397
+ "description": "`DPoP error=\"…\", algs=\"ES256\", error_description=\"…\"` (RFC 9449 §7.1).",
398
+ "schema": {
399
+ "type": "string"
400
+ }
401
+ }
402
+ },
403
+ "content": {
404
+ "application/json": {
405
+ "schema": {
406
+ "$ref": "#/components/schemas/Unauthorized"
407
+ }
408
+ }
409
+ }
410
+ },
411
+ "403": {
412
+ "description": "The session may not perform this action (Cedar).",
413
+ "content": {
414
+ "application/json": {
415
+ "schema": {
416
+ "$ref": "#/components/schemas/Forbidden"
417
+ }
418
+ }
419
+ }
420
+ },
421
+ "404": {
422
+ "description": "No such resource or route, or a resource the session's org cannot see.",
423
+ "content": {
424
+ "application/json": {
425
+ "schema": {
426
+ "$ref": "#/components/schemas/NotFound"
427
+ }
428
+ }
429
+ }
430
+ },
431
+ "500": {
432
+ "description": "Unexpected failure: logged by the service, answered without details.",
433
+ "content": {
434
+ "application/json": {
435
+ "schema": {
436
+ "$ref": "#/components/schemas/ServerError"
437
+ }
438
+ }
439
+ }
440
+ }
441
+ }
442
+ }
443
+ },
444
+ "/v1/projects/{id}/move": {
445
+ "post": {
446
+ "operationId": "moveProject",
447
+ "description": "Moves a project, with its subtree, under `parentId` after `afterId`: also reorders it among its\nsiblings. The root never moves, and nothing moves under itself or its descendants.",
448
+ "parameters": [
449
+ {
450
+ "name": "id",
451
+ "in": "path",
452
+ "required": true,
453
+ "schema": {
454
+ "type": "string"
455
+ }
456
+ }
457
+ ],
458
+ "responses": {
459
+ "200": {
460
+ "description": "The request has succeeded.",
461
+ "content": {
462
+ "application/json": {
463
+ "schema": {
464
+ "$ref": "#/components/schemas/Project"
465
+ }
466
+ }
467
+ }
468
+ },
469
+ "400": {
470
+ "description": "The request does not match the operation's input: every invalid field is named.",
471
+ "content": {
472
+ "application/json": {
473
+ "schema": {
474
+ "$ref": "#/components/schemas/InvalidRequest"
475
+ }
476
+ }
477
+ }
478
+ },
479
+ "401": {
480
+ "description": "Missing, invalid or expired session, or a proof that does not match this request.",
481
+ "headers": {
482
+ "WWW-Authenticate": {
483
+ "required": true,
484
+ "description": "`DPoP error=\"…\", algs=\"ES256\", error_description=\"…\"` (RFC 9449 §7.1).",
485
+ "schema": {
486
+ "type": "string"
487
+ }
488
+ }
489
+ },
490
+ "content": {
491
+ "application/json": {
492
+ "schema": {
493
+ "$ref": "#/components/schemas/Unauthorized"
494
+ }
495
+ }
496
+ }
497
+ },
498
+ "403": {
499
+ "description": "The session may not perform this action (Cedar).",
500
+ "content": {
501
+ "application/json": {
502
+ "schema": {
503
+ "$ref": "#/components/schemas/Forbidden"
504
+ }
505
+ }
506
+ }
507
+ },
508
+ "404": {
509
+ "description": "No such resource or route, or a resource the session's org cannot see.",
510
+ "content": {
511
+ "application/json": {
512
+ "schema": {
513
+ "$ref": "#/components/schemas/NotFound"
514
+ }
515
+ }
516
+ }
517
+ },
518
+ "500": {
519
+ "description": "Unexpected failure: logged by the service, answered without details.",
520
+ "content": {
521
+ "application/json": {
522
+ "schema": {
523
+ "$ref": "#/components/schemas/ServerError"
524
+ }
525
+ }
526
+ }
527
+ }
528
+ },
529
+ "requestBody": {
530
+ "required": true,
531
+ "content": {
532
+ "application/json": {
533
+ "schema": {
534
+ "$ref": "#/components/schemas/ProjectPlace"
535
+ }
536
+ }
537
+ }
538
+ }
539
+ }
540
+ },
541
+ "/v1/projects/{id}/restore": {
542
+ "post": {
543
+ "operationId": "restoreProject",
544
+ "description": "Restores an archived project with exactly what was archived with it, each in its old place. As\nin Notion, a project inside an archived ancestor comes back only with that ancestor.",
545
+ "parameters": [
546
+ {
547
+ "name": "id",
548
+ "in": "path",
549
+ "required": true,
550
+ "schema": {
551
+ "type": "string"
552
+ }
553
+ }
554
+ ],
555
+ "responses": {
556
+ "200": {
557
+ "description": "The request has succeeded.",
558
+ "content": {
559
+ "application/json": {
560
+ "schema": {
561
+ "$ref": "#/components/schemas/Project"
562
+ }
563
+ }
564
+ }
565
+ },
566
+ "400": {
567
+ "description": "The request does not match the operation's input: every invalid field is named.",
568
+ "content": {
569
+ "application/json": {
570
+ "schema": {
571
+ "$ref": "#/components/schemas/InvalidRequest"
572
+ }
573
+ }
574
+ }
575
+ },
576
+ "401": {
577
+ "description": "Missing, invalid or expired session, or a proof that does not match this request.",
578
+ "headers": {
579
+ "WWW-Authenticate": {
580
+ "required": true,
581
+ "description": "`DPoP error=\"…\", algs=\"ES256\", error_description=\"…\"` (RFC 9449 §7.1).",
582
+ "schema": {
583
+ "type": "string"
584
+ }
585
+ }
586
+ },
587
+ "content": {
588
+ "application/json": {
589
+ "schema": {
590
+ "$ref": "#/components/schemas/Unauthorized"
591
+ }
592
+ }
593
+ }
594
+ },
595
+ "403": {
596
+ "description": "The session may not perform this action (Cedar).",
597
+ "content": {
598
+ "application/json": {
599
+ "schema": {
600
+ "$ref": "#/components/schemas/Forbidden"
601
+ }
602
+ }
603
+ }
604
+ },
605
+ "404": {
606
+ "description": "No such resource or route, or a resource the session's org cannot see.",
607
+ "content": {
608
+ "application/json": {
609
+ "schema": {
610
+ "$ref": "#/components/schemas/NotFound"
611
+ }
612
+ }
613
+ }
614
+ },
615
+ "500": {
616
+ "description": "Unexpected failure: logged by the service, answered without details.",
617
+ "content": {
618
+ "application/json": {
619
+ "schema": {
620
+ "$ref": "#/components/schemas/ServerError"
621
+ }
622
+ }
623
+ }
624
+ }
625
+ }
626
+ }
627
+ }
628
+ },
629
+ "security": [
630
+ {
631
+ "DPoPAuth": []
632
+ }
633
+ ],
634
+ "components": {
635
+ "schemas": {
636
+ "Forbidden": {
637
+ "type": "object",
638
+ "required": [
639
+ "error",
640
+ "error_description"
641
+ ],
642
+ "properties": {
643
+ "error": {
644
+ "type": "string",
645
+ "enum": [
646
+ "forbidden"
647
+ ],
648
+ "description": "Machine-readable error code."
649
+ },
650
+ "error_description": {
651
+ "type": "string",
652
+ "description": "What went wrong, for people. Never contains internal details."
653
+ }
654
+ },
655
+ "description": "The session may not perform this action (Cedar)."
656
+ },
657
+ "InvalidRequest": {
658
+ "type": "object",
659
+ "required": [
660
+ "error",
661
+ "error_description"
662
+ ],
663
+ "properties": {
664
+ "error": {
665
+ "type": "string",
666
+ "enum": [
667
+ "invalid_request"
668
+ ],
669
+ "description": "Machine-readable error code."
670
+ },
671
+ "error_description": {
672
+ "type": "string",
673
+ "description": "What went wrong, for people. Never contains internal details."
674
+ }
675
+ },
676
+ "description": "The request does not match the operation's input: every invalid field is named."
677
+ },
678
+ "NewProject": {
679
+ "type": "object",
680
+ "required": [
681
+ "name",
682
+ "parentId"
683
+ ],
684
+ "properties": {
685
+ "name": {
686
+ "type": "string",
687
+ "minLength": 1,
688
+ "maxLength": 200
689
+ },
690
+ "parentId": {
691
+ "anyOf": [
692
+ {
693
+ "type": "string"
694
+ },
695
+ {
696
+ "type": "null"
697
+ }
698
+ ],
699
+ "description": "Its parent, in the caller's workspace. Null creates the workspace's root project, or returns it\nwhen it exists already."
700
+ }
701
+ },
702
+ "description": "A project to create."
703
+ },
704
+ "NotFound": {
705
+ "type": "object",
706
+ "required": [
707
+ "error",
708
+ "error_description"
709
+ ],
710
+ "properties": {
711
+ "error": {
712
+ "type": "string",
713
+ "enum": [
714
+ "not_found"
715
+ ],
716
+ "description": "Machine-readable error code."
717
+ },
718
+ "error_description": {
719
+ "type": "string",
720
+ "description": "What went wrong, for people. Never contains internal details."
721
+ }
722
+ },
723
+ "description": "No such resource or route, or a resource the session's org cannot see."
724
+ },
725
+ "Project": {
726
+ "type": "object",
727
+ "required": [
728
+ "id",
729
+ "org",
730
+ "parentId",
731
+ "rank",
732
+ "name",
733
+ "createdBy",
734
+ "createdAt",
735
+ "updatedAt"
736
+ ],
737
+ "properties": {
738
+ "id": {
739
+ "type": "string",
740
+ "description": "`prj_` and a UUID."
741
+ },
742
+ "org": {
743
+ "type": "string",
744
+ "description": "The workspace (Clerk org) it belongs to."
745
+ },
746
+ "parentId": {
747
+ "anyOf": [
748
+ {
749
+ "type": "string"
750
+ },
751
+ {
752
+ "type": "null"
753
+ }
754
+ ],
755
+ "description": "Its parent; null only for the workspace's root project."
756
+ },
757
+ "rank": {
758
+ "type": "string",
759
+ "description": "Its position among its siblings: sort siblings by it. Computed by the service."
760
+ },
761
+ "name": {
762
+ "type": "string"
763
+ },
764
+ "createdBy": {
765
+ "type": "string",
766
+ "description": "Who created it: the `sub` of their session."
767
+ },
768
+ "createdAt": {
769
+ "type": "string",
770
+ "format": "date-time"
771
+ },
772
+ "updatedAt": {
773
+ "type": "string",
774
+ "format": "date-time"
775
+ },
776
+ "archivedAt": {
777
+ "type": "string",
778
+ "format": "date-time",
779
+ "description": "Set while it, or an ancestor, is archived."
780
+ }
781
+ },
782
+ "description": "A project: one node of its workspace's tree. A project is also what the app calls a page."
783
+ },
784
+ "ProjectChange": {
785
+ "type": "object",
786
+ "properties": {
787
+ "name": {
788
+ "type": "string",
789
+ "minLength": 1,
790
+ "maxLength": 200
791
+ }
792
+ },
793
+ "description": "A change to a project's fields. Moving it is `moveProject`."
794
+ },
795
+ "ProjectPlace": {
796
+ "type": "object",
797
+ "required": [
798
+ "parentId",
799
+ "afterId"
800
+ ],
801
+ "properties": {
802
+ "parentId": {
803
+ "type": "string",
804
+ "description": "Its new parent, in the caller's workspace: its current one to reorder it."
805
+ },
806
+ "afterId": {
807
+ "anyOf": [
808
+ {
809
+ "type": "string"
810
+ },
811
+ {
812
+ "type": "null"
813
+ }
814
+ ],
815
+ "description": "The child of `parentId` to place it after; null places it first."
816
+ }
817
+ },
818
+ "description": "Where to move a project."
819
+ },
820
+ "ServerError": {
821
+ "type": "object",
822
+ "required": [
823
+ "error",
824
+ "error_description"
825
+ ],
826
+ "properties": {
827
+ "error": {
828
+ "type": "string",
829
+ "enum": [
830
+ "server_error"
831
+ ],
832
+ "description": "Machine-readable error code."
833
+ },
834
+ "error_description": {
835
+ "type": "string",
836
+ "description": "What went wrong, for people. Never contains internal details."
837
+ }
838
+ },
839
+ "description": "Unexpected failure: logged by the service, answered without details."
840
+ },
841
+ "Unauthorized": {
842
+ "type": "object",
843
+ "required": [
844
+ "error",
845
+ "error_description"
846
+ ],
847
+ "properties": {
848
+ "error": {
849
+ "type": "string",
850
+ "enum": [
851
+ "invalid_token",
852
+ "invalid_dpop_proof"
853
+ ],
854
+ "description": "Machine-readable error code."
855
+ },
856
+ "error_description": {
857
+ "type": "string",
858
+ "description": "What went wrong, for people. Never contains internal details."
859
+ }
860
+ },
861
+ "description": "Missing, invalid or expired session, or a proof that does not match this request."
862
+ }
863
+ },
864
+ "securitySchemes": {
865
+ "DPoPAuth": {
866
+ "type": "http",
867
+ "scheme": "DPoP",
868
+ "description": "Every call carries a session of the region's STS and a DPoP proof (RFC\n9449) made for that exact request with the session's key:\n\n- `Authorization: DPoP <session JWT>`\n- `DPoP: <proof JWT>`, signed ES256 by the key the session is bound to\n(`cnf.jkt`), with `htm` (method), `htu` (origin and path), `iat`, `jti`\n(used once), `ath` (hash of the session), and Olyzon's `htq` and `hbd`:\nbase64url SHA-256 of the raw query string and of the raw body bytes.\n\nA proof is valid for one request only, so it cannot be typed into a form:\nuse the Olyzon SDK, which signs each request below the generated client."
869
+ }
870
+ }
871
+ }
872
+ }