@stack-spot/portal-network 0.1.0 → 0.2.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/CHANGELOG.md +9 -0
- package/package.json +7 -6
- package/src/apis.json +2 -10
- package/src/client/account.ts +44 -2
- package/src/error/CanceledError.ts +3 -0
- package/src/error/DefaultAPIError.ts +27 -1
- package/src/error/StackspotAPIError.ts +33 -1
- package/src/network/AutoInfiniteQuery.ts +97 -0
- package/src/network/AutoQuery.ts +2 -1
- package/src/network/ManualInfiniteQuery.ts +88 -0
- package/src/network/ManualQuery.ts +2 -2
- package/src/network/NetworkClient.ts +79 -13
- package/src/network/ReactQueryNetworkClient.ts +130 -12
- package/src/network/react-query-client.ts +3 -0
- package/src/network/types.ts +208 -2
- package/.generate-api.failed.json +0 -1
- package/dist/api/account.d.ts +0 -2368
- package/dist/api/account.d.ts.map +0 -1
- package/dist/api/account.js +0 -1521
- package/dist/api/account.js.map +0 -1
- package/dist/api/ai.d.ts +0 -1432
- package/dist/api/ai.d.ts.map +0 -1
- package/dist/api/ai.js +0 -1342
- package/dist/api/ai.js.map +0 -1
- package/dist/api/apiRuntime.d.ts +0 -922
- package/dist/api/apiRuntime.d.ts.map +0 -1
- package/dist/api/apiRuntime.js +0 -599
- package/dist/api/apiRuntime.js.map +0 -1
- package/dist/api/cloudAccount.d.ts +0 -473
- package/dist/api/cloudAccount.d.ts.map +0 -1
- package/dist/api/cloudAccount.js +0 -300
- package/dist/api/cloudAccount.js.map +0 -1
- package/dist/api/cloudServices.d.ts +0 -1233
- package/dist/api/cloudServices.d.ts.map +0 -1
- package/dist/api/cloudServices.js +0 -715
- package/dist/api/cloudServices.js.map +0 -1
- package/dist/api/insights.d.ts +0 -123
- package/dist/api/insights.d.ts.map +0 -1
- package/dist/api/insights.js +0 -112
- package/dist/api/insights.js.map +0 -1
- package/dist/api/plugin.d.ts +0 -368
- package/dist/api/plugin.d.ts.map +0 -1
- package/dist/api/plugin.js +0 -218
- package/dist/api/plugin.js.map +0 -1
- package/dist/api/serviceCatalog.d.ts +0 -737
- package/dist/api/serviceCatalog.d.ts.map +0 -1
- package/dist/api/serviceCatalog.js +0 -611
- package/dist/api/serviceCatalog.js.map +0 -1
- package/dist/api/workflows.d.ts +0 -366
- package/dist/api/workflows.d.ts.map +0 -1
- package/dist/api/workflows.js +0 -175
- package/dist/api/workflows.js.map +0 -1
- package/dist/api/workspace.js +0 -1476
- package/dist/api/workspace.js.map +0 -1
- package/dist/api/workspaceManager.d.ts +0 -1121
- package/dist/api/workspaceManager.d.ts.map +0 -1
- package/dist/api/workspaceManager.js +0 -357
- package/dist/api/workspaceManager.js.map +0 -1
- package/dist/api/workspaceSearchEngine.d.ts +0 -93
- package/dist/api/workspaceSearchEngine.d.ts.map +0 -1
- package/dist/api/workspaceSearchEngine.js +0 -55
- package/dist/api/workspaceSearchEngine.js.map +0 -1
- package/dist/apis.json +0 -129
- package/dist/client/account.d.ts +0 -46
- package/dist/client/account.d.ts.map +0 -1
- package/dist/client/account.js +0 -104
- package/dist/client/account.js.map +0 -1
- package/dist/error/CanceledError.d.ts +0 -5
- package/dist/error/CanceledError.d.ts.map +0 -1
- package/dist/error/CanceledError.js +0 -7
- package/dist/error/CanceledError.js.map +0 -1
- package/dist/error/DefaultAPIError.d.ts +0 -9
- package/dist/error/DefaultAPIError.d.ts.map +0 -1
- package/dist/error/DefaultAPIError.js +0 -58
- package/dist/error/DefaultAPIError.js.map +0 -1
- package/dist/error/StackspotAPIError.d.ts +0 -19
- package/dist/error/StackspotAPIError.d.ts.map +0 -1
- package/dist/error/StackspotAPIError.js +0 -39
- package/dist/error/StackspotAPIError.js.map +0 -1
- package/dist/error/dictionary/account.d.ts +0 -55
- package/dist/error/dictionary/account.d.ts.map +0 -1
- package/dist/error/dictionary/account.js +0 -55
- package/dist/error/dictionary/account.js.map +0 -1
- package/dist/error/dictionary/action.d.ts +0 -163
- package/dist/error/dictionary/action.d.ts.map +0 -1
- package/dist/error/dictionary/action.js +0 -163
- package/dist/error/dictionary/action.js.map +0 -1
- package/dist/error/dictionary/base.d.ts +0 -21
- package/dist/error/dictionary/base.d.ts.map +0 -1
- package/dist/error/dictionary/base.js +0 -21
- package/dist/error/dictionary/base.js.map +0 -1
- package/dist/error/dictionary/cnt-fields.d.ts +0 -13
- package/dist/error/dictionary/cnt-fields.d.ts.map +0 -1
- package/dist/error/dictionary/cnt-fields.js +0 -13
- package/dist/error/dictionary/cnt-fields.js.map +0 -1
- package/dist/error/dictionary/cnt.d.ts +0 -79
- package/dist/error/dictionary/cnt.d.ts.map +0 -1
- package/dist/error/dictionary/cnt.js +0 -79
- package/dist/error/dictionary/cnt.js.map +0 -1
- package/dist/error/dictionary/rte.d.ts +0 -23
- package/dist/error/dictionary/rte.d.ts.map +0 -1
- package/dist/error/dictionary/rte.js +0 -23
- package/dist/error/dictionary/rte.js.map +0 -1
- package/dist/error/dictionary/rtm.d.ts +0 -9
- package/dist/error/dictionary/rtm.d.ts.map +0 -1
- package/dist/error/dictionary/rtm.js +0 -9
- package/dist/error/dictionary/rtm.js.map +0 -1
- package/dist/error/dictionary/workspace-fields.d.ts +0 -9
- package/dist/error/dictionary/workspace-fields.d.ts.map +0 -1
- package/dist/error/dictionary/workspace-fields.js +0 -9
- package/dist/error/dictionary/workspace-fields.js.map +0 -1
- package/dist/error/dictionary/workspace.d.ts +0 -99
- package/dist/error/dictionary/workspace.d.ts.map +0 -1
- package/dist/error/dictionary/workspace.js +0 -99
- package/dist/error/dictionary/workspace.js.map +0 -1
- package/dist/index.d.ts +0 -6
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -6
- package/dist/index.js.map +0 -1
- package/dist/network/AutoMutation.d.ts +0 -10
- package/dist/network/AutoMutation.d.ts.map +0 -1
- package/dist/network/AutoMutation.js +0 -20
- package/dist/network/AutoMutation.js.map +0 -1
- package/dist/network/AutoOperation.d.ts +0 -19
- package/dist/network/AutoOperation.d.ts.map +0 -1
- package/dist/network/AutoOperation.js +0 -99
- package/dist/network/AutoOperation.js.map +0 -1
- package/dist/network/AutoQuery.d.ts +0 -19
- package/dist/network/AutoQuery.d.ts.map +0 -1
- package/dist/network/AutoQuery.js +0 -70
- package/dist/network/AutoQuery.js.map +0 -1
- package/dist/network/ManualMutation.d.ts +0 -11
- package/dist/network/ManualMutation.d.ts.map +0 -1
- package/dist/network/ManualMutation.js +0 -32
- package/dist/network/ManualMutation.js.map +0 -1
- package/dist/network/ManualOperation.d.ts +0 -13
- package/dist/network/ManualOperation.d.ts.map +0 -1
- package/dist/network/ManualOperation.js +0 -53
- package/dist/network/ManualOperation.js.map +0 -1
- package/dist/network/ManualQuery.d.ts +0 -20
- package/dist/network/ManualQuery.d.ts.map +0 -1
- package/dist/network/ManualQuery.js +0 -77
- package/dist/network/ManualQuery.js.map +0 -1
- package/dist/network/NetworkClient.d.ts +0 -20
- package/dist/network/NetworkClient.d.ts.map +0 -1
- package/dist/network/NetworkClient.js +0 -85
- package/dist/network/NetworkClient.js.map +0 -1
- package/dist/network/ReactQueryNetworkClient.d.ts +0 -16
- package/dist/network/ReactQueryNetworkClient.d.ts.map +0 -1
- package/dist/network/ReactQueryNetworkClient.js +0 -125
- package/dist/network/ReactQueryNetworkClient.js.map +0 -1
- package/dist/network/react-query-client.d.ts +0 -3
- package/dist/network/react-query-client.d.ts.map +0 -1
- package/dist/network/react-query-client.js +0 -3
- package/dist/network/react-query-client.js.map +0 -1
- package/dist/network/types.d.ts +0 -55
- package/dist/network/types.d.ts.map +0 -1
- package/dist/network/types.js +0 -2
- package/dist/network/types.js.map +0 -1
- package/src/api/plugin.ts +0 -685
package/dist/api/workspace.js
DELETED
|
@@ -1,1476 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Workspace API
|
|
3
|
-
* v1.0.0
|
|
4
|
-
* DO NOT MODIFY - This file has been generated using oazapfts.
|
|
5
|
-
* See https://www.npmjs.com/package/oazapfts
|
|
6
|
-
*/
|
|
7
|
-
import * as Oazapfts from "@oazapfts/runtime";
|
|
8
|
-
import * as QS from "@oazapfts/runtime/query";
|
|
9
|
-
export const defaults = {
|
|
10
|
-
headers: {},
|
|
11
|
-
baseUrl: "https://workspace-workspace-api.dev.stackspot.com",
|
|
12
|
-
};
|
|
13
|
-
const oazapfts = Oazapfts.runtime(defaults);
|
|
14
|
-
export const servers = {
|
|
15
|
-
generatedServerUrl: "https://workspace-workspace-api.dev.stackspot.com"
|
|
16
|
-
};
|
|
17
|
-
/**
|
|
18
|
-
* List all configured context of an workflow by workspace and stack.
|
|
19
|
-
*/
|
|
20
|
-
export function listContextByWorkspaceStack({ workspaceId, workflowId, stackId }, opts) {
|
|
21
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces/${encodeURIComponent(workspaceId)}/workflows/${encodeURIComponent(workflowId)}/stacks/${encodeURIComponent(stackId)}/context`, {
|
|
22
|
-
...opts
|
|
23
|
-
}));
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* Save workspace workflow context
|
|
27
|
-
*/
|
|
28
|
-
export function saveWorkspaceWorkflowContext({ workspaceId, workflowId, stackId, workspaceWorkflowCreateRequest }, opts) {
|
|
29
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces/${encodeURIComponent(workspaceId)}/workflows/${encodeURIComponent(workflowId)}/stacks/${encodeURIComponent(stackId)}/context`, oazapfts.json({
|
|
30
|
-
...opts,
|
|
31
|
-
method: "PUT",
|
|
32
|
-
body: workspaceWorkflowCreateRequest
|
|
33
|
-
})));
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* Get a workspace's variable
|
|
37
|
-
*/
|
|
38
|
-
export function getV1WorkspacesByWorkspaceIdVariablesAndName({ workspaceId, name }, opts) {
|
|
39
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces/${encodeURIComponent(workspaceId)}/variables/${encodeURIComponent(name)}`, {
|
|
40
|
-
...opts
|
|
41
|
-
}));
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* Update a workspace's variable
|
|
45
|
-
*/
|
|
46
|
-
export function update({ workspaceId, name, updateWorkspaceVariableRequest }, opts) {
|
|
47
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces/${encodeURIComponent(workspaceId)}/variables/${encodeURIComponent(name)}`, oazapfts.json({
|
|
48
|
-
...opts,
|
|
49
|
-
method: "PUT",
|
|
50
|
-
body: updateWorkspaceVariableRequest
|
|
51
|
-
})));
|
|
52
|
-
}
|
|
53
|
-
/**
|
|
54
|
-
* Delete a workspace's variable
|
|
55
|
-
*/
|
|
56
|
-
export function delete1({ workspaceId, name }, opts) {
|
|
57
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces/${encodeURIComponent(workspaceId)}/variables/${encodeURIComponent(name)}`, {
|
|
58
|
-
...opts,
|
|
59
|
-
method: "DELETE"
|
|
60
|
-
}));
|
|
61
|
-
}
|
|
62
|
-
/**
|
|
63
|
-
* Add context to a typed element in a workspace's stack.
|
|
64
|
-
*/
|
|
65
|
-
export function addTypedContextInWorkspace({ workspaceId, stackVersionId, externalId, $type, addTypedContextRequest }, opts) {
|
|
66
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces/${encodeURIComponent(workspaceId)}/stacks/${encodeURIComponent(stackVersionId)}/${encodeURIComponent($type)}s/${encodeURIComponent(externalId)}/input-context`, oazapfts.json({
|
|
67
|
-
...opts,
|
|
68
|
-
method: "PUT",
|
|
69
|
-
body: addTypedContextRequest
|
|
70
|
-
})));
|
|
71
|
-
}
|
|
72
|
-
/**
|
|
73
|
-
* Get Workflow of a stack in a workspace.
|
|
74
|
-
*/
|
|
75
|
-
export function getWorkspaceWorkflow({ workspaceId, stackVersionId, identifier }, opts) {
|
|
76
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces/${encodeURIComponent(workspaceId)}/stacks/${encodeURIComponent(stackVersionId)}/workflows${QS.query(QS.explode({
|
|
77
|
-
identifier
|
|
78
|
-
}))}`, {
|
|
79
|
-
...opts
|
|
80
|
-
}));
|
|
81
|
-
}
|
|
82
|
-
/**
|
|
83
|
-
* Add step to a workflow belonging to a workspace.
|
|
84
|
-
*/
|
|
85
|
-
export function addWorkflowStepInWorkspace({ workspaceId, stackVersionId, addWorkspaceWorkflowStepRequest }, opts) {
|
|
86
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces/${encodeURIComponent(workspaceId)}/stacks/${encodeURIComponent(stackVersionId)}/workflows`, oazapfts.json({
|
|
87
|
-
...opts,
|
|
88
|
-
method: "PUT",
|
|
89
|
-
body: addWorkspaceWorkflowStepRequest
|
|
90
|
-
})));
|
|
91
|
-
}
|
|
92
|
-
/**
|
|
93
|
-
* Import context in a workspace's stack.
|
|
94
|
-
*/
|
|
95
|
-
export function importContextInWorkspace({ workspaceId, stackVersionId, body }, opts) {
|
|
96
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces/${encodeURIComponent(workspaceId)}/stacks/${encodeURIComponent(stackVersionId)}/input-context`, oazapfts.json({
|
|
97
|
-
...opts,
|
|
98
|
-
method: "PUT",
|
|
99
|
-
body
|
|
100
|
-
})));
|
|
101
|
-
}
|
|
102
|
-
/**
|
|
103
|
-
* Update shared infrastructure status.
|
|
104
|
-
*/
|
|
105
|
-
export function updateStatus({ workspaceId, sharedInfraId, updateSharedInfraStatusRequest }, opts) {
|
|
106
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces/${encodeURIComponent(workspaceId)}/shared-infra/${encodeURIComponent(sharedInfraId)}/status`, oazapfts.json({
|
|
107
|
-
...opts,
|
|
108
|
-
method: "PUT",
|
|
109
|
-
body: updateSharedInfraStatusRequest
|
|
110
|
-
})));
|
|
111
|
-
}
|
|
112
|
-
/**
|
|
113
|
-
* Get shared infra links visibility
|
|
114
|
-
*/
|
|
115
|
-
export function getVisibleLinks({ workspaceId, sharedInfraId }, opts) {
|
|
116
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces/${encodeURIComponent(workspaceId)}/shared-infra/${encodeURIComponent(sharedInfraId)}/links/visibility-management`, {
|
|
117
|
-
...opts
|
|
118
|
-
}));
|
|
119
|
-
}
|
|
120
|
-
/**
|
|
121
|
-
* Update application links visibility
|
|
122
|
-
*/
|
|
123
|
-
export function updateLinksVisibility({ workspaceId, sharedInfraId, body }, opts) {
|
|
124
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces/${encodeURIComponent(workspaceId)}/shared-infra/${encodeURIComponent(sharedInfraId)}/links/visibility-management`, oazapfts.json({
|
|
125
|
-
...opts,
|
|
126
|
-
method: "PUT",
|
|
127
|
-
body
|
|
128
|
-
})));
|
|
129
|
-
}
|
|
130
|
-
/**
|
|
131
|
-
* Update activity status by workspace.
|
|
132
|
-
*/
|
|
133
|
-
export function updateRun({ accountId, workspaceId, runId, updateRunRequest }, opts) {
|
|
134
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces/${encodeURIComponent(workspaceId)}/run/${encodeURIComponent(runId)}`, oazapfts.json({
|
|
135
|
-
...opts,
|
|
136
|
-
method: "PUT",
|
|
137
|
-
body: updateRunRequest,
|
|
138
|
-
headers: oazapfts.mergeHeaders(opts?.headers, {
|
|
139
|
-
accountId
|
|
140
|
-
})
|
|
141
|
-
})));
|
|
142
|
-
}
|
|
143
|
-
/**
|
|
144
|
-
* Update plugin status by workspace.
|
|
145
|
-
*/
|
|
146
|
-
export function runTask({ accountId, workspaceId, runId, runTaskRequest }, opts) {
|
|
147
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces/${encodeURIComponent(workspaceId)}/run/${encodeURIComponent(runId)}/plugin`, oazapfts.json({
|
|
148
|
-
...opts,
|
|
149
|
-
method: "PUT",
|
|
150
|
-
body: runTaskRequest,
|
|
151
|
-
headers: oazapfts.mergeHeaders(opts?.headers, {
|
|
152
|
-
accountId
|
|
153
|
-
})
|
|
154
|
-
})));
|
|
155
|
-
}
|
|
156
|
-
/**
|
|
157
|
-
* Deployment tag register.
|
|
158
|
-
*/
|
|
159
|
-
export function deploymentTag({ accountId, workspaceId, runId, deploymentTagRequest }, opts) {
|
|
160
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces/${encodeURIComponent(workspaceId)}/run/${encodeURIComponent(runId)}/deploy-tag`, oazapfts.json({
|
|
161
|
-
...opts,
|
|
162
|
-
method: "PUT",
|
|
163
|
-
body: deploymentTagRequest,
|
|
164
|
-
headers: oazapfts.mergeHeaders(opts?.headers, {
|
|
165
|
-
accountId
|
|
166
|
-
})
|
|
167
|
-
})));
|
|
168
|
-
}
|
|
169
|
-
/**
|
|
170
|
-
* Request to upsert connection interfaces attributes.
|
|
171
|
-
*/
|
|
172
|
-
export function updateConnectionInterfaceAttributes({ workspaceId, connectionInterfaceId, updateConnectionInterfaceAttributesRequest }, opts) {
|
|
173
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces/${encodeURIComponent(workspaceId)}/connection-interfaces/${encodeURIComponent(connectionInterfaceId)}/attributes`, oazapfts.json({
|
|
174
|
-
...opts,
|
|
175
|
-
method: "PUT",
|
|
176
|
-
body: updateConnectionInterfaceAttributesRequest
|
|
177
|
-
})));
|
|
178
|
-
}
|
|
179
|
-
/**
|
|
180
|
-
* Request to upsert connection interfaces.
|
|
181
|
-
*/
|
|
182
|
-
export function upsertBatch({ workspaceId, body }, opts) {
|
|
183
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces/${encodeURIComponent(workspaceId)}/connection-interfaces/batch`, oazapfts.json({
|
|
184
|
-
...opts,
|
|
185
|
-
method: "PUT",
|
|
186
|
-
body
|
|
187
|
-
})));
|
|
188
|
-
}
|
|
189
|
-
/**
|
|
190
|
-
* Update application status.
|
|
191
|
-
*/
|
|
192
|
-
export function updateStatus1({ workspaceId, applicationId, accountId, updateApplicationStatusRequest }, opts) {
|
|
193
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces/${encodeURIComponent(workspaceId)}/applications/${encodeURIComponent(applicationId)}/status`, oazapfts.json({
|
|
194
|
-
...opts,
|
|
195
|
-
method: "PUT",
|
|
196
|
-
body: updateApplicationStatusRequest,
|
|
197
|
-
headers: oazapfts.mergeHeaders(opts?.headers, {
|
|
198
|
-
accountId
|
|
199
|
-
})
|
|
200
|
-
})));
|
|
201
|
-
}
|
|
202
|
-
/**
|
|
203
|
-
* Get application links visibility
|
|
204
|
-
*/
|
|
205
|
-
export function getVisibleLinks1({ workspaceId, applicationId }, opts) {
|
|
206
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces/${encodeURIComponent(workspaceId)}/applications/${encodeURIComponent(applicationId)}/links/visibility-management`, {
|
|
207
|
-
...opts
|
|
208
|
-
}));
|
|
209
|
-
}
|
|
210
|
-
/**
|
|
211
|
-
* Update application links visibility
|
|
212
|
-
*/
|
|
213
|
-
export function updateLinksVisibility1({ workspaceId, applicationId, body }, opts) {
|
|
214
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces/${encodeURIComponent(workspaceId)}/applications/${encodeURIComponent(applicationId)}/links/visibility-management`, oazapfts.json({
|
|
215
|
-
...opts,
|
|
216
|
-
method: "PUT",
|
|
217
|
-
body
|
|
218
|
-
})));
|
|
219
|
-
}
|
|
220
|
-
/**
|
|
221
|
-
* Get workflow settings with associated stacks.
|
|
222
|
-
*/
|
|
223
|
-
export function listSettingsByAccountWorkflow({ workflowId }, opts) {
|
|
224
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/account/workflows/${encodeURIComponent(workflowId)}/settings`, {
|
|
225
|
-
...opts
|
|
226
|
-
}));
|
|
227
|
-
}
|
|
228
|
-
/**
|
|
229
|
-
* Update settings information of a workflow account.
|
|
230
|
-
*/
|
|
231
|
-
export function updateSettingsByAccountWorkflow({ workflowId, settingsWorkflowSaveRequest }, opts) {
|
|
232
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/account/workflows/${encodeURIComponent(workflowId)}/settings`, oazapfts.json({
|
|
233
|
-
...opts,
|
|
234
|
-
method: "PUT",
|
|
235
|
-
body: settingsWorkflowSaveRequest
|
|
236
|
-
})));
|
|
237
|
-
}
|
|
238
|
-
/**
|
|
239
|
-
* List all configured context of an workflow account.
|
|
240
|
-
*/
|
|
241
|
-
export function listContextByAccountWorkflow({ workflowId }, opts) {
|
|
242
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/account/workflows/${encodeURIComponent(workflowId)}/context`, {
|
|
243
|
-
...opts
|
|
244
|
-
}));
|
|
245
|
-
}
|
|
246
|
-
/**
|
|
247
|
-
* Update all context configurations of a workflow account.
|
|
248
|
-
*/
|
|
249
|
-
export function updateContextsByAccountWorkflow({ workflowId, contextsWorkflowSaveRequest }, opts) {
|
|
250
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/account/workflows/${encodeURIComponent(workflowId)}/context`, oazapfts.json({
|
|
251
|
-
...opts,
|
|
252
|
-
method: "PUT",
|
|
253
|
-
body: contextsWorkflowSaveRequest
|
|
254
|
-
})));
|
|
255
|
-
}
|
|
256
|
-
/**
|
|
257
|
-
* List all actions of an workflow account.
|
|
258
|
-
*/
|
|
259
|
-
export function listActionsByAccountWorkflow({ workflowId }, opts) {
|
|
260
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/account/workflows/${encodeURIComponent(workflowId)}/actions`, {
|
|
261
|
-
...opts
|
|
262
|
-
}));
|
|
263
|
-
}
|
|
264
|
-
/**
|
|
265
|
-
* Update all actions associations with a workflow account.
|
|
266
|
-
*/
|
|
267
|
-
export function updateActionsByAccountWorkflow({ workflowId, actionsWorkflowSaveRequest }, opts) {
|
|
268
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/account/workflows/${encodeURIComponent(workflowId)}/actions`, oazapfts.json({
|
|
269
|
-
...opts,
|
|
270
|
-
method: "PUT",
|
|
271
|
-
body: actionsWorkflowSaveRequest
|
|
272
|
-
})));
|
|
273
|
-
}
|
|
274
|
-
/**
|
|
275
|
-
* Add context to a typed element in an account's stack.
|
|
276
|
-
*/
|
|
277
|
-
export function addTypedContextInAccount({ stackVersionId, externalId, $type, addTypedContextRequest }, opts) {
|
|
278
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/account/stacks/${encodeURIComponent(stackVersionId)}/${encodeURIComponent($type)}s/${encodeURIComponent(externalId)}/input-context`, oazapfts.json({
|
|
279
|
-
...opts,
|
|
280
|
-
method: "PUT",
|
|
281
|
-
body: addTypedContextRequest
|
|
282
|
-
})));
|
|
283
|
-
}
|
|
284
|
-
/**
|
|
285
|
-
* Get Workflow of a stack in an account.
|
|
286
|
-
*/
|
|
287
|
-
export function getAccountWorkflow({ stackVersionId, identifier }, opts) {
|
|
288
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/account/stacks/${encodeURIComponent(stackVersionId)}/workflows${QS.query(QS.explode({
|
|
289
|
-
identifier
|
|
290
|
-
}))}`, {
|
|
291
|
-
...opts
|
|
292
|
-
}));
|
|
293
|
-
}
|
|
294
|
-
/**
|
|
295
|
-
* Add step to a workflow belonging to an account.
|
|
296
|
-
*/
|
|
297
|
-
export function addWorkflowStepInAccount({ stackVersionId, addAccountWorkflowStepRequest }, opts) {
|
|
298
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/account/stacks/${encodeURIComponent(stackVersionId)}/workflows`, oazapfts.json({
|
|
299
|
-
...opts,
|
|
300
|
-
method: "PUT",
|
|
301
|
-
body: addAccountWorkflowStepRequest
|
|
302
|
-
})));
|
|
303
|
-
}
|
|
304
|
-
/**
|
|
305
|
-
* Import context in an account's stack.
|
|
306
|
-
*/
|
|
307
|
-
export function importContextInAccount({ stackVersionId, body }, opts) {
|
|
308
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/account/stacks/${encodeURIComponent(stackVersionId)}/input-context`, oazapfts.json({
|
|
309
|
-
...opts,
|
|
310
|
-
method: "PUT",
|
|
311
|
-
body
|
|
312
|
-
})));
|
|
313
|
-
}
|
|
314
|
-
/**
|
|
315
|
-
* Save stack workflow context
|
|
316
|
-
*/
|
|
317
|
-
export function saveStackWorkflowContext({ stackId, workflowId, stackWorkflowCreateRequest }, opts) {
|
|
318
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/account/stacks/${encodeURIComponent(stackId)}/workflows/${encodeURIComponent(workflowId)}/context`, oazapfts.json({
|
|
319
|
-
...opts,
|
|
320
|
-
method: "PUT",
|
|
321
|
-
body: stackWorkflowCreateRequest
|
|
322
|
-
})));
|
|
323
|
-
}
|
|
324
|
-
/**
|
|
325
|
-
* List specific shared infra or application usage by plugin list.
|
|
326
|
-
*/
|
|
327
|
-
export function listPluginUsageByTargetId({ accountId, targetType, targetId, body }, opts) {
|
|
328
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/${encodeURIComponent(targetType)}/${encodeURIComponent(targetId)}/plugins/usage`, oazapfts.json({
|
|
329
|
-
...opts,
|
|
330
|
-
method: "POST",
|
|
331
|
-
body,
|
|
332
|
-
headers: oazapfts.mergeHeaders(opts?.headers, {
|
|
333
|
-
accountId
|
|
334
|
-
})
|
|
335
|
-
})));
|
|
336
|
-
}
|
|
337
|
-
/**
|
|
338
|
-
* List all shared infras or applications usage by plugin list.
|
|
339
|
-
*/
|
|
340
|
-
export function listAllPluginUsage({ accountId, targetType, body }, opts) {
|
|
341
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/${encodeURIComponent(targetType)}/plugins/usage`, oazapfts.json({
|
|
342
|
-
...opts,
|
|
343
|
-
method: "POST",
|
|
344
|
-
body,
|
|
345
|
-
headers: oazapfts.mergeHeaders(opts?.headers, {
|
|
346
|
-
accountId
|
|
347
|
-
})
|
|
348
|
-
})));
|
|
349
|
-
}
|
|
350
|
-
/**
|
|
351
|
-
* Get all workspaces
|
|
352
|
-
*/
|
|
353
|
-
export function getWorkspaces({ name, aclOnly, accountId }, opts) {
|
|
354
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces${QS.query(QS.explode({
|
|
355
|
-
name,
|
|
356
|
-
aclOnly
|
|
357
|
-
}))}`, {
|
|
358
|
-
...opts,
|
|
359
|
-
headers: oazapfts.mergeHeaders(opts?.headers, {
|
|
360
|
-
accountId
|
|
361
|
-
})
|
|
362
|
-
}));
|
|
363
|
-
}
|
|
364
|
-
/**
|
|
365
|
-
* Create workspace
|
|
366
|
-
*/
|
|
367
|
-
export function save({ newWorkspaceRequest }, opts) {
|
|
368
|
-
return oazapfts.ok(oazapfts.fetchJson("/v1/workspaces", oazapfts.json({
|
|
369
|
-
...opts,
|
|
370
|
-
method: "POST",
|
|
371
|
-
body: newWorkspaceRequest
|
|
372
|
-
})));
|
|
373
|
-
}
|
|
374
|
-
/**
|
|
375
|
-
* Get all workspace's variables
|
|
376
|
-
*/
|
|
377
|
-
export function findAll({ workspaceId, filter }, opts) {
|
|
378
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces/${encodeURIComponent(workspaceId)}/variables${QS.query(QS.explode({
|
|
379
|
-
filter
|
|
380
|
-
}))}`, {
|
|
381
|
-
...opts
|
|
382
|
-
}));
|
|
383
|
-
}
|
|
384
|
-
/**
|
|
385
|
-
* Create a workspace's variable
|
|
386
|
-
*/
|
|
387
|
-
export function save1({ workspaceId, newWorkspaceVariableRequest }, opts) {
|
|
388
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces/${encodeURIComponent(workspaceId)}/variables`, oazapfts.json({
|
|
389
|
-
...opts,
|
|
390
|
-
method: "POST",
|
|
391
|
-
body: newWorkspaceVariableRequest
|
|
392
|
-
})));
|
|
393
|
-
}
|
|
394
|
-
/**
|
|
395
|
-
* Get all stacks in a workspace.
|
|
396
|
-
*/
|
|
397
|
-
export function getStacks({ workspaceId }, opts) {
|
|
398
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces/${encodeURIComponent(workspaceId)}/stacks`, {
|
|
399
|
-
...opts
|
|
400
|
-
}));
|
|
401
|
-
}
|
|
402
|
-
/**
|
|
403
|
-
* Add a stack in a workspace.
|
|
404
|
-
*/
|
|
405
|
-
export function addStack({ workspaceId, addStackInWorkspaceRequest }, opts) {
|
|
406
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces/${encodeURIComponent(workspaceId)}/stacks`, oazapfts.json({
|
|
407
|
-
...opts,
|
|
408
|
-
method: "POST",
|
|
409
|
-
body: addStackInWorkspaceRequest
|
|
410
|
-
})));
|
|
411
|
-
}
|
|
412
|
-
/**
|
|
413
|
-
* Get all stacks with context in a workspace.
|
|
414
|
-
*/
|
|
415
|
-
export function getStacksWithContext({ workspaceId, body }, opts) {
|
|
416
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces/${encodeURIComponent(workspaceId)}/stacks/with-context`, oazapfts.json({
|
|
417
|
-
...opts,
|
|
418
|
-
method: "POST",
|
|
419
|
-
body
|
|
420
|
-
})));
|
|
421
|
-
}
|
|
422
|
-
/**
|
|
423
|
-
* List specific workspace usage by stack version list.
|
|
424
|
-
*/
|
|
425
|
-
export function listStackUsageByWorkspaceId({ accountId, workspaceId, body }, opts) {
|
|
426
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces/${encodeURIComponent(workspaceId)}/stacks/usage`, oazapfts.json({
|
|
427
|
-
...opts,
|
|
428
|
-
method: "POST",
|
|
429
|
-
body,
|
|
430
|
-
headers: oazapfts.mergeHeaders(opts?.headers, {
|
|
431
|
-
accountId
|
|
432
|
-
})
|
|
433
|
-
})));
|
|
434
|
-
}
|
|
435
|
-
/**
|
|
436
|
-
* Get all shared infrastructure of a workspace.
|
|
437
|
-
*/
|
|
438
|
-
export function getAllSharedInfrastructure({ workspaceId, name, stackVersionId }, opts) {
|
|
439
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces/${encodeURIComponent(workspaceId)}/shared-infra${QS.query(QS.explode({
|
|
440
|
-
name,
|
|
441
|
-
stackVersionId
|
|
442
|
-
}))}`, {
|
|
443
|
-
...opts
|
|
444
|
-
}));
|
|
445
|
-
}
|
|
446
|
-
/**
|
|
447
|
-
* Create shared infrastructure in a workspace.
|
|
448
|
-
*/
|
|
449
|
-
export function save2({ workspaceId, fromPortal, createSharedInfraRequest }, opts) {
|
|
450
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces/${encodeURIComponent(workspaceId)}/shared-infra${QS.query(QS.explode({
|
|
451
|
-
fromPortal
|
|
452
|
-
}))}`, oazapfts.json({
|
|
453
|
-
...opts,
|
|
454
|
-
method: "POST",
|
|
455
|
-
body: createSharedInfraRequest
|
|
456
|
-
})));
|
|
457
|
-
}
|
|
458
|
-
/**
|
|
459
|
-
* Get shared infrastructure of a workspace.
|
|
460
|
-
*/
|
|
461
|
-
export function getSharedInfrastructure({ workspaceId, sharedInfraId }, opts) {
|
|
462
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces/${encodeURIComponent(workspaceId)}/shared-infra/${encodeURIComponent(sharedInfraId)}`, {
|
|
463
|
-
...opts
|
|
464
|
-
}));
|
|
465
|
-
}
|
|
466
|
-
/**
|
|
467
|
-
* Recreate a shared infrastructure in a workspace.
|
|
468
|
-
*/
|
|
469
|
-
export function recreate({ workspaceId, sharedInfraId, recreateSharedInfraRequest }, opts) {
|
|
470
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces/${encodeURIComponent(workspaceId)}/shared-infra/${encodeURIComponent(sharedInfraId)}`, oazapfts.json({
|
|
471
|
-
...opts,
|
|
472
|
-
method: "POST",
|
|
473
|
-
body: recreateSharedInfraRequest
|
|
474
|
-
})));
|
|
475
|
-
}
|
|
476
|
-
/**
|
|
477
|
-
* Delete infrastructure in a workspace.
|
|
478
|
-
*/
|
|
479
|
-
export function deleteSharedInfra({ workspaceId, sharedInfraId }, opts) {
|
|
480
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces/${encodeURIComponent(workspaceId)}/shared-infra/${encodeURIComponent(sharedInfraId)}`, {
|
|
481
|
-
...opts,
|
|
482
|
-
method: "DELETE"
|
|
483
|
-
}));
|
|
484
|
-
}
|
|
485
|
-
/**
|
|
486
|
-
* Update shared infrastructure in a workspace.
|
|
487
|
-
*/
|
|
488
|
-
export function update2({ workspaceId, sharedInfraId, updateSharedInfraRequest }, opts) {
|
|
489
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces/${encodeURIComponent(workspaceId)}/shared-infra/${encodeURIComponent(sharedInfraId)}`, oazapfts.json({
|
|
490
|
-
...opts,
|
|
491
|
-
method: "PATCH",
|
|
492
|
-
body: updateSharedInfraRequest
|
|
493
|
-
})));
|
|
494
|
-
}
|
|
495
|
-
/**
|
|
496
|
-
* Get all shared infra links
|
|
497
|
-
*/
|
|
498
|
-
export function getSharedInfraLinks({ workspaceId, sharedInfraId, name }, opts) {
|
|
499
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces/${encodeURIComponent(workspaceId)}/shared-infra/${encodeURIComponent(sharedInfraId)}/links${QS.query(QS.explode({
|
|
500
|
-
name
|
|
501
|
-
}))}`, {
|
|
502
|
-
...opts
|
|
503
|
-
}));
|
|
504
|
-
}
|
|
505
|
-
/**
|
|
506
|
-
* Create shared infra link
|
|
507
|
-
*/
|
|
508
|
-
export function save3({ workspaceId, sharedInfraId, createSharedInfraLinkRequest }, opts) {
|
|
509
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces/${encodeURIComponent(workspaceId)}/shared-infra/${encodeURIComponent(sharedInfraId)}/links`, oazapfts.json({
|
|
510
|
-
...opts,
|
|
511
|
-
method: "POST",
|
|
512
|
-
body: createSharedInfraLinkRequest
|
|
513
|
-
})));
|
|
514
|
-
}
|
|
515
|
-
/**
|
|
516
|
-
* Has active deploy with type self hosted?
|
|
517
|
-
*/
|
|
518
|
-
export function hasActiveDeployWithTypeSelfHosted({ workspaceId, sharedInfraId }, opts) {
|
|
519
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces/${encodeURIComponent(workspaceId)}/shared-infra/${encodeURIComponent(sharedInfraId)}/has-self-hosted-deploy`, {
|
|
520
|
-
...opts,
|
|
521
|
-
method: "POST"
|
|
522
|
-
}));
|
|
523
|
-
}
|
|
524
|
-
/**
|
|
525
|
-
* Can the shared infra be destroyed?
|
|
526
|
-
*/
|
|
527
|
-
export function canBeDestroyed({ workspaceId, sharedInfraId, environmentId, accountId }, opts) {
|
|
528
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces/${encodeURIComponent(workspaceId)}/shared-infra/${encodeURIComponent(sharedInfraId)}/environments/${encodeURIComponent(environmentId)}/can-be-destroyed`, {
|
|
529
|
-
...opts,
|
|
530
|
-
method: "POST",
|
|
531
|
-
headers: oazapfts.mergeHeaders(opts?.headers, {
|
|
532
|
-
accountId
|
|
533
|
-
})
|
|
534
|
-
}));
|
|
535
|
-
}
|
|
536
|
-
/**
|
|
537
|
-
* Register the snapshot of a shared infrastructure's deploy.
|
|
538
|
-
*/
|
|
539
|
-
export function processDeploySnapshot({ workspaceId, sharedInfraId, sharedInfraDeploySnapshotRequest }, opts) {
|
|
540
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces/${encodeURIComponent(workspaceId)}/shared-infra/${encodeURIComponent(sharedInfraId)}/deploy`, oazapfts.json({
|
|
541
|
-
...opts,
|
|
542
|
-
method: "POST",
|
|
543
|
-
body: sharedInfraDeploySnapshotRequest
|
|
544
|
-
})));
|
|
545
|
-
}
|
|
546
|
-
/**
|
|
547
|
-
* Runs an orchestration in a workspace.
|
|
548
|
-
*/
|
|
549
|
-
export function startRun({ accountId, workspaceId, startRunRequest }, opts) {
|
|
550
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces/${encodeURIComponent(workspaceId)}/run`, oazapfts.json({
|
|
551
|
-
...opts,
|
|
552
|
-
method: "POST",
|
|
553
|
-
body: startRunRequest,
|
|
554
|
-
headers: oazapfts.mergeHeaders(opts?.headers, {
|
|
555
|
-
accountId
|
|
556
|
-
})
|
|
557
|
-
})));
|
|
558
|
-
}
|
|
559
|
-
/**
|
|
560
|
-
* Get all workspace links
|
|
561
|
-
*/
|
|
562
|
-
export function getWorkspaceLinks({ workspaceId, name }, opts) {
|
|
563
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces/${encodeURIComponent(workspaceId)}/links${QS.query(QS.explode({
|
|
564
|
-
name
|
|
565
|
-
}))}`, {
|
|
566
|
-
...opts
|
|
567
|
-
}));
|
|
568
|
-
}
|
|
569
|
-
/**
|
|
570
|
-
* Create workspace
|
|
571
|
-
*/
|
|
572
|
-
export function save4({ workspaceId, createWorkspaceLinkRequest }, opts) {
|
|
573
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces/${encodeURIComponent(workspaceId)}/links`, oazapfts.json({
|
|
574
|
-
...opts,
|
|
575
|
-
method: "POST",
|
|
576
|
-
body: createWorkspaceLinkRequest
|
|
577
|
-
})));
|
|
578
|
-
}
|
|
579
|
-
/**
|
|
580
|
-
* Get all workspace embedded links
|
|
581
|
-
*/
|
|
582
|
-
export function getEmbeddedLinks({ workspaceId, name }, opts) {
|
|
583
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces/${encodeURIComponent(workspaceId)}/embedded-links${QS.query(QS.explode({
|
|
584
|
-
name
|
|
585
|
-
}))}`, {
|
|
586
|
-
...opts
|
|
587
|
-
}));
|
|
588
|
-
}
|
|
589
|
-
/**
|
|
590
|
-
* Create workspace embedded link
|
|
591
|
-
*/
|
|
592
|
-
export function save5({ workspaceId, createWorkspaceEmbeddedLinkRequest }, opts) {
|
|
593
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces/${encodeURIComponent(workspaceId)}/embedded-links`, oazapfts.json({
|
|
594
|
-
...opts,
|
|
595
|
-
method: "POST",
|
|
596
|
-
body: createWorkspaceEmbeddedLinkRequest
|
|
597
|
-
})));
|
|
598
|
-
}
|
|
599
|
-
/**
|
|
600
|
-
* List all connection interfaces of a workspace.
|
|
601
|
-
*/
|
|
602
|
-
export function getConnectionInterfaces({ workspaceId, typeId }, opts) {
|
|
603
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces/${encodeURIComponent(workspaceId)}/connection-interfaces${QS.query(QS.explode({
|
|
604
|
-
typeId
|
|
605
|
-
}))}`, {
|
|
606
|
-
...opts
|
|
607
|
-
}));
|
|
608
|
-
}
|
|
609
|
-
/**
|
|
610
|
-
* Create a connection interface in a workspace.
|
|
611
|
-
*/
|
|
612
|
-
export function add({ workspaceId, createConnectionInterfaceRequest }, opts) {
|
|
613
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces/${encodeURIComponent(workspaceId)}/connection-interfaces`, oazapfts.json({
|
|
614
|
-
...opts,
|
|
615
|
-
method: "POST",
|
|
616
|
-
body: createConnectionInterfaceRequest
|
|
617
|
-
})));
|
|
618
|
-
}
|
|
619
|
-
/**
|
|
620
|
-
* Update the visibility of a connection interface.
|
|
621
|
-
*/
|
|
622
|
-
export function updateConnectionInterfaceVisibility({ workspaceId, connectionInterfaceId, updateConnectionInterfaceVisibilityRequest }, opts) {
|
|
623
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces/${encodeURIComponent(workspaceId)}/connection-interfaces/${encodeURIComponent(connectionInterfaceId)}/visibility/batch`, oazapfts.json({
|
|
624
|
-
...opts,
|
|
625
|
-
method: "POST",
|
|
626
|
-
body: updateConnectionInterfaceVisibilityRequest
|
|
627
|
-
})));
|
|
628
|
-
}
|
|
629
|
-
/**
|
|
630
|
-
* Get all application of a workspace.
|
|
631
|
-
*/
|
|
632
|
-
export function getApplications({ workspaceId, name, stackVersionId }, opts) {
|
|
633
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces/${encodeURIComponent(workspaceId)}/applications${QS.query(QS.explode({
|
|
634
|
-
name,
|
|
635
|
-
stackVersionId
|
|
636
|
-
}))}`, {
|
|
637
|
-
...opts
|
|
638
|
-
}));
|
|
639
|
-
}
|
|
640
|
-
/**
|
|
641
|
-
* Create application on workspace.
|
|
642
|
-
*/
|
|
643
|
-
export function save6({ workspaceId, fromPortal, createApplicationRequest }, opts) {
|
|
644
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces/${encodeURIComponent(workspaceId)}/applications${QS.query(QS.explode({
|
|
645
|
-
fromPortal
|
|
646
|
-
}))}`, oazapfts.json({
|
|
647
|
-
...opts,
|
|
648
|
-
method: "POST",
|
|
649
|
-
body: createApplicationRequest
|
|
650
|
-
})));
|
|
651
|
-
}
|
|
652
|
-
/**
|
|
653
|
-
* Get application of a workspace.
|
|
654
|
-
*/
|
|
655
|
-
export function getApplication({ workspaceId, applicationId }, opts) {
|
|
656
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces/${encodeURIComponent(workspaceId)}/applications/${encodeURIComponent(applicationId)}`, {
|
|
657
|
-
...opts
|
|
658
|
-
}));
|
|
659
|
-
}
|
|
660
|
-
/**
|
|
661
|
-
* Recreate an application in a workspace.
|
|
662
|
-
*/
|
|
663
|
-
export function recreate1({ workspaceId, applicationId, recreateApplicationRequest }, opts) {
|
|
664
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces/${encodeURIComponent(workspaceId)}/applications/${encodeURIComponent(applicationId)}`, oazapfts.json({
|
|
665
|
-
...opts,
|
|
666
|
-
method: "POST",
|
|
667
|
-
body: recreateApplicationRequest
|
|
668
|
-
})));
|
|
669
|
-
}
|
|
670
|
-
/**
|
|
671
|
-
* Delete application of a workspace.
|
|
672
|
-
*/
|
|
673
|
-
export function deleteApplication({ workspaceId, applicationId, accountId }, opts) {
|
|
674
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces/${encodeURIComponent(workspaceId)}/applications/${encodeURIComponent(applicationId)}`, {
|
|
675
|
-
...opts,
|
|
676
|
-
method: "DELETE",
|
|
677
|
-
headers: oazapfts.mergeHeaders(opts?.headers, {
|
|
678
|
-
accountId
|
|
679
|
-
})
|
|
680
|
-
}));
|
|
681
|
-
}
|
|
682
|
-
/**
|
|
683
|
-
* Update an application of a workspace.
|
|
684
|
-
*/
|
|
685
|
-
export function update6({ workspaceId, applicationId, updateApplicationRequest }, opts) {
|
|
686
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces/${encodeURIComponent(workspaceId)}/applications/${encodeURIComponent(applicationId)}`, oazapfts.json({
|
|
687
|
-
...opts,
|
|
688
|
-
method: "PATCH",
|
|
689
|
-
body: updateApplicationRequest
|
|
690
|
-
})));
|
|
691
|
-
}
|
|
692
|
-
/**
|
|
693
|
-
* Get all application links
|
|
694
|
-
*/
|
|
695
|
-
export function getApplicationLinks({ workspaceId, applicationId, name }, opts) {
|
|
696
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces/${encodeURIComponent(workspaceId)}/applications/${encodeURIComponent(applicationId)}/links${QS.query(QS.explode({
|
|
697
|
-
name
|
|
698
|
-
}))}`, {
|
|
699
|
-
...opts
|
|
700
|
-
}));
|
|
701
|
-
}
|
|
702
|
-
/**
|
|
703
|
-
* Create application link
|
|
704
|
-
*/
|
|
705
|
-
export function save7({ workspaceId, applicationId, createApplicationLinkRequest }, opts) {
|
|
706
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces/${encodeURIComponent(workspaceId)}/applications/${encodeURIComponent(applicationId)}/links`, oazapfts.json({
|
|
707
|
-
...opts,
|
|
708
|
-
method: "POST",
|
|
709
|
-
body: createApplicationLinkRequest
|
|
710
|
-
})));
|
|
711
|
-
}
|
|
712
|
-
/**
|
|
713
|
-
* Has active deploy with type self hosted?
|
|
714
|
-
*/
|
|
715
|
-
export function hasActiveDeployWithTypeSelfHosted1({ workspaceId, applicationId }, opts) {
|
|
716
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces/${encodeURIComponent(workspaceId)}/applications/${encodeURIComponent(applicationId)}/has-self-hosted-deploy`, {
|
|
717
|
-
...opts,
|
|
718
|
-
method: "POST"
|
|
719
|
-
}));
|
|
720
|
-
}
|
|
721
|
-
/**
|
|
722
|
-
* Can the application be destroyed?
|
|
723
|
-
*/
|
|
724
|
-
export function canBeDestroyed1({ workspaceId, applicationId, environmentId, accountId }, opts) {
|
|
725
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces/${encodeURIComponent(workspaceId)}/applications/${encodeURIComponent(applicationId)}/environments/${encodeURIComponent(environmentId)}/can-be-destroyed`, {
|
|
726
|
-
...opts,
|
|
727
|
-
method: "POST",
|
|
728
|
-
headers: oazapfts.mergeHeaders(opts?.headers, {
|
|
729
|
-
accountId
|
|
730
|
-
})
|
|
731
|
-
}));
|
|
732
|
-
}
|
|
733
|
-
export function registryAppDestroy({ workspaceId, applicationId, environmentId, applicationDestroyRequest }, opts) {
|
|
734
|
-
return oazapfts.ok(oazapfts.fetchText(`/v1/workspaces/${encodeURIComponent(workspaceId)}/applications/${encodeURIComponent(applicationId)}/environments/${encodeURIComponent(environmentId)}/app-destroy`, oazapfts.json({
|
|
735
|
-
...opts,
|
|
736
|
-
method: "POST",
|
|
737
|
-
body: applicationDestroyRequest
|
|
738
|
-
})));
|
|
739
|
-
}
|
|
740
|
-
export function registryAppDeploy({ workspaceId, applicationId, environmentId, applicationDeployRequest }, opts) {
|
|
741
|
-
return oazapfts.ok(oazapfts.fetchText(`/v1/workspaces/${encodeURIComponent(workspaceId)}/applications/${encodeURIComponent(applicationId)}/environments/${encodeURIComponent(environmentId)}/app-deploy`, oazapfts.json({
|
|
742
|
-
...opts,
|
|
743
|
-
method: "POST",
|
|
744
|
-
body: applicationDeployRequest
|
|
745
|
-
})));
|
|
746
|
-
}
|
|
747
|
-
/**
|
|
748
|
-
* Get all application embedded links
|
|
749
|
-
*/
|
|
750
|
-
export function getEmbeddedLinks1({ workspaceId, applicationId, name }, opts) {
|
|
751
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces/${encodeURIComponent(workspaceId)}/applications/${encodeURIComponent(applicationId)}/embedded-links${QS.query(QS.explode({
|
|
752
|
-
name
|
|
753
|
-
}))}`, {
|
|
754
|
-
...opts
|
|
755
|
-
}));
|
|
756
|
-
}
|
|
757
|
-
/**
|
|
758
|
-
* Create application embedded link
|
|
759
|
-
*/
|
|
760
|
-
export function save8({ workspaceId, applicationId, createApplicationEmbeddedLinkRequest }, opts) {
|
|
761
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces/${encodeURIComponent(workspaceId)}/applications/${encodeURIComponent(applicationId)}/embedded-links`, oazapfts.json({
|
|
762
|
-
...opts,
|
|
763
|
-
method: "POST",
|
|
764
|
-
body: createApplicationEmbeddedLinkRequest
|
|
765
|
-
})));
|
|
766
|
-
}
|
|
767
|
-
/**
|
|
768
|
-
* Register the snapshot of an application's deploy.
|
|
769
|
-
*/
|
|
770
|
-
export function processDeploySnapshot1({ workspaceId, applicationId, applicationDeploySnapshotRequest }, opts) {
|
|
771
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces/${encodeURIComponent(workspaceId)}/applications/${encodeURIComponent(applicationId)}/deploy`, oazapfts.json({
|
|
772
|
-
...opts,
|
|
773
|
-
method: "POST",
|
|
774
|
-
body: applicationDeploySnapshotRequest
|
|
775
|
-
})));
|
|
776
|
-
}
|
|
777
|
-
/**
|
|
778
|
-
* List all workspaces usage by stack version list.
|
|
779
|
-
*/
|
|
780
|
-
export function listAllStackUsage({ accountId, body }, opts) {
|
|
781
|
-
return oazapfts.ok(oazapfts.fetchJson("/v1/workspaces/stacks/usage", oazapfts.json({
|
|
782
|
-
...opts,
|
|
783
|
-
method: "POST",
|
|
784
|
-
body,
|
|
785
|
-
headers: oazapfts.mergeHeaders(opts?.headers, {
|
|
786
|
-
accountId
|
|
787
|
-
})
|
|
788
|
-
})));
|
|
789
|
-
}
|
|
790
|
-
/**
|
|
791
|
-
* Retrieve the amount of apps and shared infras that use the given plugin version id list
|
|
792
|
-
*/
|
|
793
|
-
export function findPluginUsageAmount({ accountId, body }, opts) {
|
|
794
|
-
return oazapfts.ok(oazapfts.fetchJson("/v1/plugin-usage", oazapfts.json({
|
|
795
|
-
...opts,
|
|
796
|
-
method: "POST",
|
|
797
|
-
body,
|
|
798
|
-
headers: oazapfts.mergeHeaders(opts?.headers, {
|
|
799
|
-
accountId
|
|
800
|
-
})
|
|
801
|
-
})));
|
|
802
|
-
}
|
|
803
|
-
/**
|
|
804
|
-
* Get environments
|
|
805
|
-
*/
|
|
806
|
-
export function getEnvironments({ accountId }, opts) {
|
|
807
|
-
return oazapfts.ok(oazapfts.fetchJson("/v1/environments", {
|
|
808
|
-
...opts,
|
|
809
|
-
headers: oazapfts.mergeHeaders(opts?.headers, {
|
|
810
|
-
accountId
|
|
811
|
-
})
|
|
812
|
-
}));
|
|
813
|
-
}
|
|
814
|
-
/**
|
|
815
|
-
* Save environment
|
|
816
|
-
*/
|
|
817
|
-
export function save9({ environmentSaveRequest }, opts) {
|
|
818
|
-
return oazapfts.ok(oazapfts.fetchJson("/v1/environments", oazapfts.json({
|
|
819
|
-
...opts,
|
|
820
|
-
method: "POST",
|
|
821
|
-
body: environmentSaveRequest
|
|
822
|
-
})));
|
|
823
|
-
}
|
|
824
|
-
/**
|
|
825
|
-
* Batch save environment
|
|
826
|
-
*/
|
|
827
|
-
export function saveBatch({ accountId, body }, opts) {
|
|
828
|
-
return oazapfts.ok(oazapfts.fetchJson("/v1/environments/batch", oazapfts.json({
|
|
829
|
-
...opts,
|
|
830
|
-
method: "POST",
|
|
831
|
-
body,
|
|
832
|
-
headers: oazapfts.mergeHeaders(opts?.headers, {
|
|
833
|
-
accountId
|
|
834
|
-
})
|
|
835
|
-
})));
|
|
836
|
-
}
|
|
837
|
-
/**
|
|
838
|
-
* List all workflows of an account.
|
|
839
|
-
*/
|
|
840
|
-
export function listAccountWorkflows({ $type, name }, opts) {
|
|
841
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/account/workflows${QS.query(QS.explode({
|
|
842
|
-
"type": $type,
|
|
843
|
-
name
|
|
844
|
-
}))}`, {
|
|
845
|
-
...opts
|
|
846
|
-
}));
|
|
847
|
-
}
|
|
848
|
-
/**
|
|
849
|
-
* Create an account workflow
|
|
850
|
-
*/
|
|
851
|
-
export function saveAccountWorkflow({ accountWorkflowCreateRequest }, opts) {
|
|
852
|
-
return oazapfts.ok(oazapfts.fetchJson("/v1/account/workflows", oazapfts.json({
|
|
853
|
-
...opts,
|
|
854
|
-
method: "POST",
|
|
855
|
-
body: accountWorkflowCreateRequest
|
|
856
|
-
})));
|
|
857
|
-
}
|
|
858
|
-
/**
|
|
859
|
-
* List all stacks with context for given account and given stackVersionId list.
|
|
860
|
-
*/
|
|
861
|
-
export function listStackVersionsWithAccountContext({ body }, opts) {
|
|
862
|
-
return oazapfts.ok(oazapfts.fetchJson("/v1/account/stacks-with-context", oazapfts.json({
|
|
863
|
-
...opts,
|
|
864
|
-
method: "POST",
|
|
865
|
-
body
|
|
866
|
-
})));
|
|
867
|
-
}
|
|
868
|
-
/**
|
|
869
|
-
* Get workspace by id
|
|
870
|
-
*/
|
|
871
|
-
export function getWorkspaceForId({ workspaceId }, opts) {
|
|
872
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces/${encodeURIComponent(workspaceId)}`, {
|
|
873
|
-
...opts
|
|
874
|
-
}));
|
|
875
|
-
}
|
|
876
|
-
/**
|
|
877
|
-
* Delete workspace.
|
|
878
|
-
*/
|
|
879
|
-
export function deleteV1WorkspacesByWorkspaceId({ workspaceId }, opts) {
|
|
880
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces/${encodeURIComponent(workspaceId)}`, {
|
|
881
|
-
...opts,
|
|
882
|
-
method: "DELETE"
|
|
883
|
-
}));
|
|
884
|
-
}
|
|
885
|
-
/**
|
|
886
|
-
* Update workspace
|
|
887
|
-
*/
|
|
888
|
-
export function update1({ workspaceId, updateWorkspaceRequest }, opts) {
|
|
889
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces/${encodeURIComponent(workspaceId)}`, oazapfts.json({
|
|
890
|
-
...opts,
|
|
891
|
-
method: "PATCH",
|
|
892
|
-
body: updateWorkspaceRequest
|
|
893
|
-
})));
|
|
894
|
-
}
|
|
895
|
-
/**
|
|
896
|
-
* Get shared infra links by id
|
|
897
|
-
*/
|
|
898
|
-
export function getSharedInfraLink({ workspaceId, sharedInfraId, linkId }, opts) {
|
|
899
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces/${encodeURIComponent(workspaceId)}/shared-infra/${encodeURIComponent(sharedInfraId)}/links/${encodeURIComponent(linkId)}`, {
|
|
900
|
-
...opts
|
|
901
|
-
}));
|
|
902
|
-
}
|
|
903
|
-
/**
|
|
904
|
-
* Delete shared infra links
|
|
905
|
-
*/
|
|
906
|
-
export function delete2({ workspaceId, sharedInfraId, linkId }, opts) {
|
|
907
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces/${encodeURIComponent(workspaceId)}/shared-infra/${encodeURIComponent(sharedInfraId)}/links/${encodeURIComponent(linkId)}`, {
|
|
908
|
-
...opts,
|
|
909
|
-
method: "DELETE"
|
|
910
|
-
}));
|
|
911
|
-
}
|
|
912
|
-
/**
|
|
913
|
-
* Update shared infra links
|
|
914
|
-
*/
|
|
915
|
-
export function update3({ workspaceId, sharedInfraId, linkId, updateSharedInfraLinkRequest }, opts) {
|
|
916
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces/${encodeURIComponent(workspaceId)}/shared-infra/${encodeURIComponent(sharedInfraId)}/links/${encodeURIComponent(linkId)}`, oazapfts.json({
|
|
917
|
-
...opts,
|
|
918
|
-
method: "PATCH",
|
|
919
|
-
body: updateSharedInfraLinkRequest
|
|
920
|
-
})));
|
|
921
|
-
}
|
|
922
|
-
/**
|
|
923
|
-
* Get workspace link by id
|
|
924
|
-
*/
|
|
925
|
-
export function getWorkspaceLink({ workspaceId, linkId }, opts) {
|
|
926
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces/${encodeURIComponent(workspaceId)}/links/${encodeURIComponent(linkId)}`, {
|
|
927
|
-
...opts
|
|
928
|
-
}));
|
|
929
|
-
}
|
|
930
|
-
/**
|
|
931
|
-
* Delete workspace links
|
|
932
|
-
*/
|
|
933
|
-
export function delete3({ workspaceId, linkId }, opts) {
|
|
934
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces/${encodeURIComponent(workspaceId)}/links/${encodeURIComponent(linkId)}`, {
|
|
935
|
-
...opts,
|
|
936
|
-
method: "DELETE"
|
|
937
|
-
}));
|
|
938
|
-
}
|
|
939
|
-
/**
|
|
940
|
-
* Update workspace links
|
|
941
|
-
*/
|
|
942
|
-
export function update4({ workspaceId, linkId, updateWorkspaceLinkRequest }, opts) {
|
|
943
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces/${encodeURIComponent(workspaceId)}/links/${encodeURIComponent(linkId)}`, oazapfts.json({
|
|
944
|
-
...opts,
|
|
945
|
-
method: "PATCH",
|
|
946
|
-
body: updateWorkspaceLinkRequest
|
|
947
|
-
})));
|
|
948
|
-
}
|
|
949
|
-
/**
|
|
950
|
-
* Get workspace embedded link by id
|
|
951
|
-
*/
|
|
952
|
-
export function getEmbeddedLink({ workspaceId, embeddedLinkId }, opts) {
|
|
953
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces/${encodeURIComponent(workspaceId)}/embedded-links/${encodeURIComponent(embeddedLinkId)}`, {
|
|
954
|
-
...opts
|
|
955
|
-
}));
|
|
956
|
-
}
|
|
957
|
-
/**
|
|
958
|
-
* Delete workspace embedded link
|
|
959
|
-
*/
|
|
960
|
-
export function delete4({ workspaceId, embeddedLinkId }, opts) {
|
|
961
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces/${encodeURIComponent(workspaceId)}/embedded-links/${encodeURIComponent(embeddedLinkId)}`, {
|
|
962
|
-
...opts,
|
|
963
|
-
method: "DELETE"
|
|
964
|
-
}));
|
|
965
|
-
}
|
|
966
|
-
/**
|
|
967
|
-
* Update workspace embedded link
|
|
968
|
-
*/
|
|
969
|
-
export function update5({ workspaceId, embeddedLinkId, updateWorkspaceEmbeddedLinkRequest }, opts) {
|
|
970
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces/${encodeURIComponent(workspaceId)}/embedded-links/${encodeURIComponent(embeddedLinkId)}`, oazapfts.json({
|
|
971
|
-
...opts,
|
|
972
|
-
method: "PATCH",
|
|
973
|
-
body: updateWorkspaceEmbeddedLinkRequest
|
|
974
|
-
})));
|
|
975
|
-
}
|
|
976
|
-
/**
|
|
977
|
-
* Upsert workspace embedded link
|
|
978
|
-
*/
|
|
979
|
-
export function upsertBatch1({ workspaceId, body }, opts) {
|
|
980
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces/${encodeURIComponent(workspaceId)}/embedded-links/batch`, oazapfts.json({
|
|
981
|
-
...opts,
|
|
982
|
-
method: "PATCH",
|
|
983
|
-
body
|
|
984
|
-
})));
|
|
985
|
-
}
|
|
986
|
-
/**
|
|
987
|
-
* Get application link by id
|
|
988
|
-
*/
|
|
989
|
-
export function getApplicationLink({ workspaceId, applicationId, linkId }, opts) {
|
|
990
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces/${encodeURIComponent(workspaceId)}/applications/${encodeURIComponent(applicationId)}/links/${encodeURIComponent(linkId)}`, {
|
|
991
|
-
...opts
|
|
992
|
-
}));
|
|
993
|
-
}
|
|
994
|
-
/**
|
|
995
|
-
* Delete workspace links
|
|
996
|
-
*/
|
|
997
|
-
export function delete5({ workspaceId, applicationId, linkId }, opts) {
|
|
998
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces/${encodeURIComponent(workspaceId)}/applications/${encodeURIComponent(applicationId)}/links/${encodeURIComponent(linkId)}`, {
|
|
999
|
-
...opts,
|
|
1000
|
-
method: "DELETE"
|
|
1001
|
-
}));
|
|
1002
|
-
}
|
|
1003
|
-
/**
|
|
1004
|
-
* Update application links
|
|
1005
|
-
*/
|
|
1006
|
-
export function update7({ workspaceId, applicationId, linkId, updateApplicationLinkRequest }, opts) {
|
|
1007
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces/${encodeURIComponent(workspaceId)}/applications/${encodeURIComponent(applicationId)}/links/${encodeURIComponent(linkId)}`, oazapfts.json({
|
|
1008
|
-
...opts,
|
|
1009
|
-
method: "PATCH",
|
|
1010
|
-
body: updateApplicationLinkRequest
|
|
1011
|
-
})));
|
|
1012
|
-
}
|
|
1013
|
-
/**
|
|
1014
|
-
* Get application embedded link by id
|
|
1015
|
-
*/
|
|
1016
|
-
export function getEmbeddedLink1({ workspaceId, applicationId, embeddedLinkId }, opts) {
|
|
1017
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces/${encodeURIComponent(workspaceId)}/applications/${encodeURIComponent(applicationId)}/embedded-links/${encodeURIComponent(embeddedLinkId)}`, {
|
|
1018
|
-
...opts
|
|
1019
|
-
}));
|
|
1020
|
-
}
|
|
1021
|
-
/**
|
|
1022
|
-
* Delete application embedded link
|
|
1023
|
-
*/
|
|
1024
|
-
export function delete6({ workspaceId, applicationId, embeddedLinkId }, opts) {
|
|
1025
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces/${encodeURIComponent(workspaceId)}/applications/${encodeURIComponent(applicationId)}/embedded-links/${encodeURIComponent(embeddedLinkId)}`, {
|
|
1026
|
-
...opts,
|
|
1027
|
-
method: "DELETE"
|
|
1028
|
-
}));
|
|
1029
|
-
}
|
|
1030
|
-
/**
|
|
1031
|
-
* Update application embedded link
|
|
1032
|
-
*/
|
|
1033
|
-
export function update8({ workspaceId, applicationId, embeddedLinkId, updateApplicationEmbeddedLinkRequest }, opts) {
|
|
1034
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces/${encodeURIComponent(workspaceId)}/applications/${encodeURIComponent(applicationId)}/embedded-links/${encodeURIComponent(embeddedLinkId)}`, oazapfts.json({
|
|
1035
|
-
...opts,
|
|
1036
|
-
method: "PATCH",
|
|
1037
|
-
body: updateApplicationEmbeddedLinkRequest
|
|
1038
|
-
})));
|
|
1039
|
-
}
|
|
1040
|
-
/**
|
|
1041
|
-
* Upsert application embedded link
|
|
1042
|
-
*/
|
|
1043
|
-
export function upsertBatch2({ workspaceId, applicationId, body }, opts) {
|
|
1044
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces/${encodeURIComponent(workspaceId)}/applications/${encodeURIComponent(applicationId)}/embedded-links/batch`, oazapfts.json({
|
|
1045
|
-
...opts,
|
|
1046
|
-
method: "PATCH",
|
|
1047
|
-
body
|
|
1048
|
-
})));
|
|
1049
|
-
}
|
|
1050
|
-
/**
|
|
1051
|
-
* Archive application from a workspace.
|
|
1052
|
-
*/
|
|
1053
|
-
export function archiveApplication({ workspaceId, applicationId }, opts) {
|
|
1054
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces/${encodeURIComponent(workspaceId)}/applications/${encodeURIComponent(applicationId)}/archive`, {
|
|
1055
|
-
...opts,
|
|
1056
|
-
method: "PATCH"
|
|
1057
|
-
}));
|
|
1058
|
-
}
|
|
1059
|
-
/**
|
|
1060
|
-
* Get environment by id
|
|
1061
|
-
*/
|
|
1062
|
-
export function getEnvironment({ id }, opts) {
|
|
1063
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/environments/${encodeURIComponent(id)}`, {
|
|
1064
|
-
...opts
|
|
1065
|
-
}));
|
|
1066
|
-
}
|
|
1067
|
-
/**
|
|
1068
|
-
* Update environment
|
|
1069
|
-
*/
|
|
1070
|
-
export function update9({ id, environmentUpdateRequest }, opts) {
|
|
1071
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/environments/${encodeURIComponent(id)}`, oazapfts.json({
|
|
1072
|
-
...opts,
|
|
1073
|
-
method: "PATCH",
|
|
1074
|
-
body: environmentUpdateRequest
|
|
1075
|
-
})));
|
|
1076
|
-
}
|
|
1077
|
-
/**
|
|
1078
|
-
* Get plugins applied to a workspace's shared infrastructure.
|
|
1079
|
-
*/
|
|
1080
|
-
export function getAppliedPlugins({ workspaceId, sharedInfraId, environmentId }, opts) {
|
|
1081
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v2/workspaces/${encodeURIComponent(workspaceId)}/shared-infra/${encodeURIComponent(sharedInfraId)}/environments/${encodeURIComponent(environmentId)}/plugins`, {
|
|
1082
|
-
...opts
|
|
1083
|
-
}));
|
|
1084
|
-
}
|
|
1085
|
-
/**
|
|
1086
|
-
* List all available connection interfaces for a workspace.
|
|
1087
|
-
*/
|
|
1088
|
-
export function getAvailableConnectionInterfacesForAWorkspace({ workspaceId, typeId, automaticallyGenerated }, opts) {
|
|
1089
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v2/workspaces/${encodeURIComponent(workspaceId)}/available-connection-interfaces${QS.query(QS.explode({
|
|
1090
|
-
typeId,
|
|
1091
|
-
automaticallyGenerated
|
|
1092
|
-
}))}`, {
|
|
1093
|
-
...opts
|
|
1094
|
-
}));
|
|
1095
|
-
}
|
|
1096
|
-
/**
|
|
1097
|
-
* Get available connection interface for a workspace by its slug.
|
|
1098
|
-
*/
|
|
1099
|
-
export function getAvailableConnectionInterfaceForAWorkspace({ workspaceId, slug, environmentId, accountId }, opts) {
|
|
1100
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v2/workspaces/${encodeURIComponent(workspaceId)}/available-connection-interfaces/${encodeURIComponent(slug)}${QS.query(QS.explode({
|
|
1101
|
-
environmentId
|
|
1102
|
-
}))}`, {
|
|
1103
|
-
...opts,
|
|
1104
|
-
headers: oazapfts.mergeHeaders(opts?.headers, {
|
|
1105
|
-
accountId
|
|
1106
|
-
})
|
|
1107
|
-
}));
|
|
1108
|
-
}
|
|
1109
|
-
/**
|
|
1110
|
-
* Get plugins applied to a workspace's application.
|
|
1111
|
-
*/
|
|
1112
|
-
export function getAppliedPlugins1({ workspaceId, applicationId, environmentId }, opts) {
|
|
1113
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v2/workspaces/${encodeURIComponent(workspaceId)}/applications/${encodeURIComponent(applicationId)}/environments/${encodeURIComponent(environmentId)}/plugins`, {
|
|
1114
|
-
...opts
|
|
1115
|
-
}));
|
|
1116
|
-
}
|
|
1117
|
-
/**
|
|
1118
|
-
* List all available connection interfaces for an application.
|
|
1119
|
-
*/
|
|
1120
|
-
export function getAvailableConnectionInterfacesForAnApplication({ applicationId, typeId, automaticallyGenerated }, opts) {
|
|
1121
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v2/applications/${encodeURIComponent(applicationId)}/available-connection-interfaces${QS.query(QS.explode({
|
|
1122
|
-
typeId,
|
|
1123
|
-
automaticallyGenerated
|
|
1124
|
-
}))}`, {
|
|
1125
|
-
...opts
|
|
1126
|
-
}));
|
|
1127
|
-
}
|
|
1128
|
-
/**
|
|
1129
|
-
* Get available connection interface for an application by its slug.
|
|
1130
|
-
*/
|
|
1131
|
-
export function getAvailableConnectionInterfaceForAnApplication({ applicationId, slug, environmentId }, opts) {
|
|
1132
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v2/applications/${encodeURIComponent(applicationId)}/available-connection-interfaces/${encodeURIComponent(slug)}${QS.query(QS.explode({
|
|
1133
|
-
environmentId
|
|
1134
|
-
}))}`, {
|
|
1135
|
-
...opts
|
|
1136
|
-
}));
|
|
1137
|
-
}
|
|
1138
|
-
/**
|
|
1139
|
-
* Get connection interface in use by applicationId or sharedInfraId.
|
|
1140
|
-
*/
|
|
1141
|
-
export function getConnectionInterfaceInUseTargetId({ workspaceId, targetId, targetType, slug, accountId, environmentId }, opts) {
|
|
1142
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces/${encodeURIComponent(workspaceId)}/${encodeURIComponent(targetType)}/${encodeURIComponent(targetId)}/connection-interfaces-in-use/${encodeURIComponent(slug)}/plugins${QS.query(QS.explode({
|
|
1143
|
-
environmentId
|
|
1144
|
-
}))}`, {
|
|
1145
|
-
...opts,
|
|
1146
|
-
headers: oazapfts.mergeHeaders(opts?.headers, {
|
|
1147
|
-
accountId
|
|
1148
|
-
})
|
|
1149
|
-
}));
|
|
1150
|
-
}
|
|
1151
|
-
/**
|
|
1152
|
-
* Get stack in a workspace by stack version id.
|
|
1153
|
-
*/
|
|
1154
|
-
export function getStackById({ workspaceId, stackVersionId }, opts) {
|
|
1155
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces/${encodeURIComponent(workspaceId)}/stacks/${encodeURIComponent(stackVersionId)}`, {
|
|
1156
|
-
...opts
|
|
1157
|
-
}));
|
|
1158
|
-
}
|
|
1159
|
-
/**
|
|
1160
|
-
* Delete a stack from a workspace.
|
|
1161
|
-
*/
|
|
1162
|
-
export function deleteStack({ workspaceId, stackVersionId }, opts) {
|
|
1163
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces/${encodeURIComponent(workspaceId)}/stacks/${encodeURIComponent(stackVersionId)}`, {
|
|
1164
|
-
...opts,
|
|
1165
|
-
method: "DELETE"
|
|
1166
|
-
}));
|
|
1167
|
-
}
|
|
1168
|
-
/**
|
|
1169
|
-
* List the consolidated input context of all stack elements for given type in a workspace.
|
|
1170
|
-
*/
|
|
1171
|
-
export function listConsolidatedContext({ workspaceId, stackVersionId, $type, environmentId, externalId }, opts) {
|
|
1172
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces/${encodeURIComponent(workspaceId)}/stacks/${encodeURIComponent(stackVersionId)}/${encodeURIComponent($type)}-context${QS.query(QS.explode({
|
|
1173
|
-
environmentId,
|
|
1174
|
-
externalId
|
|
1175
|
-
}))}`, {
|
|
1176
|
-
...opts
|
|
1177
|
-
}));
|
|
1178
|
-
}
|
|
1179
|
-
/**
|
|
1180
|
-
* Get workflow settings with context by stack and workflowType
|
|
1181
|
-
*/
|
|
1182
|
-
export function listWorkflowByStackIdAndWorkflowType({ workspaceId, stackId, workflowType }, opts) {
|
|
1183
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces/${encodeURIComponent(workspaceId)}/stacks/${encodeURIComponent(stackId)}/workflows/${encodeURIComponent(workflowType)}`, {
|
|
1184
|
-
...opts
|
|
1185
|
-
}));
|
|
1186
|
-
}
|
|
1187
|
-
/**
|
|
1188
|
-
* Get plugins applied to a workspace's shared infrastructure.
|
|
1189
|
-
*/
|
|
1190
|
-
export function getAppliedPlugins2({ workspaceId, sharedInfraId, environmentId, $type }, opts) {
|
|
1191
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces/${encodeURIComponent(workspaceId)}/shared-infra/${encodeURIComponent(sharedInfraId)}/environments/${encodeURIComponent(environmentId)}/plugins${QS.query(QS.explode({
|
|
1192
|
-
"type": $type
|
|
1193
|
-
}))}`, {
|
|
1194
|
-
...opts
|
|
1195
|
-
}));
|
|
1196
|
-
}
|
|
1197
|
-
/**
|
|
1198
|
-
* List shared infrastructure's activities.
|
|
1199
|
-
*/
|
|
1200
|
-
export function listActivities({ workspaceId, sharedInfraId, environmentId, $type }, opts) {
|
|
1201
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces/${encodeURIComponent(workspaceId)}/shared-infra/${encodeURIComponent(sharedInfraId)}/environments/${encodeURIComponent(environmentId)}/activities${QS.query(QS.explode({
|
|
1202
|
-
"type": $type
|
|
1203
|
-
}))}`, {
|
|
1204
|
-
...opts
|
|
1205
|
-
}));
|
|
1206
|
-
}
|
|
1207
|
-
/**
|
|
1208
|
-
* Get a connection interface by connection interface id.
|
|
1209
|
-
*/
|
|
1210
|
-
export function getConnectionInterface({ workspaceId, connectionInterfaceId, environmentId }, opts) {
|
|
1211
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces/${encodeURIComponent(workspaceId)}/connection-interfaces/${encodeURIComponent(connectionInterfaceId)}${QS.query(QS.explode({
|
|
1212
|
-
environmentId
|
|
1213
|
-
}))}`, {
|
|
1214
|
-
...opts
|
|
1215
|
-
}));
|
|
1216
|
-
}
|
|
1217
|
-
/**
|
|
1218
|
-
* Get all connection interface in use.
|
|
1219
|
-
*/
|
|
1220
|
-
export function getAllConnectionInterfaceInUse({ workspaceId, accountId }, opts) {
|
|
1221
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces/${encodeURIComponent(workspaceId)}/connection-interfaces-in-use`, {
|
|
1222
|
-
...opts,
|
|
1223
|
-
headers: oazapfts.mergeHeaders(opts?.headers, {
|
|
1224
|
-
accountId
|
|
1225
|
-
})
|
|
1226
|
-
}));
|
|
1227
|
-
}
|
|
1228
|
-
/**
|
|
1229
|
-
* Get connection interface in use by slug.
|
|
1230
|
-
*/
|
|
1231
|
-
export function getConnectionInterfaceInUseBySlug({ workspaceId, slug, accountId }, opts) {
|
|
1232
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces/${encodeURIComponent(workspaceId)}/connection-interfaces-in-use/${encodeURIComponent(slug)}`, {
|
|
1233
|
-
...opts,
|
|
1234
|
-
headers: oazapfts.mergeHeaders(opts?.headers, {
|
|
1235
|
-
accountId
|
|
1236
|
-
})
|
|
1237
|
-
}));
|
|
1238
|
-
}
|
|
1239
|
-
/**
|
|
1240
|
-
* List all available connection interfaces for a workspace.
|
|
1241
|
-
*/
|
|
1242
|
-
export function getAvailableConnectionInterfacesForAWorkspace1({ workspaceId, typeId }, opts) {
|
|
1243
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces/${encodeURIComponent(workspaceId)}/available-connection-interfaces${QS.query(QS.explode({
|
|
1244
|
-
typeId
|
|
1245
|
-
}))}`, {
|
|
1246
|
-
...opts
|
|
1247
|
-
}));
|
|
1248
|
-
}
|
|
1249
|
-
/**
|
|
1250
|
-
* Get available connection interface for a workspace by its id.
|
|
1251
|
-
*/
|
|
1252
|
-
export function getAvailableConnectionInterfaceForAWorkspace1({ workspaceId, connectionInterfaceId, environmentId }, opts) {
|
|
1253
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces/${encodeURIComponent(workspaceId)}/available-connection-interfaces/${encodeURIComponent(connectionInterfaceId)}${QS.query(QS.explode({
|
|
1254
|
-
environmentId
|
|
1255
|
-
}))}`, {
|
|
1256
|
-
...opts
|
|
1257
|
-
}));
|
|
1258
|
-
}
|
|
1259
|
-
/**
|
|
1260
|
-
* Get plugins applied to a workspace's application.
|
|
1261
|
-
*/
|
|
1262
|
-
export function getAppliedPlugins3({ workspaceId, applicationId, environmentId, $type }, opts) {
|
|
1263
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces/${encodeURIComponent(workspaceId)}/applications/${encodeURIComponent(applicationId)}/environments/${encodeURIComponent(environmentId)}/plugins${QS.query(QS.explode({
|
|
1264
|
-
"type": $type
|
|
1265
|
-
}))}`, {
|
|
1266
|
-
...opts
|
|
1267
|
-
}));
|
|
1268
|
-
}
|
|
1269
|
-
export function getAppDeployInfo({ workspaceId, applicationId, environmentId, accountId, tenant }, opts) {
|
|
1270
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces/${encodeURIComponent(workspaceId)}/applications/${encodeURIComponent(applicationId)}/environments/${encodeURIComponent(environmentId)}/deploy-info`, {
|
|
1271
|
-
...opts,
|
|
1272
|
-
headers: oazapfts.mergeHeaders(opts?.headers, {
|
|
1273
|
-
accountId,
|
|
1274
|
-
tenant
|
|
1275
|
-
})
|
|
1276
|
-
}));
|
|
1277
|
-
}
|
|
1278
|
-
/**
|
|
1279
|
-
* List application's activities.
|
|
1280
|
-
*/
|
|
1281
|
-
export function listActivities1({ workspaceId, applicationId, environmentId, $type }, opts) {
|
|
1282
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces/${encodeURIComponent(workspaceId)}/applications/${encodeURIComponent(applicationId)}/environments/${encodeURIComponent(environmentId)}/activities${QS.query(QS.explode({
|
|
1283
|
-
"type": $type
|
|
1284
|
-
}))}`, {
|
|
1285
|
-
...opts
|
|
1286
|
-
}));
|
|
1287
|
-
}
|
|
1288
|
-
/**
|
|
1289
|
-
* Get all in use connection interface dependencies from the application.
|
|
1290
|
-
*/
|
|
1291
|
-
export function getDependencyTree({ workspaceId, applicationId }, opts) {
|
|
1292
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces/${encodeURIComponent(workspaceId)}/applications/${encodeURIComponent(applicationId)}/dependencies`, {
|
|
1293
|
-
...opts
|
|
1294
|
-
}));
|
|
1295
|
-
}
|
|
1296
|
-
/**
|
|
1297
|
-
* Can the application be destroyed?
|
|
1298
|
-
*/
|
|
1299
|
-
export function canBeDeleted({ workspaceId, applicationId, accountId, tenant }, opts) {
|
|
1300
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces/${encodeURIComponent(workspaceId)}/applications/${encodeURIComponent(applicationId)}/can-be-deleted`, {
|
|
1301
|
-
...opts,
|
|
1302
|
-
headers: oazapfts.mergeHeaders(opts?.headers, {
|
|
1303
|
-
accountId,
|
|
1304
|
-
tenant
|
|
1305
|
-
})
|
|
1306
|
-
}));
|
|
1307
|
-
}
|
|
1308
|
-
/**
|
|
1309
|
-
* Get all workspaces within user permission
|
|
1310
|
-
*/
|
|
1311
|
-
export function getWorkspacesFromUserPermission({ resource, action }, opts) {
|
|
1312
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces/from-user-permission/${encodeURIComponent(resource)}/${encodeURIComponent(action)}`, {
|
|
1313
|
-
...opts
|
|
1314
|
-
}));
|
|
1315
|
-
}
|
|
1316
|
-
/**
|
|
1317
|
-
* Get shared infrastructure information by id.
|
|
1318
|
-
*/
|
|
1319
|
-
export function getSharedInfra({ id }, opts) {
|
|
1320
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/shared-infra/${encodeURIComponent(id)}`, {
|
|
1321
|
-
...opts
|
|
1322
|
-
}));
|
|
1323
|
-
}
|
|
1324
|
-
/**
|
|
1325
|
-
* Check if there is/are any deployment active for the provided plugin
|
|
1326
|
-
*/
|
|
1327
|
-
export function checkPluginInUse({ pluginVersionId }, opts) {
|
|
1328
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/plugin-in-use/${encodeURIComponent(pluginVersionId)}`, {
|
|
1329
|
-
...opts
|
|
1330
|
-
}));
|
|
1331
|
-
}
|
|
1332
|
-
/**
|
|
1333
|
-
* Check availability of connection slug in account.
|
|
1334
|
-
*/
|
|
1335
|
-
export function checkConnectionSlugAvailability({ slug }, opts) {
|
|
1336
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/connection-interfaces/${encodeURIComponent(slug)}/availability`, {
|
|
1337
|
-
...opts
|
|
1338
|
-
}));
|
|
1339
|
-
}
|
|
1340
|
-
/**
|
|
1341
|
-
* Get an application list by repo url.
|
|
1342
|
-
*/
|
|
1343
|
-
export function getApplicationsByUrl({ accountId, repoUrl }, opts) {
|
|
1344
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/applications${QS.query(QS.explode({
|
|
1345
|
-
repoUrl
|
|
1346
|
-
}))}`, {
|
|
1347
|
-
...opts,
|
|
1348
|
-
headers: oazapfts.mergeHeaders(opts?.headers, {
|
|
1349
|
-
accountId
|
|
1350
|
-
})
|
|
1351
|
-
}));
|
|
1352
|
-
}
|
|
1353
|
-
/**
|
|
1354
|
-
* Get application information by id.
|
|
1355
|
-
*/
|
|
1356
|
-
export function getApplication1({ id }, opts) {
|
|
1357
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/applications/${encodeURIComponent(id)}`, {
|
|
1358
|
-
...opts
|
|
1359
|
-
}));
|
|
1360
|
-
}
|
|
1361
|
-
/**
|
|
1362
|
-
* List all available connection interfaces for an application.
|
|
1363
|
-
*/
|
|
1364
|
-
export function getAvailableConnectionInterfacesForAnApplication1({ applicationId, typeId }, opts) {
|
|
1365
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/applications/${encodeURIComponent(applicationId)}/available-connection-interfaces${QS.query(QS.explode({
|
|
1366
|
-
typeId
|
|
1367
|
-
}))}`, {
|
|
1368
|
-
...opts
|
|
1369
|
-
}));
|
|
1370
|
-
}
|
|
1371
|
-
/**
|
|
1372
|
-
* Get available connection interface for an application by its id.
|
|
1373
|
-
*/
|
|
1374
|
-
export function getAvailableConnectionInterfaceForAnApplication1({ applicationId, connectionInterfaceId, environmentId }, opts) {
|
|
1375
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/applications/${encodeURIComponent(applicationId)}/available-connection-interfaces/${encodeURIComponent(connectionInterfaceId)}${QS.query(QS.explode({
|
|
1376
|
-
environmentId
|
|
1377
|
-
}))}`, {
|
|
1378
|
-
...opts
|
|
1379
|
-
}));
|
|
1380
|
-
}
|
|
1381
|
-
/**
|
|
1382
|
-
* Get action version ranges used in workflows given an actionId.
|
|
1383
|
-
*/
|
|
1384
|
-
export function listActionVersionRangesUsage({ accountId, actionId }, opts) {
|
|
1385
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/account/workflows/actions/${encodeURIComponent(actionId)}/versions`, {
|
|
1386
|
-
...opts,
|
|
1387
|
-
headers: oazapfts.mergeHeaders(opts?.headers, {
|
|
1388
|
-
accountId
|
|
1389
|
-
})
|
|
1390
|
-
}));
|
|
1391
|
-
}
|
|
1392
|
-
/**
|
|
1393
|
-
* List the input context of all stack elements for given type in account.
|
|
1394
|
-
*/
|
|
1395
|
-
export function listAccountContext({ stackVersionId, $type, environmentId, externalId }, opts) {
|
|
1396
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/account/stacks/${encodeURIComponent(stackVersionId)}/${encodeURIComponent($type)}-context${QS.query(QS.explode({
|
|
1397
|
-
environmentId,
|
|
1398
|
-
externalId
|
|
1399
|
-
}))}`, {
|
|
1400
|
-
...opts
|
|
1401
|
-
}));
|
|
1402
|
-
}
|
|
1403
|
-
/**
|
|
1404
|
-
* Get workflow of a stackId by workflow type.
|
|
1405
|
-
*/
|
|
1406
|
-
export function listWorkflowByStackIdAndType({ stackId, workflowType }, opts) {
|
|
1407
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/account/stacks/${encodeURIComponent(stackId)}/workflows/${encodeURIComponent(workflowType)}`, {
|
|
1408
|
-
...opts
|
|
1409
|
-
}));
|
|
1410
|
-
}
|
|
1411
|
-
/**
|
|
1412
|
-
* Get workflows by a stackId.
|
|
1413
|
-
*/
|
|
1414
|
-
export function listWorkflowsByStackId({ stackId }, opts) {
|
|
1415
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/account/stacks/${encodeURIComponent(stackId)}/all-workflows`, {
|
|
1416
|
-
...opts
|
|
1417
|
-
}));
|
|
1418
|
-
}
|
|
1419
|
-
/**
|
|
1420
|
-
* List all stacks with workflow by account.
|
|
1421
|
-
*/
|
|
1422
|
-
export function listStacksWithWorkflow(opts) {
|
|
1423
|
-
return oazapfts.ok(oazapfts.fetchJson("/v1/account/stacks/with-workflow", {
|
|
1424
|
-
...opts
|
|
1425
|
-
}));
|
|
1426
|
-
}
|
|
1427
|
-
/**
|
|
1428
|
-
* List all default workflows of an account.
|
|
1429
|
-
*/
|
|
1430
|
-
export function listDefaultAccountWorkflows(opts) {
|
|
1431
|
-
return oazapfts.ok(oazapfts.fetchJson("/v1/account/default-workflows", {
|
|
1432
|
-
...opts
|
|
1433
|
-
}));
|
|
1434
|
-
}
|
|
1435
|
-
/**
|
|
1436
|
-
* Delete completely connection interfaces from all environments.
|
|
1437
|
-
*/
|
|
1438
|
-
export function deleteConnectionInterfaceFromAllEnvironments({ workspaceId, slug }, opts) {
|
|
1439
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces/${encodeURIComponent(workspaceId)}/connection-interfaces/${encodeURIComponent(slug)}`, {
|
|
1440
|
-
...opts,
|
|
1441
|
-
method: "DELETE"
|
|
1442
|
-
}));
|
|
1443
|
-
}
|
|
1444
|
-
/**
|
|
1445
|
-
* Delete connection interfaces.
|
|
1446
|
-
*/
|
|
1447
|
-
export function deleteConnectionInterface({ workspaceId, slug, environmentId, accountId }, opts) {
|
|
1448
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces/${encodeURIComponent(workspaceId)}/connection-interfaces/${encodeURIComponent(slug)}/environment/${encodeURIComponent(environmentId)}`, {
|
|
1449
|
-
...opts,
|
|
1450
|
-
method: "DELETE",
|
|
1451
|
-
headers: oazapfts.mergeHeaders(opts?.headers, {
|
|
1452
|
-
accountId
|
|
1453
|
-
})
|
|
1454
|
-
}));
|
|
1455
|
-
}
|
|
1456
|
-
/**
|
|
1457
|
-
* Delete connection interface attributes by environment.
|
|
1458
|
-
*/
|
|
1459
|
-
export function deleteConnectionInterfaceAttributesFromEnvironment({ workspaceId, slug, environmentId }, opts) {
|
|
1460
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces/${encodeURIComponent(workspaceId)}/connection-interfaces/${encodeURIComponent(slug)}/attributes${QS.query(QS.explode({
|
|
1461
|
-
environmentId
|
|
1462
|
-
}))}`, {
|
|
1463
|
-
...opts,
|
|
1464
|
-
method: "DELETE"
|
|
1465
|
-
}));
|
|
1466
|
-
}
|
|
1467
|
-
/**
|
|
1468
|
-
* Delete an account workflow.
|
|
1469
|
-
*/
|
|
1470
|
-
export function deleteAccountWorkflow({ workflowId }, opts) {
|
|
1471
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/account/workflows/${encodeURIComponent(workflowId)}`, {
|
|
1472
|
-
...opts,
|
|
1473
|
-
method: "DELETE"
|
|
1474
|
-
}));
|
|
1475
|
-
}
|
|
1476
|
-
//# sourceMappingURL=workspace.js.map
|