@stack-spot/portal-network 0.1.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/.generate-api.failed.json +1 -0
- package/dist/api/account.d.ts +2368 -0
- package/dist/api/account.d.ts.map +1 -0
- package/dist/api/account.js +1521 -0
- package/dist/api/account.js.map +1 -0
- package/dist/api/ai.d.ts +1432 -0
- package/dist/api/ai.d.ts.map +1 -0
- package/dist/api/ai.js +1342 -0
- package/dist/api/ai.js.map +1 -0
- package/dist/api/apiRuntime.d.ts +922 -0
- package/dist/api/apiRuntime.d.ts.map +1 -0
- package/dist/api/apiRuntime.js +599 -0
- package/dist/api/apiRuntime.js.map +1 -0
- package/dist/api/cloudAccount.d.ts +473 -0
- package/dist/api/cloudAccount.d.ts.map +1 -0
- package/dist/api/cloudAccount.js +300 -0
- package/dist/api/cloudAccount.js.map +1 -0
- package/dist/api/cloudServices.d.ts +1233 -0
- package/dist/api/cloudServices.d.ts.map +1 -0
- package/dist/api/cloudServices.js +715 -0
- package/dist/api/cloudServices.js.map +1 -0
- package/dist/api/insights.d.ts +123 -0
- package/dist/api/insights.d.ts.map +1 -0
- package/dist/api/insights.js +112 -0
- package/dist/api/insights.js.map +1 -0
- package/dist/api/plugin.d.ts +368 -0
- package/dist/api/plugin.d.ts.map +1 -0
- package/dist/api/plugin.js +218 -0
- package/dist/api/plugin.js.map +1 -0
- package/dist/api/serviceCatalog.d.ts +737 -0
- package/dist/api/serviceCatalog.d.ts.map +1 -0
- package/dist/api/serviceCatalog.js +611 -0
- package/dist/api/serviceCatalog.js.map +1 -0
- package/dist/api/workflows.d.ts +366 -0
- package/dist/api/workflows.d.ts.map +1 -0
- package/dist/api/workflows.js +175 -0
- package/dist/api/workflows.js.map +1 -0
- package/dist/api/workspace.js +1476 -0
- package/dist/api/workspace.js.map +1 -0
- package/dist/api/workspaceManager.d.ts +1121 -0
- package/dist/api/workspaceManager.d.ts.map +1 -0
- package/dist/api/workspaceManager.js +357 -0
- package/dist/api/workspaceManager.js.map +1 -0
- package/dist/api/workspaceSearchEngine.d.ts +93 -0
- package/dist/api/workspaceSearchEngine.d.ts.map +1 -0
- package/dist/api/workspaceSearchEngine.js +55 -0
- package/dist/api/workspaceSearchEngine.js.map +1 -0
- package/dist/apis.json +129 -0
- package/dist/client/account.d.ts +46 -0
- package/dist/client/account.d.ts.map +1 -0
- package/dist/client/account.js +104 -0
- package/dist/client/account.js.map +1 -0
- package/dist/error/CanceledError.d.ts +5 -0
- package/dist/error/CanceledError.d.ts.map +1 -0
- package/dist/error/CanceledError.js +7 -0
- package/dist/error/CanceledError.js.map +1 -0
- package/dist/error/DefaultAPIError.d.ts +9 -0
- package/dist/error/DefaultAPIError.d.ts.map +1 -0
- package/dist/error/DefaultAPIError.js +58 -0
- package/dist/error/DefaultAPIError.js.map +1 -0
- package/dist/error/StackspotAPIError.d.ts +19 -0
- package/dist/error/StackspotAPIError.d.ts.map +1 -0
- package/dist/error/StackspotAPIError.js +39 -0
- package/dist/error/StackspotAPIError.js.map +1 -0
- package/dist/error/dictionary/account.d.ts +55 -0
- package/dist/error/dictionary/account.d.ts.map +1 -0
- package/dist/error/dictionary/account.js +55 -0
- package/dist/error/dictionary/account.js.map +1 -0
- package/dist/error/dictionary/action.d.ts +163 -0
- package/dist/error/dictionary/action.d.ts.map +1 -0
- package/dist/error/dictionary/action.js +163 -0
- package/dist/error/dictionary/action.js.map +1 -0
- package/dist/error/dictionary/base.d.ts +21 -0
- package/dist/error/dictionary/base.d.ts.map +1 -0
- package/dist/error/dictionary/base.js +21 -0
- package/dist/error/dictionary/base.js.map +1 -0
- package/dist/error/dictionary/cnt-fields.d.ts +13 -0
- package/dist/error/dictionary/cnt-fields.d.ts.map +1 -0
- package/dist/error/dictionary/cnt-fields.js +13 -0
- package/dist/error/dictionary/cnt-fields.js.map +1 -0
- package/dist/error/dictionary/cnt.d.ts +79 -0
- package/dist/error/dictionary/cnt.d.ts.map +1 -0
- package/dist/error/dictionary/cnt.js +79 -0
- package/dist/error/dictionary/cnt.js.map +1 -0
- package/dist/error/dictionary/rte.d.ts +23 -0
- package/dist/error/dictionary/rte.d.ts.map +1 -0
- package/dist/error/dictionary/rte.js +23 -0
- package/dist/error/dictionary/rte.js.map +1 -0
- package/dist/error/dictionary/rtm.d.ts +9 -0
- package/dist/error/dictionary/rtm.d.ts.map +1 -0
- package/dist/error/dictionary/rtm.js +9 -0
- package/dist/error/dictionary/rtm.js.map +1 -0
- package/dist/error/dictionary/workspace-fields.d.ts +9 -0
- package/dist/error/dictionary/workspace-fields.d.ts.map +1 -0
- package/dist/error/dictionary/workspace-fields.js +9 -0
- package/dist/error/dictionary/workspace-fields.js.map +1 -0
- package/dist/error/dictionary/workspace.d.ts +99 -0
- package/dist/error/dictionary/workspace.d.ts.map +1 -0
- package/dist/error/dictionary/workspace.js +99 -0
- package/dist/error/dictionary/workspace.js.map +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -0
- package/dist/network/AutoMutation.d.ts +10 -0
- package/dist/network/AutoMutation.d.ts.map +1 -0
- package/dist/network/AutoMutation.js +20 -0
- package/dist/network/AutoMutation.js.map +1 -0
- package/dist/network/AutoOperation.d.ts +19 -0
- package/dist/network/AutoOperation.d.ts.map +1 -0
- package/dist/network/AutoOperation.js +99 -0
- package/dist/network/AutoOperation.js.map +1 -0
- package/dist/network/AutoQuery.d.ts +19 -0
- package/dist/network/AutoQuery.d.ts.map +1 -0
- package/dist/network/AutoQuery.js +70 -0
- package/dist/network/AutoQuery.js.map +1 -0
- package/dist/network/ManualMutation.d.ts +11 -0
- package/dist/network/ManualMutation.d.ts.map +1 -0
- package/dist/network/ManualMutation.js +32 -0
- package/dist/network/ManualMutation.js.map +1 -0
- package/dist/network/ManualOperation.d.ts +13 -0
- package/dist/network/ManualOperation.d.ts.map +1 -0
- package/dist/network/ManualOperation.js +53 -0
- package/dist/network/ManualOperation.js.map +1 -0
- package/dist/network/ManualQuery.d.ts +20 -0
- package/dist/network/ManualQuery.d.ts.map +1 -0
- package/dist/network/ManualQuery.js +77 -0
- package/dist/network/ManualQuery.js.map +1 -0
- package/dist/network/NetworkClient.d.ts +20 -0
- package/dist/network/NetworkClient.d.ts.map +1 -0
- package/dist/network/NetworkClient.js +85 -0
- package/dist/network/NetworkClient.js.map +1 -0
- package/dist/network/ReactQueryNetworkClient.d.ts +16 -0
- package/dist/network/ReactQueryNetworkClient.d.ts.map +1 -0
- package/dist/network/ReactQueryNetworkClient.js +125 -0
- package/dist/network/ReactQueryNetworkClient.js.map +1 -0
- package/dist/network/react-query-client.d.ts +3 -0
- package/dist/network/react-query-client.d.ts.map +1 -0
- package/dist/network/react-query-client.js +3 -0
- package/dist/network/react-query-client.js.map +1 -0
- package/dist/network/types.d.ts +55 -0
- package/dist/network/types.d.ts.map +1 -0
- package/dist/network/types.js +2 -0
- package/dist/network/types.js.map +1 -0
- package/package.json +56 -0
- package/readme.md +1 -0
- package/scripts/generate-apis.ts +134 -0
- package/src/api/account.ts +4793 -0
- package/src/api/ai.ts +3121 -0
- package/src/api/apiRuntime.ts +2029 -0
- package/src/api/cloudAccount.ts +1133 -0
- package/src/api/cloudServices.ts +2872 -0
- package/src/api/insights.ts +264 -0
- package/src/api/plugin.ts +685 -0
- package/src/api/serviceCatalog.ts +2908 -0
- package/src/api/workflows.ts +709 -0
- package/src/api/workspace.ts +5178 -0
- package/src/api/workspaceManager.ts +1516 -0
- package/src/api/workspaceSearchEngine.ts +153 -0
- package/src/apis.json +129 -0
- package/src/client/account.ts +52 -0
- package/src/error/CanceledError.ts +7 -0
- package/src/error/DefaultAPIError.ts +51 -0
- package/src/error/StackspotAPIError.ts +31 -0
- package/src/error/dictionary/account.ts +56 -0
- package/src/error/dictionary/action.ts +206 -0
- package/src/error/dictionary/base.ts +22 -0
- package/src/error/dictionary/cnt-fields.ts +14 -0
- package/src/error/dictionary/cnt.ts +80 -0
- package/src/error/dictionary/rte.ts +24 -0
- package/src/error/dictionary/rtm.ts +10 -0
- package/src/error/dictionary/workspace-fields.ts +10 -0
- package/src/error/dictionary/workspace.ts +100 -0
- package/src/index.ts +5 -0
- package/src/network/AutoMutation.ts +25 -0
- package/src/network/AutoOperation.ts +88 -0
- package/src/network/AutoQuery.ts +80 -0
- package/src/network/ManualMutation.ts +41 -0
- package/src/network/ManualOperation.ts +55 -0
- package/src/network/ManualQuery.ts +93 -0
- package/src/network/NetworkClient.ts +93 -0
- package/src/network/ReactQueryNetworkClient.ts +154 -0
- package/src/network/react-query-client.ts +3 -0
- package/src/network/types.ts +82 -0
- package/tsconfig.build.json +4 -0
- package/tsconfig.json +10 -0
|
@@ -0,0 +1,264 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Insights 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: Oazapfts.Defaults<Oazapfts.CustomHeaders> = {
|
|
10
|
+
headers: {},
|
|
11
|
+
baseUrl: "https://insights-insights-api.dev.stackspot.com",
|
|
12
|
+
};
|
|
13
|
+
const oazapfts = Oazapfts.runtime(defaults);
|
|
14
|
+
export const servers = {
|
|
15
|
+
generatedServerUrl: "https://insights-insights-api.dev.stackspot.com"
|
|
16
|
+
};
|
|
17
|
+
export type NewPanelRequest = {
|
|
18
|
+
panelType: string;
|
|
19
|
+
};
|
|
20
|
+
export type IdResponse = {
|
|
21
|
+
/** Id response. */
|
|
22
|
+
id?: number;
|
|
23
|
+
};
|
|
24
|
+
export type ValidationDetails = {
|
|
25
|
+
code: string;
|
|
26
|
+
field?: string;
|
|
27
|
+
details?: string;
|
|
28
|
+
values?: string[];
|
|
29
|
+
};
|
|
30
|
+
export type ErrorResponse = {
|
|
31
|
+
code: string;
|
|
32
|
+
status: number;
|
|
33
|
+
details: string;
|
|
34
|
+
validationDetails?: ValidationDetails[];
|
|
35
|
+
};
|
|
36
|
+
export type AddPanelToDashboardRequest = {
|
|
37
|
+
panel: string;
|
|
38
|
+
};
|
|
39
|
+
export type NewDatasetRequest = {
|
|
40
|
+
name: string;
|
|
41
|
+
description?: string;
|
|
42
|
+
scope: string;
|
|
43
|
+
query: string;
|
|
44
|
+
panelId: number;
|
|
45
|
+
};
|
|
46
|
+
export type Panel = {
|
|
47
|
+
/** Panel id. */
|
|
48
|
+
id?: number;
|
|
49
|
+
/** The name of the dataset used to generate this panel. */
|
|
50
|
+
datasetName?: string;
|
|
51
|
+
/** The type of the panel. */
|
|
52
|
+
panelType?: string;
|
|
53
|
+
/** Order to display this panel. */
|
|
54
|
+
order?: number;
|
|
55
|
+
/** Data for this panel. */
|
|
56
|
+
data?: {
|
|
57
|
+
[key: string]: object;
|
|
58
|
+
}[];
|
|
59
|
+
};
|
|
60
|
+
export type DashboardReadResponse = {
|
|
61
|
+
/** Panels in a dashboard. */
|
|
62
|
+
panels?: Panel[];
|
|
63
|
+
};
|
|
64
|
+
/**
|
|
65
|
+
* Create Panel
|
|
66
|
+
*/
|
|
67
|
+
export function save({ newPanelRequest }: {
|
|
68
|
+
newPanelRequest: NewPanelRequest;
|
|
69
|
+
}, opts?: Oazapfts.RequestOpts) {
|
|
70
|
+
return oazapfts.ok(oazapfts.fetchJson<{
|
|
71
|
+
status: 201;
|
|
72
|
+
data: IdResponse;
|
|
73
|
+
} | {
|
|
74
|
+
status: 403;
|
|
75
|
+
data: ErrorResponse;
|
|
76
|
+
} | {
|
|
77
|
+
status: 500;
|
|
78
|
+
data: ErrorResponse;
|
|
79
|
+
}>("/v1/panels", oazapfts.json({
|
|
80
|
+
...opts,
|
|
81
|
+
method: "POST",
|
|
82
|
+
body: newPanelRequest
|
|
83
|
+
})));
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Add Panel to Dashboard Studio
|
|
87
|
+
*/
|
|
88
|
+
export function addToDashboardStudio({ accountSlug, studioSlug, addPanelToDashboardRequest }: {
|
|
89
|
+
accountSlug: string;
|
|
90
|
+
studioSlug: string;
|
|
91
|
+
addPanelToDashboardRequest: AddPanelToDashboardRequest;
|
|
92
|
+
}, opts?: Oazapfts.RequestOpts) {
|
|
93
|
+
return oazapfts.ok(oazapfts.fetchJson<{
|
|
94
|
+
status: 200;
|
|
95
|
+
data: IdResponse;
|
|
96
|
+
} | {
|
|
97
|
+
status: 403;
|
|
98
|
+
data: ErrorResponse;
|
|
99
|
+
} | {
|
|
100
|
+
status: 500;
|
|
101
|
+
data: ErrorResponse;
|
|
102
|
+
}>(`/v1/panels/account/${encodeURIComponent(accountSlug)}/studio/${encodeURIComponent(studioSlug)}`, oazapfts.json({
|
|
103
|
+
...opts,
|
|
104
|
+
method: "POST",
|
|
105
|
+
body: addPanelToDashboardRequest
|
|
106
|
+
})));
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Remove Panel from Dashboard Studio
|
|
110
|
+
*/
|
|
111
|
+
export function removeFromDashboardStudio({ accountSlug, studioSlug, panelId }: {
|
|
112
|
+
accountSlug: string;
|
|
113
|
+
studioSlug: string;
|
|
114
|
+
panelId: number;
|
|
115
|
+
}, opts?: Oazapfts.RequestOpts) {
|
|
116
|
+
return oazapfts.ok(oazapfts.fetchJson<{
|
|
117
|
+
status: 200;
|
|
118
|
+
data: IdResponse;
|
|
119
|
+
} | {
|
|
120
|
+
status: 403;
|
|
121
|
+
data: ErrorResponse;
|
|
122
|
+
} | {
|
|
123
|
+
status: 500;
|
|
124
|
+
data: ErrorResponse;
|
|
125
|
+
}>(`/v1/panels/account/${encodeURIComponent(accountSlug)}/studio/${encodeURIComponent(studioSlug)}${QS.query(QS.explode({
|
|
126
|
+
panelId
|
|
127
|
+
}))}`, {
|
|
128
|
+
...opts,
|
|
129
|
+
method: "DELETE"
|
|
130
|
+
}));
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* Create Dataset
|
|
134
|
+
*/
|
|
135
|
+
export function save1({ newDatasetRequest }: {
|
|
136
|
+
newDatasetRequest: NewDatasetRequest;
|
|
137
|
+
}, opts?: Oazapfts.RequestOpts) {
|
|
138
|
+
return oazapfts.ok(oazapfts.fetchJson<{
|
|
139
|
+
status: 201;
|
|
140
|
+
data: IdResponse;
|
|
141
|
+
} | {
|
|
142
|
+
status: 403;
|
|
143
|
+
data: ErrorResponse;
|
|
144
|
+
} | {
|
|
145
|
+
status: 422;
|
|
146
|
+
data: ErrorResponse;
|
|
147
|
+
} | {
|
|
148
|
+
status: 500;
|
|
149
|
+
data: ErrorResponse;
|
|
150
|
+
}>("/v1/datasets", oazapfts.json({
|
|
151
|
+
...opts,
|
|
152
|
+
method: "POST",
|
|
153
|
+
body: newDatasetRequest
|
|
154
|
+
})));
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* Download Studio Data
|
|
158
|
+
*/
|
|
159
|
+
export function downloadStudioData({ accountSlug, studioSlug, startDate, endDate, stackspotCustomerIp }: {
|
|
160
|
+
accountSlug: string;
|
|
161
|
+
studioSlug: string;
|
|
162
|
+
startDate: string;
|
|
163
|
+
endDate: string;
|
|
164
|
+
stackspotCustomerIp?: string;
|
|
165
|
+
}, opts?: Oazapfts.RequestOpts) {
|
|
166
|
+
return oazapfts.ok(oazapfts.fetchJson<{
|
|
167
|
+
status: 200;
|
|
168
|
+
data: string;
|
|
169
|
+
} | {
|
|
170
|
+
status: 403;
|
|
171
|
+
data: ErrorResponse;
|
|
172
|
+
} | {
|
|
173
|
+
status: 500;
|
|
174
|
+
data: ErrorResponse;
|
|
175
|
+
}>(`/v1/assets/account/${encodeURIComponent(accountSlug)}/studio/${encodeURIComponent(studioSlug)}/csv${QS.query(QS.explode({
|
|
176
|
+
startDate,
|
|
177
|
+
endDate
|
|
178
|
+
}))}`, {
|
|
179
|
+
...opts,
|
|
180
|
+
method: "POST",
|
|
181
|
+
headers: oazapfts.mergeHeaders(opts?.headers, {
|
|
182
|
+
"stackspot-customer-ip": stackspotCustomerIp
|
|
183
|
+
})
|
|
184
|
+
}));
|
|
185
|
+
}
|
|
186
|
+
/**
|
|
187
|
+
* Download Event account data file
|
|
188
|
+
*/
|
|
189
|
+
export function streamingAccountData({ accountSlug, startDate, endDate, dataset }: {
|
|
190
|
+
accountSlug: string;
|
|
191
|
+
startDate: string;
|
|
192
|
+
endDate: string;
|
|
193
|
+
dataset: string;
|
|
194
|
+
}, opts?: Oazapfts.RequestOpts) {
|
|
195
|
+
return oazapfts.ok(oazapfts.fetchBlob<{
|
|
196
|
+
status: 200;
|
|
197
|
+
} | {
|
|
198
|
+
status: 403;
|
|
199
|
+
data: ErrorResponse;
|
|
200
|
+
} | {
|
|
201
|
+
status: 500;
|
|
202
|
+
data: ErrorResponse;
|
|
203
|
+
}>(`/v1/assets/account/${encodeURIComponent(accountSlug)}/export${QS.query(QS.explode({
|
|
204
|
+
startDate,
|
|
205
|
+
endDate,
|
|
206
|
+
dataset
|
|
207
|
+
}))}`, {
|
|
208
|
+
...opts,
|
|
209
|
+
method: "POST"
|
|
210
|
+
}));
|
|
211
|
+
}
|
|
212
|
+
/**
|
|
213
|
+
* Download Account Data
|
|
214
|
+
*/
|
|
215
|
+
export function downloadAccountData({ accountSlug, startDate, endDate, stackspotCustomerIp }: {
|
|
216
|
+
accountSlug: string;
|
|
217
|
+
startDate: string;
|
|
218
|
+
endDate: string;
|
|
219
|
+
stackspotCustomerIp?: string;
|
|
220
|
+
}, opts?: Oazapfts.RequestOpts) {
|
|
221
|
+
return oazapfts.ok(oazapfts.fetchJson<{
|
|
222
|
+
status: 200;
|
|
223
|
+
data: string;
|
|
224
|
+
} | {
|
|
225
|
+
status: 403;
|
|
226
|
+
data: ErrorResponse;
|
|
227
|
+
} | {
|
|
228
|
+
status: 500;
|
|
229
|
+
data: ErrorResponse;
|
|
230
|
+
}>(`/v1/assets/account/${encodeURIComponent(accountSlug)}/csv${QS.query(QS.explode({
|
|
231
|
+
startDate,
|
|
232
|
+
endDate
|
|
233
|
+
}))}`, {
|
|
234
|
+
...opts,
|
|
235
|
+
method: "POST",
|
|
236
|
+
headers: oazapfts.mergeHeaders(opts?.headers, {
|
|
237
|
+
"stackspot-customer-ip": stackspotCustomerIp
|
|
238
|
+
})
|
|
239
|
+
}));
|
|
240
|
+
}
|
|
241
|
+
/**
|
|
242
|
+
* Get Dashboard Studio
|
|
243
|
+
*/
|
|
244
|
+
export function getDashboardStudio({ accountSlug, studioSlug, stackspotCustomerIp }: {
|
|
245
|
+
accountSlug: string;
|
|
246
|
+
studioSlug: string;
|
|
247
|
+
stackspotCustomerIp?: string;
|
|
248
|
+
}, opts?: Oazapfts.RequestOpts) {
|
|
249
|
+
return oazapfts.ok(oazapfts.fetchJson<{
|
|
250
|
+
status: 200;
|
|
251
|
+
data: DashboardReadResponse;
|
|
252
|
+
} | {
|
|
253
|
+
status: 403;
|
|
254
|
+
data: ErrorResponse;
|
|
255
|
+
} | {
|
|
256
|
+
status: 500;
|
|
257
|
+
data: ErrorResponse;
|
|
258
|
+
}>(`/v1/dashboards/account/${encodeURIComponent(accountSlug)}/studio/${encodeURIComponent(studioSlug)}`, {
|
|
259
|
+
...opts,
|
|
260
|
+
headers: oazapfts.mergeHeaders(opts?.headers, {
|
|
261
|
+
"stackspot-customer-ip": stackspotCustomerIp
|
|
262
|
+
})
|
|
263
|
+
}));
|
|
264
|
+
}
|