@janssenproject/cedarling_wasm 0.0.283 → 0.0.284-nodejs

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.
@@ -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;
@@ -208,89 +183,8 @@ export class PolicyEvaluationError {
208
183
  readonly error: string;
209
184
  }
210
185
 
211
- export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
212
-
213
- export interface InitOutput {
214
- readonly memory: WebAssembly.Memory;
215
- readonly __wbg_cedarling_free: (a: number, b: number) => void;
216
- readonly __wbg_multiissuerauthorizeresult_free: (a: number, b: number) => void;
217
- readonly __wbg_get_multiissuerauthorizeresult_response: (a: number) => number;
218
- readonly __wbg_set_multiissuerauthorizeresult_response: (a: number, b: number) => void;
219
- readonly __wbg_get_multiissuerauthorizeresult_decision: (a: number) => number;
220
- readonly __wbg_set_multiissuerauthorizeresult_decision: (a: number, b: number) => void;
221
- readonly __wbg_get_multiissuerauthorizeresult_request_id: (a: number) => [number, number];
222
- readonly __wbg_set_multiissuerauthorizeresult_request_id: (a: number, b: number, c: number) => void;
223
- readonly multiissuerauthorizeresult_json_string: (a: number) => [number, number];
224
- readonly init: (a: any) => any;
225
- readonly cedarling_new: (a: any) => any;
226
- readonly cedarling_new_from_map: (a: any) => any;
227
- readonly cedarling_authorize: (a: number, b: any) => any;
228
- readonly cedarling_authorize_unsigned: (a: number, b: any) => any;
229
- readonly cedarling_authorize_multi_issuer: (a: number, b: any) => any;
230
- readonly cedarling_pop_logs: (a: number) => [number, number, number];
231
- readonly cedarling_get_log_by_id: (a: number, b: number, c: number) => [number, number, number];
232
- readonly cedarling_get_log_ids: (a: number) => any;
233
- readonly cedarling_get_logs_by_tag: (a: number, b: number, c: number) => [number, number, number, number];
234
- readonly cedarling_get_logs_by_request_id: (a: number, b: number, c: number) => [number, number, number, number];
235
- readonly cedarling_get_logs_by_request_id_and_tag: (a: number, b: number, c: number, d: number, e: number) => [number, number, number, number];
236
- readonly cedarling_shut_down: (a: number) => any;
237
- readonly __wbg_authorizeresult_free: (a: number, b: number) => void;
238
- readonly __wbg_get_authorizeresult_workload: (a: number) => number;
239
- readonly __wbg_set_authorizeresult_workload: (a: number, b: number) => void;
240
- readonly __wbg_get_authorizeresult_person: (a: number) => number;
241
- readonly __wbg_set_authorizeresult_person: (a: number, b: number) => void;
242
- readonly __wbg_get_authorizeresult_decision: (a: number) => number;
243
- readonly __wbg_set_authorizeresult_decision: (a: number, b: number) => void;
244
- readonly __wbg_get_authorizeresult_request_id: (a: number) => [number, number];
245
- readonly __wbg_set_authorizeresult_request_id: (a: number, b: number, c: number) => void;
246
- readonly authorizeresult_json_string: (a: number) => [number, number];
247
- readonly authorizeresult_principal: (a: number, b: number, c: number) => number;
248
- readonly __wbg_authorizeresultresponse_free: (a: number, b: number) => void;
249
- readonly authorizeresultresponse_decision: (a: number) => number;
250
- readonly authorizeresultresponse_diagnostics: (a: number) => number;
251
- readonly __wbg_diagnostics_free: (a: number, b: number) => void;
252
- readonly diagnostics_reason: (a: number) => [number, number];
253
- readonly diagnostics_errors: (a: number) => [number, number];
254
- readonly __wbg_policyevaluationerror_free: (a: number, b: number) => void;
255
- readonly policyevaluationerror_id: (a: number) => [number, number];
256
- readonly policyevaluationerror_error: (a: number) => [number, number];
257
- readonly __wbg_jsjsonlogic_free: (a: number, b: number) => void;
258
- readonly jsjsonlogic_new: () => number;
259
- readonly jsjsonlogic_apply: (a: number, b: any, c: any) => [number, number, number];
260
- readonly ring_core_0_17_14__bn_mul_mont: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
261
- readonly wasm_bindgen__convert__closures_____invoke__h6327561d424f9a15: (a: number, b: number, c: any) => void;
262
- readonly wasm_bindgen__closure__destroy__h4fff4cc5f82a04c0: (a: number, b: number) => void;
263
- readonly wasm_bindgen__convert__closures_____invoke__h1ef9cb20a66113c0: (a: number, b: number) => void;
264
- readonly wasm_bindgen__closure__destroy__h8149dcdd225949c1: (a: number, b: number) => void;
265
- readonly wasm_bindgen__convert__closures_____invoke__h4e75ae6afb7ea833: (a: number, b: number, c: any, d: any) => void;
266
- readonly __wbindgen_malloc: (a: number, b: number) => number;
267
- readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
268
- readonly __wbindgen_exn_store: (a: number) => void;
269
- readonly __externref_table_alloc: () => number;
270
- readonly __wbindgen_externrefs: WebAssembly.Table;
271
- readonly __wbindgen_free: (a: number, b: number, c: number) => void;
272
- readonly __externref_table_dealloc: (a: number) => void;
273
- readonly __externref_drop_slice: (a: number, b: number) => void;
274
- readonly __wbindgen_start: () => void;
275
- }
276
-
277
- export type SyncInitInput = BufferSource | WebAssembly.Module;
278
- /**
279
- * Instantiates the given `module`, which can either be bytes or
280
- * a precompiled `WebAssembly.Module`.
281
- *
282
- * @param {{ module: SyncInitInput }} module - Passing `SyncInitInput` directly is deprecated.
283
- *
284
- * @returns {InitOutput}
285
- */
286
- export function initSync(module: { module: SyncInitInput } | SyncInitInput): InitOutput;
287
-
288
186
  /**
289
- * If `module_or_path` is {RequestInfo} or {URL}, makes a request and
290
- * for everything else, calls `WebAssembly.instantiate` directly.
291
- *
292
- * @param {{ module_or_path: InitInput | Promise<InitInput> }} module_or_path - Passing `InitInput` directly is deprecated.
293
- *
294
- * @returns {Promise<InitOutput>}
295
- */
296
- export default function __wbg_init (module_or_path?: { module_or_path: InitInput | Promise<InitInput> } | InitInput | Promise<InitInput>): Promise<InitOutput>;
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>;