@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
@@ -0,0 +1,100 @@
1
+ import {
2
+ clearApiCache,
3
+ invokeFetch
4
+ } from "./chunk-3YE7EI7I.mjs";
5
+ import "./chunk-WM7FQU2U.mjs";
6
+
7
+ // src/public/rest/collections.ts
8
+ var getCollections = async (query, options) => invokeFetch("collections", {
9
+ method: "get",
10
+ pathTemplate: "/api/v1/collections",
11
+ query,
12
+ options
13
+ });
14
+ var createCollection = async (body, options) => invokeFetch("collections", {
15
+ method: "post",
16
+ pathTemplate: "/api/v1/collections",
17
+ body,
18
+ options
19
+ });
20
+ var getFavoritesCollection = async (options) => invokeFetch("collections", {
21
+ method: "get",
22
+ pathTemplate: "/api/v1/collections/favorites",
23
+ options
24
+ });
25
+ var deleteCollection = async (collectionId, options) => invokeFetch("collections", {
26
+ method: "delete",
27
+ pathTemplate: "/api/v1/collections/{collectionId}",
28
+ pathVariables: { collectionId },
29
+ options
30
+ });
31
+ var getCollection = async (collectionId, options) => invokeFetch("collections", {
32
+ method: "get",
33
+ pathTemplate: "/api/v1/collections/{collectionId}",
34
+ pathVariables: { collectionId },
35
+ options
36
+ });
37
+ var updateCollection = async (collectionId, body, options) => invokeFetch("collections", {
38
+ method: "put",
39
+ pathTemplate: "/api/v1/collections/{collectionId}",
40
+ pathVariables: { collectionId },
41
+ body,
42
+ options
43
+ });
44
+ var getCollectionItems = async (collectionId, query, options) => invokeFetch("collections", {
45
+ method: "get",
46
+ pathTemplate: "/api/v1/collections/{collectionId}/items",
47
+ pathVariables: { collectionId },
48
+ query,
49
+ options
50
+ });
51
+ var addCollectionItem = async (collectionId, body, options) => invokeFetch("collections", {
52
+ method: "post",
53
+ pathTemplate: "/api/v1/collections/{collectionId}/items",
54
+ pathVariables: { collectionId },
55
+ body,
56
+ options
57
+ });
58
+ var deleteCollectionItem = async (collectionId, itemId, options) => invokeFetch("collections", {
59
+ method: "delete",
60
+ pathTemplate: "/api/v1/collections/{collectionId}/items/{itemId}",
61
+ pathVariables: { collectionId, itemId },
62
+ options
63
+ });
64
+ var getCollectionItem = async (collectionId, itemId, options) => invokeFetch("collections", {
65
+ method: "get",
66
+ pathTemplate: "/api/v1/collections/{collectionId}/items/{itemId}",
67
+ pathVariables: { collectionId, itemId },
68
+ options
69
+ });
70
+ function clearCache() {
71
+ return clearApiCache("collections");
72
+ }
73
+ var collectionsExport = {
74
+ getCollections,
75
+ createCollection,
76
+ getFavoritesCollection,
77
+ deleteCollection,
78
+ getCollection,
79
+ updateCollection,
80
+ getCollectionItems,
81
+ addCollectionItem,
82
+ deleteCollectionItem,
83
+ getCollectionItem,
84
+ clearCache
85
+ };
86
+ var collections_default = collectionsExport;
87
+ export {
88
+ addCollectionItem,
89
+ clearCache,
90
+ createCollection,
91
+ collections_default as default,
92
+ deleteCollection,
93
+ deleteCollectionItem,
94
+ getCollection,
95
+ getCollectionItem,
96
+ getCollectionItems,
97
+ getCollections,
98
+ getFavoritesCollection,
99
+ updateCollection
100
+ };
@@ -0,0 +1,258 @@
1
+ import { A as ApiCallOptions } from './global.types-Eto4uYwy.mjs';
2
+ import './auth-types-nnUcWhuU.mjs';
3
+
4
+ type CSPEntry = CSPEntryContent;
5
+ type CSPEntryContent = {
6
+ /** Defines the valid sources for loading web workers and nested browsing contexts using elements such as frame and iFrame. */
7
+ childSrc?: boolean;
8
+ /** Restricts the URLs that can be loaded using script interfaces. */
9
+ connectSrc?: boolean;
10
+ /** Restricts the URLs that can be connected to websockets (all sources will be prefixed with 'wss://'). */
11
+ connectSrcWSS?: boolean;
12
+ /** The UTC timestamp when the CSP entry was created. */
13
+ readonly createdDate?: string;
14
+ /** The reason for adding this origin to the Content Security Policy. */
15
+ description?: string;
16
+ /** Specifies valid sources for loading fonts. */
17
+ fontSrc?: boolean;
18
+ /** Allow forms to be submitted to the origin. */
19
+ formAction?: boolean;
20
+ /** Specifies valid sources for embedding the resource using frame, iFrame, object, embed and applet. */
21
+ frameAncestors?: boolean;
22
+ /** Specifies valid sources for loading nested browsing contexts using elements such as frame and iFrame. */
23
+ frameSrc?: boolean;
24
+ /** Specifies valid sources of images and favicons. */
25
+ imgSrc?: boolean;
26
+ /** Specifies valid sources for loading media using the audio and video elements. */
27
+ mediaSrc?: boolean;
28
+ /** The UTC timestamp when the CSP entry was last modified. */
29
+ readonly modifiedDate?: string;
30
+ /** The name for this entry. */
31
+ name?: string;
32
+ /** Specifies valid sources for the object, embed, and applet elements. */
33
+ objectSrc?: boolean;
34
+ /** The origin that the CSP directives should be applied to. */
35
+ origin: string;
36
+ /** Specifies valid sources for JavaScript. */
37
+ scriptSrc?: boolean;
38
+ /** Specifies valid sources for stylesheets. */
39
+ styleSrc?: boolean;
40
+ /** Specifies valid sources for Worker, SharedWorker, or ServiceWorker scripts. */
41
+ workerSrc?: boolean;
42
+ };
43
+ type CSPEntryList = {
44
+ data?: CSPEntry[];
45
+ links?: {
46
+ next?: Link;
47
+ prev?: Link;
48
+ self?: Link;
49
+ };
50
+ };
51
+ type CSPHeader = {
52
+ /** The compiled CSP header. */
53
+ "Content-Security-Policy"?: string;
54
+ };
55
+ type Error = {
56
+ /** The unique code for the error. */
57
+ code: string;
58
+ /** May be used to provide additional details. */
59
+ detail?: string;
60
+ /** A summary of what went wrong. */
61
+ title: string;
62
+ };
63
+ type ErrorResponse = {
64
+ errors?: Error[];
65
+ };
66
+ type Link = {
67
+ /** URL to a resource request. */
68
+ href: string;
69
+ };
70
+ /**
71
+ * Retrieves all CSP entries for a tenant
72
+ * @param query an object with query parameters
73
+ * @throws GetCSPEntriesHttpError
74
+ */
75
+ declare const getCSPEntries: (query: {
76
+ /** Filter resources by directive 'childSrc', true/false. */
77
+ childSrc?: boolean;
78
+ /** Filter resources by directive 'connectSrc', true/false. */
79
+ connectSrc?: boolean;
80
+ /** Filter resources by directive 'connectSrcWSS', true/false. */
81
+ connectSrcWSS?: boolean;
82
+ /** Filter resources by directive 'fontSrc', true/false. */
83
+ fontSrc?: boolean;
84
+ /** Filter resources by directive 'formAction', true/false. */
85
+ formAction?: boolean;
86
+ /** Filter resources by directive 'frameAncestors', true/false. */
87
+ frameAncestors?: boolean;
88
+ /** Filter resources by directive 'frameSrc', true/false. */
89
+ frameSrc?: boolean;
90
+ /** Filter resources by directive 'imgSrc', true/false. */
91
+ imgSrc?: boolean;
92
+ /** Maximum number of CSP-Origins to retrieve. */
93
+ limit?: number;
94
+ /** Filter resources by directive 'mediaSrc', true/false. */
95
+ mediaSrc?: boolean;
96
+ /** Filter resources by name (wildcard and case insensitive). */
97
+ name?: string;
98
+ /** Cursor to the next page. */
99
+ next?: string;
100
+ /** Filter resources by directive 'objectSrc', true/false. */
101
+ objectSrc?: boolean;
102
+ /** Filter resources by origin (wildcard and case insensitive). */
103
+ origin?: string;
104
+ /** Cursor to previous next page. */
105
+ prev?: string;
106
+ /** Filter resources by directive 'scriptSrc', true/false. */
107
+ scriptSrc?: boolean;
108
+ /** Field to sort by, prefix with -/+ to indicate order. */
109
+ sort?: "name" | "-name" | "origin" | "-origin" | "createdDate" | "-createdDate" | "modifiedDate" | "-modifiedDate";
110
+ /** Filter resources by directive 'styleSrc', true/false. */
111
+ styleSrc?: boolean;
112
+ /** Filter resources by directive 'workerSrc', true/false. */
113
+ workerSrc?: boolean;
114
+ }, options?: ApiCallOptions) => Promise<GetCSPEntriesHttpResponse>;
115
+ type GetCSPEntriesHttpResponse = {
116
+ data: CSPEntryList;
117
+ headers: Headers;
118
+ status: number;
119
+ prev?: (options?: ApiCallOptions) => Promise<GetCSPEntriesHttpResponse>;
120
+ next?: (options?: ApiCallOptions) => Promise<GetCSPEntriesHttpResponse>;
121
+ };
122
+ type GetCSPEntriesHttpError = {
123
+ data: ErrorResponse;
124
+ headers: Headers;
125
+ status: number;
126
+ };
127
+ /**
128
+ * Creates a new CSP entry
129
+ * @param body an object with the body content
130
+ * @throws CreateCSPEntryHttpError
131
+ */
132
+ declare const createCSPEntry: (body: CSPEntryContent, options?: ApiCallOptions) => Promise<CreateCSPEntryHttpResponse>;
133
+ type CreateCSPEntryHttpResponse = {
134
+ data: CSPEntry;
135
+ headers: Headers;
136
+ status: number;
137
+ };
138
+ type CreateCSPEntryHttpError = {
139
+ data: ErrorResponse;
140
+ headers: Headers;
141
+ status: number;
142
+ };
143
+ /**
144
+ * Retrieves the CSP header for a tenant
145
+ * @throws GetCSPHeaderHttpError
146
+ */
147
+ declare const getCSPHeader: (options?: ApiCallOptions) => Promise<GetCSPHeaderHttpResponse>;
148
+ type GetCSPHeaderHttpResponse = {
149
+ data: CSPHeader;
150
+ headers: Headers;
151
+ status: number;
152
+ };
153
+ type GetCSPHeaderHttpError = {
154
+ data: ErrorResponse;
155
+ headers: Headers;
156
+ status: number;
157
+ };
158
+ /**
159
+ * Deletes a specific CSP entry
160
+ * @param id The CSP entry's unique identifier.
161
+ * @throws DeleteCSPEntryHttpError
162
+ */
163
+ declare const deleteCSPEntry: (id: string, options?: ApiCallOptions) => Promise<DeleteCSPEntryHttpResponse>;
164
+ type DeleteCSPEntryHttpResponse = {
165
+ data: void;
166
+ headers: Headers;
167
+ status: number;
168
+ };
169
+ type DeleteCSPEntryHttpError = {
170
+ data: ErrorResponse;
171
+ headers: Headers;
172
+ status: number;
173
+ };
174
+ /**
175
+ * Returns details for a specific CSP entry
176
+ * @param id The CSP entry's unique identifier.
177
+ * @throws GetCSPEntryHttpError
178
+ */
179
+ declare const getCSPEntry: (id: string, options?: ApiCallOptions) => Promise<GetCSPEntryHttpResponse>;
180
+ type GetCSPEntryHttpResponse = {
181
+ data: CSPEntry;
182
+ headers: Headers;
183
+ status: number;
184
+ };
185
+ type GetCSPEntryHttpError = {
186
+ data: ErrorResponse;
187
+ headers: Headers;
188
+ status: number;
189
+ };
190
+ /**
191
+ * Updates a CSP entry
192
+ * @param id The CSP entry's unique identifier.
193
+ * @param body an object with the body content
194
+ * @throws UpdateCSPEntryHttpError
195
+ */
196
+ declare const updateCSPEntry: (id: string, body: CSPEntryContent, options?: ApiCallOptions) => Promise<UpdateCSPEntryHttpResponse>;
197
+ type UpdateCSPEntryHttpResponse = {
198
+ data: CSPEntry;
199
+ headers: Headers;
200
+ status: number;
201
+ };
202
+ type UpdateCSPEntryHttpError = {
203
+ data: ErrorResponse;
204
+ headers: Headers;
205
+ status: number;
206
+ };
207
+ /**
208
+ * Clears the cache for csp-origins api requests.
209
+ */
210
+ declare function clearCache(): void;
211
+ interface CspOriginsAPI {
212
+ /**
213
+ * Retrieves all CSP entries for a tenant
214
+ * @param query an object with query parameters
215
+ * @throws GetCSPEntriesHttpError
216
+ */
217
+ getCSPEntries: typeof getCSPEntries;
218
+ /**
219
+ * Creates a new CSP entry
220
+ * @param body an object with the body content
221
+ * @throws CreateCSPEntryHttpError
222
+ */
223
+ createCSPEntry: typeof createCSPEntry;
224
+ /**
225
+ * Retrieves the CSP header for a tenant
226
+ * @throws GetCSPHeaderHttpError
227
+ */
228
+ getCSPHeader: typeof getCSPHeader;
229
+ /**
230
+ * Deletes a specific CSP entry
231
+ * @param id The CSP entry's unique identifier.
232
+ * @throws DeleteCSPEntryHttpError
233
+ */
234
+ deleteCSPEntry: typeof deleteCSPEntry;
235
+ /**
236
+ * Returns details for a specific CSP entry
237
+ * @param id The CSP entry's unique identifier.
238
+ * @throws GetCSPEntryHttpError
239
+ */
240
+ getCSPEntry: typeof getCSPEntry;
241
+ /**
242
+ * Updates a CSP entry
243
+ * @param id The CSP entry's unique identifier.
244
+ * @param body an object with the body content
245
+ * @throws UpdateCSPEntryHttpError
246
+ */
247
+ updateCSPEntry: typeof updateCSPEntry;
248
+ /**
249
+ * Clears the cache for csp-origins api requests.
250
+ */
251
+ clearCache: typeof clearCache;
252
+ }
253
+ /**
254
+ * Functions for the csp-origins api
255
+ */
256
+ declare const cspOriginsExport: CspOriginsAPI;
257
+
258
+ export { type CSPEntry, type CSPEntryContent, type CSPEntryList, type CSPHeader, type CreateCSPEntryHttpError, type CreateCSPEntryHttpResponse, type CspOriginsAPI, type DeleteCSPEntryHttpError, type DeleteCSPEntryHttpResponse, type Error, type ErrorResponse, type GetCSPEntriesHttpError, type GetCSPEntriesHttpResponse, type GetCSPEntryHttpError, type GetCSPEntryHttpResponse, type GetCSPHeaderHttpError, type GetCSPHeaderHttpResponse, type Link, type UpdateCSPEntryHttpError, type UpdateCSPEntryHttpResponse, clearCache, createCSPEntry, cspOriginsExport as default, deleteCSPEntry, getCSPEntries, getCSPEntry, getCSPHeader, updateCSPEntry };
@@ -0,0 +1,258 @@
1
+ import { A as ApiCallOptions } from './global.types-hIvp-WdX.js';
2
+ import './auth-types-nnUcWhuU.js';
3
+
4
+ type CSPEntry = CSPEntryContent;
5
+ type CSPEntryContent = {
6
+ /** Defines the valid sources for loading web workers and nested browsing contexts using elements such as frame and iFrame. */
7
+ childSrc?: boolean;
8
+ /** Restricts the URLs that can be loaded using script interfaces. */
9
+ connectSrc?: boolean;
10
+ /** Restricts the URLs that can be connected to websockets (all sources will be prefixed with 'wss://'). */
11
+ connectSrcWSS?: boolean;
12
+ /** The UTC timestamp when the CSP entry was created. */
13
+ readonly createdDate?: string;
14
+ /** The reason for adding this origin to the Content Security Policy. */
15
+ description?: string;
16
+ /** Specifies valid sources for loading fonts. */
17
+ fontSrc?: boolean;
18
+ /** Allow forms to be submitted to the origin. */
19
+ formAction?: boolean;
20
+ /** Specifies valid sources for embedding the resource using frame, iFrame, object, embed and applet. */
21
+ frameAncestors?: boolean;
22
+ /** Specifies valid sources for loading nested browsing contexts using elements such as frame and iFrame. */
23
+ frameSrc?: boolean;
24
+ /** Specifies valid sources of images and favicons. */
25
+ imgSrc?: boolean;
26
+ /** Specifies valid sources for loading media using the audio and video elements. */
27
+ mediaSrc?: boolean;
28
+ /** The UTC timestamp when the CSP entry was last modified. */
29
+ readonly modifiedDate?: string;
30
+ /** The name for this entry. */
31
+ name?: string;
32
+ /** Specifies valid sources for the object, embed, and applet elements. */
33
+ objectSrc?: boolean;
34
+ /** The origin that the CSP directives should be applied to. */
35
+ origin: string;
36
+ /** Specifies valid sources for JavaScript. */
37
+ scriptSrc?: boolean;
38
+ /** Specifies valid sources for stylesheets. */
39
+ styleSrc?: boolean;
40
+ /** Specifies valid sources for Worker, SharedWorker, or ServiceWorker scripts. */
41
+ workerSrc?: boolean;
42
+ };
43
+ type CSPEntryList = {
44
+ data?: CSPEntry[];
45
+ links?: {
46
+ next?: Link;
47
+ prev?: Link;
48
+ self?: Link;
49
+ };
50
+ };
51
+ type CSPHeader = {
52
+ /** The compiled CSP header. */
53
+ "Content-Security-Policy"?: string;
54
+ };
55
+ type Error = {
56
+ /** The unique code for the error. */
57
+ code: string;
58
+ /** May be used to provide additional details. */
59
+ detail?: string;
60
+ /** A summary of what went wrong. */
61
+ title: string;
62
+ };
63
+ type ErrorResponse = {
64
+ errors?: Error[];
65
+ };
66
+ type Link = {
67
+ /** URL to a resource request. */
68
+ href: string;
69
+ };
70
+ /**
71
+ * Retrieves all CSP entries for a tenant
72
+ * @param query an object with query parameters
73
+ * @throws GetCSPEntriesHttpError
74
+ */
75
+ declare const getCSPEntries: (query: {
76
+ /** Filter resources by directive 'childSrc', true/false. */
77
+ childSrc?: boolean;
78
+ /** Filter resources by directive 'connectSrc', true/false. */
79
+ connectSrc?: boolean;
80
+ /** Filter resources by directive 'connectSrcWSS', true/false. */
81
+ connectSrcWSS?: boolean;
82
+ /** Filter resources by directive 'fontSrc', true/false. */
83
+ fontSrc?: boolean;
84
+ /** Filter resources by directive 'formAction', true/false. */
85
+ formAction?: boolean;
86
+ /** Filter resources by directive 'frameAncestors', true/false. */
87
+ frameAncestors?: boolean;
88
+ /** Filter resources by directive 'frameSrc', true/false. */
89
+ frameSrc?: boolean;
90
+ /** Filter resources by directive 'imgSrc', true/false. */
91
+ imgSrc?: boolean;
92
+ /** Maximum number of CSP-Origins to retrieve. */
93
+ limit?: number;
94
+ /** Filter resources by directive 'mediaSrc', true/false. */
95
+ mediaSrc?: boolean;
96
+ /** Filter resources by name (wildcard and case insensitive). */
97
+ name?: string;
98
+ /** Cursor to the next page. */
99
+ next?: string;
100
+ /** Filter resources by directive 'objectSrc', true/false. */
101
+ objectSrc?: boolean;
102
+ /** Filter resources by origin (wildcard and case insensitive). */
103
+ origin?: string;
104
+ /** Cursor to previous next page. */
105
+ prev?: string;
106
+ /** Filter resources by directive 'scriptSrc', true/false. */
107
+ scriptSrc?: boolean;
108
+ /** Field to sort by, prefix with -/+ to indicate order. */
109
+ sort?: "name" | "-name" | "origin" | "-origin" | "createdDate" | "-createdDate" | "modifiedDate" | "-modifiedDate";
110
+ /** Filter resources by directive 'styleSrc', true/false. */
111
+ styleSrc?: boolean;
112
+ /** Filter resources by directive 'workerSrc', true/false. */
113
+ workerSrc?: boolean;
114
+ }, options?: ApiCallOptions) => Promise<GetCSPEntriesHttpResponse>;
115
+ type GetCSPEntriesHttpResponse = {
116
+ data: CSPEntryList;
117
+ headers: Headers;
118
+ status: number;
119
+ prev?: (options?: ApiCallOptions) => Promise<GetCSPEntriesHttpResponse>;
120
+ next?: (options?: ApiCallOptions) => Promise<GetCSPEntriesHttpResponse>;
121
+ };
122
+ type GetCSPEntriesHttpError = {
123
+ data: ErrorResponse;
124
+ headers: Headers;
125
+ status: number;
126
+ };
127
+ /**
128
+ * Creates a new CSP entry
129
+ * @param body an object with the body content
130
+ * @throws CreateCSPEntryHttpError
131
+ */
132
+ declare const createCSPEntry: (body: CSPEntryContent, options?: ApiCallOptions) => Promise<CreateCSPEntryHttpResponse>;
133
+ type CreateCSPEntryHttpResponse = {
134
+ data: CSPEntry;
135
+ headers: Headers;
136
+ status: number;
137
+ };
138
+ type CreateCSPEntryHttpError = {
139
+ data: ErrorResponse;
140
+ headers: Headers;
141
+ status: number;
142
+ };
143
+ /**
144
+ * Retrieves the CSP header for a tenant
145
+ * @throws GetCSPHeaderHttpError
146
+ */
147
+ declare const getCSPHeader: (options?: ApiCallOptions) => Promise<GetCSPHeaderHttpResponse>;
148
+ type GetCSPHeaderHttpResponse = {
149
+ data: CSPHeader;
150
+ headers: Headers;
151
+ status: number;
152
+ };
153
+ type GetCSPHeaderHttpError = {
154
+ data: ErrorResponse;
155
+ headers: Headers;
156
+ status: number;
157
+ };
158
+ /**
159
+ * Deletes a specific CSP entry
160
+ * @param id The CSP entry's unique identifier.
161
+ * @throws DeleteCSPEntryHttpError
162
+ */
163
+ declare const deleteCSPEntry: (id: string, options?: ApiCallOptions) => Promise<DeleteCSPEntryHttpResponse>;
164
+ type DeleteCSPEntryHttpResponse = {
165
+ data: void;
166
+ headers: Headers;
167
+ status: number;
168
+ };
169
+ type DeleteCSPEntryHttpError = {
170
+ data: ErrorResponse;
171
+ headers: Headers;
172
+ status: number;
173
+ };
174
+ /**
175
+ * Returns details for a specific CSP entry
176
+ * @param id The CSP entry's unique identifier.
177
+ * @throws GetCSPEntryHttpError
178
+ */
179
+ declare const getCSPEntry: (id: string, options?: ApiCallOptions) => Promise<GetCSPEntryHttpResponse>;
180
+ type GetCSPEntryHttpResponse = {
181
+ data: CSPEntry;
182
+ headers: Headers;
183
+ status: number;
184
+ };
185
+ type GetCSPEntryHttpError = {
186
+ data: ErrorResponse;
187
+ headers: Headers;
188
+ status: number;
189
+ };
190
+ /**
191
+ * Updates a CSP entry
192
+ * @param id The CSP entry's unique identifier.
193
+ * @param body an object with the body content
194
+ * @throws UpdateCSPEntryHttpError
195
+ */
196
+ declare const updateCSPEntry: (id: string, body: CSPEntryContent, options?: ApiCallOptions) => Promise<UpdateCSPEntryHttpResponse>;
197
+ type UpdateCSPEntryHttpResponse = {
198
+ data: CSPEntry;
199
+ headers: Headers;
200
+ status: number;
201
+ };
202
+ type UpdateCSPEntryHttpError = {
203
+ data: ErrorResponse;
204
+ headers: Headers;
205
+ status: number;
206
+ };
207
+ /**
208
+ * Clears the cache for csp-origins api requests.
209
+ */
210
+ declare function clearCache(): void;
211
+ interface CspOriginsAPI {
212
+ /**
213
+ * Retrieves all CSP entries for a tenant
214
+ * @param query an object with query parameters
215
+ * @throws GetCSPEntriesHttpError
216
+ */
217
+ getCSPEntries: typeof getCSPEntries;
218
+ /**
219
+ * Creates a new CSP entry
220
+ * @param body an object with the body content
221
+ * @throws CreateCSPEntryHttpError
222
+ */
223
+ createCSPEntry: typeof createCSPEntry;
224
+ /**
225
+ * Retrieves the CSP header for a tenant
226
+ * @throws GetCSPHeaderHttpError
227
+ */
228
+ getCSPHeader: typeof getCSPHeader;
229
+ /**
230
+ * Deletes a specific CSP entry
231
+ * @param id The CSP entry's unique identifier.
232
+ * @throws DeleteCSPEntryHttpError
233
+ */
234
+ deleteCSPEntry: typeof deleteCSPEntry;
235
+ /**
236
+ * Returns details for a specific CSP entry
237
+ * @param id The CSP entry's unique identifier.
238
+ * @throws GetCSPEntryHttpError
239
+ */
240
+ getCSPEntry: typeof getCSPEntry;
241
+ /**
242
+ * Updates a CSP entry
243
+ * @param id The CSP entry's unique identifier.
244
+ * @param body an object with the body content
245
+ * @throws UpdateCSPEntryHttpError
246
+ */
247
+ updateCSPEntry: typeof updateCSPEntry;
248
+ /**
249
+ * Clears the cache for csp-origins api requests.
250
+ */
251
+ clearCache: typeof clearCache;
252
+ }
253
+ /**
254
+ * Functions for the csp-origins api
255
+ */
256
+ declare const cspOriginsExport: CspOriginsAPI;
257
+
258
+ export { type CSPEntry, type CSPEntryContent, type CSPEntryList, type CSPHeader, type CreateCSPEntryHttpError, type CreateCSPEntryHttpResponse, type CspOriginsAPI, type DeleteCSPEntryHttpError, type DeleteCSPEntryHttpResponse, type Error, type ErrorResponse, type GetCSPEntriesHttpError, type GetCSPEntriesHttpResponse, type GetCSPEntryHttpError, type GetCSPEntryHttpResponse, type GetCSPHeaderHttpError, type GetCSPHeaderHttpResponse, type Link, type UpdateCSPEntryHttpError, type UpdateCSPEntryHttpResponse, clearCache, createCSPEntry, cspOriginsExport as default, deleteCSPEntry, getCSPEntries, getCSPEntry, getCSPHeader, updateCSPEntry };
package/csp-origins.js ADDED
@@ -0,0 +1,66 @@
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/csp-origins.ts
8
+ var getCSPEntries = async (query, options) => _chunkOULT3V2Ujs.invokeFetch.call(void 0, "csp-origins", {
9
+ method: "get",
10
+ pathTemplate: "/api/v1/csp-origins",
11
+ query,
12
+ options
13
+ });
14
+ var createCSPEntry = async (body, options) => _chunkOULT3V2Ujs.invokeFetch.call(void 0, "csp-origins", {
15
+ method: "post",
16
+ pathTemplate: "/api/v1/csp-origins",
17
+ body,
18
+ options
19
+ });
20
+ var getCSPHeader = async (options) => _chunkOULT3V2Ujs.invokeFetch.call(void 0, "csp-origins", {
21
+ method: "get",
22
+ pathTemplate: "/api/v1/csp-origins/actions/generate-header",
23
+ options
24
+ });
25
+ var deleteCSPEntry = async (id, options) => _chunkOULT3V2Ujs.invokeFetch.call(void 0, "csp-origins", {
26
+ method: "delete",
27
+ pathTemplate: "/api/v1/csp-origins/{id}",
28
+ pathVariables: { id },
29
+ options
30
+ });
31
+ var getCSPEntry = async (id, options) => _chunkOULT3V2Ujs.invokeFetch.call(void 0, "csp-origins", {
32
+ method: "get",
33
+ pathTemplate: "/api/v1/csp-origins/{id}",
34
+ pathVariables: { id },
35
+ options
36
+ });
37
+ var updateCSPEntry = async (id, body, options) => _chunkOULT3V2Ujs.invokeFetch.call(void 0, "csp-origins", {
38
+ method: "put",
39
+ pathTemplate: "/api/v1/csp-origins/{id}",
40
+ pathVariables: { id },
41
+ body,
42
+ options
43
+ });
44
+ function clearCache() {
45
+ return _chunkOULT3V2Ujs.clearApiCache.call(void 0, "csp-origins");
46
+ }
47
+ var cspOriginsExport = {
48
+ getCSPEntries,
49
+ createCSPEntry,
50
+ getCSPHeader,
51
+ deleteCSPEntry,
52
+ getCSPEntry,
53
+ updateCSPEntry,
54
+ clearCache
55
+ };
56
+ var csp_origins_default = cspOriginsExport;
57
+
58
+
59
+
60
+
61
+
62
+
63
+
64
+
65
+
66
+ exports.clearCache = clearCache; exports.createCSPEntry = createCSPEntry; exports.default = csp_origins_default; exports.deleteCSPEntry = deleteCSPEntry; exports.getCSPEntries = getCSPEntries; exports.getCSPEntry = getCSPEntry; exports.getCSPHeader = getCSPHeader; exports.updateCSPEntry = updateCSPEntry;