-
Notifications
You must be signed in to change notification settings - Fork 3
/
data-assets.d.ts
207 lines (205 loc) · 6.28 KB
/
data-assets.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
import { A as ApiCallOptions } from './global.types-qsBNouXJ.js';
import './auth-types-PkN9CAF_.js';
type BatchIdDto = {
ids?: string[];
};
type DataAsset = {
appId: string;
appType: string;
/** The value is automatically set by the application. User defined value is ignored. */
readonly createdBy?: string;
/** The value is automatically set by the application. User defined value is ignored. */
readonly createdTime?: string;
/** The date-time when the source data was last changed */
dataFreshness?: string;
dataStoreInfo?: DataStoreInfo;
description?: string;
/** Only required when updating the resource. Must be null for new resources. */
id?: string;
/** The value is automatically set by the application. User defined value is ignored. */
readonly lastModifiedBy?: string;
/** The value is automatically set by the application. User defined value is ignored. */
readonly lastModifiedTime?: string;
name?: string;
/** The value is automatically set by the application. */
ownerId?: string;
/** A Map of name-value pairs. */
properties?: unknown;
spaceId?: string;
tags?: string[];
technicalDescription?: string;
technicalName: string;
/** The value is automatically set by the application. User defined value is ignored. */
readonly tenantId?: string;
/** Only required when updating the resource. Must be null for new resources. */
version?: number;
};
type DataStoreInfo = {
id: string;
readonly name?: string;
readonly type?: string;
};
type Error = {
code?: string;
detail?: string;
status?: string;
title?: string;
};
type ErrorResponse = {
errors?: Error[];
traceId?: string;
};
type JsonPatch = {
/** A JSON Pointer path pointing to the location to move/copy from. */
from?: string;
/** The operation to be performed. */
op: "add" | "remove" | "replace" | "move" | "copy" | "test";
/** A JSON pointer to the property being affected. */
path: string;
/** The value to add, replace or test. */
value?: unknown;
};
/**
* Batch delete data assets by IDs.
*
* @param body an object with the body content
* @throws DeleteDataAssetsHttpError
*/
declare const deleteDataAssets: (body: BatchIdDto, options?: ApiCallOptions) => Promise<DeleteDataAssetsHttpResponse>;
type DeleteDataAssetsHttpResponse = {
data: void;
headers: Headers;
status: number;
};
type DeleteDataAssetsHttpError = {
data: ErrorResponse;
headers: Headers;
status: number;
};
/**
* Save new data asset.
*
* @param body an object with the body content
* @throws CreateDataAssetHttpError
*/
declare const createDataAsset: (body: DataAsset, options?: ApiCallOptions) => Promise<CreateDataAssetHttpResponse>;
type CreateDataAssetHttpResponse = {
data: DataAsset;
headers: Headers;
status: number;
};
type CreateDataAssetHttpError = {
data: ErrorResponse;
headers: Headers;
status: number;
};
/**
* Get data asset by ID.
*
* @param dataAssetId
* @param query an object with query parameters
* @throws GetDataAssetHttpError
*/
declare const getDataAsset: (dataAssetId: string, query: {
/** Comma-separated fields to return in the response. */
projections?: string[];
}, options?: ApiCallOptions) => Promise<GetDataAssetHttpResponse>;
type GetDataAssetHttpResponse = {
data: DataAsset;
headers: Headers;
status: number;
};
type GetDataAssetHttpError = {
data: ErrorResponse;
headers: Headers;
status: number;
};
/**
* Patch data asset.
*
* @param dataAssetId
* @param body an object with the body content
* @throws PatchDataAssetHttpError
*/
declare const patchDataAsset: (dataAssetId: string, body: JsonPatch[], options?: ApiCallOptions) => Promise<PatchDataAssetHttpResponse>;
type PatchDataAssetHttpResponse = {
data: DataAsset;
headers: Headers;
status: number;
};
type PatchDataAssetHttpError = {
data: ErrorResponse;
headers: Headers;
status: number;
};
/**
* Update data asset.
*
* @param dataAssetId
* @param body an object with the body content
* @throws UpdateDataAssetHttpError
*/
declare const updateDataAsset: (dataAssetId: string, body: DataAsset, options?: ApiCallOptions) => Promise<UpdateDataAssetHttpResponse>;
type UpdateDataAssetHttpResponse = {
data: DataAsset;
headers: Headers;
status: number;
};
type UpdateDataAssetHttpError = {
data: ErrorResponse;
headers: Headers;
status: number;
};
/**
* Clears the cache for data-assets api requests.
*/
declare function clearCache(): void;
interface DataAssetsAPI {
/**
* Batch delete data assets by IDs.
*
* @param body an object with the body content
* @throws DeleteDataAssetsHttpError
*/
deleteDataAssets: typeof deleteDataAssets;
/**
* Save new data asset.
*
* @param body an object with the body content
* @throws CreateDataAssetHttpError
*/
createDataAsset: typeof createDataAsset;
/**
* Get data asset by ID.
*
* @param dataAssetId
* @param query an object with query parameters
* @throws GetDataAssetHttpError
*/
getDataAsset: typeof getDataAsset;
/**
* Patch data asset.
*
* @param dataAssetId
* @param body an object with the body content
* @throws PatchDataAssetHttpError
*/
patchDataAsset: typeof patchDataAsset;
/**
* Update data asset.
*
* @param dataAssetId
* @param body an object with the body content
* @throws UpdateDataAssetHttpError
*/
updateDataAsset: typeof updateDataAsset;
/**
* Clears the cache for data-assets api requests.
*/
clearCache: typeof clearCache;
}
/**
* Functions for the data-assets api
*/
declare const dataAssetsExport: DataAssetsAPI;
export { type BatchIdDto, type CreateDataAssetHttpError, type CreateDataAssetHttpResponse, type DataAsset, type DataAssetsAPI, type DataStoreInfo, type DeleteDataAssetsHttpError, type DeleteDataAssetsHttpResponse, type Error, type ErrorResponse, type GetDataAssetHttpError, type GetDataAssetHttpResponse, type JsonPatch, type PatchDataAssetHttpError, type PatchDataAssetHttpResponse, type UpdateDataAssetHttpError, type UpdateDataAssetHttpResponse, clearCache, createDataAsset, dataAssetsExport as default, deleteDataAssets, getDataAsset, patchDataAsset, updateDataAsset };