@gpt-platform/client 0.10.4 → 0.10.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +434 -8
- package/dist/index.d.ts +434 -8
- package/dist/index.js +465 -11
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +465 -11
- package/dist/index.mjs.map +1 -1
- package/llms.txt +33 -0
- package/package.json +1 -1
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.10.
|
|
1275
|
+
var SDK_VERSION = "0.10.5";
|
|
1276
1276
|
var DEFAULT_API_VERSION = "2026-03-23";
|
|
1277
1277
|
|
|
1278
1278
|
// src/base-client.ts
|
|
@@ -2238,6 +2238,11 @@ var getSupportTagsWorkspaceByWorkspaceId = (options) => (options.client ?? clien
|
|
|
2238
2238
|
url: "/support/tags/workspace/{workspace_id}",
|
|
2239
2239
|
...options
|
|
2240
2240
|
});
|
|
2241
|
+
var getClinicalPatientsByIdMedications = (options) => (options.client ?? client).get({
|
|
2242
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2243
|
+
url: "/clinical/patients/{id}/medications",
|
|
2244
|
+
...options
|
|
2245
|
+
});
|
|
2241
2246
|
var getSearchIndexes = (options) => (options.client ?? client).get({
|
|
2242
2247
|
security: [{ scheme: "bearer", type: "http" }],
|
|
2243
2248
|
url: "/search/indexes",
|
|
@@ -5024,6 +5029,11 @@ var getAuditLogs = (options) => (options.client ?? client).get({
|
|
|
5024
5029
|
url: "/audit-logs",
|
|
5025
5030
|
...options
|
|
5026
5031
|
});
|
|
5032
|
+
var getClinicalClientMedicationsArchived = (options) => (options.client ?? client).get({
|
|
5033
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
5034
|
+
url: "/clinical/client-medications/archived",
|
|
5035
|
+
...options
|
|
5036
|
+
});
|
|
5027
5037
|
var getEmailInclusionsEmailByOutboundEmailId = (options) => (options.client ?? client).get({
|
|
5028
5038
|
security: [{ scheme: "bearer", type: "http" }],
|
|
5029
5039
|
url: "/email/inclusions/email/{outbound_email_id}",
|
|
@@ -5618,6 +5628,15 @@ var patchApplicationsById = (options) => (options.client ?? client).patch({
|
|
|
5618
5628
|
...options.headers
|
|
5619
5629
|
}
|
|
5620
5630
|
});
|
|
5631
|
+
var patchClinicalClientMedicationsByIdRestore = (options) => (options.client ?? client).patch({
|
|
5632
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
5633
|
+
url: "/clinical/client-medications/{id}/restore",
|
|
5634
|
+
...options,
|
|
5635
|
+
headers: {
|
|
5636
|
+
"Content-Type": "application/vnd.api+json",
|
|
5637
|
+
...options.headers
|
|
5638
|
+
}
|
|
5639
|
+
});
|
|
5621
5640
|
var patchEmailOutboundEmailsByIdSchedule = (options) => (options.client ?? client).patch({
|
|
5622
5641
|
security: [{ scheme: "bearer", type: "http" }],
|
|
5623
5642
|
url: "/email/outbound-emails/{id}/schedule",
|
|
@@ -6362,6 +6381,15 @@ var postContentRewriteTone = (options) => (options.client ?? client).post({
|
|
|
6362
6381
|
...options.headers
|
|
6363
6382
|
}
|
|
6364
6383
|
});
|
|
6384
|
+
var patchClinicalClientMedicationsByIdArchive = (options) => (options.client ?? client).patch({
|
|
6385
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
6386
|
+
url: "/clinical/client-medications/{id}/archive",
|
|
6387
|
+
...options,
|
|
6388
|
+
headers: {
|
|
6389
|
+
"Content-Type": "application/vnd.api+json",
|
|
6390
|
+
...options.headers
|
|
6391
|
+
}
|
|
6392
|
+
});
|
|
6365
6393
|
var patchStorageFilesByIdSoftDelete = (options) => (options.client ?? client).patch({
|
|
6366
6394
|
security: [{ scheme: "bearer", type: "http" }],
|
|
6367
6395
|
url: "/storage-files/{id}/soft-delete",
|
|
@@ -6674,6 +6702,20 @@ var getPlans = (options) => (options.client ?? client).get({
|
|
|
6674
6702
|
url: "/plans",
|
|
6675
6703
|
...options
|
|
6676
6704
|
});
|
|
6705
|
+
var getClinicalClientMedications = (options) => (options.client ?? client).get({
|
|
6706
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
6707
|
+
url: "/clinical/client-medications",
|
|
6708
|
+
...options
|
|
6709
|
+
});
|
|
6710
|
+
var postClinicalClientMedications = (options) => (options.client ?? client).post({
|
|
6711
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
6712
|
+
url: "/clinical/client-medications",
|
|
6713
|
+
...options,
|
|
6714
|
+
headers: {
|
|
6715
|
+
"Content-Type": "application/vnd.api+json",
|
|
6716
|
+
...options.headers
|
|
6717
|
+
}
|
|
6718
|
+
});
|
|
6677
6719
|
var postCrmActivities = (options) => (options.client ?? client).post({
|
|
6678
6720
|
security: [{ scheme: "bearer", type: "http" }],
|
|
6679
6721
|
url: "/crm/activities",
|
|
@@ -6771,6 +6813,20 @@ var patchSchedulingParticipantsByIdRespond = (options) => (options.client ?? cli
|
|
|
6771
6813
|
...options.headers
|
|
6772
6814
|
}
|
|
6773
6815
|
});
|
|
6816
|
+
var getClinicalClientMedicationsById = (options) => (options.client ?? client).get({
|
|
6817
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
6818
|
+
url: "/clinical/client-medications/{id}",
|
|
6819
|
+
...options
|
|
6820
|
+
});
|
|
6821
|
+
var patchClinicalClientMedicationsById = (options) => (options.client ?? client).patch({
|
|
6822
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
6823
|
+
url: "/clinical/client-medications/{id}",
|
|
6824
|
+
...options,
|
|
6825
|
+
headers: {
|
|
6826
|
+
"Content-Type": "application/vnd.api+json",
|
|
6827
|
+
...options.headers
|
|
6828
|
+
}
|
|
6829
|
+
});
|
|
6774
6830
|
var postAgentsByIdTest = (options) => (options.client ?? client).post({
|
|
6775
6831
|
security: [{ scheme: "bearer", type: "http" }],
|
|
6776
6832
|
url: "/agents/{id}/test",
|
|
@@ -7197,6 +7253,11 @@ var postEmailInclusions = (options) => (options.client ?? client).post({
|
|
|
7197
7253
|
...options.headers
|
|
7198
7254
|
}
|
|
7199
7255
|
});
|
|
7256
|
+
var deleteClinicalClientMedicationsByIdPermanent = (options) => (options.client ?? client).delete({
|
|
7257
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
7258
|
+
url: "/clinical/client-medications/{id}/permanent",
|
|
7259
|
+
...options
|
|
7260
|
+
});
|
|
7200
7261
|
var getAccessLogs = (options) => (options.client ?? client).get({
|
|
7201
7262
|
security: [{ scheme: "bearer", type: "http" }],
|
|
7202
7263
|
url: "/access-logs",
|
|
@@ -12543,6 +12604,18 @@ function createClinicalNamespace(rb) {
|
|
|
12543
12604
|
{ path: { id: patientId } },
|
|
12544
12605
|
options
|
|
12545
12606
|
),
|
|
12607
|
+
/**
|
|
12608
|
+
* List medications for a patient (related resource).
|
|
12609
|
+
*
|
|
12610
|
+
* @param patientId - Patient UUID or CRM Contact UUID
|
|
12611
|
+
* @param options - Request options
|
|
12612
|
+
* @returns Array of {@link ClinicalClientMedication} records
|
|
12613
|
+
*/
|
|
12614
|
+
medications: async (patientId, options) => rb.execute(
|
|
12615
|
+
getClinicalPatientsByIdMedications,
|
|
12616
|
+
{ path: { id: patientId } },
|
|
12617
|
+
options
|
|
12618
|
+
),
|
|
12546
12619
|
/**
|
|
12547
12620
|
* List resource assignments for a patient (related resource).
|
|
12548
12621
|
*
|
|
@@ -13573,6 +13646,163 @@ function createClinicalNamespace(rb) {
|
|
|
13573
13646
|
*/
|
|
13574
13647
|
bulkCreate: async (attrs, options) => rb.rawPost(`/clinical/client-supplements/bulk`, { data: attrs }, options).then((r) => r.data)
|
|
13575
13648
|
},
|
|
13649
|
+
/**
|
|
13650
|
+
* Manage medication prescriptions for clinical patients.
|
|
13651
|
+
*/
|
|
13652
|
+
clientMedications: {
|
|
13653
|
+
/**
|
|
13654
|
+
* List medication prescriptions, filtered by patient/workspace.
|
|
13655
|
+
*
|
|
13656
|
+
* @param params - Filter/pagination parameters
|
|
13657
|
+
* @param options - Request options
|
|
13658
|
+
* @returns Array of {@link ClinicalClientMedication} records
|
|
13659
|
+
*/
|
|
13660
|
+
list: async (params, options) => rb.execute(
|
|
13661
|
+
getClinicalClientMedications,
|
|
13662
|
+
{ query: params ?? {} },
|
|
13663
|
+
options
|
|
13664
|
+
),
|
|
13665
|
+
/**
|
|
13666
|
+
* Get a single medication prescription by ID.
|
|
13667
|
+
*
|
|
13668
|
+
* @param id - ClientMedication UUID
|
|
13669
|
+
* @param options - Request options
|
|
13670
|
+
* @returns {@link ClinicalClientMedication} record
|
|
13671
|
+
*/
|
|
13672
|
+
get: async (id, options) => rb.execute(
|
|
13673
|
+
getClinicalClientMedicationsById,
|
|
13674
|
+
{ path: { id } },
|
|
13675
|
+
options
|
|
13676
|
+
),
|
|
13677
|
+
/**
|
|
13678
|
+
* Create a new medication prescription.
|
|
13679
|
+
*
|
|
13680
|
+
* @param attributes - Medication creation attributes. Must include `workspace_id`,
|
|
13681
|
+
* `patient_id`, and `name`.
|
|
13682
|
+
* @param options - Request options
|
|
13683
|
+
* @returns Created {@link ClinicalClientMedication} record
|
|
13684
|
+
*/
|
|
13685
|
+
create: async (attributes, options) => rb.execute(
|
|
13686
|
+
postClinicalClientMedications,
|
|
13687
|
+
{
|
|
13688
|
+
body: { data: { type: "clinical-client-medication", attributes } }
|
|
13689
|
+
},
|
|
13690
|
+
options
|
|
13691
|
+
),
|
|
13692
|
+
/**
|
|
13693
|
+
* Update a medication prescription.
|
|
13694
|
+
*
|
|
13695
|
+
* @param id - ClientMedication UUID
|
|
13696
|
+
* @param attributes - Fields to update (PATCH semantics)
|
|
13697
|
+
* @param options - Request options
|
|
13698
|
+
* @returns Updated {@link ClinicalClientMedication} record
|
|
13699
|
+
*/
|
|
13700
|
+
update: async (id, attributes, options) => rb.execute(
|
|
13701
|
+
patchClinicalClientMedicationsById,
|
|
13702
|
+
{
|
|
13703
|
+
path: { id },
|
|
13704
|
+
body: {
|
|
13705
|
+
data: { type: "clinical-client-medication", id, attributes }
|
|
13706
|
+
}
|
|
13707
|
+
},
|
|
13708
|
+
options
|
|
13709
|
+
),
|
|
13710
|
+
/**
|
|
13711
|
+
* Delete (archive) a medication prescription.
|
|
13712
|
+
*
|
|
13713
|
+
* @deprecated Use {@link archive} instead.
|
|
13714
|
+
* @param id - ClientMedication UUID
|
|
13715
|
+
* @param options - Request options
|
|
13716
|
+
* @returns Archived {@link ClinicalClientMedication} record
|
|
13717
|
+
*/
|
|
13718
|
+
delete: async (id, options) => rb.execute(
|
|
13719
|
+
patchClinicalClientMedicationsByIdArchive,
|
|
13720
|
+
{
|
|
13721
|
+
path: { id },
|
|
13722
|
+
body: {
|
|
13723
|
+
data: { type: "clinical-client-medication", id, attributes: {} }
|
|
13724
|
+
}
|
|
13725
|
+
},
|
|
13726
|
+
options
|
|
13727
|
+
),
|
|
13728
|
+
/**
|
|
13729
|
+
* Archive (soft-delete) a medication prescription.
|
|
13730
|
+
*
|
|
13731
|
+
* @param id - ClientMedication UUID
|
|
13732
|
+
* @param options - Request options
|
|
13733
|
+
* @returns Archived {@link ClinicalClientMedication} record
|
|
13734
|
+
*/
|
|
13735
|
+
archive: async (id, options) => rb.execute(
|
|
13736
|
+
patchClinicalClientMedicationsByIdArchive,
|
|
13737
|
+
{
|
|
13738
|
+
path: { id },
|
|
13739
|
+
body: {
|
|
13740
|
+
data: { type: "clinical-client-medication", id, attributes: {} }
|
|
13741
|
+
}
|
|
13742
|
+
},
|
|
13743
|
+
options
|
|
13744
|
+
),
|
|
13745
|
+
/**
|
|
13746
|
+
* Restore an archived medication prescription.
|
|
13747
|
+
*
|
|
13748
|
+
* @param id - ClientMedication UUID
|
|
13749
|
+
* @param options - Request options
|
|
13750
|
+
* @returns Restored {@link ClinicalClientMedication} record
|
|
13751
|
+
*/
|
|
13752
|
+
restore: async (id, options) => rb.execute(
|
|
13753
|
+
patchClinicalClientMedicationsByIdRestore,
|
|
13754
|
+
{
|
|
13755
|
+
path: { id },
|
|
13756
|
+
body: {
|
|
13757
|
+
data: { type: "clinical-client-medication", id, attributes: {} }
|
|
13758
|
+
}
|
|
13759
|
+
},
|
|
13760
|
+
options
|
|
13761
|
+
),
|
|
13762
|
+
/**
|
|
13763
|
+
* Permanently delete a medication prescription. Irreversible.
|
|
13764
|
+
*
|
|
13765
|
+
* @param id - ClientMedication UUID
|
|
13766
|
+
* @param options - Request options
|
|
13767
|
+
* @returns `true` on success
|
|
13768
|
+
*/
|
|
13769
|
+
permanentDelete: async (id, options) => rb.executeDelete(
|
|
13770
|
+
deleteClinicalClientMedicationsByIdPermanent,
|
|
13771
|
+
{ path: { id } },
|
|
13772
|
+
options
|
|
13773
|
+
),
|
|
13774
|
+
/**
|
|
13775
|
+
* List archived (soft-deleted) medication prescriptions.
|
|
13776
|
+
*
|
|
13777
|
+
* @param params - Filter/pagination parameters
|
|
13778
|
+
* @param options - Request options
|
|
13779
|
+
* @returns Array of archived {@link ClinicalClientMedication} records
|
|
13780
|
+
*/
|
|
13781
|
+
listArchived: async (params, options) => rb.execute(
|
|
13782
|
+
getClinicalClientMedicationsArchived,
|
|
13783
|
+
{ query: params ?? {} },
|
|
13784
|
+
options
|
|
13785
|
+
),
|
|
13786
|
+
/**
|
|
13787
|
+
* Create multiple medications in a single request.
|
|
13788
|
+
*
|
|
13789
|
+
* @param attrs - Bulk creation attributes with workspace_id and medications array
|
|
13790
|
+
* @param options - Request options
|
|
13791
|
+
* @returns Array of creation results with id and status per medication
|
|
13792
|
+
*
|
|
13793
|
+
* @example
|
|
13794
|
+
* ```typescript
|
|
13795
|
+
* const results = await client.clinical.clientMedications.bulkCreate({
|
|
13796
|
+
* workspace_id: 'ws_123',
|
|
13797
|
+
* medications: [
|
|
13798
|
+
* { patient_id: 'pat_1', name: 'Metformin', source: 'ehr_import' },
|
|
13799
|
+
* { patient_id: 'pat_1', name: 'Lisinopril', source: 'ehr_import' },
|
|
13800
|
+
* ],
|
|
13801
|
+
* });
|
|
13802
|
+
* ```
|
|
13803
|
+
*/
|
|
13804
|
+
bulkCreate: async (attrs, options) => rb.rawPost(`/clinical/client-medications/bulk`, { data: attrs }, options).then((r) => r.data)
|
|
13805
|
+
},
|
|
13576
13806
|
/**
|
|
13577
13807
|
* Manage clinical deliveries (care plan items sent to patients).
|
|
13578
13808
|
*/
|
|
@@ -33738,28 +33968,251 @@ function createCrmClustersNamespace(rb) {
|
|
|
33738
33968
|
};
|
|
33739
33969
|
}
|
|
33740
33970
|
|
|
33971
|
+
// src/namespaces/pipeline-executions.ts
|
|
33972
|
+
function createPipelineExecutionsNamespace(rb) {
|
|
33973
|
+
return {
|
|
33974
|
+
/**
|
|
33975
|
+
* Get a pipeline execution by ID.
|
|
33976
|
+
*
|
|
33977
|
+
* @param id - Execution UUID.
|
|
33978
|
+
* @param options - Optional request options.
|
|
33979
|
+
* @returns PipelineExecution resource.
|
|
33980
|
+
*/
|
|
33981
|
+
async get(id, options) {
|
|
33982
|
+
return rb.rawGet(
|
|
33983
|
+
`/pipeline-executions/${id}`,
|
|
33984
|
+
options
|
|
33985
|
+
);
|
|
33986
|
+
},
|
|
33987
|
+
/**
|
|
33988
|
+
* List pipeline executions for a workspace.
|
|
33989
|
+
*
|
|
33990
|
+
* @param workspaceId - Workspace UUID to filter by.
|
|
33991
|
+
* @param filters - Optional filters (status, pipeline_id).
|
|
33992
|
+
* @param options - Optional request options.
|
|
33993
|
+
* @returns Array of PipelineExecution resources.
|
|
33994
|
+
*/
|
|
33995
|
+
async list(workspaceId, filters, options) {
|
|
33996
|
+
const params = new URLSearchParams({ workspace_id: workspaceId });
|
|
33997
|
+
if (filters?.status) params.set("filter[status]", filters.status);
|
|
33998
|
+
if (filters?.pipeline_id)
|
|
33999
|
+
params.set("filter[pipeline_id]", filters.pipeline_id);
|
|
34000
|
+
return rb.rawGet(
|
|
34001
|
+
`/pipeline-executions?${params.toString()}`,
|
|
34002
|
+
options
|
|
34003
|
+
);
|
|
34004
|
+
},
|
|
34005
|
+
/**
|
|
34006
|
+
* List pipeline executions for a specific pipeline.
|
|
34007
|
+
*
|
|
34008
|
+
* @param pipelineId - Pipeline UUID to filter by.
|
|
34009
|
+
* @param options - Optional request options.
|
|
34010
|
+
* @returns Array of PipelineExecution resources for this pipeline.
|
|
34011
|
+
*/
|
|
34012
|
+
async listByPipeline(pipelineId, options) {
|
|
34013
|
+
return rb.rawGet(
|
|
34014
|
+
`/pipeline-executions/by-pipeline/${pipelineId}`,
|
|
34015
|
+
options
|
|
34016
|
+
);
|
|
34017
|
+
},
|
|
34018
|
+
/**
|
|
34019
|
+
* Approve the current HITL checkpoint. Pipeline resumes execution.
|
|
34020
|
+
* Only valid when status === "awaiting_approval".
|
|
34021
|
+
*
|
|
34022
|
+
* @param id - Execution UUID.
|
|
34023
|
+
* @param options - Optional request options.
|
|
34024
|
+
* @returns Updated PipelineExecution resource.
|
|
34025
|
+
*/
|
|
34026
|
+
async approve(id, options) {
|
|
34027
|
+
return rb.rawPatch(
|
|
34028
|
+
`/pipeline-executions/${id}/approve`,
|
|
34029
|
+
{
|
|
34030
|
+
data: { type: "pipeline-execution", id, attributes: {} }
|
|
34031
|
+
},
|
|
34032
|
+
{
|
|
34033
|
+
...options,
|
|
34034
|
+
headers: {
|
|
34035
|
+
"Content-Type": "application/vnd.api+json",
|
|
34036
|
+
...options?.headers
|
|
34037
|
+
}
|
|
34038
|
+
}
|
|
34039
|
+
);
|
|
34040
|
+
},
|
|
34041
|
+
/**
|
|
34042
|
+
* Reject the current HITL checkpoint. Pipeline halts permanently.
|
|
34043
|
+
* Only valid when status === "awaiting_approval".
|
|
34044
|
+
*
|
|
34045
|
+
* @param id - Execution UUID.
|
|
34046
|
+
* @param options - Optional request options.
|
|
34047
|
+
* @returns Updated PipelineExecution resource.
|
|
34048
|
+
*/
|
|
34049
|
+
async reject(id, options) {
|
|
34050
|
+
return rb.rawPatch(
|
|
34051
|
+
`/pipeline-executions/${id}/reject`,
|
|
34052
|
+
{
|
|
34053
|
+
data: { type: "pipeline-execution", id, attributes: {} }
|
|
34054
|
+
},
|
|
34055
|
+
{
|
|
34056
|
+
...options,
|
|
34057
|
+
headers: {
|
|
34058
|
+
"Content-Type": "application/vnd.api+json",
|
|
34059
|
+
...options?.headers
|
|
34060
|
+
}
|
|
34061
|
+
}
|
|
34062
|
+
);
|
|
34063
|
+
},
|
|
34064
|
+
/**
|
|
34065
|
+
* Edit checkpoint data before approving.
|
|
34066
|
+
* Corrected values flow into downstream pipeline nodes.
|
|
34067
|
+
* Only valid when status === "awaiting_approval".
|
|
34068
|
+
*
|
|
34069
|
+
* @param id - Execution UUID.
|
|
34070
|
+
* @param attributes - Checkpoint data updates.
|
|
34071
|
+
* @param options - Optional request options.
|
|
34072
|
+
* @returns Updated PipelineExecution resource.
|
|
34073
|
+
*/
|
|
34074
|
+
async updateCheckpoint(id, attributes, options) {
|
|
34075
|
+
return rb.rawPatch(
|
|
34076
|
+
`/pipeline-executions/${id}/checkpoint`,
|
|
34077
|
+
{
|
|
34078
|
+
data: { type: "pipeline-execution", id, attributes }
|
|
34079
|
+
},
|
|
34080
|
+
{
|
|
34081
|
+
...options,
|
|
34082
|
+
headers: {
|
|
34083
|
+
"Content-Type": "application/vnd.api+json",
|
|
34084
|
+
...options?.headers
|
|
34085
|
+
}
|
|
34086
|
+
}
|
|
34087
|
+
);
|
|
34088
|
+
},
|
|
34089
|
+
/**
|
|
34090
|
+
* Set the checkpoint note. Replaces any existing note.
|
|
34091
|
+
* Only valid when status === "awaiting_approval".
|
|
34092
|
+
*
|
|
34093
|
+
* @param id - Execution UUID.
|
|
34094
|
+
* @param note - Note text.
|
|
34095
|
+
* @param options - Optional request options.
|
|
34096
|
+
* @returns Updated PipelineExecution resource.
|
|
34097
|
+
*/
|
|
34098
|
+
async addNote(id, note, options) {
|
|
34099
|
+
return rb.rawPatch(
|
|
34100
|
+
`/pipeline-executions/${id}/note`,
|
|
34101
|
+
{
|
|
34102
|
+
data: {
|
|
34103
|
+
type: "pipeline-execution",
|
|
34104
|
+
id,
|
|
34105
|
+
attributes: { checkpoint_notes: note }
|
|
34106
|
+
}
|
|
34107
|
+
},
|
|
34108
|
+
{
|
|
34109
|
+
...options,
|
|
34110
|
+
headers: {
|
|
34111
|
+
"Content-Type": "application/vnd.api+json",
|
|
34112
|
+
...options?.headers
|
|
34113
|
+
}
|
|
34114
|
+
}
|
|
34115
|
+
);
|
|
34116
|
+
},
|
|
34117
|
+
/**
|
|
34118
|
+
* Request AI refinement of a specific checkpoint node.
|
|
34119
|
+
* The AI re-runs the node with the given instruction and updates checkpoint_data.
|
|
34120
|
+
* Only valid when status === "awaiting_approval".
|
|
34121
|
+
*
|
|
34122
|
+
* @param id - Execution UUID.
|
|
34123
|
+
* @param nodeId - The pipeline node ID to refine.
|
|
34124
|
+
* @param instruction - Natural language instruction for refinement.
|
|
34125
|
+
* @param options - Optional request options.
|
|
34126
|
+
* @returns Updated PipelineExecution resource.
|
|
34127
|
+
*/
|
|
34128
|
+
async aiRefine(id, nodeId, instruction, options) {
|
|
34129
|
+
return rb.rawPatch(
|
|
34130
|
+
`/pipeline-executions/${id}/refine`,
|
|
34131
|
+
{
|
|
34132
|
+
data: {
|
|
34133
|
+
type: "pipeline-execution",
|
|
34134
|
+
id,
|
|
34135
|
+
attributes: { node_id: nodeId, instruction }
|
|
34136
|
+
}
|
|
34137
|
+
},
|
|
34138
|
+
{
|
|
34139
|
+
...options,
|
|
34140
|
+
headers: {
|
|
34141
|
+
"Content-Type": "application/vnd.api+json",
|
|
34142
|
+
...options?.headers
|
|
34143
|
+
}
|
|
34144
|
+
}
|
|
34145
|
+
);
|
|
34146
|
+
}
|
|
34147
|
+
};
|
|
34148
|
+
}
|
|
34149
|
+
|
|
33741
34150
|
// src/namespaces/pipelines.ts
|
|
33742
34151
|
function createPipelinesNamespace(rb) {
|
|
33743
34152
|
return {
|
|
34153
|
+
/**
|
|
34154
|
+
* List available pipelines.
|
|
34155
|
+
*
|
|
34156
|
+
* @param options - Optional request options.
|
|
34157
|
+
* @returns Array of Pipeline resources.
|
|
34158
|
+
*/
|
|
34159
|
+
async list(options) {
|
|
34160
|
+
return rb.rawGet(`/pipelines`, options);
|
|
34161
|
+
},
|
|
34162
|
+
/**
|
|
34163
|
+
* Get a pipeline by ID.
|
|
34164
|
+
*
|
|
34165
|
+
* @param id - Pipeline UUID.
|
|
34166
|
+
* @param options - Optional request options.
|
|
34167
|
+
* @returns Pipeline resource.
|
|
34168
|
+
*/
|
|
34169
|
+
async get(id, options) {
|
|
34170
|
+
return rb.rawGet(`/pipelines/${id}`, options);
|
|
34171
|
+
},
|
|
34172
|
+
/**
|
|
34173
|
+
* Get a pipeline by its system slug.
|
|
34174
|
+
*
|
|
34175
|
+
* @param slug - Pipeline system_slug.
|
|
34176
|
+
* @param options - Optional request options.
|
|
34177
|
+
* @returns Pipeline resource.
|
|
34178
|
+
*/
|
|
34179
|
+
async getBySlug(slug, options) {
|
|
34180
|
+
return rb.rawGet(`/pipelines/by-slug/${slug}`, options);
|
|
34181
|
+
},
|
|
33744
34182
|
/**
|
|
33745
34183
|
* Trigger pipeline execution.
|
|
33746
34184
|
*
|
|
33747
34185
|
* @param id - Pipeline UUID.
|
|
33748
|
-
* @param attributes - Execution parameters including workspace_id and input.
|
|
34186
|
+
* @param attributes - Execution parameters including workspace_id and optional input.
|
|
33749
34187
|
* @param options - Optional request options.
|
|
33750
|
-
* @returns
|
|
34188
|
+
* @returns Trigger response with execution_id and status.
|
|
33751
34189
|
*/
|
|
33752
34190
|
async trigger(id, attributes, options) {
|
|
33753
|
-
return rb.
|
|
34191
|
+
return rb.rawPostDirect(
|
|
33754
34192
|
`/pipelines/${id}/trigger`,
|
|
33755
34193
|
{
|
|
33756
|
-
|
|
33757
|
-
|
|
33758
|
-
|
|
33759
|
-
|
|
33760
|
-
|
|
33761
|
-
|
|
33762
|
-
|
|
34194
|
+
workspace_id: attributes.workspace_id,
|
|
34195
|
+
...attributes.input ? { input: attributes.input } : {}
|
|
34196
|
+
},
|
|
34197
|
+
options
|
|
34198
|
+
);
|
|
34199
|
+
},
|
|
34200
|
+
/**
|
|
34201
|
+
* Validate pipeline can execute without running it (dry-run).
|
|
34202
|
+
*
|
|
34203
|
+
* Checks: nodes exist, agents are resolvable, graph is valid, permissions OK.
|
|
34204
|
+
* Use this for onboarding validation or pre-flight checks.
|
|
34205
|
+
*
|
|
34206
|
+
* @param id - Pipeline UUID.
|
|
34207
|
+
* @param attributes - Validation parameters including workspace_id.
|
|
34208
|
+
* @param options - Optional request options.
|
|
34209
|
+
* @returns Validation result with validity flag and diagnostic info.
|
|
34210
|
+
*/
|
|
34211
|
+
async dryRun(id, attributes, options) {
|
|
34212
|
+
return rb.rawPostDirect(
|
|
34213
|
+
`/pipelines/${id}/dry-run`,
|
|
34214
|
+
{
|
|
34215
|
+
workspace_id: attributes.workspace_id
|
|
33763
34216
|
},
|
|
33764
34217
|
options
|
|
33765
34218
|
);
|
|
@@ -34824,6 +35277,7 @@ var GptClient = class extends BaseClient {
|
|
|
34824
35277
|
this.projects = createProjectsNamespace(rb);
|
|
34825
35278
|
this.models = createModelsNamespace(rb);
|
|
34826
35279
|
this.crmClusters = createCrmClustersNamespace(rb);
|
|
35280
|
+
this.pipelineExecutions = createPipelineExecutionsNamespace(rb);
|
|
34827
35281
|
this.pipelines = createPipelinesNamespace(rb);
|
|
34828
35282
|
this.accessGrants = createAccessGrantsNamespace(rb);
|
|
34829
35283
|
this.roles = createRolesNamespace(rb);
|