@qlik/api 1.31.0 → 1.33.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (142) hide show
  1. package/api-keys.d.ts +10 -10
  2. package/api-keys.js +64 -50
  3. package/apps.d.ts +56 -56
  4. package/apps.js +392 -304
  5. package/assistants.d.ts +1301 -0
  6. package/assistants.js +329 -0
  7. package/audits.d.ts +10 -10
  8. package/audits.js +48 -36
  9. package/{auth-types-DqfMuSRX.d.ts → auth-types-Cj5bM3Yk.d.ts} +29 -9
  10. package/auth.d.ts +17 -4
  11. package/auth.js +4 -2
  12. package/automation-connections.d.ts +366 -0
  13. package/automation-connections.js +107 -0
  14. package/automations.d.ts +27 -27
  15. package/automations.js +159 -123
  16. package/automl-deployments.d.ts +97 -0
  17. package/automl-deployments.js +29 -0
  18. package/automl-predictions.d.ts +214 -0
  19. package/automl-predictions.js +84 -0
  20. package/brands.d.ts +18 -18
  21. package/brands.js +107 -83
  22. package/chunks/{KBSD75QL.js → 33GQY7N7.js} +1 -1
  23. package/chunks/{M64RLKVG.js → 62DXIH3S.js} +7 -5
  24. package/chunks/7MMXU6EL.js +86 -0
  25. package/chunks/{DLKLPD7T.js → GPRUNZV4.js} +3 -3
  26. package/chunks/{YKZ2QYHN.js → LIEZG7IM.js} +3 -3
  27. package/chunks/{FKDGGR2O.js → OTIO4SEJ.js} +698 -708
  28. package/chunks/{UZTIZ4H5.js → RP3EJGHG.js} +74 -74
  29. package/chunks/{GUU3KZGK.js → SPATCXXU.js} +9 -2
  30. package/chunks/{LY7RP2HA.js → XF3TPZKZ.js} +23 -8
  31. package/chunks/{6ZONDHRN.js → YYZCS5PW.js} +11 -4
  32. package/chunks/{3RGGGGAR.js → ZCTVPXGO.js} +1 -1
  33. package/collections.d.ts +16 -15
  34. package/collections.js +98 -76
  35. package/conditions.d.ts +662 -0
  36. package/conditions.js +135 -0
  37. package/consumption.d.ts +182 -0
  38. package/consumption.js +26 -0
  39. package/csp-origins.d.ts +9 -9
  40. package/csp-origins.js +53 -41
  41. package/csrf-token.d.ts +62 -0
  42. package/csrf-token.js +25 -0
  43. package/data-alerts.d.ts +1004 -0
  44. package/data-alerts.js +187 -0
  45. package/data-assets.d.ts +8 -8
  46. package/data-assets.js +50 -40
  47. package/data-connections.d.ts +16 -16
  48. package/data-connections.js +87 -69
  49. package/data-credentials.d.ts +11 -11
  50. package/data-credentials.js +52 -42
  51. package/data-files.d.ts +18 -18
  52. package/data-files.js +107 -83
  53. package/data-qualities.d.ts +175 -0
  54. package/data-qualities.js +50 -0
  55. package/data-sets.d.ts +424 -0
  56. package/data-sets.js +87 -0
  57. package/data-sources.d.ts +268 -0
  58. package/data-sources.js +45 -0
  59. package/data-stores.d.ts +537 -0
  60. package/data-stores.js +128 -0
  61. package/dcaas.d.ts +192 -0
  62. package/dcaas.js +45 -0
  63. package/di-projects.d.ts +673 -0
  64. package/di-projects.js +196 -0
  65. package/direct-access-agents.d.ts +328 -0
  66. package/direct-access-agents.js +108 -0
  67. package/encryption.d.ts +370 -0
  68. package/encryption.js +118 -0
  69. package/extensions.d.ts +11 -11
  70. package/extensions.js +61 -47
  71. package/glossaries.d.ts +33 -33
  72. package/glossaries.js +221 -173
  73. package/groups.d.ts +12 -12
  74. package/groups.js +72 -56
  75. package/identity-providers.d.ts +11 -11
  76. package/identity-providers.js +67 -51
  77. package/index.d.ts +113 -4
  78. package/index.js +626 -40
  79. package/interceptors.d.ts +9 -2
  80. package/interceptors.js +2 -2
  81. package/invoke-fetch-types-BYCD4pc9.d.ts +98 -0
  82. package/items.d.ts +14 -13
  83. package/items.js +71 -55
  84. package/knowledgebases.d.ts +890 -0
  85. package/knowledgebases.js +203 -0
  86. package/licenses.d.ts +14 -14
  87. package/licenses.js +76 -58
  88. package/lineage-graphs.d.ts +712 -0
  89. package/lineage-graphs.js +108 -0
  90. package/ml.d.ts +2676 -0
  91. package/ml.js +477 -0
  92. package/notes.d.ts +110 -0
  93. package/notes.js +35 -0
  94. package/notifications.d.ts +98 -0
  95. package/notifications.js +26 -0
  96. package/oauth-clients.d.ts +14 -14
  97. package/oauth-clients.js +96 -74
  98. package/oauth-tokens.d.ts +126 -0
  99. package/oauth-tokens.js +35 -0
  100. package/package.json +34 -6
  101. package/qix.d.ts +145 -4
  102. package/qix.js +2 -2
  103. package/questions.d.ts +364 -0
  104. package/questions.js +38 -0
  105. package/quotas.d.ts +6 -6
  106. package/quotas.js +20 -16
  107. package/reload-tasks.d.ts +8 -8
  108. package/reload-tasks.js +46 -36
  109. package/reloads.d.ts +7 -7
  110. package/reloads.js +36 -28
  111. package/report-templates.d.ts +287 -0
  112. package/report-templates.js +94 -0
  113. package/reports.d.ts +4 -4
  114. package/reports.js +20 -16
  115. package/roles.d.ts +8 -8
  116. package/roles.js +46 -36
  117. package/sharing-tasks.d.ts +952 -0
  118. package/sharing-tasks.js +125 -0
  119. package/spaces.d.ts +22 -22
  120. package/spaces.js +153 -119
  121. package/tasks.d.ts +564 -0
  122. package/tasks.js +126 -0
  123. package/temp-contents.d.ts +7 -7
  124. package/temp-contents.js +30 -24
  125. package/tenants.d.ts +8 -8
  126. package/tenants.js +57 -45
  127. package/themes.d.ts +11 -11
  128. package/themes.js +61 -47
  129. package/transports.d.ts +8 -8
  130. package/transports.js +49 -37
  131. package/ui-config.d.ts +274 -0
  132. package/ui-config.js +91 -0
  133. package/users.d.ts +15 -15
  134. package/users.js +81 -63
  135. package/web-integrations.d.ts +8 -8
  136. package/web-integrations.js +46 -36
  137. package/web-notifications.d.ts +9 -9
  138. package/web-notifications.js +53 -41
  139. package/webhooks.d.ts +14 -14
  140. package/webhooks.js +88 -68
  141. package/chunks/2ZQ3ZX7F.js +0 -33
  142. package/invoke-fetch-types-Cq7bjkqn.d.ts +0 -243
package/conditions.js ADDED
@@ -0,0 +1,135 @@
1
+ import {
2
+ clearApiCache,
3
+ invokeFetch
4
+ } from "./chunks/LIEZG7IM.js";
5
+ import "./chunks/GPRUNZV4.js";
6
+ import "./chunks/7MMXU6EL.js";
7
+
8
+ // src/public/rest/conditions.ts
9
+ async function createCondition(body, options) {
10
+ return invokeFetch("conditions", {
11
+ method: "post",
12
+ pathTemplate: "/api/v1/conditions",
13
+ body,
14
+ contentType: "application/json",
15
+ options
16
+ });
17
+ }
18
+ async function createConditionPreview(body, options) {
19
+ return invokeFetch("conditions", {
20
+ method: "post",
21
+ pathTemplate: "/api/v1/conditions/previews",
22
+ body,
23
+ contentType: "application/json",
24
+ options
25
+ });
26
+ }
27
+ async function getConditionPreview(id, options) {
28
+ return invokeFetch("conditions", {
29
+ method: "get",
30
+ pathTemplate: "/api/v1/conditions/previews/{id}",
31
+ pathVariables: { id },
32
+ options
33
+ });
34
+ }
35
+ async function getConditionsSettings(options) {
36
+ return invokeFetch("conditions", {
37
+ method: "get",
38
+ pathTemplate: "/api/v1/conditions/settings",
39
+ options
40
+ });
41
+ }
42
+ async function setConditionsSettings(body, options) {
43
+ return invokeFetch("conditions", {
44
+ method: "put",
45
+ pathTemplate: "/api/v1/conditions/settings",
46
+ body,
47
+ contentType: "application/json",
48
+ options
49
+ });
50
+ }
51
+ async function deleteCondition(id, options) {
52
+ return invokeFetch("conditions", {
53
+ method: "delete",
54
+ pathTemplate: "/api/v1/conditions/{id}",
55
+ pathVariables: { id },
56
+ options
57
+ });
58
+ }
59
+ async function getCondition(id, options) {
60
+ return invokeFetch("conditions", {
61
+ method: "get",
62
+ pathTemplate: "/api/v1/conditions/{id}",
63
+ pathVariables: { id },
64
+ options
65
+ });
66
+ }
67
+ async function patchCondition(id, body, options) {
68
+ return invokeFetch("conditions", {
69
+ method: "patch",
70
+ pathTemplate: "/api/v1/conditions/{id}",
71
+ pathVariables: { id },
72
+ body,
73
+ contentType: "application/json",
74
+ options
75
+ });
76
+ }
77
+ async function createConditionEvaluation(id, body, options) {
78
+ return invokeFetch("conditions", {
79
+ method: "post",
80
+ pathTemplate: "/api/v1/conditions/{id}/evaluations",
81
+ pathVariables: { id },
82
+ body,
83
+ contentType: "application/json",
84
+ options
85
+ });
86
+ }
87
+ async function deleteConditionEvaluation(id, evaluationId, options) {
88
+ return invokeFetch("conditions", {
89
+ method: "delete",
90
+ pathTemplate: "/api/v1/conditions/{id}/evaluations/{evaluationId}",
91
+ pathVariables: { id, evaluationId },
92
+ options
93
+ });
94
+ }
95
+ async function getConditionEvaluation(id, evaluationId, options) {
96
+ return invokeFetch("conditions", {
97
+ method: "get",
98
+ pathTemplate: "/api/v1/conditions/{id}/evaluations/{evaluationId}",
99
+ pathVariables: { id, evaluationId },
100
+ options
101
+ });
102
+ }
103
+ function clearCache() {
104
+ return clearApiCache("conditions");
105
+ }
106
+ var conditionsExport = {
107
+ createCondition,
108
+ createConditionPreview,
109
+ getConditionPreview,
110
+ getConditionsSettings,
111
+ setConditionsSettings,
112
+ deleteCondition,
113
+ getCondition,
114
+ patchCondition,
115
+ createConditionEvaluation,
116
+ deleteConditionEvaluation,
117
+ getConditionEvaluation,
118
+ clearCache
119
+ };
120
+ var conditions_default = conditionsExport;
121
+ export {
122
+ clearCache,
123
+ createCondition,
124
+ createConditionEvaluation,
125
+ createConditionPreview,
126
+ conditions_default as default,
127
+ deleteCondition,
128
+ deleteConditionEvaluation,
129
+ getCondition,
130
+ getConditionEvaluation,
131
+ getConditionPreview,
132
+ getConditionsSettings,
133
+ patchCondition,
134
+ setConditionsSettings
135
+ };
@@ -0,0 +1,182 @@
1
+ import { A as ApiCallOptions } from './invoke-fetch-types-BYCD4pc9.js';
2
+ import './auth-types-Cj5bM3Yk.js';
3
+
4
+ type Enforcement = {
5
+ /** Resource action type to be blocked */
6
+ actionToBlock?: string;
7
+ /** Resource type to be blocked */
8
+ resourceType?: string;
9
+ };
10
+ /**
11
+ * @example
12
+ * {
13
+ * errors: [
14
+ * {
15
+ * code: "HTTP-123",
16
+ * title: "short error message"
17
+ * }
18
+ * ],
19
+ * traceId: "7975401f3954aa47"
20
+ * }
21
+ */
22
+ type ErrorResponse = {
23
+ errors?: SingleErrorResponse[];
24
+ traceId?: string;
25
+ };
26
+ type ExecutionResponse = {
27
+ blocked?: boolean;
28
+ /** RFC3339 timestamp when a block event was last emitted for this execution. */
29
+ blockedEventTime?: string;
30
+ /** The capacity limit. */
31
+ capacityLimit?: number;
32
+ closeToOverage?: boolean;
33
+ /** The id of the consumption report */
34
+ consumptionReportId?: string;
35
+ /** The field to determine if a resource should be visible on the client. */
36
+ customerFacing?: boolean;
37
+ /** Contains a list of resources that are blocked when quota for this is reached. */
38
+ enforcement?: Enforcement[];
39
+ /** The global usage. */
40
+ globalUsage?: number;
41
+ /** The guardrail limit. */
42
+ guardrailLimit?: number;
43
+ /** The local usage. */
44
+ localUsage?: number;
45
+ overage?: boolean;
46
+ /** RFC3339 timestamp when a overage event was last emitted for this execution. */
47
+ overageEventTime?: string;
48
+ /** The end of the associated period. */
49
+ periodEnd?: string;
50
+ /** The start of the associated period. */
51
+ periodStart?: string;
52
+ periodType?: "day" | "month" | "year" | "" | "fixed" | "minute";
53
+ /** The resource action. */
54
+ resourceAction?: "report.generated" | "reload" | "scheduledReload" | "executed" | "aggregation" | "import" | "updated" | "deployed" | "3rd_party_executed" | "standard_executed";
55
+ /** The resource id. */
56
+ resourceId?: string;
57
+ /** The resource type. */
58
+ resourceType?: "app" | "automations" | "space" | "data.volume.consumption";
59
+ scope?: ("user" | "tenant" | "resourceId" | "resourceType" | "resourceAction")[];
60
+ /** The map to the resource scope. */
61
+ scopeMapping?: string;
62
+ segments?: Record<string, unknown>[];
63
+ /** The resource task description. */
64
+ taskDescription?: string;
65
+ /** The resource task name. */
66
+ taskName?: string;
67
+ /** The tenant id. */
68
+ tenantId?: string;
69
+ /** Unit of measurement for the resource consumption */
70
+ unit?: string;
71
+ /** The RFC3339 timestamp when the resource was updated. */
72
+ updateTime?: string;
73
+ /** The user id. */
74
+ userId?: string;
75
+ };
76
+ type ExecutionsByTenantList = StandardListResponseProps & {
77
+ closeToOverage?: boolean;
78
+ data?: ExecutionResponse[];
79
+ globalUsageAvailable?: boolean;
80
+ links?: ListLinks;
81
+ overage?: boolean;
82
+ };
83
+ type ListLinks = {
84
+ next?: Page;
85
+ prev?: Page;
86
+ /** Object with Href to a particular element or set of elements */
87
+ self?: Self;
88
+ };
89
+ type Page = {
90
+ /** URL to particular set of elements */
91
+ href?: string;
92
+ /** Page unique token */
93
+ token?: string;
94
+ /** Page type, can be next or prev */
95
+ type?: "prev" | "next";
96
+ };
97
+ /**
98
+ * Object with Href to a particular element or set of elements
99
+ */
100
+ type Self = {
101
+ href?: string;
102
+ };
103
+ type SingleErrorResponse = {
104
+ /** Error code specific to usage-tracker. */
105
+ readonly code?: string;
106
+ /** Error cause. */
107
+ readonly detail?: string;
108
+ /** meta properties for an error. */
109
+ meta?: unknown;
110
+ /** Error title. */
111
+ readonly title?: string;
112
+ };
113
+ /**
114
+ * properties that should be added to every list response
115
+ */
116
+ type StandardListResponseProps = {
117
+ /** count of entries on the currently shown page */
118
+ currentPageCount: number;
119
+ /** total count of entries in the collection as a whole */
120
+ totalCount: number;
121
+ };
122
+ /**
123
+ * Retrieves the list of executions on an specific tenant
124
+ *
125
+ * @param query an object with query parameters
126
+ * @throws GetConsumptionExecutionsHttpError
127
+ */
128
+ declare function getConsumptionExecutions(query: {
129
+ actionToBlock?: string;
130
+ /** The advanced filtering to use for the query. Refer to [RFC 7644](https://datatracker.ietf.org/doc/rfc7644/) for the syntax.
131
+ *
132
+ * example `taskName eq "automation_run_ended" or taskName eq "report_triggered" or or taskName eq "dataVolumeAggregated"`
133
+ *
134
+ * The following fields are supported: `scope`, `resourcetype`, `resourceaction`, `resourceid`, `capacitylimit`,
135
+ * `localusage`, `globalusage`, `overage`, `blocked`, `periodstart`, `periodend`, `consumptionreportid`, `blockedeventtime`,
136
+ * `overageeventtime`, `taskname`, `taskdescription`, `userid`, `tenantid`, `customerfacing`, `actiontoblock` */
137
+ filter?: string;
138
+ /** Limit the returned result set */
139
+ limit?: number;
140
+ /** Offset for pagination - how many elements to skip */
141
+ offset?: number;
142
+ /** The cursor to the page of data. */
143
+ page?: string;
144
+ /** Specifies which periods to include regardless of the period type, start and end specified */
145
+ periodsToInclude?: ("current" | "previous")[];
146
+ sort?: ("periodstart" | "-periodstart" | "+periodstart" | "periodend" | "-periodend" | "+periodend")[];
147
+ }, options?: ApiCallOptions): Promise<GetConsumptionExecutionsHttpResponse>;
148
+ type GetConsumptionExecutionsHttpResponse = {
149
+ data: ExecutionsByTenantList;
150
+ headers: Headers;
151
+ status: 200;
152
+ prev?: (options?: ApiCallOptions) => Promise<GetConsumptionExecutionsHttpResponse>;
153
+ next?: (options?: ApiCallOptions) => Promise<GetConsumptionExecutionsHttpResponse>;
154
+ };
155
+ type GetConsumptionExecutionsHttpError = {
156
+ data: ErrorResponse;
157
+ headers: Headers;
158
+ status: number;
159
+ };
160
+ /**
161
+ * Clears the cache for consumption api requests.
162
+ */
163
+ declare function clearCache(): void;
164
+ interface ConsumptionAPI {
165
+ /**
166
+ * Retrieves the list of executions on an specific tenant
167
+ *
168
+ * @param query an object with query parameters
169
+ * @throws GetConsumptionExecutionsHttpError
170
+ */
171
+ getConsumptionExecutions: typeof getConsumptionExecutions;
172
+ /**
173
+ * Clears the cache for consumption api requests.
174
+ */
175
+ clearCache: typeof clearCache;
176
+ }
177
+ /**
178
+ * Functions for the consumption api
179
+ */
180
+ declare const consumptionExport: ConsumptionAPI;
181
+
182
+ export { type ConsumptionAPI, type Enforcement, type ErrorResponse, type ExecutionResponse, type ExecutionsByTenantList, type GetConsumptionExecutionsHttpError, type GetConsumptionExecutionsHttpResponse, type ListLinks, type Page, type Self, type SingleErrorResponse, type StandardListResponseProps, clearCache, consumptionExport as default, getConsumptionExecutions };
package/consumption.js ADDED
@@ -0,0 +1,26 @@
1
+ import {
2
+ clearApiCache,
3
+ invokeFetch
4
+ } from "./chunks/LIEZG7IM.js";
5
+ import "./chunks/GPRUNZV4.js";
6
+ import "./chunks/7MMXU6EL.js";
7
+
8
+ // src/public/rest/consumption.ts
9
+ async function getConsumptionExecutions(query, options) {
10
+ return invokeFetch("consumption", {
11
+ method: "get",
12
+ pathTemplate: "/api/v1/consumption/executions",
13
+ query,
14
+ options
15
+ });
16
+ }
17
+ function clearCache() {
18
+ return clearApiCache("consumption");
19
+ }
20
+ var consumptionExport = { getConsumptionExecutions, clearCache };
21
+ var consumption_default = consumptionExport;
22
+ export {
23
+ clearCache,
24
+ consumption_default as default,
25
+ getConsumptionExecutions
26
+ };
package/csp-origins.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { A as ApiCallOptions } from './invoke-fetch-types-Cq7bjkqn.js';
2
- import './auth-types-DqfMuSRX.js';
1
+ import { A as ApiCallOptions } from './invoke-fetch-types-BYCD4pc9.js';
2
+ import './auth-types-Cj5bM3Yk.js';
3
3
 
4
4
  type CSPEntry = {
5
5
  /** The CSP entry's unique identifier. */
@@ -76,7 +76,7 @@ type Link = {
76
76
  * @param query an object with query parameters
77
77
  * @throws GetCSPEntriesHttpError
78
78
  */
79
- declare const getCSPEntries: (query: {
79
+ declare function getCSPEntries(query: {
80
80
  /** Filter resources by directive 'childSrc', true/false. */
81
81
  childSrc?: boolean;
82
82
  /** Filter resources by directive 'connectSrc', true/false. */
@@ -115,7 +115,7 @@ declare const getCSPEntries: (query: {
115
115
  styleSrc?: boolean;
116
116
  /** Filter resources by directive 'workerSrc', true/false. */
117
117
  workerSrc?: boolean;
118
- }, options?: ApiCallOptions) => Promise<GetCSPEntriesHttpResponse>;
118
+ }, options?: ApiCallOptions): Promise<GetCSPEntriesHttpResponse>;
119
119
  type GetCSPEntriesHttpResponse = {
120
120
  data: CSPEntryList;
121
121
  headers: Headers;
@@ -134,7 +134,7 @@ type GetCSPEntriesHttpError = {
134
134
  * @param body an object with the body content
135
135
  * @throws CreateCSPEntryHttpError
136
136
  */
137
- declare const createCSPEntry: (body: CSPEntryContent, options?: ApiCallOptions) => Promise<CreateCSPEntryHttpResponse>;
137
+ declare function createCSPEntry(body: CSPEntryContent, options?: ApiCallOptions): Promise<CreateCSPEntryHttpResponse>;
138
138
  type CreateCSPEntryHttpResponse = {
139
139
  data: CSPEntry;
140
140
  headers: Headers;
@@ -150,7 +150,7 @@ type CreateCSPEntryHttpError = {
150
150
  *
151
151
  * @throws GetCSPHeaderHttpError
152
152
  */
153
- declare const getCSPHeader: (options?: ApiCallOptions) => Promise<GetCSPHeaderHttpResponse>;
153
+ declare function getCSPHeader(options?: ApiCallOptions): Promise<GetCSPHeaderHttpResponse>;
154
154
  type GetCSPHeaderHttpResponse = {
155
155
  data: CSPHeader;
156
156
  headers: Headers;
@@ -167,7 +167,7 @@ type GetCSPHeaderHttpError = {
167
167
  * @param id The CSP entry's unique identifier.
168
168
  * @throws DeleteCSPEntryHttpError
169
169
  */
170
- declare const deleteCSPEntry: (id: string, options?: ApiCallOptions) => Promise<DeleteCSPEntryHttpResponse>;
170
+ declare function deleteCSPEntry(id: string, options?: ApiCallOptions): Promise<DeleteCSPEntryHttpResponse>;
171
171
  type DeleteCSPEntryHttpResponse = {
172
172
  data: void;
173
173
  headers: Headers;
@@ -184,7 +184,7 @@ type DeleteCSPEntryHttpError = {
184
184
  * @param id The CSP entry's unique identifier.
185
185
  * @throws GetCSPEntryHttpError
186
186
  */
187
- declare const getCSPEntry: (id: string, options?: ApiCallOptions) => Promise<GetCSPEntryHttpResponse>;
187
+ declare function getCSPEntry(id: string, options?: ApiCallOptions): Promise<GetCSPEntryHttpResponse>;
188
188
  type GetCSPEntryHttpResponse = {
189
189
  data: CSPEntry;
190
190
  headers: Headers;
@@ -202,7 +202,7 @@ type GetCSPEntryHttpError = {
202
202
  * @param body an object with the body content
203
203
  * @throws UpdateCSPEntryHttpError
204
204
  */
205
- declare const updateCSPEntry: (id: string, body: CSPEntryContent, options?: ApiCallOptions) => Promise<UpdateCSPEntryHttpResponse>;
205
+ declare function updateCSPEntry(id: string, body: CSPEntryContent, options?: ApiCallOptions): Promise<UpdateCSPEntryHttpResponse>;
206
206
  type UpdateCSPEntryHttpResponse = {
207
207
  data: CSPEntry;
208
208
  headers: Headers;
package/csp-origins.js CHANGED
@@ -1,49 +1,61 @@
1
1
  import {
2
2
  clearApiCache,
3
3
  invokeFetch
4
- } from "./chunks/YKZ2QYHN.js";
5
- import "./chunks/DLKLPD7T.js";
6
- import "./chunks/2ZQ3ZX7F.js";
4
+ } from "./chunks/LIEZG7IM.js";
5
+ import "./chunks/GPRUNZV4.js";
6
+ import "./chunks/7MMXU6EL.js";
7
7
 
8
8
  // src/public/rest/csp-origins.ts
9
- var getCSPEntries = async (query, options) => invokeFetch("csp-origins", {
10
- method: "get",
11
- pathTemplate: "/api/v1/csp-origins",
12
- query,
13
- options
14
- });
15
- var createCSPEntry = async (body, options) => invokeFetch("csp-origins", {
16
- method: "post",
17
- pathTemplate: "/api/v1/csp-origins",
18
- body,
19
- contentType: "application/json",
20
- options
21
- });
22
- var getCSPHeader = async (options) => invokeFetch("csp-origins", {
23
- method: "get",
24
- pathTemplate: "/api/v1/csp-origins/actions/generate-header",
25
- options
26
- });
27
- var deleteCSPEntry = async (id, options) => invokeFetch("csp-origins", {
28
- method: "delete",
29
- pathTemplate: "/api/v1/csp-origins/{id}",
30
- pathVariables: { id },
31
- options
32
- });
33
- var getCSPEntry = async (id, options) => invokeFetch("csp-origins", {
34
- method: "get",
35
- pathTemplate: "/api/v1/csp-origins/{id}",
36
- pathVariables: { id },
37
- options
38
- });
39
- var updateCSPEntry = async (id, body, options) => invokeFetch("csp-origins", {
40
- method: "put",
41
- pathTemplate: "/api/v1/csp-origins/{id}",
42
- pathVariables: { id },
43
- body,
44
- contentType: "application/json",
45
- options
46
- });
9
+ async function getCSPEntries(query, options) {
10
+ return invokeFetch("csp-origins", {
11
+ method: "get",
12
+ pathTemplate: "/api/v1/csp-origins",
13
+ query,
14
+ options
15
+ });
16
+ }
17
+ async function createCSPEntry(body, options) {
18
+ return invokeFetch("csp-origins", {
19
+ method: "post",
20
+ pathTemplate: "/api/v1/csp-origins",
21
+ body,
22
+ contentType: "application/json",
23
+ options
24
+ });
25
+ }
26
+ async function getCSPHeader(options) {
27
+ return invokeFetch("csp-origins", {
28
+ method: "get",
29
+ pathTemplate: "/api/v1/csp-origins/actions/generate-header",
30
+ options
31
+ });
32
+ }
33
+ async function deleteCSPEntry(id, options) {
34
+ return invokeFetch("csp-origins", {
35
+ method: "delete",
36
+ pathTemplate: "/api/v1/csp-origins/{id}",
37
+ pathVariables: { id },
38
+ options
39
+ });
40
+ }
41
+ async function getCSPEntry(id, options) {
42
+ return invokeFetch("csp-origins", {
43
+ method: "get",
44
+ pathTemplate: "/api/v1/csp-origins/{id}",
45
+ pathVariables: { id },
46
+ options
47
+ });
48
+ }
49
+ async function updateCSPEntry(id, body, options) {
50
+ return invokeFetch("csp-origins", {
51
+ method: "put",
52
+ pathTemplate: "/api/v1/csp-origins/{id}",
53
+ pathVariables: { id },
54
+ body,
55
+ contentType: "application/json",
56
+ options
57
+ });
58
+ }
47
59
  function clearCache() {
48
60
  return clearApiCache("csp-origins");
49
61
  }
@@ -0,0 +1,62 @@
1
+ import { A as ApiCallOptions } from './invoke-fetch-types-BYCD4pc9.js';
2
+ import './auth-types-Cj5bM3Yk.js';
3
+
4
+ /**
5
+ * An error object.
6
+ */
7
+ type Error = {
8
+ /** The error code. */
9
+ code: string;
10
+ /** The detailed error message */
11
+ detail?: string;
12
+ /** Non-standard information about the error */
13
+ meta?: unknown;
14
+ /** The http status code. */
15
+ status?: string;
16
+ /** The error title. */
17
+ title: string;
18
+ };
19
+ /**
20
+ * A representation of the errors encountered from the HTTP request.
21
+ */
22
+ type Errors = {
23
+ errors?: Error[];
24
+ };
25
+ /**
26
+ * Returns CSRF token via the qlik-csrf-token header.
27
+ *
28
+ * @throws GetCsrfTokenHttpError
29
+ */
30
+ declare function getCsrfToken(options?: ApiCallOptions): Promise<GetCsrfTokenHttpResponse>;
31
+ type GetCsrfTokenHttpResponse = {
32
+ data: void;
33
+ headers: Headers;
34
+ status: 204;
35
+ };
36
+ type GetCsrfTokenHttpError = {
37
+ data: Errors & unknown;
38
+ headers: Headers;
39
+ status: 400 | 404;
40
+ };
41
+ /**
42
+ * Clears the cache for csrf-token api requests.
43
+ */
44
+ declare function clearCache(): void;
45
+ interface CsrfTokenAPI {
46
+ /**
47
+ * Returns CSRF token via the qlik-csrf-token header.
48
+ *
49
+ * @throws GetCsrfTokenHttpError
50
+ */
51
+ getCsrfToken: typeof getCsrfToken;
52
+ /**
53
+ * Clears the cache for csrf-token api requests.
54
+ */
55
+ clearCache: typeof clearCache;
56
+ }
57
+ /**
58
+ * Functions for the csrf-token api
59
+ */
60
+ declare const csrfTokenExport: CsrfTokenAPI;
61
+
62
+ export { type CsrfTokenAPI, type Error, type Errors, type GetCsrfTokenHttpError, type GetCsrfTokenHttpResponse, clearCache, csrfTokenExport as default, getCsrfToken };
package/csrf-token.js ADDED
@@ -0,0 +1,25 @@
1
+ import {
2
+ clearApiCache,
3
+ invokeFetch
4
+ } from "./chunks/LIEZG7IM.js";
5
+ import "./chunks/GPRUNZV4.js";
6
+ import "./chunks/7MMXU6EL.js";
7
+
8
+ // src/public/rest/csrf-token.ts
9
+ async function getCsrfToken(options) {
10
+ return invokeFetch("csrf-token", {
11
+ method: "get",
12
+ pathTemplate: "/api/v1/csrf-token",
13
+ options
14
+ });
15
+ }
16
+ function clearCache() {
17
+ return clearApiCache("csrf-token");
18
+ }
19
+ var csrfTokenExport = { getCsrfToken, clearCache };
20
+ var csrf_token_default = csrfTokenExport;
21
+ export {
22
+ clearCache,
23
+ csrf_token_default as default,
24
+ getCsrfToken
25
+ };