@epilot/sdk 2.11.3 → 2.11.5

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 (146) hide show
  1. package/definitions/customer-portal-runtime.json +1 -1
  2. package/definitions/customer-portal.json +148 -0
  3. package/definitions/snapshot-runtime.json +1 -1
  4. package/definitions/snapshot.json +214 -46
  5. package/dist/apis/access-token.cjs +6 -6
  6. package/dist/apis/access-token.js +1 -1
  7. package/dist/apis/address-suggestions.cjs +6 -6
  8. package/dist/apis/address-suggestions.js +1 -1
  9. package/dist/apis/address.cjs +6 -6
  10. package/dist/apis/address.js +1 -1
  11. package/dist/apis/ai-agents.cjs +6 -6
  12. package/dist/apis/ai-agents.js +1 -1
  13. package/dist/apis/app.cjs +6 -6
  14. package/dist/apis/app.js +1 -1
  15. package/dist/apis/audit-logs.cjs +6 -6
  16. package/dist/apis/audit-logs.js +1 -1
  17. package/dist/apis/automation.cjs +6 -6
  18. package/dist/apis/automation.js +1 -1
  19. package/dist/apis/billing.cjs +6 -6
  20. package/dist/apis/billing.js +1 -1
  21. package/dist/apis/blueprint-manifest.cjs +6 -6
  22. package/dist/apis/blueprint-manifest.js +1 -1
  23. package/dist/apis/calendar.cjs +6 -6
  24. package/dist/apis/calendar.js +1 -1
  25. package/dist/apis/configuration-hub.cjs +6 -6
  26. package/dist/apis/configuration-hub.js +1 -1
  27. package/dist/apis/consent.cjs +6 -6
  28. package/dist/apis/consent.js +1 -1
  29. package/dist/apis/customer-portal.cjs +8 -8
  30. package/dist/apis/customer-portal.d.cts +2 -2
  31. package/dist/apis/customer-portal.d.ts +2 -2
  32. package/dist/apis/customer-portal.js +2 -2
  33. package/dist/apis/dashboard.cjs +6 -6
  34. package/dist/apis/dashboard.js +1 -1
  35. package/dist/apis/data-governance.cjs +6 -6
  36. package/dist/apis/data-governance.js +1 -1
  37. package/dist/apis/deduplication.cjs +6 -6
  38. package/dist/apis/deduplication.js +1 -1
  39. package/dist/apis/design.cjs +6 -6
  40. package/dist/apis/design.js +1 -1
  41. package/dist/apis/document.cjs +6 -6
  42. package/dist/apis/document.js +1 -1
  43. package/dist/apis/email-settings.cjs +6 -6
  44. package/dist/apis/email-settings.js +1 -1
  45. package/dist/apis/email-template.cjs +6 -6
  46. package/dist/apis/email-template.js +1 -1
  47. package/dist/apis/entity-mapping.cjs +6 -6
  48. package/dist/apis/entity-mapping.js +1 -1
  49. package/dist/apis/entity.cjs +6 -6
  50. package/dist/apis/entity.js +1 -1
  51. package/dist/apis/environments.cjs +6 -6
  52. package/dist/apis/environments.js +1 -1
  53. package/dist/apis/event-catalog.cjs +6 -6
  54. package/dist/apis/event-catalog.js +1 -1
  55. package/dist/apis/file.cjs +6 -6
  56. package/dist/apis/file.js +1 -1
  57. package/dist/apis/iban.cjs +6 -6
  58. package/dist/apis/iban.js +1 -1
  59. package/dist/apis/integration-toolkit.cjs +6 -6
  60. package/dist/apis/integration-toolkit.js +1 -1
  61. package/dist/apis/journey.cjs +6 -6
  62. package/dist/apis/journey.js +1 -1
  63. package/dist/apis/kanban.cjs +6 -6
  64. package/dist/apis/kanban.js +1 -1
  65. package/dist/apis/message.cjs +6 -6
  66. package/dist/apis/message.js +1 -1
  67. package/dist/apis/metering.cjs +6 -6
  68. package/dist/apis/metering.js +1 -1
  69. package/dist/apis/notes.cjs +6 -6
  70. package/dist/apis/notes.js +1 -1
  71. package/dist/apis/notification.cjs +6 -6
  72. package/dist/apis/notification.js +1 -1
  73. package/dist/apis/organization.cjs +6 -6
  74. package/dist/apis/organization.js +1 -1
  75. package/dist/apis/partner-directory.cjs +6 -6
  76. package/dist/apis/partner-directory.js +1 -1
  77. package/dist/apis/permissions.cjs +6 -6
  78. package/dist/apis/permissions.js +1 -1
  79. package/dist/apis/pricing-tier.cjs +6 -6
  80. package/dist/apis/pricing-tier.js +1 -1
  81. package/dist/apis/pricing.cjs +6 -6
  82. package/dist/apis/pricing.js +1 -1
  83. package/dist/apis/purpose.cjs +6 -6
  84. package/dist/apis/purpose.js +1 -1
  85. package/dist/apis/query.cjs +6 -6
  86. package/dist/apis/query.js +1 -1
  87. package/dist/apis/sandbox.cjs +6 -6
  88. package/dist/apis/sandbox.js +1 -1
  89. package/dist/apis/sharing.cjs +6 -6
  90. package/dist/apis/sharing.js +1 -1
  91. package/dist/apis/snapshot.cjs +8 -8
  92. package/dist/apis/snapshot.d.cts +2 -2
  93. package/dist/apis/snapshot.d.ts +2 -2
  94. package/dist/apis/snapshot.js +2 -2
  95. package/dist/apis/submission.cjs +6 -6
  96. package/dist/apis/submission.js +1 -1
  97. package/dist/apis/target.cjs +6 -6
  98. package/dist/apis/target.js +1 -1
  99. package/dist/apis/targeting.cjs +6 -6
  100. package/dist/apis/targeting.js +1 -1
  101. package/dist/apis/template-variables.cjs +6 -6
  102. package/dist/apis/template-variables.js +1 -1
  103. package/dist/apis/user.cjs +6 -6
  104. package/dist/apis/user.js +1 -1
  105. package/dist/apis/validation-rules.cjs +6 -6
  106. package/dist/apis/validation-rules.js +1 -1
  107. package/dist/apis/webhooks.cjs +6 -6
  108. package/dist/apis/webhooks.js +1 -1
  109. package/dist/apis/workflow-definition.cjs +6 -6
  110. package/dist/apis/workflow-definition.js +1 -1
  111. package/dist/apis/workflow.cjs +6 -6
  112. package/dist/apis/workflow.js +1 -1
  113. package/dist/chunk-4H2KIKGL.cjs +14 -0
  114. package/dist/{chunk-665MWZOX.cjs → chunk-6CTW57LR.cjs} +4 -4
  115. package/dist/chunk-COASF7ZR.js +14 -0
  116. package/dist/{chunk-2EYCMVMS.js → chunk-IINIFIYG.js} +4 -4
  117. package/dist/{chunk-54QNWEPZ.js → chunk-UXY7SWNP.js} +1 -1
  118. package/dist/{chunk-YXJ4PBFQ.cjs → chunk-VDMPIKAN.cjs} +1 -1
  119. package/dist/customer-portal-F45XWLIO.cjs +7 -0
  120. package/dist/customer-portal-MYNJZ4OW.js +7 -0
  121. package/dist/{customer-portal-runtime-C6ZIKX2V.js → customer-portal-runtime-NRIQG6IO.js} +1 -1
  122. package/dist/{customer-portal-runtime-M7O3RDJ5.cjs → customer-portal-runtime-VRGCSOVU.cjs} +2 -2
  123. package/dist/{customer-portal.d-dgnYw5xb.d.cts → customer-portal.d-fWVl8_mE.d.cts} +101 -0
  124. package/dist/{customer-portal.d-dgnYw5xb.d.ts → customer-portal.d-fWVl8_mE.d.ts} +101 -0
  125. package/dist/index.cjs +12 -12
  126. package/dist/index.d.cts +2 -2
  127. package/dist/index.d.ts +2 -2
  128. package/dist/index.js +3 -3
  129. package/dist/js-yaml-DLCVPJ7G.js +0 -0
  130. package/dist/snapshot-5XHTEB2U.js +7 -0
  131. package/dist/snapshot-NKK6BNQB.cjs +7 -0
  132. package/dist/{snapshot-runtime-6DV42FVY.cjs → snapshot-runtime-AQJSSXRV.cjs} +2 -2
  133. package/dist/{snapshot-runtime-IW57MINC.js → snapshot-runtime-AY7YYSFQ.js} +1 -1
  134. package/dist/{snapshot.d-CqefmvuB.d.cts → snapshot.d-DT0zg2CS.d.cts} +258 -39
  135. package/dist/{snapshot.d-CqefmvuB.d.ts → snapshot.d-DT0zg2CS.d.ts} +258 -39
  136. package/docs/customer-portal.md +780 -216
  137. package/docs/snapshot.md +179 -21
  138. package/package.json +11 -12
  139. package/definitions/focus-pocus-runtime.json +0 -1
  140. package/definitions/focus-pocus.json +0 -757
  141. package/dist/chunk-JBPITLKN.cjs +0 -14
  142. package/dist/chunk-LSMVZMBY.js +0 -14
  143. package/dist/customer-portal-BMRUBRLZ.js +0 -7
  144. package/dist/customer-portal-PCVNGORX.cjs +0 -7
  145. package/dist/snapshot-2HFERXRQ.js +0 -7
  146. package/dist/snapshot-UHCQAT4R.cjs +0 -7
package/docs/snapshot.md CHANGED
@@ -35,9 +35,13 @@ const { data } = await snapshotClient.createSnapshot(...)
35
35
  - [`getSnapshotResource`](#getsnapshotresource)
36
36
  - [`listDependencies`](#listdependencies)
37
37
 
38
+ **ScheduledSnapshots**
39
+ - [`getOrgSnapshotSchedule`](#getorgsnapshotschedule)
40
+ - [`putOrgSnapshotSchedule`](#putorgsnapshotschedule)
41
+ - [`deleteOrgSnapshotSchedule`](#deleteorgsnapshotschedule)
42
+
38
43
  **Schemas**
39
44
  - [`Error`](#error)
40
- - [`EmptyInventoryError`](#emptyinventoryerror)
41
45
  - [`ResourceRef`](#resourceref)
42
46
  - [`SnapshotResourceSummary`](#snapshotresourcesummary)
43
47
  - [`SnapshotResourceList`](#snapshotresourcelist)
@@ -50,6 +54,9 @@ const { data } = await snapshotClient.createSnapshot(...)
50
54
  - [`Snapshot`](#snapshot)
51
55
  - [`Operation`](#operation)
52
56
  - [`CallerIdentity`](#calleridentity)
57
+ - [`RetentionConfig`](#retentionconfig)
58
+ - [`PutOrgSnapshotScheduleRequest`](#putorgsnapshotschedulerequest)
59
+ - [`OrgSnapshotSchedule`](#orgsnapshotschedule)
53
60
 
54
61
  ### `createSnapshot`
55
62
 
@@ -156,9 +163,9 @@ const { data } = await client.listSnapshots({
156
163
 
157
164
  ### `captureOrgSnapshot`
158
165
 
159
- Snapshot the caller's whole organization now. Fetches a fresh inventory
160
- of the org's configuration resources from configuration-hub-api, persists
161
- it as an inventory artifact, and starts a `scope: "org
166
+ Snapshot the caller's whole organization now. Creates a `scope: "org"`
167
+ snapshot row and starts a chunked capture Step Function, then returns
168
+ immediately. The capture asynchronously fetches a fresh inv
162
169
 
163
170
  `POST /v1/snapshots:capture-org`
164
171
 
@@ -344,6 +351,112 @@ const { data } = await client.getSnapshotResource({
344
351
 
345
352
  ---
346
353
 
354
+ ### `getOrgSnapshotSchedule`
355
+
356
+ Return the scheduled-snapshot enrollment config for the caller's org.
357
+ Returns 404 when the org has not yet enrolled.
358
+
359
+ `GET /v1/org-snapshot-schedule`
360
+
361
+ ```ts
362
+ const { data } = await client.getOrgSnapshotSchedule()
363
+ ```
364
+
365
+ <details>
366
+ <summary>Response</summary>
367
+
368
+ ```json
369
+ {
370
+ "org_id": "string",
371
+ "enabled": true,
372
+ "cron_expression": "cron(0 2 * * ? *)",
373
+ "timezone": "string",
374
+ "retention": {
375
+ "value": 1,
376
+ "unit": "days"
377
+ },
378
+ "excluded_types": ["string"],
379
+ "schedule_name": "string",
380
+ "last_started_at": "1970-01-01T00:00:00.000Z",
381
+ "last_completed_at": "1970-01-01T00:00:00.000Z",
382
+ "last_status": "completed",
383
+ "created_by": "string",
384
+ "created_at": "1970-01-01T00:00:00.000Z",
385
+ "updated_at": "1970-01-01T00:00:00.000Z"
386
+ }
387
+ ```
388
+
389
+ </details>
390
+
391
+ ---
392
+
393
+ ### `putOrgSnapshotSchedule`
394
+
395
+ Create or update the scheduled-snapshot enrollment config for the
396
+ caller's org (upsert). The cron expression and retention window are
397
+ validated server-side; invalid values are rejected with 400.
398
+
399
+ `PUT /v1/org-snapshot-schedule`
400
+
401
+ ```ts
402
+ const { data } = await client.putOrgSnapshotSchedule(
403
+ null,
404
+ {
405
+ enabled: true,
406
+ cron_expression: 'cron(0 2 * * ? *)',
407
+ timezone: 'Europe/Berlin',
408
+ retention: {
409
+ value: 1,
410
+ unit: 'days'
411
+ },
412
+ excluded_types: ['string']
413
+ },
414
+ )
415
+ ```
416
+
417
+ <details>
418
+ <summary>Response</summary>
419
+
420
+ ```json
421
+ {
422
+ "org_id": "string",
423
+ "enabled": true,
424
+ "cron_expression": "cron(0 2 * * ? *)",
425
+ "timezone": "string",
426
+ "retention": {
427
+ "value": 1,
428
+ "unit": "days"
429
+ },
430
+ "excluded_types": ["string"],
431
+ "schedule_name": "string",
432
+ "last_started_at": "1970-01-01T00:00:00.000Z",
433
+ "last_completed_at": "1970-01-01T00:00:00.000Z",
434
+ "last_status": "completed",
435
+ "created_by": "string",
436
+ "created_at": "1970-01-01T00:00:00.000Z",
437
+ "updated_at": "1970-01-01T00:00:00.000Z"
438
+ }
439
+ ```
440
+
441
+ </details>
442
+
443
+ ---
444
+
445
+ ### `deleteOrgSnapshotSchedule`
446
+
447
+ Remove the scheduled-snapshot enrollment for the caller's org.
448
+ Returns 404 when no schedule exists.
449
+ The corresponding EventBridge schedule is removed by a reconcile
450
+ step (Task 6).
451
+
452
+ `DELETE /v1/org-snapshot-schedule`
453
+
454
+ ```ts
455
+ const { data } = await client.deleteOrgSnapshotSchedule()
456
+ ```
457
+
458
+ ---
459
+
347
460
  ### `listDependencies`
348
461
 
349
462
  Walk the dependency tree for a set of resources and return the full
@@ -394,23 +507,6 @@ type Error = {
394
507
  }
395
508
  ```
396
509
 
397
- ### `EmptyInventoryError`
398
-
399
- Returned (422) when the org inventory contains no capturable resources
400
- after filtering out sensitive, unsupported, and excluded types. The
401
- `skipped_types` array explains why every type was dropped.
402
-
403
-
404
- ```ts
405
- type EmptyInventoryError = {
406
- message: string
407
- skipped_types: Array<{
408
- type: string
409
- reason: string
410
- }>
411
- }
412
- ```
413
-
414
510
  ### `ResourceRef`
415
511
 
416
512
  ```ts
@@ -605,3 +701,65 @@ type CallerIdentity = {
605
701
  token_id?: string
606
702
  }
607
703
  ```
704
+
705
+ ### `RetentionConfig`
706
+
707
+ Flat retention window for a scheduled snapshot.
708
+ Converted to a `ttl` epoch at capture time. Capped at ~24 months.
709
+
710
+
711
+ ```ts
712
+ type RetentionConfig = {
713
+ value: number
714
+ unit: "days" | "weeks" | "months"
715
+ }
716
+ ```
717
+
718
+ ### `PutOrgSnapshotScheduleRequest`
719
+
720
+ Body for `putOrgSnapshotSchedule`. All fields optional; unset fields
721
+ receive defaults on first create and are left unchanged on updates
722
+ (except `updated_at`).
723
+
724
+
725
+ ```ts
726
+ type PutOrgSnapshotScheduleRequest = {
727
+ enabled?: boolean
728
+ cron_expression?: string
729
+ timezone?: string
730
+ retention?: {
731
+ value: number
732
+ unit: "days" | "weeks" | "months"
733
+ }
734
+ excluded_types?: string[]
735
+ }
736
+ ```
737
+
738
+ ### `OrgSnapshotSchedule`
739
+
740
+ Enrollment record for a scheduled org snapshot. One row per org.
741
+ This table — not EventBridge — is the source of truth; the EventBridge
742
+ schedule entry is the materialization of this row (reconciled on write
743
+ by Task 6).
744
+
745
+
746
+ ```ts
747
+ type OrgSnapshotSchedule = {
748
+ org_id: string
749
+ enabled: boolean
750
+ cron_expression: string
751
+ timezone: string
752
+ retention: {
753
+ value: number
754
+ unit: "days" | "weeks" | "months"
755
+ }
756
+ excluded_types?: string[]
757
+ schedule_name: string
758
+ last_started_at?: string // date-time
759
+ last_completed_at?: string // date-time
760
+ last_status?: "completed" | "partial" | "failed"
761
+ created_by: string
762
+ created_at: string // date-time
763
+ updated_at: string // date-time
764
+ }
765
+ ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epilot/sdk",
3
- "version": "2.11.3",
3
+ "version": "2.11.5",
4
4
  "description": "JavaScript/TypeScript SDK for epilot APIs",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -322,16 +322,6 @@
322
322
  },
323
323
  "./workflow-definition/openapi.json": "./definitions/workflow-definition.json"
324
324
  },
325
- "scripts": {
326
- "generate": "tsx ../../scripts/generate-sdk-v2.ts && pnpm lint:fix",
327
- "build": "tsup",
328
- "build:watch": "tsup --watch",
329
- "test": "vitest run",
330
- "test:watch": "vitest",
331
- "lint": "biome check src",
332
- "lint:fix": "biome check src --fix",
333
- "prepublishOnly": "npm run build"
334
- },
335
325
  "keywords": [
336
326
  "epilot",
337
327
  "sdk",
@@ -525,5 +515,14 @@
525
515
  "./dist/apis/workflow-definition.d.ts"
526
516
  ]
527
517
  }
518
+ },
519
+ "scripts": {
520
+ "generate": "tsx ../../scripts/generate-sdk-v2.ts && pnpm lint:fix",
521
+ "build": "tsup",
522
+ "build:watch": "tsup --watch",
523
+ "test": "vitest run",
524
+ "test:watch": "vitest",
525
+ "lint": "biome check src",
526
+ "lint:fix": "biome check src --fix"
528
527
  }
529
- }
528
+ }
@@ -1 +0,0 @@
1
- {"s":"https://focus-pocus.dev.sls.epilot.io","o":[["getHealth","get","/v1/health"],["listAchievements","get","/v1/achievements"],["getAchievement","get","/v1/achievements/{id}",[["AchievementOrChallengeId"]]],["getSuggestedChallenge","get","/v1/challenges/suggest",[["route","q"],["entity_type","q"],["category_hint","q"]]],["acceptChallenge","post","/v1/challenges/{id}/accept",[["ChallengeId"]]],["dismissChallenge","post","/v1/challenges/{id}/dismiss",[["ChallengeId"]]],["listActiveChallenges","get","/v1/challenges/active"],["postEvent","post","/v1/events",null,1]],"v":"3.0.3","cp":{"AchievementId":["id","p",true],"AchievementOrChallengeId":["id","p",true],"ChallengeId":["id","p",true],"Cursor":["cursor","q"],"Size":["size","q"]}}