@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/spaces.mjs ADDED
@@ -0,0 +1,118 @@
1
+ import {
2
+ clearApiCache,
3
+ invokeFetch
4
+ } from "./chunk-3YE7EI7I.mjs";
5
+ import "./chunk-WM7FQU2U.mjs";
6
+
7
+ // src/public/rest/spaces.ts
8
+ var getSpaces = async (query, options) => invokeFetch("spaces", {
9
+ method: "get",
10
+ pathTemplate: "/api/v1/spaces",
11
+ query,
12
+ options
13
+ });
14
+ var createSpace = async (body, options) => invokeFetch("spaces", {
15
+ method: "post",
16
+ pathTemplate: "/api/v1/spaces",
17
+ body,
18
+ options
19
+ });
20
+ var getSpaceTypes = async (options) => invokeFetch("spaces", {
21
+ method: "get",
22
+ pathTemplate: "/api/v1/spaces/types",
23
+ options
24
+ });
25
+ var deleteSpace = async (spaceId, options) => invokeFetch("spaces", {
26
+ method: "delete",
27
+ pathTemplate: "/api/v1/spaces/{spaceId}",
28
+ pathVariables: { spaceId },
29
+ options
30
+ });
31
+ var getSpace = async (spaceId, options) => invokeFetch("spaces", {
32
+ method: "get",
33
+ pathTemplate: "/api/v1/spaces/{spaceId}",
34
+ pathVariables: { spaceId },
35
+ options
36
+ });
37
+ var patchSpace = async (spaceId, body, options) => invokeFetch("spaces", {
38
+ method: "patch",
39
+ pathTemplate: "/api/v1/spaces/{spaceId}",
40
+ pathVariables: { spaceId },
41
+ body,
42
+ options
43
+ });
44
+ var updateSpace = async (spaceId, body, options) => invokeFetch("spaces", {
45
+ method: "put",
46
+ pathTemplate: "/api/v1/spaces/{spaceId}",
47
+ pathVariables: { spaceId },
48
+ body,
49
+ options
50
+ });
51
+ var getSpaceAssignments = async (spaceId, query, options) => invokeFetch("spaces", {
52
+ method: "get",
53
+ pathTemplate: "/api/v1/spaces/{spaceId}/assignments",
54
+ pathVariables: { spaceId },
55
+ query,
56
+ options
57
+ });
58
+ var createSpaceAssignment = async (spaceId, body, options) => invokeFetch("spaces", {
59
+ method: "post",
60
+ pathTemplate: "/api/v1/spaces/{spaceId}/assignments",
61
+ pathVariables: { spaceId },
62
+ body,
63
+ options
64
+ });
65
+ var deleteSpaceAssignment = async (spaceId, assignmentId, options) => invokeFetch("spaces", {
66
+ method: "delete",
67
+ pathTemplate: "/api/v1/spaces/{spaceId}/assignments/{assignmentId}",
68
+ pathVariables: { spaceId, assignmentId },
69
+ options
70
+ });
71
+ var getSpaceAssignment = async (spaceId, assignmentId, options) => invokeFetch("spaces", {
72
+ method: "get",
73
+ pathTemplate: "/api/v1/spaces/{spaceId}/assignments/{assignmentId}",
74
+ pathVariables: { spaceId, assignmentId },
75
+ options
76
+ });
77
+ var updateSpaceAssignment = async (spaceId, assignmentId, body, options) => invokeFetch("spaces", {
78
+ method: "put",
79
+ pathTemplate: "/api/v1/spaces/{spaceId}/assignments/{assignmentId}",
80
+ pathVariables: { spaceId, assignmentId },
81
+ body,
82
+ options
83
+ });
84
+ function clearCache() {
85
+ return clearApiCache("spaces");
86
+ }
87
+ var spacesExport = {
88
+ getSpaces,
89
+ createSpace,
90
+ getSpaceTypes,
91
+ deleteSpace,
92
+ getSpace,
93
+ patchSpace,
94
+ updateSpace,
95
+ getSpaceAssignments,
96
+ createSpaceAssignment,
97
+ deleteSpaceAssignment,
98
+ getSpaceAssignment,
99
+ updateSpaceAssignment,
100
+ clearCache
101
+ };
102
+ var spaces_default = spacesExport;
103
+ export {
104
+ clearCache,
105
+ createSpace,
106
+ createSpaceAssignment,
107
+ spaces_default as default,
108
+ deleteSpace,
109
+ deleteSpaceAssignment,
110
+ getSpace,
111
+ getSpaceAssignment,
112
+ getSpaceAssignments,
113
+ getSpaceTypes,
114
+ getSpaces,
115
+ patchSpace,
116
+ updateSpace,
117
+ updateSpaceAssignment
118
+ };
@@ -0,0 +1,222 @@
1
+ import { A as ApiCallOptions } from './global.types-Eto4uYwy.mjs';
2
+ import './auth-types-nnUcWhuU.mjs';
3
+
4
+ type Error = {
5
+ /** The API error code. */
6
+ code: string;
7
+ /** A human-readable problem description of the issue. */
8
+ detail?: string;
9
+ /** Additional properties and information regarding the issue. */
10
+ meta?: {
11
+ /** The error type. */
12
+ errorType?: string;
13
+ /** Locale */
14
+ locale?: string;
15
+ /** The source errors (stack trace). */
16
+ sourceErrors?: string;
17
+ };
18
+ /** Title of the type of API Error. */
19
+ title: string;
20
+ };
21
+ type Errors = {
22
+ errors?: Error[];
23
+ /** A way to trace the source of the error. */
24
+ traceId?: string;
25
+ };
26
+ type DetailResponse = {
27
+ /** Datetime-stamp when the resource was created (in UTC). */
28
+ CreatedAt?: string;
29
+ /** Identifier for the subject / resource creator. */
30
+ CreatorID?: string;
31
+ /** Datetime-stamp when the resource expired (in UTC). */
32
+ Expires?: string;
33
+ /** Identifier */
34
+ ID?: string;
35
+ /** File name of the file uploaded by the user. */
36
+ Name?: string;
37
+ /** Size of resource (in bytes). */
38
+ Size?: string;
39
+ /** Time-to-live in seconds. */
40
+ TTLSeconds?: number;
41
+ /** Datetime-stamp when the resource was updated (in UTC). */
42
+ UpdatedAt?: string;
43
+ };
44
+ /**
45
+ * This endpoint is used to upload a file as a temporary content resource. It returns a `201 Created` with a location header that contains the location of the created resource. If filename or TTL is not properly set, a `400 Bad request` is returned. For internal issues, a `500 Internal Server Error` is returned.
46
+ * @param query an object with query parameters
47
+ * @param body an object with the body content
48
+ * @throws UploadTempFileHttpError
49
+ */
50
+ declare const uploadTempFile: (query: {
51
+ /** The name of the file to upload. */
52
+ filename?: string;
53
+ /** The TTL parameter is used to define the time-to-live for the content resource in seconds.
54
+ // It defaults to one hour (3600) if no input is provided. Max TTL is 259200 (3 days).'
55
+ // */
56
+ ttl?: number;
57
+ }, body: unknown, options?: ApiCallOptions) => Promise<UploadTempFileHttpResponse>;
58
+ type UploadTempFileHttpResponse = {
59
+ data: void;
60
+ headers: Headers;
61
+ status: number;
62
+ };
63
+ type UploadTempFileHttpError = {
64
+ data: Errors;
65
+ headers: Headers;
66
+ status: number;
67
+ };
68
+ /**
69
+ * Request used to create a new upload resource.
70
+ * See [tus.io](http://tus.io) for details.
71
+ *
72
+ * @throws CreateTusHttpError
73
+ */
74
+ declare const createTus: (options?: ApiCallOptions) => Promise<CreateTusHttpResponse>;
75
+ type CreateTusHttpResponse = {
76
+ data: void;
77
+ headers: Headers;
78
+ status: number;
79
+ };
80
+ type CreateTusHttpError = {
81
+ data: Errors;
82
+ headers: Headers;
83
+ status: number;
84
+ };
85
+ /**
86
+ * Request used to apply the bytes contained in the message at a given offset. Note that the tus server only
87
+ * accepts that the Content-Type response header is set to "application/offset+octet-stream".
88
+ * See [tus.io](http://tus.io) for details.
89
+ *
90
+ * Note that the server may return `423 Locked` on this request. This happens if the client attempts to perform
91
+ * concurrent access to the resource, for example, if attempting to do a `HEAD` request during an ongoing `PATCH` request.
92
+ * It can also occur in situations where the connection is unexpectedly dropped between the client and the server
93
+ * and the client attempts to make a new request when the server is still busy processing the upload. When this
94
+ * happens, the client shall, after some period of time, try to resume the upload again.
95
+ *
96
+ * @param id The ID used to uniquely identify the upload.
97
+ * @param body an object with the body content
98
+ * @throws PatchTusHttpError
99
+ */
100
+ declare const patchTus: (id: string, body: unknown, options?: ApiCallOptions) => Promise<PatchTusHttpResponse>;
101
+ type PatchTusHttpResponse = {
102
+ data: void;
103
+ headers: Headers;
104
+ status: number;
105
+ };
106
+ type PatchTusHttpError = {
107
+ data: Errors;
108
+ headers: Headers;
109
+ status: number;
110
+ };
111
+ /**
112
+ * This endpoint is used to retrieve a temporary content file. It returns a valid (`200 OK`) in case the file exists and the user is authorized to view the contents. It returns a `410 Gone` if the file has expired and `404 Not Found` if the criteria is not met.
113
+ * @param id The temporary contents ID.
114
+ * @param query an object with query parameters
115
+ * @throws DownloadTempFileHttpError
116
+ */
117
+ declare const downloadTempFile: (id: string, query: {
118
+ /** Set to "1" to download the file in inline mode. Useful for displaying a preview of the file in a browser. */
119
+ inline?: string;
120
+ }, options?: ApiCallOptions) => Promise<DownloadTempFileHttpResponse>;
121
+ type DownloadTempFile200HttpResponse = {
122
+ data: unknown;
123
+ headers: Headers;
124
+ status: 200;
125
+ };
126
+ type DownloadTempFile204HttpResponse = {
127
+ data: void;
128
+ headers: Headers;
129
+ status: 204;
130
+ };
131
+ type DownloadTempFile206HttpResponse = {
132
+ data: unknown;
133
+ headers: Headers;
134
+ status: 206;
135
+ };
136
+ type DownloadTempFileHttpResponse = DownloadTempFile200HttpResponse | DownloadTempFile204HttpResponse | DownloadTempFile206HttpResponse;
137
+ type DownloadTempFileHttpError = {
138
+ data: Errors;
139
+ headers: Headers;
140
+ status: number;
141
+ };
142
+ /**
143
+ * This endpoint is used to retrieve a summary of the metadata associated with a temporary content resource. It returns a `200 OK` with a model if the temporary resource is valid. It returns a `410 Gone` if the file has expired and `404 Not Found` if the criteria is not met.
144
+ * @param id The temporary contents ID.
145
+ * @throws GetTempFileDetailsHttpError
146
+ */
147
+ declare const getTempFileDetails: (id: string, options?: ApiCallOptions) => Promise<GetTempFileDetailsHttpResponse>;
148
+ type GetTempFileDetails200HttpResponse = {
149
+ data: DetailResponse;
150
+ headers: Headers;
151
+ status: 200;
152
+ };
153
+ type GetTempFileDetails204HttpResponse = {
154
+ data: void;
155
+ headers: Headers;
156
+ status: 204;
157
+ };
158
+ type GetTempFileDetailsHttpResponse = GetTempFileDetails200HttpResponse | GetTempFileDetails204HttpResponse;
159
+ type GetTempFileDetailsHttpError = {
160
+ data: Errors;
161
+ headers: Headers;
162
+ status: number;
163
+ };
164
+ /**
165
+ * Clears the cache for temp-contents api requests.
166
+ */
167
+ declare function clearCache(): void;
168
+ interface TempContentsAPI {
169
+ /**
170
+ * This endpoint is used to upload a file as a temporary content resource. It returns a `201 Created` with a location header that contains the location of the created resource. If filename or TTL is not properly set, a `400 Bad request` is returned. For internal issues, a `500 Internal Server Error` is returned.
171
+ * @param query an object with query parameters
172
+ * @param body an object with the body content
173
+ * @throws UploadTempFileHttpError
174
+ */
175
+ uploadTempFile: typeof uploadTempFile;
176
+ /**
177
+ * Request used to create a new upload resource.
178
+ * See [tus.io](http://tus.io) for details.
179
+ *
180
+ * @throws CreateTusHttpError
181
+ */
182
+ createTus: typeof createTus;
183
+ /**
184
+ * Request used to apply the bytes contained in the message at a given offset. Note that the tus server only
185
+ * accepts that the Content-Type response header is set to "application/offset+octet-stream".
186
+ * See [tus.io](http://tus.io) for details.
187
+ *
188
+ * Note that the server may return `423 Locked` on this request. This happens if the client attempts to perform
189
+ * concurrent access to the resource, for example, if attempting to do a `HEAD` request during an ongoing `PATCH` request.
190
+ * It can also occur in situations where the connection is unexpectedly dropped between the client and the server
191
+ * and the client attempts to make a new request when the server is still busy processing the upload. When this
192
+ * happens, the client shall, after some period of time, try to resume the upload again.
193
+ *
194
+ * @param id The ID used to uniquely identify the upload.
195
+ * @param body an object with the body content
196
+ * @throws PatchTusHttpError
197
+ */
198
+ patchTus: typeof patchTus;
199
+ /**
200
+ * This endpoint is used to retrieve a temporary content file. It returns a valid (`200 OK`) in case the file exists and the user is authorized to view the contents. It returns a `410 Gone` if the file has expired and `404 Not Found` if the criteria is not met.
201
+ * @param id The temporary contents ID.
202
+ * @param query an object with query parameters
203
+ * @throws DownloadTempFileHttpError
204
+ */
205
+ downloadTempFile: typeof downloadTempFile;
206
+ /**
207
+ * This endpoint is used to retrieve a summary of the metadata associated with a temporary content resource. It returns a `200 OK` with a model if the temporary resource is valid. It returns a `410 Gone` if the file has expired and `404 Not Found` if the criteria is not met.
208
+ * @param id The temporary contents ID.
209
+ * @throws GetTempFileDetailsHttpError
210
+ */
211
+ getTempFileDetails: typeof getTempFileDetails;
212
+ /**
213
+ * Clears the cache for temp-contents api requests.
214
+ */
215
+ clearCache: typeof clearCache;
216
+ }
217
+ /**
218
+ * Functions for the temp-contents api
219
+ */
220
+ declare const tempContentsExport: TempContentsAPI;
221
+
222
+ export { type CreateTusHttpError, type CreateTusHttpResponse, type DetailResponse, type DownloadTempFile200HttpResponse, type DownloadTempFile204HttpResponse, type DownloadTempFile206HttpResponse, type DownloadTempFileHttpError, type DownloadTempFileHttpResponse, type Error, type Errors, type GetTempFileDetails200HttpResponse, type GetTempFileDetails204HttpResponse, type GetTempFileDetailsHttpError, type GetTempFileDetailsHttpResponse, type PatchTusHttpError, type PatchTusHttpResponse, type TempContentsAPI, type UploadTempFileHttpError, type UploadTempFileHttpResponse, clearCache, createTus, tempContentsExport as default, downloadTempFile, getTempFileDetails, patchTus, uploadTempFile };
@@ -0,0 +1,222 @@
1
+ import { A as ApiCallOptions } from './global.types-hIvp-WdX.js';
2
+ import './auth-types-nnUcWhuU.js';
3
+
4
+ type Error = {
5
+ /** The API error code. */
6
+ code: string;
7
+ /** A human-readable problem description of the issue. */
8
+ detail?: string;
9
+ /** Additional properties and information regarding the issue. */
10
+ meta?: {
11
+ /** The error type. */
12
+ errorType?: string;
13
+ /** Locale */
14
+ locale?: string;
15
+ /** The source errors (stack trace). */
16
+ sourceErrors?: string;
17
+ };
18
+ /** Title of the type of API Error. */
19
+ title: string;
20
+ };
21
+ type Errors = {
22
+ errors?: Error[];
23
+ /** A way to trace the source of the error. */
24
+ traceId?: string;
25
+ };
26
+ type DetailResponse = {
27
+ /** Datetime-stamp when the resource was created (in UTC). */
28
+ CreatedAt?: string;
29
+ /** Identifier for the subject / resource creator. */
30
+ CreatorID?: string;
31
+ /** Datetime-stamp when the resource expired (in UTC). */
32
+ Expires?: string;
33
+ /** Identifier */
34
+ ID?: string;
35
+ /** File name of the file uploaded by the user. */
36
+ Name?: string;
37
+ /** Size of resource (in bytes). */
38
+ Size?: string;
39
+ /** Time-to-live in seconds. */
40
+ TTLSeconds?: number;
41
+ /** Datetime-stamp when the resource was updated (in UTC). */
42
+ UpdatedAt?: string;
43
+ };
44
+ /**
45
+ * This endpoint is used to upload a file as a temporary content resource. It returns a `201 Created` with a location header that contains the location of the created resource. If filename or TTL is not properly set, a `400 Bad request` is returned. For internal issues, a `500 Internal Server Error` is returned.
46
+ * @param query an object with query parameters
47
+ * @param body an object with the body content
48
+ * @throws UploadTempFileHttpError
49
+ */
50
+ declare const uploadTempFile: (query: {
51
+ /** The name of the file to upload. */
52
+ filename?: string;
53
+ /** The TTL parameter is used to define the time-to-live for the content resource in seconds.
54
+ // It defaults to one hour (3600) if no input is provided. Max TTL is 259200 (3 days).'
55
+ // */
56
+ ttl?: number;
57
+ }, body: unknown, options?: ApiCallOptions) => Promise<UploadTempFileHttpResponse>;
58
+ type UploadTempFileHttpResponse = {
59
+ data: void;
60
+ headers: Headers;
61
+ status: number;
62
+ };
63
+ type UploadTempFileHttpError = {
64
+ data: Errors;
65
+ headers: Headers;
66
+ status: number;
67
+ };
68
+ /**
69
+ * Request used to create a new upload resource.
70
+ * See [tus.io](http://tus.io) for details.
71
+ *
72
+ * @throws CreateTusHttpError
73
+ */
74
+ declare const createTus: (options?: ApiCallOptions) => Promise<CreateTusHttpResponse>;
75
+ type CreateTusHttpResponse = {
76
+ data: void;
77
+ headers: Headers;
78
+ status: number;
79
+ };
80
+ type CreateTusHttpError = {
81
+ data: Errors;
82
+ headers: Headers;
83
+ status: number;
84
+ };
85
+ /**
86
+ * Request used to apply the bytes contained in the message at a given offset. Note that the tus server only
87
+ * accepts that the Content-Type response header is set to "application/offset+octet-stream".
88
+ * See [tus.io](http://tus.io) for details.
89
+ *
90
+ * Note that the server may return `423 Locked` on this request. This happens if the client attempts to perform
91
+ * concurrent access to the resource, for example, if attempting to do a `HEAD` request during an ongoing `PATCH` request.
92
+ * It can also occur in situations where the connection is unexpectedly dropped between the client and the server
93
+ * and the client attempts to make a new request when the server is still busy processing the upload. When this
94
+ * happens, the client shall, after some period of time, try to resume the upload again.
95
+ *
96
+ * @param id The ID used to uniquely identify the upload.
97
+ * @param body an object with the body content
98
+ * @throws PatchTusHttpError
99
+ */
100
+ declare const patchTus: (id: string, body: unknown, options?: ApiCallOptions) => Promise<PatchTusHttpResponse>;
101
+ type PatchTusHttpResponse = {
102
+ data: void;
103
+ headers: Headers;
104
+ status: number;
105
+ };
106
+ type PatchTusHttpError = {
107
+ data: Errors;
108
+ headers: Headers;
109
+ status: number;
110
+ };
111
+ /**
112
+ * This endpoint is used to retrieve a temporary content file. It returns a valid (`200 OK`) in case the file exists and the user is authorized to view the contents. It returns a `410 Gone` if the file has expired and `404 Not Found` if the criteria is not met.
113
+ * @param id The temporary contents ID.
114
+ * @param query an object with query parameters
115
+ * @throws DownloadTempFileHttpError
116
+ */
117
+ declare const downloadTempFile: (id: string, query: {
118
+ /** Set to "1" to download the file in inline mode. Useful for displaying a preview of the file in a browser. */
119
+ inline?: string;
120
+ }, options?: ApiCallOptions) => Promise<DownloadTempFileHttpResponse>;
121
+ type DownloadTempFile200HttpResponse = {
122
+ data: unknown;
123
+ headers: Headers;
124
+ status: 200;
125
+ };
126
+ type DownloadTempFile204HttpResponse = {
127
+ data: void;
128
+ headers: Headers;
129
+ status: 204;
130
+ };
131
+ type DownloadTempFile206HttpResponse = {
132
+ data: unknown;
133
+ headers: Headers;
134
+ status: 206;
135
+ };
136
+ type DownloadTempFileHttpResponse = DownloadTempFile200HttpResponse | DownloadTempFile204HttpResponse | DownloadTempFile206HttpResponse;
137
+ type DownloadTempFileHttpError = {
138
+ data: Errors;
139
+ headers: Headers;
140
+ status: number;
141
+ };
142
+ /**
143
+ * This endpoint is used to retrieve a summary of the metadata associated with a temporary content resource. It returns a `200 OK` with a model if the temporary resource is valid. It returns a `410 Gone` if the file has expired and `404 Not Found` if the criteria is not met.
144
+ * @param id The temporary contents ID.
145
+ * @throws GetTempFileDetailsHttpError
146
+ */
147
+ declare const getTempFileDetails: (id: string, options?: ApiCallOptions) => Promise<GetTempFileDetailsHttpResponse>;
148
+ type GetTempFileDetails200HttpResponse = {
149
+ data: DetailResponse;
150
+ headers: Headers;
151
+ status: 200;
152
+ };
153
+ type GetTempFileDetails204HttpResponse = {
154
+ data: void;
155
+ headers: Headers;
156
+ status: 204;
157
+ };
158
+ type GetTempFileDetailsHttpResponse = GetTempFileDetails200HttpResponse | GetTempFileDetails204HttpResponse;
159
+ type GetTempFileDetailsHttpError = {
160
+ data: Errors;
161
+ headers: Headers;
162
+ status: number;
163
+ };
164
+ /**
165
+ * Clears the cache for temp-contents api requests.
166
+ */
167
+ declare function clearCache(): void;
168
+ interface TempContentsAPI {
169
+ /**
170
+ * This endpoint is used to upload a file as a temporary content resource. It returns a `201 Created` with a location header that contains the location of the created resource. If filename or TTL is not properly set, a `400 Bad request` is returned. For internal issues, a `500 Internal Server Error` is returned.
171
+ * @param query an object with query parameters
172
+ * @param body an object with the body content
173
+ * @throws UploadTempFileHttpError
174
+ */
175
+ uploadTempFile: typeof uploadTempFile;
176
+ /**
177
+ * Request used to create a new upload resource.
178
+ * See [tus.io](http://tus.io) for details.
179
+ *
180
+ * @throws CreateTusHttpError
181
+ */
182
+ createTus: typeof createTus;
183
+ /**
184
+ * Request used to apply the bytes contained in the message at a given offset. Note that the tus server only
185
+ * accepts that the Content-Type response header is set to "application/offset+octet-stream".
186
+ * See [tus.io](http://tus.io) for details.
187
+ *
188
+ * Note that the server may return `423 Locked` on this request. This happens if the client attempts to perform
189
+ * concurrent access to the resource, for example, if attempting to do a `HEAD` request during an ongoing `PATCH` request.
190
+ * It can also occur in situations where the connection is unexpectedly dropped between the client and the server
191
+ * and the client attempts to make a new request when the server is still busy processing the upload. When this
192
+ * happens, the client shall, after some period of time, try to resume the upload again.
193
+ *
194
+ * @param id The ID used to uniquely identify the upload.
195
+ * @param body an object with the body content
196
+ * @throws PatchTusHttpError
197
+ */
198
+ patchTus: typeof patchTus;
199
+ /**
200
+ * This endpoint is used to retrieve a temporary content file. It returns a valid (`200 OK`) in case the file exists and the user is authorized to view the contents. It returns a `410 Gone` if the file has expired and `404 Not Found` if the criteria is not met.
201
+ * @param id The temporary contents ID.
202
+ * @param query an object with query parameters
203
+ * @throws DownloadTempFileHttpError
204
+ */
205
+ downloadTempFile: typeof downloadTempFile;
206
+ /**
207
+ * This endpoint is used to retrieve a summary of the metadata associated with a temporary content resource. It returns a `200 OK` with a model if the temporary resource is valid. It returns a `410 Gone` if the file has expired and `404 Not Found` if the criteria is not met.
208
+ * @param id The temporary contents ID.
209
+ * @throws GetTempFileDetailsHttpError
210
+ */
211
+ getTempFileDetails: typeof getTempFileDetails;
212
+ /**
213
+ * Clears the cache for temp-contents api requests.
214
+ */
215
+ clearCache: typeof clearCache;
216
+ }
217
+ /**
218
+ * Functions for the temp-contents api
219
+ */
220
+ declare const tempContentsExport: TempContentsAPI;
221
+
222
+ export { type CreateTusHttpError, type CreateTusHttpResponse, type DetailResponse, type DownloadTempFile200HttpResponse, type DownloadTempFile204HttpResponse, type DownloadTempFile206HttpResponse, type DownloadTempFileHttpError, type DownloadTempFileHttpResponse, type Error, type Errors, type GetTempFileDetails200HttpResponse, type GetTempFileDetails204HttpResponse, type GetTempFileDetailsHttpError, type GetTempFileDetailsHttpResponse, type PatchTusHttpError, type PatchTusHttpResponse, type TempContentsAPI, type UploadTempFileHttpError, type UploadTempFileHttpResponse, clearCache, createTus, tempContentsExport as default, downloadTempFile, getTempFileDetails, patchTus, uploadTempFile };
@@ -0,0 +1,60 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+
4
+ var _chunkOULT3V2Ujs = require('./chunk-OULT3V2U.js');
5
+ require('./chunk-ZT4C7KCQ.js');
6
+
7
+ // src/public/rest/temp-contents.ts
8
+ var uploadTempFile = async (query, body, options) => _chunkOULT3V2Ujs.invokeFetch.call(void 0, "temp-contents", {
9
+ method: "post",
10
+ pathTemplate: "/api/v1/temp-contents",
11
+ query,
12
+ body,
13
+ options
14
+ });
15
+ var createTus = async (options) => _chunkOULT3V2Ujs.invokeFetch.call(void 0, "temp-contents", {
16
+ method: "post",
17
+ pathTemplate: "/api/v1/temp-contents/files",
18
+ options
19
+ });
20
+ var patchTus = async (id, body, options) => _chunkOULT3V2Ujs.invokeFetch.call(void 0, "temp-contents", {
21
+ method: "patch",
22
+ pathTemplate: "/api/v1/temp-contents/files/{id}",
23
+ pathVariables: { id },
24
+ body,
25
+ options
26
+ });
27
+ var downloadTempFile = async (id, query, options) => _chunkOULT3V2Ujs.invokeFetch.call(void 0, "temp-contents", {
28
+ method: "get",
29
+ pathTemplate: "/api/v1/temp-contents/{id}",
30
+ pathVariables: { id },
31
+ query,
32
+ options
33
+ });
34
+ var getTempFileDetails = async (id, options) => _chunkOULT3V2Ujs.invokeFetch.call(void 0, "temp-contents", {
35
+ method: "get",
36
+ pathTemplate: "/api/v1/temp-contents/{id}/details",
37
+ pathVariables: { id },
38
+ options
39
+ });
40
+ function clearCache() {
41
+ return _chunkOULT3V2Ujs.clearApiCache.call(void 0, "temp-contents");
42
+ }
43
+ var tempContentsExport = {
44
+ uploadTempFile,
45
+ createTus,
46
+ patchTus,
47
+ downloadTempFile,
48
+ getTempFileDetails,
49
+ clearCache
50
+ };
51
+ var temp_contents_default = tempContentsExport;
52
+
53
+
54
+
55
+
56
+
57
+
58
+
59
+
60
+ exports.clearCache = clearCache; exports.createTus = createTus; exports.default = temp_contents_default; exports.downloadTempFile = downloadTempFile; exports.getTempFileDetails = getTempFileDetails; exports.patchTus = patchTus; exports.uploadTempFile = uploadTempFile;
@@ -0,0 +1,60 @@
1
+ import {
2
+ clearApiCache,
3
+ invokeFetch
4
+ } from "./chunk-3YE7EI7I.mjs";
5
+ import "./chunk-WM7FQU2U.mjs";
6
+
7
+ // src/public/rest/temp-contents.ts
8
+ var uploadTempFile = async (query, body, options) => invokeFetch("temp-contents", {
9
+ method: "post",
10
+ pathTemplate: "/api/v1/temp-contents",
11
+ query,
12
+ body,
13
+ options
14
+ });
15
+ var createTus = async (options) => invokeFetch("temp-contents", {
16
+ method: "post",
17
+ pathTemplate: "/api/v1/temp-contents/files",
18
+ options
19
+ });
20
+ var patchTus = async (id, body, options) => invokeFetch("temp-contents", {
21
+ method: "patch",
22
+ pathTemplate: "/api/v1/temp-contents/files/{id}",
23
+ pathVariables: { id },
24
+ body,
25
+ options
26
+ });
27
+ var downloadTempFile = async (id, query, options) => invokeFetch("temp-contents", {
28
+ method: "get",
29
+ pathTemplate: "/api/v1/temp-contents/{id}",
30
+ pathVariables: { id },
31
+ query,
32
+ options
33
+ });
34
+ var getTempFileDetails = async (id, options) => invokeFetch("temp-contents", {
35
+ method: "get",
36
+ pathTemplate: "/api/v1/temp-contents/{id}/details",
37
+ pathVariables: { id },
38
+ options
39
+ });
40
+ function clearCache() {
41
+ return clearApiCache("temp-contents");
42
+ }
43
+ var tempContentsExport = {
44
+ uploadTempFile,
45
+ createTus,
46
+ patchTus,
47
+ downloadTempFile,
48
+ getTempFileDetails,
49
+ clearCache
50
+ };
51
+ var temp_contents_default = tempContentsExport;
52
+ export {
53
+ clearCache,
54
+ createTus,
55
+ temp_contents_default as default,
56
+ downloadTempFile,
57
+ getTempFileDetails,
58
+ patchTus,
59
+ uploadTempFile
60
+ };