@stack-spot/portal-network 0.72.1 → 0.74.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 +14 -0
- package/dist/api/agent.d.ts +30 -5
- package/dist/api/agent.d.ts.map +1 -1
- package/dist/api/agent.js +24 -4
- package/dist/api/agent.js.map +1 -1
- package/dist/api/workspaceManager.d.ts +211 -10
- package/dist/api/workspaceManager.d.ts.map +1 -1
- package/dist/api/workspaceManager.js +103 -2
- package/dist/api/workspaceManager.js.map +1 -1
- package/dist/client/agent.d.ts +1 -0
- package/dist/client/agent.d.ts.map +1 -1
- package/dist/client/workspace-manager.d.ts +74 -0
- package/dist/client/workspace-manager.d.ts.map +1 -1
- package/dist/client/workspace-manager.js +84 -1
- package/dist/client/workspace-manager.js.map +1 -1
- package/dist/client/workspace.d.ts +11 -2
- package/dist/client/workspace.d.ts.map +1 -1
- package/dist/client/workspace.js +9 -0
- package/dist/client/workspace.js.map +1 -1
- package/package.json +1 -1
- package/src/api/agent.ts +68 -7
- package/src/api/workspaceManager.ts +328 -12
- package/src/client/workspace-manager.ts +60 -9
- package/src/client/workspace.ts +10 -1
|
@@ -8,11 +8,29 @@ import * as Oazapfts from "@oazapfts/runtime";
|
|
|
8
8
|
import * as QS from "@oazapfts/runtime/query";
|
|
9
9
|
export const defaults: Oazapfts.Defaults<Oazapfts.CustomHeaders> = {
|
|
10
10
|
headers: {},
|
|
11
|
-
baseUrl: "https://workspace-workspace-manager.
|
|
11
|
+
baseUrl: "https://workspace-workspace-manager.dev.stackspot.com",
|
|
12
12
|
};
|
|
13
13
|
const oazapfts = Oazapfts.runtime(defaults);
|
|
14
14
|
export const servers = {
|
|
15
|
-
generatedServerUrl: "https://workspace-workspace-manager.
|
|
15
|
+
generatedServerUrl: "https://workspace-workspace-manager.dev.stackspot.com"
|
|
16
|
+
};
|
|
17
|
+
export type WorkspaceVariableResponse = {
|
|
18
|
+
/** Workspace variable name. */
|
|
19
|
+
name: string;
|
|
20
|
+
/** Workspace variable value. */
|
|
21
|
+
value?: string;
|
|
22
|
+
/** Workspace variable description. */
|
|
23
|
+
description: string;
|
|
24
|
+
/** Workspace variable mandate flag. */
|
|
25
|
+
mandate: boolean;
|
|
26
|
+
/** Variable value source. */
|
|
27
|
+
source: string;
|
|
28
|
+
/** Workspace variable creation data */
|
|
29
|
+
createdAt: string;
|
|
30
|
+
};
|
|
31
|
+
export type UpsertWorkspaceVariableRequest = {
|
|
32
|
+
/** Workspace variable value. */
|
|
33
|
+
value: string;
|
|
16
34
|
};
|
|
17
35
|
export type ExternalItemsResponse = {
|
|
18
36
|
source: string;
|
|
@@ -207,6 +225,26 @@ export type WorkflowActionsRequest = {
|
|
|
207
225
|
actionsBefore: WorkflowActionSimpleRequest[];
|
|
208
226
|
actionsAfter: WorkflowActionSimpleRequest[];
|
|
209
227
|
};
|
|
228
|
+
export type AccountVariableResponse = {
|
|
229
|
+
/** Account variable name */
|
|
230
|
+
name: string;
|
|
231
|
+
/** Account variable value stored */
|
|
232
|
+
value?: string;
|
|
233
|
+
/** Account variable description */
|
|
234
|
+
description: string;
|
|
235
|
+
/** Account variable mandatory flag */
|
|
236
|
+
mandate: boolean;
|
|
237
|
+
/** Account variable creation data */
|
|
238
|
+
createdAt: string;
|
|
239
|
+
};
|
|
240
|
+
export type UpdateAccountVariableRequest = {
|
|
241
|
+
/** New account variable value */
|
|
242
|
+
value?: string;
|
|
243
|
+
/** New account variable description */
|
|
244
|
+
description: string;
|
|
245
|
+
/** New account variable mandatory flag */
|
|
246
|
+
mandate: boolean;
|
|
247
|
+
};
|
|
210
248
|
export type RequiresRequest = {
|
|
211
249
|
/** Connections requires name. */
|
|
212
250
|
selected: string;
|
|
@@ -264,6 +302,8 @@ export type Infra = {
|
|
|
264
302
|
repoBaseBranch: string;
|
|
265
303
|
/** Starter Id used to generate this shared infra. */
|
|
266
304
|
starterId?: string;
|
|
305
|
+
/** Starter used to generate this shared infra. */
|
|
306
|
+
starter: string;
|
|
267
307
|
plugins: PluginRequest[];
|
|
268
308
|
};
|
|
269
309
|
export type ActionsConnectionsRequest = {
|
|
@@ -438,6 +478,28 @@ export type AccountWorkflowCreateRequest = {
|
|
|
438
478
|
export type IdResponseString = {
|
|
439
479
|
id: string;
|
|
440
480
|
};
|
|
481
|
+
export type PaginatedAccountVariableResponse = {
|
|
482
|
+
/** Current page requested */
|
|
483
|
+
currentPage: number;
|
|
484
|
+
/** Last page available */
|
|
485
|
+
lastPage: number;
|
|
486
|
+
/** Page size requested */
|
|
487
|
+
pageSize: number;
|
|
488
|
+
/** Total items found */
|
|
489
|
+
totalItems: number;
|
|
490
|
+
/** Account variables for current page */
|
|
491
|
+
items: AccountVariableResponse[];
|
|
492
|
+
};
|
|
493
|
+
export type CreateAccountVariableRequest = {
|
|
494
|
+
/** Account variable name */
|
|
495
|
+
name: string;
|
|
496
|
+
/** Account variable value */
|
|
497
|
+
value?: string;
|
|
498
|
+
/** Account variable description */
|
|
499
|
+
description: string;
|
|
500
|
+
/** Account variable mandatory flag */
|
|
501
|
+
mandate: boolean;
|
|
502
|
+
};
|
|
441
503
|
export type ManagerRunResponse = {
|
|
442
504
|
environmentName?: string;
|
|
443
505
|
runId: string;
|
|
@@ -482,6 +544,7 @@ export type SharedInfraAppliedPluginsV2ResponsePluginsResponse = {
|
|
|
482
544
|
deployStatus: string;
|
|
483
545
|
inCloud?: boolean;
|
|
484
546
|
fork?: boolean;
|
|
547
|
+
iacPath?: string;
|
|
485
548
|
singleUse?: boolean;
|
|
486
549
|
attributes?: {
|
|
487
550
|
[key: string]: object;
|
|
@@ -555,6 +618,7 @@ export type ApplicationAppliedPluginsV2ResponsePluginsResponse = {
|
|
|
555
618
|
deployStatus: string;
|
|
556
619
|
inCloud?: boolean;
|
|
557
620
|
fork?: boolean;
|
|
621
|
+
iacPath?: string;
|
|
558
622
|
singleUse?: boolean;
|
|
559
623
|
attributes?: {
|
|
560
624
|
[key: string]: object;
|
|
@@ -706,6 +770,13 @@ export type WorkspacePageResponse = {
|
|
|
706
770
|
totalPages: number;
|
|
707
771
|
items: WorkspaceResponse[];
|
|
708
772
|
};
|
|
773
|
+
export type PaginatedWorkspaceVariableResponse = {
|
|
774
|
+
currentPage: number;
|
|
775
|
+
pageSize: number;
|
|
776
|
+
lastPage: number;
|
|
777
|
+
totalItems: number;
|
|
778
|
+
items: WorkspaceVariableResponse[];
|
|
779
|
+
};
|
|
709
780
|
export type WorkflowCompleteResponse = {
|
|
710
781
|
workflowId: string;
|
|
711
782
|
name: string;
|
|
@@ -757,9 +828,9 @@ export type Stack = {
|
|
|
757
828
|
displayName: string;
|
|
758
829
|
imageUrl?: string;
|
|
759
830
|
};
|
|
760
|
-
export type
|
|
831
|
+
export type SimpleStackVersionResponse = {
|
|
832
|
+
semanticVersion: string;
|
|
761
833
|
stackVersionId: string;
|
|
762
|
-
semanticVersion?: string;
|
|
763
834
|
};
|
|
764
835
|
export type SharedInfraSimplesResponse = {
|
|
765
836
|
id: string;
|
|
@@ -767,7 +838,7 @@ export type SharedInfraSimplesResponse = {
|
|
|
767
838
|
createdAt: string;
|
|
768
839
|
stack?: Stack;
|
|
769
840
|
status: string;
|
|
770
|
-
stackVersion?:
|
|
841
|
+
stackVersion?: SimpleStackVersionResponse;
|
|
771
842
|
};
|
|
772
843
|
export type SharedInfraPageResponse = {
|
|
773
844
|
currentPage: number;
|
|
@@ -777,6 +848,67 @@ export type SharedInfraPageResponse = {
|
|
|
777
848
|
totalPages: number;
|
|
778
849
|
items: SharedInfraSimplesResponse[];
|
|
779
850
|
};
|
|
851
|
+
export type PluginConnectionsResponse = {
|
|
852
|
+
"type": string;
|
|
853
|
+
selected: string;
|
|
854
|
+
alias: string;
|
|
855
|
+
};
|
|
856
|
+
export type Connections = {
|
|
857
|
+
generates: PluginConnectionsResponse[];
|
|
858
|
+
requires: PluginConnectionsResponse[];
|
|
859
|
+
};
|
|
860
|
+
export type InfraPluginResponse = {
|
|
861
|
+
versionId: string;
|
|
862
|
+
semanticVersion: string;
|
|
863
|
+
slug: string;
|
|
864
|
+
displayName: string;
|
|
865
|
+
alias: string;
|
|
866
|
+
inputs: {
|
|
867
|
+
[key: string]: string;
|
|
868
|
+
};
|
|
869
|
+
inputsEnvs: {
|
|
870
|
+
[key: string]: {
|
|
871
|
+
[key: string]: string;
|
|
872
|
+
};
|
|
873
|
+
};
|
|
874
|
+
connections: Connections;
|
|
875
|
+
};
|
|
876
|
+
export type StackVersion = {
|
|
877
|
+
versionId: string;
|
|
878
|
+
semanticVersion: string;
|
|
879
|
+
isLatest: boolean;
|
|
880
|
+
};
|
|
881
|
+
export type InfraPluginStackResponse = {
|
|
882
|
+
stackId: string;
|
|
883
|
+
displayName: string;
|
|
884
|
+
stackVersion: StackVersion;
|
|
885
|
+
};
|
|
886
|
+
export type AvailablePlugin = {
|
|
887
|
+
pluginVersionId: string;
|
|
888
|
+
semanticVersion: string;
|
|
889
|
+
isDeprecated: boolean;
|
|
890
|
+
};
|
|
891
|
+
export type AvailableStack = {
|
|
892
|
+
stackVersionId: string;
|
|
893
|
+
semanticVersion: string;
|
|
894
|
+
hasDeprecatedContent: boolean;
|
|
895
|
+
availablePlugins: AvailablePlugin[];
|
|
896
|
+
};
|
|
897
|
+
export type InfraPluginWithStacksResponse = {
|
|
898
|
+
plugin: InfraPluginResponse;
|
|
899
|
+
stack?: InfraPluginStackResponse;
|
|
900
|
+
availableStacks: AvailableStack[];
|
|
901
|
+
};
|
|
902
|
+
export type UpdateInfraPluginResponse = {
|
|
903
|
+
plugins: InfraPluginWithStacksResponse[];
|
|
904
|
+
stkFilePath: string;
|
|
905
|
+
globalInputs: {
|
|
906
|
+
[key: string]: string;
|
|
907
|
+
};
|
|
908
|
+
globalComputedInputs: {
|
|
909
|
+
[key: string]: string;
|
|
910
|
+
};
|
|
911
|
+
};
|
|
780
912
|
export type LinksConsolidateResponse = {
|
|
781
913
|
id: string;
|
|
782
914
|
name: string;
|
|
@@ -833,10 +965,6 @@ export type WorkspaceActivitiesResponse = {
|
|
|
833
965
|
[key: string]: object;
|
|
834
966
|
};
|
|
835
967
|
};
|
|
836
|
-
export type SimpleStackVersionResponse = {
|
|
837
|
-
semanticVersion: string;
|
|
838
|
-
stackVersionId: string;
|
|
839
|
-
};
|
|
840
968
|
export type StackResponse = {
|
|
841
969
|
stackId: string;
|
|
842
970
|
displayName: string;
|
|
@@ -914,7 +1042,7 @@ export type ApplicationSimpleResponse = {
|
|
|
914
1042
|
createdAt: string;
|
|
915
1043
|
stack?: Stack;
|
|
916
1044
|
status: string;
|
|
917
|
-
stackVersion?:
|
|
1045
|
+
stackVersion?: SimpleStackVersionResponse;
|
|
918
1046
|
};
|
|
919
1047
|
export type ApplicationPageResponse = {
|
|
920
1048
|
currentPage: number;
|
|
@@ -966,7 +1094,7 @@ export type AccountSharedInfraSimplesResponse = {
|
|
|
966
1094
|
createdAt: string;
|
|
967
1095
|
stack?: Stack;
|
|
968
1096
|
status: string;
|
|
969
|
-
stackVersion?:
|
|
1097
|
+
stackVersion?: SimpleStackVersionResponse;
|
|
970
1098
|
workspace: Workspace;
|
|
971
1099
|
};
|
|
972
1100
|
export type AccountSharedInfraPageResponse = {
|
|
@@ -1036,7 +1164,7 @@ export type AccountApplicationSimpleResponse = {
|
|
|
1036
1164
|
createdAt: string;
|
|
1037
1165
|
stack?: Stack;
|
|
1038
1166
|
status: string;
|
|
1039
|
-
stackVersion?:
|
|
1167
|
+
stackVersion?: SimpleStackVersionResponse;
|
|
1040
1168
|
workspace: Workspace;
|
|
1041
1169
|
};
|
|
1042
1170
|
export type AccountApplicationPageResponse = {
|
|
@@ -1047,6 +1175,14 @@ export type AccountApplicationPageResponse = {
|
|
|
1047
1175
|
totalPages: number;
|
|
1048
1176
|
items: AccountApplicationSimpleResponse[];
|
|
1049
1177
|
};
|
|
1178
|
+
export type AccountVariableUsageResponse = {
|
|
1179
|
+
/** How many plugins are using this account variable */
|
|
1180
|
+
pluginsInUse: number;
|
|
1181
|
+
/** How many actions are using this account variable */
|
|
1182
|
+
actionsInUse: number;
|
|
1183
|
+
/** How many contexts are using this account variable */
|
|
1184
|
+
contextsInUse: number;
|
|
1185
|
+
};
|
|
1050
1186
|
export type StacksByAccountWithWorkflowResponseStackVersion = {
|
|
1051
1187
|
stackVersionId: string;
|
|
1052
1188
|
version: number;
|
|
@@ -1093,6 +1229,32 @@ export type AccountContextStackResponse = {
|
|
|
1093
1229
|
hasVersionsWithContext: boolean;
|
|
1094
1230
|
versions: StackVersionWksResponse[];
|
|
1095
1231
|
};
|
|
1232
|
+
export function workspaceVariableControllerV2FindByName({ accountId, workspaceId, name }: {
|
|
1233
|
+
accountId?: string;
|
|
1234
|
+
workspaceId: string;
|
|
1235
|
+
name: string;
|
|
1236
|
+
}, opts?: Oazapfts.RequestOpts) {
|
|
1237
|
+
return oazapfts.ok(oazapfts.fetchJson<{
|
|
1238
|
+
status: 200;
|
|
1239
|
+
data: WorkspaceVariableResponse;
|
|
1240
|
+
}>(`/v1/workspaces/${encodeURIComponent(workspaceId)}/variables/${encodeURIComponent(name)}`, {
|
|
1241
|
+
...opts,
|
|
1242
|
+
headers: oazapfts.mergeHeaders(opts?.headers, {
|
|
1243
|
+
accountId
|
|
1244
|
+
})
|
|
1245
|
+
}));
|
|
1246
|
+
}
|
|
1247
|
+
export function workspaceVariableControllerV2Upsert({ workspaceId, name, upsertWorkspaceVariableRequest }: {
|
|
1248
|
+
workspaceId: string;
|
|
1249
|
+
name: string;
|
|
1250
|
+
upsertWorkspaceVariableRequest: UpsertWorkspaceVariableRequest;
|
|
1251
|
+
}, opts?: Oazapfts.RequestOpts) {
|
|
1252
|
+
return oazapfts.ok(oazapfts.fetchText(`/v1/workspaces/${encodeURIComponent(workspaceId)}/variables/${encodeURIComponent(name)}`, oazapfts.json({
|
|
1253
|
+
...opts,
|
|
1254
|
+
method: "PUT",
|
|
1255
|
+
body: upsertWorkspaceVariableRequest
|
|
1256
|
+
})));
|
|
1257
|
+
}
|
|
1096
1258
|
export function workflowWorkspaceControllerfindWorkflowStackContext({ workspaceId, stackId, workflowId }: {
|
|
1097
1259
|
workspaceId: string;
|
|
1098
1260
|
stackId: string;
|
|
@@ -1273,6 +1435,38 @@ export function workflowAccountControllerupdateWorkflowActions({ workflowId, wor
|
|
|
1273
1435
|
body: workflowActionsRequest
|
|
1274
1436
|
})));
|
|
1275
1437
|
}
|
|
1438
|
+
export function accountVariableControllerfindByName({ accountId, name }: {
|
|
1439
|
+
accountId?: string;
|
|
1440
|
+
name: string;
|
|
1441
|
+
}, opts?: Oazapfts.RequestOpts) {
|
|
1442
|
+
return oazapfts.ok(oazapfts.fetchJson<{
|
|
1443
|
+
status: 200;
|
|
1444
|
+
data: AccountVariableResponse;
|
|
1445
|
+
}>(`/v1/account/variables/${encodeURIComponent(name)}`, {
|
|
1446
|
+
...opts,
|
|
1447
|
+
headers: oazapfts.mergeHeaders(opts?.headers, {
|
|
1448
|
+
accountId
|
|
1449
|
+
})
|
|
1450
|
+
}));
|
|
1451
|
+
}
|
|
1452
|
+
export function accountVariableControllerupdate({ name, updateAccountVariableRequest }: {
|
|
1453
|
+
name: string;
|
|
1454
|
+
updateAccountVariableRequest: UpdateAccountVariableRequest;
|
|
1455
|
+
}, opts?: Oazapfts.RequestOpts) {
|
|
1456
|
+
return oazapfts.ok(oazapfts.fetchText(`/v1/account/variables/${encodeURIComponent(name)}`, oazapfts.json({
|
|
1457
|
+
...opts,
|
|
1458
|
+
method: "PUT",
|
|
1459
|
+
body: updateAccountVariableRequest
|
|
1460
|
+
})));
|
|
1461
|
+
}
|
|
1462
|
+
export function accountVariableControllerdelete({ name }: {
|
|
1463
|
+
name: string;
|
|
1464
|
+
}, opts?: Oazapfts.RequestOpts) {
|
|
1465
|
+
return oazapfts.ok(oazapfts.fetchText(`/v1/account/variables/${encodeURIComponent(name)}`, {
|
|
1466
|
+
...opts,
|
|
1467
|
+
method: "DELETE"
|
|
1468
|
+
}));
|
|
1469
|
+
}
|
|
1276
1470
|
export function workflowStackControllerfindWorkflowStackContext({ stackId, workflowId }: {
|
|
1277
1471
|
stackId: string;
|
|
1278
1472
|
workflowId: string;
|
|
@@ -1413,6 +1607,39 @@ export function workflowAccountControllercreateAccountWorkflow({ accountWorkflow
|
|
|
1413
1607
|
body: accountWorkflowCreateRequest
|
|
1414
1608
|
})));
|
|
1415
1609
|
}
|
|
1610
|
+
export function accountVariableControllerfindAll({ accountId, name, page, size, sortBy, sortDir }: {
|
|
1611
|
+
accountId?: string;
|
|
1612
|
+
name?: string;
|
|
1613
|
+
page?: number;
|
|
1614
|
+
size?: number;
|
|
1615
|
+
sortBy?: "NAME" | "VALUE" | "CREATED_AT";
|
|
1616
|
+
sortDir?: "ASC" | "DESC";
|
|
1617
|
+
}, opts?: Oazapfts.RequestOpts) {
|
|
1618
|
+
return oazapfts.ok(oazapfts.fetchJson<{
|
|
1619
|
+
status: 200;
|
|
1620
|
+
data: PaginatedAccountVariableResponse;
|
|
1621
|
+
}>(`/v1/account/variables${QS.query(QS.explode({
|
|
1622
|
+
name,
|
|
1623
|
+
page,
|
|
1624
|
+
size,
|
|
1625
|
+
sortBy,
|
|
1626
|
+
sortDir
|
|
1627
|
+
}))}`, {
|
|
1628
|
+
...opts,
|
|
1629
|
+
headers: oazapfts.mergeHeaders(opts?.headers, {
|
|
1630
|
+
accountId
|
|
1631
|
+
})
|
|
1632
|
+
}));
|
|
1633
|
+
}
|
|
1634
|
+
export function accountVariableControllercreate({ createAccountVariableRequest }: {
|
|
1635
|
+
createAccountVariableRequest: CreateAccountVariableRequest;
|
|
1636
|
+
}, opts?: Oazapfts.RequestOpts) {
|
|
1637
|
+
return oazapfts.ok(oazapfts.fetchText("/v1/account/variables", oazapfts.json({
|
|
1638
|
+
...opts,
|
|
1639
|
+
method: "POST",
|
|
1640
|
+
body: createAccountVariableRequest
|
|
1641
|
+
})));
|
|
1642
|
+
}
|
|
1416
1643
|
export function managerRunControllerarchiveApplication({ workspaceId, applicationId }: {
|
|
1417
1644
|
workspaceId: string;
|
|
1418
1645
|
applicationId: string;
|
|
@@ -1620,6 +1847,35 @@ export function workflowWorkspaceControllerlistStacks({ workspaceId, workflowId
|
|
|
1620
1847
|
...opts
|
|
1621
1848
|
}));
|
|
1622
1849
|
}
|
|
1850
|
+
export function workspaceVariableControllerV2FindAll({ workspaceId, accountId, page, size, sortBy, sortDir, mandate, name, showEmptyValues }: {
|
|
1851
|
+
workspaceId: string;
|
|
1852
|
+
accountId?: string;
|
|
1853
|
+
page?: number;
|
|
1854
|
+
size?: number;
|
|
1855
|
+
sortBy?: "NAME" | "VALUE" | "CREATED_AT";
|
|
1856
|
+
sortDir?: "ASC" | "DESC";
|
|
1857
|
+
mandate?: boolean;
|
|
1858
|
+
name?: string;
|
|
1859
|
+
showEmptyValues?: boolean;
|
|
1860
|
+
}, opts?: Oazapfts.RequestOpts) {
|
|
1861
|
+
return oazapfts.ok(oazapfts.fetchJson<{
|
|
1862
|
+
status: 200;
|
|
1863
|
+
data: PaginatedWorkspaceVariableResponse;
|
|
1864
|
+
}>(`/v1/workspaces/${encodeURIComponent(workspaceId)}/variables${QS.query(QS.explode({
|
|
1865
|
+
page,
|
|
1866
|
+
size,
|
|
1867
|
+
sortBy,
|
|
1868
|
+
sortDir,
|
|
1869
|
+
mandate,
|
|
1870
|
+
name,
|
|
1871
|
+
showEmptyValues
|
|
1872
|
+
}))}`, {
|
|
1873
|
+
...opts,
|
|
1874
|
+
headers: oazapfts.mergeHeaders(opts?.headers, {
|
|
1875
|
+
accountId
|
|
1876
|
+
})
|
|
1877
|
+
}));
|
|
1878
|
+
}
|
|
1623
1879
|
export function workflowWorkspaceControllerlistWorkflowByStackIdAndWorkflowType({ workspaceId, stackId, workflowType }: {
|
|
1624
1880
|
workspaceId: string;
|
|
1625
1881
|
stackId: string;
|
|
@@ -1667,6 +1923,18 @@ export function sharedInfraControllergetSharedInfra({ workspaceId, stackId, stac
|
|
|
1667
1923
|
...opts
|
|
1668
1924
|
}));
|
|
1669
1925
|
}
|
|
1926
|
+
export function updateInfrastructureControllergetSharedInfraInfraPlugins({ workspaceId, sharedInfraId, branchName }: {
|
|
1927
|
+
workspaceId: string;
|
|
1928
|
+
sharedInfraId: string;
|
|
1929
|
+
branchName: string;
|
|
1930
|
+
}, opts?: Oazapfts.RequestOpts) {
|
|
1931
|
+
return oazapfts.ok(oazapfts.fetchJson<{
|
|
1932
|
+
status: 200;
|
|
1933
|
+
data: UpdateInfraPluginResponse;
|
|
1934
|
+
}>(`/v1/workspaces/${encodeURIComponent(workspaceId)}/shared-infra/${encodeURIComponent(sharedInfraId)}/infra-plugins/${encodeURIComponent(branchName)}`, {
|
|
1935
|
+
...opts
|
|
1936
|
+
}));
|
|
1937
|
+
}
|
|
1670
1938
|
export function sharedInfraControllergetApplicationLinks({ workspaceId, sharedInfraId, envName }: {
|
|
1671
1939
|
workspaceId: string;
|
|
1672
1940
|
sharedInfraId: string;
|
|
@@ -1706,6 +1974,17 @@ export function sharedInfraControllergetSharedInfraActivities({ workspaceId, sha
|
|
|
1706
1974
|
...opts
|
|
1707
1975
|
}));
|
|
1708
1976
|
}
|
|
1977
|
+
export function updateInfrastructureControllergetSharedInfraBranches({ workspaceId, sharedInfraId }: {
|
|
1978
|
+
workspaceId: string;
|
|
1979
|
+
sharedInfraId: string;
|
|
1980
|
+
}, opts?: Oazapfts.RequestOpts) {
|
|
1981
|
+
return oazapfts.ok(oazapfts.fetchJson<{
|
|
1982
|
+
status: 200;
|
|
1983
|
+
data: string[];
|
|
1984
|
+
}>(`/v1/workspaces/${encodeURIComponent(workspaceId)}/shared-infra/${encodeURIComponent(sharedInfraId)}/branches`, {
|
|
1985
|
+
...opts
|
|
1986
|
+
}));
|
|
1987
|
+
}
|
|
1709
1988
|
export function sharedInfraControllergetSharedInfraFilters({ workspaceId }: {
|
|
1710
1989
|
workspaceId: string;
|
|
1711
1990
|
}, opts?: Oazapfts.RequestOpts) {
|
|
@@ -1782,6 +2061,18 @@ export function applicationControllergetApplications({ workspaceId, stackVersion
|
|
|
1782
2061
|
...opts
|
|
1783
2062
|
}));
|
|
1784
2063
|
}
|
|
2064
|
+
export function updateInfrastructureControllergetApplicationInfraPlugins({ workspaceId, applicationId, branchName }: {
|
|
2065
|
+
workspaceId: string;
|
|
2066
|
+
applicationId: string;
|
|
2067
|
+
branchName: string;
|
|
2068
|
+
}, opts?: Oazapfts.RequestOpts) {
|
|
2069
|
+
return oazapfts.ok(oazapfts.fetchJson<{
|
|
2070
|
+
status: 200;
|
|
2071
|
+
data: UpdateInfraPluginResponse;
|
|
2072
|
+
}>(`/v1/workspaces/${encodeURIComponent(workspaceId)}/applications/${encodeURIComponent(applicationId)}/infra-plugins/${encodeURIComponent(branchName)}`, {
|
|
2073
|
+
...opts
|
|
2074
|
+
}));
|
|
2075
|
+
}
|
|
1785
2076
|
export function applicationControllergetApplicationLinks({ workspaceId, applicationId, envName }: {
|
|
1786
2077
|
workspaceId: string;
|
|
1787
2078
|
applicationId: string;
|
|
@@ -1821,6 +2112,17 @@ export function applicationControllergetApplicationActivities({ workspaceId, app
|
|
|
1821
2112
|
...opts
|
|
1822
2113
|
}));
|
|
1823
2114
|
}
|
|
2115
|
+
export function updateInfrastructureControllergetApplicationBranches({ workspaceId, applicationId }: {
|
|
2116
|
+
workspaceId: string;
|
|
2117
|
+
applicationId: string;
|
|
2118
|
+
}, opts?: Oazapfts.RequestOpts) {
|
|
2119
|
+
return oazapfts.ok(oazapfts.fetchJson<{
|
|
2120
|
+
status: 200;
|
|
2121
|
+
data: string[];
|
|
2122
|
+
}>(`/v1/workspaces/${encodeURIComponent(workspaceId)}/applications/${encodeURIComponent(applicationId)}/branches`, {
|
|
2123
|
+
...opts
|
|
2124
|
+
}));
|
|
2125
|
+
}
|
|
1824
2126
|
export function applicationControllergetApplicationFilters({ workspaceId }: {
|
|
1825
2127
|
workspaceId: string;
|
|
1826
2128
|
}, opts?: Oazapfts.RequestOpts) {
|
|
@@ -1969,6 +2271,20 @@ export function accountApplicationControllergetAccountApplicationsFilters(opts?:
|
|
|
1969
2271
|
...opts
|
|
1970
2272
|
}));
|
|
1971
2273
|
}
|
|
2274
|
+
export function accountVariableControllerusage({ accountId, name }: {
|
|
2275
|
+
accountId?: string;
|
|
2276
|
+
name: string;
|
|
2277
|
+
}, opts?: Oazapfts.RequestOpts) {
|
|
2278
|
+
return oazapfts.ok(oazapfts.fetchJson<{
|
|
2279
|
+
status: 200;
|
|
2280
|
+
data: AccountVariableUsageResponse;
|
|
2281
|
+
}>(`/v1/account/variables/${encodeURIComponent(name)}/usage`, {
|
|
2282
|
+
...opts,
|
|
2283
|
+
headers: oazapfts.mergeHeaders(opts?.headers, {
|
|
2284
|
+
accountId
|
|
2285
|
+
})
|
|
2286
|
+
}));
|
|
2287
|
+
}
|
|
1972
2288
|
export function accountStackControllerlistStacksByAccountWithWorkflow({ workspaceId }: {
|
|
1973
2289
|
workspaceId?: string;
|
|
1974
2290
|
}, opts?: Oazapfts.RequestOpts) {
|
|
@@ -5,6 +5,12 @@ import {
|
|
|
5
5
|
accountApplicationControllergetAccountApplicationsFilters,
|
|
6
6
|
accountSharedInfraControllergetAccountSharedInfraFilters,
|
|
7
7
|
accountSharedInfraControllergetAccountSharedInfraPage,
|
|
8
|
+
accountVariableControllercreate,
|
|
9
|
+
accountVariableControllerdelete,
|
|
10
|
+
accountVariableControllerfindAll,
|
|
11
|
+
accountVariableControllerfindByName,
|
|
12
|
+
accountVariableControllerupdate,
|
|
13
|
+
accountVariableControllerusage,
|
|
8
14
|
applicationControllerV2GetApplicationActivities,
|
|
9
15
|
applicationControllerV2GetApplicationAppliedPlugins,
|
|
10
16
|
applicationControllergetApplicationDetails,
|
|
@@ -40,6 +46,9 @@ import {
|
|
|
40
46
|
workspaceStackControllerdeleteStacksInWorkspace,
|
|
41
47
|
workspaceStackControllerlistStacks,
|
|
42
48
|
workspaceStackControllerrefreshStacksInWorkspace,
|
|
49
|
+
workspaceVariableControllerV2FindAll,
|
|
50
|
+
workspaceVariableControllerV2FindByName,
|
|
51
|
+
workspaceVariableControllerV2Upsert,
|
|
43
52
|
} from '../api/workspaceManager'
|
|
44
53
|
import apis from '../apis.json'
|
|
45
54
|
import { DefaultAPIError } from '../error/DefaultAPIError'
|
|
@@ -120,12 +129,12 @@ class WorkspaceManagerClient extends ReactQueryNetworkClient {
|
|
|
120
129
|
/**
|
|
121
130
|
* Gets workflow in a workspace stack
|
|
122
131
|
*/
|
|
123
|
-
workflowDataWithInputsInWorkspace = this.query(contextWorkflowControllergetConsolidatedWorkflowInputs as
|
|
132
|
+
workflowDataWithInputsInWorkspace = this.query(contextWorkflowControllergetConsolidatedWorkflowInputs as
|
|
124
133
|
unknown as ReplaceResult<typeof contextWorkflowControllergetConsolidatedWorkflowInputs, FixedWorkflowForCreationResponse>)
|
|
125
134
|
/**
|
|
126
135
|
* Gets workflow inputs in an account stack
|
|
127
136
|
*/
|
|
128
|
-
workflowInputsInAccount = this.query(contextWorkflowControllergetAccountWorkflowInputs as
|
|
137
|
+
workflowInputsInAccount = this.query(contextWorkflowControllergetAccountWorkflowInputs as
|
|
129
138
|
unknown as ReplaceResult<typeof contextWorkflowControllergetAccountWorkflowInputs, FixedFullInputContextResponse>)
|
|
130
139
|
/**
|
|
131
140
|
* Gets inputs from a plugin in account context
|
|
@@ -285,12 +294,12 @@ class WorkspaceManagerClient extends ReactQueryNetworkClient {
|
|
|
285
294
|
/**
|
|
286
295
|
* Gets activities of a shared infra
|
|
287
296
|
*/
|
|
288
|
-
activitiesSharedInfra = this.infiniteQuery(sharedInfraControllerV2GetSharedInfraActivities as unknown as ReplaceResult<typeof sharedInfraControllerV2GetSharedInfraActivities, FixedPaginatedActivityResponse>,
|
|
297
|
+
activitiesSharedInfra = this.infiniteQuery(sharedInfraControllerV2GetSharedInfraActivities as unknown as ReplaceResult<typeof sharedInfraControllerV2GetSharedInfraActivities, FixedPaginatedActivityResponse>,
|
|
289
298
|
{ accumulator: 'items', initialPageParam: 0 })
|
|
290
299
|
/**
|
|
291
300
|
* Gets activities of an application
|
|
292
301
|
*/
|
|
293
|
-
activitiesApplication = this.infiniteQuery(applicationControllerV2GetApplicationActivities
|
|
302
|
+
activitiesApplication = this.infiniteQuery(applicationControllerV2GetApplicationActivities as unknown as ReplaceResult<typeof applicationControllerV2GetApplicationActivities, FixedPaginatedActivityResponse>,
|
|
294
303
|
{ accumulator: 'items', initialPageParam: 0 })
|
|
295
304
|
/**
|
|
296
305
|
* Updates Stacks To Latest Version By Workspace
|
|
@@ -315,13 +324,13 @@ class WorkspaceManagerClient extends ReactQueryNetworkClient {
|
|
|
315
324
|
/**
|
|
316
325
|
* Get all stacks used to create infra in a workspace.
|
|
317
326
|
*/
|
|
318
|
-
filterStacksFromInfraInWorkspace = this.query(sharedInfraControllergetSharedInfraFilters)
|
|
327
|
+
filterStacksFromInfraInWorkspace = this.query(sharedInfraControllergetSharedInfraFilters)
|
|
319
328
|
|
|
320
329
|
/**
|
|
321
330
|
* Get all workspaces associated with an account.
|
|
322
331
|
*/
|
|
323
332
|
getAccountWorkspaces = this.query(workspaceControllergetWorkspaces)
|
|
324
|
-
|
|
333
|
+
|
|
325
334
|
/**
|
|
326
335
|
* Get all applications associated with an account.
|
|
327
336
|
*/
|
|
@@ -332,11 +341,53 @@ class WorkspaceManagerClient extends ReactQueryNetworkClient {
|
|
|
332
341
|
*/
|
|
333
342
|
getAccountSharedInfra = this.query(accountSharedInfraControllergetAccountSharedInfraPage)
|
|
334
343
|
|
|
335
|
-
/** * Gets filters for applications associated with an account. */
|
|
344
|
+
/** * Gets filters for applications associated with an account. */
|
|
336
345
|
getAccountApplicationsFilters = this.query(accountApplicationControllergetAccountApplicationsFilters)
|
|
337
|
-
|
|
338
|
-
/** * Gets filters for shared infrastructures associated with an account. */
|
|
346
|
+
|
|
347
|
+
/** * Gets filters for shared infrastructures associated with an account. */
|
|
339
348
|
getAccountSharedInfraFilters = this.query(accountSharedInfraControllergetAccountSharedInfraFilters)
|
|
349
|
+
|
|
350
|
+
// Variables Account
|
|
351
|
+
|
|
352
|
+
/**
|
|
353
|
+
* Find all account variables
|
|
354
|
+
*/
|
|
355
|
+
accountVariables = this.query(accountVariableControllerfindAll)
|
|
356
|
+
/**
|
|
357
|
+
* Get an account variable by name
|
|
358
|
+
*/
|
|
359
|
+
getAccountVariable = this.query(accountVariableControllerfindByName)
|
|
360
|
+
/**
|
|
361
|
+
* Get account variable usage
|
|
362
|
+
*/
|
|
363
|
+
accountVariableUsage = this.query(accountVariableControllerusage)
|
|
364
|
+
/**
|
|
365
|
+
* Create account variable
|
|
366
|
+
*/
|
|
367
|
+
createAccountVariable = this.mutation(accountVariableControllercreate)
|
|
368
|
+
/**
|
|
369
|
+
* Update account variable
|
|
370
|
+
*/
|
|
371
|
+
updateAccountVariable = this.mutation(accountVariableControllerupdate)
|
|
372
|
+
/**
|
|
373
|
+
* Delete account variable
|
|
374
|
+
*/
|
|
375
|
+
deleteAccountVariable = this.mutation(accountVariableControllerdelete)
|
|
376
|
+
|
|
377
|
+
// Variables Workspace
|
|
378
|
+
|
|
379
|
+
/**
|
|
380
|
+
* Find all workspace variables
|
|
381
|
+
*/
|
|
382
|
+
workspaceVariables = this.query(workspaceVariableControllerV2FindAll)
|
|
383
|
+
/**
|
|
384
|
+
* Get a workspace variable by name
|
|
385
|
+
*/
|
|
386
|
+
getWorkspaceVariable = this.query(workspaceVariableControllerV2FindByName)
|
|
387
|
+
/**
|
|
388
|
+
* Updates workspace variable based on existing account variable
|
|
389
|
+
*/
|
|
390
|
+
updateWorkspaceVariable = this.mutation(workspaceVariableControllerV2Upsert)
|
|
340
391
|
}
|
|
341
392
|
|
|
342
393
|
export const workspaceManagerClient = new WorkspaceManagerClient()
|
package/src/client/workspace.ts
CHANGED
|
@@ -267,7 +267,7 @@ class WorkspaceClient extends ReactQueryNetworkClient {
|
|
|
267
267
|
* Gets the dependencies of a shared infra
|
|
268
268
|
*/
|
|
269
269
|
sharedInfraDependencies = this.query(workspaceSharedInfrastructureControllergetDependencyTree)
|
|
270
|
-
|
|
270
|
+
|
|
271
271
|
/**
|
|
272
272
|
* Updates an application
|
|
273
273
|
*/
|
|
@@ -300,26 +300,32 @@ class WorkspaceClient extends ReactQueryNetworkClient {
|
|
|
300
300
|
|
|
301
301
|
/**
|
|
302
302
|
* Find all account variables
|
|
303
|
+
* @deprecated consume from Workspace Manager API
|
|
303
304
|
*/
|
|
304
305
|
accountVariables = this.query(accountVariableControllerfindAll)
|
|
305
306
|
/**
|
|
306
307
|
* Get an account variable by name
|
|
308
|
+
* @deprecated consume from Workspace Manager API
|
|
307
309
|
*/
|
|
308
310
|
getAccountVariable = this.query(accountVariableControllerfindByName)
|
|
309
311
|
/**
|
|
310
312
|
* Get account variable usage
|
|
313
|
+
* @deprecated consume from Workspace Manager API
|
|
311
314
|
*/
|
|
312
315
|
accountVariableUsage = this.query(accountVariableControllerusage)
|
|
313
316
|
/**
|
|
314
317
|
* Create account variable
|
|
318
|
+
* @deprecated consume from Workspace Manager API
|
|
315
319
|
*/
|
|
316
320
|
createAccountVariable = this.mutation(accountVariableControllercreate)
|
|
317
321
|
/**
|
|
318
322
|
* Update account variable
|
|
323
|
+
* @deprecated consume from Workspace Manager API
|
|
319
324
|
*/
|
|
320
325
|
updateAccountVariable = this.mutation(accountVariableControllerupdate)
|
|
321
326
|
/**
|
|
322
327
|
* Delete account variable
|
|
328
|
+
* @deprecated consume from Workspace Manager API
|
|
323
329
|
*/
|
|
324
330
|
deleteAccountVariable = this.mutation(accountVariableControllerdelete)
|
|
325
331
|
|
|
@@ -327,14 +333,17 @@ class WorkspaceClient extends ReactQueryNetworkClient {
|
|
|
327
333
|
|
|
328
334
|
/**
|
|
329
335
|
* Find all workspace variables
|
|
336
|
+
* @deprecated consume from Workspace Manager API
|
|
330
337
|
*/
|
|
331
338
|
workspaceVariables = this.query(workspaceVariableV2ControllerfindAll)
|
|
332
339
|
/**
|
|
333
340
|
* Get a workspace variable by name
|
|
341
|
+
* @deprecated consume from Workspace Manager API
|
|
334
342
|
*/
|
|
335
343
|
getWorkspaceVariable = this.query(workspaceVariableV2ControllerfindByName)
|
|
336
344
|
/**
|
|
337
345
|
* Updates workspace variable based on existing account variable
|
|
346
|
+
* @deprecated consume from Workspace Manager API
|
|
338
347
|
*/
|
|
339
348
|
updateWorkspaceVariable = this.mutation(workspaceVariableV2Controllerupsert)
|
|
340
349
|
|