@gpt-platform/client 0.10.4 → 0.11.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/dist/_internal/client/client.gen.d.ts +3 -0
- package/dist/_internal/client/client.gen.d.ts.map +1 -0
- package/dist/_internal/client/index.d.ts +9 -0
- package/dist/_internal/client/index.d.ts.map +1 -0
- package/dist/_internal/client/types.gen.d.ts +118 -0
- package/dist/_internal/client/types.gen.d.ts.map +1 -0
- package/dist/_internal/client/utils.gen.d.ts +34 -0
- package/dist/_internal/client/utils.gen.d.ts.map +1 -0
- package/dist/_internal/client.gen.d.ts +13 -0
- package/dist/_internal/client.gen.d.ts.map +1 -0
- package/dist/_internal/core/auth.gen.d.ts +19 -0
- package/dist/_internal/core/auth.gen.d.ts.map +1 -0
- package/dist/_internal/core/bodySerializer.gen.d.ts +26 -0
- package/dist/_internal/core/bodySerializer.gen.d.ts.map +1 -0
- package/dist/_internal/core/params.gen.d.ts +44 -0
- package/dist/_internal/core/params.gen.d.ts.map +1 -0
- package/dist/_internal/core/pathSerializer.gen.d.ts +34 -0
- package/dist/_internal/core/pathSerializer.gen.d.ts.map +1 -0
- package/dist/_internal/core/queryKeySerializer.gen.d.ts +19 -0
- package/dist/_internal/core/queryKeySerializer.gen.d.ts.map +1 -0
- package/dist/_internal/core/serverSentEvents.gen.d.ts +72 -0
- package/dist/_internal/core/serverSentEvents.gen.d.ts.map +1 -0
- package/dist/_internal/core/types.gen.d.ts +79 -0
- package/dist/_internal/core/types.gen.d.ts.map +1 -0
- package/dist/_internal/core/utils.gen.d.ts +20 -0
- package/dist/_internal/core/utils.gen.d.ts.map +1 -0
- package/dist/_internal/index.d.ts +3 -0
- package/dist/_internal/index.d.ts.map +1 -0
- package/dist/_internal/sdk.gen.d.ts +7053 -0
- package/dist/_internal/sdk.gen.d.ts.map +1 -0
- package/dist/_internal/types.gen.d.ts +146633 -0
- package/dist/_internal/types.gen.d.ts.map +1 -0
- package/dist/base-client.d.ts +199 -0
- package/dist/base-client.d.ts.map +1 -0
- package/dist/errors/index.d.ts +128 -0
- package/dist/errors/index.d.ts.map +1 -0
- package/dist/events.d.ts +69 -0
- package/dist/events.d.ts.map +1 -0
- package/dist/execution-events.d.ts +95 -0
- package/dist/execution-events.d.ts.map +1 -0
- package/dist/gpt-client.d.ts +2175 -0
- package/dist/gpt-client.d.ts.map +1 -0
- package/dist/index.d.ts +51 -30308
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +775 -14
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +775 -14
- package/dist/index.mjs.map +1 -1
- package/dist/json-api.d.ts +26 -0
- package/dist/json-api.d.ts.map +1 -0
- package/dist/logging.d.ts +22 -0
- package/dist/logging.d.ts.map +1 -0
- package/dist/namespace-types.d.ts +79 -0
- package/dist/namespace-types.d.ts.map +1 -0
- package/dist/namespaces/access-grants.d.ts +71 -0
- package/dist/namespaces/access-grants.d.ts.map +1 -0
- package/dist/namespaces/agents.d.ts +1406 -0
- package/dist/namespaces/agents.d.ts.map +1 -0
- package/dist/namespaces/ai.d.ts +407 -0
- package/dist/namespaces/ai.d.ts.map +1 -0
- package/dist/namespaces/audit.d.ts +83 -0
- package/dist/namespaces/audit.d.ts.map +1 -0
- package/dist/namespaces/billing.d.ts +854 -0
- package/dist/namespaces/billing.d.ts.map +1 -0
- package/dist/namespaces/campaigns.d.ts +973 -0
- package/dist/namespaces/campaigns.d.ts.map +1 -0
- package/dist/namespaces/catalog.d.ts +964 -0
- package/dist/namespaces/catalog.d.ts.map +1 -0
- package/dist/namespaces/channels.d.ts +162 -0
- package/dist/namespaces/channels.d.ts.map +1 -0
- package/dist/namespaces/clinical.d.ts +2443 -0
- package/dist/namespaces/clinical.d.ts.map +1 -0
- package/dist/namespaces/communication.d.ts +439 -0
- package/dist/namespaces/communication.d.ts.map +1 -0
- package/dist/namespaces/compliance.d.ts +2310 -0
- package/dist/namespaces/compliance.d.ts.map +1 -0
- package/dist/namespaces/connectors.d.ts +1368 -0
- package/dist/namespaces/connectors.d.ts.map +1 -0
- package/dist/namespaces/content.d.ts +188 -0
- package/dist/namespaces/content.d.ts.map +1 -0
- package/dist/namespaces/crawler.d.ts +408 -0
- package/dist/namespaces/crawler.d.ts.map +1 -0
- package/dist/namespaces/crm-clusters.d.ts +31 -0
- package/dist/namespaces/crm-clusters.d.ts.map +1 -0
- package/dist/namespaces/crm.d.ts +1539 -0
- package/dist/namespaces/crm.d.ts.map +1 -0
- package/dist/namespaces/documents.d.ts +136 -0
- package/dist/namespaces/documents.d.ts.map +1 -0
- package/dist/namespaces/email.d.ts +550 -0
- package/dist/namespaces/email.d.ts.map +1 -0
- package/dist/namespaces/extraction.d.ts +1249 -0
- package/dist/namespaces/extraction.d.ts.map +1 -0
- package/dist/namespaces/identity.d.ts +411 -0
- package/dist/namespaces/identity.d.ts.map +1 -0
- package/dist/namespaces/imports.d.ts +177 -0
- package/dist/namespaces/imports.d.ts.map +1 -0
- package/dist/namespaces/index.d.ts +119 -0
- package/dist/namespaces/index.d.ts.map +1 -0
- package/dist/namespaces/memory.d.ts +105 -0
- package/dist/namespaces/memory.d.ts.map +1 -0
- package/dist/namespaces/models.d.ts +75 -0
- package/dist/namespaces/models.d.ts.map +1 -0
- package/dist/namespaces/permissions.d.ts +75 -0
- package/dist/namespaces/permissions.d.ts.map +1 -0
- package/dist/namespaces/pipeline-executions.d.ts +130 -0
- package/dist/namespaces/pipeline-executions.d.ts.map +1 -0
- package/dist/namespaces/pipelines.d.ts +120 -0
- package/dist/namespaces/pipelines.d.ts.map +1 -0
- package/dist/namespaces/platform.d.ts +1430 -0
- package/dist/namespaces/platform.d.ts.map +1 -0
- package/dist/namespaces/portal.d.ts +198 -0
- package/dist/namespaces/portal.d.ts.map +1 -0
- package/dist/namespaces/projects.d.ts +553 -0
- package/dist/namespaces/projects.d.ts.map +1 -0
- package/dist/namespaces/roles.d.ts +65 -0
- package/dist/namespaces/roles.d.ts.map +1 -0
- package/dist/namespaces/scheduling.d.ts +944 -0
- package/dist/namespaces/scheduling.d.ts.map +1 -0
- package/dist/namespaces/search.d.ts +224 -0
- package/dist/namespaces/search.d.ts.map +1 -0
- package/dist/namespaces/session-notes.d.ts +67 -0
- package/dist/namespaces/session-notes.d.ts.map +1 -0
- package/dist/namespaces/social.d.ts +330 -0
- package/dist/namespaces/social.d.ts.map +1 -0
- package/dist/namespaces/storage.d.ts +378 -0
- package/dist/namespaces/storage.d.ts.map +1 -0
- package/dist/namespaces/support.d.ts +427 -0
- package/dist/namespaces/support.d.ts.map +1 -0
- package/dist/namespaces/threads.d.ts +596 -0
- package/dist/namespaces/threads.d.ts.map +1 -0
- package/dist/namespaces/training.d.ts +358 -0
- package/dist/namespaces/training.d.ts.map +1 -0
- package/dist/namespaces/voice.d.ts +752 -0
- package/dist/namespaces/voice.d.ts.map +1 -0
- package/dist/namespaces/watcher.d.ts +425 -0
- package/dist/namespaces/watcher.d.ts.map +1 -0
- package/dist/namespaces/webhooks-ns.d.ts +3 -0
- package/dist/namespaces/webhooks-ns.d.ts.map +1 -0
- package/dist/pagination.d.ts +57 -0
- package/dist/pagination.d.ts.map +1 -0
- package/dist/request-builder.d.ts +95 -0
- package/dist/request-builder.d.ts.map +1 -0
- package/dist/security.d.ts +32 -0
- package/dist/security.d.ts.map +1 -0
- package/dist/streaming.d.ts +135 -0
- package/dist/streaming.d.ts.map +1 -0
- package/dist/utils/retry.d.ts +63 -0
- package/dist/utils/retry.d.ts.map +1 -0
- package/dist/version.d.ts +5 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/webhook-signature.d.ts +109 -0
- package/dist/webhook-signature.d.ts.map +1 -0
- package/llms.txt +40 -1
- package/package.json +286 -36
- package/dist/index.d.mts +0 -30308
package/dist/index.mjs
CHANGED
|
@@ -1272,7 +1272,7 @@ function buildUserAgent(sdkVersion, appInfo) {
|
|
|
1272
1272
|
}
|
|
1273
1273
|
|
|
1274
1274
|
// src/version.ts
|
|
1275
|
-
var SDK_VERSION = "0.
|
|
1275
|
+
var SDK_VERSION = "0.11.0";
|
|
1276
1276
|
var DEFAULT_API_VERSION = "2026-03-23";
|
|
1277
1277
|
|
|
1278
1278
|
// src/base-client.ts
|
|
@@ -1796,6 +1796,15 @@ var postCatalogTaxonomyNodes = (options) => (options.client ?? client).post({
|
|
|
1796
1796
|
...options.headers
|
|
1797
1797
|
}
|
|
1798
1798
|
});
|
|
1799
|
+
var postConnectorsByIdHealthieAppointmentsSync = (options) => (options.client ?? client).post({
|
|
1800
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1801
|
+
url: "/connectors/{id}/healthie/appointments/sync",
|
|
1802
|
+
...options,
|
|
1803
|
+
headers: {
|
|
1804
|
+
"Content-Type": "application/vnd.api+json",
|
|
1805
|
+
...options.headers
|
|
1806
|
+
}
|
|
1807
|
+
});
|
|
1799
1808
|
var postCampaignsSequenceSteps = (options) => (options.client ?? client).post({
|
|
1800
1809
|
security: [{ scheme: "bearer", type: "http" }],
|
|
1801
1810
|
url: "/campaigns/sequence-steps",
|
|
@@ -2238,6 +2247,11 @@ var getSupportTagsWorkspaceByWorkspaceId = (options) => (options.client ?? clien
|
|
|
2238
2247
|
url: "/support/tags/workspace/{workspace_id}",
|
|
2239
2248
|
...options
|
|
2240
2249
|
});
|
|
2250
|
+
var getClinicalPatientsByIdMedications = (options) => (options.client ?? client).get({
|
|
2251
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2252
|
+
url: "/clinical/patients/{id}/medications",
|
|
2253
|
+
...options
|
|
2254
|
+
});
|
|
2241
2255
|
var getSearchIndexes = (options) => (options.client ?? client).get({
|
|
2242
2256
|
security: [{ scheme: "bearer", type: "http" }],
|
|
2243
2257
|
url: "/search/indexes",
|
|
@@ -2529,6 +2543,15 @@ var getUsersMeDashboard = (options) => (options.client ?? client).get({
|
|
|
2529
2543
|
url: "/users/me/dashboard",
|
|
2530
2544
|
...options
|
|
2531
2545
|
});
|
|
2546
|
+
var postConnectorsByIdHealthiePatientsSync = (options) => (options.client ?? client).post({
|
|
2547
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2548
|
+
url: "/connectors/{id}/healthie/patients/sync",
|
|
2549
|
+
...options,
|
|
2550
|
+
headers: {
|
|
2551
|
+
"Content-Type": "application/vnd.api+json",
|
|
2552
|
+
...options.headers
|
|
2553
|
+
}
|
|
2554
|
+
});
|
|
2532
2555
|
var getBusinessAssociateAgreementsById = (options) => (options.client ?? client).get({
|
|
2533
2556
|
security: [{ scheme: "bearer", type: "http" }],
|
|
2534
2557
|
url: "/business-associate-agreements/{id}",
|
|
@@ -3872,6 +3895,15 @@ var patchEmailInclusionsById = (options) => (options.client ?? client).patch({
|
|
|
3872
3895
|
...options.headers
|
|
3873
3896
|
}
|
|
3874
3897
|
});
|
|
3898
|
+
var postConnectorsByIdHealthieSyncAll = (options) => (options.client ?? client).post({
|
|
3899
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
3900
|
+
url: "/connectors/{id}/healthie/sync-all",
|
|
3901
|
+
...options,
|
|
3902
|
+
headers: {
|
|
3903
|
+
"Content-Type": "application/vnd.api+json",
|
|
3904
|
+
...options.headers
|
|
3905
|
+
}
|
|
3906
|
+
});
|
|
3875
3907
|
var getUsersMe = (options) => (options.client ?? client).get({
|
|
3876
3908
|
security: [{ scheme: "bearer", type: "http" }],
|
|
3877
3909
|
url: "/users/me",
|
|
@@ -5024,6 +5056,11 @@ var getAuditLogs = (options) => (options.client ?? client).get({
|
|
|
5024
5056
|
url: "/audit-logs",
|
|
5025
5057
|
...options
|
|
5026
5058
|
});
|
|
5059
|
+
var getClinicalClientMedicationsArchived = (options) => (options.client ?? client).get({
|
|
5060
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
5061
|
+
url: "/clinical/client-medications/archived",
|
|
5062
|
+
...options
|
|
5063
|
+
});
|
|
5027
5064
|
var getEmailInclusionsEmailByOutboundEmailId = (options) => (options.client ?? client).get({
|
|
5028
5065
|
security: [{ scheme: "bearer", type: "http" }],
|
|
5029
5066
|
url: "/email/inclusions/email/{outbound_email_id}",
|
|
@@ -5576,6 +5613,15 @@ var patchUserProfilesByIdDismissWelcome = (options) => (options.client ?? client
|
|
|
5576
5613
|
...options.headers
|
|
5577
5614
|
}
|
|
5578
5615
|
});
|
|
5616
|
+
var postConnectorsByIdHealthieAppointmentsList = (options) => (options.client ?? client).post({
|
|
5617
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
5618
|
+
url: "/connectors/{id}/healthie/appointments/list",
|
|
5619
|
+
...options,
|
|
5620
|
+
headers: {
|
|
5621
|
+
"Content-Type": "application/vnd.api+json",
|
|
5622
|
+
...options.headers
|
|
5623
|
+
}
|
|
5624
|
+
});
|
|
5579
5625
|
var getClinicalHealthMetrics = (options) => (options.client ?? client).get({
|
|
5580
5626
|
security: [{ scheme: "bearer", type: "http" }],
|
|
5581
5627
|
url: "/clinical/health-metrics",
|
|
@@ -5618,6 +5664,15 @@ var patchApplicationsById = (options) => (options.client ?? client).patch({
|
|
|
5618
5664
|
...options.headers
|
|
5619
5665
|
}
|
|
5620
5666
|
});
|
|
5667
|
+
var patchClinicalClientMedicationsByIdRestore = (options) => (options.client ?? client).patch({
|
|
5668
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
5669
|
+
url: "/clinical/client-medications/{id}/restore",
|
|
5670
|
+
...options,
|
|
5671
|
+
headers: {
|
|
5672
|
+
"Content-Type": "application/vnd.api+json",
|
|
5673
|
+
...options.headers
|
|
5674
|
+
}
|
|
5675
|
+
});
|
|
5621
5676
|
var patchEmailOutboundEmailsByIdSchedule = (options) => (options.client ?? client).patch({
|
|
5622
5677
|
security: [{ scheme: "bearer", type: "http" }],
|
|
5623
5678
|
url: "/email/outbound-emails/{id}/schedule",
|
|
@@ -6167,6 +6222,15 @@ var postAiEmbed = (options) => (options.client ?? client).post({
|
|
|
6167
6222
|
...options.headers
|
|
6168
6223
|
}
|
|
6169
6224
|
});
|
|
6225
|
+
var postConnectorsByIdHealthiePatientsList = (options) => (options.client ?? client).post({
|
|
6226
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
6227
|
+
url: "/connectors/{id}/healthie/patients/list",
|
|
6228
|
+
...options,
|
|
6229
|
+
headers: {
|
|
6230
|
+
"Content-Type": "application/vnd.api+json",
|
|
6231
|
+
...options.headers
|
|
6232
|
+
}
|
|
6233
|
+
});
|
|
6170
6234
|
var patchConsentRecordsByIdWithdraw = (options) => (options.client ?? client).patch({
|
|
6171
6235
|
security: [{ scheme: "bearer", type: "http" }],
|
|
6172
6236
|
url: "/consent-records/{id}/withdraw",
|
|
@@ -6252,6 +6316,11 @@ var getScanResultsById = (options) => (options.client ?? client).get({
|
|
|
6252
6316
|
url: "/scan-results/{id}",
|
|
6253
6317
|
...options
|
|
6254
6318
|
});
|
|
6319
|
+
var getConnectorsByIdHealthieStatus = (options) => (options.client ?? client).get({
|
|
6320
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
6321
|
+
url: "/connectors/{id}/healthie/status",
|
|
6322
|
+
...options
|
|
6323
|
+
});
|
|
6255
6324
|
var getPolicyReviewSchedules = (options) => (options.client ?? client).get({
|
|
6256
6325
|
security: [{ scheme: "bearer", type: "http" }],
|
|
6257
6326
|
url: "/policy-review-schedules",
|
|
@@ -6362,6 +6431,15 @@ var postContentRewriteTone = (options) => (options.client ?? client).post({
|
|
|
6362
6431
|
...options.headers
|
|
6363
6432
|
}
|
|
6364
6433
|
});
|
|
6434
|
+
var patchClinicalClientMedicationsByIdArchive = (options) => (options.client ?? client).patch({
|
|
6435
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
6436
|
+
url: "/clinical/client-medications/{id}/archive",
|
|
6437
|
+
...options,
|
|
6438
|
+
headers: {
|
|
6439
|
+
"Content-Type": "application/vnd.api+json",
|
|
6440
|
+
...options.headers
|
|
6441
|
+
}
|
|
6442
|
+
});
|
|
6365
6443
|
var patchStorageFilesByIdSoftDelete = (options) => (options.client ?? client).patch({
|
|
6366
6444
|
security: [{ scheme: "bearer", type: "http" }],
|
|
6367
6445
|
url: "/storage-files/{id}/soft-delete",
|
|
@@ -6674,6 +6752,20 @@ var getPlans = (options) => (options.client ?? client).get({
|
|
|
6674
6752
|
url: "/plans",
|
|
6675
6753
|
...options
|
|
6676
6754
|
});
|
|
6755
|
+
var getClinicalClientMedications = (options) => (options.client ?? client).get({
|
|
6756
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
6757
|
+
url: "/clinical/client-medications",
|
|
6758
|
+
...options
|
|
6759
|
+
});
|
|
6760
|
+
var postClinicalClientMedications = (options) => (options.client ?? client).post({
|
|
6761
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
6762
|
+
url: "/clinical/client-medications",
|
|
6763
|
+
...options,
|
|
6764
|
+
headers: {
|
|
6765
|
+
"Content-Type": "application/vnd.api+json",
|
|
6766
|
+
...options.headers
|
|
6767
|
+
}
|
|
6768
|
+
});
|
|
6677
6769
|
var postCrmActivities = (options) => (options.client ?? client).post({
|
|
6678
6770
|
security: [{ scheme: "bearer", type: "http" }],
|
|
6679
6771
|
url: "/crm/activities",
|
|
@@ -6771,6 +6863,20 @@ var patchSchedulingParticipantsByIdRespond = (options) => (options.client ?? cli
|
|
|
6771
6863
|
...options.headers
|
|
6772
6864
|
}
|
|
6773
6865
|
});
|
|
6866
|
+
var getClinicalClientMedicationsById = (options) => (options.client ?? client).get({
|
|
6867
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
6868
|
+
url: "/clinical/client-medications/{id}",
|
|
6869
|
+
...options
|
|
6870
|
+
});
|
|
6871
|
+
var patchClinicalClientMedicationsById = (options) => (options.client ?? client).patch({
|
|
6872
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
6873
|
+
url: "/clinical/client-medications/{id}",
|
|
6874
|
+
...options,
|
|
6875
|
+
headers: {
|
|
6876
|
+
"Content-Type": "application/vnd.api+json",
|
|
6877
|
+
...options.headers
|
|
6878
|
+
}
|
|
6879
|
+
});
|
|
6774
6880
|
var postAgentsByIdTest = (options) => (options.client ?? client).post({
|
|
6775
6881
|
security: [{ scheme: "bearer", type: "http" }],
|
|
6776
6882
|
url: "/agents/{id}/test",
|
|
@@ -7197,6 +7303,11 @@ var postEmailInclusions = (options) => (options.client ?? client).post({
|
|
|
7197
7303
|
...options.headers
|
|
7198
7304
|
}
|
|
7199
7305
|
});
|
|
7306
|
+
var deleteClinicalClientMedicationsByIdPermanent = (options) => (options.client ?? client).delete({
|
|
7307
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
7308
|
+
url: "/clinical/client-medications/{id}/permanent",
|
|
7309
|
+
...options
|
|
7310
|
+
});
|
|
7200
7311
|
var getAccessLogs = (options) => (options.client ?? client).get({
|
|
7201
7312
|
security: [{ scheme: "bearer", type: "http" }],
|
|
7202
7313
|
url: "/access-logs",
|
|
@@ -12543,6 +12654,18 @@ function createClinicalNamespace(rb) {
|
|
|
12543
12654
|
{ path: { id: patientId } },
|
|
12544
12655
|
options
|
|
12545
12656
|
),
|
|
12657
|
+
/**
|
|
12658
|
+
* List medications for a patient (related resource).
|
|
12659
|
+
*
|
|
12660
|
+
* @param patientId - Patient UUID or CRM Contact UUID
|
|
12661
|
+
* @param options - Request options
|
|
12662
|
+
* @returns Array of {@link ClinicalClientMedication} records
|
|
12663
|
+
*/
|
|
12664
|
+
medications: async (patientId, options) => rb.execute(
|
|
12665
|
+
getClinicalPatientsByIdMedications,
|
|
12666
|
+
{ path: { id: patientId } },
|
|
12667
|
+
options
|
|
12668
|
+
),
|
|
12546
12669
|
/**
|
|
12547
12670
|
* List resource assignments for a patient (related resource).
|
|
12548
12671
|
*
|
|
@@ -13573,6 +13696,163 @@ function createClinicalNamespace(rb) {
|
|
|
13573
13696
|
*/
|
|
13574
13697
|
bulkCreate: async (attrs, options) => rb.rawPost(`/clinical/client-supplements/bulk`, { data: attrs }, options).then((r) => r.data)
|
|
13575
13698
|
},
|
|
13699
|
+
/**
|
|
13700
|
+
* Manage medication prescriptions for clinical patients.
|
|
13701
|
+
*/
|
|
13702
|
+
clientMedications: {
|
|
13703
|
+
/**
|
|
13704
|
+
* List medication prescriptions, filtered by patient/workspace.
|
|
13705
|
+
*
|
|
13706
|
+
* @param params - Filter/pagination parameters
|
|
13707
|
+
* @param options - Request options
|
|
13708
|
+
* @returns Array of {@link ClinicalClientMedication} records
|
|
13709
|
+
*/
|
|
13710
|
+
list: async (params, options) => rb.execute(
|
|
13711
|
+
getClinicalClientMedications,
|
|
13712
|
+
{ query: params ?? {} },
|
|
13713
|
+
options
|
|
13714
|
+
),
|
|
13715
|
+
/**
|
|
13716
|
+
* Get a single medication prescription by ID.
|
|
13717
|
+
*
|
|
13718
|
+
* @param id - ClientMedication UUID
|
|
13719
|
+
* @param options - Request options
|
|
13720
|
+
* @returns {@link ClinicalClientMedication} record
|
|
13721
|
+
*/
|
|
13722
|
+
get: async (id, options) => rb.execute(
|
|
13723
|
+
getClinicalClientMedicationsById,
|
|
13724
|
+
{ path: { id } },
|
|
13725
|
+
options
|
|
13726
|
+
),
|
|
13727
|
+
/**
|
|
13728
|
+
* Create a new medication prescription.
|
|
13729
|
+
*
|
|
13730
|
+
* @param attributes - Medication creation attributes. Must include `workspace_id`,
|
|
13731
|
+
* `patient_id`, and `name`.
|
|
13732
|
+
* @param options - Request options
|
|
13733
|
+
* @returns Created {@link ClinicalClientMedication} record
|
|
13734
|
+
*/
|
|
13735
|
+
create: async (attributes, options) => rb.execute(
|
|
13736
|
+
postClinicalClientMedications,
|
|
13737
|
+
{
|
|
13738
|
+
body: { data: { type: "clinical-client-medication", attributes } }
|
|
13739
|
+
},
|
|
13740
|
+
options
|
|
13741
|
+
),
|
|
13742
|
+
/**
|
|
13743
|
+
* Update a medication prescription.
|
|
13744
|
+
*
|
|
13745
|
+
* @param id - ClientMedication UUID
|
|
13746
|
+
* @param attributes - Fields to update (PATCH semantics)
|
|
13747
|
+
* @param options - Request options
|
|
13748
|
+
* @returns Updated {@link ClinicalClientMedication} record
|
|
13749
|
+
*/
|
|
13750
|
+
update: async (id, attributes, options) => rb.execute(
|
|
13751
|
+
patchClinicalClientMedicationsById,
|
|
13752
|
+
{
|
|
13753
|
+
path: { id },
|
|
13754
|
+
body: {
|
|
13755
|
+
data: { type: "clinical-client-medication", id, attributes }
|
|
13756
|
+
}
|
|
13757
|
+
},
|
|
13758
|
+
options
|
|
13759
|
+
),
|
|
13760
|
+
/**
|
|
13761
|
+
* Delete (archive) a medication prescription.
|
|
13762
|
+
*
|
|
13763
|
+
* @deprecated Use {@link archive} instead.
|
|
13764
|
+
* @param id - ClientMedication UUID
|
|
13765
|
+
* @param options - Request options
|
|
13766
|
+
* @returns Archived {@link ClinicalClientMedication} record
|
|
13767
|
+
*/
|
|
13768
|
+
delete: async (id, options) => rb.execute(
|
|
13769
|
+
patchClinicalClientMedicationsByIdArchive,
|
|
13770
|
+
{
|
|
13771
|
+
path: { id },
|
|
13772
|
+
body: {
|
|
13773
|
+
data: { type: "clinical-client-medication", id, attributes: {} }
|
|
13774
|
+
}
|
|
13775
|
+
},
|
|
13776
|
+
options
|
|
13777
|
+
),
|
|
13778
|
+
/**
|
|
13779
|
+
* Archive (soft-delete) a medication prescription.
|
|
13780
|
+
*
|
|
13781
|
+
* @param id - ClientMedication UUID
|
|
13782
|
+
* @param options - Request options
|
|
13783
|
+
* @returns Archived {@link ClinicalClientMedication} record
|
|
13784
|
+
*/
|
|
13785
|
+
archive: async (id, options) => rb.execute(
|
|
13786
|
+
patchClinicalClientMedicationsByIdArchive,
|
|
13787
|
+
{
|
|
13788
|
+
path: { id },
|
|
13789
|
+
body: {
|
|
13790
|
+
data: { type: "clinical-client-medication", id, attributes: {} }
|
|
13791
|
+
}
|
|
13792
|
+
},
|
|
13793
|
+
options
|
|
13794
|
+
),
|
|
13795
|
+
/**
|
|
13796
|
+
* Restore an archived medication prescription.
|
|
13797
|
+
*
|
|
13798
|
+
* @param id - ClientMedication UUID
|
|
13799
|
+
* @param options - Request options
|
|
13800
|
+
* @returns Restored {@link ClinicalClientMedication} record
|
|
13801
|
+
*/
|
|
13802
|
+
restore: async (id, options) => rb.execute(
|
|
13803
|
+
patchClinicalClientMedicationsByIdRestore,
|
|
13804
|
+
{
|
|
13805
|
+
path: { id },
|
|
13806
|
+
body: {
|
|
13807
|
+
data: { type: "clinical-client-medication", id, attributes: {} }
|
|
13808
|
+
}
|
|
13809
|
+
},
|
|
13810
|
+
options
|
|
13811
|
+
),
|
|
13812
|
+
/**
|
|
13813
|
+
* Permanently delete a medication prescription. Irreversible.
|
|
13814
|
+
*
|
|
13815
|
+
* @param id - ClientMedication UUID
|
|
13816
|
+
* @param options - Request options
|
|
13817
|
+
* @returns `true` on success
|
|
13818
|
+
*/
|
|
13819
|
+
permanentDelete: async (id, options) => rb.executeDelete(
|
|
13820
|
+
deleteClinicalClientMedicationsByIdPermanent,
|
|
13821
|
+
{ path: { id } },
|
|
13822
|
+
options
|
|
13823
|
+
),
|
|
13824
|
+
/**
|
|
13825
|
+
* List archived (soft-deleted) medication prescriptions.
|
|
13826
|
+
*
|
|
13827
|
+
* @param params - Filter/pagination parameters
|
|
13828
|
+
* @param options - Request options
|
|
13829
|
+
* @returns Array of archived {@link ClinicalClientMedication} records
|
|
13830
|
+
*/
|
|
13831
|
+
listArchived: async (params, options) => rb.execute(
|
|
13832
|
+
getClinicalClientMedicationsArchived,
|
|
13833
|
+
{ query: params ?? {} },
|
|
13834
|
+
options
|
|
13835
|
+
),
|
|
13836
|
+
/**
|
|
13837
|
+
* Create multiple medications in a single request.
|
|
13838
|
+
*
|
|
13839
|
+
* @param attrs - Bulk creation attributes with workspace_id and medications array
|
|
13840
|
+
* @param options - Request options
|
|
13841
|
+
* @returns Array of creation results with id and status per medication
|
|
13842
|
+
*
|
|
13843
|
+
* @example
|
|
13844
|
+
* ```typescript
|
|
13845
|
+
* const results = await client.clinical.clientMedications.bulkCreate({
|
|
13846
|
+
* workspace_id: 'ws_123',
|
|
13847
|
+
* medications: [
|
|
13848
|
+
* { patient_id: 'pat_1', name: 'Metformin', source: 'ehr_import' },
|
|
13849
|
+
* { patient_id: 'pat_1', name: 'Lisinopril', source: 'ehr_import' },
|
|
13850
|
+
* ],
|
|
13851
|
+
* });
|
|
13852
|
+
* ```
|
|
13853
|
+
*/
|
|
13854
|
+
bulkCreate: async (attrs, options) => rb.rawPost(`/clinical/client-medications/bulk`, { data: attrs }, options).then((r) => r.data)
|
|
13855
|
+
},
|
|
13576
13856
|
/**
|
|
13577
13857
|
* Manage clinical deliveries (care plan items sent to patients).
|
|
13578
13858
|
*/
|
|
@@ -19607,6 +19887,238 @@ function createConnectorsNamespace(rb) {
|
|
|
19607
19887
|
},
|
|
19608
19888
|
options
|
|
19609
19889
|
)
|
|
19890
|
+
},
|
|
19891
|
+
/**
|
|
19892
|
+
* Healthie EHR connector — patient and appointment sync.
|
|
19893
|
+
*
|
|
19894
|
+
* Provides typed methods for listing and syncing patient records and appointments
|
|
19895
|
+
* from Healthie EHR. Requires an active `ConnectorInstance` with `connector_type:
|
|
19896
|
+
* "healthie"` and a linked OAuth `Credential`.
|
|
19897
|
+
*
|
|
19898
|
+
* Typical flow:
|
|
19899
|
+
* 1. Authorize via OAuth using `oauth.connect('healthie', workspaceId)`.
|
|
19900
|
+
* 2. Check sync status with `healthie.getStatus(connectorId, workspaceId)`.
|
|
19901
|
+
* 3. List patients or appointments, optionally filtering by date.
|
|
19902
|
+
* 4. Trigger incremental or full syncs as needed.
|
|
19903
|
+
*/
|
|
19904
|
+
healthie: {
|
|
19905
|
+
/**
|
|
19906
|
+
* List patient records from Healthie EHR.
|
|
19907
|
+
*
|
|
19908
|
+
* Returns all patients from the Healthie account linked to the connector.
|
|
19909
|
+
* Optionally filter by `since` date to only get patients modified since
|
|
19910
|
+
* a given timestamp.
|
|
19911
|
+
*
|
|
19912
|
+
* @param connectorId - UUID of the Healthie `ConnectorInstance`.
|
|
19913
|
+
* @param workspaceId - UUID of the current workspace.
|
|
19914
|
+
* @param options - Optional list parameters including `since` (Date) filter.
|
|
19915
|
+
* @param requestOptions - Optional request options.
|
|
19916
|
+
* @returns An array of `HealthiePatient` records.
|
|
19917
|
+
*
|
|
19918
|
+
* @example
|
|
19919
|
+
* ```typescript
|
|
19920
|
+
* const client = new GptClient({ apiKey: 'sk_app_...' });
|
|
19921
|
+
* const patients = await client.connectors.healthie.listPatients(
|
|
19922
|
+
* 'ci_healthie_123',
|
|
19923
|
+
* 'ws_abc123',
|
|
19924
|
+
* { since: new Date('2025-01-01') },
|
|
19925
|
+
* );
|
|
19926
|
+
* patients.forEach(p => console.log(p.first_name, p.last_name));
|
|
19927
|
+
* ```
|
|
19928
|
+
*/
|
|
19929
|
+
listPatients: async (connectorId, workspaceId, options) => {
|
|
19930
|
+
const { since, ...requestOptions } = options || {};
|
|
19931
|
+
return rb.execute(
|
|
19932
|
+
postConnectorsByIdHealthiePatientsList,
|
|
19933
|
+
{
|
|
19934
|
+
path: { id: connectorId },
|
|
19935
|
+
body: {
|
|
19936
|
+
data: {
|
|
19937
|
+
connector_id: connectorId,
|
|
19938
|
+
workspace_id: workspaceId,
|
|
19939
|
+
...since ? { since: since.toISOString() } : {}
|
|
19940
|
+
}
|
|
19941
|
+
}
|
|
19942
|
+
},
|
|
19943
|
+
Object.keys(requestOptions).length > 0 ? requestOptions : void 0
|
|
19944
|
+
);
|
|
19945
|
+
},
|
|
19946
|
+
/**
|
|
19947
|
+
* Trigger a patient sync from Healthie EHR.
|
|
19948
|
+
*
|
|
19949
|
+
* Fetches patient records from Healthie and updates the local cache.
|
|
19950
|
+
* Returns a summary of sync statistics.
|
|
19951
|
+
*
|
|
19952
|
+
* @param connectorId - UUID of the Healthie `ConnectorInstance`.
|
|
19953
|
+
* @param workspaceId - UUID of the current workspace.
|
|
19954
|
+
* @param requestOptions - Optional request options.
|
|
19955
|
+
* @returns A `HealthieSyncResult` with sync count and any errors.
|
|
19956
|
+
*
|
|
19957
|
+
* @example
|
|
19958
|
+
* ```typescript
|
|
19959
|
+
* const client = new GptClient({ apiKey: 'sk_app_...' });
|
|
19960
|
+
* const result = await client.connectors.healthie.syncPatients(
|
|
19961
|
+
* 'ci_healthie_123',
|
|
19962
|
+
* 'ws_abc123',
|
|
19963
|
+
* );
|
|
19964
|
+
* console.log(`Synced ${result.synced} patients`);
|
|
19965
|
+
* ```
|
|
19966
|
+
*/
|
|
19967
|
+
syncPatients: async (connectorId, workspaceId, requestOptions) => rb.execute(
|
|
19968
|
+
postConnectorsByIdHealthiePatientsSync,
|
|
19969
|
+
{
|
|
19970
|
+
path: { id: connectorId },
|
|
19971
|
+
body: {
|
|
19972
|
+
data: {
|
|
19973
|
+
connector_id: connectorId,
|
|
19974
|
+
workspace_id: workspaceId
|
|
19975
|
+
}
|
|
19976
|
+
}
|
|
19977
|
+
},
|
|
19978
|
+
requestOptions
|
|
19979
|
+
),
|
|
19980
|
+
/**
|
|
19981
|
+
* List appointment records from Healthie EHR.
|
|
19982
|
+
*
|
|
19983
|
+
* Returns all appointments from the Healthie account linked to the connector.
|
|
19984
|
+
* Optionally filter by `since` date to only get appointments modified since
|
|
19985
|
+
* a given timestamp.
|
|
19986
|
+
*
|
|
19987
|
+
* @param connectorId - UUID of the Healthie `ConnectorInstance`.
|
|
19988
|
+
* @param workspaceId - UUID of the current workspace.
|
|
19989
|
+
* @param options - Optional list parameters including `since` (Date) filter.
|
|
19990
|
+
* @param requestOptions - Optional request options.
|
|
19991
|
+
* @returns An array of `HealthieAppointment` records.
|
|
19992
|
+
*
|
|
19993
|
+
* @example
|
|
19994
|
+
* ```typescript
|
|
19995
|
+
* const client = new GptClient({ apiKey: 'sk_app_...' });
|
|
19996
|
+
* const appointments = await client.connectors.healthie.listAppointments(
|
|
19997
|
+
* 'ci_healthie_123',
|
|
19998
|
+
* 'ws_abc123',
|
|
19999
|
+
* { since: new Date('2025-01-01') },
|
|
20000
|
+
* );
|
|
20001
|
+
* appointments.forEach(a => console.log(a.date, a.status));
|
|
20002
|
+
* ```
|
|
20003
|
+
*/
|
|
20004
|
+
listAppointments: async (connectorId, workspaceId, options) => {
|
|
20005
|
+
const { since, ...requestOptions } = options || {};
|
|
20006
|
+
return rb.execute(
|
|
20007
|
+
postConnectorsByIdHealthieAppointmentsList,
|
|
20008
|
+
{
|
|
20009
|
+
path: { id: connectorId },
|
|
20010
|
+
body: {
|
|
20011
|
+
data: {
|
|
20012
|
+
connector_id: connectorId,
|
|
20013
|
+
workspace_id: workspaceId,
|
|
20014
|
+
...since ? { since: since.toISOString() } : {}
|
|
20015
|
+
}
|
|
20016
|
+
}
|
|
20017
|
+
},
|
|
20018
|
+
Object.keys(requestOptions).length > 0 ? requestOptions : void 0
|
|
20019
|
+
);
|
|
20020
|
+
},
|
|
20021
|
+
/**
|
|
20022
|
+
* Trigger an appointment sync from Healthie EHR.
|
|
20023
|
+
*
|
|
20024
|
+
* Fetches appointment records from Healthie and updates the local cache.
|
|
20025
|
+
* Returns a summary of sync statistics.
|
|
20026
|
+
*
|
|
20027
|
+
* @param connectorId - UUID of the Healthie `ConnectorInstance`.
|
|
20028
|
+
* @param workspaceId - UUID of the current workspace.
|
|
20029
|
+
* @param requestOptions - Optional request options.
|
|
20030
|
+
* @returns A `HealthieSyncResult` with sync count and any errors.
|
|
20031
|
+
*
|
|
20032
|
+
* @example
|
|
20033
|
+
* ```typescript
|
|
20034
|
+
* const client = new GptClient({ apiKey: 'sk_app_...' });
|
|
20035
|
+
* const result = await client.connectors.healthie.syncAppointments(
|
|
20036
|
+
* 'ci_healthie_123',
|
|
20037
|
+
* 'ws_abc123',
|
|
20038
|
+
* );
|
|
20039
|
+
* console.log(`Synced ${result.synced} appointments`);
|
|
20040
|
+
* ```
|
|
20041
|
+
*/
|
|
20042
|
+
syncAppointments: async (connectorId, workspaceId, requestOptions) => rb.execute(
|
|
20043
|
+
postConnectorsByIdHealthieAppointmentsSync,
|
|
20044
|
+
{
|
|
20045
|
+
path: { id: connectorId },
|
|
20046
|
+
body: {
|
|
20047
|
+
data: {
|
|
20048
|
+
connector_id: connectorId,
|
|
20049
|
+
workspace_id: workspaceId
|
|
20050
|
+
}
|
|
20051
|
+
}
|
|
20052
|
+
},
|
|
20053
|
+
requestOptions
|
|
20054
|
+
),
|
|
20055
|
+
/**
|
|
20056
|
+
* Trigger a full sync of both patients and appointments from Healthie EHR.
|
|
20057
|
+
*
|
|
20058
|
+
* Fetches all patient and appointment records from Healthie and updates
|
|
20059
|
+
* the local cache. Returns a summary of sync statistics for both types.
|
|
20060
|
+
*
|
|
20061
|
+
* @param connectorId - UUID of the Healthie `ConnectorInstance`.
|
|
20062
|
+
* @param workspaceId - UUID of the current workspace.
|
|
20063
|
+
* @param requestOptions - Optional request options.
|
|
20064
|
+
* @returns A `HealthieSyncAllResult` with patient and appointment sync counts.
|
|
20065
|
+
*
|
|
20066
|
+
* @example
|
|
20067
|
+
* ```typescript
|
|
20068
|
+
* const client = new GptClient({ apiKey: 'sk_app_...' });
|
|
20069
|
+
* const result = await client.connectors.healthie.syncAll(
|
|
20070
|
+
* 'ci_healthie_123',
|
|
20071
|
+
* 'ws_abc123',
|
|
20072
|
+
* );
|
|
20073
|
+
* console.log(`Synced ${result.patients_synced} patients, ${result.appointments_synced} appointments`);
|
|
20074
|
+
* ```
|
|
20075
|
+
*/
|
|
20076
|
+
syncAll: async (connectorId, workspaceId, requestOptions) => rb.execute(
|
|
20077
|
+
postConnectorsByIdHealthieSyncAll,
|
|
20078
|
+
{
|
|
20079
|
+
path: { id: connectorId },
|
|
20080
|
+
body: {
|
|
20081
|
+
data: {
|
|
20082
|
+
connector_id: connectorId,
|
|
20083
|
+
workspace_id: workspaceId
|
|
20084
|
+
}
|
|
20085
|
+
}
|
|
20086
|
+
},
|
|
20087
|
+
requestOptions
|
|
20088
|
+
),
|
|
20089
|
+
/**
|
|
20090
|
+
* Get the current sync status for the Healthie connector.
|
|
20091
|
+
*
|
|
20092
|
+
* Returns summary statistics about the last sync, including patient
|
|
20093
|
+
* and appointment counts, last sync timestamp, and any errors.
|
|
20094
|
+
*
|
|
20095
|
+
* @param connectorId - UUID of the Healthie `ConnectorInstance`.
|
|
20096
|
+
* @param workspaceId - UUID of the current workspace.
|
|
20097
|
+
* @param requestOptions - Optional request options.
|
|
20098
|
+
* @returns A `HealthieSyncStatus` object with sync statistics.
|
|
20099
|
+
*
|
|
20100
|
+
* @example
|
|
20101
|
+
* ```typescript
|
|
20102
|
+
* const client = new GptClient({ apiKey: 'sk_app_...' });
|
|
20103
|
+
* const status = await client.connectors.healthie.getStatus(
|
|
20104
|
+
* 'ci_healthie_123',
|
|
20105
|
+
* 'ws_abc123',
|
|
20106
|
+
* );
|
|
20107
|
+
* console.log(`Last synced: ${status.last_synced_at}`);
|
|
20108
|
+
* console.log(`Patients: ${status.patient_count}, Appointments: ${status.appointment_count}`);
|
|
20109
|
+
* ```
|
|
20110
|
+
*/
|
|
20111
|
+
getStatus: async (connectorId, workspaceId, requestOptions) => rb.execute(
|
|
20112
|
+
getConnectorsByIdHealthieStatus,
|
|
20113
|
+
{
|
|
20114
|
+
path: { id: connectorId },
|
|
20115
|
+
query: {
|
|
20116
|
+
connector_id: connectorId,
|
|
20117
|
+
workspace_id: workspaceId
|
|
20118
|
+
}
|
|
20119
|
+
},
|
|
20120
|
+
requestOptions
|
|
20121
|
+
)
|
|
19610
20122
|
}
|
|
19611
20123
|
};
|
|
19612
20124
|
}
|
|
@@ -33407,7 +33919,7 @@ function createSocialNamespace(rb) {
|
|
|
33407
33919
|
},
|
|
33408
33920
|
/** Generate AI master copy from the campaign's content brief. */
|
|
33409
33921
|
generateMasterCopy: async (id, workspaceId, options) => {
|
|
33410
|
-
return rb.
|
|
33922
|
+
return rb.executeDirect(
|
|
33411
33923
|
postSocialCampaignsByIdGenerateMasterCopy,
|
|
33412
33924
|
{
|
|
33413
33925
|
path: { id },
|
|
@@ -33423,7 +33935,7 @@ function createSocialNamespace(rb) {
|
|
|
33423
33935
|
},
|
|
33424
33936
|
/** Adapt master copy for target platforms and create SocialPost drafts. */
|
|
33425
33937
|
adaptForPlatforms: async (id, workspaceId, socialAccountId, options) => {
|
|
33426
|
-
return rb.
|
|
33938
|
+
return rb.executeDirect(
|
|
33427
33939
|
postSocialCampaignsByIdAdaptForPlatforms,
|
|
33428
33940
|
{
|
|
33429
33941
|
path: { id },
|
|
@@ -33450,7 +33962,7 @@ function createSocialNamespace(rb) {
|
|
|
33450
33962
|
* @returns `{ adaptations: [{ platform: string, content: string }] }`
|
|
33451
33963
|
*/
|
|
33452
33964
|
previewAdaptations: async (id, workspaceId, options) => {
|
|
33453
|
-
return rb.
|
|
33965
|
+
return rb.executeDirect(
|
|
33454
33966
|
postSocialCampaignsByIdPreviewAdaptations,
|
|
33455
33967
|
{
|
|
33456
33968
|
path: { id },
|
|
@@ -33738,28 +34250,251 @@ function createCrmClustersNamespace(rb) {
|
|
|
33738
34250
|
};
|
|
33739
34251
|
}
|
|
33740
34252
|
|
|
34253
|
+
// src/namespaces/pipeline-executions.ts
|
|
34254
|
+
function createPipelineExecutionsNamespace(rb) {
|
|
34255
|
+
return {
|
|
34256
|
+
/**
|
|
34257
|
+
* Get a pipeline execution by ID.
|
|
34258
|
+
*
|
|
34259
|
+
* @param id - Execution UUID.
|
|
34260
|
+
* @param options - Optional request options.
|
|
34261
|
+
* @returns PipelineExecution resource.
|
|
34262
|
+
*/
|
|
34263
|
+
async get(id, options) {
|
|
34264
|
+
return rb.rawGet(
|
|
34265
|
+
`/pipeline-executions/${id}`,
|
|
34266
|
+
options
|
|
34267
|
+
);
|
|
34268
|
+
},
|
|
34269
|
+
/**
|
|
34270
|
+
* List pipeline executions for a workspace.
|
|
34271
|
+
*
|
|
34272
|
+
* @param workspaceId - Workspace UUID to filter by.
|
|
34273
|
+
* @param filters - Optional filters (status, pipeline_id).
|
|
34274
|
+
* @param options - Optional request options.
|
|
34275
|
+
* @returns Array of PipelineExecution resources.
|
|
34276
|
+
*/
|
|
34277
|
+
async list(workspaceId, filters, options) {
|
|
34278
|
+
const params = new URLSearchParams({ workspace_id: workspaceId });
|
|
34279
|
+
if (filters?.status) params.set("filter[status]", filters.status);
|
|
34280
|
+
if (filters?.pipeline_id)
|
|
34281
|
+
params.set("filter[pipeline_id]", filters.pipeline_id);
|
|
34282
|
+
return rb.rawGet(
|
|
34283
|
+
`/pipeline-executions?${params.toString()}`,
|
|
34284
|
+
options
|
|
34285
|
+
);
|
|
34286
|
+
},
|
|
34287
|
+
/**
|
|
34288
|
+
* List pipeline executions for a specific pipeline.
|
|
34289
|
+
*
|
|
34290
|
+
* @param pipelineId - Pipeline UUID to filter by.
|
|
34291
|
+
* @param options - Optional request options.
|
|
34292
|
+
* @returns Array of PipelineExecution resources for this pipeline.
|
|
34293
|
+
*/
|
|
34294
|
+
async listByPipeline(pipelineId, options) {
|
|
34295
|
+
return rb.rawGet(
|
|
34296
|
+
`/pipeline-executions/by-pipeline/${pipelineId}`,
|
|
34297
|
+
options
|
|
34298
|
+
);
|
|
34299
|
+
},
|
|
34300
|
+
/**
|
|
34301
|
+
* Approve the current HITL checkpoint. Pipeline resumes execution.
|
|
34302
|
+
* Only valid when status === "awaiting_approval".
|
|
34303
|
+
*
|
|
34304
|
+
* @param id - Execution UUID.
|
|
34305
|
+
* @param options - Optional request options.
|
|
34306
|
+
* @returns Updated PipelineExecution resource.
|
|
34307
|
+
*/
|
|
34308
|
+
async approve(id, options) {
|
|
34309
|
+
return rb.rawPatch(
|
|
34310
|
+
`/pipeline-executions/${id}/approve`,
|
|
34311
|
+
{
|
|
34312
|
+
data: { type: "pipeline-execution", id, attributes: {} }
|
|
34313
|
+
},
|
|
34314
|
+
{
|
|
34315
|
+
...options,
|
|
34316
|
+
headers: {
|
|
34317
|
+
"Content-Type": "application/vnd.api+json",
|
|
34318
|
+
...options?.headers
|
|
34319
|
+
}
|
|
34320
|
+
}
|
|
34321
|
+
);
|
|
34322
|
+
},
|
|
34323
|
+
/**
|
|
34324
|
+
* Reject the current HITL checkpoint. Pipeline halts permanently.
|
|
34325
|
+
* Only valid when status === "awaiting_approval".
|
|
34326
|
+
*
|
|
34327
|
+
* @param id - Execution UUID.
|
|
34328
|
+
* @param options - Optional request options.
|
|
34329
|
+
* @returns Updated PipelineExecution resource.
|
|
34330
|
+
*/
|
|
34331
|
+
async reject(id, options) {
|
|
34332
|
+
return rb.rawPatch(
|
|
34333
|
+
`/pipeline-executions/${id}/reject`,
|
|
34334
|
+
{
|
|
34335
|
+
data: { type: "pipeline-execution", id, attributes: {} }
|
|
34336
|
+
},
|
|
34337
|
+
{
|
|
34338
|
+
...options,
|
|
34339
|
+
headers: {
|
|
34340
|
+
"Content-Type": "application/vnd.api+json",
|
|
34341
|
+
...options?.headers
|
|
34342
|
+
}
|
|
34343
|
+
}
|
|
34344
|
+
);
|
|
34345
|
+
},
|
|
34346
|
+
/**
|
|
34347
|
+
* Edit checkpoint data before approving.
|
|
34348
|
+
* Corrected values flow into downstream pipeline nodes.
|
|
34349
|
+
* Only valid when status === "awaiting_approval".
|
|
34350
|
+
*
|
|
34351
|
+
* @param id - Execution UUID.
|
|
34352
|
+
* @param attributes - Checkpoint data updates.
|
|
34353
|
+
* @param options - Optional request options.
|
|
34354
|
+
* @returns Updated PipelineExecution resource.
|
|
34355
|
+
*/
|
|
34356
|
+
async updateCheckpoint(id, attributes, options) {
|
|
34357
|
+
return rb.rawPatch(
|
|
34358
|
+
`/pipeline-executions/${id}/checkpoint`,
|
|
34359
|
+
{
|
|
34360
|
+
data: { type: "pipeline-execution", id, attributes }
|
|
34361
|
+
},
|
|
34362
|
+
{
|
|
34363
|
+
...options,
|
|
34364
|
+
headers: {
|
|
34365
|
+
"Content-Type": "application/vnd.api+json",
|
|
34366
|
+
...options?.headers
|
|
34367
|
+
}
|
|
34368
|
+
}
|
|
34369
|
+
);
|
|
34370
|
+
},
|
|
34371
|
+
/**
|
|
34372
|
+
* Set the checkpoint note. Replaces any existing note.
|
|
34373
|
+
* Only valid when status === "awaiting_approval".
|
|
34374
|
+
*
|
|
34375
|
+
* @param id - Execution UUID.
|
|
34376
|
+
* @param note - Note text.
|
|
34377
|
+
* @param options - Optional request options.
|
|
34378
|
+
* @returns Updated PipelineExecution resource.
|
|
34379
|
+
*/
|
|
34380
|
+
async addNote(id, note, options) {
|
|
34381
|
+
return rb.rawPatch(
|
|
34382
|
+
`/pipeline-executions/${id}/note`,
|
|
34383
|
+
{
|
|
34384
|
+
data: {
|
|
34385
|
+
type: "pipeline-execution",
|
|
34386
|
+
id,
|
|
34387
|
+
attributes: { checkpoint_notes: note }
|
|
34388
|
+
}
|
|
34389
|
+
},
|
|
34390
|
+
{
|
|
34391
|
+
...options,
|
|
34392
|
+
headers: {
|
|
34393
|
+
"Content-Type": "application/vnd.api+json",
|
|
34394
|
+
...options?.headers
|
|
34395
|
+
}
|
|
34396
|
+
}
|
|
34397
|
+
);
|
|
34398
|
+
},
|
|
34399
|
+
/**
|
|
34400
|
+
* Request AI refinement of a specific checkpoint node.
|
|
34401
|
+
* The AI re-runs the node with the given instruction and updates checkpoint_data.
|
|
34402
|
+
* Only valid when status === "awaiting_approval".
|
|
34403
|
+
*
|
|
34404
|
+
* @param id - Execution UUID.
|
|
34405
|
+
* @param nodeId - The pipeline node ID to refine.
|
|
34406
|
+
* @param instruction - Natural language instruction for refinement.
|
|
34407
|
+
* @param options - Optional request options.
|
|
34408
|
+
* @returns Updated PipelineExecution resource.
|
|
34409
|
+
*/
|
|
34410
|
+
async aiRefine(id, nodeId, instruction, options) {
|
|
34411
|
+
return rb.rawPatch(
|
|
34412
|
+
`/pipeline-executions/${id}/refine`,
|
|
34413
|
+
{
|
|
34414
|
+
data: {
|
|
34415
|
+
type: "pipeline-execution",
|
|
34416
|
+
id,
|
|
34417
|
+
attributes: { node_id: nodeId, instruction }
|
|
34418
|
+
}
|
|
34419
|
+
},
|
|
34420
|
+
{
|
|
34421
|
+
...options,
|
|
34422
|
+
headers: {
|
|
34423
|
+
"Content-Type": "application/vnd.api+json",
|
|
34424
|
+
...options?.headers
|
|
34425
|
+
}
|
|
34426
|
+
}
|
|
34427
|
+
);
|
|
34428
|
+
}
|
|
34429
|
+
};
|
|
34430
|
+
}
|
|
34431
|
+
|
|
33741
34432
|
// src/namespaces/pipelines.ts
|
|
33742
34433
|
function createPipelinesNamespace(rb) {
|
|
33743
34434
|
return {
|
|
34435
|
+
/**
|
|
34436
|
+
* List available pipelines.
|
|
34437
|
+
*
|
|
34438
|
+
* @param options - Optional request options.
|
|
34439
|
+
* @returns Array of Pipeline resources.
|
|
34440
|
+
*/
|
|
34441
|
+
async list(options) {
|
|
34442
|
+
return rb.rawGet(`/pipelines`, options);
|
|
34443
|
+
},
|
|
34444
|
+
/**
|
|
34445
|
+
* Get a pipeline by ID.
|
|
34446
|
+
*
|
|
34447
|
+
* @param id - Pipeline UUID.
|
|
34448
|
+
* @param options - Optional request options.
|
|
34449
|
+
* @returns Pipeline resource.
|
|
34450
|
+
*/
|
|
34451
|
+
async get(id, options) {
|
|
34452
|
+
return rb.rawGet(`/pipelines/${id}`, options);
|
|
34453
|
+
},
|
|
34454
|
+
/**
|
|
34455
|
+
* Get a pipeline by its system slug.
|
|
34456
|
+
*
|
|
34457
|
+
* @param slug - Pipeline system_slug.
|
|
34458
|
+
* @param options - Optional request options.
|
|
34459
|
+
* @returns Pipeline resource.
|
|
34460
|
+
*/
|
|
34461
|
+
async getBySlug(slug, options) {
|
|
34462
|
+
return rb.rawGet(`/pipelines/by-slug/${slug}`, options);
|
|
34463
|
+
},
|
|
33744
34464
|
/**
|
|
33745
34465
|
* Trigger pipeline execution.
|
|
33746
34466
|
*
|
|
33747
34467
|
* @param id - Pipeline UUID.
|
|
33748
|
-
* @param attributes - Execution parameters including workspace_id and input.
|
|
34468
|
+
* @param attributes - Execution parameters including workspace_id and optional input.
|
|
33749
34469
|
* @param options - Optional request options.
|
|
33750
|
-
* @returns
|
|
34470
|
+
* @returns Trigger response with execution_id and status.
|
|
33751
34471
|
*/
|
|
33752
34472
|
async trigger(id, attributes, options) {
|
|
33753
|
-
return rb.
|
|
34473
|
+
return rb.rawPostDirect(
|
|
33754
34474
|
`/pipelines/${id}/trigger`,
|
|
33755
34475
|
{
|
|
33756
|
-
|
|
33757
|
-
|
|
33758
|
-
|
|
33759
|
-
|
|
33760
|
-
|
|
33761
|
-
|
|
33762
|
-
|
|
34476
|
+
workspace_id: attributes.workspace_id,
|
|
34477
|
+
...attributes.input ? { input: attributes.input } : {}
|
|
34478
|
+
},
|
|
34479
|
+
options
|
|
34480
|
+
);
|
|
34481
|
+
},
|
|
34482
|
+
/**
|
|
34483
|
+
* Validate pipeline can execute without running it (dry-run).
|
|
34484
|
+
*
|
|
34485
|
+
* Checks: nodes exist, agents are resolvable, graph is valid, permissions OK.
|
|
34486
|
+
* Use this for onboarding validation or pre-flight checks.
|
|
34487
|
+
*
|
|
34488
|
+
* @param id - Pipeline UUID.
|
|
34489
|
+
* @param attributes - Validation parameters including workspace_id.
|
|
34490
|
+
* @param options - Optional request options.
|
|
34491
|
+
* @returns Validation result with validity flag and diagnostic info.
|
|
34492
|
+
*/
|
|
34493
|
+
async dryRun(id, attributes, options) {
|
|
34494
|
+
return rb.rawPostDirect(
|
|
34495
|
+
`/pipelines/${id}/dry-run`,
|
|
34496
|
+
{
|
|
34497
|
+
workspace_id: attributes.workspace_id
|
|
33763
34498
|
},
|
|
33764
34499
|
options
|
|
33765
34500
|
);
|
|
@@ -34474,6 +35209,31 @@ var RequestBuilder = class {
|
|
|
34474
35209
|
throw handleApiError(error);
|
|
34475
35210
|
}
|
|
34476
35211
|
}
|
|
35212
|
+
/**
|
|
35213
|
+
* Execute a generated SDK function that returns flat JSON (no JSON:API data wrapper).
|
|
35214
|
+
* Unlike execute() (which unwraps data.data for JSON:API envelopes), this returns
|
|
35215
|
+
* the parsed response body directly. Used for generic Ash actions that return maps.
|
|
35216
|
+
*/
|
|
35217
|
+
async executeDirect(fn, params, options) {
|
|
35218
|
+
const headers = buildHeaders(this.getHeaders, options);
|
|
35219
|
+
try {
|
|
35220
|
+
const result = await this.requestWithRetry(
|
|
35221
|
+
() => fn({
|
|
35222
|
+
client: this.clientInstance,
|
|
35223
|
+
headers,
|
|
35224
|
+
...params,
|
|
35225
|
+
...options?.signal && { signal: options.signal }
|
|
35226
|
+
})
|
|
35227
|
+
);
|
|
35228
|
+
const { data, error } = result;
|
|
35229
|
+
if (error) {
|
|
35230
|
+
throw enrichError(error, result);
|
|
35231
|
+
}
|
|
35232
|
+
return data;
|
|
35233
|
+
} catch (error) {
|
|
35234
|
+
throw handleApiError(error);
|
|
35235
|
+
}
|
|
35236
|
+
}
|
|
34477
35237
|
/**
|
|
34478
35238
|
* Execute a delete operation that returns true on success.
|
|
34479
35239
|
*/
|
|
@@ -34824,6 +35584,7 @@ var GptClient = class extends BaseClient {
|
|
|
34824
35584
|
this.projects = createProjectsNamespace(rb);
|
|
34825
35585
|
this.models = createModelsNamespace(rb);
|
|
34826
35586
|
this.crmClusters = createCrmClustersNamespace(rb);
|
|
35587
|
+
this.pipelineExecutions = createPipelineExecutionsNamespace(rb);
|
|
34827
35588
|
this.pipelines = createPipelinesNamespace(rb);
|
|
34828
35589
|
this.accessGrants = createAccessGrantsNamespace(rb);
|
|
34829
35590
|
this.roles = createRolesNamespace(rb);
|