@stack-spot/portal-network 0.183.0 → 0.184.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.
Files changed (136) hide show
  1. package/CHANGELOG.md +2412 -2405
  2. package/dist/api/account.js +1 -1
  3. package/dist/api/agent-tools.js +1 -1
  4. package/dist/api/agent.js +1 -1
  5. package/dist/api/ai.js +1 -1
  6. package/dist/api/apiManagement.js +1 -1
  7. package/dist/api/apiRuntime.js +1 -1
  8. package/dist/api/cloudAccount.js +1 -1
  9. package/dist/api/cloudPlatform.js +1 -1
  10. package/dist/api/cloudPlatformHorizon.js +1 -1
  11. package/dist/api/cloudRuntimes.js +1 -1
  12. package/dist/api/cloudServices.js +1 -1
  13. package/dist/api/codeShift.js +1 -1
  14. package/dist/api/content.js +1 -1
  15. package/dist/api/dataIntegration.js +1 -1
  16. package/dist/api/discover.js +1 -1
  17. package/dist/api/genAiInference.js +1 -1
  18. package/dist/api/insights.js +1 -1
  19. package/dist/api/notification.js +1 -1
  20. package/dist/api/secrets.js +1 -1
  21. package/dist/api/serviceCatalog.js +1 -1
  22. package/dist/api/workspace-ai.js +1 -1
  23. package/dist/api/workspace.js +1 -1
  24. package/dist/api/workspaceManager.d.ts +16 -10
  25. package/dist/api/workspaceManager.d.ts.map +1 -1
  26. package/dist/api/workspaceManager.js +11 -1
  27. package/dist/api/workspaceManager.js.map +1 -1
  28. package/dist/api/workspaceSearchEngine.js +1 -1
  29. package/dist/client/workspace-manager.d.ts +6 -0
  30. package/dist/client/workspace-manager.d.ts.map +1 -1
  31. package/dist/client/workspace-manager.js +10 -1
  32. package/dist/client/workspace-manager.js.map +1 -1
  33. package/package.json +6 -6
  34. package/scripts/generate-apis.ts +134 -134
  35. package/src/api/account.ts +8367 -8367
  36. package/src/api/agent-tools.ts +2169 -2169
  37. package/src/api/agent.ts +1083 -1083
  38. package/src/api/ai.ts +3388 -3388
  39. package/src/api/apiManagement.ts +570 -570
  40. package/src/api/apiRuntime.ts +2103 -2103
  41. package/src/api/cloudAccount.ts +1239 -1239
  42. package/src/api/cloudPlatform.ts +927 -927
  43. package/src/api/cloudPlatformHorizon.ts +2655 -2655
  44. package/src/api/cloudRuntimes.ts +2043 -2043
  45. package/src/api/cloudServices.ts +1445 -1445
  46. package/src/api/codeShift.ts +3481 -3481
  47. package/src/api/content.ts +9785 -9785
  48. package/src/api/dataIntegration.ts +1657 -1657
  49. package/src/api/discover.ts +435 -435
  50. package/src/api/eventBus.ts +171 -171
  51. package/src/api/genAiInference.ts +603 -603
  52. package/src/api/insights.ts +310 -310
  53. package/src/api/notification.ts +334 -334
  54. package/src/api/secrets.ts +342 -342
  55. package/src/api/serviceCatalog.ts +2908 -2908
  56. package/src/api/workflows.ts +1669 -1669
  57. package/src/api/workspace-ai.ts +677 -677
  58. package/src/api/workspace.ts +5889 -5889
  59. package/src/api/workspaceManager.ts +2951 -2936
  60. package/src/api/workspaceSearchEngine.ts +153 -153
  61. package/src/api-addresses.ts +120 -120
  62. package/src/apis-itau.json +225 -225
  63. package/src/apis.json +225 -225
  64. package/src/client/account.ts +902 -902
  65. package/src/client/agent-tools.ts +210 -210
  66. package/src/client/agent.ts +81 -81
  67. package/src/client/ai.ts +395 -395
  68. package/src/client/api-management.ts +40 -40
  69. package/src/client/cloud-account.ts +70 -70
  70. package/src/client/cloud-platform-horizon.ts +113 -113
  71. package/src/client/cloud-platform.ts +163 -163
  72. package/src/client/cloud-runtimes.ts +129 -129
  73. package/src/client/cloud-services.ts +94 -94
  74. package/src/client/code-shift.ts +349 -349
  75. package/src/client/content.ts +538 -538
  76. package/src/client/data-integration.ts +191 -191
  77. package/src/client/discover.ts +89 -89
  78. package/src/client/event-bus.ts +84 -84
  79. package/src/client/gen-ai-inference.ts +65 -65
  80. package/src/client/insights.ts +28 -28
  81. package/src/client/notification.ts +32 -32
  82. package/src/client/runtime-manager.ts +76 -76
  83. package/src/client/secrets.ts +60 -60
  84. package/src/client/types.ts +377 -377
  85. package/src/client/workflow.ts +83 -83
  86. package/src/client/workspace-ai.ts +191 -191
  87. package/src/client/workspace-manager.ts +564 -560
  88. package/src/client/workspace-search.ts +39 -39
  89. package/src/client/workspace.ts +480 -480
  90. package/src/error/DefaultAPIError.ts +151 -151
  91. package/src/error/FileUploadError.ts +18 -18
  92. package/src/error/IgnoredErrorCodes.ts +3 -3
  93. package/src/error/StackspotAPIError.ts +101 -101
  94. package/src/error/StreamCanceledError.ts +10 -10
  95. package/src/error/StreamError.ts +7 -7
  96. package/src/error/StreamJsonError.ts +10 -10
  97. package/src/error/dictionary/account.ts +58 -58
  98. package/src/error/dictionary/action-details.ts +20 -20
  99. package/src/error/dictionary/action.ts +211 -211
  100. package/src/error/dictionary/agent-tools.ts +75 -75
  101. package/src/error/dictionary/ai-inference.ts +28 -28
  102. package/src/error/dictionary/base.ts +22 -22
  103. package/src/error/dictionary/cloud-platform.ts +82 -82
  104. package/src/error/dictionary/cnt-fields.ts +14 -14
  105. package/src/error/dictionary/cnt.ts +103 -103
  106. package/src/error/dictionary/code-shift.ts +12 -12
  107. package/src/error/dictionary/rte.ts +24 -24
  108. package/src/error/dictionary/rtm.ts +10 -10
  109. package/src/error/dictionary/secrets.ts +14 -14
  110. package/src/error/dictionary/workspace-ai.ts +10 -10
  111. package/src/error/dictionary/workspace-details.ts +15 -15
  112. package/src/error/dictionary/workspace-fields.ts +10 -10
  113. package/src/error/dictionary/workspace.ts +209 -209
  114. package/src/error/types.ts +21 -21
  115. package/src/index.ts +43 -43
  116. package/src/network/AutoInfiniteQuery.ts +115 -115
  117. package/src/network/AutoMutation.ts +27 -27
  118. package/src/network/AutoOperation.ts +73 -73
  119. package/src/network/AutoQuery.ts +75 -75
  120. package/src/network/ManualInfiniteQuery.ts +95 -95
  121. package/src/network/ManualMutation.ts +40 -40
  122. package/src/network/ManualOperation.ts +52 -52
  123. package/src/network/ManualQuery.ts +82 -82
  124. package/src/network/NetworkClient.ts +167 -167
  125. package/src/network/ReactQueryNetworkClient.ts +312 -312
  126. package/src/network/react-query-client.ts +14 -14
  127. package/src/network/types.ts +294 -294
  128. package/src/types.ts +1 -1
  129. package/src/utils/StreamedArray.tsx +146 -146
  130. package/src/utils/StreamedJson.tsx +166 -166
  131. package/src/utils/remove-authorization-param.ts +6 -6
  132. package/src/utils/string.ts +19 -19
  133. package/src/utils/use-extended-list.ts +80 -80
  134. package/src/utils/use-streamed-array.ts +17 -17
  135. package/tsconfig.build.json +4 -4
  136. package/tsconfig.json +10 -10
@@ -1,310 +1,310 @@
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
- /** The page number returned when paging through panel data. */
60
- pageNumber?: number;
61
- /** The page size returned when paging through panel data. */
62
- pageSize?: number;
63
- /** The total number of pages available to return paged panel data. */
64
- totalPages?: number;
65
- /** The total number of elements available to return paged panel data. */
66
- totalElements?: number;
67
- };
68
- export type DashboardReadResponse = {
69
- /** Panels in a dashboard. */
70
- panels?: Panel[];
71
- };
72
- /**
73
- * Create Panel
74
- */
75
- export function save({ newPanelRequest }: {
76
- newPanelRequest: NewPanelRequest;
77
- }, opts?: Oazapfts.RequestOpts) {
78
- return oazapfts.ok(oazapfts.fetchJson<{
79
- status: 201;
80
- data: IdResponse;
81
- } | {
82
- status: 403;
83
- data: ErrorResponse;
84
- } | {
85
- status: 500;
86
- data: ErrorResponse;
87
- }>("/v1/panels", oazapfts.json({
88
- ...opts,
89
- method: "POST",
90
- body: newPanelRequest
91
- })));
92
- }
93
- /**
94
- * Add Panel to Dashboard Studio
95
- */
96
- export function addToDashboardStudio({ accountSlug, studioSlug, addPanelToDashboardRequest }: {
97
- accountSlug: string;
98
- studioSlug: string;
99
- addPanelToDashboardRequest: AddPanelToDashboardRequest;
100
- }, opts?: Oazapfts.RequestOpts) {
101
- return oazapfts.ok(oazapfts.fetchJson<{
102
- status: 200;
103
- data: IdResponse;
104
- } | {
105
- status: 403;
106
- data: ErrorResponse;
107
- } | {
108
- status: 500;
109
- data: ErrorResponse;
110
- }>(`/v1/panels/account/${encodeURIComponent(accountSlug)}/studio/${encodeURIComponent(studioSlug)}`, oazapfts.json({
111
- ...opts,
112
- method: "POST",
113
- body: addPanelToDashboardRequest
114
- })));
115
- }
116
- /**
117
- * Remove Panel from Dashboard Studio
118
- */
119
- export function removeFromDashboardStudio({ accountSlug, studioSlug, panelId }: {
120
- accountSlug: string;
121
- studioSlug: string;
122
- panelId: number;
123
- }, opts?: Oazapfts.RequestOpts) {
124
- return oazapfts.ok(oazapfts.fetchJson<{
125
- status: 200;
126
- data: IdResponse;
127
- } | {
128
- status: 403;
129
- data: ErrorResponse;
130
- } | {
131
- status: 500;
132
- data: ErrorResponse;
133
- }>(`/v1/panels/account/${encodeURIComponent(accountSlug)}/studio/${encodeURIComponent(studioSlug)}${QS.query(QS.explode({
134
- panelId
135
- }))}`, {
136
- ...opts,
137
- method: "DELETE"
138
- }));
139
- }
140
- /**
141
- * Create Dataset
142
- */
143
- export function save1({ newDatasetRequest }: {
144
- newDatasetRequest: NewDatasetRequest;
145
- }, opts?: Oazapfts.RequestOpts) {
146
- return oazapfts.ok(oazapfts.fetchJson<{
147
- status: 201;
148
- data: IdResponse;
149
- } | {
150
- status: 403;
151
- data: ErrorResponse;
152
- } | {
153
- status: 422;
154
- data: ErrorResponse;
155
- } | {
156
- status: 500;
157
- data: ErrorResponse;
158
- }>("/v1/datasets", oazapfts.json({
159
- ...opts,
160
- method: "POST",
161
- body: newDatasetRequest
162
- })));
163
- }
164
- /**
165
- * Download Studio Data
166
- */
167
- export function downloadStudioData({ accountSlug, studioSlug, startDate, endDate, dataset, stackspotCustomerIp }: {
168
- accountSlug: string;
169
- studioSlug: string;
170
- startDate: string;
171
- endDate: string;
172
- dataset: string;
173
- stackspotCustomerIp?: string;
174
- }, opts?: Oazapfts.RequestOpts) {
175
- return oazapfts.ok(oazapfts.fetchJson<{
176
- status: 200;
177
- data: string;
178
- } | {
179
- status: 403;
180
- data: ErrorResponse;
181
- } | {
182
- status: 500;
183
- data: ErrorResponse;
184
- }>(`/v1/assets/account/${encodeURIComponent(accountSlug)}/studio/${encodeURIComponent(studioSlug)}/csv${QS.query(QS.explode({
185
- startDate,
186
- endDate,
187
- dataset
188
- }))}`, {
189
- ...opts,
190
- method: "POST",
191
- headers: oazapfts.mergeHeaders(opts?.headers, {
192
- "stackspot-customer-ip": stackspotCustomerIp
193
- })
194
- }));
195
- }
196
- /**
197
- * Download Event account data file
198
- */
199
- export function streamingAccountData({ accountSlug, startDate, endDate, dataset }: {
200
- accountSlug: string;
201
- startDate: string;
202
- endDate: string;
203
- dataset: string;
204
- }, opts?: Oazapfts.RequestOpts) {
205
- return oazapfts.ok(oazapfts.fetchBlob<{
206
- status: 200;
207
- } | {
208
- status: 403;
209
- data: ErrorResponse;
210
- } | {
211
- status: 500;
212
- data: ErrorResponse;
213
- }>(`/v1/assets/account/${encodeURIComponent(accountSlug)}/export${QS.query(QS.explode({
214
- startDate,
215
- endDate,
216
- dataset
217
- }))}`, {
218
- ...opts,
219
- method: "POST"
220
- }));
221
- }
222
- /**
223
- * Download Account Data
224
- */
225
- export function downloadAccountData({ accountSlug, startDate, endDate, dataset, stackspotCustomerIp }: {
226
- accountSlug: string;
227
- startDate: string;
228
- endDate: string;
229
- dataset: string;
230
- stackspotCustomerIp?: string;
231
- }, opts?: Oazapfts.RequestOpts) {
232
- return oazapfts.ok(oazapfts.fetchJson<{
233
- status: 200;
234
- data: string;
235
- } | {
236
- status: 403;
237
- data: ErrorResponse;
238
- } | {
239
- status: 500;
240
- data: ErrorResponse;
241
- }>(`/v1/assets/account/${encodeURIComponent(accountSlug)}/csv${QS.query(QS.explode({
242
- startDate,
243
- endDate,
244
- dataset
245
- }))}`, {
246
- ...opts,
247
- method: "POST",
248
- headers: oazapfts.mergeHeaders(opts?.headers, {
249
- "stackspot-customer-ip": stackspotCustomerIp
250
- })
251
- }));
252
- }
253
- /**
254
- * Get Dashboard Account
255
- */
256
- export function getDashboardAccount({ accountSlug, startDate, endDate, panels, page, size, stackspotCustomerIp }: {
257
- accountSlug: string;
258
- startDate?: string;
259
- endDate?: string;
260
- panels?: string[];
261
- page?: number;
262
- size?: number;
263
- stackspotCustomerIp?: string;
264
- }, opts?: Oazapfts.RequestOpts) {
265
- return oazapfts.ok(oazapfts.fetchJson<{
266
- status: 200;
267
- data: DashboardReadResponse;
268
- } | {
269
- status: 403;
270
- data: ErrorResponse;
271
- } | {
272
- status: 500;
273
- data: ErrorResponse;
274
- }>(`/v1/dashboards/account/${encodeURIComponent(accountSlug)}${QS.query(QS.explode({
275
- startDate,
276
- endDate,
277
- panels,
278
- page,
279
- size
280
- }))}`, {
281
- ...opts,
282
- headers: oazapfts.mergeHeaders(opts?.headers, {
283
- "stackspot-customer-ip": stackspotCustomerIp
284
- })
285
- }));
286
- }
287
- /**
288
- * Get Dashboard Studio
289
- */
290
- export function getDashboardStudio({ accountSlug, studioSlug, stackspotCustomerIp }: {
291
- accountSlug: string;
292
- studioSlug: string;
293
- stackspotCustomerIp?: string;
294
- }, opts?: Oazapfts.RequestOpts) {
295
- return oazapfts.ok(oazapfts.fetchJson<{
296
- status: 200;
297
- data: DashboardReadResponse;
298
- } | {
299
- status: 403;
300
- data: ErrorResponse;
301
- } | {
302
- status: 500;
303
- data: ErrorResponse;
304
- }>(`/v1/dashboards/account/${encodeURIComponent(accountSlug)}/studio/${encodeURIComponent(studioSlug)}`, {
305
- ...opts,
306
- headers: oazapfts.mergeHeaders(opts?.headers, {
307
- "stackspot-customer-ip": stackspotCustomerIp
308
- })
309
- }));
310
- }
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
+ /** The page number returned when paging through panel data. */
60
+ pageNumber?: number;
61
+ /** The page size returned when paging through panel data. */
62
+ pageSize?: number;
63
+ /** The total number of pages available to return paged panel data. */
64
+ totalPages?: number;
65
+ /** The total number of elements available to return paged panel data. */
66
+ totalElements?: number;
67
+ };
68
+ export type DashboardReadResponse = {
69
+ /** Panels in a dashboard. */
70
+ panels?: Panel[];
71
+ };
72
+ /**
73
+ * Create Panel
74
+ */
75
+ export function save({ newPanelRequest }: {
76
+ newPanelRequest: NewPanelRequest;
77
+ }, opts?: Oazapfts.RequestOpts) {
78
+ return oazapfts.ok(oazapfts.fetchJson<{
79
+ status: 201;
80
+ data: IdResponse;
81
+ } | {
82
+ status: 403;
83
+ data: ErrorResponse;
84
+ } | {
85
+ status: 500;
86
+ data: ErrorResponse;
87
+ }>("/v1/panels", oazapfts.json({
88
+ ...opts,
89
+ method: "POST",
90
+ body: newPanelRequest
91
+ })));
92
+ }
93
+ /**
94
+ * Add Panel to Dashboard Studio
95
+ */
96
+ export function addToDashboardStudio({ accountSlug, studioSlug, addPanelToDashboardRequest }: {
97
+ accountSlug: string;
98
+ studioSlug: string;
99
+ addPanelToDashboardRequest: AddPanelToDashboardRequest;
100
+ }, opts?: Oazapfts.RequestOpts) {
101
+ return oazapfts.ok(oazapfts.fetchJson<{
102
+ status: 200;
103
+ data: IdResponse;
104
+ } | {
105
+ status: 403;
106
+ data: ErrorResponse;
107
+ } | {
108
+ status: 500;
109
+ data: ErrorResponse;
110
+ }>(`/v1/panels/account/${encodeURIComponent(accountSlug)}/studio/${encodeURIComponent(studioSlug)}`, oazapfts.json({
111
+ ...opts,
112
+ method: "POST",
113
+ body: addPanelToDashboardRequest
114
+ })));
115
+ }
116
+ /**
117
+ * Remove Panel from Dashboard Studio
118
+ */
119
+ export function removeFromDashboardStudio({ accountSlug, studioSlug, panelId }: {
120
+ accountSlug: string;
121
+ studioSlug: string;
122
+ panelId: number;
123
+ }, opts?: Oazapfts.RequestOpts) {
124
+ return oazapfts.ok(oazapfts.fetchJson<{
125
+ status: 200;
126
+ data: IdResponse;
127
+ } | {
128
+ status: 403;
129
+ data: ErrorResponse;
130
+ } | {
131
+ status: 500;
132
+ data: ErrorResponse;
133
+ }>(`/v1/panels/account/${encodeURIComponent(accountSlug)}/studio/${encodeURIComponent(studioSlug)}${QS.query(QS.explode({
134
+ panelId
135
+ }))}`, {
136
+ ...opts,
137
+ method: "DELETE"
138
+ }));
139
+ }
140
+ /**
141
+ * Create Dataset
142
+ */
143
+ export function save1({ newDatasetRequest }: {
144
+ newDatasetRequest: NewDatasetRequest;
145
+ }, opts?: Oazapfts.RequestOpts) {
146
+ return oazapfts.ok(oazapfts.fetchJson<{
147
+ status: 201;
148
+ data: IdResponse;
149
+ } | {
150
+ status: 403;
151
+ data: ErrorResponse;
152
+ } | {
153
+ status: 422;
154
+ data: ErrorResponse;
155
+ } | {
156
+ status: 500;
157
+ data: ErrorResponse;
158
+ }>("/v1/datasets", oazapfts.json({
159
+ ...opts,
160
+ method: "POST",
161
+ body: newDatasetRequest
162
+ })));
163
+ }
164
+ /**
165
+ * Download Studio Data
166
+ */
167
+ export function downloadStudioData({ accountSlug, studioSlug, startDate, endDate, dataset, stackspotCustomerIp }: {
168
+ accountSlug: string;
169
+ studioSlug: string;
170
+ startDate: string;
171
+ endDate: string;
172
+ dataset: string;
173
+ stackspotCustomerIp?: string;
174
+ }, opts?: Oazapfts.RequestOpts) {
175
+ return oazapfts.ok(oazapfts.fetchJson<{
176
+ status: 200;
177
+ data: string;
178
+ } | {
179
+ status: 403;
180
+ data: ErrorResponse;
181
+ } | {
182
+ status: 500;
183
+ data: ErrorResponse;
184
+ }>(`/v1/assets/account/${encodeURIComponent(accountSlug)}/studio/${encodeURIComponent(studioSlug)}/csv${QS.query(QS.explode({
185
+ startDate,
186
+ endDate,
187
+ dataset
188
+ }))}`, {
189
+ ...opts,
190
+ method: "POST",
191
+ headers: oazapfts.mergeHeaders(opts?.headers, {
192
+ "stackspot-customer-ip": stackspotCustomerIp
193
+ })
194
+ }));
195
+ }
196
+ /**
197
+ * Download Event account data file
198
+ */
199
+ export function streamingAccountData({ accountSlug, startDate, endDate, dataset }: {
200
+ accountSlug: string;
201
+ startDate: string;
202
+ endDate: string;
203
+ dataset: string;
204
+ }, opts?: Oazapfts.RequestOpts) {
205
+ return oazapfts.ok(oazapfts.fetchBlob<{
206
+ status: 200;
207
+ } | {
208
+ status: 403;
209
+ data: ErrorResponse;
210
+ } | {
211
+ status: 500;
212
+ data: ErrorResponse;
213
+ }>(`/v1/assets/account/${encodeURIComponent(accountSlug)}/export${QS.query(QS.explode({
214
+ startDate,
215
+ endDate,
216
+ dataset
217
+ }))}`, {
218
+ ...opts,
219
+ method: "POST"
220
+ }));
221
+ }
222
+ /**
223
+ * Download Account Data
224
+ */
225
+ export function downloadAccountData({ accountSlug, startDate, endDate, dataset, stackspotCustomerIp }: {
226
+ accountSlug: string;
227
+ startDate: string;
228
+ endDate: string;
229
+ dataset: string;
230
+ stackspotCustomerIp?: string;
231
+ }, opts?: Oazapfts.RequestOpts) {
232
+ return oazapfts.ok(oazapfts.fetchJson<{
233
+ status: 200;
234
+ data: string;
235
+ } | {
236
+ status: 403;
237
+ data: ErrorResponse;
238
+ } | {
239
+ status: 500;
240
+ data: ErrorResponse;
241
+ }>(`/v1/assets/account/${encodeURIComponent(accountSlug)}/csv${QS.query(QS.explode({
242
+ startDate,
243
+ endDate,
244
+ dataset
245
+ }))}`, {
246
+ ...opts,
247
+ method: "POST",
248
+ headers: oazapfts.mergeHeaders(opts?.headers, {
249
+ "stackspot-customer-ip": stackspotCustomerIp
250
+ })
251
+ }));
252
+ }
253
+ /**
254
+ * Get Dashboard Account
255
+ */
256
+ export function getDashboardAccount({ accountSlug, startDate, endDate, panels, page, size, stackspotCustomerIp }: {
257
+ accountSlug: string;
258
+ startDate?: string;
259
+ endDate?: string;
260
+ panels?: string[];
261
+ page?: number;
262
+ size?: number;
263
+ stackspotCustomerIp?: string;
264
+ }, opts?: Oazapfts.RequestOpts) {
265
+ return oazapfts.ok(oazapfts.fetchJson<{
266
+ status: 200;
267
+ data: DashboardReadResponse;
268
+ } | {
269
+ status: 403;
270
+ data: ErrorResponse;
271
+ } | {
272
+ status: 500;
273
+ data: ErrorResponse;
274
+ }>(`/v1/dashboards/account/${encodeURIComponent(accountSlug)}${QS.query(QS.explode({
275
+ startDate,
276
+ endDate,
277
+ panels,
278
+ page,
279
+ size
280
+ }))}`, {
281
+ ...opts,
282
+ headers: oazapfts.mergeHeaders(opts?.headers, {
283
+ "stackspot-customer-ip": stackspotCustomerIp
284
+ })
285
+ }));
286
+ }
287
+ /**
288
+ * Get Dashboard Studio
289
+ */
290
+ export function getDashboardStudio({ accountSlug, studioSlug, stackspotCustomerIp }: {
291
+ accountSlug: string;
292
+ studioSlug: string;
293
+ stackspotCustomerIp?: string;
294
+ }, opts?: Oazapfts.RequestOpts) {
295
+ return oazapfts.ok(oazapfts.fetchJson<{
296
+ status: 200;
297
+ data: DashboardReadResponse;
298
+ } | {
299
+ status: 403;
300
+ data: ErrorResponse;
301
+ } | {
302
+ status: 500;
303
+ data: ErrorResponse;
304
+ }>(`/v1/dashboards/account/${encodeURIComponent(accountSlug)}/studio/${encodeURIComponent(studioSlug)}`, {
305
+ ...opts,
306
+ headers: oazapfts.mergeHeaders(opts?.headers, {
307
+ "stackspot-customer-ip": stackspotCustomerIp
308
+ })
309
+ }));
310
+ }