@stack-spot/portal-network 0.8.0 → 0.9.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 +12 -0
- package/dist/client/workspace.d.ts +138 -0
- package/dist/client/workspace.d.ts.map +1 -1
- package/dist/client/workspace.js +163 -1
- package/dist/client/workspace.js.map +1 -1
- package/package.json +1 -1
- package/src/client/workspace.ts +107 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.9.0](https://github.com/stack-spot/portal-commons/compare/portal-network@v0.8.0...portal-network@v0.9.0) (2024-08-07)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* add embeded links requests ([6cb40d8](https://github.com/stack-spot/portal-commons/commit/6cb40d8f41371f4c00864848f878b251e8daac7a))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* connection interface methods ([1ede473](https://github.com/stack-spot/portal-commons/commit/1ede473d8ac16ebe52891463082e92056c08397b))
|
|
14
|
+
|
|
3
15
|
## [0.8.0](https://github.com/stack-spot/portal-commons/compare/portal-network@v0.7.0...portal-network@v0.8.0) (2024-08-07)
|
|
4
16
|
|
|
5
17
|
|
|
@@ -4,6 +4,52 @@ import { ReactQueryNetworkClient } from '../network/ReactQueryNetworkClient.js';
|
|
|
4
4
|
declare class WorkspaceClient extends ReactQueryNetworkClient {
|
|
5
5
|
constructor();
|
|
6
6
|
protected buildStackSpotError(error: HttpError): StackspotAPIError;
|
|
7
|
+
/**
|
|
8
|
+
* Gets all connection interfaces from a workspace
|
|
9
|
+
*/
|
|
10
|
+
allConnectionInterfaces: import("../network/types.js").QueryObject<{
|
|
11
|
+
workspaceId: string;
|
|
12
|
+
typeId?: string | undefined;
|
|
13
|
+
}, import("../api/workspace.js").ConnectionInterfaceSummaryResponse[]>;
|
|
14
|
+
/**
|
|
15
|
+
* Gets a connection interface from a workspace
|
|
16
|
+
*/
|
|
17
|
+
connectionInterface: import("../network/types.js").QueryObject<{
|
|
18
|
+
workspaceId: string;
|
|
19
|
+
connectionInterfaceId: string;
|
|
20
|
+
environmentId?: string | undefined;
|
|
21
|
+
}, import("../api/workspace.js").ConnectionInterfaceDetailsResponse>;
|
|
22
|
+
/**
|
|
23
|
+
* Updates the visibility of a connection interface
|
|
24
|
+
*/
|
|
25
|
+
updateConnectionInterfaceVisibility: import("../network/types.js").MutationObject<{
|
|
26
|
+
workspaceId: string;
|
|
27
|
+
connectionInterfaceId: string;
|
|
28
|
+
updateConnectionInterfaceVisibilityRequest: any;
|
|
29
|
+
}, unknown>;
|
|
30
|
+
/**
|
|
31
|
+
* Removes a connection interface
|
|
32
|
+
*/
|
|
33
|
+
deleteConnectionInterface: import("../network/types.js").MutationObject<{
|
|
34
|
+
workspaceId: string;
|
|
35
|
+
slug: string;
|
|
36
|
+
}, unknown>;
|
|
37
|
+
/**
|
|
38
|
+
* Removes connection interface attributes by environment
|
|
39
|
+
*/
|
|
40
|
+
deleteConnectionInterfaceAttributesFromEnvironment: import("../network/types.js").MutationObject<{
|
|
41
|
+
workspaceId: string;
|
|
42
|
+
slug: string;
|
|
43
|
+
environmentId: string;
|
|
44
|
+
}, unknown>;
|
|
45
|
+
/**
|
|
46
|
+
* Updates the attributes of a connection interface
|
|
47
|
+
*/
|
|
48
|
+
updateConnectionInterfaceAttributes: import("../network/types.js").MutationObject<{
|
|
49
|
+
workspaceId: string;
|
|
50
|
+
connectionInterfaceId: string;
|
|
51
|
+
updateConnectionInterfaceAttributesRequest: import("../api/workspace.js").UpdateConnectionInterfaceAttributesRequest;
|
|
52
|
+
}, unknown>;
|
|
7
53
|
/**
|
|
8
54
|
* Gets all environments
|
|
9
55
|
*/
|
|
@@ -29,6 +75,98 @@ declare class WorkspaceClient extends ReactQueryNetworkClient {
|
|
|
29
75
|
id: string;
|
|
30
76
|
environmentUpdateRequest: import("../api/workspace.js").EnvironmentUpdateRequest;
|
|
31
77
|
}, import("../api/workspace.js").IdResponse>;
|
|
78
|
+
/**
|
|
79
|
+
* Gets embedded link by id
|
|
80
|
+
*/
|
|
81
|
+
embeddedLinkInWorkspace: import("../network/types.js").QueryObject<{
|
|
82
|
+
workspaceId: string;
|
|
83
|
+
embeddedLinkId: string;
|
|
84
|
+
}, import("../api/workspace.js").WorkspaceEmbeddedLinkReadResponse>;
|
|
85
|
+
/**
|
|
86
|
+
* Gets all embedded links from a workspace
|
|
87
|
+
*/
|
|
88
|
+
allEmbeddedLinksInWorkspace: import("../network/types.js").QueryObject<{
|
|
89
|
+
workspaceId: string;
|
|
90
|
+
name?: string | undefined;
|
|
91
|
+
}, import("../api/workspace.js").WorkspaceEmbeddedLinkReadResponse[]>;
|
|
92
|
+
/**
|
|
93
|
+
* Creates an embedded link in a workspace
|
|
94
|
+
*/
|
|
95
|
+
createEmbeddedLinkInWorkspace: import("../network/types.js").MutationObject<{
|
|
96
|
+
workspaceId: string;
|
|
97
|
+
createWorkspaceEmbeddedLinkRequest: import("../api/workspace.js").CreateWorkspaceEmbeddedLinkRequest;
|
|
98
|
+
}, import("../api/workspace.js").IdResponse>;
|
|
99
|
+
/**
|
|
100
|
+
* Deletes an embedded link from a workspace
|
|
101
|
+
*/
|
|
102
|
+
deleteEmbeddedLinkFromWorkspace: import("../network/types.js").MutationObject<{
|
|
103
|
+
workspaceId: string;
|
|
104
|
+
embeddedLinkId: string;
|
|
105
|
+
}, unknown>;
|
|
106
|
+
/**
|
|
107
|
+
* Updates an embedded link from a workspace
|
|
108
|
+
*/
|
|
109
|
+
updateEmbeddedLinkInWorkspace: import("../network/types.js").MutationObject<{
|
|
110
|
+
workspaceId: string;
|
|
111
|
+
embeddedLinkId: string;
|
|
112
|
+
updateWorkspaceEmbeddedLinkRequest: import("../api/workspace.js").UpdateWorkspaceEmbeddedLinkRequest;
|
|
113
|
+
}, import("../api/workspace.js").IdResponse>;
|
|
114
|
+
/**
|
|
115
|
+
* Updates all embedded links from a workspace
|
|
116
|
+
*/
|
|
117
|
+
updateAllEmbeddedLinksInWorkspace: import("../network/types.js").MutationObject<{
|
|
118
|
+
workspaceId: string;
|
|
119
|
+
body: import("../api/workspace.js").UpsertWorkspaceEmbeddedLinkRequest[];
|
|
120
|
+
}, unknown>;
|
|
121
|
+
/**
|
|
122
|
+
* Gets an embedded link from an application
|
|
123
|
+
*/
|
|
124
|
+
embeddedLinkInApplication: import("../network/types.js").QueryObject<{
|
|
125
|
+
workspaceId: string;
|
|
126
|
+
applicationId: string;
|
|
127
|
+
embeddedLinkId: string;
|
|
128
|
+
}, import("../api/workspace.js").ApplicationEmbeddedLinkReadResponse>;
|
|
129
|
+
/**
|
|
130
|
+
* Gets all embedded links from an application
|
|
131
|
+
*/
|
|
132
|
+
allEmbeddedLinksInApplication: import("../network/types.js").QueryObject<{
|
|
133
|
+
workspaceId: string;
|
|
134
|
+
applicationId: string;
|
|
135
|
+
name?: string | undefined;
|
|
136
|
+
}, import("../api/workspace.js").ApplicationEmbeddedLinkReadResponse[]>;
|
|
137
|
+
/**
|
|
138
|
+
* Creates an embedded link in an application
|
|
139
|
+
*/
|
|
140
|
+
createEmbeddedLinkInApplication: import("../network/types.js").MutationObject<{
|
|
141
|
+
workspaceId: string;
|
|
142
|
+
applicationId: string;
|
|
143
|
+
createApplicationEmbeddedLinkRequest: import("../api/workspace.js").CreateApplicationEmbeddedLinkRequest;
|
|
144
|
+
}, import("../api/workspace.js").IdResponse>;
|
|
145
|
+
/**
|
|
146
|
+
* Deletes an embedded link from an application
|
|
147
|
+
*/
|
|
148
|
+
deleteEmbeddedLinkFromApplication: import("../network/types.js").MutationObject<{
|
|
149
|
+
workspaceId: string;
|
|
150
|
+
applicationId: string;
|
|
151
|
+
embeddedLinkId: string;
|
|
152
|
+
}, unknown>;
|
|
153
|
+
/**
|
|
154
|
+
* Updates an embedded link in an application
|
|
155
|
+
*/
|
|
156
|
+
updateEmbeddedLinkInApplication: import("../network/types.js").MutationObject<{
|
|
157
|
+
workspaceId: string;
|
|
158
|
+
applicationId: string;
|
|
159
|
+
embeddedLinkId: string;
|
|
160
|
+
updateApplicationEmbeddedLinkRequest: import("../api/workspace.js").UpdateApplicationEmbeddedLinkRequest;
|
|
161
|
+
}, import("../api/workspace.js").IdResponse>;
|
|
162
|
+
/**
|
|
163
|
+
* Updates all embedded links in an application
|
|
164
|
+
*/
|
|
165
|
+
updateAllEmbeddedLinksInApplication: import("../network/types.js").MutationObject<{
|
|
166
|
+
workspaceId: string;
|
|
167
|
+
applicationId: string;
|
|
168
|
+
body: import("../api/workspace.js").UpsertApplicationEmbeddedLinkRequest[];
|
|
169
|
+
}, unknown>;
|
|
32
170
|
}
|
|
33
171
|
export declare const workspaceClient: WorkspaceClient;
|
|
34
172
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workspace.d.ts","sourceRoot":"","sources":["../../src/client/workspace.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAA;
|
|
1
|
+
{"version":3,"file":"workspace.d.ts","sourceRoot":"","sources":["../../src/client/workspace.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAA;AAwB7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AAC9D,OAAO,EAAE,uBAAuB,EAAE,MAAM,oCAAoC,CAAA;AAE5E,cAAM,eAAgB,SAAQ,uBAAuB;;IAKnD,SAAS,CAAC,mBAAmB,CAAC,KAAK,EAAE,SAAS,GAAG,iBAAiB;IAIlE;;OAEG;IACH,uBAAuB;;;wEAAsC;IAE7D;;OAEG;IACH,mBAAmB;;;;sEAAqC;IAExD;;OAEG;IACH,mCAAmC;;;;gBAAqD;IAExF;;OAEG;IACH,yBAAyB;;;gBAA8D;IAEvF;;OAEG;IACH,kDAAkD;;;;gBAAoE;IAEtH;;OAEG;IACH,mCAAmC;;;;gBAAqD;IAExF;;OAEG;IACH,YAAY;;6DAA8B;IAE1C;;OAEG;IACH,WAAW;;2DAA6B;IAExC;;OAEG;IACH,iBAAiB;;8CAAiC;IAElD;;OAEG;IACH,iBAAiB;;;8CAAmC;IAEpD;;OAEG;IACH,uBAAuB;;;qEAA8B;IAErD;;OAEG;IACH,2BAA2B;;;uEAA+B;IAE1D;;OAEG;IACH,6BAA6B;;;8CAAoC;IAEjE;;OAEG;IACH,+BAA+B;;;gBAAoC;IAEnE;;OAEG;IACH,6BAA6B;;;;8CAAoC;IAEjE;;OAEG;IACH,iCAAiC;;;gBAAuC;IAExE;;OAEG;IACH,yBAAyB;;;;uEAA0C;IAEnE;;OAEG;IACH,6BAA6B;;;;yEAA6C;IAE1E;;OAEG;IACH,+BAA+B;;;;8CAA8C;IAE7E;;OAEG;IACH,iCAAiC;;;;gBAAgD;IAEjF;;OAEG;IACH,+BAA+B;;;;;8CAAgD;IAE/E;;OAEG;IACH,mCAAmC;;;;gBAAmD;CAEvF;AAED,eAAO,MAAM,eAAe,iBAAwB,CAAA"}
|
package/dist/client/workspace.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defaults, getEnvironment, getEnvironments, save9 as saveEnvironment, update9 as updateEnvironment, } from '../api/workspace.js';
|
|
1
|
+
import { save5 as createEmbeddedLink, defaults, delete6 as deleteApplicationEmbeddedLinks, deleteConnectionInterfaceAttributesFromEnvironment, deleteConnectionInterfaceFromAllEnvironments, delete4 as deleteEmbeddedLink, getEmbeddedLinks1 as getAllApplicationEmbeddedLinks, getEmbeddedLink1 as getApplicationEmbeddedLinks, getConnectionInterface, getConnectionInterfaces, getEmbeddedLink, getEmbeddedLinks, getEnvironment, getEnvironments, save8 as saveApplicationEmbeddedLinks, save9 as saveEnvironment, upsertBatch2 as updateAllApplicationEmbeddedLinks, upsertBatch1 as updateAllEmbeddedLink, update8 as updateApplicationEmbeddedLinks, updateConnectionInterfaceAttributes, updateConnectionInterfaceVisibility, update5 as updateEmbeddedLink, update9 as updateEnvironment, } from '../api/workspace.js';
|
|
2
2
|
import apis from '../apis.json';
|
|
3
3
|
import { DefaultAPIError } from '../error/DefaultAPIError.js';
|
|
4
4
|
import { workspaceDictionary } from '../error/dictionary/workspace.js';
|
|
@@ -6,6 +6,60 @@ import { ReactQueryNetworkClient } from '../network/ReactQueryNetworkClient.js';
|
|
|
6
6
|
class WorkspaceClient extends ReactQueryNetworkClient {
|
|
7
7
|
constructor() {
|
|
8
8
|
super(apis.workspace.url, defaults);
|
|
9
|
+
/**
|
|
10
|
+
* Gets all connection interfaces from a workspace
|
|
11
|
+
*/
|
|
12
|
+
Object.defineProperty(this, "allConnectionInterfaces", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
configurable: true,
|
|
15
|
+
writable: true,
|
|
16
|
+
value: this.query(getConnectionInterfaces)
|
|
17
|
+
});
|
|
18
|
+
/**
|
|
19
|
+
* Gets a connection interface from a workspace
|
|
20
|
+
*/
|
|
21
|
+
Object.defineProperty(this, "connectionInterface", {
|
|
22
|
+
enumerable: true,
|
|
23
|
+
configurable: true,
|
|
24
|
+
writable: true,
|
|
25
|
+
value: this.query(getConnectionInterface)
|
|
26
|
+
});
|
|
27
|
+
/**
|
|
28
|
+
* Updates the visibility of a connection interface
|
|
29
|
+
*/
|
|
30
|
+
Object.defineProperty(this, "updateConnectionInterfaceVisibility", {
|
|
31
|
+
enumerable: true,
|
|
32
|
+
configurable: true,
|
|
33
|
+
writable: true,
|
|
34
|
+
value: this.mutation(updateConnectionInterfaceVisibility)
|
|
35
|
+
});
|
|
36
|
+
/**
|
|
37
|
+
* Removes a connection interface
|
|
38
|
+
*/
|
|
39
|
+
Object.defineProperty(this, "deleteConnectionInterface", {
|
|
40
|
+
enumerable: true,
|
|
41
|
+
configurable: true,
|
|
42
|
+
writable: true,
|
|
43
|
+
value: this.mutation(deleteConnectionInterfaceFromAllEnvironments)
|
|
44
|
+
});
|
|
45
|
+
/**
|
|
46
|
+
* Removes connection interface attributes by environment
|
|
47
|
+
*/
|
|
48
|
+
Object.defineProperty(this, "deleteConnectionInterfaceAttributesFromEnvironment", {
|
|
49
|
+
enumerable: true,
|
|
50
|
+
configurable: true,
|
|
51
|
+
writable: true,
|
|
52
|
+
value: this.mutation(deleteConnectionInterfaceAttributesFromEnvironment)
|
|
53
|
+
});
|
|
54
|
+
/**
|
|
55
|
+
* Updates the attributes of a connection interface
|
|
56
|
+
*/
|
|
57
|
+
Object.defineProperty(this, "updateConnectionInterfaceAttributes", {
|
|
58
|
+
enumerable: true,
|
|
59
|
+
configurable: true,
|
|
60
|
+
writable: true,
|
|
61
|
+
value: this.mutation(updateConnectionInterfaceAttributes)
|
|
62
|
+
});
|
|
9
63
|
/**
|
|
10
64
|
* Gets all environments
|
|
11
65
|
*/
|
|
@@ -42,6 +96,114 @@ class WorkspaceClient extends ReactQueryNetworkClient {
|
|
|
42
96
|
writable: true,
|
|
43
97
|
value: this.mutation(updateEnvironment)
|
|
44
98
|
});
|
|
99
|
+
/**
|
|
100
|
+
* Gets embedded link by id
|
|
101
|
+
*/
|
|
102
|
+
Object.defineProperty(this, "embeddedLinkInWorkspace", {
|
|
103
|
+
enumerable: true,
|
|
104
|
+
configurable: true,
|
|
105
|
+
writable: true,
|
|
106
|
+
value: this.query(getEmbeddedLink)
|
|
107
|
+
});
|
|
108
|
+
/**
|
|
109
|
+
* Gets all embedded links from a workspace
|
|
110
|
+
*/
|
|
111
|
+
Object.defineProperty(this, "allEmbeddedLinksInWorkspace", {
|
|
112
|
+
enumerable: true,
|
|
113
|
+
configurable: true,
|
|
114
|
+
writable: true,
|
|
115
|
+
value: this.query(getEmbeddedLinks)
|
|
116
|
+
});
|
|
117
|
+
/**
|
|
118
|
+
* Creates an embedded link in a workspace
|
|
119
|
+
*/
|
|
120
|
+
Object.defineProperty(this, "createEmbeddedLinkInWorkspace", {
|
|
121
|
+
enumerable: true,
|
|
122
|
+
configurable: true,
|
|
123
|
+
writable: true,
|
|
124
|
+
value: this.mutation(createEmbeddedLink)
|
|
125
|
+
});
|
|
126
|
+
/**
|
|
127
|
+
* Deletes an embedded link from a workspace
|
|
128
|
+
*/
|
|
129
|
+
Object.defineProperty(this, "deleteEmbeddedLinkFromWorkspace", {
|
|
130
|
+
enumerable: true,
|
|
131
|
+
configurable: true,
|
|
132
|
+
writable: true,
|
|
133
|
+
value: this.mutation(deleteEmbeddedLink)
|
|
134
|
+
});
|
|
135
|
+
/**
|
|
136
|
+
* Updates an embedded link from a workspace
|
|
137
|
+
*/
|
|
138
|
+
Object.defineProperty(this, "updateEmbeddedLinkInWorkspace", {
|
|
139
|
+
enumerable: true,
|
|
140
|
+
configurable: true,
|
|
141
|
+
writable: true,
|
|
142
|
+
value: this.mutation(updateEmbeddedLink)
|
|
143
|
+
});
|
|
144
|
+
/**
|
|
145
|
+
* Updates all embedded links from a workspace
|
|
146
|
+
*/
|
|
147
|
+
Object.defineProperty(this, "updateAllEmbeddedLinksInWorkspace", {
|
|
148
|
+
enumerable: true,
|
|
149
|
+
configurable: true,
|
|
150
|
+
writable: true,
|
|
151
|
+
value: this.mutation(updateAllEmbeddedLink)
|
|
152
|
+
});
|
|
153
|
+
/**
|
|
154
|
+
* Gets an embedded link from an application
|
|
155
|
+
*/
|
|
156
|
+
Object.defineProperty(this, "embeddedLinkInApplication", {
|
|
157
|
+
enumerable: true,
|
|
158
|
+
configurable: true,
|
|
159
|
+
writable: true,
|
|
160
|
+
value: this.query(getApplicationEmbeddedLinks)
|
|
161
|
+
});
|
|
162
|
+
/**
|
|
163
|
+
* Gets all embedded links from an application
|
|
164
|
+
*/
|
|
165
|
+
Object.defineProperty(this, "allEmbeddedLinksInApplication", {
|
|
166
|
+
enumerable: true,
|
|
167
|
+
configurable: true,
|
|
168
|
+
writable: true,
|
|
169
|
+
value: this.query(getAllApplicationEmbeddedLinks)
|
|
170
|
+
});
|
|
171
|
+
/**
|
|
172
|
+
* Creates an embedded link in an application
|
|
173
|
+
*/
|
|
174
|
+
Object.defineProperty(this, "createEmbeddedLinkInApplication", {
|
|
175
|
+
enumerable: true,
|
|
176
|
+
configurable: true,
|
|
177
|
+
writable: true,
|
|
178
|
+
value: this.mutation(saveApplicationEmbeddedLinks)
|
|
179
|
+
});
|
|
180
|
+
/**
|
|
181
|
+
* Deletes an embedded link from an application
|
|
182
|
+
*/
|
|
183
|
+
Object.defineProperty(this, "deleteEmbeddedLinkFromApplication", {
|
|
184
|
+
enumerable: true,
|
|
185
|
+
configurable: true,
|
|
186
|
+
writable: true,
|
|
187
|
+
value: this.mutation(deleteApplicationEmbeddedLinks)
|
|
188
|
+
});
|
|
189
|
+
/**
|
|
190
|
+
* Updates an embedded link in an application
|
|
191
|
+
*/
|
|
192
|
+
Object.defineProperty(this, "updateEmbeddedLinkInApplication", {
|
|
193
|
+
enumerable: true,
|
|
194
|
+
configurable: true,
|
|
195
|
+
writable: true,
|
|
196
|
+
value: this.mutation(updateApplicationEmbeddedLinks)
|
|
197
|
+
});
|
|
198
|
+
/**
|
|
199
|
+
* Updates all embedded links in an application
|
|
200
|
+
*/
|
|
201
|
+
Object.defineProperty(this, "updateAllEmbeddedLinksInApplication", {
|
|
202
|
+
enumerable: true,
|
|
203
|
+
configurable: true,
|
|
204
|
+
writable: true,
|
|
205
|
+
value: this.mutation(updateAllApplicationEmbeddedLinks)
|
|
206
|
+
});
|
|
45
207
|
}
|
|
46
208
|
buildStackSpotError(error) {
|
|
47
209
|
return new DefaultAPIError(error.data, error.status, workspaceDictionary, error.headers);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workspace.js","sourceRoot":"","sources":["../../src/client/workspace.ts"],"names":[],"mappings":"AACA,OAAO,EACL,QAAQ,EAAE,
|
|
1
|
+
{"version":3,"file":"workspace.js","sourceRoot":"","sources":["../../src/client/workspace.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,IAAI,kBAAkB,EAC3B,QAAQ,EACR,OAAO,IAAI,8BAA8B,E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IAAI,eAAe,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,MAAM,EAAE,mBAAmB,EAAE,KAAK,CAAC,OAAO,CAAC,CAAA;IAC1F,CAAC;CAgHF;AAED,MAAM,CAAC,MAAM,eAAe,GAAG,IAAI,eAAe,EAAE,CAAA"}
|
package/package.json
CHANGED
package/src/client/workspace.ts
CHANGED
|
@@ -1,6 +1,22 @@
|
|
|
1
1
|
import { HttpError } from '@oazapfts/runtime'
|
|
2
2
|
import {
|
|
3
|
-
|
|
3
|
+
save5 as createEmbeddedLink,
|
|
4
|
+
defaults,
|
|
5
|
+
delete6 as deleteApplicationEmbeddedLinks,
|
|
6
|
+
deleteConnectionInterfaceAttributesFromEnvironment, deleteConnectionInterfaceFromAllEnvironments,
|
|
7
|
+
delete4 as deleteEmbeddedLink,
|
|
8
|
+
getEmbeddedLinks1 as getAllApplicationEmbeddedLinks,
|
|
9
|
+
getEmbeddedLink1 as getApplicationEmbeddedLinks,
|
|
10
|
+
getConnectionInterface, getConnectionInterfaces,
|
|
11
|
+
getEmbeddedLink, getEmbeddedLinks, getEnvironment, getEnvironments,
|
|
12
|
+
save8 as saveApplicationEmbeddedLinks,
|
|
13
|
+
save9 as saveEnvironment,
|
|
14
|
+
upsertBatch2 as updateAllApplicationEmbeddedLinks,
|
|
15
|
+
upsertBatch1 as updateAllEmbeddedLink,
|
|
16
|
+
update8 as updateApplicationEmbeddedLinks,
|
|
17
|
+
updateConnectionInterfaceAttributes,
|
|
18
|
+
updateConnectionInterfaceVisibility,
|
|
19
|
+
update5 as updateEmbeddedLink,
|
|
4
20
|
update9 as updateEnvironment,
|
|
5
21
|
} from '../api/workspace'
|
|
6
22
|
import apis from '../apis.json'
|
|
@@ -17,6 +33,36 @@ class WorkspaceClient extends ReactQueryNetworkClient {
|
|
|
17
33
|
protected buildStackSpotError(error: HttpError): StackspotAPIError {
|
|
18
34
|
return new DefaultAPIError(error.data, error.status, workspaceDictionary, error.headers)
|
|
19
35
|
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Gets all connection interfaces from a workspace
|
|
39
|
+
*/
|
|
40
|
+
allConnectionInterfaces = this.query(getConnectionInterfaces)
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Gets a connection interface from a workspace
|
|
44
|
+
*/
|
|
45
|
+
connectionInterface = this.query(getConnectionInterface)
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Updates the visibility of a connection interface
|
|
49
|
+
*/
|
|
50
|
+
updateConnectionInterfaceVisibility = this.mutation(updateConnectionInterfaceVisibility)
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Removes a connection interface
|
|
54
|
+
*/
|
|
55
|
+
deleteConnectionInterface = this.mutation(deleteConnectionInterfaceFromAllEnvironments)
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Removes connection interface attributes by environment
|
|
59
|
+
*/
|
|
60
|
+
deleteConnectionInterfaceAttributesFromEnvironment = this.mutation(deleteConnectionInterfaceAttributesFromEnvironment)
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Updates the attributes of a connection interface
|
|
64
|
+
*/
|
|
65
|
+
updateConnectionInterfaceAttributes = this.mutation(updateConnectionInterfaceAttributes)
|
|
20
66
|
|
|
21
67
|
/**
|
|
22
68
|
* Gets all environments
|
|
@@ -38,6 +84,66 @@ class WorkspaceClient extends ReactQueryNetworkClient {
|
|
|
38
84
|
*/
|
|
39
85
|
updateEnvironment = this.mutation(updateEnvironment)
|
|
40
86
|
|
|
87
|
+
/**
|
|
88
|
+
* Gets embedded link by id
|
|
89
|
+
*/
|
|
90
|
+
embeddedLinkInWorkspace = this.query(getEmbeddedLink)
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Gets all embedded links from a workspace
|
|
94
|
+
*/
|
|
95
|
+
allEmbeddedLinksInWorkspace = this.query(getEmbeddedLinks)
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* Creates an embedded link in a workspace
|
|
99
|
+
*/
|
|
100
|
+
createEmbeddedLinkInWorkspace = this.mutation(createEmbeddedLink)
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* Deletes an embedded link from a workspace
|
|
104
|
+
*/
|
|
105
|
+
deleteEmbeddedLinkFromWorkspace = this.mutation(deleteEmbeddedLink)
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* Updates an embedded link from a workspace
|
|
109
|
+
*/
|
|
110
|
+
updateEmbeddedLinkInWorkspace = this.mutation(updateEmbeddedLink)
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* Updates all embedded links from a workspace
|
|
114
|
+
*/
|
|
115
|
+
updateAllEmbeddedLinksInWorkspace = this.mutation(updateAllEmbeddedLink)
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* Gets an embedded link from an application
|
|
119
|
+
*/
|
|
120
|
+
embeddedLinkInApplication = this.query(getApplicationEmbeddedLinks)
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* Gets all embedded links from an application
|
|
124
|
+
*/
|
|
125
|
+
allEmbeddedLinksInApplication = this.query(getAllApplicationEmbeddedLinks)
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* Creates an embedded link in an application
|
|
129
|
+
*/
|
|
130
|
+
createEmbeddedLinkInApplication = this.mutation(saveApplicationEmbeddedLinks)
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* Deletes an embedded link from an application
|
|
134
|
+
*/
|
|
135
|
+
deleteEmbeddedLinkFromApplication = this.mutation(deleteApplicationEmbeddedLinks)
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* Updates an embedded link in an application
|
|
139
|
+
*/
|
|
140
|
+
updateEmbeddedLinkInApplication = this.mutation(updateApplicationEmbeddedLinks)
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* Updates all embedded links in an application
|
|
144
|
+
*/
|
|
145
|
+
updateAllEmbeddedLinksInApplication = this.mutation(updateAllApplicationEmbeddedLinks)
|
|
146
|
+
|
|
41
147
|
}
|
|
42
148
|
|
|
43
149
|
export const workspaceClient = new WorkspaceClient()
|