@epilot/sdk 2.7.1 → 2.8.0-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/definitions/app.json +101 -8
- package/definitions/configuration-hub-runtime.json +1 -1
- package/definitions/configuration-hub.json +623 -0
- package/definitions/customer-portal.json +72 -58
- package/definitions/design-runtime.json +1 -1
- package/definitions/design.json +1 -11
- package/definitions/focus-pocus-runtime.json +1 -0
- package/definitions/focus-pocus.json +757 -0
- package/definitions/journey-runtime.json +1 -1
- package/definitions/journey.json +21 -1
- package/dist/README-37TXN4EL.cjs +7 -0
- package/dist/README-Z2WITBOR.js +7 -0
- package/dist/{_index-DB2VV4PQ.cjs → _index-HTUXYSTD.cjs} +4 -1
- package/dist/{_index-5FB6F5YY.js → _index-YTOJUFGD.js} +3 -0
- package/dist/apis/access-token.cjs +6 -6
- package/dist/apis/access-token.js +1 -1
- package/dist/apis/address-suggestions.cjs +6 -6
- package/dist/apis/address-suggestions.js +1 -1
- package/dist/apis/address.cjs +6 -6
- package/dist/apis/address.js +1 -1
- package/dist/apis/ai-agents.cjs +6 -6
- package/dist/apis/ai-agents.js +1 -1
- package/dist/apis/app.cjs +6 -6
- package/dist/apis/app.d.cts +2 -2
- package/dist/apis/app.d.ts +2 -2
- package/dist/apis/app.js +1 -1
- package/dist/apis/audit-logs.cjs +6 -6
- package/dist/apis/audit-logs.js +1 -1
- package/dist/apis/automation.cjs +6 -6
- package/dist/apis/automation.js +1 -1
- package/dist/apis/billing.cjs +6 -6
- package/dist/apis/billing.js +1 -1
- package/dist/apis/blueprint-manifest.cjs +6 -6
- package/dist/apis/blueprint-manifest.js +1 -1
- package/dist/apis/calendar.cjs +6 -6
- package/dist/apis/calendar.js +1 -1
- package/dist/apis/configuration-hub.cjs +8 -8
- package/dist/apis/configuration-hub.d.cts +2 -2
- package/dist/apis/configuration-hub.d.ts +2 -2
- package/dist/apis/configuration-hub.js +2 -2
- package/dist/apis/consent.cjs +6 -6
- package/dist/apis/consent.js +1 -1
- package/dist/apis/customer-portal.cjs +6 -6
- package/dist/apis/customer-portal.d.cts +2 -2
- package/dist/apis/customer-portal.d.ts +2 -2
- package/dist/apis/customer-portal.js +1 -1
- package/dist/apis/dashboard.cjs +6 -6
- package/dist/apis/dashboard.js +1 -1
- package/dist/apis/data-governance.cjs +6 -6
- package/dist/apis/data-governance.js +1 -1
- package/dist/apis/deduplication.cjs +6 -6
- package/dist/apis/deduplication.js +1 -1
- package/dist/apis/design.cjs +8 -8
- package/dist/apis/design.js +2 -2
- package/dist/apis/document.cjs +6 -6
- package/dist/apis/document.js +1 -1
- package/dist/apis/email-settings.cjs +6 -6
- package/dist/apis/email-settings.js +1 -1
- package/dist/apis/email-template.cjs +6 -6
- package/dist/apis/email-template.js +1 -1
- package/dist/apis/entity-mapping.cjs +6 -6
- package/dist/apis/entity-mapping.js +1 -1
- package/dist/apis/entity.cjs +6 -6
- package/dist/apis/entity.js +1 -1
- package/dist/apis/environments.cjs +6 -6
- package/dist/apis/environments.js +1 -1
- package/dist/apis/event-catalog.cjs +6 -6
- package/dist/apis/event-catalog.js +1 -1
- package/dist/apis/file.cjs +6 -6
- package/dist/apis/file.js +1 -1
- package/dist/apis/focus-pocus.cjs +38 -0
- package/dist/apis/focus-pocus.d.cts +18 -0
- package/dist/apis/focus-pocus.d.ts +18 -0
- package/dist/apis/focus-pocus.js +38 -0
- package/dist/apis/iban.cjs +6 -6
- package/dist/apis/iban.js +1 -1
- package/dist/apis/integration-toolkit.cjs +6 -6
- package/dist/apis/integration-toolkit.js +1 -1
- package/dist/apis/journey.cjs +8 -8
- package/dist/apis/journey.d.cts +2 -2
- package/dist/apis/journey.d.ts +2 -2
- package/dist/apis/journey.js +2 -2
- package/dist/apis/kanban.cjs +6 -6
- package/dist/apis/kanban.js +1 -1
- package/dist/apis/message.cjs +6 -6
- package/dist/apis/message.js +1 -1
- package/dist/apis/metering.cjs +6 -6
- package/dist/apis/metering.js +1 -1
- package/dist/apis/notes.cjs +6 -6
- package/dist/apis/notes.js +1 -1
- package/dist/apis/notification.cjs +6 -6
- package/dist/apis/notification.js +1 -1
- package/dist/apis/organization.cjs +6 -6
- package/dist/apis/organization.js +1 -1
- package/dist/apis/partner-directory.cjs +6 -6
- package/dist/apis/partner-directory.js +1 -1
- package/dist/apis/permissions.cjs +6 -6
- package/dist/apis/permissions.js +1 -1
- package/dist/apis/pricing-tier.cjs +6 -6
- package/dist/apis/pricing-tier.js +1 -1
- package/dist/apis/pricing.cjs +6 -6
- package/dist/apis/pricing.js +1 -1
- package/dist/apis/purpose.cjs +6 -6
- package/dist/apis/purpose.js +1 -1
- package/dist/apis/query.cjs +6 -6
- package/dist/apis/query.js +1 -1
- package/dist/apis/sandbox.cjs +6 -6
- package/dist/apis/sandbox.js +1 -1
- package/dist/apis/sharing.cjs +6 -6
- package/dist/apis/sharing.js +1 -1
- package/dist/apis/submission.cjs +6 -6
- package/dist/apis/submission.js +1 -1
- package/dist/apis/target.cjs +6 -6
- package/dist/apis/target.js +1 -1
- package/dist/apis/targeting.cjs +6 -6
- package/dist/apis/targeting.js +1 -1
- package/dist/apis/template-variables.cjs +6 -6
- package/dist/apis/template-variables.js +1 -1
- package/dist/apis/user.cjs +6 -6
- package/dist/apis/user.js +1 -1
- package/dist/apis/validation-rules.cjs +6 -6
- package/dist/apis/validation-rules.js +1 -1
- package/dist/apis/webhooks.cjs +6 -6
- package/dist/apis/webhooks.js +1 -1
- package/dist/apis/workflow-definition.cjs +6 -6
- package/dist/apis/workflow-definition.js +1 -1
- package/dist/apis/workflow.cjs +6 -6
- package/dist/apis/workflow.js +1 -1
- package/dist/{app-SSF545U7.cjs → app-74LECFMK.cjs} +1 -1
- package/dist/{app-34OBBTA4.js → app-GNUHCGPO.js} +1 -1
- package/dist/{app.d--5n0FQQ4.d.cts → app.d-BOR23dso.d.cts} +104 -4
- package/dist/{app.d--5n0FQQ4.d.ts → app.d-BOR23dso.d.ts} +104 -4
- package/dist/bin/cli.js +1 -1
- package/dist/{chunk-SCMAZ73K.js → chunk-54KWFSCM.js} +30 -19
- package/dist/chunk-A6FYGWQ7.cjs +14 -0
- package/dist/{chunk-R7XDTILZ.cjs → chunk-F5Z6I7TF.cjs} +30 -19
- package/dist/chunk-JOUTFBLN.js +14 -0
- package/dist/chunk-LAWKCWVU.cjs +14 -0
- package/dist/{chunk-ZSONBZIF.cjs → chunk-MOLFG5L4.cjs} +1 -1
- package/dist/chunk-P42Q6HOW.js +14 -0
- package/dist/chunk-P4NA7NWG.js +14 -0
- package/dist/chunk-WHXYES2D.cjs +14 -0
- package/dist/{chunk-ONOGGR6Q.js → chunk-WW6DVKJR.js} +1 -1
- package/dist/configuration-hub-E7S4JB2T.js +7 -0
- package/dist/configuration-hub-Q5JBYB52.cjs +7 -0
- package/dist/{configuration-hub-runtime-L6IOERSP.js → configuration-hub-runtime-CXME7TCX.js} +1 -1
- package/dist/{configuration-hub-runtime-I5Y67CXD.cjs → configuration-hub-runtime-QVLJKEZD.cjs} +2 -2
- package/dist/configuration-hub.d-CbSJDa7k.d.cts +1096 -0
- package/dist/configuration-hub.d-CbSJDa7k.d.ts +1096 -0
- package/dist/customer-portal-DR6XFCTQ.js +7 -0
- package/dist/customer-portal-PNFBVIAH.cjs +7 -0
- package/dist/{customer-portal.d-C7ZCbjiY.d.cts → customer-portal.d-CTTCBAZI.d.cts} +217 -61
- package/dist/{customer-portal.d-C7ZCbjiY.d.ts → customer-portal.d-CTTCBAZI.d.ts} +217 -61
- package/dist/data-governance-QYFHBCNB.cjs +7 -0
- package/dist/data-governance-YS2NA6W4.js +7 -0
- package/dist/design-EWZQZ5KX.js +7 -0
- package/dist/design-MUUYXB2J.cjs +7 -0
- package/dist/design-runtime-3RHYNHUV.cjs +5 -0
- package/dist/{design-runtime-QMJM4FAF.js → design-runtime-DLMA4EHQ.js} +1 -1
- package/dist/focus-pocus-JGXH42OF.cjs +7 -0
- package/dist/focus-pocus-XVDVUYL6.js +7 -0
- package/dist/focus-pocus-runtime-QXBBYVX7.js +5 -0
- package/dist/focus-pocus-runtime-X6GQ3WI4.cjs +5 -0
- package/dist/focus-pocus.d-BRFGe53G.d.cts +489 -0
- package/dist/focus-pocus.d-BRFGe53G.d.ts +489 -0
- package/dist/index.cjs +29 -21
- package/dist/index.d.cts +55 -53
- package/dist/index.d.ts +55 -53
- package/dist/index.js +20 -12
- package/dist/journey-4DIIPRU4.js +7 -0
- package/dist/journey-ATC3Y5AW.cjs +7 -0
- package/dist/{journey-runtime-SPBL3F32.cjs → journey-runtime-G2O5C3N2.cjs} +2 -2
- package/dist/{journey-runtime-YXIAOTMD.js → journey-runtime-RI2LJO5S.js} +1 -1
- package/dist/{journey.d-ClXO0xK8.d.cts → journey.d-BenIUWaO.d.cts} +9 -3
- package/dist/{journey.d-ClXO0xK8.d.ts → journey.d-BenIUWaO.d.ts} +9 -3
- package/dist/{js-yaml-UPZKYVRY.js → js-yaml-DLCVPJ7G.js} +17 -15
- package/dist/pricing-R5ENSVPQ.cjs +7 -0
- package/dist/pricing-X27CCRI6.js +7 -0
- package/dist/targeting-74BV7F7H.cjs +7 -0
- package/dist/targeting-W5EKJYR2.js +7 -0
- package/docs/app.md +34 -10
- package/docs/configuration-hub.md +660 -0
- package/docs/customer-portal.md +223 -161
- package/docs/data-governance.md +17 -17
- package/docs/design.md +1 -1
- package/docs/focus-pocus.md +460 -0
- package/docs/journey.md +2 -0
- package/docs/pricing.md +1 -1
- package/docs/targeting.md +4 -4
- package/package.json +10 -1
- package/dist/README-46VYEGGW.js +0 -7
- package/dist/README-IVBISSWB.cjs +0 -7
- package/dist/chunk-EIIIKDOJ.cjs +0 -14
- package/dist/chunk-KIWRGUKM.js +0 -14
- package/dist/chunk-MB6NKETA.cjs +0 -14
- package/dist/chunk-VSZEOCIE.js +0 -14
- package/dist/configuration-hub-A3S6ND6R.cjs +0 -7
- package/dist/configuration-hub-PMAW44U5.js +0 -7
- package/dist/configuration-hub.d-Cqaq2F-W.d.cts +0 -478
- package/dist/configuration-hub.d-Cqaq2F-W.d.ts +0 -478
- package/dist/customer-portal-7HYSBH7H.cjs +0 -7
- package/dist/customer-portal-X4LJX6AU.js +0 -7
- package/dist/data-governance-2U5UU4GM.cjs +0 -7
- package/dist/data-governance-36Y33JVG.js +0 -7
- package/dist/design-DROLIWS3.js +0 -7
- package/dist/design-XZKOZLTR.cjs +0 -7
- package/dist/design-runtime-OXEXKZVG.cjs +0 -5
- package/dist/journey-KDR5EU3W.js +0 -7
- package/dist/journey-REBN4TGQ.cjs +0 -7
- package/dist/pricing-FODHQFCB.cjs +0 -7
- package/dist/pricing-XRIDVZFC.js +0 -7
- package/dist/targeting-EYGYZD6M.cjs +0 -7
- package/dist/targeting-GEJTJN5Z.js +0 -7
package/docs/data-governance.md
CHANGED
|
@@ -125,7 +125,7 @@ const { data } = await client.createJob(
|
|
|
125
125
|
{
|
|
126
126
|
type: 'deletion',
|
|
127
127
|
config_id: 'string',
|
|
128
|
-
scheduled_for: '
|
|
128
|
+
scheduled_for: 'string',
|
|
129
129
|
status: 'in_progress',
|
|
130
130
|
started_at: '1970-01-01T00:00:00.000Z'
|
|
131
131
|
},
|
|
@@ -141,7 +141,7 @@ const { data } = await client.createJob(
|
|
|
141
141
|
"type": "deletion",
|
|
142
142
|
"config_id": "string",
|
|
143
143
|
"entity_schema": "string",
|
|
144
|
-
"scheduled_for": "
|
|
144
|
+
"scheduled_for": "string",
|
|
145
145
|
"status": "in_progress",
|
|
146
146
|
"details": {},
|
|
147
147
|
"started_at": "1970-01-01T00:00:00.000Z",
|
|
@@ -198,7 +198,7 @@ const { data } = await client.updateJob(
|
|
|
198
198
|
"type": "deletion",
|
|
199
199
|
"config_id": "string",
|
|
200
200
|
"entity_schema": "string",
|
|
201
|
-
"scheduled_for": "
|
|
201
|
+
"scheduled_for": "string",
|
|
202
202
|
"status": "in_progress",
|
|
203
203
|
"details": {},
|
|
204
204
|
"started_at": "1970-01-01T00:00:00.000Z",
|
|
@@ -241,7 +241,7 @@ const { data } = await client.getJob({
|
|
|
241
241
|
"type": "deletion",
|
|
242
242
|
"config_id": "string",
|
|
243
243
|
"entity_schema": "string",
|
|
244
|
-
"scheduled_for": "
|
|
244
|
+
"scheduled_for": "string",
|
|
245
245
|
"status": "in_progress",
|
|
246
246
|
"details": {},
|
|
247
247
|
"started_at": "1970-01-01T00:00:00.000Z",
|
|
@@ -325,13 +325,13 @@ const { data } = await client.getConfig({
|
|
|
325
325
|
"schedule": {
|
|
326
326
|
"frequency": "interval",
|
|
327
327
|
"interval_days": 1,
|
|
328
|
-
"start_date": "
|
|
329
|
-
"end_date": "
|
|
328
|
+
"start_date": "string",
|
|
329
|
+
"end_date": "string"
|
|
330
330
|
},
|
|
331
331
|
"enabled": true,
|
|
332
332
|
"created_at": "1970-01-01T00:00:00.000Z",
|
|
333
333
|
"last_updated_at": "1970-01-01T00:00:00.000Z",
|
|
334
|
-
"next_run_at": "
|
|
334
|
+
"next_run_at": "string",
|
|
335
335
|
"relations_for_deletion": ["contact"],
|
|
336
336
|
"last_run_at": "1970-01-01T00:00:00.000Z"
|
|
337
337
|
}
|
|
@@ -362,7 +362,7 @@ const { data } = await client.createJobForConfig({
|
|
|
362
362
|
"type": "deletion",
|
|
363
363
|
"config_id": "string",
|
|
364
364
|
"entity_schema": "string",
|
|
365
|
-
"scheduled_for": "
|
|
365
|
+
"scheduled_for": "string",
|
|
366
366
|
"status": "in_progress",
|
|
367
367
|
"details": {},
|
|
368
368
|
"started_at": "1970-01-01T00:00:00.000Z",
|
|
@@ -413,8 +413,8 @@ const { data } = await client.upsertConfig(
|
|
|
413
413
|
schedule: {
|
|
414
414
|
frequency: 'interval',
|
|
415
415
|
interval_days: 1,
|
|
416
|
-
start_date: '
|
|
417
|
-
end_date: '
|
|
416
|
+
start_date: 'string',
|
|
417
|
+
end_date: 'string'
|
|
418
418
|
},
|
|
419
419
|
relations_for_deletion: ['contact'],
|
|
420
420
|
enabled: true
|
|
@@ -446,13 +446,13 @@ const { data } = await client.upsertConfig(
|
|
|
446
446
|
"schedule": {
|
|
447
447
|
"frequency": "interval",
|
|
448
448
|
"interval_days": 1,
|
|
449
|
-
"start_date": "
|
|
450
|
-
"end_date": "
|
|
449
|
+
"start_date": "string",
|
|
450
|
+
"end_date": "string"
|
|
451
451
|
},
|
|
452
452
|
"enabled": true,
|
|
453
453
|
"created_at": "1970-01-01T00:00:00.000Z",
|
|
454
454
|
"last_updated_at": "1970-01-01T00:00:00.000Z",
|
|
455
|
-
"next_run_at": "
|
|
455
|
+
"next_run_at": "string",
|
|
456
456
|
"relations_for_deletion": ["contact"],
|
|
457
457
|
"last_run_at": "1970-01-01T00:00:00.000Z"
|
|
458
458
|
}
|
|
@@ -505,13 +505,13 @@ const { data } = await client.listConfigs({
|
|
|
505
505
|
"schedule": {
|
|
506
506
|
"frequency": "interval",
|
|
507
507
|
"interval_days": 1,
|
|
508
|
-
"start_date": "
|
|
509
|
-
"end_date": "
|
|
508
|
+
"start_date": "string",
|
|
509
|
+
"end_date": "string"
|
|
510
510
|
},
|
|
511
511
|
"enabled": true,
|
|
512
512
|
"created_at": "1970-01-01T00:00:00.000Z",
|
|
513
513
|
"last_updated_at": "1970-01-01T00:00:00.000Z",
|
|
514
|
-
"next_run_at": "
|
|
514
|
+
"next_run_at": "string",
|
|
515
515
|
"relations_for_deletion": ["contact"],
|
|
516
516
|
"last_run_at": "1970-01-01T00:00:00.000Z"
|
|
517
517
|
}
|
|
@@ -552,7 +552,7 @@ const { data } = await client.listJobs({
|
|
|
552
552
|
"type": "deletion",
|
|
553
553
|
"config_id": "string",
|
|
554
554
|
"entity_schema": "string",
|
|
555
|
-
"scheduled_for": "
|
|
555
|
+
"scheduled_for": "string",
|
|
556
556
|
"status": "in_progress",
|
|
557
557
|
"details": {},
|
|
558
558
|
"started_at": "1970-01-01T00:00:00.000Z",
|
package/docs/design.md
CHANGED
|
@@ -0,0 +1,460 @@
|
|
|
1
|
+
# Focus Pocus API
|
|
2
|
+
|
|
3
|
+
- **Base URL:** `https://focus-pocus.dev.sls.epilot.io`
|
|
4
|
+
- **Full API Docs:** [https://docs.epilot.io/api/focus-pocus](https://docs.epilot.io/api/focus-pocus)
|
|
5
|
+
|
|
6
|
+
## Usage
|
|
7
|
+
|
|
8
|
+
```ts
|
|
9
|
+
import { epilot } from '@epilot/sdk'
|
|
10
|
+
|
|
11
|
+
epilot.authorize(() => '<token>')
|
|
12
|
+
const { data } = await epilot.focusPocus.getHealth(...)
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
### Tree-shakeable import
|
|
16
|
+
|
|
17
|
+
```ts
|
|
18
|
+
import { getClient, authorize } from '@epilot/sdk/focus-pocus'
|
|
19
|
+
|
|
20
|
+
const focusPocusClient = getClient()
|
|
21
|
+
authorize(focusPocusClient, () => '<token>')
|
|
22
|
+
const { data } = await focusPocusClient.getHealth(...)
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Operations
|
|
26
|
+
|
|
27
|
+
**Health**
|
|
28
|
+
- [`getHealth`](#gethealth)
|
|
29
|
+
|
|
30
|
+
**Achievements**
|
|
31
|
+
- [`listAchievements`](#listachievements)
|
|
32
|
+
- [`getAchievement`](#getachievement)
|
|
33
|
+
|
|
34
|
+
**Challenges**
|
|
35
|
+
- [`getSuggestedChallenge`](#getsuggestedchallenge)
|
|
36
|
+
- [`acceptChallenge`](#acceptchallenge)
|
|
37
|
+
- [`dismissChallenge`](#dismisschallenge)
|
|
38
|
+
- [`listActiveChallenges`](#listactivechallenges)
|
|
39
|
+
|
|
40
|
+
**Events**
|
|
41
|
+
- [`postEvent`](#postevent)
|
|
42
|
+
|
|
43
|
+
**Schemas**
|
|
44
|
+
- [`HealthResponse`](#healthresponse)
|
|
45
|
+
- [`ErrorResponse`](#errorresponse)
|
|
46
|
+
- [`ConflictError`](#conflicterror)
|
|
47
|
+
- [`ChallengeSuggested`](#challengesuggested)
|
|
48
|
+
- [`ChallengeActive`](#challengeactive)
|
|
49
|
+
- [`ActiveChallengeListResponse`](#activechallengelistresponse)
|
|
50
|
+
- [`AchievementFeedItem`](#achievementfeeditem)
|
|
51
|
+
- [`AchievementFeedListResponse`](#achievementfeedlistresponse)
|
|
52
|
+
- [`EventIngestRequest`](#eventingestrequest)
|
|
53
|
+
- [`EventAccepted`](#eventaccepted)
|
|
54
|
+
|
|
55
|
+
### `getHealth`
|
|
56
|
+
|
|
57
|
+
Liveness probe for the Focus Pocus API. Requires a valid EpilotAuth token.
|
|
58
|
+
|
|
59
|
+
`GET /v1/health`
|
|
60
|
+
|
|
61
|
+
```ts
|
|
62
|
+
const { data } = await client.getHealth()
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
<details>
|
|
66
|
+
<summary>Response</summary>
|
|
67
|
+
|
|
68
|
+
```json
|
|
69
|
+
{
|
|
70
|
+
"status": "ok",
|
|
71
|
+
"stage": "dev",
|
|
72
|
+
"service": "focus-pocus-api"
|
|
73
|
+
}
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
</details>
|
|
77
|
+
|
|
78
|
+
---
|
|
79
|
+
|
|
80
|
+
### `listAchievements`
|
|
81
|
+
|
|
82
|
+
Unified feed for the authenticated user: returns active challenges and completed
|
|
83
|
+
v1 static achievement unlocks. The `userId` is read from the EpilotAuth claim —
|
|
84
|
+
no user path or query parameter is acce
|
|
85
|
+
|
|
86
|
+
`GET /v1/achievements`
|
|
87
|
+
|
|
88
|
+
```ts
|
|
89
|
+
const { data } = await client.listAchievements()
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
<details>
|
|
93
|
+
<summary>Response</summary>
|
|
94
|
+
|
|
95
|
+
```json
|
|
96
|
+
{
|
|
97
|
+
"results": [
|
|
98
|
+
{
|
|
99
|
+
"id": "string",
|
|
100
|
+
"challenge_template_id": "string",
|
|
101
|
+
"category": "string",
|
|
102
|
+
"title": "string",
|
|
103
|
+
"description": "string",
|
|
104
|
+
"badge_image_url": "string",
|
|
105
|
+
"icon": "string",
|
|
106
|
+
"status": "active",
|
|
107
|
+
"accepted_at": "1970-01-01T00:00:00.000Z",
|
|
108
|
+
"deadline": "1970-01-01T00:00:00.000Z",
|
|
109
|
+
"time_remaining_ms": 0,
|
|
110
|
+
"unlocked_at": "1970-01-01T00:00:00.000Z",
|
|
111
|
+
"xp_awarded": 0,
|
|
112
|
+
"just_unlocked": true
|
|
113
|
+
}
|
|
114
|
+
],
|
|
115
|
+
"total": 0
|
|
116
|
+
}
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
</details>
|
|
120
|
+
|
|
121
|
+
---
|
|
122
|
+
|
|
123
|
+
### `getAchievement`
|
|
124
|
+
|
|
125
|
+
Single user-scoped achievement or active-challenge item. Returns 404 if the id
|
|
126
|
+
does not belong to the authenticated user.
|
|
127
|
+
|
|
128
|
+
`GET /v1/achievements/{id}`
|
|
129
|
+
|
|
130
|
+
```ts
|
|
131
|
+
const { data } = await client.getAchievement({
|
|
132
|
+
id: '123e4567-e89b-12d3-a456-426614174000',
|
|
133
|
+
})
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
<details>
|
|
137
|
+
<summary>Response</summary>
|
|
138
|
+
|
|
139
|
+
```json
|
|
140
|
+
{
|
|
141
|
+
"id": "string",
|
|
142
|
+
"challenge_template_id": "string",
|
|
143
|
+
"category": "string",
|
|
144
|
+
"title": "string",
|
|
145
|
+
"description": "string",
|
|
146
|
+
"badge_image_url": "string",
|
|
147
|
+
"icon": "string",
|
|
148
|
+
"status": "active",
|
|
149
|
+
"accepted_at": "1970-01-01T00:00:00.000Z",
|
|
150
|
+
"deadline": "1970-01-01T00:00:00.000Z",
|
|
151
|
+
"time_remaining_ms": 0,
|
|
152
|
+
"unlocked_at": "1970-01-01T00:00:00.000Z",
|
|
153
|
+
"xp_awarded": 0,
|
|
154
|
+
"just_unlocked": true
|
|
155
|
+
}
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
</details>
|
|
159
|
+
|
|
160
|
+
---
|
|
161
|
+
|
|
162
|
+
### `getSuggestedChallenge`
|
|
163
|
+
|
|
164
|
+
Returns a suggested challenge for the authenticated user. The suggestion is
|
|
165
|
+
persisted with a 7-day TTL. Calling again with the same `(user, category)`
|
|
166
|
+
within 24h returns the existing suggestion withou
|
|
167
|
+
|
|
168
|
+
`GET /v1/challenges/suggest`
|
|
169
|
+
|
|
170
|
+
```ts
|
|
171
|
+
const { data } = await client.getSuggestedChallenge({
|
|
172
|
+
route: 'example',
|
|
173
|
+
entity_type: 'example',
|
|
174
|
+
category_hint: 'example',
|
|
175
|
+
})
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
<details>
|
|
179
|
+
<summary>Response</summary>
|
|
180
|
+
|
|
181
|
+
```json
|
|
182
|
+
{
|
|
183
|
+
"id": "string",
|
|
184
|
+
"challenge_template_id": "string",
|
|
185
|
+
"category": "string",
|
|
186
|
+
"title": "string",
|
|
187
|
+
"description": "string",
|
|
188
|
+
"badge_image_url": "string",
|
|
189
|
+
"default_duration_hours": 1,
|
|
190
|
+
"status": "suggested",
|
|
191
|
+
"suggested_at": "1970-01-01T00:00:00.000Z"
|
|
192
|
+
}
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
</details>
|
|
196
|
+
|
|
197
|
+
---
|
|
198
|
+
|
|
199
|
+
### `acceptChallenge`
|
|
200
|
+
|
|
201
|
+
Accept a suggested challenge. Atomically transitions the challenge from
|
|
202
|
+
`suggested` to `active` using a conditional DynamoDB UpdateItem. Returns 409 if
|
|
203
|
+
the challenge has already been transitioned or t
|
|
204
|
+
|
|
205
|
+
`POST /v1/challenges/{id}/accept`
|
|
206
|
+
|
|
207
|
+
```ts
|
|
208
|
+
const { data } = await client.acceptChallenge({
|
|
209
|
+
id: '123e4567-e89b-12d3-a456-426614174000',
|
|
210
|
+
})
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
<details>
|
|
214
|
+
<summary>Response</summary>
|
|
215
|
+
|
|
216
|
+
```json
|
|
217
|
+
{
|
|
218
|
+
"id": "string",
|
|
219
|
+
"challenge_template_id": "string",
|
|
220
|
+
"category": "string",
|
|
221
|
+
"title": "string",
|
|
222
|
+
"description": "string",
|
|
223
|
+
"badge_image_url": "string",
|
|
224
|
+
"status": "active",
|
|
225
|
+
"accepted_at": "1970-01-01T00:00:00.000Z",
|
|
226
|
+
"deadline": "1970-01-01T00:00:00.000Z",
|
|
227
|
+
"time_remaining_ms": 0
|
|
228
|
+
}
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
</details>
|
|
232
|
+
|
|
233
|
+
---
|
|
234
|
+
|
|
235
|
+
### `dismissChallenge`
|
|
236
|
+
|
|
237
|
+
Dismiss a suggested challenge. Atomically transitions the challenge from
|
|
238
|
+
`suggested` to `dismissed`. The challenge template is filtered from `/suggest`
|
|
239
|
+
responses for the next 24h. Returns 409 if the c
|
|
240
|
+
|
|
241
|
+
`POST /v1/challenges/{id}/dismiss`
|
|
242
|
+
|
|
243
|
+
```ts
|
|
244
|
+
const { data } = await client.dismissChallenge({
|
|
245
|
+
id: '123e4567-e89b-12d3-a456-426614174000',
|
|
246
|
+
})
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
---
|
|
250
|
+
|
|
251
|
+
### `listActiveChallenges`
|
|
252
|
+
|
|
253
|
+
Returns all active challenges for the authenticated user. Challenges whose
|
|
254
|
+
deadline has passed are lazily expired (fire-and-forget UpdateItem) and
|
|
255
|
+
excluded from the response. The result set is bounded
|
|
256
|
+
|
|
257
|
+
`GET /v1/challenges/active`
|
|
258
|
+
|
|
259
|
+
```ts
|
|
260
|
+
const { data } = await client.listActiveChallenges()
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
<details>
|
|
264
|
+
<summary>Response</summary>
|
|
265
|
+
|
|
266
|
+
```json
|
|
267
|
+
{
|
|
268
|
+
"results": [
|
|
269
|
+
{
|
|
270
|
+
"id": "string",
|
|
271
|
+
"challenge_template_id": "string",
|
|
272
|
+
"category": "string",
|
|
273
|
+
"title": "string",
|
|
274
|
+
"description": "string",
|
|
275
|
+
"badge_image_url": "string",
|
|
276
|
+
"status": "active",
|
|
277
|
+
"accepted_at": "1970-01-01T00:00:00.000Z",
|
|
278
|
+
"deadline": "1970-01-01T00:00:00.000Z",
|
|
279
|
+
"time_remaining_ms": 0
|
|
280
|
+
}
|
|
281
|
+
],
|
|
282
|
+
"total": 0
|
|
283
|
+
}
|
|
284
|
+
```
|
|
285
|
+
|
|
286
|
+
</details>
|
|
287
|
+
|
|
288
|
+
---
|
|
289
|
+
|
|
290
|
+
### `postEvent`
|
|
291
|
+
|
|
292
|
+
Persist-first event ingest. Accepts an activity event, writes it to the event log
|
|
293
|
+
idempotently (keyed by `event_id`), and returns 202. Achievement evaluation happens
|
|
294
|
+
asynchronously — no unlocks are re
|
|
295
|
+
|
|
296
|
+
`POST /v1/events`
|
|
297
|
+
|
|
298
|
+
```ts
|
|
299
|
+
const { data } = await client.postEvent(
|
|
300
|
+
null,
|
|
301
|
+
{
|
|
302
|
+
event_id: 'string',
|
|
303
|
+
event_type: 'string',
|
|
304
|
+
actor_user_id: 'string',
|
|
305
|
+
occurred_at: '1970-01-01T00:00:00.000Z',
|
|
306
|
+
properties: {}
|
|
307
|
+
},
|
|
308
|
+
)
|
|
309
|
+
```
|
|
310
|
+
|
|
311
|
+
---
|
|
312
|
+
|
|
313
|
+
## Schemas
|
|
314
|
+
|
|
315
|
+
### `HealthResponse`
|
|
316
|
+
|
|
317
|
+
```ts
|
|
318
|
+
type HealthResponse = {
|
|
319
|
+
status: "ok"
|
|
320
|
+
stage: string
|
|
321
|
+
service: string
|
|
322
|
+
}
|
|
323
|
+
```
|
|
324
|
+
|
|
325
|
+
### `ErrorResponse`
|
|
326
|
+
|
|
327
|
+
```ts
|
|
328
|
+
type ErrorResponse = {
|
|
329
|
+
status: number
|
|
330
|
+
error: string
|
|
331
|
+
}
|
|
332
|
+
```
|
|
333
|
+
|
|
334
|
+
### `ConflictError`
|
|
335
|
+
|
|
336
|
+
```ts
|
|
337
|
+
type ConflictError = {
|
|
338
|
+
status: 409
|
|
339
|
+
error: string
|
|
340
|
+
reason: "already_transitioned" | "too_many_active" | "deadline_passed"
|
|
341
|
+
}
|
|
342
|
+
```
|
|
343
|
+
|
|
344
|
+
### `ChallengeSuggested`
|
|
345
|
+
|
|
346
|
+
```ts
|
|
347
|
+
type ChallengeSuggested = {
|
|
348
|
+
id: string
|
|
349
|
+
challenge_template_id: string
|
|
350
|
+
category: string
|
|
351
|
+
title: string
|
|
352
|
+
description: string
|
|
353
|
+
badge_image_url: string
|
|
354
|
+
default_duration_hours: number
|
|
355
|
+
status: "suggested"
|
|
356
|
+
suggested_at: string // date-time
|
|
357
|
+
}
|
|
358
|
+
```
|
|
359
|
+
|
|
360
|
+
### `ChallengeActive`
|
|
361
|
+
|
|
362
|
+
```ts
|
|
363
|
+
type ChallengeActive = {
|
|
364
|
+
id: string
|
|
365
|
+
challenge_template_id: string
|
|
366
|
+
category: string
|
|
367
|
+
title: string
|
|
368
|
+
description: string
|
|
369
|
+
badge_image_url: string
|
|
370
|
+
status: "active"
|
|
371
|
+
accepted_at: string // date-time
|
|
372
|
+
deadline: string // date-time
|
|
373
|
+
time_remaining_ms: number
|
|
374
|
+
}
|
|
375
|
+
```
|
|
376
|
+
|
|
377
|
+
### `ActiveChallengeListResponse`
|
|
378
|
+
|
|
379
|
+
```ts
|
|
380
|
+
type ActiveChallengeListResponse = {
|
|
381
|
+
results: Array<{
|
|
382
|
+
id: string
|
|
383
|
+
challenge_template_id: string
|
|
384
|
+
category: string
|
|
385
|
+
title: string
|
|
386
|
+
description: string
|
|
387
|
+
badge_image_url: string
|
|
388
|
+
status: "active"
|
|
389
|
+
accepted_at: string // date-time
|
|
390
|
+
deadline: string // date-time
|
|
391
|
+
time_remaining_ms: number
|
|
392
|
+
}>
|
|
393
|
+
total: number
|
|
394
|
+
}
|
|
395
|
+
```
|
|
396
|
+
|
|
397
|
+
### `AchievementFeedItem`
|
|
398
|
+
|
|
399
|
+
```ts
|
|
400
|
+
type AchievementFeedItem = {
|
|
401
|
+
id: string
|
|
402
|
+
challenge_template_id?: string
|
|
403
|
+
category: string
|
|
404
|
+
title: string
|
|
405
|
+
description: string
|
|
406
|
+
badge_image_url?: string
|
|
407
|
+
icon?: string
|
|
408
|
+
status: "active" | "completed" | "expired"
|
|
409
|
+
accepted_at?: string // date-time
|
|
410
|
+
deadline?: string // date-time
|
|
411
|
+
time_remaining_ms?: number
|
|
412
|
+
unlocked_at?: string // date-time
|
|
413
|
+
xp_awarded?: number
|
|
414
|
+
just_unlocked: boolean
|
|
415
|
+
}
|
|
416
|
+
```
|
|
417
|
+
|
|
418
|
+
### `AchievementFeedListResponse`
|
|
419
|
+
|
|
420
|
+
```ts
|
|
421
|
+
type AchievementFeedListResponse = {
|
|
422
|
+
results: Array<{
|
|
423
|
+
id: string
|
|
424
|
+
challenge_template_id?: string
|
|
425
|
+
category: string
|
|
426
|
+
title: string
|
|
427
|
+
description: string
|
|
428
|
+
badge_image_url?: string
|
|
429
|
+
icon?: string
|
|
430
|
+
status: "active" | "completed" | "expired"
|
|
431
|
+
accepted_at?: string // date-time
|
|
432
|
+
deadline?: string // date-time
|
|
433
|
+
time_remaining_ms?: number
|
|
434
|
+
unlocked_at?: string // date-time
|
|
435
|
+
xp_awarded?: number
|
|
436
|
+
just_unlocked: boolean
|
|
437
|
+
}>
|
|
438
|
+
total: number
|
|
439
|
+
}
|
|
440
|
+
```
|
|
441
|
+
|
|
442
|
+
### `EventIngestRequest`
|
|
443
|
+
|
|
444
|
+
```ts
|
|
445
|
+
type EventIngestRequest = {
|
|
446
|
+
event_id: string
|
|
447
|
+
event_type: string
|
|
448
|
+
actor_user_id: string
|
|
449
|
+
occurred_at: string // date-time
|
|
450
|
+
properties?: Record<string, unknown>
|
|
451
|
+
}
|
|
452
|
+
```
|
|
453
|
+
|
|
454
|
+
### `EventAccepted`
|
|
455
|
+
|
|
456
|
+
```ts
|
|
457
|
+
type EventAccepted = {
|
|
458
|
+
accepted: true
|
|
459
|
+
}
|
|
460
|
+
```
|
package/docs/journey.md
CHANGED
|
@@ -100,6 +100,7 @@ Get journey by id. Private journeys requires valid private token to be passed
|
|
|
100
100
|
```ts
|
|
101
101
|
const { data } = await client.getJourney({
|
|
102
102
|
id: '123e4567-e89b-12d3-a456-426614174000',
|
|
103
|
+
version: 1,
|
|
103
104
|
source: 'example',
|
|
104
105
|
orgId: 'example',
|
|
105
106
|
})
|
|
@@ -1432,6 +1433,7 @@ Get journey by id
|
|
|
1432
1433
|
```ts
|
|
1433
1434
|
const { data } = await client.getJourneyV2({
|
|
1434
1435
|
id: '123e4567-e89b-12d3-a456-426614174000',
|
|
1436
|
+
version: 1,
|
|
1435
1437
|
})
|
|
1436
1438
|
```
|
|
1437
1439
|
|
package/docs/pricing.md
CHANGED
|
@@ -1368,7 +1368,7 @@ const { data } = await client.$computePrice(
|
|
|
1368
1368
|
consumption_NT: 0,
|
|
1369
1369
|
association_id: 'string',
|
|
1370
1370
|
billing_period: 'monthly',
|
|
1371
|
-
reference_date: '
|
|
1371
|
+
reference_date: 'string',
|
|
1372
1372
|
type: 'power',
|
|
1373
1373
|
meter_type: 'classic'
|
|
1374
1374
|
},
|
package/docs/targeting.md
CHANGED
|
@@ -116,8 +116,8 @@ const { data } = await client.changeCampaignStatus({
|
|
|
116
116
|
"name": "string",
|
|
117
117
|
"goal": "string",
|
|
118
118
|
"status": "draft",
|
|
119
|
-
"start_date": "
|
|
120
|
-
"end_date": "
|
|
119
|
+
"start_date": "string",
|
|
120
|
+
"end_date": "string",
|
|
121
121
|
"flow_id": "string",
|
|
122
122
|
"job_id": "string",
|
|
123
123
|
"target": {
|
|
@@ -296,8 +296,8 @@ const { data } = await client.matchCampaigns(
|
|
|
296
296
|
"name": "string",
|
|
297
297
|
"goal": "string",
|
|
298
298
|
"status": "draft",
|
|
299
|
-
"start_date": "
|
|
300
|
-
"end_date": "
|
|
299
|
+
"start_date": "string",
|
|
300
|
+
"end_date": "string",
|
|
301
301
|
"flow_id": "string",
|
|
302
302
|
"job_id": "string",
|
|
303
303
|
"target": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@epilot/sdk",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.8.0-rc.0",
|
|
4
4
|
"description": "JavaScript/TypeScript SDK for epilot APIs",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -165,6 +165,12 @@
|
|
|
165
165
|
"require": "./dist/apis/file.cjs"
|
|
166
166
|
},
|
|
167
167
|
"./file/openapi.json": "./definitions/file.json",
|
|
168
|
+
"./focus-pocus": {
|
|
169
|
+
"types": "./dist/apis/focus-pocus.d.ts",
|
|
170
|
+
"import": "./dist/apis/focus-pocus.js",
|
|
171
|
+
"require": "./dist/apis/focus-pocus.cjs"
|
|
172
|
+
},
|
|
173
|
+
"./focus-pocus/openapi.json": "./definitions/focus-pocus.json",
|
|
168
174
|
"./iban": {
|
|
169
175
|
"types": "./dist/apis/iban.d.ts",
|
|
170
176
|
"import": "./dist/apis/iban.js",
|
|
@@ -440,6 +446,9 @@
|
|
|
440
446
|
"file": [
|
|
441
447
|
"./dist/apis/file.d.ts"
|
|
442
448
|
],
|
|
449
|
+
"focus-pocus": [
|
|
450
|
+
"./dist/apis/focus-pocus.d.ts"
|
|
451
|
+
],
|
|
443
452
|
"iban": [
|
|
444
453
|
"./dist/apis/iban.d.ts"
|
|
445
454
|
],
|