@amigo-ai/platform-sdk 0.3.0 → 0.4.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 +58 -0
- package/dist/core/errors.js +2 -3
- package/dist/core/errors.js.map +1 -1
- package/dist/core/webhooks.js +127 -13
- package/dist/core/webhooks.js.map +1 -1
- package/dist/index.cjs +123 -18
- package/dist/index.cjs.map +2 -2
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +123 -18
- package/dist/index.mjs.map +2 -2
- package/dist/types/core/errors.d.ts.map +1 -1
- package/dist/types/core/webhooks.d.ts +19 -1
- package/dist/types/core/webhooks.d.ts.map +1 -1
- package/dist/types/generated/api.d.ts +12694 -11729
- package/dist/types/generated/api.d.ts.map +1 -1
- package/dist/types/index.d.ts +2 -2
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/resources/actions.d.ts +83 -83
- package/dist/types/resources/actions.d.ts.map +1 -1
- package/dist/types/resources/agents.d.ts +30 -30
- package/dist/types/resources/agents.d.ts.map +1 -1
- package/dist/types/resources/analytics.d.ts +12 -12
- package/dist/types/resources/analytics.d.ts.map +1 -1
- package/dist/types/resources/api-keys.d.ts +15 -15
- package/dist/types/resources/api-keys.d.ts.map +1 -1
- package/dist/types/resources/audit.d.ts +11 -11
- package/dist/types/resources/audit.d.ts.map +1 -1
- package/dist/types/resources/billing.d.ts +9 -9
- package/dist/types/resources/billing.d.ts.map +1 -1
- package/dist/types/resources/calls.d.ts +31 -45
- package/dist/types/resources/calls.d.ts.map +1 -1
- package/dist/types/resources/compliance.d.ts +17 -17
- package/dist/types/resources/context-graphs.d.ts +35 -35
- package/dist/types/resources/context-graphs.d.ts.map +1 -1
- package/dist/types/resources/data-sources.d.ts +47 -47
- package/dist/types/resources/data-sources.d.ts.map +1 -1
- package/dist/types/resources/functions.d.ts +12 -12
- package/dist/types/resources/functions.d.ts.map +1 -1
- package/dist/types/resources/integrations.d.ts +43 -43
- package/dist/types/resources/integrations.d.ts.map +1 -1
- package/dist/types/resources/memory.d.ts +10 -10
- package/dist/types/resources/memory.d.ts.map +1 -1
- package/dist/types/resources/operators.d.ts +53 -53
- package/dist/types/resources/operators.d.ts.map +1 -1
- package/dist/types/resources/personas.d.ts +23 -23
- package/dist/types/resources/personas.d.ts.map +1 -1
- package/dist/types/resources/phone-numbers.d.ts +38 -38
- package/dist/types/resources/phone-numbers.d.ts.map +1 -1
- package/dist/types/resources/recordings.d.ts +10 -10
- package/dist/types/resources/review-queue.d.ts +71 -71
- package/dist/types/resources/review-queue.d.ts.map +1 -1
- package/dist/types/resources/safety.d.ts +23 -23
- package/dist/types/resources/safety.d.ts.map +1 -1
- package/dist/types/resources/services.d.ts +50 -50
- package/dist/types/resources/services.d.ts.map +1 -1
- package/dist/types/resources/settings.d.ts +24 -24
- package/dist/types/resources/settings.d.ts.map +1 -1
- package/dist/types/resources/simulations.d.ts +12 -12
- package/dist/types/resources/simulations.d.ts.map +1 -1
- package/dist/types/resources/skills.d.ts +83 -83
- package/dist/types/resources/skills.d.ts.map +1 -1
- package/dist/types/resources/triggers.d.ts +55 -55
- package/dist/types/resources/triggers.d.ts.map +1 -1
- package/dist/types/resources/webhook-destinations.d.ts +35 -35
- package/dist/types/resources/webhook-destinations.d.ts.map +1 -1
- package/dist/types/resources/workspaces.d.ts +26 -26
- package/dist/types/resources/workspaces.d.ts.map +1 -1
- package/dist/types/resources/world.d.ts +41 -41
- package/dist/types/resources/world.d.ts.map +1 -1
- package/package.json +31 -14
|
@@ -21,50 +21,50 @@ export declare class WorldResource extends WorkspaceScopedResource {
|
|
|
21
21
|
tags?: string[] | null;
|
|
22
22
|
}): Promise<{
|
|
23
23
|
entities: import("../index.js").components["schemas"]["EntityResponse"][];
|
|
24
|
-
total: number;
|
|
25
24
|
has_more: boolean;
|
|
26
25
|
next_offset?: number | null;
|
|
26
|
+
total: number;
|
|
27
27
|
}>;
|
|
28
28
|
/** Get a single entity */
|
|
29
29
|
getEntity(entityId: EntityId | string): Promise<{
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
30
|
+
appointment_end?: string | null;
|
|
31
|
+
appointment_start?: string | null;
|
|
32
|
+
appointment_status?: string | null;
|
|
33
|
+
appointment_type?: string | null;
|
|
34
|
+
birth_date?: string | null;
|
|
35
|
+
call_sid?: string | null;
|
|
34
36
|
canonical_id?: string | null;
|
|
37
|
+
confidence?: number;
|
|
38
|
+
created_at?: string | null;
|
|
39
|
+
deal_amount?: number | null;
|
|
40
|
+
deal_stage?: string | null;
|
|
41
|
+
direction?: string | null;
|
|
42
|
+
display_name?: string | null;
|
|
43
|
+
domain?: string | null;
|
|
44
|
+
duration_seconds?: number | null;
|
|
45
|
+
email?: string | null;
|
|
46
|
+
entity_type: string;
|
|
47
|
+
event_count?: number;
|
|
35
48
|
external_ids?: {
|
|
36
49
|
[key: string]: unknown;
|
|
37
50
|
};
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
};
|
|
51
|
+
first_seen_at?: string | null;
|
|
52
|
+
gender?: string | null;
|
|
41
53
|
has_projection?: boolean;
|
|
54
|
+
id: string;
|
|
55
|
+
industry?: string | null;
|
|
56
|
+
last_event_at?: string | null;
|
|
57
|
+
mrn?: string | null;
|
|
42
58
|
name?: string | null;
|
|
43
59
|
phone?: string | null;
|
|
44
|
-
email?: string | null;
|
|
45
|
-
birth_date?: string | null;
|
|
46
|
-
gender?: string | null;
|
|
47
|
-
mrn?: string | null;
|
|
48
|
-
appointment_status?: string | null;
|
|
49
|
-
appointment_start?: string | null;
|
|
50
|
-
appointment_end?: string | null;
|
|
51
|
-
appointment_type?: string | null;
|
|
52
|
-
domain?: string | null;
|
|
53
|
-
industry?: string | null;
|
|
54
|
-
deal_stage?: string | null;
|
|
55
|
-
deal_amount?: number | null;
|
|
56
|
-
call_sid?: string | null;
|
|
57
|
-
direction?: string | null;
|
|
58
|
-
duration_seconds?: number | null;
|
|
59
|
-
status?: string | null;
|
|
60
60
|
source?: string | null;
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
61
|
+
state?: {
|
|
62
|
+
[key: string]: unknown;
|
|
63
|
+
};
|
|
64
|
+
status?: string | null;
|
|
65
65
|
tags?: string[] | null;
|
|
66
|
-
created_at?: string | null;
|
|
67
66
|
updated_at?: string | null;
|
|
67
|
+
workspace_id: string;
|
|
68
68
|
}>;
|
|
69
69
|
/** Get all relationships for an entity */
|
|
70
70
|
getRelationships(entityId: EntityId | string): Promise<{
|
|
@@ -121,9 +121,9 @@ export declare class WorldResource extends WorkspaceScopedResource {
|
|
|
121
121
|
}): Promise<{
|
|
122
122
|
entity_id: string;
|
|
123
123
|
events: import("../index.js").components["schemas"]["EntityEventResponse"][];
|
|
124
|
-
total: number;
|
|
125
124
|
has_more: boolean;
|
|
126
125
|
next_offset?: number | null;
|
|
126
|
+
total: number;
|
|
127
127
|
}>;
|
|
128
128
|
/** Get sync status grouped by sink (Lakebase, Delta, etc.) */
|
|
129
129
|
getSyncStatusBySink(): Promise<{
|
|
@@ -140,21 +140,21 @@ export declare class WorldResource extends WorkspaceScopedResource {
|
|
|
140
140
|
offset?: number;
|
|
141
141
|
}): Promise<{
|
|
142
142
|
events: import("../index.js").components["schemas"]["SyncEventItem"][];
|
|
143
|
-
total: number;
|
|
144
143
|
has_more: boolean;
|
|
145
144
|
next_offset?: number | null;
|
|
145
|
+
total: number;
|
|
146
146
|
}>;
|
|
147
147
|
/** Get current sync queue depth */
|
|
148
148
|
getSyncQueueDepth(): Promise<{
|
|
149
|
-
pending_count: number;
|
|
150
|
-
failed_count: number;
|
|
151
|
-
oldest_pending_at?: string | null;
|
|
152
|
-
last_sync_success_at?: string | null;
|
|
153
149
|
by_resource_type?: {
|
|
154
150
|
[key: string]: {
|
|
155
151
|
[key: string]: number;
|
|
156
152
|
};
|
|
157
153
|
};
|
|
154
|
+
failed_count: number;
|
|
155
|
+
last_sync_success_at?: string | null;
|
|
156
|
+
oldest_pending_at?: string | null;
|
|
157
|
+
pending_count: number;
|
|
158
158
|
}>;
|
|
159
159
|
/** Retry a single failed sync event */
|
|
160
160
|
retrySyncEvent(eventId: string): Promise<{
|
|
@@ -163,19 +163,19 @@ export declare class WorldResource extends WorkspaceScopedResource {
|
|
|
163
163
|
}>;
|
|
164
164
|
/** Retry all failed sync events */
|
|
165
165
|
retryAllSyncEvents(): Promise<{
|
|
166
|
-
retried: number;
|
|
167
166
|
failed_to_publish: number;
|
|
167
|
+
retried: number;
|
|
168
168
|
}>;
|
|
169
169
|
/** Get aggregate entity and event statistics */
|
|
170
170
|
getStats(): Promise<{
|
|
171
|
-
total_entities: number;
|
|
172
|
-
total_events: number;
|
|
173
|
-
sync_pending: number;
|
|
174
|
-
sync_synced: number;
|
|
175
|
-
sync_failed: number;
|
|
176
171
|
by_event_type?: {
|
|
177
172
|
[key: string]: number;
|
|
178
173
|
};
|
|
174
|
+
sync_failed: number;
|
|
175
|
+
sync_pending: number;
|
|
176
|
+
sync_synced: number;
|
|
177
|
+
total_entities: number;
|
|
178
|
+
total_events: number;
|
|
179
179
|
}>;
|
|
180
180
|
/** Get entity counts broken down by source system */
|
|
181
181
|
getSourceBreakdown(): Promise<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"world.d.ts","sourceRoot":"","sources":["../../../src/resources/world.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAA;AACxD,OAAO,EAAE,uBAAuB,EAAe,MAAM,WAAW,CAAA;AAEhE;;;;;;GAMG;AACH,qBAAa,aAAc,SAAQ,uBAAuB;IAGxD,4CAA4C;IACtC,YAAY,CAAC,MAAM,CAAC,EAAE;QAC1B,WAAW,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,CAAA;QAC7B,CAAC,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;QACjB,KAAK,CAAC,EAAE,MAAM,CAAA;QACd,MAAM,CAAC,EAAE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I,CAAA;QAC9B,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;QAC7B,kBAAkB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;QAClC,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;QAChC,KAAK,CAAC,EAAE,MAAM,CAAA;QACd,MAAM,CAAC,EAAE,MAAM,CAAA;KAChB;gBAuD4yygB,2CAAsB;;;;;IA/Cn0ygB,mCAAmC;IAC7B,iBAAiB;;;;;;;;;;;IAQvB,uCAAuC;IACjC,cAAc,CAAC,OAAO,EAAE,MAAM;;;;IAQpC,mCAAmC;IAC7B,kBAAkB;;;;IAUxB,gDAAgD;IAC1C,QAAQ;;;;;;;;;;IAQd,qDAAqD;IAC/C,kBAAkB;mBAQ8+xf,2CAAsB;;;CAD7hyf"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@amigo-ai/platform-sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "Official TypeScript SDK for the Amigo Platform API",
|
|
5
|
+
"publishConfig": {
|
|
6
|
+
"access": "public"
|
|
7
|
+
},
|
|
5
8
|
"keywords": [
|
|
6
9
|
"amigo",
|
|
7
10
|
"platform",
|
|
@@ -26,7 +29,8 @@
|
|
|
26
29
|
"types": "./dist/types/index.d.ts",
|
|
27
30
|
"import": "./dist/index.mjs",
|
|
28
31
|
"require": "./dist/index.cjs"
|
|
29
|
-
}
|
|
32
|
+
},
|
|
33
|
+
"./package.json": "./package.json"
|
|
30
34
|
},
|
|
31
35
|
"main": "./dist/index.cjs",
|
|
32
36
|
"module": "./dist/index.mjs",
|
|
@@ -37,21 +41,23 @@
|
|
|
37
41
|
"LICENSE"
|
|
38
42
|
],
|
|
39
43
|
"scripts": {
|
|
40
|
-
"clean": "
|
|
44
|
+
"clean": "node scripts/clean.mjs",
|
|
41
45
|
"gen-types": "node scripts/gen-types.mjs",
|
|
46
|
+
"openapi:sync": "node scripts/sync-openapi.mjs",
|
|
42
47
|
"build": "npm run clean && npm run gen-types && npm run esbuild && tsc --project tsconfig.build.json",
|
|
43
48
|
"esbuild": "node scripts/build.mjs",
|
|
44
|
-
"lint": "eslint 'src/**/*.{ts,tsx}' --max-warnings 0",
|
|
45
|
-
"lint:fix": "eslint 'src/**/*.{ts,tsx}' --fix",
|
|
46
|
-
"format": "prettier --
|
|
47
|
-
"
|
|
48
|
-
"test
|
|
49
|
-
"test:
|
|
49
|
+
"lint": "eslint 'src/**/*.{ts,tsx}' 'tests/**/*.{ts,tsx}' 'scripts/**/*.{js,mjs}' --max-warnings 0",
|
|
50
|
+
"lint:fix": "eslint 'src/**/*.{ts,tsx}' 'tests/**/*.{ts,tsx}' 'scripts/**/*.{js,mjs}' --fix",
|
|
51
|
+
"format": "prettier --check .",
|
|
52
|
+
"format:write": "prettier --write .",
|
|
53
|
+
"test": "vitest run --project unit",
|
|
54
|
+
"test:dist": "vitest run --project dist",
|
|
55
|
+
"test:integration": "vitest run --project integration",
|
|
50
56
|
"test:all": "vitest run",
|
|
51
|
-
"test:watch": "vitest
|
|
52
|
-
"test:coverage": "vitest run --coverage",
|
|
57
|
+
"test:watch": "vitest",
|
|
58
|
+
"test:coverage": "vitest run --coverage --project unit",
|
|
53
59
|
"typecheck": "tsc --noEmit",
|
|
54
|
-
"prepublishOnly": "npm run build && npm test"
|
|
60
|
+
"prepublishOnly": "npm run build && npm test && npm run test:dist && npm run typecheck"
|
|
55
61
|
},
|
|
56
62
|
"sideEffects": false,
|
|
57
63
|
"dependencies": {
|
|
@@ -76,8 +82,19 @@
|
|
|
76
82
|
"vitest": "^3.2.4"
|
|
77
83
|
},
|
|
78
84
|
"lint-staged": {
|
|
79
|
-
"
|
|
80
|
-
"eslint --fix",
|
|
85
|
+
"src/**/*.{ts,js,mjs}": [
|
|
86
|
+
"eslint --fix --max-warnings 0",
|
|
87
|
+
"prettier --write"
|
|
88
|
+
],
|
|
89
|
+
"tests/**/*.ts": [
|
|
90
|
+
"eslint --fix --max-warnings 0",
|
|
91
|
+
"prettier --write"
|
|
92
|
+
],
|
|
93
|
+
"scripts/**/*.{js,mjs}": [
|
|
94
|
+
"eslint --fix --max-warnings 0",
|
|
95
|
+
"prettier --write"
|
|
96
|
+
],
|
|
97
|
+
"*.{json,md,yml,yaml}": [
|
|
81
98
|
"prettier --write"
|
|
82
99
|
]
|
|
83
100
|
},
|