@janssenproject/cedarling_wasm 0.0.283-nodejs → 0.0.284
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.
- package/cedarling_wasm.d.ts +101 -32
- package/cedarling_wasm.js +766 -824
- package/cedarling_wasm_bg.wasm +0 -0
- package/package.json +6 -2
package/cedarling_wasm.d.ts
CHANGED
|
@@ -1,14 +1,6 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
|
-
|
|
4
|
-
* Create a new instance of the Cedarling application.
|
|
5
|
-
* This function can take as config parameter the eather `Map` other `Object`
|
|
6
|
-
*/
|
|
7
|
-
export function init(config: any): Promise<Cedarling>;
|
|
8
|
-
/**
|
|
9
|
-
* A WASM wrapper for the Rust `cedarling::AuthorizeResult` struct.
|
|
10
|
-
* Represents the result of an authorization request.
|
|
11
|
-
*/
|
|
3
|
+
|
|
12
4
|
export class AuthorizeResult {
|
|
13
5
|
private constructor();
|
|
14
6
|
free(): void;
|
|
@@ -47,10 +39,7 @@ export class AuthorizeResult {
|
|
|
47
39
|
*/
|
|
48
40
|
request_id: string;
|
|
49
41
|
}
|
|
50
|
-
|
|
51
|
-
* A WASM wrapper for the Rust `cedar_policy::Response` struct.
|
|
52
|
-
* Represents the result of an authorization request.
|
|
53
|
-
*/
|
|
42
|
+
|
|
54
43
|
export class AuthorizeResultResponse {
|
|
55
44
|
private constructor();
|
|
56
45
|
free(): void;
|
|
@@ -64,9 +53,7 @@ export class AuthorizeResultResponse {
|
|
|
64
53
|
*/
|
|
65
54
|
readonly diagnostics: Diagnostics;
|
|
66
55
|
}
|
|
67
|
-
|
|
68
|
-
* The instance of the Cedarling application.
|
|
69
|
-
*/
|
|
56
|
+
|
|
70
57
|
export class Cedarling {
|
|
71
58
|
private constructor();
|
|
72
59
|
free(): void;
|
|
@@ -132,12 +119,7 @@ export class Cedarling {
|
|
|
132
119
|
*/
|
|
133
120
|
shut_down(): Promise<void>;
|
|
134
121
|
}
|
|
135
|
-
|
|
136
|
-
* Diagnostics
|
|
137
|
-
* ===========
|
|
138
|
-
*
|
|
139
|
-
* Provides detailed information about how a policy decision was made, including policies that contributed to the decision and any errors encountered during evaluation.
|
|
140
|
-
*/
|
|
122
|
+
|
|
141
123
|
export class Diagnostics {
|
|
142
124
|
private constructor();
|
|
143
125
|
free(): void;
|
|
@@ -155,16 +137,14 @@ export class Diagnostics {
|
|
|
155
137
|
*/
|
|
156
138
|
readonly errors: PolicyEvaluationError[];
|
|
157
139
|
}
|
|
140
|
+
|
|
158
141
|
export class JsJsonLogic {
|
|
159
142
|
free(): void;
|
|
160
143
|
[Symbol.dispose](): void;
|
|
161
144
|
constructor();
|
|
162
145
|
apply(logic: any, data: any): any;
|
|
163
146
|
}
|
|
164
|
-
|
|
165
|
-
* A WASM wrapper for the Rust `cedarling::MultiIssuerAuthorizeResult` struct.
|
|
166
|
-
* Represents the result of a multi-issuer authorization request.
|
|
167
|
-
*/
|
|
147
|
+
|
|
168
148
|
export class MultiIssuerAuthorizeResult {
|
|
169
149
|
private constructor();
|
|
170
150
|
free(): void;
|
|
@@ -188,12 +168,7 @@ export class MultiIssuerAuthorizeResult {
|
|
|
188
168
|
*/
|
|
189
169
|
request_id: string;
|
|
190
170
|
}
|
|
191
|
-
|
|
192
|
-
* PolicyEvaluationError
|
|
193
|
-
* =====================
|
|
194
|
-
*
|
|
195
|
-
* Represents an error that occurred when evaluating a Cedar policy.
|
|
196
|
-
*/
|
|
171
|
+
|
|
197
172
|
export class PolicyEvaluationError {
|
|
198
173
|
private constructor();
|
|
199
174
|
free(): void;
|
|
@@ -207,3 +182,97 @@ export class PolicyEvaluationError {
|
|
|
207
182
|
*/
|
|
208
183
|
readonly error: string;
|
|
209
184
|
}
|
|
185
|
+
|
|
186
|
+
/**
|
|
187
|
+
* Create a new instance of the Cedarling application.
|
|
188
|
+
* This function can take as config parameter the eather `Map` other `Object`
|
|
189
|
+
*/
|
|
190
|
+
export function init(config: any): Promise<Cedarling>;
|
|
191
|
+
|
|
192
|
+
export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
|
|
193
|
+
|
|
194
|
+
export interface InitOutput {
|
|
195
|
+
readonly memory: WebAssembly.Memory;
|
|
196
|
+
readonly __wbg_cedarling_free: (a: number, b: number) => void;
|
|
197
|
+
readonly __wbg_multiissuerauthorizeresult_free: (a: number, b: number) => void;
|
|
198
|
+
readonly __wbg_get_multiissuerauthorizeresult_response: (a: number) => number;
|
|
199
|
+
readonly __wbg_set_multiissuerauthorizeresult_response: (a: number, b: number) => void;
|
|
200
|
+
readonly __wbg_get_multiissuerauthorizeresult_decision: (a: number) => number;
|
|
201
|
+
readonly __wbg_set_multiissuerauthorizeresult_decision: (a: number, b: number) => void;
|
|
202
|
+
readonly __wbg_get_multiissuerauthorizeresult_request_id: (a: number) => [number, number];
|
|
203
|
+
readonly __wbg_set_multiissuerauthorizeresult_request_id: (a: number, b: number, c: number) => void;
|
|
204
|
+
readonly multiissuerauthorizeresult_json_string: (a: number) => [number, number];
|
|
205
|
+
readonly init: (a: any) => any;
|
|
206
|
+
readonly cedarling_new: (a: any) => any;
|
|
207
|
+
readonly cedarling_new_from_map: (a: any) => any;
|
|
208
|
+
readonly cedarling_authorize: (a: number, b: any) => any;
|
|
209
|
+
readonly cedarling_authorize_unsigned: (a: number, b: any) => any;
|
|
210
|
+
readonly cedarling_authorize_multi_issuer: (a: number, b: any) => any;
|
|
211
|
+
readonly cedarling_pop_logs: (a: number) => [number, number, number];
|
|
212
|
+
readonly cedarling_get_log_by_id: (a: number, b: number, c: number) => [number, number, number];
|
|
213
|
+
readonly cedarling_get_log_ids: (a: number) => any;
|
|
214
|
+
readonly cedarling_get_logs_by_tag: (a: number, b: number, c: number) => [number, number, number, number];
|
|
215
|
+
readonly cedarling_get_logs_by_request_id: (a: number, b: number, c: number) => [number, number, number, number];
|
|
216
|
+
readonly cedarling_get_logs_by_request_id_and_tag: (a: number, b: number, c: number, d: number, e: number) => [number, number, number, number];
|
|
217
|
+
readonly cedarling_shut_down: (a: number) => any;
|
|
218
|
+
readonly __wbg_authorizeresult_free: (a: number, b: number) => void;
|
|
219
|
+
readonly __wbg_get_authorizeresult_workload: (a: number) => number;
|
|
220
|
+
readonly __wbg_set_authorizeresult_workload: (a: number, b: number) => void;
|
|
221
|
+
readonly __wbg_get_authorizeresult_person: (a: number) => number;
|
|
222
|
+
readonly __wbg_set_authorizeresult_person: (a: number, b: number) => void;
|
|
223
|
+
readonly __wbg_get_authorizeresult_decision: (a: number) => number;
|
|
224
|
+
readonly __wbg_set_authorizeresult_decision: (a: number, b: number) => void;
|
|
225
|
+
readonly __wbg_get_authorizeresult_request_id: (a: number) => [number, number];
|
|
226
|
+
readonly __wbg_set_authorizeresult_request_id: (a: number, b: number, c: number) => void;
|
|
227
|
+
readonly authorizeresult_json_string: (a: number) => [number, number];
|
|
228
|
+
readonly authorizeresult_principal: (a: number, b: number, c: number) => number;
|
|
229
|
+
readonly __wbg_authorizeresultresponse_free: (a: number, b: number) => void;
|
|
230
|
+
readonly authorizeresultresponse_decision: (a: number) => number;
|
|
231
|
+
readonly authorizeresultresponse_diagnostics: (a: number) => number;
|
|
232
|
+
readonly __wbg_diagnostics_free: (a: number, b: number) => void;
|
|
233
|
+
readonly diagnostics_reason: (a: number) => [number, number];
|
|
234
|
+
readonly diagnostics_errors: (a: number) => [number, number];
|
|
235
|
+
readonly __wbg_policyevaluationerror_free: (a: number, b: number) => void;
|
|
236
|
+
readonly policyevaluationerror_id: (a: number) => [number, number];
|
|
237
|
+
readonly policyevaluationerror_error: (a: number) => [number, number];
|
|
238
|
+
readonly __wbg_jsjsonlogic_free: (a: number, b: number) => void;
|
|
239
|
+
readonly jsjsonlogic_new: () => number;
|
|
240
|
+
readonly jsjsonlogic_apply: (a: number, b: any, c: any) => [number, number, number];
|
|
241
|
+
readonly ring_core_0_17_14__bn_mul_mont: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
242
|
+
readonly wasm_bindgen__convert__closures_____invoke__hfa802aa0addaec97: (a: number, b: number) => void;
|
|
243
|
+
readonly wasm_bindgen__closure__destroy__h3b69c8350c009da1: (a: number, b: number) => void;
|
|
244
|
+
readonly wasm_bindgen__convert__closures_____invoke__he934e31379087ee0: (a: number, b: number, c: any) => void;
|
|
245
|
+
readonly wasm_bindgen__closure__destroy__h5f4f3416747f6981: (a: number, b: number) => void;
|
|
246
|
+
readonly wasm_bindgen__convert__closures_____invoke__h048f8d0721d2ddfa: (a: number, b: number, c: any, d: any) => void;
|
|
247
|
+
readonly __wbindgen_malloc: (a: number, b: number) => number;
|
|
248
|
+
readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
249
|
+
readonly __wbindgen_exn_store: (a: number) => void;
|
|
250
|
+
readonly __externref_table_alloc: () => number;
|
|
251
|
+
readonly __wbindgen_externrefs: WebAssembly.Table;
|
|
252
|
+
readonly __wbindgen_free: (a: number, b: number, c: number) => void;
|
|
253
|
+
readonly __externref_table_dealloc: (a: number) => void;
|
|
254
|
+
readonly __externref_drop_slice: (a: number, b: number) => void;
|
|
255
|
+
readonly __wbindgen_start: () => void;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
export type SyncInitInput = BufferSource | WebAssembly.Module;
|
|
259
|
+
|
|
260
|
+
/**
|
|
261
|
+
* Instantiates the given `module`, which can either be bytes or
|
|
262
|
+
* a precompiled `WebAssembly.Module`.
|
|
263
|
+
*
|
|
264
|
+
* @param {{ module: SyncInitInput }} module - Passing `SyncInitInput` directly is deprecated.
|
|
265
|
+
*
|
|
266
|
+
* @returns {InitOutput}
|
|
267
|
+
*/
|
|
268
|
+
export function initSync(module: { module: SyncInitInput } | SyncInitInput): InitOutput;
|
|
269
|
+
|
|
270
|
+
/**
|
|
271
|
+
* If `module_or_path` is {RequestInfo} or {URL}, makes a request and
|
|
272
|
+
* for everything else, calls `WebAssembly.instantiate` directly.
|
|
273
|
+
*
|
|
274
|
+
* @param {{ module_or_path: InitInput | Promise<InitInput> }} module_or_path - Passing `InitInput` directly is deprecated.
|
|
275
|
+
*
|
|
276
|
+
* @returns {Promise<InitOutput>}
|
|
277
|
+
*/
|
|
278
|
+
export default function __wbg_init (module_or_path?: { module_or_path: InitInput | Promise<InitInput> } | InitInput | Promise<InitInput>): Promise<InitOutput>;
|