@amigo-ai/platform-sdk 0.56.0 → 0.58.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 +72 -6
- package/api.md +19 -24
- package/dist/core/branded-types.js +1 -0
- package/dist/core/branded-types.js.map +1 -1
- package/dist/index.cjs +180 -204
- package/dist/index.cjs.map +4 -4
- package/dist/index.js +9 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +180 -204
- package/dist/index.mjs.map +4 -4
- package/dist/resources/fhir.js +1 -7
- package/dist/resources/fhir.js.map +1 -1
- package/dist/resources/integrations.js +66 -34
- package/dist/resources/integrations.js.map +1 -1
- package/dist/resources/settings.js +1 -19
- package/dist/resources/settings.js.map +1 -1
- package/dist/resources/tokens.js +31 -0
- package/dist/resources/tokens.js.map +1 -0
- package/dist/resources/workspace-data-queries.js +41 -0
- package/dist/resources/workspace-data-queries.js.map +1 -0
- package/dist/resources/world.js +0 -27
- package/dist/resources/world.js.map +1 -1
- package/dist/types/core/branded-types.d.ts +2 -0
- package/dist/types/core/branded-types.d.ts.map +1 -1
- package/dist/types/generated/api.d.ts +2825 -3993
- package/dist/types/generated/api.d.ts.map +1 -1
- package/dist/types/index.d.cts +10 -4
- package/dist/types/index.d.cts.map +1 -1
- package/dist/types/index.d.ts +10 -4
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/resources/actions.d.ts +5 -25
- package/dist/types/resources/actions.d.ts.map +1 -1
- package/dist/types/resources/base.d.ts +1 -1
- package/dist/types/resources/base.d.ts.map +1 -1
- package/dist/types/resources/calls.d.ts +17 -5
- package/dist/types/resources/calls.d.ts.map +1 -1
- package/dist/types/resources/context-graphs.d.ts +16 -0
- package/dist/types/resources/context-graphs.d.ts.map +1 -1
- package/dist/types/resources/fhir.d.ts +1 -22
- package/dist/types/resources/fhir.d.ts.map +1 -1
- package/dist/types/resources/intake.d.ts.map +1 -1
- package/dist/types/resources/integrations.d.ts +457 -599
- package/dist/types/resources/integrations.d.ts.map +1 -1
- package/dist/types/resources/metrics.d.ts +7 -3
- package/dist/types/resources/metrics.d.ts.map +1 -1
- package/dist/types/resources/operators.d.ts +2 -2
- package/dist/types/resources/operators.d.ts.map +1 -1
- package/dist/types/resources/review-queue.d.ts +11 -11
- package/dist/types/resources/services.d.ts +135 -0
- package/dist/types/resources/services.d.ts.map +1 -1
- package/dist/types/resources/settings.d.ts +7 -145
- package/dist/types/resources/settings.d.ts.map +1 -1
- package/dist/types/resources/skills.d.ts +5 -25
- package/dist/types/resources/skills.d.ts.map +1 -1
- package/dist/types/resources/surfaces.d.ts.map +1 -1
- package/dist/types/resources/tasks.d.ts +2 -2
- package/dist/types/resources/tokens.d.ts +20 -0
- package/dist/types/resources/tokens.d.ts.map +1 -0
- package/dist/types/resources/workspace-data-queries.d.ts +22 -0
- package/dist/types/resources/workspace-data-queries.d.ts.map +1 -0
- package/dist/types/resources/world.d.ts +25 -82
- package/dist/types/resources/world.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/resources/webhook-destinations.js +0 -50
- package/dist/resources/webhook-destinations.js.map +0 -1
- package/dist/types/resources/webhook-destinations.d.ts +0 -125
- package/dist/types/resources/webhook-destinations.d.ts.map +0 -1
package/dist/index.mjs
CHANGED
|
@@ -1048,6 +1048,36 @@ var ApiKeysResource = class extends WorkspaceScopedResource {
|
|
|
1048
1048
|
}
|
|
1049
1049
|
};
|
|
1050
1050
|
|
|
1051
|
+
// src/resources/tokens.ts
|
|
1052
|
+
var omitAuthorizationHeader = {
|
|
1053
|
+
onRequest({ request }) {
|
|
1054
|
+
request.headers.delete("Authorization");
|
|
1055
|
+
return request;
|
|
1056
|
+
}
|
|
1057
|
+
};
|
|
1058
|
+
var TokensResource = class extends WorkspaceScopedResource {
|
|
1059
|
+
/** Exchange an API key for an identity-issued JWT access token. */
|
|
1060
|
+
async exchangeApiKey(request) {
|
|
1061
|
+
const body = {
|
|
1062
|
+
grant_type: "api_key",
|
|
1063
|
+
api_key: request.apiKey
|
|
1064
|
+
};
|
|
1065
|
+
if (request.scope) {
|
|
1066
|
+
body.scope = request.scope;
|
|
1067
|
+
}
|
|
1068
|
+
return extractData(
|
|
1069
|
+
await this.client.POST(
|
|
1070
|
+
"/token",
|
|
1071
|
+
{
|
|
1072
|
+
body,
|
|
1073
|
+
headers: { "Content-Type": "application/x-www-form-urlencoded" },
|
|
1074
|
+
middleware: [omitAuthorizationHeader]
|
|
1075
|
+
}
|
|
1076
|
+
)
|
|
1077
|
+
);
|
|
1078
|
+
}
|
|
1079
|
+
};
|
|
1080
|
+
|
|
1051
1081
|
// src/resources/agents.ts
|
|
1052
1082
|
var AgentsResource = class extends WorkspaceScopedResource {
|
|
1053
1083
|
async create(body) {
|
|
@@ -1896,45 +1926,6 @@ var WorldResource = class extends WorkspaceScopedResource {
|
|
|
1896
1926
|
})
|
|
1897
1927
|
);
|
|
1898
1928
|
}
|
|
1899
|
-
/** List sync events with status filtering */
|
|
1900
|
-
async listSyncEvents(params) {
|
|
1901
|
-
return extractData(
|
|
1902
|
-
await this.client.GET("/v1/{workspace_id}/world/sync/events", {
|
|
1903
|
-
params: { path: { workspace_id: this.workspaceId }, query: params }
|
|
1904
|
-
})
|
|
1905
|
-
);
|
|
1906
|
-
}
|
|
1907
|
-
listSyncEventsAutoPaging(params) {
|
|
1908
|
-
return this.iterateOffsetPaginatedList(
|
|
1909
|
-
(pageParams) => this.listSyncEvents(pageParams),
|
|
1910
|
-
(page) => page.events,
|
|
1911
|
-
params
|
|
1912
|
-
);
|
|
1913
|
-
}
|
|
1914
|
-
/** Get current sync queue depth */
|
|
1915
|
-
async getSyncQueueDepth() {
|
|
1916
|
-
return extractData(
|
|
1917
|
-
await this.client.GET("/v1/{workspace_id}/world/sync/queue", {
|
|
1918
|
-
params: { path: { workspace_id: this.workspaceId } }
|
|
1919
|
-
})
|
|
1920
|
-
);
|
|
1921
|
-
}
|
|
1922
|
-
/** Retry a single failed sync event */
|
|
1923
|
-
async retrySyncEvent(eventId2) {
|
|
1924
|
-
return extractData(
|
|
1925
|
-
await this.client.POST("/v1/{workspace_id}/world/sync/retry/{event_id}", {
|
|
1926
|
-
params: { path: { workspace_id: this.workspaceId, event_id: eventId2 } }
|
|
1927
|
-
})
|
|
1928
|
-
);
|
|
1929
|
-
}
|
|
1930
|
-
/** Retry all failed sync events */
|
|
1931
|
-
async retryAllSyncEvents() {
|
|
1932
|
-
return extractData(
|
|
1933
|
-
await this.client.POST("/v1/{workspace_id}/world/sync/retry-all", {
|
|
1934
|
-
params: { path: { workspace_id: this.workspaceId } }
|
|
1935
|
-
})
|
|
1936
|
-
);
|
|
1937
|
-
}
|
|
1938
1929
|
// ---- Statistics ----
|
|
1939
1930
|
/** Get aggregate entity and event statistics */
|
|
1940
1931
|
async getStats() {
|
|
@@ -2541,7 +2532,8 @@ var ChannelsResource = class extends WorkspaceScopedResource {
|
|
|
2541
2532
|
|
|
2542
2533
|
// src/resources/integrations.ts
|
|
2543
2534
|
var IntegrationsResource = class extends WorkspaceScopedResource {
|
|
2544
|
-
|
|
2535
|
+
// ─── Integrations ─────────────────────────────────────────────────────────
|
|
2536
|
+
/** Create a new REST integration */
|
|
2545
2537
|
async create(body) {
|
|
2546
2538
|
return extractData(
|
|
2547
2539
|
await this.client.POST("/v1/{workspace_id}/integrations", {
|
|
@@ -2550,7 +2542,7 @@ var IntegrationsResource = class extends WorkspaceScopedResource {
|
|
|
2550
2542
|
})
|
|
2551
2543
|
);
|
|
2552
2544
|
}
|
|
2553
|
-
/** List integrations */
|
|
2545
|
+
/** List integrations (REST + desktop) */
|
|
2554
2546
|
async list(params) {
|
|
2555
2547
|
return extractData(
|
|
2556
2548
|
await this.client.GET("/v1/{workspace_id}/integrations", {
|
|
@@ -2569,35 +2561,76 @@ var IntegrationsResource = class extends WorkspaceScopedResource {
|
|
|
2569
2561
|
})
|
|
2570
2562
|
);
|
|
2571
2563
|
}
|
|
2572
|
-
/**
|
|
2564
|
+
/** Patch a REST integration. Pass `auth: null` to clear auth. */
|
|
2573
2565
|
async update(integrationId2, body) {
|
|
2574
2566
|
return extractData(
|
|
2575
|
-
await this.client.
|
|
2567
|
+
await this.client.PATCH("/v1/{workspace_id}/integrations/{integration_id}", {
|
|
2576
2568
|
params: { path: { workspace_id: this.workspaceId, integration_id: integrationId2 } },
|
|
2577
2569
|
body
|
|
2578
2570
|
})
|
|
2579
2571
|
);
|
|
2580
2572
|
}
|
|
2581
|
-
/** Delete
|
|
2573
|
+
/** Delete a REST integration */
|
|
2582
2574
|
async delete(integrationId2) {
|
|
2583
2575
|
await this.client.DELETE("/v1/{workspace_id}/integrations/{integration_id}", {
|
|
2584
2576
|
params: { path: { workspace_id: this.workspaceId, integration_id: integrationId2 } }
|
|
2585
2577
|
});
|
|
2586
2578
|
}
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
|
|
2590
|
-
*/
|
|
2591
|
-
async testEndpoint(integrationId2, endpointName, body) {
|
|
2579
|
+
// ─── Endpoints ────────────────────────────────────────────────────────────
|
|
2580
|
+
/** List endpoints on a REST integration */
|
|
2581
|
+
async listEndpoints(integrationId2, params) {
|
|
2592
2582
|
return extractData(
|
|
2593
|
-
await this.client.
|
|
2594
|
-
|
|
2583
|
+
await this.client.GET("/v1/{workspace_id}/integrations/{integration_id}/endpoints", {
|
|
2584
|
+
params: {
|
|
2585
|
+
path: { workspace_id: this.workspaceId, integration_id: integrationId2 },
|
|
2586
|
+
query: params
|
|
2587
|
+
}
|
|
2588
|
+
})
|
|
2589
|
+
);
|
|
2590
|
+
}
|
|
2591
|
+
listEndpointsAutoPaging(integrationId2, params) {
|
|
2592
|
+
return this.iteratePaginatedList(
|
|
2593
|
+
(pageParams) => this.listEndpoints(integrationId2, pageParams),
|
|
2594
|
+
params
|
|
2595
|
+
);
|
|
2596
|
+
}
|
|
2597
|
+
/** Get a single endpoint */
|
|
2598
|
+
async getEndpoint(integrationId2, endpointId) {
|
|
2599
|
+
return extractData(
|
|
2600
|
+
await this.client.GET(
|
|
2601
|
+
"/v1/{workspace_id}/integrations/{integration_id}/endpoints/{endpoint_id}",
|
|
2595
2602
|
{
|
|
2596
2603
|
params: {
|
|
2597
2604
|
path: {
|
|
2598
2605
|
workspace_id: this.workspaceId,
|
|
2599
2606
|
integration_id: integrationId2,
|
|
2600
|
-
|
|
2607
|
+
endpoint_id: endpointId
|
|
2608
|
+
}
|
|
2609
|
+
}
|
|
2610
|
+
}
|
|
2611
|
+
)
|
|
2612
|
+
);
|
|
2613
|
+
}
|
|
2614
|
+
/** Add an endpoint to a REST integration */
|
|
2615
|
+
async createEndpoint(integrationId2, body) {
|
|
2616
|
+
return extractData(
|
|
2617
|
+
await this.client.POST("/v1/{workspace_id}/integrations/{integration_id}/endpoints", {
|
|
2618
|
+
params: { path: { workspace_id: this.workspaceId, integration_id: integrationId2 } },
|
|
2619
|
+
body
|
|
2620
|
+
})
|
|
2621
|
+
);
|
|
2622
|
+
}
|
|
2623
|
+
/** Patch an endpoint. The endpoint `name` is immutable. */
|
|
2624
|
+
async updateEndpoint(integrationId2, endpointId, body) {
|
|
2625
|
+
return extractData(
|
|
2626
|
+
await this.client.PATCH(
|
|
2627
|
+
"/v1/{workspace_id}/integrations/{integration_id}/endpoints/{endpoint_id}",
|
|
2628
|
+
{
|
|
2629
|
+
params: {
|
|
2630
|
+
path: {
|
|
2631
|
+
workspace_id: this.workspaceId,
|
|
2632
|
+
integration_id: integrationId2,
|
|
2633
|
+
endpoint_id: endpointId
|
|
2601
2634
|
}
|
|
2602
2635
|
},
|
|
2603
2636
|
body
|
|
@@ -2605,44 +2638,42 @@ var IntegrationsResource = class extends WorkspaceScopedResource {
|
|
|
2605
2638
|
)
|
|
2606
2639
|
);
|
|
2607
2640
|
}
|
|
2641
|
+
/** Delete an endpoint from a REST integration */
|
|
2642
|
+
async deleteEndpoint(integrationId2, endpointId) {
|
|
2643
|
+
await this.client.DELETE(
|
|
2644
|
+
"/v1/{workspace_id}/integrations/{integration_id}/endpoints/{endpoint_id}",
|
|
2645
|
+
{
|
|
2646
|
+
params: {
|
|
2647
|
+
path: {
|
|
2648
|
+
workspace_id: this.workspaceId,
|
|
2649
|
+
integration_id: integrationId2,
|
|
2650
|
+
endpoint_id: endpointId
|
|
2651
|
+
}
|
|
2652
|
+
}
|
|
2653
|
+
}
|
|
2654
|
+
);
|
|
2655
|
+
}
|
|
2608
2656
|
/**
|
|
2609
|
-
*
|
|
2610
|
-
*
|
|
2611
|
-
* mints, JWT signing) and sends a HEAD request to ``base_url`` (REST/FHIR)
|
|
2612
|
-
* or ``mcp_url`` (MCP). Safe on production integrations — HEAD carries no
|
|
2613
|
-
* side effects.
|
|
2614
|
-
*
|
|
2615
|
-
* The most recent probe outcome is persisted on the integration so
|
|
2616
|
-
* subsequent ``get`` / ``list`` responses surface ``last_tested_at`` +
|
|
2617
|
-
* ``last_test_status`` without re-probing.
|
|
2618
|
-
*
|
|
2619
|
-
* @returns ``status`` is one of ``healthy`` / ``auth_failed`` /
|
|
2620
|
-
* ``unreachable`` / ``timeout`` / ``ssl_error`` / ``misconfigured``,
|
|
2621
|
-
* each mapping to a distinct, actionable user message.
|
|
2657
|
+
* Execute an endpoint with test parameters and return the full response
|
|
2658
|
+
* pipeline breakdown. Used by the developer console to validate config.
|
|
2622
2659
|
*/
|
|
2623
|
-
async
|
|
2660
|
+
async testEndpoint(integrationId2, endpointId, body) {
|
|
2624
2661
|
return extractData(
|
|
2625
2662
|
await this.client.POST(
|
|
2626
|
-
"/v1/{workspace_id}/integrations/{integration_id}/test
|
|
2663
|
+
"/v1/{workspace_id}/integrations/{integration_id}/endpoints/{endpoint_id}/test",
|
|
2627
2664
|
{
|
|
2628
2665
|
params: {
|
|
2629
2666
|
path: {
|
|
2630
2667
|
workspace_id: this.workspaceId,
|
|
2631
|
-
integration_id: integrationId2
|
|
2668
|
+
integration_id: integrationId2,
|
|
2669
|
+
endpoint_id: endpointId
|
|
2632
2670
|
}
|
|
2633
|
-
}
|
|
2671
|
+
},
|
|
2672
|
+
body
|
|
2634
2673
|
}
|
|
2635
2674
|
)
|
|
2636
2675
|
);
|
|
2637
2676
|
}
|
|
2638
|
-
/** Check health of all integrations in the workspace */
|
|
2639
|
-
async getHealthCheck() {
|
|
2640
|
-
return extractData(
|
|
2641
|
-
await this.client.GET("/v1/{workspace_id}/integrations/health-check", {
|
|
2642
|
-
params: { path: { workspace_id: this.workspaceId } }
|
|
2643
|
-
})
|
|
2644
|
-
);
|
|
2645
|
-
}
|
|
2646
2677
|
};
|
|
2647
2678
|
|
|
2648
2679
|
// src/resources/analytics.ts
|
|
@@ -3053,19 +3084,6 @@ var SettingsResource = class extends WorkspaceScopedResource {
|
|
|
3053
3084
|
})
|
|
3054
3085
|
)
|
|
3055
3086
|
};
|
|
3056
|
-
behaviors = {
|
|
3057
|
-
get: async () => extractData(
|
|
3058
|
-
await this.client.GET("/v1/{workspace_id}/settings/behaviors", {
|
|
3059
|
-
params: { path: { workspace_id: this.workspaceId } }
|
|
3060
|
-
})
|
|
3061
|
-
),
|
|
3062
|
-
update: async (body) => extractData(
|
|
3063
|
-
await this.client.PUT("/v1/{workspace_id}/settings/behaviors", {
|
|
3064
|
-
params: { path: { workspace_id: this.workspaceId } },
|
|
3065
|
-
body
|
|
3066
|
-
})
|
|
3067
|
-
)
|
|
3068
|
-
};
|
|
3069
3087
|
gapScanner = {
|
|
3070
3088
|
get: async () => extractData(
|
|
3071
3089
|
await this.client.GET("/v1/{workspace_id}/settings/gap-scanner", {
|
|
@@ -3126,19 +3144,6 @@ var SettingsResource = class extends WorkspaceScopedResource {
|
|
|
3126
3144
|
})
|
|
3127
3145
|
)
|
|
3128
3146
|
};
|
|
3129
|
-
workflows = {
|
|
3130
|
-
get: async () => extractData(
|
|
3131
|
-
await this.client.GET("/v1/{workspace_id}/settings/workflows", {
|
|
3132
|
-
params: { path: { workspace_id: this.workspaceId } }
|
|
3133
|
-
})
|
|
3134
|
-
),
|
|
3135
|
-
update: async (body) => extractData(
|
|
3136
|
-
await this.client.PUT("/v1/{workspace_id}/settings/workflows", {
|
|
3137
|
-
params: { path: { workspace_id: this.workspaceId } },
|
|
3138
|
-
body
|
|
3139
|
-
})
|
|
3140
|
-
)
|
|
3141
|
-
};
|
|
3142
3147
|
};
|
|
3143
3148
|
|
|
3144
3149
|
// src/resources/billing.ts
|
|
@@ -3465,74 +3470,6 @@ var AuditResource = class extends WorkspaceScopedResource {
|
|
|
3465
3470
|
}
|
|
3466
3471
|
};
|
|
3467
3472
|
|
|
3468
|
-
// src/resources/webhook-destinations.ts
|
|
3469
|
-
var WebhookDestinationsResource = class extends WorkspaceScopedResource {
|
|
3470
|
-
async list(params) {
|
|
3471
|
-
return extractData(
|
|
3472
|
-
await this.client.GET("/v1/{workspace_id}/webhook-destinations", {
|
|
3473
|
-
params: { path: { workspace_id: this.workspaceId }, query: params }
|
|
3474
|
-
})
|
|
3475
|
-
);
|
|
3476
|
-
}
|
|
3477
|
-
listAutoPaging(params) {
|
|
3478
|
-
return this.iteratePaginatedList((pageParams) => this.list(pageParams), params);
|
|
3479
|
-
}
|
|
3480
|
-
async create(body) {
|
|
3481
|
-
return extractData(
|
|
3482
|
-
await this.client.POST("/v1/{workspace_id}/webhook-destinations", {
|
|
3483
|
-
params: { path: { workspace_id: this.workspaceId } },
|
|
3484
|
-
body
|
|
3485
|
-
})
|
|
3486
|
-
);
|
|
3487
|
-
}
|
|
3488
|
-
async get(destinationId) {
|
|
3489
|
-
return extractData(
|
|
3490
|
-
await this.client.GET("/v1/{workspace_id}/webhook-destinations/{destination_id}", {
|
|
3491
|
-
params: { path: { workspace_id: this.workspaceId, destination_id: destinationId } }
|
|
3492
|
-
})
|
|
3493
|
-
);
|
|
3494
|
-
}
|
|
3495
|
-
async update(destinationId, body) {
|
|
3496
|
-
return extractData(
|
|
3497
|
-
await this.client.PUT("/v1/{workspace_id}/webhook-destinations/{destination_id}", {
|
|
3498
|
-
params: { path: { workspace_id: this.workspaceId, destination_id: destinationId } },
|
|
3499
|
-
body
|
|
3500
|
-
})
|
|
3501
|
-
);
|
|
3502
|
-
}
|
|
3503
|
-
async delete(destinationId) {
|
|
3504
|
-
await this.client.DELETE("/v1/{workspace_id}/webhook-destinations/{destination_id}", {
|
|
3505
|
-
params: { path: { workspace_id: this.workspaceId, destination_id: destinationId } }
|
|
3506
|
-
});
|
|
3507
|
-
}
|
|
3508
|
-
async listDeliveries(destinationId, params) {
|
|
3509
|
-
return extractData(
|
|
3510
|
-
await this.client.GET("/v1/{workspace_id}/webhook-destinations/{destination_id}/deliveries", {
|
|
3511
|
-
params: {
|
|
3512
|
-
path: { workspace_id: this.workspaceId, destination_id: destinationId },
|
|
3513
|
-
query: params
|
|
3514
|
-
}
|
|
3515
|
-
})
|
|
3516
|
-
);
|
|
3517
|
-
}
|
|
3518
|
-
listDeliveriesAutoPaging(destinationId, params) {
|
|
3519
|
-
return this.iteratePaginatedList(
|
|
3520
|
-
(pageParams) => this.listDeliveries(destinationId, pageParams),
|
|
3521
|
-
params
|
|
3522
|
-
);
|
|
3523
|
-
}
|
|
3524
|
-
async rotateSecret(destinationId) {
|
|
3525
|
-
return extractData(
|
|
3526
|
-
await this.client.POST(
|
|
3527
|
-
"/v1/{workspace_id}/webhook-destinations/{destination_id}/rotate-secret",
|
|
3528
|
-
{
|
|
3529
|
-
params: { path: { workspace_id: this.workspaceId, destination_id: destinationId } }
|
|
3530
|
-
}
|
|
3531
|
-
)
|
|
3532
|
-
);
|
|
3533
|
-
}
|
|
3534
|
-
};
|
|
3535
|
-
|
|
3536
3473
|
// src/resources/compliance.ts
|
|
3537
3474
|
var ComplianceResource = class extends WorkspaceScopedResource {
|
|
3538
3475
|
async getDashboard() {
|
|
@@ -4471,14 +4408,6 @@ var FhirResource = class extends WorkspaceScopedResource {
|
|
|
4471
4408
|
})
|
|
4472
4409
|
);
|
|
4473
4410
|
}
|
|
4474
|
-
/** List recent FHIR sync failures (for triage) */
|
|
4475
|
-
async getSyncFailures(params) {
|
|
4476
|
-
return extractData(
|
|
4477
|
-
await this.client.GET("/v1/{workspace_id}/fhir/sync-failures", {
|
|
4478
|
-
params: { path: { workspace_id: this.workspaceId }, query: params }
|
|
4479
|
-
})
|
|
4480
|
-
);
|
|
4481
|
-
}
|
|
4482
4411
|
/** Trigger a FHIR import (full or partial, depending on request) */
|
|
4483
4412
|
async import(body) {
|
|
4484
4413
|
return extractData(
|
|
@@ -4531,34 +4460,28 @@ var FhirResource = class extends WorkspaceScopedResource {
|
|
|
4531
4460
|
),
|
|
4532
4461
|
/** Get a single FHIR resource by type + id */
|
|
4533
4462
|
get: async (resourceType, resourceId) => extractData(
|
|
4534
|
-
await this.client.GET(
|
|
4535
|
-
|
|
4536
|
-
|
|
4537
|
-
|
|
4538
|
-
|
|
4539
|
-
|
|
4540
|
-
resource_type: resourceType,
|
|
4541
|
-
resource_id: resourceId
|
|
4542
|
-
}
|
|
4463
|
+
await this.client.GET("/v1/{workspace_id}/fhir/resources/{resource_type}/{resource_id}", {
|
|
4464
|
+
params: {
|
|
4465
|
+
path: {
|
|
4466
|
+
workspace_id: this.workspaceId,
|
|
4467
|
+
resource_type: resourceType,
|
|
4468
|
+
resource_id: resourceId
|
|
4543
4469
|
}
|
|
4544
4470
|
}
|
|
4545
|
-
)
|
|
4471
|
+
})
|
|
4546
4472
|
),
|
|
4547
4473
|
/** Update a FHIR resource by type + id */
|
|
4548
4474
|
update: async (resourceType, resourceId, body) => extractData(
|
|
4549
|
-
await this.client.PUT(
|
|
4550
|
-
|
|
4551
|
-
|
|
4552
|
-
|
|
4553
|
-
|
|
4554
|
-
|
|
4555
|
-
|
|
4556
|
-
|
|
4557
|
-
|
|
4558
|
-
|
|
4559
|
-
body
|
|
4560
|
-
}
|
|
4561
|
-
)
|
|
4475
|
+
await this.client.PUT("/v1/{workspace_id}/fhir/resources/{resource_type}/{resource_id}", {
|
|
4476
|
+
params: {
|
|
4477
|
+
path: {
|
|
4478
|
+
workspace_id: this.workspaceId,
|
|
4479
|
+
resource_type: resourceType,
|
|
4480
|
+
resource_id: resourceId
|
|
4481
|
+
}
|
|
4482
|
+
},
|
|
4483
|
+
body
|
|
4484
|
+
})
|
|
4562
4485
|
),
|
|
4563
4486
|
/** Get the version history for a FHIR resource */
|
|
4564
4487
|
getHistory: async (resourceType, resourceId) => extractData(
|
|
@@ -5193,6 +5116,53 @@ var WorkspaceDatabaseResource = class extends WorkspaceScopedResource {
|
|
|
5193
5116
|
}
|
|
5194
5117
|
};
|
|
5195
5118
|
|
|
5119
|
+
// src/resources/workspace-data-queries.ts
|
|
5120
|
+
var WorkspaceDataQueriesResource = class extends WorkspaceScopedResource {
|
|
5121
|
+
async list() {
|
|
5122
|
+
return extractData(
|
|
5123
|
+
await this.client.GET("/v1/{workspace_id}/data_queries", {
|
|
5124
|
+
params: { path: { workspace_id: this.workspaceId } }
|
|
5125
|
+
})
|
|
5126
|
+
);
|
|
5127
|
+
}
|
|
5128
|
+
async create(body) {
|
|
5129
|
+
return extractData(
|
|
5130
|
+
await this.client.POST("/v1/{workspace_id}/data_queries", {
|
|
5131
|
+
params: { path: { workspace_id: this.workspaceId } },
|
|
5132
|
+
body
|
|
5133
|
+
})
|
|
5134
|
+
);
|
|
5135
|
+
}
|
|
5136
|
+
async get(queryId) {
|
|
5137
|
+
return extractData(
|
|
5138
|
+
await this.client.GET("/v1/{workspace_id}/data_queries/{query_id}", {
|
|
5139
|
+
params: { path: { workspace_id: this.workspaceId, query_id: queryId } }
|
|
5140
|
+
})
|
|
5141
|
+
);
|
|
5142
|
+
}
|
|
5143
|
+
async update(queryId, body) {
|
|
5144
|
+
return extractData(
|
|
5145
|
+
await this.client.PATCH("/v1/{workspace_id}/data_queries/{query_id}", {
|
|
5146
|
+
params: { path: { workspace_id: this.workspaceId, query_id: queryId } },
|
|
5147
|
+
body
|
|
5148
|
+
})
|
|
5149
|
+
);
|
|
5150
|
+
}
|
|
5151
|
+
async delete(queryId) {
|
|
5152
|
+
await this.client.DELETE("/v1/{workspace_id}/data_queries/{query_id}", {
|
|
5153
|
+
params: { path: { workspace_id: this.workspaceId, query_id: queryId } }
|
|
5154
|
+
});
|
|
5155
|
+
}
|
|
5156
|
+
async invoke(queryId, body = {}) {
|
|
5157
|
+
return extractData(
|
|
5158
|
+
await this.client.POST("/v1/{workspace_id}/data_queries/{query_id}/invoke", {
|
|
5159
|
+
params: { path: { workspace_id: this.workspaceId, query_id: queryId } },
|
|
5160
|
+
body
|
|
5161
|
+
})
|
|
5162
|
+
);
|
|
5163
|
+
}
|
|
5164
|
+
};
|
|
5165
|
+
|
|
5196
5166
|
// src/core/branded-types.ts
|
|
5197
5167
|
var workspaceId = (id) => id;
|
|
5198
5168
|
var apiKeyId = (id) => id;
|
|
@@ -5204,6 +5174,7 @@ var contextGraphId = (id) => id;
|
|
|
5204
5174
|
var callId = (id) => id;
|
|
5205
5175
|
var phoneNumberId = (id) => id;
|
|
5206
5176
|
var integrationId = (id) => id;
|
|
5177
|
+
var integrationEndpointId = (id) => id;
|
|
5207
5178
|
var entityId = (id) => id;
|
|
5208
5179
|
var eventId = (id) => id;
|
|
5209
5180
|
var simulationRunId = (id) => id;
|
|
@@ -5827,6 +5798,7 @@ var AmigoClient = class _AmigoClient {
|
|
|
5827
5798
|
workspaces;
|
|
5828
5799
|
me;
|
|
5829
5800
|
apiKeys;
|
|
5801
|
+
tokens;
|
|
5830
5802
|
agents;
|
|
5831
5803
|
/** @deprecated Use `actions` instead */
|
|
5832
5804
|
skills;
|
|
@@ -5851,7 +5823,6 @@ var AmigoClient = class _AmigoClient {
|
|
|
5851
5823
|
reviewQueue;
|
|
5852
5824
|
recordings;
|
|
5853
5825
|
audit;
|
|
5854
|
-
webhookDestinations;
|
|
5855
5826
|
compliance;
|
|
5856
5827
|
events;
|
|
5857
5828
|
functions;
|
|
@@ -5891,6 +5862,8 @@ var AmigoClient = class _AmigoClient {
|
|
|
5891
5862
|
sessions;
|
|
5892
5863
|
/** Workspace database — Lakebase fork lifecycle, SQL query execution, query tool CRUD */
|
|
5893
5864
|
workspaceDatabase;
|
|
5865
|
+
/** Workspace data queries — Lakebase-backed query tool registry */
|
|
5866
|
+
workspaceDataQueries;
|
|
5894
5867
|
/** @internal — exposed for path-level type inference in GET/POST/PUT/etc. */
|
|
5895
5868
|
api;
|
|
5896
5869
|
constructor(config) {
|
|
@@ -5964,6 +5937,7 @@ var AmigoClient = class _AmigoClient {
|
|
|
5964
5937
|
mutable.workspaces = new WorkspacesResource(client, workspaceId2);
|
|
5965
5938
|
mutable.me = new MeResource(client, "_account");
|
|
5966
5939
|
mutable.apiKeys = new ApiKeysResource(client, workspaceId2);
|
|
5940
|
+
mutable.tokens = new TokensResource(client, "_identity");
|
|
5967
5941
|
mutable.agents = new AgentsResource(client, workspaceId2);
|
|
5968
5942
|
mutable.skills = new SkillsResource(client, workspaceId2);
|
|
5969
5943
|
mutable.actions = new ActionsResource(client, workspaceId2);
|
|
@@ -5987,7 +5961,6 @@ var AmigoClient = class _AmigoClient {
|
|
|
5987
5961
|
mutable.reviewQueue = new ReviewQueueResource(client, workspaceId2);
|
|
5988
5962
|
mutable.recordings = new RecordingsResource(client, workspaceId2);
|
|
5989
5963
|
mutable.audit = new AuditResource(client, workspaceId2);
|
|
5990
|
-
mutable.webhookDestinations = new WebhookDestinationsResource(client, workspaceId2);
|
|
5991
5964
|
mutable.compliance = new ComplianceResource(client, workspaceId2);
|
|
5992
5965
|
mutable.events = new EventsResource(client, workspaceId2);
|
|
5993
5966
|
mutable.functions = new FunctionsResource(client, workspaceId2);
|
|
@@ -6007,6 +5980,7 @@ var AmigoClient = class _AmigoClient {
|
|
|
6007
5980
|
mutable.surfaces = new SurfacesResource(client, workspaceId2);
|
|
6008
5981
|
mutable.sessions = new SessionsResource(client, workspaceId2);
|
|
6009
5982
|
mutable.workspaceDatabase = new WorkspaceDatabaseResource(client, workspaceId2);
|
|
5983
|
+
mutable.workspaceDataQueries = new WorkspaceDataQueriesResource(client, workspaceId2);
|
|
6010
5984
|
}
|
|
6011
5985
|
async resolveApiRequest(path, method, init) {
|
|
6012
5986
|
const { baseClient, options } = resolveScopedPlatformClient(this.api);
|
|
@@ -6076,6 +6050,7 @@ export {
|
|
|
6076
6050
|
ServiceUnavailableError,
|
|
6077
6051
|
SesSetupResource,
|
|
6078
6052
|
TokenManager,
|
|
6053
|
+
TokensResource,
|
|
6079
6054
|
ValidationError,
|
|
6080
6055
|
WebhookVerificationError,
|
|
6081
6056
|
WorkspaceEventStreamError,
|
|
@@ -6094,6 +6069,7 @@ export {
|
|
|
6094
6069
|
formatDeviceCodeLink,
|
|
6095
6070
|
formatWorkspaceList,
|
|
6096
6071
|
functionId,
|
|
6072
|
+
integrationEndpointId,
|
|
6097
6073
|
integrationId,
|
|
6098
6074
|
isAmigoError,
|
|
6099
6075
|
isAuthenticationError,
|