@qlik/api 0.0.1

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 (160) hide show
  1. package/LICENSE +17 -0
  2. package/README.md +8 -0
  3. package/api-keys.d.mts +313 -0
  4. package/api-keys.d.ts +313 -0
  5. package/api-keys.js +76 -0
  6. package/api-keys.mjs +76 -0
  7. package/apps.d.mts +1921 -0
  8. package/apps.d.ts +1921 -0
  9. package/apps.js +331 -0
  10. package/apps.mjs +331 -0
  11. package/audits.d.mts +262 -0
  12. package/audits.d.ts +262 -0
  13. package/audits.js +63 -0
  14. package/audits.mjs +63 -0
  15. package/auth-CSVTXOZX.js +36 -0
  16. package/auth-TE272Q34.mjs +36 -0
  17. package/auth-types-nnUcWhuU.d.mts +98 -0
  18. package/auth-types-nnUcWhuU.d.ts +98 -0
  19. package/auth.d.mts +26 -0
  20. package/auth.d.ts +26 -0
  21. package/auth.js +13 -0
  22. package/auth.mjs +13 -0
  23. package/automations.d.mts +638 -0
  24. package/automations.d.ts +638 -0
  25. package/automations.js +166 -0
  26. package/automations.mjs +166 -0
  27. package/brands.d.mts +614 -0
  28. package/brands.d.ts +614 -0
  29. package/brands.js +118 -0
  30. package/brands.mjs +118 -0
  31. package/chunk-3YE7EI7I.mjs +17 -0
  32. package/chunk-4ES65KO3.js +57 -0
  33. package/chunk-4FLMND6T.js +25 -0
  34. package/chunk-4OMEH5SW.mjs +1337 -0
  35. package/chunk-CKPJE4IA.mjs +57 -0
  36. package/chunk-GUQBHY3H.mjs +25 -0
  37. package/chunk-OULT3V2U.js +17 -0
  38. package/chunk-WM7FQU2U.mjs +21 -0
  39. package/chunk-XASXL2NC.js +1337 -0
  40. package/chunk-ZT4C7KCQ.js +21 -0
  41. package/collections.d.mts +535 -0
  42. package/collections.d.ts +535 -0
  43. package/collections.js +100 -0
  44. package/collections.mjs +100 -0
  45. package/csp-origins.d.mts +258 -0
  46. package/csp-origins.d.ts +258 -0
  47. package/csp-origins.js +66 -0
  48. package/csp-origins.mjs +66 -0
  49. package/data-assets.d.mts +195 -0
  50. package/data-assets.d.ts +195 -0
  51. package/data-assets.js +61 -0
  52. package/data-assets.mjs +61 -0
  53. package/data-connections.d.mts +527 -0
  54. package/data-connections.d.ts +527 -0
  55. package/data-connections.js +96 -0
  56. package/data-connections.mjs +96 -0
  57. package/data-credentials.d.mts +188 -0
  58. package/data-credentials.d.ts +188 -0
  59. package/data-credentials.js +56 -0
  60. package/data-credentials.mjs +56 -0
  61. package/data-files.d.mts +471 -0
  62. package/data-files.d.ts +471 -0
  63. package/data-files.js +116 -0
  64. package/data-files.mjs +116 -0
  65. package/docs/examples.md +4 -0
  66. package/enigma-session-4L373ALV.mjs +10196 -0
  67. package/enigma-session-TEB53FAF.js +10196 -0
  68. package/esm-4X3DKK5D.js +63 -0
  69. package/esm-SOWVJKOQ.mjs +63 -0
  70. package/extensions.d.mts +257 -0
  71. package/extensions.d.ts +257 -0
  72. package/extensions.js +74 -0
  73. package/extensions.mjs +74 -0
  74. package/global.types-Eto4uYwy.d.mts +102 -0
  75. package/global.types-hIvp-WdX.d.ts +102 -0
  76. package/glossaries.d.mts +1041 -0
  77. package/glossaries.d.ts +1041 -0
  78. package/glossaries.js +225 -0
  79. package/glossaries.mjs +225 -0
  80. package/groups.d.mts +379 -0
  81. package/groups.d.ts +379 -0
  82. package/groups.js +83 -0
  83. package/groups.mjs +83 -0
  84. package/identity-providers.d.mts +492 -0
  85. package/identity-providers.d.ts +492 -0
  86. package/identity-providers.js +80 -0
  87. package/identity-providers.mjs +80 -0
  88. package/index.d.mts +142 -0
  89. package/index.d.ts +142 -0
  90. package/index.js +678 -0
  91. package/index.mjs +678 -0
  92. package/invoke-fetch-MSSJAZ7K.mjs +14 -0
  93. package/invoke-fetch-PEI54KZO.js +14 -0
  94. package/items.d.mts +501 -0
  95. package/items.d.ts +501 -0
  96. package/items.js +84 -0
  97. package/items.mjs +84 -0
  98. package/licenses.d.mts +436 -0
  99. package/licenses.d.ts +436 -0
  100. package/licenses.js +87 -0
  101. package/licenses.mjs +87 -0
  102. package/package.json +264 -0
  103. package/qix-EU7PXRZ6.mjs +573 -0
  104. package/qix-RLTISYTB.js +573 -0
  105. package/qix.d.mts +11543 -0
  106. package/qix.d.ts +11543 -0
  107. package/qix.js +9 -0
  108. package/qix.mjs +9 -0
  109. package/quotas.d.mts +105 -0
  110. package/quotas.d.ts +105 -0
  111. package/quotas.js +31 -0
  112. package/quotas.mjs +31 -0
  113. package/reload-tasks.d.mts +222 -0
  114. package/reload-tasks.d.ts +222 -0
  115. package/reload-tasks.js +59 -0
  116. package/reload-tasks.mjs +59 -0
  117. package/reloads.d.mts +189 -0
  118. package/reloads.d.ts +189 -0
  119. package/reloads.js +44 -0
  120. package/reloads.mjs +44 -0
  121. package/roles.d.mts +150 -0
  122. package/roles.d.ts +150 -0
  123. package/roles.js +30 -0
  124. package/roles.mjs +30 -0
  125. package/spaces.d.mts +524 -0
  126. package/spaces.d.ts +524 -0
  127. package/spaces.js +118 -0
  128. package/spaces.mjs +118 -0
  129. package/temp-contents.d.mts +222 -0
  130. package/temp-contents.d.ts +222 -0
  131. package/temp-contents.js +60 -0
  132. package/temp-contents.mjs +60 -0
  133. package/tenants.d.mts +276 -0
  134. package/tenants.d.ts +276 -0
  135. package/tenants.js +68 -0
  136. package/tenants.mjs +68 -0
  137. package/themes.d.mts +235 -0
  138. package/themes.d.ts +235 -0
  139. package/themes.js +74 -0
  140. package/themes.mjs +74 -0
  141. package/transports.d.mts +298 -0
  142. package/transports.d.ts +298 -0
  143. package/transports.js +62 -0
  144. package/transports.mjs +62 -0
  145. package/users.d.mts +544 -0
  146. package/users.d.ts +544 -0
  147. package/users.js +99 -0
  148. package/users.mjs +99 -0
  149. package/web-integrations.d.mts +246 -0
  150. package/web-integrations.d.ts +246 -0
  151. package/web-integrations.js +59 -0
  152. package/web-integrations.mjs +59 -0
  153. package/web-notifications.d.mts +220 -0
  154. package/web-notifications.d.ts +220 -0
  155. package/web-notifications.js +66 -0
  156. package/web-notifications.mjs +66 -0
  157. package/webhooks.d.mts +422 -0
  158. package/webhooks.d.ts +422 -0
  159. package/webhooks.js +100 -0
  160. package/webhooks.mjs +100 -0
package/LICENSE ADDED
@@ -0,0 +1,17 @@
1
+ ISC License
2
+
3
+ Copyright (c) 2023 Qlik
4
+
5
+ Permission to use, copy, modify, and/or distribute this software
6
+ for any purpose with or without fee is hereby granted, provided
7
+ that the above copyright notice and this permission notice appear
8
+ in all copies.
9
+
10
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
11
+ WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
12
+ WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
13
+ AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR
14
+ CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
15
+ OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
16
+ NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
17
+ CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,8 @@
1
+ # @qlik/api
2
+
3
+ > **Warning**
4
+ > This package is experimental and will likely change and break until the version number 1.0.0 is released.
5
+
6
+ Javascript library for consuming Qlik API's
7
+
8
+ Connect to Qlik's rest and qix API from your Javascript/Typescript application with fully typed API's.
package/api-keys.d.mts ADDED
@@ -0,0 +1,313 @@
1
+ import { A as ApiCallOptions } from './global.types-Eto4uYwy.mjs';
2
+ import './auth-types-nnUcWhuU.mjs';
3
+
4
+ type ApiKey = {
5
+ /** When the API key was created. */
6
+ readonly created?: string;
7
+ /** The ID of the user who created the key. */
8
+ createdByUser: string;
9
+ /** A description for the API key. */
10
+ description: string;
11
+ /** When the API key will expire and no longer be a valid authentication token. */
12
+ expiry: string;
13
+ /** The unique ID for the resource. */
14
+ id: string;
15
+ /** When the API key was last updated. */
16
+ readonly lastUpdated?: string;
17
+ /** The status of the API key. */
18
+ status: "active" | "expired" | "revoked";
19
+ /** The ID of the subject for the API key. */
20
+ sub: string;
21
+ /** Type of the subject. */
22
+ subType: "user";
23
+ /** The tenant ID. */
24
+ tenantId: string;
25
+ };
26
+ type ApiKeyBody = {
27
+ /** Text that describes the API key. */
28
+ description: string;
29
+ /** The expiry of the API key, in ISO8601 duration format. */
30
+ expiry?: string;
31
+ /** The ID of the subject for the API key. */
32
+ sub?: string;
33
+ /** Type of the subject. */
34
+ subType?: string;
35
+ };
36
+ type ApiKeyConfigPatch = {
37
+ /** The operation to be performed. */
38
+ op: "replace";
39
+ /** The path for the given resource field to patch. */
40
+ path: "/api_keys_enabled" | "/max_api_key_expiry" | "/max_keys_per_user";
41
+ /** The value to be used for this operation. */
42
+ value: unknown;
43
+ };
44
+ type ApiKeyPatch = {
45
+ /** The operation to be performed. */
46
+ op: "replace";
47
+ /** The path for the given resource field to patch. */
48
+ path: "/description";
49
+ /** The value to be used for this operation. */
50
+ value: string;
51
+ };
52
+ type ApiKeyWithToken = {
53
+ /** When the API key was created. */
54
+ readonly created?: string;
55
+ /** The id of the user who created the key. */
56
+ createdByUser: string;
57
+ /** A description for the API key. */
58
+ description: string;
59
+ /** When the API key will expire and no longer be a valid authentication token. */
60
+ expiry: string;
61
+ /** The unique ID for the resource. */
62
+ id: string;
63
+ /** When the API key was last updated. */
64
+ readonly lastUpdated?: string;
65
+ /** The status of the API key. */
66
+ status: "active" | "expired" | "revoked";
67
+ /** The ID of the subject for the API key. */
68
+ sub: string;
69
+ /** Type of the subject. */
70
+ subType: "user";
71
+ /** The tenant ID. */
72
+ tenantId: string;
73
+ /** The generated signed JWT. */
74
+ token: string;
75
+ };
76
+ type ApiKeysConfig = {
77
+ /** Enables or disables API key functionality for the specified tenant. */
78
+ api_keys_enabled?: boolean;
79
+ /** The maximum lifetime, in ISO8601 duration format, for which an API key can be issued for the specified tenant. */
80
+ max_api_key_expiry?: string;
81
+ /** The maximum number of active API keys that any user can create for the specified tenant. */
82
+ max_keys_per_user?: number;
83
+ };
84
+ type ApiKeysConfigPatchSchema = ApiKeyConfigPatch[];
85
+ type ApiKeysPatchSchema = ApiKeyPatch[];
86
+ type Error = {
87
+ /** The error code. */
88
+ code: string;
89
+ /** A human-readable explanation specific to this occurrence of the problem. */
90
+ detail?: string;
91
+ /** Additional properties relating to the error. */
92
+ meta?: unknown;
93
+ /** References to the source of the error. */
94
+ source?: {
95
+ /** The URI query parameter that caused the error. */
96
+ parameter?: string;
97
+ /** A JSON Pointer to the property that caused the error. */
98
+ pointer?: string;
99
+ };
100
+ /** The HTTP status code. */
101
+ status?: number;
102
+ /** Summary of the problem. */
103
+ title: string;
104
+ };
105
+ type Errors = {
106
+ /** List of errors and their properties. */
107
+ errors?: Error[];
108
+ };
109
+ type Link = {
110
+ /** The URL for the link. */
111
+ href: string;
112
+ };
113
+ type ApiKeyPage = {
114
+ /** Properties of API keys in a given tenant. */
115
+ data: ApiKey[];
116
+ /** Navigation links to page results. */
117
+ links: {
118
+ next?: Link;
119
+ prev?: Link;
120
+ self: Link;
121
+ };
122
+ };
123
+ /**
124
+ * Lists API keys for a given tenant ID.
125
+ * @param query an object with query parameters
126
+ * @throws GetApiKeysHttpError
127
+ */
128
+ declare const getApiKeys: (query: {
129
+ /** The user ID that created the API key. */
130
+ createdByUser?: string;
131
+ /** Get resources with IDs that are lower than the target resource ID. Cannot be used in conjunction with startingAfter. */
132
+ endingBefore?: string;
133
+ /** Maximum number of API keys to retrieve. */
134
+ limit?: number;
135
+ /** The field to sort by, with +/- prefix indicating sort order */
136
+ sort?: "createdByUser" | "+createdByUser" | "-createdByUser" | "sub" | "+sub" | "-sub" | "status" | "+status" | "-status" | "description" | "+description" | "-description" | "created" | "+created" | "-created";
137
+ /** Get resources with IDs that are higher than the target resource ID. Cannot be used in conjunction with endingBefore. */
138
+ startingAfter?: string;
139
+ /** The status of the API key. */
140
+ status?: "active" | "expired" | "revoked";
141
+ /** The ID of the subject. */
142
+ sub?: string;
143
+ }, options?: ApiCallOptions) => Promise<GetApiKeysHttpResponse>;
144
+ type GetApiKeysHttpResponse = {
145
+ data: ApiKeyPage;
146
+ headers: Headers;
147
+ status: number;
148
+ prev?: (options?: ApiCallOptions) => Promise<GetApiKeysHttpResponse>;
149
+ next?: (options?: ApiCallOptions) => Promise<GetApiKeysHttpResponse>;
150
+ };
151
+ type GetApiKeysHttpError = {
152
+ data: Errors;
153
+ headers: Headers;
154
+ status: number;
155
+ };
156
+ /**
157
+ * Creates an API key resource.
158
+ * @param body an object with the body content
159
+ * @throws CreateApiKeyHttpError
160
+ */
161
+ declare const createApiKey: (body: ApiKeyBody, options?: ApiCallOptions) => Promise<CreateApiKeyHttpResponse>;
162
+ type CreateApiKeyHttpResponse = {
163
+ data: ApiKeyWithToken;
164
+ headers: Headers;
165
+ status: number;
166
+ };
167
+ type CreateApiKeyHttpError = {
168
+ data: Errors;
169
+ headers: Headers;
170
+ status: number;
171
+ };
172
+ /**
173
+ * Gets the API keys configuration for a given tenant ID.
174
+ * @param tenantId The tenant ID of the API keys configuration to be retrieved.
175
+ * @throws GetApiKeyConfigHttpError
176
+ */
177
+ declare const getApiKeyConfig: (tenantId: string, options?: ApiCallOptions) => Promise<GetApiKeyConfigHttpResponse>;
178
+ type GetApiKeyConfigHttpResponse = {
179
+ data: ApiKeysConfig;
180
+ headers: Headers;
181
+ status: number;
182
+ };
183
+ type GetApiKeyConfigHttpError = {
184
+ data: Errors;
185
+ headers: Headers;
186
+ status: number;
187
+ };
188
+ /**
189
+ * Updates the API keys configuration for a given tenant ID.
190
+ * @param tenantId The tenant ID of the API keys configuration to be retrieved.
191
+ * @param body an object with the body content
192
+ * @throws PatchApiKeyConfigHttpError
193
+ */
194
+ declare const patchApiKeyConfig: (tenantId: string, body: ApiKeysConfigPatchSchema, options?: ApiCallOptions) => Promise<PatchApiKeyConfigHttpResponse>;
195
+ type PatchApiKeyConfigHttpResponse = {
196
+ data: void;
197
+ headers: Headers;
198
+ status: number;
199
+ };
200
+ type PatchApiKeyConfigHttpError = {
201
+ data: Errors;
202
+ headers: Headers;
203
+ status: number;
204
+ };
205
+ /**
206
+ * When the owner of the API key sends the request, the key will be removed. When a TenantAdmin sends the request, the key will be revoked.
207
+ * @param id The ID of the API key resource to be retrieved.
208
+ * @throws DeleteApiKeyHttpError
209
+ */
210
+ declare const deleteApiKey: (id: string, options?: ApiCallOptions) => Promise<DeleteApiKeyHttpResponse>;
211
+ type DeleteApiKeyHttpResponse = {
212
+ data: void;
213
+ headers: Headers;
214
+ status: number;
215
+ };
216
+ type DeleteApiKeyHttpError = {
217
+ data: Errors;
218
+ headers: Headers;
219
+ status: number;
220
+ };
221
+ /**
222
+ * Gets the API key for a given ID.
223
+ * @param id The ID of the API key resource to be retrieved.
224
+ * @throws GetApiKeyHttpError
225
+ */
226
+ declare const getApiKey: (id: string, options?: ApiCallOptions) => Promise<GetApiKeyHttpResponse>;
227
+ type GetApiKeyHttpResponse = {
228
+ data: ApiKey;
229
+ headers: Headers;
230
+ status: number;
231
+ };
232
+ type GetApiKeyHttpError = {
233
+ data: Errors;
234
+ headers: Headers;
235
+ status: number;
236
+ };
237
+ /**
238
+ * Updates an API key for a given ID.
239
+ * @param id The ID of the API key resource to be updated.
240
+ * @param body an object with the body content
241
+ * @throws PatchApiKeyHttpError
242
+ */
243
+ declare const patchApiKey: (id: string, body: ApiKeysPatchSchema, options?: ApiCallOptions) => Promise<PatchApiKeyHttpResponse>;
244
+ type PatchApiKeyHttpResponse = {
245
+ data: void;
246
+ headers: Headers;
247
+ status: number;
248
+ };
249
+ type PatchApiKeyHttpError = {
250
+ data: Errors;
251
+ headers: Headers;
252
+ status: number;
253
+ };
254
+ /**
255
+ * Clears the cache for api-keys api requests.
256
+ */
257
+ declare function clearCache(): void;
258
+ interface ApiKeysAPI {
259
+ /**
260
+ * Lists API keys for a given tenant ID.
261
+ * @param query an object with query parameters
262
+ * @throws GetApiKeysHttpError
263
+ */
264
+ getApiKeys: typeof getApiKeys;
265
+ /**
266
+ * Creates an API key resource.
267
+ * @param body an object with the body content
268
+ * @throws CreateApiKeyHttpError
269
+ */
270
+ createApiKey: typeof createApiKey;
271
+ /**
272
+ * Gets the API keys configuration for a given tenant ID.
273
+ * @param tenantId The tenant ID of the API keys configuration to be retrieved.
274
+ * @throws GetApiKeyConfigHttpError
275
+ */
276
+ getApiKeyConfig: typeof getApiKeyConfig;
277
+ /**
278
+ * Updates the API keys configuration for a given tenant ID.
279
+ * @param tenantId The tenant ID of the API keys configuration to be retrieved.
280
+ * @param body an object with the body content
281
+ * @throws PatchApiKeyConfigHttpError
282
+ */
283
+ patchApiKeyConfig: typeof patchApiKeyConfig;
284
+ /**
285
+ * When the owner of the API key sends the request, the key will be removed. When a TenantAdmin sends the request, the key will be revoked.
286
+ * @param id The ID of the API key resource to be retrieved.
287
+ * @throws DeleteApiKeyHttpError
288
+ */
289
+ deleteApiKey: typeof deleteApiKey;
290
+ /**
291
+ * Gets the API key for a given ID.
292
+ * @param id The ID of the API key resource to be retrieved.
293
+ * @throws GetApiKeyHttpError
294
+ */
295
+ getApiKey: typeof getApiKey;
296
+ /**
297
+ * Updates an API key for a given ID.
298
+ * @param id The ID of the API key resource to be updated.
299
+ * @param body an object with the body content
300
+ * @throws PatchApiKeyHttpError
301
+ */
302
+ patchApiKey: typeof patchApiKey;
303
+ /**
304
+ * Clears the cache for api-keys api requests.
305
+ */
306
+ clearCache: typeof clearCache;
307
+ }
308
+ /**
309
+ * Functions for the api-keys api
310
+ */
311
+ declare const apiKeysExport: ApiKeysAPI;
312
+
313
+ export { type ApiKey, type ApiKeyBody, type ApiKeyConfigPatch, type ApiKeyPage, type ApiKeyPatch, type ApiKeyWithToken, type ApiKeysAPI, type ApiKeysConfig, type ApiKeysConfigPatchSchema, type ApiKeysPatchSchema, type CreateApiKeyHttpError, type CreateApiKeyHttpResponse, type DeleteApiKeyHttpError, type DeleteApiKeyHttpResponse, type Error, type Errors, type GetApiKeyConfigHttpError, type GetApiKeyConfigHttpResponse, type GetApiKeyHttpError, type GetApiKeyHttpResponse, type GetApiKeysHttpError, type GetApiKeysHttpResponse, type Link, type PatchApiKeyConfigHttpError, type PatchApiKeyConfigHttpResponse, type PatchApiKeyHttpError, type PatchApiKeyHttpResponse, clearCache, createApiKey, apiKeysExport as default, deleteApiKey, getApiKey, getApiKeyConfig, getApiKeys, patchApiKey, patchApiKeyConfig };
package/api-keys.d.ts ADDED
@@ -0,0 +1,313 @@
1
+ import { A as ApiCallOptions } from './global.types-hIvp-WdX.js';
2
+ import './auth-types-nnUcWhuU.js';
3
+
4
+ type ApiKey = {
5
+ /** When the API key was created. */
6
+ readonly created?: string;
7
+ /** The ID of the user who created the key. */
8
+ createdByUser: string;
9
+ /** A description for the API key. */
10
+ description: string;
11
+ /** When the API key will expire and no longer be a valid authentication token. */
12
+ expiry: string;
13
+ /** The unique ID for the resource. */
14
+ id: string;
15
+ /** When the API key was last updated. */
16
+ readonly lastUpdated?: string;
17
+ /** The status of the API key. */
18
+ status: "active" | "expired" | "revoked";
19
+ /** The ID of the subject for the API key. */
20
+ sub: string;
21
+ /** Type of the subject. */
22
+ subType: "user";
23
+ /** The tenant ID. */
24
+ tenantId: string;
25
+ };
26
+ type ApiKeyBody = {
27
+ /** Text that describes the API key. */
28
+ description: string;
29
+ /** The expiry of the API key, in ISO8601 duration format. */
30
+ expiry?: string;
31
+ /** The ID of the subject for the API key. */
32
+ sub?: string;
33
+ /** Type of the subject. */
34
+ subType?: string;
35
+ };
36
+ type ApiKeyConfigPatch = {
37
+ /** The operation to be performed. */
38
+ op: "replace";
39
+ /** The path for the given resource field to patch. */
40
+ path: "/api_keys_enabled" | "/max_api_key_expiry" | "/max_keys_per_user";
41
+ /** The value to be used for this operation. */
42
+ value: unknown;
43
+ };
44
+ type ApiKeyPatch = {
45
+ /** The operation to be performed. */
46
+ op: "replace";
47
+ /** The path for the given resource field to patch. */
48
+ path: "/description";
49
+ /** The value to be used for this operation. */
50
+ value: string;
51
+ };
52
+ type ApiKeyWithToken = {
53
+ /** When the API key was created. */
54
+ readonly created?: string;
55
+ /** The id of the user who created the key. */
56
+ createdByUser: string;
57
+ /** A description for the API key. */
58
+ description: string;
59
+ /** When the API key will expire and no longer be a valid authentication token. */
60
+ expiry: string;
61
+ /** The unique ID for the resource. */
62
+ id: string;
63
+ /** When the API key was last updated. */
64
+ readonly lastUpdated?: string;
65
+ /** The status of the API key. */
66
+ status: "active" | "expired" | "revoked";
67
+ /** The ID of the subject for the API key. */
68
+ sub: string;
69
+ /** Type of the subject. */
70
+ subType: "user";
71
+ /** The tenant ID. */
72
+ tenantId: string;
73
+ /** The generated signed JWT. */
74
+ token: string;
75
+ };
76
+ type ApiKeysConfig = {
77
+ /** Enables or disables API key functionality for the specified tenant. */
78
+ api_keys_enabled?: boolean;
79
+ /** The maximum lifetime, in ISO8601 duration format, for which an API key can be issued for the specified tenant. */
80
+ max_api_key_expiry?: string;
81
+ /** The maximum number of active API keys that any user can create for the specified tenant. */
82
+ max_keys_per_user?: number;
83
+ };
84
+ type ApiKeysConfigPatchSchema = ApiKeyConfigPatch[];
85
+ type ApiKeysPatchSchema = ApiKeyPatch[];
86
+ type Error = {
87
+ /** The error code. */
88
+ code: string;
89
+ /** A human-readable explanation specific to this occurrence of the problem. */
90
+ detail?: string;
91
+ /** Additional properties relating to the error. */
92
+ meta?: unknown;
93
+ /** References to the source of the error. */
94
+ source?: {
95
+ /** The URI query parameter that caused the error. */
96
+ parameter?: string;
97
+ /** A JSON Pointer to the property that caused the error. */
98
+ pointer?: string;
99
+ };
100
+ /** The HTTP status code. */
101
+ status?: number;
102
+ /** Summary of the problem. */
103
+ title: string;
104
+ };
105
+ type Errors = {
106
+ /** List of errors and their properties. */
107
+ errors?: Error[];
108
+ };
109
+ type Link = {
110
+ /** The URL for the link. */
111
+ href: string;
112
+ };
113
+ type ApiKeyPage = {
114
+ /** Properties of API keys in a given tenant. */
115
+ data: ApiKey[];
116
+ /** Navigation links to page results. */
117
+ links: {
118
+ next?: Link;
119
+ prev?: Link;
120
+ self: Link;
121
+ };
122
+ };
123
+ /**
124
+ * Lists API keys for a given tenant ID.
125
+ * @param query an object with query parameters
126
+ * @throws GetApiKeysHttpError
127
+ */
128
+ declare const getApiKeys: (query: {
129
+ /** The user ID that created the API key. */
130
+ createdByUser?: string;
131
+ /** Get resources with IDs that are lower than the target resource ID. Cannot be used in conjunction with startingAfter. */
132
+ endingBefore?: string;
133
+ /** Maximum number of API keys to retrieve. */
134
+ limit?: number;
135
+ /** The field to sort by, with +/- prefix indicating sort order */
136
+ sort?: "createdByUser" | "+createdByUser" | "-createdByUser" | "sub" | "+sub" | "-sub" | "status" | "+status" | "-status" | "description" | "+description" | "-description" | "created" | "+created" | "-created";
137
+ /** Get resources with IDs that are higher than the target resource ID. Cannot be used in conjunction with endingBefore. */
138
+ startingAfter?: string;
139
+ /** The status of the API key. */
140
+ status?: "active" | "expired" | "revoked";
141
+ /** The ID of the subject. */
142
+ sub?: string;
143
+ }, options?: ApiCallOptions) => Promise<GetApiKeysHttpResponse>;
144
+ type GetApiKeysHttpResponse = {
145
+ data: ApiKeyPage;
146
+ headers: Headers;
147
+ status: number;
148
+ prev?: (options?: ApiCallOptions) => Promise<GetApiKeysHttpResponse>;
149
+ next?: (options?: ApiCallOptions) => Promise<GetApiKeysHttpResponse>;
150
+ };
151
+ type GetApiKeysHttpError = {
152
+ data: Errors;
153
+ headers: Headers;
154
+ status: number;
155
+ };
156
+ /**
157
+ * Creates an API key resource.
158
+ * @param body an object with the body content
159
+ * @throws CreateApiKeyHttpError
160
+ */
161
+ declare const createApiKey: (body: ApiKeyBody, options?: ApiCallOptions) => Promise<CreateApiKeyHttpResponse>;
162
+ type CreateApiKeyHttpResponse = {
163
+ data: ApiKeyWithToken;
164
+ headers: Headers;
165
+ status: number;
166
+ };
167
+ type CreateApiKeyHttpError = {
168
+ data: Errors;
169
+ headers: Headers;
170
+ status: number;
171
+ };
172
+ /**
173
+ * Gets the API keys configuration for a given tenant ID.
174
+ * @param tenantId The tenant ID of the API keys configuration to be retrieved.
175
+ * @throws GetApiKeyConfigHttpError
176
+ */
177
+ declare const getApiKeyConfig: (tenantId: string, options?: ApiCallOptions) => Promise<GetApiKeyConfigHttpResponse>;
178
+ type GetApiKeyConfigHttpResponse = {
179
+ data: ApiKeysConfig;
180
+ headers: Headers;
181
+ status: number;
182
+ };
183
+ type GetApiKeyConfigHttpError = {
184
+ data: Errors;
185
+ headers: Headers;
186
+ status: number;
187
+ };
188
+ /**
189
+ * Updates the API keys configuration for a given tenant ID.
190
+ * @param tenantId The tenant ID of the API keys configuration to be retrieved.
191
+ * @param body an object with the body content
192
+ * @throws PatchApiKeyConfigHttpError
193
+ */
194
+ declare const patchApiKeyConfig: (tenantId: string, body: ApiKeysConfigPatchSchema, options?: ApiCallOptions) => Promise<PatchApiKeyConfigHttpResponse>;
195
+ type PatchApiKeyConfigHttpResponse = {
196
+ data: void;
197
+ headers: Headers;
198
+ status: number;
199
+ };
200
+ type PatchApiKeyConfigHttpError = {
201
+ data: Errors;
202
+ headers: Headers;
203
+ status: number;
204
+ };
205
+ /**
206
+ * When the owner of the API key sends the request, the key will be removed. When a TenantAdmin sends the request, the key will be revoked.
207
+ * @param id The ID of the API key resource to be retrieved.
208
+ * @throws DeleteApiKeyHttpError
209
+ */
210
+ declare const deleteApiKey: (id: string, options?: ApiCallOptions) => Promise<DeleteApiKeyHttpResponse>;
211
+ type DeleteApiKeyHttpResponse = {
212
+ data: void;
213
+ headers: Headers;
214
+ status: number;
215
+ };
216
+ type DeleteApiKeyHttpError = {
217
+ data: Errors;
218
+ headers: Headers;
219
+ status: number;
220
+ };
221
+ /**
222
+ * Gets the API key for a given ID.
223
+ * @param id The ID of the API key resource to be retrieved.
224
+ * @throws GetApiKeyHttpError
225
+ */
226
+ declare const getApiKey: (id: string, options?: ApiCallOptions) => Promise<GetApiKeyHttpResponse>;
227
+ type GetApiKeyHttpResponse = {
228
+ data: ApiKey;
229
+ headers: Headers;
230
+ status: number;
231
+ };
232
+ type GetApiKeyHttpError = {
233
+ data: Errors;
234
+ headers: Headers;
235
+ status: number;
236
+ };
237
+ /**
238
+ * Updates an API key for a given ID.
239
+ * @param id The ID of the API key resource to be updated.
240
+ * @param body an object with the body content
241
+ * @throws PatchApiKeyHttpError
242
+ */
243
+ declare const patchApiKey: (id: string, body: ApiKeysPatchSchema, options?: ApiCallOptions) => Promise<PatchApiKeyHttpResponse>;
244
+ type PatchApiKeyHttpResponse = {
245
+ data: void;
246
+ headers: Headers;
247
+ status: number;
248
+ };
249
+ type PatchApiKeyHttpError = {
250
+ data: Errors;
251
+ headers: Headers;
252
+ status: number;
253
+ };
254
+ /**
255
+ * Clears the cache for api-keys api requests.
256
+ */
257
+ declare function clearCache(): void;
258
+ interface ApiKeysAPI {
259
+ /**
260
+ * Lists API keys for a given tenant ID.
261
+ * @param query an object with query parameters
262
+ * @throws GetApiKeysHttpError
263
+ */
264
+ getApiKeys: typeof getApiKeys;
265
+ /**
266
+ * Creates an API key resource.
267
+ * @param body an object with the body content
268
+ * @throws CreateApiKeyHttpError
269
+ */
270
+ createApiKey: typeof createApiKey;
271
+ /**
272
+ * Gets the API keys configuration for a given tenant ID.
273
+ * @param tenantId The tenant ID of the API keys configuration to be retrieved.
274
+ * @throws GetApiKeyConfigHttpError
275
+ */
276
+ getApiKeyConfig: typeof getApiKeyConfig;
277
+ /**
278
+ * Updates the API keys configuration for a given tenant ID.
279
+ * @param tenantId The tenant ID of the API keys configuration to be retrieved.
280
+ * @param body an object with the body content
281
+ * @throws PatchApiKeyConfigHttpError
282
+ */
283
+ patchApiKeyConfig: typeof patchApiKeyConfig;
284
+ /**
285
+ * When the owner of the API key sends the request, the key will be removed. When a TenantAdmin sends the request, the key will be revoked.
286
+ * @param id The ID of the API key resource to be retrieved.
287
+ * @throws DeleteApiKeyHttpError
288
+ */
289
+ deleteApiKey: typeof deleteApiKey;
290
+ /**
291
+ * Gets the API key for a given ID.
292
+ * @param id The ID of the API key resource to be retrieved.
293
+ * @throws GetApiKeyHttpError
294
+ */
295
+ getApiKey: typeof getApiKey;
296
+ /**
297
+ * Updates an API key for a given ID.
298
+ * @param id The ID of the API key resource to be updated.
299
+ * @param body an object with the body content
300
+ * @throws PatchApiKeyHttpError
301
+ */
302
+ patchApiKey: typeof patchApiKey;
303
+ /**
304
+ * Clears the cache for api-keys api requests.
305
+ */
306
+ clearCache: typeof clearCache;
307
+ }
308
+ /**
309
+ * Functions for the api-keys api
310
+ */
311
+ declare const apiKeysExport: ApiKeysAPI;
312
+
313
+ export { type ApiKey, type ApiKeyBody, type ApiKeyConfigPatch, type ApiKeyPage, type ApiKeyPatch, type ApiKeyWithToken, type ApiKeysAPI, type ApiKeysConfig, type ApiKeysConfigPatchSchema, type ApiKeysPatchSchema, type CreateApiKeyHttpError, type CreateApiKeyHttpResponse, type DeleteApiKeyHttpError, type DeleteApiKeyHttpResponse, type Error, type Errors, type GetApiKeyConfigHttpError, type GetApiKeyConfigHttpResponse, type GetApiKeyHttpError, type GetApiKeyHttpResponse, type GetApiKeysHttpError, type GetApiKeysHttpResponse, type Link, type PatchApiKeyConfigHttpError, type PatchApiKeyConfigHttpResponse, type PatchApiKeyHttpError, type PatchApiKeyHttpResponse, clearCache, createApiKey, apiKeysExport as default, deleteApiKey, getApiKey, getApiKeyConfig, getApiKeys, patchApiKey, patchApiKeyConfig };