instill-sdk 0.0.1
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 +369 -0
- package/dist/chunk-2VZRNT6D.mjs +0 -0
- package/dist/chunk-3VVR3XHW.mjs +56 -0
- package/dist/chunk-42SCMPQP.mjs +0 -0
- package/dist/chunk-4KLHN5HK.mjs +0 -0
- package/dist/chunk-4TKUHGUZ.mjs +244 -0
- package/dist/chunk-4VWYH26Q.mjs +145 -0
- package/dist/chunk-6M57XUNI.mjs +64 -0
- package/dist/chunk-6NTCWRRC.mjs +0 -0
- package/dist/chunk-6ZXT6X3H.mjs +0 -0
- package/dist/chunk-73EPIL2R.mjs +0 -0
- package/dist/chunk-7KV3Y36U.mjs +17 -0
- package/dist/chunk-D5OKZ665.mjs +32 -0
- package/dist/chunk-DXEIDDIA.mjs +32 -0
- package/dist/chunk-EBWGEVUX.mjs +33 -0
- package/dist/chunk-ECC5KF6S.mjs +150 -0
- package/dist/chunk-EHG2FVLQ.mjs +0 -0
- package/dist/chunk-EXJ4UK7Q.mjs +49 -0
- package/dist/chunk-FAXYADOP.mjs +0 -0
- package/dist/chunk-FNCXOA62.mjs +0 -0
- package/dist/chunk-GPM5FDRS.mjs +154 -0
- package/dist/chunk-IB43VC55.mjs +41 -0
- package/dist/chunk-IPW3WQCQ.mjs +35 -0
- package/dist/chunk-IWAQMUMR.mjs +42 -0
- package/dist/chunk-JONZWFL5.mjs +168 -0
- package/dist/chunk-JTTE7IZY.mjs +14 -0
- package/dist/chunk-JY37AKV6.mjs +0 -0
- package/dist/chunk-KCKTAMXW.mjs +0 -0
- package/dist/chunk-KHFNAMT4.mjs +160 -0
- package/dist/chunk-NRP5M7FG.mjs +128 -0
- package/dist/chunk-QLWRKSUE.mjs +104 -0
- package/dist/chunk-QV7PYP7E.mjs +0 -0
- package/dist/chunk-QZOKJQTL.mjs +102 -0
- package/dist/chunk-RVRM4NPL.mjs +29 -0
- package/dist/chunk-VASX6R4R.mjs +0 -0
- package/dist/chunk-VIPORJ6H.mjs +77 -0
- package/dist/chunk-WBQAMGXK.mjs +0 -0
- package/dist/chunk-WL54JNC6.mjs +64 -0
- package/dist/chunk-WLPBUHMI.mjs +0 -0
- package/dist/chunk-YT6ZGA4J.mjs +46 -0
- package/dist/chunk-YXNMG2RZ.mjs +98 -0
- package/dist/chunk-ZRC43MN3.mjs +111 -0
- package/dist/chunk-magic-string.3a794426-OWTMMGNR.mjs +1253 -0
- package/dist/connector/ConnectorClient.d.ts +54 -0
- package/dist/connector/ConnectorClient.js +457 -0
- package/dist/connector/ConnectorClient.mjs +16 -0
- package/dist/connector/action.d.ts +13 -0
- package/dist/connector/action.js +72 -0
- package/dist/connector/action.mjs +11 -0
- package/dist/connector/index.d.ts +2 -0
- package/dist/connector/index.js +37 -0
- package/dist/connector/index.mjs +13 -0
- package/dist/connector/mutation.d.ts +19 -0
- package/dist/connector/mutation.js +91 -0
- package/dist/connector/mutation.mjs +13 -0
- package/dist/connector/queries.d.ts +34 -0
- package/dist/connector/queries.js +227 -0
- package/dist/connector/queries.mjs +23 -0
- package/dist/connector/types.d.ts +102 -0
- package/dist/connector/types.js +18 -0
- package/dist/connector/types.mjs +1 -0
- package/dist/helper/axiosInstance.d.ts +3 -0
- package/dist/helper/axiosInstance.js +44 -0
- package/dist/helper/axiosInstance.mjs +7 -0
- package/dist/helper/config.d.ts +1 -0
- package/dist/helper/config.js +53 -0
- package/dist/helper/config.mjs +7 -0
- package/dist/helper/createClient.d.ts +2 -0
- package/dist/helper/createClient.js +90 -0
- package/dist/helper/createClient.mjs +8 -0
- package/dist/helper/getInstillApiErrorMessage.d.ts +2 -0
- package/dist/helper/getInstillApiErrorMessage.js +41 -0
- package/dist/helper/getInstillApiErrorMessage.mjs +7 -0
- package/dist/helper/getQueryString.d.ts +7 -0
- package/dist/helper/getQueryString.js +57 -0
- package/dist/helper/getQueryString.mjs +7 -0
- package/dist/helper/getQueryString.test.d.ts +1 -0
- package/dist/helper/getQueryString.test.js +15769 -0
- package/dist/helper/getQueryString.test.mjs +14458 -0
- package/dist/helper/index.d.ts +5 -0
- package/dist/helper/index.js +145 -0
- package/dist/helper/index.mjs +21 -0
- package/dist/index.d.ts +24 -0
- package/dist/index.js +1978 -0
- package/dist/index.mjs +87 -0
- package/dist/metric/MetricClient.d.ts +21 -0
- package/dist/metric/MetricClient.js +215 -0
- package/dist/metric/MetricClient.mjs +14 -0
- package/dist/metric/index.d.ts +1 -0
- package/dist/metric/index.js +18 -0
- package/dist/metric/index.mjs +3 -0
- package/dist/metric/pipeline/index.d.ts +1 -0
- package/dist/metric/pipeline/index.js +18 -0
- package/dist/metric/pipeline/index.mjs +2 -0
- package/dist/metric/pipeline/queries.d.ts +21 -0
- package/dist/metric/pipeline/queries.js +168 -0
- package/dist/metric/pipeline/queries.mjs +17 -0
- package/dist/metric/pipeline/types.d.ts +63 -0
- package/dist/metric/pipeline/types.js +18 -0
- package/dist/metric/pipeline/types.mjs +1 -0
- package/dist/mgmt/AuthClient.d.ts +35 -0
- package/dist/mgmt/AuthClient.js +308 -0
- package/dist/mgmt/AuthClient.mjs +16 -0
- package/dist/mgmt/action.d.ts +8 -0
- package/dist/mgmt/action.js +61 -0
- package/dist/mgmt/action.mjs +11 -0
- package/dist/mgmt/index.d.ts +2 -0
- package/dist/mgmt/index.js +37 -0
- package/dist/mgmt/index.mjs +13 -0
- package/dist/mgmt/mutation.d.ts +18 -0
- package/dist/mgmt/mutation.js +83 -0
- package/dist/mgmt/mutation.mjs +13 -0
- package/dist/mgmt/queries.d.ts +17 -0
- package/dist/mgmt/queries.js +148 -0
- package/dist/mgmt/queries.mjs +19 -0
- package/dist/mgmt/types.d.ts +62 -0
- package/dist/mgmt/types.js +18 -0
- package/dist/mgmt/types.mjs +1 -0
- package/dist/model/ModelClient.d.ts +48 -0
- package/dist/model/ModelClient.js +466 -0
- package/dist/model/ModelClient.mjs +16 -0
- package/dist/model/action.d.ts +9 -0
- package/dist/model/action.js +57 -0
- package/dist/model/action.mjs +9 -0
- package/dist/model/index.d.ts +2 -0
- package/dist/model/index.js +37 -0
- package/dist/model/index.mjs +13 -0
- package/dist/model/mutation.d.ts +15 -0
- package/dist/model/mutation.js +128 -0
- package/dist/model/mutation.mjs +11 -0
- package/dist/model/queries.d.ts +35 -0
- package/dist/model/queries.js +234 -0
- package/dist/model/queries.mjs +25 -0
- package/dist/model/types.d.ts +141 -0
- package/dist/model/types.js +18 -0
- package/dist/model/types.mjs +1 -0
- package/dist/operation/OperationClient.d.ts +11 -0
- package/dist/operation/OperationClient.js +106 -0
- package/dist/operation/OperationClient.mjs +8 -0
- package/dist/operation/index.d.ts +2 -0
- package/dist/operation/index.js +31 -0
- package/dist/operation/index.mjs +5 -0
- package/dist/operation/queries.d.ts +9 -0
- package/dist/operation/queries.js +67 -0
- package/dist/operation/queries.mjs +9 -0
- package/dist/operation/types.d.ts +9 -0
- package/dist/operation/types.js +18 -0
- package/dist/operation/types.mjs +1 -0
- package/dist/pipeline/PipelineClient.d.ts +80 -0
- package/dist/pipeline/PipelineClient.js +639 -0
- package/dist/pipeline/PipelineClient.mjs +16 -0
- package/dist/pipeline/action.d.ts +34 -0
- package/dist/pipeline/action.js +157 -0
- package/dist/pipeline/action.mjs +17 -0
- package/dist/pipeline/index.d.ts +2 -0
- package/dist/pipeline/index.js +37 -0
- package/dist/pipeline/index.mjs +13 -0
- package/dist/pipeline/mutation.d.ts +33 -0
- package/dist/pipeline/mutation.js +134 -0
- package/dist/pipeline/mutation.mjs +19 -0
- package/dist/pipeline/queries.d.ts +32 -0
- package/dist/pipeline/queries.js +223 -0
- package/dist/pipeline/queries.mjs +23 -0
- package/dist/pipeline/types.d.ts +204 -0
- package/dist/pipeline/types.js +18 -0
- package/dist/pipeline/types.mjs +1 -0
- package/dist/protogen-ts/base/metric/v1alpha/metric.ts +4522 -0
- package/dist/protogen-ts/base/metric/v1alpha/metric_service.ts +314 -0
- package/dist/protogen-ts/base/mgmt/v1alpha/metric.ts +2486 -0
- package/dist/protogen-ts/base/mgmt/v1alpha/mgmt.ts +3787 -0
- package/dist/protogen-ts/base/mgmt/v1alpha/mgmt_private_service.ts +107 -0
- package/dist/protogen-ts/base/mgmt/v1alpha/mgmt_public_service.ts +326 -0
- package/dist/protogen-ts/base/usage/v1alpha/usage.ts +2185 -0
- package/dist/protogen-ts/base/usage/v1alpha/usage_service.ts +81 -0
- package/dist/protogen-ts/common/healthcheck/v1alpha/healthcheck.ts +188 -0
- package/dist/protogen-ts/common/task/v1alpha/task.ts +109 -0
- package/dist/protogen-ts/google/api/annotations.ts +3 -0
- package/dist/protogen-ts/google/api/client.ts +2073 -0
- package/dist/protogen-ts/google/api/field_behavior.ts +119 -0
- package/dist/protogen-ts/google/api/http.ts +745 -0
- package/dist/protogen-ts/google/api/launch_stage.ts +115 -0
- package/dist/protogen-ts/google/api/resource.ts +529 -0
- package/dist/protogen-ts/google/longrunning/operations.ts +890 -0
- package/dist/protogen-ts/google/protobuf/any.ts +259 -0
- package/dist/protogen-ts/google/protobuf/descriptor.ts +4831 -0
- package/dist/protogen-ts/google/protobuf/duration.ts +203 -0
- package/dist/protogen-ts/google/protobuf/empty.ts +70 -0
- package/dist/protogen-ts/google/protobuf/field_mask.ts +289 -0
- package/dist/protogen-ts/google/protobuf/struct.ts +543 -0
- package/dist/protogen-ts/google/protobuf/timestamp.ts +232 -0
- package/dist/protogen-ts/google/rpc/status.ts +138 -0
- package/dist/protogen-ts/model/controller/v1alpha/controller.ts +823 -0
- package/dist/protogen-ts/model/controller/v1alpha/controller_service.ts +95 -0
- package/dist/protogen-ts/model/model/v1alpha/common.ts +135 -0
- package/dist/protogen-ts/model/model/v1alpha/model.ts +5682 -0
- package/dist/protogen-ts/model/model/v1alpha/model_definition.ts +775 -0
- package/dist/protogen-ts/model/model/v1alpha/model_private_service.ts +87 -0
- package/dist/protogen-ts/model/model/v1alpha/model_public_service.ts +383 -0
- package/dist/protogen-ts/model/model/v1alpha/task_classification.ts +326 -0
- package/dist/protogen-ts/model/model/v1alpha/task_detection.ts +411 -0
- package/dist/protogen-ts/model/model/v1alpha/task_instance_segmentation.ts +435 -0
- package/dist/protogen-ts/model/model/v1alpha/task_keypoint.ts +510 -0
- package/dist/protogen-ts/model/model/v1alpha/task_ocr.ts +406 -0
- package/dist/protogen-ts/model/model/v1alpha/task_semantic_segmentation.ts +396 -0
- package/dist/protogen-ts/model/model/v1alpha/task_text_generation.ts +247 -0
- package/dist/protogen-ts/model/model/v1alpha/task_text_to_image.ts +221 -0
- package/dist/protogen-ts/model/model/v1alpha/task_unspecified.ts +142 -0
- package/dist/protogen-ts/protoc-gen-openapiv2/options/annotations.ts +3 -0
- package/dist/protogen-ts/protoc-gen-openapiv2/options/openapiv2.ts +5095 -0
- package/dist/protogen-ts/vdp/connector/v1alpha/connector.ts +3637 -0
- package/dist/protogen-ts/vdp/connector/v1alpha/connector_definition.ts +1043 -0
- package/dist/protogen-ts/vdp/connector/v1alpha/connector_private_service.ts +92 -0
- package/dist/protogen-ts/vdp/connector/v1alpha/connector_public_service.ts +310 -0
- package/dist/protogen-ts/vdp/connector/v1alpha/spec.ts +126 -0
- package/dist/protogen-ts/vdp/controller/v1alpha/controller.ts +853 -0
- package/dist/protogen-ts/vdp/controller/v1alpha/controller_service.ts +95 -0
- package/dist/protogen-ts/vdp/pipeline/v1alpha/common.ts +498 -0
- package/dist/protogen-ts/vdp/pipeline/v1alpha/operator_definition.ts +948 -0
- package/dist/protogen-ts/vdp/pipeline/v1alpha/pipeline.ts +6006 -0
- package/dist/protogen-ts/vdp/pipeline/v1alpha/pipeline_private_service.ts +83 -0
- package/dist/protogen-ts/vdp/pipeline/v1alpha/pipeline_public_service.ts +413 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/dist/types.d.ts +23 -0
- package/dist/types.js +18 -0
- package/dist/types.mjs +1 -0
- package/package.json +50 -0
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/pipeline/action.ts
|
|
21
|
+
var action_exports = {};
|
|
22
|
+
__export(action_exports, {
|
|
23
|
+
restoreUserPipelineReleaseMutation: () => restoreUserPipelineReleaseMutation,
|
|
24
|
+
setDefaultUserPipelineReleaseMutation: () => setDefaultUserPipelineReleaseMutation,
|
|
25
|
+
triggerAsyncUserPipelineAction: () => triggerAsyncUserPipelineAction,
|
|
26
|
+
triggerAsyncUserPipelineReleaseAction: () => triggerAsyncUserPipelineReleaseAction,
|
|
27
|
+
triggerUserPipelineAction: () => triggerUserPipelineAction,
|
|
28
|
+
triggerUserPipelineReleaseAction: () => triggerUserPipelineReleaseAction
|
|
29
|
+
});
|
|
30
|
+
module.exports = __toCommonJS(action_exports);
|
|
31
|
+
async function triggerUserPipelineAction({
|
|
32
|
+
axiosInstance,
|
|
33
|
+
pipelineName,
|
|
34
|
+
payload,
|
|
35
|
+
returnTraces
|
|
36
|
+
}) {
|
|
37
|
+
try {
|
|
38
|
+
const { data } = await axiosInstance.post(
|
|
39
|
+
`/${pipelineName}/trigger`,
|
|
40
|
+
payload,
|
|
41
|
+
{
|
|
42
|
+
headers: {
|
|
43
|
+
"instill-return-traces": returnTraces ? "true" : "false",
|
|
44
|
+
"Access-Control-Allow-Headers": "instill-return-traces",
|
|
45
|
+
"Content-Type": "application/json"
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
);
|
|
49
|
+
return Promise.resolve(data);
|
|
50
|
+
} catch (err) {
|
|
51
|
+
return Promise.reject(err);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
async function triggerAsyncUserPipelineAction({
|
|
55
|
+
axiosInstance,
|
|
56
|
+
pipelineName,
|
|
57
|
+
payload,
|
|
58
|
+
returnTraces
|
|
59
|
+
}) {
|
|
60
|
+
try {
|
|
61
|
+
const { data } = await axiosInstance.post(
|
|
62
|
+
`/${pipelineName}/triggerAsync`,
|
|
63
|
+
payload,
|
|
64
|
+
{
|
|
65
|
+
headers: {
|
|
66
|
+
"instill-return-traces": returnTraces ? "true" : "false",
|
|
67
|
+
"Access-Control-Allow-Headers": "instill-return-traces",
|
|
68
|
+
"Content-Type": "application/json"
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
);
|
|
72
|
+
return Promise.resolve(data.operation);
|
|
73
|
+
} catch (err) {
|
|
74
|
+
return Promise.reject(err);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
async function setDefaultUserPipelineReleaseMutation({
|
|
78
|
+
axiosInstance,
|
|
79
|
+
pipelineReleaseName
|
|
80
|
+
}) {
|
|
81
|
+
try {
|
|
82
|
+
const { data } = await axiosInstance.post(
|
|
83
|
+
`/${pipelineReleaseName}/setDefault`
|
|
84
|
+
);
|
|
85
|
+
return Promise.resolve(data.release);
|
|
86
|
+
} catch (err) {
|
|
87
|
+
return Promise.reject(err);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
async function restoreUserPipelineReleaseMutation({
|
|
91
|
+
axiosInstance,
|
|
92
|
+
pipelineReleaseName
|
|
93
|
+
}) {
|
|
94
|
+
try {
|
|
95
|
+
const { data } = await axiosInstance.post(
|
|
96
|
+
`/${pipelineReleaseName}/restore`
|
|
97
|
+
);
|
|
98
|
+
return Promise.resolve(data.release);
|
|
99
|
+
} catch (err) {
|
|
100
|
+
return Promise.reject(err);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
async function triggerUserPipelineReleaseAction({
|
|
104
|
+
axiosInstance,
|
|
105
|
+
pipelineReleaseName,
|
|
106
|
+
payload,
|
|
107
|
+
returnTraces
|
|
108
|
+
}) {
|
|
109
|
+
try {
|
|
110
|
+
const { data } = await axiosInstance.post(
|
|
111
|
+
`/${pipelineReleaseName}/trigger`,
|
|
112
|
+
payload,
|
|
113
|
+
{
|
|
114
|
+
headers: {
|
|
115
|
+
"instill-return-traces": returnTraces ? "true" : "false",
|
|
116
|
+
"Access-Control-Allow-Headers": "instill-return-traces",
|
|
117
|
+
"Content-Type": "application/json"
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
);
|
|
121
|
+
return Promise.resolve(data);
|
|
122
|
+
} catch (err) {
|
|
123
|
+
return Promise.reject(err);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
async function triggerAsyncUserPipelineReleaseAction({
|
|
127
|
+
axiosInstance,
|
|
128
|
+
pipelineReleaseName,
|
|
129
|
+
payload,
|
|
130
|
+
returnTraces
|
|
131
|
+
}) {
|
|
132
|
+
try {
|
|
133
|
+
const { data } = await axiosInstance.post(
|
|
134
|
+
`/${pipelineReleaseName}/triggerAsync`,
|
|
135
|
+
payload,
|
|
136
|
+
{
|
|
137
|
+
headers: {
|
|
138
|
+
"instill-return-traces": returnTraces ? "true" : "false",
|
|
139
|
+
"Access-Control-Allow-Headers": "instill-return-traces",
|
|
140
|
+
"Content-Type": "application.json"
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
);
|
|
144
|
+
return Promise.resolve(data.operation);
|
|
145
|
+
} catch (err) {
|
|
146
|
+
return Promise.reject(err);
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
150
|
+
0 && (module.exports = {
|
|
151
|
+
restoreUserPipelineReleaseMutation,
|
|
152
|
+
setDefaultUserPipelineReleaseMutation,
|
|
153
|
+
triggerAsyncUserPipelineAction,
|
|
154
|
+
triggerAsyncUserPipelineReleaseAction,
|
|
155
|
+
triggerUserPipelineAction,
|
|
156
|
+
triggerUserPipelineReleaseAction
|
|
157
|
+
});
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import {
|
|
2
|
+
restoreUserPipelineReleaseMutation,
|
|
3
|
+
setDefaultUserPipelineReleaseMutation,
|
|
4
|
+
triggerAsyncUserPipelineAction,
|
|
5
|
+
triggerAsyncUserPipelineReleaseAction,
|
|
6
|
+
triggerUserPipelineAction,
|
|
7
|
+
triggerUserPipelineReleaseAction
|
|
8
|
+
} from "../chunk-NRP5M7FG.mjs";
|
|
9
|
+
import "../chunk-EXJ4UK7Q.mjs";
|
|
10
|
+
export {
|
|
11
|
+
restoreUserPipelineReleaseMutation,
|
|
12
|
+
setDefaultUserPipelineReleaseMutation,
|
|
13
|
+
triggerAsyncUserPipelineAction,
|
|
14
|
+
triggerAsyncUserPipelineReleaseAction,
|
|
15
|
+
triggerUserPipelineAction,
|
|
16
|
+
triggerUserPipelineReleaseAction
|
|
17
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __copyProps = (to, from, except, desc) => {
|
|
9
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
10
|
+
for (let key of __getOwnPropNames(from))
|
|
11
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
12
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
13
|
+
}
|
|
14
|
+
return to;
|
|
15
|
+
};
|
|
16
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
17
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
18
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
19
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
20
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
21
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
|
+
mod
|
|
23
|
+
));
|
|
24
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
25
|
+
|
|
26
|
+
// src/pipeline/index.ts
|
|
27
|
+
var pipeline_exports = {};
|
|
28
|
+
module.exports = __toCommonJS(pipeline_exports);
|
|
29
|
+
|
|
30
|
+
// src/pipeline/PipelineClient.ts
|
|
31
|
+
var import_axios3 = __toESM(require("axios"));
|
|
32
|
+
|
|
33
|
+
// src/helper/createClient.ts
|
|
34
|
+
var import_axios = __toESM(require("axios"));
|
|
35
|
+
|
|
36
|
+
// src/helper/axiosInstance.ts
|
|
37
|
+
var import_axios2 = __toESM(require("axios"));
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import "../chunk-KCKTAMXW.mjs";
|
|
2
|
+
import "../chunk-4TKUHGUZ.mjs";
|
|
3
|
+
import "../chunk-NRP5M7FG.mjs";
|
|
4
|
+
import "../chunk-QLWRKSUE.mjs";
|
|
5
|
+
import "../chunk-ECC5KF6S.mjs";
|
|
6
|
+
import "../chunk-42SCMPQP.mjs";
|
|
7
|
+
import "../chunk-6ZXT6X3H.mjs";
|
|
8
|
+
import "../chunk-JTTE7IZY.mjs";
|
|
9
|
+
import "../chunk-DXEIDDIA.mjs";
|
|
10
|
+
import "../chunk-RVRM4NPL.mjs";
|
|
11
|
+
import "../chunk-7KV3Y36U.mjs";
|
|
12
|
+
import "../chunk-EBWGEVUX.mjs";
|
|
13
|
+
import "../chunk-EXJ4UK7Q.mjs";
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { AxiosInstance } from "axios";
|
|
2
|
+
import { CreateUserPipelinePayload, CreateUserPipelineReleasePayload, RenameUserPipelinePayload, UpdateUserPipelinePayload, UpdateUserPipelineReleasePayload } from "./types";
|
|
3
|
+
export declare function createUserPipelineMutation({ axiosInstance, userName, payload, }: {
|
|
4
|
+
axiosInstance: AxiosInstance;
|
|
5
|
+
userName: string;
|
|
6
|
+
payload: CreateUserPipelinePayload;
|
|
7
|
+
}): Promise<import("./types").Pipeline>;
|
|
8
|
+
export declare function updateUserPipelineMutation({ axiosInstance, payload, }: {
|
|
9
|
+
axiosInstance: AxiosInstance;
|
|
10
|
+
payload: UpdateUserPipelinePayload;
|
|
11
|
+
}): Promise<import("./types").Pipeline>;
|
|
12
|
+
export declare function deleteUserPipelineMutation({ axiosInstance, pipelineName, }: {
|
|
13
|
+
axiosInstance: AxiosInstance;
|
|
14
|
+
pipelineName: string;
|
|
15
|
+
}): Promise<undefined>;
|
|
16
|
+
export declare function renameUserPipelineMutation({ axiosInstance, payload, }: {
|
|
17
|
+
axiosInstance: AxiosInstance;
|
|
18
|
+
payload: RenameUserPipelinePayload;
|
|
19
|
+
}): Promise<import("./types").Pipeline>;
|
|
20
|
+
export declare function createUserPipelineReleaseMutation({ axiosInstance, pipelineName, payload, }: {
|
|
21
|
+
axiosInstance: AxiosInstance;
|
|
22
|
+
pipelineName: string;
|
|
23
|
+
payload: CreateUserPipelineReleasePayload;
|
|
24
|
+
}): Promise<import("./types").PipelineRelease>;
|
|
25
|
+
export declare function updateUserPipelineReleaseMutation({ axiosInstance, payload, pipelineReleaseName, }: {
|
|
26
|
+
axiosInstance: AxiosInstance;
|
|
27
|
+
payload: UpdateUserPipelineReleasePayload;
|
|
28
|
+
pipelineReleaseName: string;
|
|
29
|
+
}): Promise<import("./types").PipelineRelease>;
|
|
30
|
+
export declare function deleteUserPipelineReleaseMutation({ axiosInstance, pipelineReleaseName, }: {
|
|
31
|
+
axiosInstance: AxiosInstance;
|
|
32
|
+
pipelineReleaseName: string;
|
|
33
|
+
}): Promise<undefined>;
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/pipeline/mutation.ts
|
|
21
|
+
var mutation_exports = {};
|
|
22
|
+
__export(mutation_exports, {
|
|
23
|
+
createUserPipelineMutation: () => createUserPipelineMutation,
|
|
24
|
+
createUserPipelineReleaseMutation: () => createUserPipelineReleaseMutation,
|
|
25
|
+
deleteUserPipelineMutation: () => deleteUserPipelineMutation,
|
|
26
|
+
deleteUserPipelineReleaseMutation: () => deleteUserPipelineReleaseMutation,
|
|
27
|
+
renameUserPipelineMutation: () => renameUserPipelineMutation,
|
|
28
|
+
updateUserPipelineMutation: () => updateUserPipelineMutation,
|
|
29
|
+
updateUserPipelineReleaseMutation: () => updateUserPipelineReleaseMutation
|
|
30
|
+
});
|
|
31
|
+
module.exports = __toCommonJS(mutation_exports);
|
|
32
|
+
async function createUserPipelineMutation({
|
|
33
|
+
axiosInstance,
|
|
34
|
+
userName,
|
|
35
|
+
payload
|
|
36
|
+
}) {
|
|
37
|
+
try {
|
|
38
|
+
const { data } = await axiosInstance.post(
|
|
39
|
+
`${userName}/pipelines`,
|
|
40
|
+
payload
|
|
41
|
+
);
|
|
42
|
+
return Promise.resolve(data.pipeline);
|
|
43
|
+
} catch (err) {
|
|
44
|
+
return Promise.reject(err);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
async function updateUserPipelineMutation({
|
|
48
|
+
axiosInstance,
|
|
49
|
+
payload
|
|
50
|
+
}) {
|
|
51
|
+
try {
|
|
52
|
+
const { data } = await axiosInstance.patch(
|
|
53
|
+
`/${payload.name}`,
|
|
54
|
+
payload
|
|
55
|
+
);
|
|
56
|
+
return Promise.resolve(data.pipeline);
|
|
57
|
+
} catch (err) {
|
|
58
|
+
return Promise.reject(err);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
async function deleteUserPipelineMutation({
|
|
62
|
+
axiosInstance,
|
|
63
|
+
pipelineName
|
|
64
|
+
}) {
|
|
65
|
+
try {
|
|
66
|
+
await axiosInstance.delete(`/${pipelineName}`);
|
|
67
|
+
} catch (err) {
|
|
68
|
+
return Promise.reject(err);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
async function renameUserPipelineMutation({
|
|
72
|
+
axiosInstance,
|
|
73
|
+
payload
|
|
74
|
+
}) {
|
|
75
|
+
try {
|
|
76
|
+
const { data } = await axiosInstance.post(
|
|
77
|
+
`/${payload.name}/rename`,
|
|
78
|
+
payload
|
|
79
|
+
);
|
|
80
|
+
return Promise.resolve(data.pipeline);
|
|
81
|
+
} catch (err) {
|
|
82
|
+
return Promise.reject(err);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
async function createUserPipelineReleaseMutation({
|
|
86
|
+
axiosInstance,
|
|
87
|
+
pipelineName,
|
|
88
|
+
payload
|
|
89
|
+
}) {
|
|
90
|
+
try {
|
|
91
|
+
const { data } = await axiosInstance.post(
|
|
92
|
+
`${pipelineName}/releases`,
|
|
93
|
+
payload
|
|
94
|
+
);
|
|
95
|
+
return Promise.resolve(data.release);
|
|
96
|
+
} catch (err) {
|
|
97
|
+
return Promise.reject(err);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
async function updateUserPipelineReleaseMutation({
|
|
101
|
+
axiosInstance,
|
|
102
|
+
payload,
|
|
103
|
+
pipelineReleaseName
|
|
104
|
+
}) {
|
|
105
|
+
try {
|
|
106
|
+
const { data } = await axiosInstance.patch(
|
|
107
|
+
`/${pipelineReleaseName}`,
|
|
108
|
+
payload
|
|
109
|
+
);
|
|
110
|
+
return Promise.resolve(data.release);
|
|
111
|
+
} catch (err) {
|
|
112
|
+
return Promise.reject(err);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
async function deleteUserPipelineReleaseMutation({
|
|
116
|
+
axiosInstance,
|
|
117
|
+
pipelineReleaseName
|
|
118
|
+
}) {
|
|
119
|
+
try {
|
|
120
|
+
await axiosInstance.delete(`/${pipelineReleaseName}`);
|
|
121
|
+
} catch (err) {
|
|
122
|
+
return Promise.reject(err);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
126
|
+
0 && (module.exports = {
|
|
127
|
+
createUserPipelineMutation,
|
|
128
|
+
createUserPipelineReleaseMutation,
|
|
129
|
+
deleteUserPipelineMutation,
|
|
130
|
+
deleteUserPipelineReleaseMutation,
|
|
131
|
+
renameUserPipelineMutation,
|
|
132
|
+
updateUserPipelineMutation,
|
|
133
|
+
updateUserPipelineReleaseMutation
|
|
134
|
+
});
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createUserPipelineMutation,
|
|
3
|
+
createUserPipelineReleaseMutation,
|
|
4
|
+
deleteUserPipelineMutation,
|
|
5
|
+
deleteUserPipelineReleaseMutation,
|
|
6
|
+
renameUserPipelineMutation,
|
|
7
|
+
updateUserPipelineMutation,
|
|
8
|
+
updateUserPipelineReleaseMutation
|
|
9
|
+
} from "../chunk-QLWRKSUE.mjs";
|
|
10
|
+
import "../chunk-EXJ4UK7Q.mjs";
|
|
11
|
+
export {
|
|
12
|
+
createUserPipelineMutation,
|
|
13
|
+
createUserPipelineReleaseMutation,
|
|
14
|
+
deleteUserPipelineMutation,
|
|
15
|
+
deleteUserPipelineReleaseMutation,
|
|
16
|
+
renameUserPipelineMutation,
|
|
17
|
+
updateUserPipelineMutation,
|
|
18
|
+
updateUserPipelineReleaseMutation
|
|
19
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { AxiosInstance } from "axios";
|
|
2
|
+
import { Nullable } from "../types";
|
|
3
|
+
import { Pipeline, PipelineRelease } from "./types";
|
|
4
|
+
export declare function listPipelinesQuery({ axiosInstance, pageSize, nextPageToken, }: {
|
|
5
|
+
axiosInstance: AxiosInstance;
|
|
6
|
+
pageSize: Nullable<number>;
|
|
7
|
+
nextPageToken: Nullable<string>;
|
|
8
|
+
}): Promise<Pipeline[]>;
|
|
9
|
+
export declare function listUserPipelinesQuery({ axiosInstance, pageSize, nextPageToken, userName, }: {
|
|
10
|
+
axiosInstance: AxiosInstance;
|
|
11
|
+
pageSize: Nullable<number>;
|
|
12
|
+
nextPageToken: Nullable<string>;
|
|
13
|
+
userName: string;
|
|
14
|
+
}): Promise<Pipeline[]>;
|
|
15
|
+
export declare function getUserPipelineQuery({ axiosInstance, pipelineName, }: {
|
|
16
|
+
axiosInstance: AxiosInstance;
|
|
17
|
+
pipelineName: string;
|
|
18
|
+
}): Promise<Pipeline>;
|
|
19
|
+
export declare function ListUserPipelineReleasesQuery({ axiosInstance, pipelineName, pageSize, nextPageToken, }: {
|
|
20
|
+
axiosInstance: AxiosInstance;
|
|
21
|
+
pipelineName: string;
|
|
22
|
+
pageSize: Nullable<number>;
|
|
23
|
+
nextPageToken: Nullable<string>;
|
|
24
|
+
}): Promise<PipelineRelease[]>;
|
|
25
|
+
export declare function getUserPipelineReleaseQuery({ axiosInstance, pipelineReleaseName, }: {
|
|
26
|
+
axiosInstance: AxiosInstance;
|
|
27
|
+
pipelineReleaseName: string;
|
|
28
|
+
}): Promise<PipelineRelease>;
|
|
29
|
+
export declare function watchUserPipelineReleaseQuery({ axiosInstance, pipelineReleaseName, }: {
|
|
30
|
+
axiosInstance: AxiosInstance;
|
|
31
|
+
pipelineReleaseName: string;
|
|
32
|
+
}): Promise<import("./types").PipelineReleaseWatchState>;
|
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
|
|
30
|
+
// src/pipeline/queries.ts
|
|
31
|
+
var queries_exports = {};
|
|
32
|
+
__export(queries_exports, {
|
|
33
|
+
ListUserPipelineReleasesQuery: () => ListUserPipelineReleasesQuery,
|
|
34
|
+
getUserPipelineQuery: () => getUserPipelineQuery,
|
|
35
|
+
getUserPipelineReleaseQuery: () => getUserPipelineReleaseQuery,
|
|
36
|
+
listPipelinesQuery: () => listPipelinesQuery,
|
|
37
|
+
listUserPipelinesQuery: () => listUserPipelinesQuery,
|
|
38
|
+
watchUserPipelineReleaseQuery: () => watchUserPipelineReleaseQuery
|
|
39
|
+
});
|
|
40
|
+
module.exports = __toCommonJS(queries_exports);
|
|
41
|
+
|
|
42
|
+
// src/helper/createClient.ts
|
|
43
|
+
var import_axios = __toESM(require("axios"));
|
|
44
|
+
|
|
45
|
+
// src/helper/getQueryString.ts
|
|
46
|
+
var getQueryString = ({
|
|
47
|
+
baseURL,
|
|
48
|
+
pageSize,
|
|
49
|
+
nextPageToken,
|
|
50
|
+
filter
|
|
51
|
+
}) => {
|
|
52
|
+
let url = baseURL;
|
|
53
|
+
if (pageSize || nextPageToken || filter) {
|
|
54
|
+
if (baseURL.includes("?")) {
|
|
55
|
+
url += "&";
|
|
56
|
+
} else {
|
|
57
|
+
url += "?";
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
if (pageSize) {
|
|
61
|
+
url += `page_size=${pageSize}&`;
|
|
62
|
+
}
|
|
63
|
+
if (nextPageToken) {
|
|
64
|
+
url += `page_token=${nextPageToken}&`;
|
|
65
|
+
}
|
|
66
|
+
if (filter) {
|
|
67
|
+
url += `filter=${filter}&`;
|
|
68
|
+
}
|
|
69
|
+
if (url.endsWith("&")) {
|
|
70
|
+
url = url.slice(0, -1);
|
|
71
|
+
}
|
|
72
|
+
return url;
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
// src/helper/axiosInstance.ts
|
|
76
|
+
var import_axios2 = __toESM(require("axios"));
|
|
77
|
+
|
|
78
|
+
// src/pipeline/queries.ts
|
|
79
|
+
async function listPipelinesQuery({
|
|
80
|
+
axiosInstance,
|
|
81
|
+
pageSize,
|
|
82
|
+
nextPageToken
|
|
83
|
+
}) {
|
|
84
|
+
try {
|
|
85
|
+
const pipelines = [];
|
|
86
|
+
const queryString = getQueryString({
|
|
87
|
+
baseURL: "/pipelines?view=VIEW_FULL",
|
|
88
|
+
pageSize,
|
|
89
|
+
nextPageToken,
|
|
90
|
+
filter: null
|
|
91
|
+
});
|
|
92
|
+
const { data } = await axiosInstance.get(
|
|
93
|
+
queryString
|
|
94
|
+
);
|
|
95
|
+
pipelines.push(...data.pipelines);
|
|
96
|
+
if (data.next_page_token) {
|
|
97
|
+
pipelines.push(
|
|
98
|
+
...await listPipelinesQuery({
|
|
99
|
+
axiosInstance,
|
|
100
|
+
pageSize,
|
|
101
|
+
nextPageToken: data.next_page_token
|
|
102
|
+
})
|
|
103
|
+
);
|
|
104
|
+
}
|
|
105
|
+
return Promise.resolve(pipelines);
|
|
106
|
+
} catch (err) {
|
|
107
|
+
return Promise.reject(err);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
async function listUserPipelinesQuery({
|
|
111
|
+
axiosInstance,
|
|
112
|
+
pageSize,
|
|
113
|
+
nextPageToken,
|
|
114
|
+
userName
|
|
115
|
+
}) {
|
|
116
|
+
try {
|
|
117
|
+
const pipelines = [];
|
|
118
|
+
const queryString = getQueryString({
|
|
119
|
+
baseURL: `${userName}/pipelines?view=VIEW_FULL`,
|
|
120
|
+
pageSize,
|
|
121
|
+
nextPageToken,
|
|
122
|
+
filter: null
|
|
123
|
+
});
|
|
124
|
+
const { data } = await axiosInstance.get(
|
|
125
|
+
queryString
|
|
126
|
+
);
|
|
127
|
+
pipelines.push(...data.pipelines);
|
|
128
|
+
if (data.next_page_token) {
|
|
129
|
+
pipelines.push(
|
|
130
|
+
...await listUserPipelinesQuery({
|
|
131
|
+
axiosInstance,
|
|
132
|
+
pageSize,
|
|
133
|
+
nextPageToken: data.next_page_token,
|
|
134
|
+
userName
|
|
135
|
+
})
|
|
136
|
+
);
|
|
137
|
+
}
|
|
138
|
+
return Promise.resolve(pipelines);
|
|
139
|
+
} catch (err) {
|
|
140
|
+
return Promise.reject(err);
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
async function getUserPipelineQuery({
|
|
144
|
+
axiosInstance,
|
|
145
|
+
pipelineName
|
|
146
|
+
}) {
|
|
147
|
+
try {
|
|
148
|
+
const { data } = await axiosInstance.get(
|
|
149
|
+
`/${pipelineName}?view=VIEW_FULL`
|
|
150
|
+
);
|
|
151
|
+
return Promise.resolve(data.pipeline);
|
|
152
|
+
} catch (err) {
|
|
153
|
+
return Promise.reject(err);
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
async function ListUserPipelineReleasesQuery({
|
|
157
|
+
axiosInstance,
|
|
158
|
+
pipelineName,
|
|
159
|
+
pageSize,
|
|
160
|
+
nextPageToken
|
|
161
|
+
}) {
|
|
162
|
+
try {
|
|
163
|
+
const releases = [];
|
|
164
|
+
const queryString = getQueryString({
|
|
165
|
+
baseURL: `/${pipelineName}/releases?view=VIEW_FULL`,
|
|
166
|
+
pageSize,
|
|
167
|
+
nextPageToken,
|
|
168
|
+
filter: null
|
|
169
|
+
});
|
|
170
|
+
const { data } = await axiosInstance.get(
|
|
171
|
+
queryString
|
|
172
|
+
);
|
|
173
|
+
releases.push(...data.releases);
|
|
174
|
+
if (data.next_page_token) {
|
|
175
|
+
releases.push(
|
|
176
|
+
...await ListUserPipelineReleasesQuery({
|
|
177
|
+
axiosInstance,
|
|
178
|
+
pipelineName,
|
|
179
|
+
pageSize,
|
|
180
|
+
nextPageToken: data.next_page_token
|
|
181
|
+
})
|
|
182
|
+
);
|
|
183
|
+
}
|
|
184
|
+
return Promise.resolve(releases);
|
|
185
|
+
} catch (err) {
|
|
186
|
+
return Promise.reject(err);
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
async function getUserPipelineReleaseQuery({
|
|
190
|
+
axiosInstance,
|
|
191
|
+
pipelineReleaseName
|
|
192
|
+
}) {
|
|
193
|
+
try {
|
|
194
|
+
const { data } = await axiosInstance.get(
|
|
195
|
+
`/${pipelineReleaseName}?view=VIEW_FULL`
|
|
196
|
+
);
|
|
197
|
+
return Promise.resolve(data.release);
|
|
198
|
+
} catch (err) {
|
|
199
|
+
return Promise.reject(err);
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
async function watchUserPipelineReleaseQuery({
|
|
203
|
+
axiosInstance,
|
|
204
|
+
pipelineReleaseName
|
|
205
|
+
}) {
|
|
206
|
+
try {
|
|
207
|
+
const { data } = await axiosInstance.get(
|
|
208
|
+
`/${pipelineReleaseName}/watch`
|
|
209
|
+
);
|
|
210
|
+
return Promise.resolve(data.state);
|
|
211
|
+
} catch (err) {
|
|
212
|
+
return Promise.reject(err);
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
216
|
+
0 && (module.exports = {
|
|
217
|
+
ListUserPipelineReleasesQuery,
|
|
218
|
+
getUserPipelineQuery,
|
|
219
|
+
getUserPipelineReleaseQuery,
|
|
220
|
+
listPipelinesQuery,
|
|
221
|
+
listUserPipelinesQuery,
|
|
222
|
+
watchUserPipelineReleaseQuery
|
|
223
|
+
});
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ListUserPipelineReleasesQuery,
|
|
3
|
+
getUserPipelineQuery,
|
|
4
|
+
getUserPipelineReleaseQuery,
|
|
5
|
+
listPipelinesQuery,
|
|
6
|
+
listUserPipelinesQuery,
|
|
7
|
+
watchUserPipelineReleaseQuery
|
|
8
|
+
} from "../chunk-ECC5KF6S.mjs";
|
|
9
|
+
import "../chunk-6ZXT6X3H.mjs";
|
|
10
|
+
import "../chunk-JTTE7IZY.mjs";
|
|
11
|
+
import "../chunk-DXEIDDIA.mjs";
|
|
12
|
+
import "../chunk-RVRM4NPL.mjs";
|
|
13
|
+
import "../chunk-7KV3Y36U.mjs";
|
|
14
|
+
import "../chunk-EBWGEVUX.mjs";
|
|
15
|
+
import "../chunk-EXJ4UK7Q.mjs";
|
|
16
|
+
export {
|
|
17
|
+
ListUserPipelineReleasesQuery,
|
|
18
|
+
getUserPipelineQuery,
|
|
19
|
+
getUserPipelineReleaseQuery,
|
|
20
|
+
listPipelinesQuery,
|
|
21
|
+
listUserPipelinesQuery,
|
|
22
|
+
watchUserPipelineReleaseQuery
|
|
23
|
+
};
|