@epilot/sdk 2.3.2 → 2.3.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.
- package/README.md +2 -0
- package/definitions/blueprint-manifest-runtime.json +1 -1
- package/definitions/blueprint-manifest.json +239 -12
- package/definitions/configuration-hub-runtime.json +1 -0
- package/definitions/configuration-hub.json +399 -0
- package/definitions/environments-runtime.json +1 -1
- package/definitions/environments.json +2 -2
- package/definitions/query-runtime.json +1 -0
- package/definitions/query.json +3178 -0
- package/dist/README-6MG272KM.cjs +7 -0
- package/dist/README-7N542PBL.js +7 -0
- package/dist/{_index-O7JDGRSE.cjs → _index-55HAH24D.cjs} +7 -1
- package/dist/{_index-CLT2KTVS.js → _index-HE4B6FOA.js} +6 -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.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 +8 -8
- package/dist/apis/blueprint-manifest.d.cts +2 -2
- package/dist/apis/blueprint-manifest.d.ts +2 -2
- package/dist/apis/blueprint-manifest.js +2 -2
- package/dist/apis/configuration-hub.cjs +38 -0
- package/dist/apis/configuration-hub.d.cts +18 -0
- package/dist/apis/configuration-hub.d.ts +18 -0
- package/dist/apis/configuration-hub.js +38 -0
- 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.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 +6 -6
- package/dist/apis/design.js +1 -1
- 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 +8 -8
- package/dist/apis/environments.d.cts +2 -2
- package/dist/apis/environments.d.ts +2 -2
- package/dist/apis/environments.js +2 -2
- 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/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 +6 -6
- package/dist/apis/journey.js +1 -1
- 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 +38 -0
- package/dist/apis/query.d.cts +18 -0
- package/dist/apis/query.d.ts +18 -0
- package/dist/apis/query.js +38 -0
- 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 +38 -0
- package/dist/apis/target.d.cts +597 -0
- package/dist/apis/target.d.ts +597 -0
- package/dist/apis/target.js +38 -0
- 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/blueprint-manifest-DBEY5PPI.js +7 -0
- package/dist/blueprint-manifest-IEQ6YBY7.cjs +7 -0
- package/dist/{blueprint-manifest-runtime-E2FN43TB.js → blueprint-manifest-runtime-5UN52LW5.js} +1 -1
- package/dist/{blueprint-manifest-runtime-G4UK5VEX.cjs → blueprint-manifest-runtime-QN2IECSA.cjs} +2 -2
- package/dist/{blueprint-manifest.d-BGrGU787.d.cts → blueprint-manifest.d-BPyzoR0X.d.cts} +228 -9
- package/dist/{blueprint-manifest.d-BGrGU787.d.ts → blueprint-manifest.d-BPyzoR0X.d.ts} +228 -9
- package/dist/{chunk-6IMAKHA4.js → chunk-2LEEXRJX.js} +1 -1
- package/dist/chunk-4JAOFRYX.js +14 -0
- package/dist/{chunk-5JN243WJ.js → chunk-7C4FQXMS.js} +12 -6
- package/dist/chunk-EYKEVZME.cjs +14 -0
- package/dist/{chunk-VTJQTEQX.cjs → chunk-GGMGJYHO.cjs} +12 -6
- package/dist/{chunk-BDKLBHIN.cjs → chunk-I6DG26UJ.cjs} +1 -1
- package/dist/{chunk-5APJZUIH.cjs → chunk-L544VG3B.cjs} +1 -1
- package/dist/chunk-MM5JDJFO.js +14 -0
- package/dist/{chunk-VPDA5SAH.js → chunk-O2YVXGPZ.js} +1 -1
- package/dist/chunk-Q7OKRNUG.cjs +14 -0
- package/dist/chunk-RMP2HHCR.js +14 -0
- package/dist/chunk-XDZ2JKJ4.cjs +14 -0
- package/dist/configuration-hub-LKSRCGYT.cjs +7 -0
- package/dist/configuration-hub-TZ2ULWV4.js +7 -0
- package/dist/configuration-hub-runtime-B7KKIHHY.cjs +5 -0
- package/dist/configuration-hub-runtime-TEDEKI7E.js +5 -0
- package/dist/configuration-hub.d-CqvhcMOn.d.cts +166 -0
- package/dist/configuration-hub.d-CqvhcMOn.d.ts +166 -0
- package/dist/environments-PXJOTQVM.js +7 -0
- package/dist/environments-QJ4UMJ5C.cjs +7 -0
- package/dist/{environments-runtime-FMSNJF5S.js → environments-runtime-NKHLZJB3.js} +1 -1
- package/dist/{environments-runtime-5DVTRV2Z.cjs → environments-runtime-QC2BUHBW.cjs} +2 -2
- package/dist/{environments.d-H3LK_KuH.d.ts → environments.d-BvqvN-PD.d.cts} +134 -5
- package/dist/{environments.d-H3LK_KuH.d.cts → environments.d-BvqvN-PD.d.ts} +134 -5
- package/dist/index.cjs +43 -27
- package/dist/index.d.cts +81 -77
- package/dist/index.d.ts +81 -77
- package/dist/index.js +39 -23
- package/dist/query-JSDB2F2U.cjs +7 -0
- package/dist/query-RJ4M25PA.js +7 -0
- package/dist/query-runtime-NLOSMDAJ.cjs +5 -0
- package/dist/query-runtime-SYJTDUNG.js +5 -0
- package/dist/query.d-Cmp78IhZ.d.cts +2375 -0
- package/dist/query.d-Cmp78IhZ.d.ts +2375 -0
- package/dist/target-3RS5BN2B.cjs +7 -0
- package/dist/target-5MKRXCHX.js +7 -0
- package/dist/target-runtime-BMJ7EARM.cjs +5 -0
- package/dist/target-runtime-PBF3WYL7.js +5 -0
- package/docs/blueprint-manifest.md +418 -40
- package/docs/configuration-hub.md +256 -0
- package/docs/environments.md +3 -5
- package/docs/query.md +1609 -0
- package/docs/target.md +741 -0
- package/package.json +19 -1
- package/dist/README-KX4XC2HB.js +0 -7
- package/dist/README-PTYV6PQI.cjs +0 -7
- package/dist/blueprint-manifest-ELK4SGN7.js +0 -7
- package/dist/blueprint-manifest-VBOWPK52.cjs +0 -7
- package/dist/environments-I6RWPVHA.js +0 -7
- package/dist/environments-TZYXLYXA.cjs +0 -7
package/docs/target.md
ADDED
|
@@ -0,0 +1,741 @@
|
|
|
1
|
+
# Target API
|
|
2
|
+
|
|
3
|
+
- **Base URL:** `https://target.sls.epilot.io`
|
|
4
|
+
- **Full API Docs:** [https://docs.epilot.io/api/target](https://docs.epilot.io/api/target)
|
|
5
|
+
|
|
6
|
+
## Usage
|
|
7
|
+
|
|
8
|
+
```ts
|
|
9
|
+
import { epilot } from '@epilot/sdk'
|
|
10
|
+
|
|
11
|
+
epilot.authorize(() => '<token>')
|
|
12
|
+
const { data } = await epilot.target.createTarget(...)
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
### Tree-shakeable import
|
|
16
|
+
|
|
17
|
+
```ts
|
|
18
|
+
import { getClient, authorize } from '@epilot/sdk/target'
|
|
19
|
+
|
|
20
|
+
const targetClient = getClient()
|
|
21
|
+
authorize(targetClient, () => '<token>')
|
|
22
|
+
const { data } = await targetClient.createTarget(...)
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Operations
|
|
26
|
+
|
|
27
|
+
**Target**
|
|
28
|
+
- [`createTarget`](#createtarget)
|
|
29
|
+
- [`getTarget`](#gettarget)
|
|
30
|
+
- [`deleteTarget`](#deletetarget)
|
|
31
|
+
- [`patchTarget`](#patchtarget)
|
|
32
|
+
- [`updateTarget`](#updatetarget)
|
|
33
|
+
|
|
34
|
+
**Schemas**
|
|
35
|
+
- [`BaseError`](#baseerror)
|
|
36
|
+
- [`ServerError`](#servererror)
|
|
37
|
+
- [`ClientError`](#clienterror)
|
|
38
|
+
- [`BaseUUID`](#baseuuid)
|
|
39
|
+
- [`BaseTags`](#basetags)
|
|
40
|
+
- [`BasePurpose`](#basepurpose)
|
|
41
|
+
- [`BaseRelation`](#baserelation)
|
|
42
|
+
- [`BaseEntityOwner`](#baseentityowner)
|
|
43
|
+
- [`BaseEntityAcl`](#baseentityacl)
|
|
44
|
+
- [`BaseSystemFields`](#basesystemfields)
|
|
45
|
+
- [`BaseSystemReadonlyFields`](#basesystemreadonlyfields)
|
|
46
|
+
- [`BaseSystemFieldsRequired`](#basesystemfieldsrequired)
|
|
47
|
+
- [`BaseTarget`](#basetarget)
|
|
48
|
+
- [`BaseTargetRequired`](#basetargetrequired)
|
|
49
|
+
- [`Target`](#target)
|
|
50
|
+
- [`TargetCreate`](#targetcreate)
|
|
51
|
+
- [`TargetPatch`](#targetpatch)
|
|
52
|
+
|
|
53
|
+
### `createTarget`
|
|
54
|
+
|
|
55
|
+
Create a new target entity
|
|
56
|
+
|
|
57
|
+
`POST /v1/target`
|
|
58
|
+
|
|
59
|
+
```ts
|
|
60
|
+
const { data } = await client.createTarget(
|
|
61
|
+
null,
|
|
62
|
+
{
|
|
63
|
+
_schema: 'target',
|
|
64
|
+
name: 'string',
|
|
65
|
+
description: 'string',
|
|
66
|
+
entity_schema: 'string',
|
|
67
|
+
entity_filters: {
|
|
68
|
+
filter: {
|
|
69
|
+
items: [
|
|
70
|
+
{
|
|
71
|
+
key: 'string',
|
|
72
|
+
operator: 'string',
|
|
73
|
+
value: 'string'
|
|
74
|
+
}
|
|
75
|
+
],
|
|
76
|
+
combination: 'string'
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
_tags: ['string'],
|
|
80
|
+
_purpose: ['string'],
|
|
81
|
+
_files: {
|
|
82
|
+
$relation: [
|
|
83
|
+
{
|
|
84
|
+
entity_id: '123e4567-e89b-12d3-a456-426614174000',
|
|
85
|
+
_tags: ['string']
|
|
86
|
+
}
|
|
87
|
+
]
|
|
88
|
+
},
|
|
89
|
+
_manifest: ['123e4567-e89b-12d3-a456-426614174000'],
|
|
90
|
+
__additional: {}
|
|
91
|
+
},
|
|
92
|
+
)
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
<details>
|
|
96
|
+
<summary>Response</summary>
|
|
97
|
+
|
|
98
|
+
```json
|
|
99
|
+
{
|
|
100
|
+
"_id": "123e4567-e89b-12d3-a456-426614174000",
|
|
101
|
+
"_schema": "target",
|
|
102
|
+
"_org": "string",
|
|
103
|
+
"_tags": ["string"],
|
|
104
|
+
"_files": {
|
|
105
|
+
"$relation": [
|
|
106
|
+
{
|
|
107
|
+
"entity_id": "123e4567-e89b-12d3-a456-426614174000",
|
|
108
|
+
"_tags": ["string"]
|
|
109
|
+
}
|
|
110
|
+
]
|
|
111
|
+
},
|
|
112
|
+
"_owners": [
|
|
113
|
+
{
|
|
114
|
+
"org_id": "123",
|
|
115
|
+
"user_id": "123"
|
|
116
|
+
}
|
|
117
|
+
],
|
|
118
|
+
"_title": "string",
|
|
119
|
+
"_created_at": "1970-01-01T00:00:00.000Z",
|
|
120
|
+
"_updated_at": "1970-01-01T00:00:00.000Z",
|
|
121
|
+
"_acl": {
|
|
122
|
+
"view": ["org:456"],
|
|
123
|
+
"edit": ["org:456"],
|
|
124
|
+
"delete": ["org:456"]
|
|
125
|
+
},
|
|
126
|
+
"name": "string",
|
|
127
|
+
"description": "string",
|
|
128
|
+
"entity_schema": "string",
|
|
129
|
+
"entity_filters": {
|
|
130
|
+
"filter": {
|
|
131
|
+
"items": [
|
|
132
|
+
{
|
|
133
|
+
"key": "string",
|
|
134
|
+
"operator": "string",
|
|
135
|
+
"value": "string"
|
|
136
|
+
}
|
|
137
|
+
],
|
|
138
|
+
"combination": "string"
|
|
139
|
+
}
|
|
140
|
+
},
|
|
141
|
+
"_purpose": ["string"],
|
|
142
|
+
"_manifest": ["123e4567-e89b-12d3-a456-426614174000"],
|
|
143
|
+
"__additional": {}
|
|
144
|
+
}
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
</details>
|
|
148
|
+
|
|
149
|
+
---
|
|
150
|
+
|
|
151
|
+
### `getTarget`
|
|
152
|
+
|
|
153
|
+
Read a specific target entity by a given id
|
|
154
|
+
|
|
155
|
+
`GET /v1/target/{targetId}`
|
|
156
|
+
|
|
157
|
+
```ts
|
|
158
|
+
const { data } = await client.getTarget({
|
|
159
|
+
targetId: 'example',
|
|
160
|
+
hydrate: true,
|
|
161
|
+
strict: true,
|
|
162
|
+
})
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
<details>
|
|
166
|
+
<summary>Response</summary>
|
|
167
|
+
|
|
168
|
+
```json
|
|
169
|
+
{
|
|
170
|
+
"_id": "123e4567-e89b-12d3-a456-426614174000",
|
|
171
|
+
"_schema": "target",
|
|
172
|
+
"_org": "string",
|
|
173
|
+
"_tags": ["string"],
|
|
174
|
+
"_files": {
|
|
175
|
+
"$relation": [
|
|
176
|
+
{
|
|
177
|
+
"entity_id": "123e4567-e89b-12d3-a456-426614174000",
|
|
178
|
+
"_tags": ["string"]
|
|
179
|
+
}
|
|
180
|
+
]
|
|
181
|
+
},
|
|
182
|
+
"_owners": [
|
|
183
|
+
{
|
|
184
|
+
"org_id": "123",
|
|
185
|
+
"user_id": "123"
|
|
186
|
+
}
|
|
187
|
+
],
|
|
188
|
+
"_title": "string",
|
|
189
|
+
"_created_at": "1970-01-01T00:00:00.000Z",
|
|
190
|
+
"_updated_at": "1970-01-01T00:00:00.000Z",
|
|
191
|
+
"_acl": {
|
|
192
|
+
"view": ["org:456"],
|
|
193
|
+
"edit": ["org:456"],
|
|
194
|
+
"delete": ["org:456"]
|
|
195
|
+
},
|
|
196
|
+
"name": "string",
|
|
197
|
+
"description": "string",
|
|
198
|
+
"entity_schema": "string",
|
|
199
|
+
"entity_filters": {
|
|
200
|
+
"filter": {
|
|
201
|
+
"items": [
|
|
202
|
+
{
|
|
203
|
+
"key": "string",
|
|
204
|
+
"operator": "string",
|
|
205
|
+
"value": "string"
|
|
206
|
+
}
|
|
207
|
+
],
|
|
208
|
+
"combination": "string"
|
|
209
|
+
}
|
|
210
|
+
},
|
|
211
|
+
"_purpose": ["string"],
|
|
212
|
+
"_manifest": ["123e4567-e89b-12d3-a456-426614174000"],
|
|
213
|
+
"__additional": {}
|
|
214
|
+
}
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
</details>
|
|
218
|
+
|
|
219
|
+
---
|
|
220
|
+
|
|
221
|
+
### `deleteTarget`
|
|
222
|
+
|
|
223
|
+
Delete a specific target entity by a given id
|
|
224
|
+
|
|
225
|
+
`DELETE /v1/target/{targetId}`
|
|
226
|
+
|
|
227
|
+
```ts
|
|
228
|
+
const { data } = await client.deleteTarget({
|
|
229
|
+
targetId: 'example',
|
|
230
|
+
})
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
<details>
|
|
234
|
+
<summary>Response</summary>
|
|
235
|
+
|
|
236
|
+
```json
|
|
237
|
+
{
|
|
238
|
+
"_id": "123e4567-e89b-12d3-a456-426614174000",
|
|
239
|
+
"_schema": "target",
|
|
240
|
+
"_org": "string",
|
|
241
|
+
"_tags": ["string"],
|
|
242
|
+
"_files": {
|
|
243
|
+
"$relation": [
|
|
244
|
+
{
|
|
245
|
+
"entity_id": "123e4567-e89b-12d3-a456-426614174000",
|
|
246
|
+
"_tags": ["string"]
|
|
247
|
+
}
|
|
248
|
+
]
|
|
249
|
+
},
|
|
250
|
+
"_owners": [
|
|
251
|
+
{
|
|
252
|
+
"org_id": "123",
|
|
253
|
+
"user_id": "123"
|
|
254
|
+
}
|
|
255
|
+
],
|
|
256
|
+
"_title": "string",
|
|
257
|
+
"_created_at": "1970-01-01T00:00:00.000Z",
|
|
258
|
+
"_updated_at": "1970-01-01T00:00:00.000Z",
|
|
259
|
+
"_acl": {
|
|
260
|
+
"view": ["org:456"],
|
|
261
|
+
"edit": ["org:456"],
|
|
262
|
+
"delete": ["org:456"]
|
|
263
|
+
},
|
|
264
|
+
"name": "string",
|
|
265
|
+
"description": "string",
|
|
266
|
+
"entity_schema": "string",
|
|
267
|
+
"entity_filters": {
|
|
268
|
+
"filter": {
|
|
269
|
+
"items": [
|
|
270
|
+
{
|
|
271
|
+
"key": "string",
|
|
272
|
+
"operator": "string",
|
|
273
|
+
"value": "string"
|
|
274
|
+
}
|
|
275
|
+
],
|
|
276
|
+
"combination": "string"
|
|
277
|
+
}
|
|
278
|
+
},
|
|
279
|
+
"_purpose": ["string"],
|
|
280
|
+
"_manifest": ["123e4567-e89b-12d3-a456-426614174000"],
|
|
281
|
+
"__additional": {}
|
|
282
|
+
}
|
|
283
|
+
```
|
|
284
|
+
|
|
285
|
+
</details>
|
|
286
|
+
|
|
287
|
+
---
|
|
288
|
+
|
|
289
|
+
### `patchTarget`
|
|
290
|
+
|
|
291
|
+
Partially update a specific target entity's properties by a given id and a given payload
|
|
292
|
+
|
|
293
|
+
`PATCH /v1/target/{targetId}`
|
|
294
|
+
|
|
295
|
+
```ts
|
|
296
|
+
const { data } = await client.patchTarget(
|
|
297
|
+
{
|
|
298
|
+
targetId: 'example',
|
|
299
|
+
},
|
|
300
|
+
{
|
|
301
|
+
_schema: 'target',
|
|
302
|
+
name: 'string',
|
|
303
|
+
description: 'string',
|
|
304
|
+
entity_schema: 'string',
|
|
305
|
+
entity_filters: {
|
|
306
|
+
filter: {
|
|
307
|
+
items: [
|
|
308
|
+
{
|
|
309
|
+
key: 'string',
|
|
310
|
+
operator: 'string',
|
|
311
|
+
value: 'string'
|
|
312
|
+
}
|
|
313
|
+
],
|
|
314
|
+
combination: 'string'
|
|
315
|
+
}
|
|
316
|
+
},
|
|
317
|
+
_tags: ['string'],
|
|
318
|
+
_purpose: ['string'],
|
|
319
|
+
_files: {
|
|
320
|
+
$relation: [
|
|
321
|
+
{
|
|
322
|
+
entity_id: '123e4567-e89b-12d3-a456-426614174000',
|
|
323
|
+
_tags: ['string']
|
|
324
|
+
}
|
|
325
|
+
]
|
|
326
|
+
},
|
|
327
|
+
_manifest: ['123e4567-e89b-12d3-a456-426614174000'],
|
|
328
|
+
__additional: {}
|
|
329
|
+
},
|
|
330
|
+
)
|
|
331
|
+
```
|
|
332
|
+
|
|
333
|
+
<details>
|
|
334
|
+
<summary>Response</summary>
|
|
335
|
+
|
|
336
|
+
```json
|
|
337
|
+
{
|
|
338
|
+
"_id": "123e4567-e89b-12d3-a456-426614174000",
|
|
339
|
+
"_schema": "target",
|
|
340
|
+
"_org": "string",
|
|
341
|
+
"_tags": ["string"],
|
|
342
|
+
"_files": {
|
|
343
|
+
"$relation": [
|
|
344
|
+
{
|
|
345
|
+
"entity_id": "123e4567-e89b-12d3-a456-426614174000",
|
|
346
|
+
"_tags": ["string"]
|
|
347
|
+
}
|
|
348
|
+
]
|
|
349
|
+
},
|
|
350
|
+
"_owners": [
|
|
351
|
+
{
|
|
352
|
+
"org_id": "123",
|
|
353
|
+
"user_id": "123"
|
|
354
|
+
}
|
|
355
|
+
],
|
|
356
|
+
"_title": "string",
|
|
357
|
+
"_created_at": "1970-01-01T00:00:00.000Z",
|
|
358
|
+
"_updated_at": "1970-01-01T00:00:00.000Z",
|
|
359
|
+
"_acl": {
|
|
360
|
+
"view": ["org:456"],
|
|
361
|
+
"edit": ["org:456"],
|
|
362
|
+
"delete": ["org:456"]
|
|
363
|
+
},
|
|
364
|
+
"name": "string",
|
|
365
|
+
"description": "string",
|
|
366
|
+
"entity_schema": "string",
|
|
367
|
+
"entity_filters": {
|
|
368
|
+
"filter": {
|
|
369
|
+
"items": [
|
|
370
|
+
{
|
|
371
|
+
"key": "string",
|
|
372
|
+
"operator": "string",
|
|
373
|
+
"value": "string"
|
|
374
|
+
}
|
|
375
|
+
],
|
|
376
|
+
"combination": "string"
|
|
377
|
+
}
|
|
378
|
+
},
|
|
379
|
+
"_purpose": ["string"],
|
|
380
|
+
"_manifest": ["123e4567-e89b-12d3-a456-426614174000"],
|
|
381
|
+
"__additional": {}
|
|
382
|
+
}
|
|
383
|
+
```
|
|
384
|
+
|
|
385
|
+
</details>
|
|
386
|
+
|
|
387
|
+
---
|
|
388
|
+
|
|
389
|
+
### `updateTarget`
|
|
390
|
+
|
|
391
|
+
Completly replace a specific target entity's properties by a given id and a given payload
|
|
392
|
+
|
|
393
|
+
`PUT /v1/target/{targetId}`
|
|
394
|
+
|
|
395
|
+
```ts
|
|
396
|
+
const { data } = await client.updateTarget(
|
|
397
|
+
{
|
|
398
|
+
targetId: 'example',
|
|
399
|
+
},
|
|
400
|
+
{
|
|
401
|
+
_schema: 'target',
|
|
402
|
+
name: 'string',
|
|
403
|
+
description: 'string',
|
|
404
|
+
entity_schema: 'string',
|
|
405
|
+
entity_filters: {
|
|
406
|
+
filter: {
|
|
407
|
+
items: [
|
|
408
|
+
{
|
|
409
|
+
key: 'string',
|
|
410
|
+
operator: 'string',
|
|
411
|
+
value: 'string'
|
|
412
|
+
}
|
|
413
|
+
],
|
|
414
|
+
combination: 'string'
|
|
415
|
+
}
|
|
416
|
+
},
|
|
417
|
+
_tags: ['string'],
|
|
418
|
+
_purpose: ['string'],
|
|
419
|
+
_files: {
|
|
420
|
+
$relation: [
|
|
421
|
+
{
|
|
422
|
+
entity_id: '123e4567-e89b-12d3-a456-426614174000',
|
|
423
|
+
_tags: ['string']
|
|
424
|
+
}
|
|
425
|
+
]
|
|
426
|
+
},
|
|
427
|
+
_manifest: ['123e4567-e89b-12d3-a456-426614174000'],
|
|
428
|
+
__additional: {}
|
|
429
|
+
},
|
|
430
|
+
)
|
|
431
|
+
```
|
|
432
|
+
|
|
433
|
+
<details>
|
|
434
|
+
<summary>Response</summary>
|
|
435
|
+
|
|
436
|
+
```json
|
|
437
|
+
{
|
|
438
|
+
"_id": "123e4567-e89b-12d3-a456-426614174000",
|
|
439
|
+
"_schema": "target",
|
|
440
|
+
"_org": "string",
|
|
441
|
+
"_tags": ["string"],
|
|
442
|
+
"_files": {
|
|
443
|
+
"$relation": [
|
|
444
|
+
{
|
|
445
|
+
"entity_id": "123e4567-e89b-12d3-a456-426614174000",
|
|
446
|
+
"_tags": ["string"]
|
|
447
|
+
}
|
|
448
|
+
]
|
|
449
|
+
},
|
|
450
|
+
"_owners": [
|
|
451
|
+
{
|
|
452
|
+
"org_id": "123",
|
|
453
|
+
"user_id": "123"
|
|
454
|
+
}
|
|
455
|
+
],
|
|
456
|
+
"_title": "string",
|
|
457
|
+
"_created_at": "1970-01-01T00:00:00.000Z",
|
|
458
|
+
"_updated_at": "1970-01-01T00:00:00.000Z",
|
|
459
|
+
"_acl": {
|
|
460
|
+
"view": ["org:456"],
|
|
461
|
+
"edit": ["org:456"],
|
|
462
|
+
"delete": ["org:456"]
|
|
463
|
+
},
|
|
464
|
+
"name": "string",
|
|
465
|
+
"description": "string",
|
|
466
|
+
"entity_schema": "string",
|
|
467
|
+
"entity_filters": {
|
|
468
|
+
"filter": {
|
|
469
|
+
"items": [
|
|
470
|
+
{
|
|
471
|
+
"key": "string",
|
|
472
|
+
"operator": "string",
|
|
473
|
+
"value": "string"
|
|
474
|
+
}
|
|
475
|
+
],
|
|
476
|
+
"combination": "string"
|
|
477
|
+
}
|
|
478
|
+
},
|
|
479
|
+
"_purpose": ["string"],
|
|
480
|
+
"_manifest": ["123e4567-e89b-12d3-a456-426614174000"],
|
|
481
|
+
"__additional": {}
|
|
482
|
+
}
|
|
483
|
+
```
|
|
484
|
+
|
|
485
|
+
</details>
|
|
486
|
+
|
|
487
|
+
---
|
|
488
|
+
|
|
489
|
+
## Schemas
|
|
490
|
+
|
|
491
|
+
### `BaseError`
|
|
492
|
+
|
|
493
|
+
```ts
|
|
494
|
+
type BaseError = {
|
|
495
|
+
status: number
|
|
496
|
+
message: string
|
|
497
|
+
}
|
|
498
|
+
```
|
|
499
|
+
|
|
500
|
+
### `ServerError`
|
|
501
|
+
|
|
502
|
+
```ts
|
|
503
|
+
type ServerError = {
|
|
504
|
+
status: number
|
|
505
|
+
message: string
|
|
506
|
+
}
|
|
507
|
+
```
|
|
508
|
+
|
|
509
|
+
### `ClientError`
|
|
510
|
+
|
|
511
|
+
```ts
|
|
512
|
+
type ClientError = {
|
|
513
|
+
status: number
|
|
514
|
+
message: string
|
|
515
|
+
}
|
|
516
|
+
```
|
|
517
|
+
|
|
518
|
+
### `BaseUUID`
|
|
519
|
+
|
|
520
|
+
```ts
|
|
521
|
+
type BaseUUID = string // uuid
|
|
522
|
+
```
|
|
523
|
+
|
|
524
|
+
### `BaseTags`
|
|
525
|
+
|
|
526
|
+
```ts
|
|
527
|
+
type BaseTags = string[]
|
|
528
|
+
```
|
|
529
|
+
|
|
530
|
+
### `BasePurpose`
|
|
531
|
+
|
|
532
|
+
```ts
|
|
533
|
+
type BasePurpose = string[]
|
|
534
|
+
```
|
|
535
|
+
|
|
536
|
+
### `BaseRelation`
|
|
537
|
+
|
|
538
|
+
```ts
|
|
539
|
+
type BaseRelation = {
|
|
540
|
+
$relation?: Array<{
|
|
541
|
+
entity_id?: string // uuid
|
|
542
|
+
_tags?: string[]
|
|
543
|
+
}>
|
|
544
|
+
}
|
|
545
|
+
```
|
|
546
|
+
|
|
547
|
+
### `BaseEntityOwner`
|
|
548
|
+
|
|
549
|
+
The user / organization owning this entity.
|
|
550
|
+
|
|
551
|
+
Note: Owner implicitly has access to the entity regardless of ACLs.
|
|
552
|
+
|
|
553
|
+
|
|
554
|
+
```ts
|
|
555
|
+
type BaseEntityOwner = {
|
|
556
|
+
org_id: string
|
|
557
|
+
user_id?: string
|
|
558
|
+
}
|
|
559
|
+
```
|
|
560
|
+
|
|
561
|
+
### `BaseEntityAcl`
|
|
562
|
+
|
|
563
|
+
Access control list (ACL) for an entity. Defines sharing access to external orgs or users.
|
|
564
|
+
|
|
565
|
+
```ts
|
|
566
|
+
type BaseEntityAcl = {
|
|
567
|
+
view?: string[]
|
|
568
|
+
edit?: string[]
|
|
569
|
+
delete?: string[]
|
|
570
|
+
}
|
|
571
|
+
```
|
|
572
|
+
|
|
573
|
+
### `BaseSystemFields`
|
|
574
|
+
|
|
575
|
+
```ts
|
|
576
|
+
type BaseSystemFields = {
|
|
577
|
+
_tags?: string[]
|
|
578
|
+
_purpose?: string[]
|
|
579
|
+
_files?: {
|
|
580
|
+
$relation?: Array<{
|
|
581
|
+
entity_id?: { ... }
|
|
582
|
+
_tags?: { ... }
|
|
583
|
+
}>
|
|
584
|
+
}
|
|
585
|
+
_manifest?: string // uuid[]
|
|
586
|
+
__additional?: Record<string, unknown>
|
|
587
|
+
}
|
|
588
|
+
```
|
|
589
|
+
|
|
590
|
+
### `BaseSystemReadonlyFields`
|
|
591
|
+
|
|
592
|
+
```ts
|
|
593
|
+
type BaseSystemReadonlyFields = {
|
|
594
|
+
_id?: string // uuid
|
|
595
|
+
_schema?: string
|
|
596
|
+
_org?: string
|
|
597
|
+
_tags?: string[]
|
|
598
|
+
_files?: {
|
|
599
|
+
$relation?: Array<{
|
|
600
|
+
entity_id?: { ... }
|
|
601
|
+
_tags?: { ... }
|
|
602
|
+
}>
|
|
603
|
+
}
|
|
604
|
+
_owners?: Array<{
|
|
605
|
+
org_id: string
|
|
606
|
+
user_id?: string
|
|
607
|
+
}>
|
|
608
|
+
_title?: string
|
|
609
|
+
_created_at?: string // date-time
|
|
610
|
+
_updated_at?: string // date-time
|
|
611
|
+
_acl?: {
|
|
612
|
+
view?: string[]
|
|
613
|
+
edit?: string[]
|
|
614
|
+
delete?: string[]
|
|
615
|
+
}
|
|
616
|
+
}
|
|
617
|
+
```
|
|
618
|
+
|
|
619
|
+
### `BaseSystemFieldsRequired`
|
|
620
|
+
|
|
621
|
+
```ts
|
|
622
|
+
type BaseSystemFieldsRequired = object
|
|
623
|
+
```
|
|
624
|
+
|
|
625
|
+
### `BaseTarget`
|
|
626
|
+
|
|
627
|
+
```ts
|
|
628
|
+
type BaseTarget = {
|
|
629
|
+
_schema?: "target"
|
|
630
|
+
name?: string
|
|
631
|
+
description?: string
|
|
632
|
+
entity_schema?: string
|
|
633
|
+
entity_filters?: {
|
|
634
|
+
filter?: {
|
|
635
|
+
items?: { ... }
|
|
636
|
+
combination?: { ... }
|
|
637
|
+
}
|
|
638
|
+
}
|
|
639
|
+
}
|
|
640
|
+
```
|
|
641
|
+
|
|
642
|
+
### `BaseTargetRequired`
|
|
643
|
+
|
|
644
|
+
```ts
|
|
645
|
+
type BaseTargetRequired = object
|
|
646
|
+
```
|
|
647
|
+
|
|
648
|
+
### `Target`
|
|
649
|
+
|
|
650
|
+
```ts
|
|
651
|
+
type Target = {
|
|
652
|
+
_id?: string // uuid
|
|
653
|
+
_schema: "target"
|
|
654
|
+
_org: string
|
|
655
|
+
_tags?: string[]
|
|
656
|
+
_files?: {
|
|
657
|
+
$relation?: Array<{
|
|
658
|
+
entity_id?: { ... }
|
|
659
|
+
_tags?: { ... }
|
|
660
|
+
}>
|
|
661
|
+
}
|
|
662
|
+
_owners?: Array<{
|
|
663
|
+
org_id: string
|
|
664
|
+
user_id?: string
|
|
665
|
+
}>
|
|
666
|
+
_title?: string
|
|
667
|
+
_created_at?: string // date-time
|
|
668
|
+
_updated_at?: string // date-time
|
|
669
|
+
_acl?: {
|
|
670
|
+
view?: string[]
|
|
671
|
+
edit?: string[]
|
|
672
|
+
delete?: string[]
|
|
673
|
+
}
|
|
674
|
+
name: string
|
|
675
|
+
description?: string
|
|
676
|
+
entity_schema?: string
|
|
677
|
+
entity_filters?: {
|
|
678
|
+
filter?: {
|
|
679
|
+
items?: { ... }
|
|
680
|
+
combination?: { ... }
|
|
681
|
+
}
|
|
682
|
+
}
|
|
683
|
+
_purpose?: string[]
|
|
684
|
+
_manifest?: string // uuid[]
|
|
685
|
+
__additional?: Record<string, unknown>
|
|
686
|
+
}
|
|
687
|
+
```
|
|
688
|
+
|
|
689
|
+
### `TargetCreate`
|
|
690
|
+
|
|
691
|
+
```ts
|
|
692
|
+
type TargetCreate = {
|
|
693
|
+
_schema?: "target"
|
|
694
|
+
name: string
|
|
695
|
+
description?: string
|
|
696
|
+
entity_schema?: string
|
|
697
|
+
entity_filters?: {
|
|
698
|
+
filter?: {
|
|
699
|
+
items?: { ... }
|
|
700
|
+
combination?: { ... }
|
|
701
|
+
}
|
|
702
|
+
}
|
|
703
|
+
_tags?: string[]
|
|
704
|
+
_purpose?: string[]
|
|
705
|
+
_files?: {
|
|
706
|
+
$relation?: Array<{
|
|
707
|
+
entity_id?: { ... }
|
|
708
|
+
_tags?: { ... }
|
|
709
|
+
}>
|
|
710
|
+
}
|
|
711
|
+
_manifest?: string // uuid[]
|
|
712
|
+
__additional?: Record<string, unknown>
|
|
713
|
+
}
|
|
714
|
+
```
|
|
715
|
+
|
|
716
|
+
### `TargetPatch`
|
|
717
|
+
|
|
718
|
+
```ts
|
|
719
|
+
type TargetPatch = {
|
|
720
|
+
_schema?: "target"
|
|
721
|
+
name?: string
|
|
722
|
+
description?: string
|
|
723
|
+
entity_schema?: string
|
|
724
|
+
entity_filters?: {
|
|
725
|
+
filter?: {
|
|
726
|
+
items?: { ... }
|
|
727
|
+
combination?: { ... }
|
|
728
|
+
}
|
|
729
|
+
}
|
|
730
|
+
_tags?: string[]
|
|
731
|
+
_purpose?: string[]
|
|
732
|
+
_files?: {
|
|
733
|
+
$relation?: Array<{
|
|
734
|
+
entity_id?: { ... }
|
|
735
|
+
_tags?: { ... }
|
|
736
|
+
}>
|
|
737
|
+
}
|
|
738
|
+
_manifest?: string // uuid[]
|
|
739
|
+
__additional?: Record<string, unknown>
|
|
740
|
+
}
|
|
741
|
+
```
|