@stack-spot/portal-network 0.208.2 → 0.209.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 +15 -0
- package/dist/api/accountAssetManager.d.ts +279 -0
- package/dist/api/accountAssetManager.d.ts.map +1 -0
- package/dist/api/accountAssetManager.js +167 -0
- package/dist/api/accountAssetManager.js.map +1 -0
- package/dist/apis-itau.json +8 -0
- package/dist/apis.json +8 -0
- package/dist/client/account-asset-manager.d.ts +110 -0
- package/dist/client/account-asset-manager.d.ts.map +1 -0
- package/dist/client/account-asset-manager.js +160 -0
- package/dist/client/account-asset-manager.js.map +1 -0
- package/dist/client/account.d.ts +5 -2
- package/dist/client/account.d.ts.map +1 -1
- package/dist/client/account.js +2 -2
- package/dist/client/account.js.map +1 -1
- package/dist/client/ai.d.ts +24 -1
- package/dist/client/ai.d.ts.map +1 -1
- package/dist/client/ai.js +19 -1
- package/dist/client/ai.js.map +1 -1
- package/dist/error/dictionary/accountAssetManager.d.ts +11 -0
- package/dist/error/dictionary/accountAssetManager.d.ts.map +1 -0
- package/dist/error/dictionary/accountAssetManager.js +11 -0
- package/dist/error/dictionary/accountAssetManager.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/api/accountAssetManager.ts +655 -0
- package/src/apis-itau.json +8 -0
- package/src/apis.json +8 -0
- package/src/client/account-asset-manager.ts +100 -0
- package/src/client/account.ts +2 -1
- package/src/client/ai.ts +10 -0
- package/src/error/dictionary/accountAssetManager.ts +12 -0
- package/src/index.ts +1 -0
|
@@ -0,0 +1,655 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* EDP Backend for StackSpot Asset Management
|
|
3
|
+
* 0.0.1
|
|
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://account-asset-manager.dev.stackspot.com",
|
|
12
|
+
};
|
|
13
|
+
const oazapfts = Oazapfts.runtime(defaults);
|
|
14
|
+
export const servers = {
|
|
15
|
+
generatedServerUrl: "https://account-asset-manager.dev.stackspot.com"
|
|
16
|
+
};
|
|
17
|
+
export type CreateProjectRequest = {
|
|
18
|
+
/** Project name */
|
|
19
|
+
name: string;
|
|
20
|
+
/** Project unique slug */
|
|
21
|
+
slug: string;
|
|
22
|
+
/** Project description */
|
|
23
|
+
description: string;
|
|
24
|
+
/** Folder ULID where the project will be created. Required. */
|
|
25
|
+
folderId: string;
|
|
26
|
+
};
|
|
27
|
+
export type ApiIdResponse = {
|
|
28
|
+
id: string;
|
|
29
|
+
};
|
|
30
|
+
export type ValidationDetail = {
|
|
31
|
+
code: string;
|
|
32
|
+
values: string[];
|
|
33
|
+
};
|
|
34
|
+
export type ErrorBody = {
|
|
35
|
+
code: string;
|
|
36
|
+
details: string;
|
|
37
|
+
status: string;
|
|
38
|
+
validationDetails?: ValidationDetail[];
|
|
39
|
+
};
|
|
40
|
+
export type CreateAssetRequest = {
|
|
41
|
+
/** New asset's name */
|
|
42
|
+
name: string;
|
|
43
|
+
/** New asset's name */
|
|
44
|
+
slug: string;
|
|
45
|
+
/** New asset's description */
|
|
46
|
+
description: string;
|
|
47
|
+
/** New asset's type */
|
|
48
|
+
"type": string;
|
|
49
|
+
/** Asset's createdBy user. Required only for Service Token. */
|
|
50
|
+
createdBy?: string;
|
|
51
|
+
};
|
|
52
|
+
export type FolderResponse = {
|
|
53
|
+
/** Folder ID */
|
|
54
|
+
id: string;
|
|
55
|
+
/** Folder name */
|
|
56
|
+
name: string;
|
|
57
|
+
/** Folder slug */
|
|
58
|
+
slug: string;
|
|
59
|
+
/** Folder description */
|
|
60
|
+
description: string;
|
|
61
|
+
/** Folder creation date */
|
|
62
|
+
createdAt: string;
|
|
63
|
+
/** Folder creator */
|
|
64
|
+
createdBy: string;
|
|
65
|
+
/** Sub folders */
|
|
66
|
+
folders: any[];
|
|
67
|
+
};
|
|
68
|
+
export type CreateFolderRequest = {
|
|
69
|
+
/** New folder's name */
|
|
70
|
+
name: string;
|
|
71
|
+
/** New folder's unique slug */
|
|
72
|
+
slug: string;
|
|
73
|
+
/** New folder's description */
|
|
74
|
+
description: string;
|
|
75
|
+
/** Parent folder's api id, null if creating root folder. ULID Format */
|
|
76
|
+
parentFolderId?: string;
|
|
77
|
+
};
|
|
78
|
+
export type AssetTypeResponse = {
|
|
79
|
+
apiId: string;
|
|
80
|
+
name: string;
|
|
81
|
+
description: string;
|
|
82
|
+
};
|
|
83
|
+
export type CreateAssetTypeRequest = {
|
|
84
|
+
/** New asset type's name */
|
|
85
|
+
name: string;
|
|
86
|
+
/** New asset type's description */
|
|
87
|
+
description: string;
|
|
88
|
+
/** Asset type's createdBy user. Required only for Service Token. */
|
|
89
|
+
createdBy?: string;
|
|
90
|
+
};
|
|
91
|
+
export type ProjectAssetsResponse = {
|
|
92
|
+
/** Asset's id */
|
|
93
|
+
id: string;
|
|
94
|
+
/** Asset's name */
|
|
95
|
+
name: string;
|
|
96
|
+
/** Asset's type */
|
|
97
|
+
"type": string;
|
|
98
|
+
};
|
|
99
|
+
export type ProjectDetailsResponse = {
|
|
100
|
+
/** Projects's id */
|
|
101
|
+
id: string;
|
|
102
|
+
/** Projects's name */
|
|
103
|
+
name: string;
|
|
104
|
+
/** Projects's unique slug */
|
|
105
|
+
slug: string;
|
|
106
|
+
/** Projects's description */
|
|
107
|
+
description: string;
|
|
108
|
+
/** Creation date of the project */
|
|
109
|
+
createdAt: string;
|
|
110
|
+
/** Creator of the project */
|
|
111
|
+
createdBy: string;
|
|
112
|
+
/** Folder's id */
|
|
113
|
+
folderId: string;
|
|
114
|
+
/** Assets linked to a project */
|
|
115
|
+
assets: ProjectAssetsResponse[];
|
|
116
|
+
};
|
|
117
|
+
export type UpdateProjectRequest = {
|
|
118
|
+
/** Project name */
|
|
119
|
+
name?: string;
|
|
120
|
+
/** Project description */
|
|
121
|
+
description?: string;
|
|
122
|
+
};
|
|
123
|
+
export type ProjectResponse = {
|
|
124
|
+
/** Project id */
|
|
125
|
+
id: string;
|
|
126
|
+
/** Project name */
|
|
127
|
+
name: string;
|
|
128
|
+
/** Project description */
|
|
129
|
+
description: string;
|
|
130
|
+
/** Project slug */
|
|
131
|
+
slug: string;
|
|
132
|
+
/** Project status */
|
|
133
|
+
status: "ACTIVE" | "DRAFT";
|
|
134
|
+
};
|
|
135
|
+
export type UpdateAssetRequest = {
|
|
136
|
+
/** Asset's name */
|
|
137
|
+
name: string;
|
|
138
|
+
/** Asset's description */
|
|
139
|
+
description: string;
|
|
140
|
+
/** Asset's updatedBy user. Required only for Service Token. */
|
|
141
|
+
updatedBy?: string;
|
|
142
|
+
};
|
|
143
|
+
export type FolderProjectResponse = {
|
|
144
|
+
/** Project's id */
|
|
145
|
+
id: string;
|
|
146
|
+
/** Project's name */
|
|
147
|
+
name: string;
|
|
148
|
+
/** Project's created by */
|
|
149
|
+
createdBy: string;
|
|
150
|
+
};
|
|
151
|
+
export type FoldersDetailsResponse = {
|
|
152
|
+
/** Folder's id */
|
|
153
|
+
id: string;
|
|
154
|
+
/** Folder's name */
|
|
155
|
+
name: string;
|
|
156
|
+
/** Folder's unique slug */
|
|
157
|
+
slug: string;
|
|
158
|
+
/** Folder's description */
|
|
159
|
+
description: string;
|
|
160
|
+
/** Creator of the folder */
|
|
161
|
+
createdBy: string;
|
|
162
|
+
/** Creator of the folder */
|
|
163
|
+
createdAt: string;
|
|
164
|
+
/** Projects linked to a folder */
|
|
165
|
+
projects?: FolderProjectResponse[];
|
|
166
|
+
/** Folder linked to a folder */
|
|
167
|
+
folders?: FoldersDetailsResponse[];
|
|
168
|
+
};
|
|
169
|
+
export type UpdateFolderRequest = {
|
|
170
|
+
/** Folder name */
|
|
171
|
+
name: string;
|
|
172
|
+
/** Folder description */
|
|
173
|
+
description: string;
|
|
174
|
+
};
|
|
175
|
+
export type UpdateAssetTypeRequest = {
|
|
176
|
+
/** Asset type's name */
|
|
177
|
+
name: string;
|
|
178
|
+
/** Asset type's description */
|
|
179
|
+
description: string;
|
|
180
|
+
/** Asset type's updatedBy user. Required only for Service Token. */
|
|
181
|
+
updatedBy?: string;
|
|
182
|
+
};
|
|
183
|
+
/**
|
|
184
|
+
* Create project
|
|
185
|
+
*/
|
|
186
|
+
export function saveProject({ createProjectRequest }: {
|
|
187
|
+
createProjectRequest: CreateProjectRequest;
|
|
188
|
+
}, opts?: Oazapfts.RequestOpts) {
|
|
189
|
+
return oazapfts.ok(oazapfts.fetchJson<{
|
|
190
|
+
status: 201;
|
|
191
|
+
data: ApiIdResponse;
|
|
192
|
+
} | {
|
|
193
|
+
status: 400;
|
|
194
|
+
data: ErrorBody;
|
|
195
|
+
} | {
|
|
196
|
+
status: 401;
|
|
197
|
+
} | {
|
|
198
|
+
status: 403;
|
|
199
|
+
data: ApiIdResponse;
|
|
200
|
+
} | {
|
|
201
|
+
status: 404;
|
|
202
|
+
} | {
|
|
203
|
+
status: 422;
|
|
204
|
+
data: ErrorBody;
|
|
205
|
+
} | {
|
|
206
|
+
status: 500;
|
|
207
|
+
}>("/v1/account/projects", oazapfts.json({
|
|
208
|
+
...opts,
|
|
209
|
+
method: "POST",
|
|
210
|
+
body: createProjectRequest
|
|
211
|
+
})));
|
|
212
|
+
}
|
|
213
|
+
/**
|
|
214
|
+
* Create asset
|
|
215
|
+
*/
|
|
216
|
+
export function saveAsset({ projectId, createAssetRequest }: {
|
|
217
|
+
projectId: string;
|
|
218
|
+
createAssetRequest: CreateAssetRequest;
|
|
219
|
+
}, opts?: Oazapfts.RequestOpts) {
|
|
220
|
+
return oazapfts.ok(oazapfts.fetchJson<{
|
|
221
|
+
status: 201;
|
|
222
|
+
data: ApiIdResponse;
|
|
223
|
+
} | {
|
|
224
|
+
status: 400;
|
|
225
|
+
data: ErrorBody;
|
|
226
|
+
} | {
|
|
227
|
+
status: 401;
|
|
228
|
+
} | {
|
|
229
|
+
status: 403;
|
|
230
|
+
data: ApiIdResponse;
|
|
231
|
+
} | {
|
|
232
|
+
status: 404;
|
|
233
|
+
data: ErrorBody;
|
|
234
|
+
} | {
|
|
235
|
+
status: 422;
|
|
236
|
+
data: ErrorBody;
|
|
237
|
+
} | {
|
|
238
|
+
status: 500;
|
|
239
|
+
}>(`/v1/account/projects/${encodeURIComponent(projectId)}/assets`, oazapfts.json({
|
|
240
|
+
...opts,
|
|
241
|
+
method: "POST",
|
|
242
|
+
body: createAssetRequest
|
|
243
|
+
})));
|
|
244
|
+
}
|
|
245
|
+
/**
|
|
246
|
+
* List folders
|
|
247
|
+
*/
|
|
248
|
+
export function listFolders(opts?: Oazapfts.RequestOpts) {
|
|
249
|
+
return oazapfts.ok(oazapfts.fetchJson<{
|
|
250
|
+
status: 200;
|
|
251
|
+
data: FolderResponse[];
|
|
252
|
+
} | {
|
|
253
|
+
status: 400;
|
|
254
|
+
data: ErrorBody;
|
|
255
|
+
} | {
|
|
256
|
+
status: 401;
|
|
257
|
+
} | {
|
|
258
|
+
status: 403;
|
|
259
|
+
data: FolderResponse[];
|
|
260
|
+
} | {
|
|
261
|
+
status: 404;
|
|
262
|
+
data: ErrorBody;
|
|
263
|
+
} | {
|
|
264
|
+
status: 422;
|
|
265
|
+
data: ErrorBody;
|
|
266
|
+
} | {
|
|
267
|
+
status: 500;
|
|
268
|
+
}>("/v1/account/folders", {
|
|
269
|
+
...opts
|
|
270
|
+
}));
|
|
271
|
+
}
|
|
272
|
+
/**
|
|
273
|
+
* Create folder
|
|
274
|
+
*/
|
|
275
|
+
export function saveFolder({ createFolderRequest }: {
|
|
276
|
+
createFolderRequest: CreateFolderRequest;
|
|
277
|
+
}, opts?: Oazapfts.RequestOpts) {
|
|
278
|
+
return oazapfts.ok(oazapfts.fetchJson<{
|
|
279
|
+
status: 200;
|
|
280
|
+
data: ApiIdResponse;
|
|
281
|
+
} | {
|
|
282
|
+
status: 201;
|
|
283
|
+
data: ApiIdResponse;
|
|
284
|
+
} | {
|
|
285
|
+
status: 400;
|
|
286
|
+
data: ErrorBody;
|
|
287
|
+
} | {
|
|
288
|
+
status: 401;
|
|
289
|
+
} | {
|
|
290
|
+
status: 403;
|
|
291
|
+
data: ApiIdResponse;
|
|
292
|
+
} | {
|
|
293
|
+
status: 404;
|
|
294
|
+
data: ErrorBody;
|
|
295
|
+
} | {
|
|
296
|
+
status: 422;
|
|
297
|
+
data: ErrorBody;
|
|
298
|
+
} | {
|
|
299
|
+
status: 500;
|
|
300
|
+
}>("/v1/account/folders", oazapfts.json({
|
|
301
|
+
...opts,
|
|
302
|
+
method: "POST",
|
|
303
|
+
body: createFolderRequest
|
|
304
|
+
})));
|
|
305
|
+
}
|
|
306
|
+
/**
|
|
307
|
+
* List assets type
|
|
308
|
+
*/
|
|
309
|
+
export function listAssetTypes({ name }: {
|
|
310
|
+
name?: string;
|
|
311
|
+
}, opts?: Oazapfts.RequestOpts) {
|
|
312
|
+
return oazapfts.ok(oazapfts.fetchJson<{
|
|
313
|
+
status: 200;
|
|
314
|
+
data: AssetTypeResponse[];
|
|
315
|
+
} | {
|
|
316
|
+
status: 400;
|
|
317
|
+
data: ErrorBody;
|
|
318
|
+
} | {
|
|
319
|
+
status: 401;
|
|
320
|
+
} | {
|
|
321
|
+
status: 403;
|
|
322
|
+
data: AssetTypeResponse[];
|
|
323
|
+
} | {
|
|
324
|
+
status: 404;
|
|
325
|
+
data: ErrorBody;
|
|
326
|
+
} | {
|
|
327
|
+
status: 422;
|
|
328
|
+
data: ErrorBody;
|
|
329
|
+
} | {
|
|
330
|
+
status: 500;
|
|
331
|
+
}>(`/v1/account/assets/types${QS.query(QS.explode({
|
|
332
|
+
name
|
|
333
|
+
}))}`, {
|
|
334
|
+
...opts
|
|
335
|
+
}));
|
|
336
|
+
}
|
|
337
|
+
/**
|
|
338
|
+
* Create asset type
|
|
339
|
+
*/
|
|
340
|
+
export function saveAssetType({ createAssetTypeRequest }: {
|
|
341
|
+
createAssetTypeRequest: CreateAssetTypeRequest;
|
|
342
|
+
}, opts?: Oazapfts.RequestOpts) {
|
|
343
|
+
return oazapfts.ok(oazapfts.fetchJson<{
|
|
344
|
+
status: 201;
|
|
345
|
+
data: ApiIdResponse;
|
|
346
|
+
} | {
|
|
347
|
+
status: 400;
|
|
348
|
+
data: ErrorBody;
|
|
349
|
+
} | {
|
|
350
|
+
status: 401;
|
|
351
|
+
} | {
|
|
352
|
+
status: 403;
|
|
353
|
+
data: ApiIdResponse;
|
|
354
|
+
} | {
|
|
355
|
+
status: 404;
|
|
356
|
+
data: ErrorBody;
|
|
357
|
+
} | {
|
|
358
|
+
status: 422;
|
|
359
|
+
data: ErrorBody;
|
|
360
|
+
} | {
|
|
361
|
+
status: 500;
|
|
362
|
+
}>("/v1/account/assets/types", oazapfts.json({
|
|
363
|
+
...opts,
|
|
364
|
+
method: "POST",
|
|
365
|
+
body: createAssetTypeRequest
|
|
366
|
+
})));
|
|
367
|
+
}
|
|
368
|
+
/**
|
|
369
|
+
* Get project details
|
|
370
|
+
*/
|
|
371
|
+
export function getProjectDetails({ projectId }: {
|
|
372
|
+
projectId: string;
|
|
373
|
+
}, opts?: Oazapfts.RequestOpts) {
|
|
374
|
+
return oazapfts.ok(oazapfts.fetchJson<{
|
|
375
|
+
status: 200;
|
|
376
|
+
data: ProjectDetailsResponse;
|
|
377
|
+
} | {
|
|
378
|
+
status: 400;
|
|
379
|
+
data: ErrorBody;
|
|
380
|
+
} | {
|
|
381
|
+
status: 401;
|
|
382
|
+
} | {
|
|
383
|
+
status: 403;
|
|
384
|
+
data: ProjectDetailsResponse;
|
|
385
|
+
} | {
|
|
386
|
+
status: 404;
|
|
387
|
+
} | {
|
|
388
|
+
status: 422;
|
|
389
|
+
data: ErrorBody;
|
|
390
|
+
} | {
|
|
391
|
+
status: 500;
|
|
392
|
+
}>(`/v1/account/projects/${encodeURIComponent(projectId)}`, {
|
|
393
|
+
...opts
|
|
394
|
+
}));
|
|
395
|
+
}
|
|
396
|
+
/**
|
|
397
|
+
* Delete project
|
|
398
|
+
*/
|
|
399
|
+
export function deleteProject({ projectId }: {
|
|
400
|
+
projectId: string;
|
|
401
|
+
}, opts?: Oazapfts.RequestOpts) {
|
|
402
|
+
return oazapfts.ok(oazapfts.fetchJson<{
|
|
403
|
+
status: 204;
|
|
404
|
+
} | {
|
|
405
|
+
status: 400;
|
|
406
|
+
data: ErrorBody;
|
|
407
|
+
} | {
|
|
408
|
+
status: 401;
|
|
409
|
+
} | {
|
|
410
|
+
status: 403;
|
|
411
|
+
} | {
|
|
412
|
+
status: 404;
|
|
413
|
+
} | {
|
|
414
|
+
status: 422;
|
|
415
|
+
} | {
|
|
416
|
+
status: 500;
|
|
417
|
+
}>(`/v1/account/projects/${encodeURIComponent(projectId)}`, {
|
|
418
|
+
...opts,
|
|
419
|
+
method: "DELETE"
|
|
420
|
+
}));
|
|
421
|
+
}
|
|
422
|
+
/**
|
|
423
|
+
* Update project
|
|
424
|
+
*/
|
|
425
|
+
export function updateProject({ projectId, updateProjectRequest }: {
|
|
426
|
+
projectId: string;
|
|
427
|
+
updateProjectRequest: UpdateProjectRequest;
|
|
428
|
+
}, opts?: Oazapfts.RequestOpts) {
|
|
429
|
+
return oazapfts.ok(oazapfts.fetchJson<{
|
|
430
|
+
status: 200;
|
|
431
|
+
data: ProjectResponse;
|
|
432
|
+
} | {
|
|
433
|
+
status: 400;
|
|
434
|
+
data: ErrorBody;
|
|
435
|
+
} | {
|
|
436
|
+
status: 401;
|
|
437
|
+
} | {
|
|
438
|
+
status: 403;
|
|
439
|
+
data: ProjectResponse;
|
|
440
|
+
} | {
|
|
441
|
+
status: 404;
|
|
442
|
+
} | {
|
|
443
|
+
status: 422;
|
|
444
|
+
data: ErrorBody;
|
|
445
|
+
} | {
|
|
446
|
+
status: 500;
|
|
447
|
+
}>(`/v1/account/projects/${encodeURIComponent(projectId)}`, oazapfts.json({
|
|
448
|
+
...opts,
|
|
449
|
+
method: "PATCH",
|
|
450
|
+
body: updateProjectRequest
|
|
451
|
+
})));
|
|
452
|
+
}
|
|
453
|
+
/**
|
|
454
|
+
* Disassociate asset from project
|
|
455
|
+
*/
|
|
456
|
+
export function disassociateProjectAsset({ projectId, assetId }: {
|
|
457
|
+
projectId: string;
|
|
458
|
+
assetId: string;
|
|
459
|
+
}, opts?: Oazapfts.RequestOpts) {
|
|
460
|
+
return oazapfts.ok(oazapfts.fetchJson<{
|
|
461
|
+
status: 204;
|
|
462
|
+
} | {
|
|
463
|
+
status: 400;
|
|
464
|
+
data: ErrorBody;
|
|
465
|
+
} | {
|
|
466
|
+
status: 401;
|
|
467
|
+
} | {
|
|
468
|
+
status: 403;
|
|
469
|
+
} | {
|
|
470
|
+
status: 404;
|
|
471
|
+
} | {
|
|
472
|
+
status: 422;
|
|
473
|
+
data: ErrorBody;
|
|
474
|
+
} | {
|
|
475
|
+
status: 500;
|
|
476
|
+
}>(`/v1/account/projects/${encodeURIComponent(projectId)}/assets/${encodeURIComponent(assetId)}`, {
|
|
477
|
+
...opts,
|
|
478
|
+
method: "DELETE"
|
|
479
|
+
}));
|
|
480
|
+
}
|
|
481
|
+
/**
|
|
482
|
+
* Update asset
|
|
483
|
+
*/
|
|
484
|
+
export function updateAsset({ projectId, assetId, updateAssetRequest }: {
|
|
485
|
+
projectId: string;
|
|
486
|
+
assetId: string;
|
|
487
|
+
updateAssetRequest: UpdateAssetRequest;
|
|
488
|
+
}, opts?: Oazapfts.RequestOpts) {
|
|
489
|
+
return oazapfts.ok(oazapfts.fetchJson<{
|
|
490
|
+
status: 200;
|
|
491
|
+
data: ApiIdResponse;
|
|
492
|
+
} | {
|
|
493
|
+
status: 400;
|
|
494
|
+
data: ErrorBody;
|
|
495
|
+
} | {
|
|
496
|
+
status: 401;
|
|
497
|
+
} | {
|
|
498
|
+
status: 403;
|
|
499
|
+
data: ApiIdResponse;
|
|
500
|
+
} | {
|
|
501
|
+
status: 404;
|
|
502
|
+
data: ErrorBody;
|
|
503
|
+
} | {
|
|
504
|
+
status: 422;
|
|
505
|
+
data: ErrorBody;
|
|
506
|
+
} | {
|
|
507
|
+
status: 500;
|
|
508
|
+
}>(`/v1/account/projects/${encodeURIComponent(projectId)}/assets/${encodeURIComponent(assetId)}`, oazapfts.json({
|
|
509
|
+
...opts,
|
|
510
|
+
method: "PATCH",
|
|
511
|
+
body: updateAssetRequest
|
|
512
|
+
})));
|
|
513
|
+
}
|
|
514
|
+
/**
|
|
515
|
+
* Get folder details
|
|
516
|
+
*/
|
|
517
|
+
export function getFolderDetails({ folderId }: {
|
|
518
|
+
folderId: string;
|
|
519
|
+
}, opts?: Oazapfts.RequestOpts) {
|
|
520
|
+
return oazapfts.ok(oazapfts.fetchJson<{
|
|
521
|
+
status: 200;
|
|
522
|
+
data: FoldersDetailsResponse;
|
|
523
|
+
} | {
|
|
524
|
+
status: 400;
|
|
525
|
+
data: ErrorBody;
|
|
526
|
+
} | {
|
|
527
|
+
status: 401;
|
|
528
|
+
} | {
|
|
529
|
+
status: 403;
|
|
530
|
+
data: FoldersDetailsResponse;
|
|
531
|
+
} | {
|
|
532
|
+
status: 404;
|
|
533
|
+
} | {
|
|
534
|
+
status: 422;
|
|
535
|
+
data: ErrorBody;
|
|
536
|
+
} | {
|
|
537
|
+
status: 500;
|
|
538
|
+
}>(`/v1/account/folders/${encodeURIComponent(folderId)}`, {
|
|
539
|
+
...opts
|
|
540
|
+
}));
|
|
541
|
+
}
|
|
542
|
+
/**
|
|
543
|
+
* Delete folder
|
|
544
|
+
*/
|
|
545
|
+
export function deleteFolder({ folderId }: {
|
|
546
|
+
folderId: string;
|
|
547
|
+
}, opts?: Oazapfts.RequestOpts) {
|
|
548
|
+
return oazapfts.ok(oazapfts.fetchJson<{
|
|
549
|
+
status: 204;
|
|
550
|
+
} | {
|
|
551
|
+
status: 400;
|
|
552
|
+
data: ErrorBody;
|
|
553
|
+
} | {
|
|
554
|
+
status: 401;
|
|
555
|
+
} | {
|
|
556
|
+
status: 403;
|
|
557
|
+
} | {
|
|
558
|
+
status: 404;
|
|
559
|
+
} | {
|
|
560
|
+
status: 422;
|
|
561
|
+
} | {
|
|
562
|
+
status: 500;
|
|
563
|
+
}>(`/v1/account/folders/${encodeURIComponent(folderId)}`, {
|
|
564
|
+
...opts,
|
|
565
|
+
method: "DELETE"
|
|
566
|
+
}));
|
|
567
|
+
}
|
|
568
|
+
/**
|
|
569
|
+
* Update folder
|
|
570
|
+
*/
|
|
571
|
+
export function updateFolders({ folderId, updateFolderRequest }: {
|
|
572
|
+
folderId: string;
|
|
573
|
+
updateFolderRequest: UpdateFolderRequest;
|
|
574
|
+
}, opts?: Oazapfts.RequestOpts) {
|
|
575
|
+
return oazapfts.ok(oazapfts.fetchJson<{
|
|
576
|
+
status: 200;
|
|
577
|
+
data: ApiIdResponse;
|
|
578
|
+
} | {
|
|
579
|
+
status: 400;
|
|
580
|
+
data: ErrorBody;
|
|
581
|
+
} | {
|
|
582
|
+
status: 401;
|
|
583
|
+
} | {
|
|
584
|
+
status: 403;
|
|
585
|
+
data: ApiIdResponse;
|
|
586
|
+
} | {
|
|
587
|
+
status: 404;
|
|
588
|
+
} | {
|
|
589
|
+
status: 422;
|
|
590
|
+
data: ErrorBody;
|
|
591
|
+
} | {
|
|
592
|
+
status: 500;
|
|
593
|
+
}>(`/v1/account/folders/${encodeURIComponent(folderId)}`, oazapfts.json({
|
|
594
|
+
...opts,
|
|
595
|
+
method: "PATCH",
|
|
596
|
+
body: updateFolderRequest
|
|
597
|
+
})));
|
|
598
|
+
}
|
|
599
|
+
/**
|
|
600
|
+
* Delete asset type
|
|
601
|
+
*/
|
|
602
|
+
export function deleteAssetType({ assetTypeId }: {
|
|
603
|
+
assetTypeId: string;
|
|
604
|
+
}, opts?: Oazapfts.RequestOpts) {
|
|
605
|
+
return oazapfts.ok(oazapfts.fetchJson<{
|
|
606
|
+
status: 204;
|
|
607
|
+
} | {
|
|
608
|
+
status: 400;
|
|
609
|
+
data: ErrorBody;
|
|
610
|
+
} | {
|
|
611
|
+
status: 401;
|
|
612
|
+
} | {
|
|
613
|
+
status: 403;
|
|
614
|
+
} | {
|
|
615
|
+
status: 404;
|
|
616
|
+
} | {
|
|
617
|
+
status: 422;
|
|
618
|
+
} | {
|
|
619
|
+
status: 500;
|
|
620
|
+
}>(`/v1/account/assets/types/${encodeURIComponent(assetTypeId)}`, {
|
|
621
|
+
...opts,
|
|
622
|
+
method: "DELETE"
|
|
623
|
+
}));
|
|
624
|
+
}
|
|
625
|
+
/**
|
|
626
|
+
* Update asset type
|
|
627
|
+
*/
|
|
628
|
+
export function updateAssetType({ assetTypeId, updateAssetTypeRequest }: {
|
|
629
|
+
assetTypeId: string;
|
|
630
|
+
updateAssetTypeRequest: UpdateAssetTypeRequest;
|
|
631
|
+
}, opts?: Oazapfts.RequestOpts) {
|
|
632
|
+
return oazapfts.ok(oazapfts.fetchJson<{
|
|
633
|
+
status: 200;
|
|
634
|
+
data: ApiIdResponse;
|
|
635
|
+
} | {
|
|
636
|
+
status: 400;
|
|
637
|
+
data: ErrorBody;
|
|
638
|
+
} | {
|
|
639
|
+
status: 401;
|
|
640
|
+
} | {
|
|
641
|
+
status: 403;
|
|
642
|
+
data: ApiIdResponse;
|
|
643
|
+
} | {
|
|
644
|
+
status: 404;
|
|
645
|
+
} | {
|
|
646
|
+
status: 422;
|
|
647
|
+
data: ErrorBody;
|
|
648
|
+
} | {
|
|
649
|
+
status: 500;
|
|
650
|
+
}>(`/v1/account/assets/types/${encodeURIComponent(assetTypeId)}`, oazapfts.json({
|
|
651
|
+
...opts,
|
|
652
|
+
method: "PATCH",
|
|
653
|
+
body: updateAssetTypeRequest
|
|
654
|
+
})));
|
|
655
|
+
}
|
package/src/apis-itau.json
CHANGED
|
@@ -222,6 +222,14 @@
|
|
|
222
222
|
},
|
|
223
223
|
"docs": "/v3/api-docs"
|
|
224
224
|
},
|
|
225
|
+
"accountAssetManager" : {
|
|
226
|
+
"url": {
|
|
227
|
+
"dev": "https://account-asset-manager.dev.stackspot.com",
|
|
228
|
+
"stg": "https://account-asset-manager.stg.stackspot.com",
|
|
229
|
+
"prd": "https://account-asset-manager.stackspot.com"
|
|
230
|
+
},
|
|
231
|
+
"docs": "/v3/api-docs"
|
|
232
|
+
},
|
|
225
233
|
"edpBfa": {
|
|
226
234
|
"url": {
|
|
227
235
|
"dev": "https://adp-development-edp-bfa.dev.stackspot.com",
|
package/src/apis.json
CHANGED
|
@@ -222,6 +222,14 @@
|
|
|
222
222
|
},
|
|
223
223
|
"docs": "/v3/api-docs"
|
|
224
224
|
},
|
|
225
|
+
"accountAssetManager" : {
|
|
226
|
+
"url": {
|
|
227
|
+
"dev": "https://account-asset-manager.dev.stackspot.com",
|
|
228
|
+
"stg": "https://account-asset-manager.stg.stackspot.com",
|
|
229
|
+
"prd": "https://account-asset-manager.stackspot.com"
|
|
230
|
+
},
|
|
231
|
+
"docs": "/v3/api-docs"
|
|
232
|
+
},
|
|
225
233
|
"edpBfa": {
|
|
226
234
|
"url": {
|
|
227
235
|
"dev": "https://adp-development-edp-bfa.dev.stackspot.com",
|