@epilot/sdk 2.17.0 → 2.18.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/definitions/deduplication-runtime.json +1 -1
- package/definitions/deduplication.json +80 -4
- package/definitions/integration-toolkit.json +166 -3
- 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 +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 +6 -6
- package/dist/apis/configuration-hub.js +1 -1
- 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 +8 -8
- package/dist/apis/deduplication.d.cts +2 -2
- package/dist/apis/deduplication.d.ts +2 -2
- package/dist/apis/deduplication.js +2 -2
- 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 +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/iban.cjs +6 -6
- package/dist/apis/iban.js +1 -1
- package/dist/apis/integration-toolkit.cjs +6 -6
- package/dist/apis/integration-toolkit.d.cts +2 -2
- package/dist/apis/integration-toolkit.d.ts +2 -2
- 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 +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/snapshot.cjs +6 -6
- package/dist/apis/snapshot.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/{chunk-CKD3HAHW.js → chunk-5B7KMWW3.js} +1 -1
- package/dist/{chunk-TWI3P2QA.cjs → chunk-BEJ5NIRC.cjs} +1 -1
- package/dist/{chunk-VJKGGDHF.js → chunk-UQKZYCSP.js} +3 -3
- package/dist/{chunk-TNIQ67SK.cjs → chunk-ZL3GLE4V.cjs} +3 -3
- package/dist/deduplication-FFW7L6P5.cjs +7 -0
- package/dist/deduplication-JNS7SSUR.js +7 -0
- package/dist/{deduplication-runtime-5TJHUSQN.js → deduplication-runtime-52CD6PA3.js} +1 -1
- package/dist/{deduplication-runtime-ZKX6LN5P.cjs → deduplication-runtime-FU24WISY.cjs} +2 -2
- package/dist/{deduplication.d-DaUo5gZo.d.ts → deduplication.d-Cueh8bDD.d.cts} +151 -2
- package/dist/{deduplication.d-DaUo5gZo.d.cts → deduplication.d-Cueh8bDD.d.ts} +151 -2
- package/dist/index.cjs +10 -10
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/integration-toolkit-XGP4BIWX.js +7 -0
- package/dist/integration-toolkit-ZVBMKUWM.cjs +7 -0
- package/dist/{integration-toolkit.d-BkWRJ8Xm.d.cts → integration-toolkit.d-D5HZSNUf.d.cts} +109 -1
- package/dist/{integration-toolkit.d-BkWRJ8Xm.d.ts → integration-toolkit.d-D5HZSNUf.d.ts} +109 -1
- package/docs/deduplication.md +88 -35
- package/docs/integration-toolkit.md +144 -4
- package/package.json +1 -1
- package/dist/deduplication-XYMFEQEE.cjs +0 -7
- package/dist/deduplication-YYNT5C3M.js +0 -7
- package/dist/integration-toolkit-54F6GS67.js +0 -7
- package/dist/integration-toolkit-FRSDSG4I.cjs +0 -7
|
@@ -220,6 +220,8 @@ const { data } = await integrationToolkitClient.acknowledgeTracking(...)
|
|
|
220
220
|
- [`MappingSimulationWarning`](#mappingsimulationwarning)
|
|
221
221
|
- [`EntityUpdate`](#entityupdate)
|
|
222
222
|
- [`MeterReadingUpdate`](#meterreadingupdate)
|
|
223
|
+
- [`EntityPruneScopeUpdate`](#entityprunescopeupdate)
|
|
224
|
+
- [`MeterReadingPruneScopeUpdate`](#meterreadingprunescopeupdate)
|
|
223
225
|
- [`IntegrationConfigurationV1`](#integrationconfigurationv1)
|
|
224
226
|
- [`IntegrationObjectV1`](#integrationobjectv1)
|
|
225
227
|
- [`IntegrationFieldV1`](#integrationfieldv1)
|
|
@@ -424,7 +426,14 @@ const { data } = await client.simulateMappingV2(
|
|
|
424
426
|
{
|
|
425
427
|
"entity_slug": "string",
|
|
426
428
|
"unique_identifiers": {},
|
|
427
|
-
"attributes": {}
|
|
429
|
+
"attributes": {},
|
|
430
|
+
"pricing": {
|
|
431
|
+
"config": {},
|
|
432
|
+
"data": [
|
|
433
|
+
{}
|
|
434
|
+
]
|
|
435
|
+
},
|
|
436
|
+
"mode": "upsert"
|
|
428
437
|
}
|
|
429
438
|
],
|
|
430
439
|
"meter_readings_updates": [
|
|
@@ -435,7 +444,35 @@ const { data } = await client.simulateMappingV2(
|
|
|
435
444
|
"meter_counter": {
|
|
436
445
|
"$entity_unique_ids": {}
|
|
437
446
|
},
|
|
438
|
-
"attributes": {}
|
|
447
|
+
"attributes": {},
|
|
448
|
+
"mode": "upsert"
|
|
449
|
+
}
|
|
450
|
+
],
|
|
451
|
+
"prune_scope_updates": [
|
|
452
|
+
{
|
|
453
|
+
"entity_slug": "string",
|
|
454
|
+
"scope": {
|
|
455
|
+
"scope_mode": "relations",
|
|
456
|
+
"schema": "string",
|
|
457
|
+
"unique_ids": {},
|
|
458
|
+
"query": {}
|
|
459
|
+
},
|
|
460
|
+
"keep_unique_ids": [
|
|
461
|
+
{}
|
|
462
|
+
],
|
|
463
|
+
"deletion_mode": "delete"
|
|
464
|
+
}
|
|
465
|
+
],
|
|
466
|
+
"meter_readings_prune_scope_updates": [
|
|
467
|
+
{
|
|
468
|
+
"meter": {
|
|
469
|
+
"$entity_unique_ids": {}
|
|
470
|
+
},
|
|
471
|
+
"meter_counter": {
|
|
472
|
+
"$entity_unique_ids": {}
|
|
473
|
+
},
|
|
474
|
+
"keep_external_ids": ["string"],
|
|
475
|
+
"source": "string"
|
|
439
476
|
}
|
|
440
477
|
],
|
|
441
478
|
"warnings": [
|
|
@@ -484,7 +521,14 @@ const { data } = await client.simulateMapping(
|
|
|
484
521
|
{
|
|
485
522
|
"entity_slug": "string",
|
|
486
523
|
"unique_identifiers": {},
|
|
487
|
-
"attributes": {}
|
|
524
|
+
"attributes": {},
|
|
525
|
+
"pricing": {
|
|
526
|
+
"config": {},
|
|
527
|
+
"data": [
|
|
528
|
+
{}
|
|
529
|
+
]
|
|
530
|
+
},
|
|
531
|
+
"mode": "upsert"
|
|
488
532
|
}
|
|
489
533
|
],
|
|
490
534
|
"meter_readings_updates": [
|
|
@@ -495,7 +539,35 @@ const { data } = await client.simulateMapping(
|
|
|
495
539
|
"meter_counter": {
|
|
496
540
|
"$entity_unique_ids": {}
|
|
497
541
|
},
|
|
498
|
-
"attributes": {}
|
|
542
|
+
"attributes": {},
|
|
543
|
+
"mode": "upsert"
|
|
544
|
+
}
|
|
545
|
+
],
|
|
546
|
+
"prune_scope_updates": [
|
|
547
|
+
{
|
|
548
|
+
"entity_slug": "string",
|
|
549
|
+
"scope": {
|
|
550
|
+
"scope_mode": "relations",
|
|
551
|
+
"schema": "string",
|
|
552
|
+
"unique_ids": {},
|
|
553
|
+
"query": {}
|
|
554
|
+
},
|
|
555
|
+
"keep_unique_ids": [
|
|
556
|
+
{}
|
|
557
|
+
],
|
|
558
|
+
"deletion_mode": "delete"
|
|
559
|
+
}
|
|
560
|
+
],
|
|
561
|
+
"meter_readings_prune_scope_updates": [
|
|
562
|
+
{
|
|
563
|
+
"meter": {
|
|
564
|
+
"$entity_unique_ids": {}
|
|
565
|
+
},
|
|
566
|
+
"meter_counter": {
|
|
567
|
+
"$entity_unique_ids": {}
|
|
568
|
+
},
|
|
569
|
+
"keep_external_ids": ["string"],
|
|
570
|
+
"source": "string"
|
|
499
571
|
}
|
|
500
572
|
],
|
|
501
573
|
"warnings": [
|
|
@@ -6933,6 +7005,11 @@ type MappingSimulationResponse = {
|
|
|
6933
7005
|
entity_slug: string
|
|
6934
7006
|
unique_identifiers: Record<string, unknown>
|
|
6935
7007
|
attributes: Record<string, unknown>
|
|
7008
|
+
pricing?: {
|
|
7009
|
+
config: { ... }
|
|
7010
|
+
data: { ... }
|
|
7011
|
+
}
|
|
7012
|
+
mode: "upsert" | "delete" | "purge"
|
|
6936
7013
|
}>
|
|
6937
7014
|
meter_readings_updates?: Array<{
|
|
6938
7015
|
meter: {
|
|
@@ -6942,6 +7019,28 @@ type MappingSimulationResponse = {
|
|
|
6942
7019
|
$entity_unique_ids?: { ... }
|
|
6943
7020
|
}
|
|
6944
7021
|
attributes: Record<string, unknown>
|
|
7022
|
+
mode: "upsert" | "delete"
|
|
7023
|
+
}>
|
|
7024
|
+
prune_scope_updates?: Array<{
|
|
7025
|
+
entity_slug: string
|
|
7026
|
+
scope: {
|
|
7027
|
+
scope_mode: { ... }
|
|
7028
|
+
schema?: { ... }
|
|
7029
|
+
unique_ids?: { ... }
|
|
7030
|
+
query?: { ... }
|
|
7031
|
+
}
|
|
7032
|
+
keep_unique_ids: Record<string, unknown>[]
|
|
7033
|
+
deletion_mode: "delete" | "purge"
|
|
7034
|
+
}>
|
|
7035
|
+
meter_readings_prune_scope_updates?: Array<{
|
|
7036
|
+
meter: {
|
|
7037
|
+
$entity_unique_ids: { ... }
|
|
7038
|
+
}
|
|
7039
|
+
meter_counter?: {
|
|
7040
|
+
$entity_unique_ids?: { ... }
|
|
7041
|
+
}
|
|
7042
|
+
keep_external_ids: string[]
|
|
7043
|
+
source?: string
|
|
6945
7044
|
}>
|
|
6946
7045
|
warnings?: Array<{
|
|
6947
7046
|
entity_schema: string
|
|
@@ -6968,6 +7067,11 @@ type EntityUpdate = {
|
|
|
6968
7067
|
entity_slug: string
|
|
6969
7068
|
unique_identifiers: Record<string, unknown>
|
|
6970
7069
|
attributes: Record<string, unknown>
|
|
7070
|
+
pricing?: {
|
|
7071
|
+
config: Record<string, unknown>
|
|
7072
|
+
data: Record<string, unknown>[]
|
|
7073
|
+
}
|
|
7074
|
+
mode: "upsert" | "delete" | "purge"
|
|
6971
7075
|
}
|
|
6972
7076
|
```
|
|
6973
7077
|
|
|
@@ -6982,6 +7086,42 @@ type MeterReadingUpdate = {
|
|
|
6982
7086
|
$entity_unique_ids?: Record<string, unknown>
|
|
6983
7087
|
}
|
|
6984
7088
|
attributes: Record<string, unknown>
|
|
7089
|
+
mode: "upsert" | "delete"
|
|
7090
|
+
}
|
|
7091
|
+
```
|
|
7092
|
+
|
|
7093
|
+
### `EntityPruneScopeUpdate`
|
|
7094
|
+
|
|
7095
|
+
A resolved entity prune scope. At runtime, entities of `entity_slug` found within `scope` whose unique identifiers are not listed in `keep_unique_ids` are removed using `deletion_mode`.
|
|
7096
|
+
|
|
7097
|
+
```ts
|
|
7098
|
+
type EntityPruneScopeUpdate = {
|
|
7099
|
+
entity_slug: string
|
|
7100
|
+
scope: {
|
|
7101
|
+
scope_mode: "relations" | "query"
|
|
7102
|
+
schema?: string
|
|
7103
|
+
unique_ids?: Record<string, unknown>
|
|
7104
|
+
query?: Record<string, unknown>
|
|
7105
|
+
}
|
|
7106
|
+
keep_unique_ids: Record<string, unknown>[]
|
|
7107
|
+
deletion_mode: "delete" | "purge"
|
|
7108
|
+
}
|
|
7109
|
+
```
|
|
7110
|
+
|
|
7111
|
+
### `MeterReadingPruneScopeUpdate`
|
|
7112
|
+
|
|
7113
|
+
A resolved meter reading prune scope. At runtime, readings of the given meter (+ counter) whose external ids are not listed in `keep_external_ids` are deleted.
|
|
7114
|
+
|
|
7115
|
+
```ts
|
|
7116
|
+
type MeterReadingPruneScopeUpdate = {
|
|
7117
|
+
meter: {
|
|
7118
|
+
$entity_unique_ids: Record<string, unknown>
|
|
7119
|
+
}
|
|
7120
|
+
meter_counter?: {
|
|
7121
|
+
$entity_unique_ids?: Record<string, unknown>
|
|
7122
|
+
}
|
|
7123
|
+
keep_external_ids: string[]
|
|
7124
|
+
source?: string
|
|
6985
7125
|
}
|
|
6986
7126
|
```
|
|
6987
7127
|
|
package/package.json
CHANGED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('./chunk-NJK5F5TF.cjs');
|
|
2
|
-
|
|
3
|
-
// src/docs/deduplication.json
|
|
4
|
-
var deduplication_default = '# Deduplication API\n\n- **Base URL:** `https://deduplication.sls.epilot.io`\n- **Full API Docs:** [https://docs.epilot.io/api/deduplication](https://docs.epilot.io/api/deduplication)\n\n## Usage\n\n```ts\nimport { epilot } from \'@epilot/sdk\'\n\nepilot.authorize(() => \'<token>\')\nconst { data } = await epilot.deduplication.deduplicate(...)\n```\n\n### Tree-shakeable import\n\n```ts\nimport { getClient, authorize } from \'@epilot/sdk/deduplication\'\n\nconst deduplicationClient = getClient()\nauthorize(deduplicationClient, () => \'<token>\')\nconst { data } = await deduplicationClient.deduplicate(...)\n```\n\n## Operations\n\n- [`deduplicate`](#deduplicate)\n- [`deduplicateAsync`](#deduplicateasync)\n- [`getDeduplicationJob`](#getdeduplicationjob)\n- [`detectDuplicates`](#detectduplicates)\n- [`listUniquenessCriteria`](#listuniquenesscriteria)\n- [`createUniquenessCriteria`](#createuniquenesscriteria)\n- [`getUniquenessCriteria`](#getuniquenesscriteria)\n- [`updateUniquenessCriteria`](#updateuniquenesscriteria)\n- [`deleteUniquenessCriteria`](#deleteuniquenesscriteria)\n\n**Schemas**\n- [`DeduplicateRequestBody`](#deduplicaterequestbody)\n- [`DeduplicateRequestResponse`](#deduplicaterequestresponse)\n- [`Entity`](#entity)\n- [`DeduplicateAsyncResponse`](#deduplicateasyncresponse)\n- [`JobStatus`](#jobstatus)\n- [`DeduplicationJob`](#deduplicationjob)\n- [`DetectDuplicatesRequestBody`](#detectduplicatesrequestbody)\n- [`DetectDuplicatesResponse`](#detectduplicatesresponse)\n- [`DetectedDuplicateMatch`](#detectedduplicatematch)\n- [`UniquenessCriteriaListResponse`](#uniquenesscriterialistresponse)\n- [`UniquenessCriteria`](#uniquenesscriteria)\n- [`MatchRule`](#matchrule)\n- [`MatchAttribute`](#matchattribute)\n- [`UniquenessCriteriaCreateBody`](#uniquenesscriteriacreatebody)\n- [`UniquenessCriteriaUpdateBody`](#uniquenesscriteriaupdatebody)\n\n### `deduplicate`\n\nDeduplicates Entities\n\n`POST /v1/deduplicate`\n\n```ts\nconst { data } = await client.deduplicate(\n null,\n [\n {\n toKeep: \'string\',\n toDelete: [\'string\']\n }\n ],\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n[\n {\n "_id": "string",\n "_org": "string",\n "_schema": "string",\n "_created_at": "1970-01-01T00:00:00.000Z",\n "_updated_at": "1970-01-01T00:00:00.000Z",\n "_created_by": "string",\n "created_by": "string",\n "_tags": ["string"],\n "_acl": {},\n "_owners": [\n {\n "org_id": "string",\n "user_id": "string"\n }\n ],\n "type": "string"\n }\n]\n```\n\n</details>\n\n---\n\n### `deduplicateAsync`\n\nSubmits an async deduplication job. Returns a job ID immediately. Poll GET /v1/deduplicate/jobs/{jobId} for status.\n\n`POST /v1/deduplicate/job`\n\n```ts\nconst { data } = await client.deduplicateAsync(\n null,\n [\n {\n toKeep: \'string\',\n toDelete: [\'string\']\n }\n ],\n)\n```\n\n---\n\n### `getDeduplicationJob`\n\nReturns the current status of an async deduplication job\n\n`GET /v1/deduplicate/jobs/{jobId}`\n\n```ts\nconst { data } = await client.getDeduplicationJob({\n jobId: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "jobId": "string",\n "status": "pending",\n "message": "string",\n "result": [\n {\n "_id": "string",\n "_org": "string",\n "_schema": "string",\n "_created_at": "1970-01-01T00:00:00.000Z",\n "_updated_at": "1970-01-01T00:00:00.000Z",\n "_created_by": "string",\n "created_by": "string",\n "_tags": ["string"],\n "_acl": {},\n "_owners": [\n {\n "org_id": "string",\n "user_id": "string"\n }\n ],\n "type": "string"\n }\n ],\n "createdAt": "1970-01-01T00:00:00.000Z",\n "updatedAt": "1970-01-01T00:00:00.000Z"\n}\n```\n\n</details>\n\n---\n\n### `detectDuplicates`\n\nDetects potential duplicate entities for the given entity using the schema\'s prioritized uniqueness rules. Returns matches with a confidence score.\n\n`POST /v1/detect-duplicates`\n\n```ts\nconst { data } = await client.detectDuplicates(\n null,\n {\n schema: \'string\',\n entity: {}\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "matches": [\n {\n "entity": {\n "_id": "string",\n "_org": "string",\n "_schema": "string",\n "_created_at": "1970-01-01T00:00:00.000Z",\n "_updated_at": "1970-01-01T00:00:00.000Z",\n "_created_by": "string",\n "created_by": "string",\n "_tags": ["string"],\n "_acl": {},\n "_owners": [\n {\n "org_id": "string",\n "user_id": "string"\n }\n ],\n "type": "string"\n },\n "confidence": 0,\n "matched_attributes": ["string"]\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `listUniquenessCriteria`\n\nLists UniquenessCriteria for the requesting organization. Optionally filtered by schema.\n\n`GET /v1/uniqueness-criteria`\n\n```ts\nconst { data } = await client.listUniquenessCriteria({\n schema: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "items": [\n {\n "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "orgId": "string",\n "schema": "string",\n "matchRules": [\n {\n "name": "string",\n "attributes": [\n {\n "attribute": "string"\n }\n ],\n "confidence": 0\n }\n ],\n "createdAt": "1970-01-01T00:00:00.000Z",\n "updatedAt": "1970-01-01T00:00:00.000Z"\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `createUniquenessCriteria`\n\nCreates a new UniquenessCriteria record.\n\n`POST /v1/uniqueness-criteria`\n\n```ts\nconst { data } = await client.createUniquenessCriteria(\n null,\n {\n schema: \'string\',\n matchRules: [\n {\n name: \'string\',\n attributes: [\n {\n attribute: \'string\'\n }\n ],\n confidence: 0\n }\n ]\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "orgId": "string",\n "schema": "string",\n "matchRules": [\n {\n "name": "string",\n "attributes": [\n {\n "attribute": "string"\n }\n ],\n "confidence": 0\n }\n ],\n "createdAt": "1970-01-01T00:00:00.000Z",\n "updatedAt": "1970-01-01T00:00:00.000Z"\n}\n```\n\n</details>\n\n---\n\n### `getUniquenessCriteria`\n\nFetch a single UniquenessCriteria record.\n\n`GET /v1/uniqueness-criteria/{schema}`\n\n```ts\nconst { data } = await client.getUniquenessCriteria({\n schema: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "orgId": "string",\n "schema": "string",\n "matchRules": [\n {\n "name": "string",\n "attributes": [\n {\n "attribute": "string"\n }\n ],\n "confidence": 0\n }\n ],\n "createdAt": "1970-01-01T00:00:00.000Z",\n "updatedAt": "1970-01-01T00:00:00.000Z"\n}\n```\n\n</details>\n\n---\n\n### `updateUniquenessCriteria`\n\nReplace the matchRules on an existing UniquenessCriteria record.\n\n`PUT /v1/uniqueness-criteria/{schema}`\n\n```ts\nconst { data } = await client.updateUniquenessCriteria(\n {\n schema: \'example\',\n },\n {\n matchRules: [\n {\n name: \'string\',\n attributes: [\n {\n attribute: \'string\'\n }\n ],\n confidence: 0\n }\n ]\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "orgId": "string",\n "schema": "string",\n "matchRules": [\n {\n "name": "string",\n "attributes": [\n {\n "attribute": "string"\n }\n ],\n "confidence": 0\n }\n ],\n "createdAt": "1970-01-01T00:00:00.000Z",\n "updatedAt": "1970-01-01T00:00:00.000Z"\n}\n```\n\n</details>\n\n---\n\n### `deleteUniquenessCriteria`\n\nDelete a UniquenessCriteria record.\n\n`DELETE /v1/uniqueness-criteria/{schema}`\n\n```ts\nconst { data } = await client.deleteUniquenessCriteria({\n schema: \'example\',\n})\n```\n\n---\n\n## Schemas\n\n### `DeduplicateRequestBody`\n\n```ts\ntype DeduplicateRequestBody = Array<{\n toKeep: string\n toDelete: string[]\n}>\n```\n\n### `DeduplicateRequestResponse`\n\n```ts\ntype DeduplicateRequestResponse = Array<{\n _id: string\n _org?: string\n _schema?: string\n _created_at?: string // date-time\n _updated_at?: string // date-time\n _created_by?: string | number\n created_by?: string | number\n _tags?: string[]\n _acl?: Record<string, string[]>\n _owners?: Array<{\n org_id: string\n user_id: string\n }>\n type?: string\n}>\n```\n\n### `Entity`\n\nBase Entity schema\n\n```ts\ntype Entity = {\n _id: string\n _org?: string\n _schema?: string\n _created_at?: string // date-time\n _updated_at?: string // date-time\n _created_by?: string | number\n created_by?: string | number\n _tags?: string[]\n _acl?: Record<string, string[]>\n _owners?: Array<{\n org_id: string\n user_id: string\n }>\n type?: string\n}\n```\n\n### `DeduplicateAsyncResponse`\n\nResponse returned immediately when a deduplication job is submitted\n\n```ts\ntype DeduplicateAsyncResponse = {\n jobId: string\n status: "pending" | "processing" | "completed" | "failed"\n message: string\n}\n```\n\n### `JobStatus`\n\n```ts\ntype JobStatus = "pending" | "processing" | "completed" | "failed"\n```\n\n### `DeduplicationJob`\n\nRepresents an async deduplication job\n\n```ts\ntype DeduplicationJob = {\n jobId: string\n status: "pending" | "processing" | "completed" | "failed"\n message?: string\n result?: Array<{\n _id: string\n _org?: string\n _schema?: string\n _created_at?: string // date-time\n _updated_at?: string // date-time\n _created_by?: string | number\n created_by?: string | number\n _tags?: string[]\n _acl?: Record<string, string[]>\n _owners?: Array<{\n org_id: { ... }\n user_id: { ... }\n }>\n type?: string\n }>\n createdAt: string // date-time\n updatedAt: string // date-time\n}\n```\n\n### `DetectDuplicatesRequestBody`\n\n```ts\ntype DetectDuplicatesRequestBody = {\n schema: string\n entity: Record<string, unknown>\n}\n```\n\n### `DetectDuplicatesResponse`\n\n```ts\ntype DetectDuplicatesResponse = {\n matches: Array<{\n entity: {\n _id: { ... }\n _org?: { ... }\n _schema?: { ... }\n _created_at?: { ... }\n _updated_at?: { ... }\n _created_by?: { ... }\n created_by?: { ... }\n _tags?: { ... }\n _acl?: { ... }\n _owners?: { ... }\n type?: { ... }\n }\n confidence: number\n matched_attributes: string[]\n }>\n}\n```\n\n### `DetectedDuplicateMatch`\n\n```ts\ntype DetectedDuplicateMatch = {\n entity: {\n _id: string\n _org?: string\n _schema?: string\n _created_at?: string // date-time\n _updated_at?: string // date-time\n _created_by?: string | number\n created_by?: string | number\n _tags?: string[]\n _acl?: Record<string, string[]>\n _owners?: Array<{\n org_id: { ... }\n user_id: { ... }\n }>\n type?: string\n }\n confidence: number\n matched_attributes: string[]\n}\n```\n\n### `UniquenessCriteriaListResponse`\n\n```ts\ntype UniquenessCriteriaListResponse = {\n items: Array<{\n id: string // uuid\n orgId: string\n schema: string\n matchRules: Array<{\n name?: { ... }\n attributes: { ... }\n confidence: { ... }\n }>\n createdAt: string // date-time\n updatedAt: string // date-time\n }>\n}\n```\n\n### `UniquenessCriteria`\n\nDefines what makes an entity of a given schema unique within an organization.\n\n```ts\ntype UniquenessCriteria = {\n id: string // uuid\n orgId: string\n schema: string\n matchRules: Array<{\n name?: string\n attributes: Array<{\n attribute: { ... }\n }>\n confidence: number\n }>\n createdAt: string // date-time\n updatedAt: string // date-time\n}\n```\n\n### `MatchRule`\n\nOne way to identify the same entity. Evaluated in order; first rule whose attributes are all available and that returns hits wins.\n\n```ts\ntype MatchRule = {\n name?: string\n attributes: Array<{\n attribute: string\n }>\n confidence: number\n}\n```\n\n### `MatchAttribute`\n\nOne attribute participating in a match rule. Wrapped as an object so per-attribute options can be added later.\n\n```ts\ntype MatchAttribute = {\n attribute: string\n}\n```\n\n### `UniquenessCriteriaCreateBody`\n\n```ts\ntype UniquenessCriteriaCreateBody = {\n schema: string\n matchRules: Array<{\n name?: string\n attributes: Array<{\n attribute: { ... }\n }>\n confidence: number\n }>\n}\n```\n\n### `UniquenessCriteriaUpdateBody`\n\n```ts\ntype UniquenessCriteriaUpdateBody = {\n matchRules: Array<{\n name?: string\n attributes: Array<{\n attribute: { ... }\n }>\n confidence: number\n }>\n}\n```\n';
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
exports.default = deduplication_default;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import "./chunk-YPSWSI3M.js";
|
|
2
|
-
|
|
3
|
-
// src/docs/deduplication.json
|
|
4
|
-
var deduplication_default = '# Deduplication API\n\n- **Base URL:** `https://deduplication.sls.epilot.io`\n- **Full API Docs:** [https://docs.epilot.io/api/deduplication](https://docs.epilot.io/api/deduplication)\n\n## Usage\n\n```ts\nimport { epilot } from \'@epilot/sdk\'\n\nepilot.authorize(() => \'<token>\')\nconst { data } = await epilot.deduplication.deduplicate(...)\n```\n\n### Tree-shakeable import\n\n```ts\nimport { getClient, authorize } from \'@epilot/sdk/deduplication\'\n\nconst deduplicationClient = getClient()\nauthorize(deduplicationClient, () => \'<token>\')\nconst { data } = await deduplicationClient.deduplicate(...)\n```\n\n## Operations\n\n- [`deduplicate`](#deduplicate)\n- [`deduplicateAsync`](#deduplicateasync)\n- [`getDeduplicationJob`](#getdeduplicationjob)\n- [`detectDuplicates`](#detectduplicates)\n- [`listUniquenessCriteria`](#listuniquenesscriteria)\n- [`createUniquenessCriteria`](#createuniquenesscriteria)\n- [`getUniquenessCriteria`](#getuniquenesscriteria)\n- [`updateUniquenessCriteria`](#updateuniquenesscriteria)\n- [`deleteUniquenessCriteria`](#deleteuniquenesscriteria)\n\n**Schemas**\n- [`DeduplicateRequestBody`](#deduplicaterequestbody)\n- [`DeduplicateRequestResponse`](#deduplicaterequestresponse)\n- [`Entity`](#entity)\n- [`DeduplicateAsyncResponse`](#deduplicateasyncresponse)\n- [`JobStatus`](#jobstatus)\n- [`DeduplicationJob`](#deduplicationjob)\n- [`DetectDuplicatesRequestBody`](#detectduplicatesrequestbody)\n- [`DetectDuplicatesResponse`](#detectduplicatesresponse)\n- [`DetectedDuplicateMatch`](#detectedduplicatematch)\n- [`UniquenessCriteriaListResponse`](#uniquenesscriterialistresponse)\n- [`UniquenessCriteria`](#uniquenesscriteria)\n- [`MatchRule`](#matchrule)\n- [`MatchAttribute`](#matchattribute)\n- [`UniquenessCriteriaCreateBody`](#uniquenesscriteriacreatebody)\n- [`UniquenessCriteriaUpdateBody`](#uniquenesscriteriaupdatebody)\n\n### `deduplicate`\n\nDeduplicates Entities\n\n`POST /v1/deduplicate`\n\n```ts\nconst { data } = await client.deduplicate(\n null,\n [\n {\n toKeep: \'string\',\n toDelete: [\'string\']\n }\n ],\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n[\n {\n "_id": "string",\n "_org": "string",\n "_schema": "string",\n "_created_at": "1970-01-01T00:00:00.000Z",\n "_updated_at": "1970-01-01T00:00:00.000Z",\n "_created_by": "string",\n "created_by": "string",\n "_tags": ["string"],\n "_acl": {},\n "_owners": [\n {\n "org_id": "string",\n "user_id": "string"\n }\n ],\n "type": "string"\n }\n]\n```\n\n</details>\n\n---\n\n### `deduplicateAsync`\n\nSubmits an async deduplication job. Returns a job ID immediately. Poll GET /v1/deduplicate/jobs/{jobId} for status.\n\n`POST /v1/deduplicate/job`\n\n```ts\nconst { data } = await client.deduplicateAsync(\n null,\n [\n {\n toKeep: \'string\',\n toDelete: [\'string\']\n }\n ],\n)\n```\n\n---\n\n### `getDeduplicationJob`\n\nReturns the current status of an async deduplication job\n\n`GET /v1/deduplicate/jobs/{jobId}`\n\n```ts\nconst { data } = await client.getDeduplicationJob({\n jobId: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "jobId": "string",\n "status": "pending",\n "message": "string",\n "result": [\n {\n "_id": "string",\n "_org": "string",\n "_schema": "string",\n "_created_at": "1970-01-01T00:00:00.000Z",\n "_updated_at": "1970-01-01T00:00:00.000Z",\n "_created_by": "string",\n "created_by": "string",\n "_tags": ["string"],\n "_acl": {},\n "_owners": [\n {\n "org_id": "string",\n "user_id": "string"\n }\n ],\n "type": "string"\n }\n ],\n "createdAt": "1970-01-01T00:00:00.000Z",\n "updatedAt": "1970-01-01T00:00:00.000Z"\n}\n```\n\n</details>\n\n---\n\n### `detectDuplicates`\n\nDetects potential duplicate entities for the given entity using the schema\'s prioritized uniqueness rules. Returns matches with a confidence score.\n\n`POST /v1/detect-duplicates`\n\n```ts\nconst { data } = await client.detectDuplicates(\n null,\n {\n schema: \'string\',\n entity: {}\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "matches": [\n {\n "entity": {\n "_id": "string",\n "_org": "string",\n "_schema": "string",\n "_created_at": "1970-01-01T00:00:00.000Z",\n "_updated_at": "1970-01-01T00:00:00.000Z",\n "_created_by": "string",\n "created_by": "string",\n "_tags": ["string"],\n "_acl": {},\n "_owners": [\n {\n "org_id": "string",\n "user_id": "string"\n }\n ],\n "type": "string"\n },\n "confidence": 0,\n "matched_attributes": ["string"]\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `listUniquenessCriteria`\n\nLists UniquenessCriteria for the requesting organization. Optionally filtered by schema.\n\n`GET /v1/uniqueness-criteria`\n\n```ts\nconst { data } = await client.listUniquenessCriteria({\n schema: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "items": [\n {\n "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "orgId": "string",\n "schema": "string",\n "matchRules": [\n {\n "name": "string",\n "attributes": [\n {\n "attribute": "string"\n }\n ],\n "confidence": 0\n }\n ],\n "createdAt": "1970-01-01T00:00:00.000Z",\n "updatedAt": "1970-01-01T00:00:00.000Z"\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `createUniquenessCriteria`\n\nCreates a new UniquenessCriteria record.\n\n`POST /v1/uniqueness-criteria`\n\n```ts\nconst { data } = await client.createUniquenessCriteria(\n null,\n {\n schema: \'string\',\n matchRules: [\n {\n name: \'string\',\n attributes: [\n {\n attribute: \'string\'\n }\n ],\n confidence: 0\n }\n ]\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "orgId": "string",\n "schema": "string",\n "matchRules": [\n {\n "name": "string",\n "attributes": [\n {\n "attribute": "string"\n }\n ],\n "confidence": 0\n }\n ],\n "createdAt": "1970-01-01T00:00:00.000Z",\n "updatedAt": "1970-01-01T00:00:00.000Z"\n}\n```\n\n</details>\n\n---\n\n### `getUniquenessCriteria`\n\nFetch a single UniquenessCriteria record.\n\n`GET /v1/uniqueness-criteria/{schema}`\n\n```ts\nconst { data } = await client.getUniquenessCriteria({\n schema: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "orgId": "string",\n "schema": "string",\n "matchRules": [\n {\n "name": "string",\n "attributes": [\n {\n "attribute": "string"\n }\n ],\n "confidence": 0\n }\n ],\n "createdAt": "1970-01-01T00:00:00.000Z",\n "updatedAt": "1970-01-01T00:00:00.000Z"\n}\n```\n\n</details>\n\n---\n\n### `updateUniquenessCriteria`\n\nReplace the matchRules on an existing UniquenessCriteria record.\n\n`PUT /v1/uniqueness-criteria/{schema}`\n\n```ts\nconst { data } = await client.updateUniquenessCriteria(\n {\n schema: \'example\',\n },\n {\n matchRules: [\n {\n name: \'string\',\n attributes: [\n {\n attribute: \'string\'\n }\n ],\n confidence: 0\n }\n ]\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "orgId": "string",\n "schema": "string",\n "matchRules": [\n {\n "name": "string",\n "attributes": [\n {\n "attribute": "string"\n }\n ],\n "confidence": 0\n }\n ],\n "createdAt": "1970-01-01T00:00:00.000Z",\n "updatedAt": "1970-01-01T00:00:00.000Z"\n}\n```\n\n</details>\n\n---\n\n### `deleteUniquenessCriteria`\n\nDelete a UniquenessCriteria record.\n\n`DELETE /v1/uniqueness-criteria/{schema}`\n\n```ts\nconst { data } = await client.deleteUniquenessCriteria({\n schema: \'example\',\n})\n```\n\n---\n\n## Schemas\n\n### `DeduplicateRequestBody`\n\n```ts\ntype DeduplicateRequestBody = Array<{\n toKeep: string\n toDelete: string[]\n}>\n```\n\n### `DeduplicateRequestResponse`\n\n```ts\ntype DeduplicateRequestResponse = Array<{\n _id: string\n _org?: string\n _schema?: string\n _created_at?: string // date-time\n _updated_at?: string // date-time\n _created_by?: string | number\n created_by?: string | number\n _tags?: string[]\n _acl?: Record<string, string[]>\n _owners?: Array<{\n org_id: string\n user_id: string\n }>\n type?: string\n}>\n```\n\n### `Entity`\n\nBase Entity schema\n\n```ts\ntype Entity = {\n _id: string\n _org?: string\n _schema?: string\n _created_at?: string // date-time\n _updated_at?: string // date-time\n _created_by?: string | number\n created_by?: string | number\n _tags?: string[]\n _acl?: Record<string, string[]>\n _owners?: Array<{\n org_id: string\n user_id: string\n }>\n type?: string\n}\n```\n\n### `DeduplicateAsyncResponse`\n\nResponse returned immediately when a deduplication job is submitted\n\n```ts\ntype DeduplicateAsyncResponse = {\n jobId: string\n status: "pending" | "processing" | "completed" | "failed"\n message: string\n}\n```\n\n### `JobStatus`\n\n```ts\ntype JobStatus = "pending" | "processing" | "completed" | "failed"\n```\n\n### `DeduplicationJob`\n\nRepresents an async deduplication job\n\n```ts\ntype DeduplicationJob = {\n jobId: string\n status: "pending" | "processing" | "completed" | "failed"\n message?: string\n result?: Array<{\n _id: string\n _org?: string\n _schema?: string\n _created_at?: string // date-time\n _updated_at?: string // date-time\n _created_by?: string | number\n created_by?: string | number\n _tags?: string[]\n _acl?: Record<string, string[]>\n _owners?: Array<{\n org_id: { ... }\n user_id: { ... }\n }>\n type?: string\n }>\n createdAt: string // date-time\n updatedAt: string // date-time\n}\n```\n\n### `DetectDuplicatesRequestBody`\n\n```ts\ntype DetectDuplicatesRequestBody = {\n schema: string\n entity: Record<string, unknown>\n}\n```\n\n### `DetectDuplicatesResponse`\n\n```ts\ntype DetectDuplicatesResponse = {\n matches: Array<{\n entity: {\n _id: { ... }\n _org?: { ... }\n _schema?: { ... }\n _created_at?: { ... }\n _updated_at?: { ... }\n _created_by?: { ... }\n created_by?: { ... }\n _tags?: { ... }\n _acl?: { ... }\n _owners?: { ... }\n type?: { ... }\n }\n confidence: number\n matched_attributes: string[]\n }>\n}\n```\n\n### `DetectedDuplicateMatch`\n\n```ts\ntype DetectedDuplicateMatch = {\n entity: {\n _id: string\n _org?: string\n _schema?: string\n _created_at?: string // date-time\n _updated_at?: string // date-time\n _created_by?: string | number\n created_by?: string | number\n _tags?: string[]\n _acl?: Record<string, string[]>\n _owners?: Array<{\n org_id: { ... }\n user_id: { ... }\n }>\n type?: string\n }\n confidence: number\n matched_attributes: string[]\n}\n```\n\n### `UniquenessCriteriaListResponse`\n\n```ts\ntype UniquenessCriteriaListResponse = {\n items: Array<{\n id: string // uuid\n orgId: string\n schema: string\n matchRules: Array<{\n name?: { ... }\n attributes: { ... }\n confidence: { ... }\n }>\n createdAt: string // date-time\n updatedAt: string // date-time\n }>\n}\n```\n\n### `UniquenessCriteria`\n\nDefines what makes an entity of a given schema unique within an organization.\n\n```ts\ntype UniquenessCriteria = {\n id: string // uuid\n orgId: string\n schema: string\n matchRules: Array<{\n name?: string\n attributes: Array<{\n attribute: { ... }\n }>\n confidence: number\n }>\n createdAt: string // date-time\n updatedAt: string // date-time\n}\n```\n\n### `MatchRule`\n\nOne way to identify the same entity. Evaluated in order; first rule whose attributes are all available and that returns hits wins.\n\n```ts\ntype MatchRule = {\n name?: string\n attributes: Array<{\n attribute: string\n }>\n confidence: number\n}\n```\n\n### `MatchAttribute`\n\nOne attribute participating in a match rule. Wrapped as an object so per-attribute options can be added later.\n\n```ts\ntype MatchAttribute = {\n attribute: string\n}\n```\n\n### `UniquenessCriteriaCreateBody`\n\n```ts\ntype UniquenessCriteriaCreateBody = {\n schema: string\n matchRules: Array<{\n name?: string\n attributes: Array<{\n attribute: { ... }\n }>\n confidence: number\n }>\n}\n```\n\n### `UniquenessCriteriaUpdateBody`\n\n```ts\ntype UniquenessCriteriaUpdateBody = {\n matchRules: Array<{\n name?: string\n attributes: Array<{\n attribute: { ... }\n }>\n confidence: number\n }>\n}\n```\n';
|
|
5
|
-
export {
|
|
6
|
-
deduplication_default as default
|
|
7
|
-
};
|