@limboai/verifox-sdk-plugin-mxf 0.0.9-canary.49db6df
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/gen/ffi/index.d.ts +820 -0
- package/gen/ffi/index.js +2663 -0
- package/gen/ffi/rolldown-runtime.js +43 -0
- package/package.json +61 -0
|
@@ -0,0 +1,820 @@
|
|
|
1
|
+
//#region ../../../../../node_modules/@ubjs/core/dist/esm/ffi-types.d.ts
|
|
2
|
+
type UniffiByteArray = Uint8Array;
|
|
3
|
+
declare class RustBuffer {
|
|
4
|
+
private readOffset;
|
|
5
|
+
private writeOffset;
|
|
6
|
+
private capacity;
|
|
7
|
+
arrayBuffer: ArrayBuffer;
|
|
8
|
+
private constructor();
|
|
9
|
+
/**
|
|
10
|
+
* Allocate a JS-owned buffer of the given capacity. Used by tests; not by
|
|
11
|
+
* the runtime path, which calls `RustBuffer.fromUint8Array(allocator(n))`
|
|
12
|
+
* with a runtime-supplied allocator.
|
|
13
|
+
*/
|
|
14
|
+
static withCapacity(capacity: number): RustBuffer;
|
|
15
|
+
static empty(): RustBuffer;
|
|
16
|
+
static fromArrayBuffer(buf: ArrayBuffer): RustBuffer;
|
|
17
|
+
/**
|
|
18
|
+
* Construct a `RustBuffer` over a `Uint8Array` view. Cursors track absolute
|
|
19
|
+
* offsets into the backing `ArrayBuffer`, so `byteOffset` and `byteLength`
|
|
20
|
+
* delimit the readable/writable region.
|
|
21
|
+
*/
|
|
22
|
+
static fromUint8Array(view: UniffiByteArray): RustBuffer;
|
|
23
|
+
get length(): number;
|
|
24
|
+
get byteArray(): UniffiByteArray;
|
|
25
|
+
readArrayBuffer(numBytes: number): ArrayBuffer;
|
|
26
|
+
readByteArray(numBytes: number): UniffiByteArray;
|
|
27
|
+
writeArrayBuffer(buffer: ArrayBufferLike): void;
|
|
28
|
+
writeByteArray(src: UniffiByteArray): void;
|
|
29
|
+
readWithView<T>(numBytes: number, reader: (view: DataView) => T): T;
|
|
30
|
+
writeWithView(numBytes: number, writer: (view: DataView) => void): void;
|
|
31
|
+
/**
|
|
32
|
+
* Advance the read cursor by `numBytes` and return the starting offset.
|
|
33
|
+
* Used to construct a typed-array view directly over the backing store.
|
|
34
|
+
*/
|
|
35
|
+
advanceReadOffset(numBytes: number): number;
|
|
36
|
+
/**
|
|
37
|
+
* Advance the write cursor by `numBytes` and return the starting offset.
|
|
38
|
+
* Used to construct a typed-array view directly over the backing store.
|
|
39
|
+
*/
|
|
40
|
+
advanceWriteOffset(numBytes: number): number;
|
|
41
|
+
/**
|
|
42
|
+
* Set the write cursor to an absolute position. Used to backfill after an
|
|
43
|
+
* in-place encode reports the actual number of bytes written.
|
|
44
|
+
*/
|
|
45
|
+
setWriteOffset(offset: number): void;
|
|
46
|
+
protected checkOverflow(start: number, numBytes: number): number;
|
|
47
|
+
}
|
|
48
|
+
//#endregion
|
|
49
|
+
//#region ../../../../../node_modules/@ubjs/core/dist/esm/ffi-converters.d.ts
|
|
50
|
+
type RustBufferAllocator = (n: number) => Uint8Array;
|
|
51
|
+
interface FfiConverter<FfiType, TsType> {
|
|
52
|
+
lift(value: FfiType): TsType;
|
|
53
|
+
lower(value: TsType, alloc: RustBufferAllocator): FfiType;
|
|
54
|
+
read(from: RustBuffer): TsType;
|
|
55
|
+
write(value: TsType, into: RustBuffer): void;
|
|
56
|
+
allocationSize(value: TsType): number;
|
|
57
|
+
}
|
|
58
|
+
//#endregion
|
|
59
|
+
//#region ../../../../../node_modules/@ubjs/core/dist/esm/handle-map.d.ts
|
|
60
|
+
type UniffiHandle = bigint;
|
|
61
|
+
//#endregion
|
|
62
|
+
//#region ../../../../../node_modules/@ubjs/core/dist/esm/rust-call.d.ts
|
|
63
|
+
/**
|
|
64
|
+
* A member of any object, acting as a GC guard / destructor guard.
|
|
65
|
+
*
|
|
66
|
+
* The object has a destructor lambda, called when the GC collects the object.
|
|
67
|
+
*/
|
|
68
|
+
type UniffiGcObject = {
|
|
69
|
+
/**
|
|
70
|
+
* Called by the `object.uniffiDestroy()` to disable the
|
|
71
|
+
* action of the destructor guard.
|
|
72
|
+
*/
|
|
73
|
+
markDestroyed(): void;
|
|
74
|
+
};
|
|
75
|
+
//#endregion
|
|
76
|
+
//#region ../../../../../node_modules/@ubjs/core/dist/esm/objects.d.ts
|
|
77
|
+
/**
|
|
78
|
+
* Marker interface for all `interface` objects that cross the FFI.
|
|
79
|
+
* Reminder: `interface` objects have methods written in Rust.
|
|
80
|
+
*
|
|
81
|
+
* This typesscript interface contains the unffi methods that are needed to make
|
|
82
|
+
* the FFI work. It should shrink to zero methods.
|
|
83
|
+
*/
|
|
84
|
+
declare abstract class UniffiAbstractObject {
|
|
85
|
+
/**
|
|
86
|
+
* Explicitly tell Rust to destroy the native peer that backs this object.
|
|
87
|
+
*
|
|
88
|
+
* Once this method has been called, any following method calls will throw an error.
|
|
89
|
+
*
|
|
90
|
+
* Can be called more than once.
|
|
91
|
+
*/
|
|
92
|
+
abstract uniffiDestroy(): void;
|
|
93
|
+
/**
|
|
94
|
+
* A convenience method to use this object, then destroy it after its use.
|
|
95
|
+
* @param block
|
|
96
|
+
* @returns
|
|
97
|
+
*/
|
|
98
|
+
uniffiUse<T>(block: (obj: this) => T): T;
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* The interface for a helper class generated for each `interface` class.
|
|
102
|
+
*
|
|
103
|
+
* Methods of this interface are not exposed to the API.
|
|
104
|
+
*/
|
|
105
|
+
interface UniffiObjectFactory<T> {
|
|
106
|
+
bless(pointer: UniffiHandle): UniffiGcObject;
|
|
107
|
+
unbless(ptr: UniffiGcObject): void;
|
|
108
|
+
create(pointer: UniffiHandle): T;
|
|
109
|
+
pointer(obj: T): UniffiHandle;
|
|
110
|
+
clonePointer(obj: T): UniffiHandle;
|
|
111
|
+
freePointer(pointer: UniffiHandle): void;
|
|
112
|
+
isConcreteType(obj: any): obj is T;
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* An FfiConverter for an object.
|
|
116
|
+
*/
|
|
117
|
+
declare class FfiConverterObject<T> implements FfiConverter<UniffiHandle, T> {
|
|
118
|
+
protected factory: UniffiObjectFactory<T>;
|
|
119
|
+
constructor(factory: UniffiObjectFactory<T>);
|
|
120
|
+
lift(value: UniffiHandle): T;
|
|
121
|
+
lower(value: T, _alloc: RustBufferAllocator): UniffiHandle;
|
|
122
|
+
read(from: RustBuffer): T;
|
|
123
|
+
write(value: T, into: RustBuffer): void;
|
|
124
|
+
protected lowerHandle(value: T): UniffiHandle;
|
|
125
|
+
allocationSize(value: T): number;
|
|
126
|
+
}
|
|
127
|
+
//#endregion
|
|
128
|
+
//#region ../../../../../node_modules/@ubjs/core/dist/esm/symbols.d.ts
|
|
129
|
+
/**
|
|
130
|
+
* A destructor guard object is created for every
|
|
131
|
+
* `interface` object.
|
|
132
|
+
*
|
|
133
|
+
* It corresponds to the `DestructibleObject` in C++, which
|
|
134
|
+
* uses a C++ destructor to simulate the JS garbage collector.
|
|
135
|
+
*
|
|
136
|
+
* The implementation is in {@link RustArcPtr.h}.
|
|
137
|
+
*/
|
|
138
|
+
declare const destructorGuardSymbol: unique symbol;
|
|
139
|
+
/**
|
|
140
|
+
* The `bigint` pointer corresponding to the Rust memory address
|
|
141
|
+
* of the native peer.
|
|
142
|
+
*/
|
|
143
|
+
declare const pointerLiteralSymbol: unique symbol;
|
|
144
|
+
/**
|
|
145
|
+
* The `string` name of the object, enum or error class.
|
|
146
|
+
*
|
|
147
|
+
* This drives the `instanceOf` method implementations.
|
|
148
|
+
*/
|
|
149
|
+
declare const uniffiTypeNameSymbol: unique symbol;
|
|
150
|
+
declare namespace verifox_plugin_mxf_d_exports {
|
|
151
|
+
export { Code, FieldViolation, MxfAuthor, MxfAuthorInterface, MxfAuthorLike, MxfPlugin, MxfPluginInterface, MxfPluginLike, RangeSink, RangeSource, Region, SdkError, SdkError_Tags, _default$1 as default };
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* One `google.rpc.BadRequest.FieldViolation`: a request field that failed a constraint.
|
|
155
|
+
*/
|
|
156
|
+
type FieldViolation = {
|
|
157
|
+
/**
|
|
158
|
+
* A dotted proto path to the offending field (`""` for a message-level rule).
|
|
159
|
+
*/
|
|
160
|
+
field: string;
|
|
161
|
+
/**
|
|
162
|
+
* Human-readable explanation of the violation.
|
|
163
|
+
*/
|
|
164
|
+
description: string;
|
|
165
|
+
/**
|
|
166
|
+
* The constraint id that failed (a protovalidate/CEL rule id), stable across releases.
|
|
167
|
+
*/
|
|
168
|
+
reason: string;
|
|
169
|
+
};
|
|
170
|
+
/**
|
|
171
|
+
* Generated factory for {@link FieldViolation} record objects.
|
|
172
|
+
*/
|
|
173
|
+
declare const FieldViolation: Readonly<{
|
|
174
|
+
create: (partial: Partial<FieldViolation> & Required<Omit<FieldViolation, never>>) => FieldViolation;
|
|
175
|
+
new: (partial: Partial<FieldViolation> & Required<Omit<FieldViolation, never>>) => FieldViolation;
|
|
176
|
+
defaults: () => Partial<FieldViolation>;
|
|
177
|
+
}>;
|
|
178
|
+
/**
|
|
179
|
+
* A byte window a manifest occupies. Structurally identical to the SDKs' `Region`, so the two
|
|
180
|
+
* cross the boundary without sharing a Rust type.
|
|
181
|
+
*/
|
|
182
|
+
type Region = {
|
|
183
|
+
offset: bigint;
|
|
184
|
+
length: bigint;
|
|
185
|
+
};
|
|
186
|
+
/**
|
|
187
|
+
* Generated factory for {@link Region} record objects.
|
|
188
|
+
*/
|
|
189
|
+
declare const Region: Readonly<{
|
|
190
|
+
create: (partial: Partial<Region> & Required<Omit<Region, never>>) => Region;
|
|
191
|
+
new: (partial: Partial<Region> & Required<Omit<Region, never>>) => Region;
|
|
192
|
+
defaults: () => Partial<Region>;
|
|
193
|
+
}>;
|
|
194
|
+
/**
|
|
195
|
+
* A canonical gRPC/Connect status code: the coarse, closed failure class.
|
|
196
|
+
*
|
|
197
|
+
* The wasm lane projects this as the Connect `snake_case` string, so a consumer
|
|
198
|
+
* narrows on `err.code === "resource_exhausted"`; the native lane projects an enum.
|
|
199
|
+
*/
|
|
200
|
+
declare enum Code {
|
|
201
|
+
Canceled = 0,
|
|
202
|
+
Unknown = 1,
|
|
203
|
+
InvalidArgument = 2,
|
|
204
|
+
DeadlineExceeded = 3,
|
|
205
|
+
NotFound = 4,
|
|
206
|
+
AlreadyExists = 5,
|
|
207
|
+
PermissionDenied = 6,
|
|
208
|
+
ResourceExhausted = 7,
|
|
209
|
+
FailedPrecondition = 8,
|
|
210
|
+
Aborted = 9,
|
|
211
|
+
OutOfRange = 10,
|
|
212
|
+
Unimplemented = 11,
|
|
213
|
+
Internal = 12,
|
|
214
|
+
Unavailable = 13,
|
|
215
|
+
DataLoss = 14,
|
|
216
|
+
Unauthenticated = 15
|
|
217
|
+
}
|
|
218
|
+
declare enum SdkError_Tags {
|
|
219
|
+
Reason = "Reason",
|
|
220
|
+
Invalid = "Invalid",
|
|
221
|
+
Status = "Status"
|
|
222
|
+
}
|
|
223
|
+
/**
|
|
224
|
+
* The error every SDK call throws: a decoded `google.rpc.Status`, discriminated
|
|
225
|
+
* as a semantic reason, a request validation, or a bare status. `code` and `message`
|
|
226
|
+
* are common to every variant.
|
|
227
|
+
*/
|
|
228
|
+
declare const SdkError: Readonly<{
|
|
229
|
+
instanceOf: (obj: any) => obj is SdkError;
|
|
230
|
+
Reason: {
|
|
231
|
+
new (inner: {
|
|
232
|
+
code: Code;
|
|
233
|
+
message: string;
|
|
234
|
+
reason: string;
|
|
235
|
+
domain: string;
|
|
236
|
+
metadata: Map<string, string>;
|
|
237
|
+
}): {
|
|
238
|
+
/**
|
|
239
|
+
* @private
|
|
240
|
+
* This field is private and should not be used, use `tag` instead.
|
|
241
|
+
*/
|
|
242
|
+
readonly [uniffiTypeNameSymbol]: "SdkError";
|
|
243
|
+
readonly tag: SdkError_Tags.Reason;
|
|
244
|
+
readonly inner: Readonly<{
|
|
245
|
+
code: Code;
|
|
246
|
+
message: string;
|
|
247
|
+
reason: string;
|
|
248
|
+
domain: string;
|
|
249
|
+
metadata: Map<string, string>;
|
|
250
|
+
}>;
|
|
251
|
+
name: string;
|
|
252
|
+
message: string;
|
|
253
|
+
stack?: string;
|
|
254
|
+
cause?: unknown;
|
|
255
|
+
};
|
|
256
|
+
"new"(inner: {
|
|
257
|
+
code: Code;
|
|
258
|
+
message: string;
|
|
259
|
+
reason: string;
|
|
260
|
+
domain: string;
|
|
261
|
+
metadata: Map<string, string>;
|
|
262
|
+
}): {
|
|
263
|
+
/**
|
|
264
|
+
* @private
|
|
265
|
+
* This field is private and should not be used, use `tag` instead.
|
|
266
|
+
*/
|
|
267
|
+
readonly [uniffiTypeNameSymbol]: "SdkError";
|
|
268
|
+
readonly tag: SdkError_Tags.Reason;
|
|
269
|
+
readonly inner: Readonly<{
|
|
270
|
+
code: Code;
|
|
271
|
+
message: string;
|
|
272
|
+
reason: string;
|
|
273
|
+
domain: string;
|
|
274
|
+
metadata: Map<string, string>;
|
|
275
|
+
}>;
|
|
276
|
+
name: string;
|
|
277
|
+
message: string;
|
|
278
|
+
stack?: string;
|
|
279
|
+
cause?: unknown;
|
|
280
|
+
};
|
|
281
|
+
instanceOf(obj: any): obj is {
|
|
282
|
+
/**
|
|
283
|
+
* @private
|
|
284
|
+
* This field is private and should not be used, use `tag` instead.
|
|
285
|
+
*/
|
|
286
|
+
readonly [uniffiTypeNameSymbol]: "SdkError";
|
|
287
|
+
readonly tag: SdkError_Tags.Reason;
|
|
288
|
+
readonly inner: Readonly<{
|
|
289
|
+
code: Code;
|
|
290
|
+
message: string;
|
|
291
|
+
reason: string;
|
|
292
|
+
domain: string;
|
|
293
|
+
metadata: Map<string, string>;
|
|
294
|
+
}>;
|
|
295
|
+
name: string;
|
|
296
|
+
message: string;
|
|
297
|
+
stack?: string;
|
|
298
|
+
cause?: unknown;
|
|
299
|
+
};
|
|
300
|
+
hasInner(obj: any): obj is {
|
|
301
|
+
/**
|
|
302
|
+
* @private
|
|
303
|
+
* This field is private and should not be used, use `tag` instead.
|
|
304
|
+
*/
|
|
305
|
+
readonly [uniffiTypeNameSymbol]: "SdkError";
|
|
306
|
+
readonly tag: SdkError_Tags.Reason;
|
|
307
|
+
readonly inner: Readonly<{
|
|
308
|
+
code: Code;
|
|
309
|
+
message: string;
|
|
310
|
+
reason: string;
|
|
311
|
+
domain: string;
|
|
312
|
+
metadata: Map<string, string>;
|
|
313
|
+
}>;
|
|
314
|
+
name: string;
|
|
315
|
+
message: string;
|
|
316
|
+
stack?: string;
|
|
317
|
+
cause?: unknown;
|
|
318
|
+
};
|
|
319
|
+
getInner(obj: {
|
|
320
|
+
/**
|
|
321
|
+
* @private
|
|
322
|
+
* This field is private and should not be used, use `tag` instead.
|
|
323
|
+
*/
|
|
324
|
+
readonly [uniffiTypeNameSymbol]: "SdkError";
|
|
325
|
+
readonly tag: SdkError_Tags.Reason;
|
|
326
|
+
readonly inner: Readonly<{
|
|
327
|
+
code: Code;
|
|
328
|
+
message: string;
|
|
329
|
+
reason: string;
|
|
330
|
+
domain: string;
|
|
331
|
+
metadata: Map<string, string>;
|
|
332
|
+
}>;
|
|
333
|
+
name: string;
|
|
334
|
+
message: string;
|
|
335
|
+
stack?: string;
|
|
336
|
+
cause?: unknown;
|
|
337
|
+
}): Readonly<{
|
|
338
|
+
code: Code;
|
|
339
|
+
message: string;
|
|
340
|
+
reason: string;
|
|
341
|
+
domain: string;
|
|
342
|
+
metadata: Map<string, string>;
|
|
343
|
+
}>;
|
|
344
|
+
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
345
|
+
prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
|
|
346
|
+
stackTraceLimit: number;
|
|
347
|
+
};
|
|
348
|
+
Invalid: {
|
|
349
|
+
new (inner: {
|
|
350
|
+
code: Code;
|
|
351
|
+
message: string;
|
|
352
|
+
fieldViolations: Array<FieldViolation>;
|
|
353
|
+
}): {
|
|
354
|
+
/**
|
|
355
|
+
* @private
|
|
356
|
+
* This field is private and should not be used, use `tag` instead.
|
|
357
|
+
*/
|
|
358
|
+
readonly [uniffiTypeNameSymbol]: "SdkError";
|
|
359
|
+
readonly tag: SdkError_Tags.Invalid;
|
|
360
|
+
readonly inner: Readonly<{
|
|
361
|
+
code: Code;
|
|
362
|
+
message: string;
|
|
363
|
+
fieldViolations: Array<FieldViolation>;
|
|
364
|
+
}>;
|
|
365
|
+
name: string;
|
|
366
|
+
message: string;
|
|
367
|
+
stack?: string;
|
|
368
|
+
cause?: unknown;
|
|
369
|
+
};
|
|
370
|
+
"new"(inner: {
|
|
371
|
+
code: Code;
|
|
372
|
+
message: string;
|
|
373
|
+
fieldViolations: Array<FieldViolation>;
|
|
374
|
+
}): {
|
|
375
|
+
/**
|
|
376
|
+
* @private
|
|
377
|
+
* This field is private and should not be used, use `tag` instead.
|
|
378
|
+
*/
|
|
379
|
+
readonly [uniffiTypeNameSymbol]: "SdkError";
|
|
380
|
+
readonly tag: SdkError_Tags.Invalid;
|
|
381
|
+
readonly inner: Readonly<{
|
|
382
|
+
code: Code;
|
|
383
|
+
message: string;
|
|
384
|
+
fieldViolations: Array<FieldViolation>;
|
|
385
|
+
}>;
|
|
386
|
+
name: string;
|
|
387
|
+
message: string;
|
|
388
|
+
stack?: string;
|
|
389
|
+
cause?: unknown;
|
|
390
|
+
};
|
|
391
|
+
instanceOf(obj: any): obj is {
|
|
392
|
+
/**
|
|
393
|
+
* @private
|
|
394
|
+
* This field is private and should not be used, use `tag` instead.
|
|
395
|
+
*/
|
|
396
|
+
readonly [uniffiTypeNameSymbol]: "SdkError";
|
|
397
|
+
readonly tag: SdkError_Tags.Invalid;
|
|
398
|
+
readonly inner: Readonly<{
|
|
399
|
+
code: Code;
|
|
400
|
+
message: string;
|
|
401
|
+
fieldViolations: Array<FieldViolation>;
|
|
402
|
+
}>;
|
|
403
|
+
name: string;
|
|
404
|
+
message: string;
|
|
405
|
+
stack?: string;
|
|
406
|
+
cause?: unknown;
|
|
407
|
+
};
|
|
408
|
+
hasInner(obj: any): obj is {
|
|
409
|
+
/**
|
|
410
|
+
* @private
|
|
411
|
+
* This field is private and should not be used, use `tag` instead.
|
|
412
|
+
*/
|
|
413
|
+
readonly [uniffiTypeNameSymbol]: "SdkError";
|
|
414
|
+
readonly tag: SdkError_Tags.Invalid;
|
|
415
|
+
readonly inner: Readonly<{
|
|
416
|
+
code: Code;
|
|
417
|
+
message: string;
|
|
418
|
+
fieldViolations: Array<FieldViolation>;
|
|
419
|
+
}>;
|
|
420
|
+
name: string;
|
|
421
|
+
message: string;
|
|
422
|
+
stack?: string;
|
|
423
|
+
cause?: unknown;
|
|
424
|
+
};
|
|
425
|
+
getInner(obj: {
|
|
426
|
+
/**
|
|
427
|
+
* @private
|
|
428
|
+
* This field is private and should not be used, use `tag` instead.
|
|
429
|
+
*/
|
|
430
|
+
readonly [uniffiTypeNameSymbol]: "SdkError";
|
|
431
|
+
readonly tag: SdkError_Tags.Invalid;
|
|
432
|
+
readonly inner: Readonly<{
|
|
433
|
+
code: Code;
|
|
434
|
+
message: string;
|
|
435
|
+
fieldViolations: Array<FieldViolation>;
|
|
436
|
+
}>;
|
|
437
|
+
name: string;
|
|
438
|
+
message: string;
|
|
439
|
+
stack?: string;
|
|
440
|
+
cause?: unknown;
|
|
441
|
+
}): Readonly<{
|
|
442
|
+
code: Code;
|
|
443
|
+
message: string;
|
|
444
|
+
fieldViolations: Array<FieldViolation>;
|
|
445
|
+
}>;
|
|
446
|
+
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
447
|
+
prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
|
|
448
|
+
stackTraceLimit: number;
|
|
449
|
+
};
|
|
450
|
+
Status: {
|
|
451
|
+
new (inner: {
|
|
452
|
+
code: Code;
|
|
453
|
+
message: string;
|
|
454
|
+
}): {
|
|
455
|
+
/**
|
|
456
|
+
* @private
|
|
457
|
+
* This field is private and should not be used, use `tag` instead.
|
|
458
|
+
*/
|
|
459
|
+
readonly [uniffiTypeNameSymbol]: "SdkError";
|
|
460
|
+
readonly tag: SdkError_Tags.Status;
|
|
461
|
+
readonly inner: Readonly<{
|
|
462
|
+
code: Code;
|
|
463
|
+
message: string;
|
|
464
|
+
}>;
|
|
465
|
+
name: string;
|
|
466
|
+
message: string;
|
|
467
|
+
stack?: string;
|
|
468
|
+
cause?: unknown;
|
|
469
|
+
};
|
|
470
|
+
"new"(inner: {
|
|
471
|
+
code: Code;
|
|
472
|
+
message: string;
|
|
473
|
+
}): {
|
|
474
|
+
/**
|
|
475
|
+
* @private
|
|
476
|
+
* This field is private and should not be used, use `tag` instead.
|
|
477
|
+
*/
|
|
478
|
+
readonly [uniffiTypeNameSymbol]: "SdkError";
|
|
479
|
+
readonly tag: SdkError_Tags.Status;
|
|
480
|
+
readonly inner: Readonly<{
|
|
481
|
+
code: Code;
|
|
482
|
+
message: string;
|
|
483
|
+
}>;
|
|
484
|
+
name: string;
|
|
485
|
+
message: string;
|
|
486
|
+
stack?: string;
|
|
487
|
+
cause?: unknown;
|
|
488
|
+
};
|
|
489
|
+
instanceOf(obj: any): obj is {
|
|
490
|
+
/**
|
|
491
|
+
* @private
|
|
492
|
+
* This field is private and should not be used, use `tag` instead.
|
|
493
|
+
*/
|
|
494
|
+
readonly [uniffiTypeNameSymbol]: "SdkError";
|
|
495
|
+
readonly tag: SdkError_Tags.Status;
|
|
496
|
+
readonly inner: Readonly<{
|
|
497
|
+
code: Code;
|
|
498
|
+
message: string;
|
|
499
|
+
}>;
|
|
500
|
+
name: string;
|
|
501
|
+
message: string;
|
|
502
|
+
stack?: string;
|
|
503
|
+
cause?: unknown;
|
|
504
|
+
};
|
|
505
|
+
hasInner(obj: any): obj is {
|
|
506
|
+
/**
|
|
507
|
+
* @private
|
|
508
|
+
* This field is private and should not be used, use `tag` instead.
|
|
509
|
+
*/
|
|
510
|
+
readonly [uniffiTypeNameSymbol]: "SdkError";
|
|
511
|
+
readonly tag: SdkError_Tags.Status;
|
|
512
|
+
readonly inner: Readonly<{
|
|
513
|
+
code: Code;
|
|
514
|
+
message: string;
|
|
515
|
+
}>;
|
|
516
|
+
name: string;
|
|
517
|
+
message: string;
|
|
518
|
+
stack?: string;
|
|
519
|
+
cause?: unknown;
|
|
520
|
+
};
|
|
521
|
+
getInner(obj: {
|
|
522
|
+
/**
|
|
523
|
+
* @private
|
|
524
|
+
* This field is private and should not be used, use `tag` instead.
|
|
525
|
+
*/
|
|
526
|
+
readonly [uniffiTypeNameSymbol]: "SdkError";
|
|
527
|
+
readonly tag: SdkError_Tags.Status;
|
|
528
|
+
readonly inner: Readonly<{
|
|
529
|
+
code: Code;
|
|
530
|
+
message: string;
|
|
531
|
+
}>;
|
|
532
|
+
name: string;
|
|
533
|
+
message: string;
|
|
534
|
+
stack?: string;
|
|
535
|
+
cause?: unknown;
|
|
536
|
+
}): Readonly<{
|
|
537
|
+
code: Code;
|
|
538
|
+
message: string;
|
|
539
|
+
}>;
|
|
540
|
+
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
541
|
+
prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
|
|
542
|
+
stackTraceLimit: number;
|
|
543
|
+
};
|
|
544
|
+
}>;
|
|
545
|
+
/**
|
|
546
|
+
* The error every SDK call throws: a decoded `google.rpc.Status`, discriminated
|
|
547
|
+
* as a semantic reason, a request validation, or a bare status. `code` and `message`
|
|
548
|
+
* are common to every variant.
|
|
549
|
+
*/
|
|
550
|
+
type SdkError = InstanceType<typeof SdkError['Reason' | 'Invalid' | 'Status']>;
|
|
551
|
+
/**
|
|
552
|
+
* A ranged byte source the core lends the plugin. Async because the handle that arrives here is
|
|
553
|
+
* the SDK's own, whose seam is async so the caller's storage may be a round trip; the two must
|
|
554
|
+
* agree method for method or the handle cannot cross.
|
|
555
|
+
*
|
|
556
|
+
* Both methods are fallible: an infallible `read_at` can only report a failed read as a short
|
|
557
|
+
* one, indistinguishable from a legitimate end of file, so a storage timeout would silently
|
|
558
|
+
* author against a truncated asset.
|
|
559
|
+
*/
|
|
560
|
+
interface RangeSource {
|
|
561
|
+
length(asyncOpts_?: {
|
|
562
|
+
signal: AbortSignal;
|
|
563
|
+
}): Promise<bigint>;
|
|
564
|
+
readAt(offset: bigint, length: number, asyncOpts_?: {
|
|
565
|
+
signal: AbortSignal;
|
|
566
|
+
}): Promise<ArrayBuffer>;
|
|
567
|
+
}
|
|
568
|
+
/**
|
|
569
|
+
* A ranged read+write backend, for `reserve_slot`. All four methods are first-class: UniFFI has
|
|
570
|
+
* no trait inheritance for foreign callbacks, so the read half is duplicated from
|
|
571
|
+
* [`RangeSource`] rather than extended.
|
|
572
|
+
*/
|
|
573
|
+
interface RangeSink {
|
|
574
|
+
length(asyncOpts_?: {
|
|
575
|
+
signal: AbortSignal;
|
|
576
|
+
}): Promise<bigint>;
|
|
577
|
+
readAt(offset: bigint, length: number, asyncOpts_?: {
|
|
578
|
+
signal: AbortSignal;
|
|
579
|
+
}): Promise<ArrayBuffer>;
|
|
580
|
+
writeAt(offset: bigint, data: ArrayBuffer, asyncOpts_?: {
|
|
581
|
+
signal: AbortSignal;
|
|
582
|
+
}): Promise<void>;
|
|
583
|
+
setLength(length: bigint, asyncOpts_?: {
|
|
584
|
+
signal: AbortSignal;
|
|
585
|
+
}): Promise<void>;
|
|
586
|
+
}
|
|
587
|
+
/**
|
|
588
|
+
* MXF slot authoring, as the object a host registers on the issuer's `PluginRegistry`.
|
|
589
|
+
*
|
|
590
|
+
* The four methods mirror the issuer's `PluginAuthor` exactly. They are declared flat,
|
|
591
|
+
* because UniFFI has no trait inheritance for foreign callbacks, so the generated binding
|
|
592
|
+
* satisfies that interface as-is, with nothing in between.
|
|
593
|
+
*/
|
|
594
|
+
interface MxfAuthorLike {
|
|
595
|
+
/**
|
|
596
|
+
* The manifest window(s), or empty when the asset carries none. Byte-identical whether
|
|
597
|
+
* the slot is empty, filled or zeroed: the SDK round-trips this and fails the sign if
|
|
598
|
+
* it drifts.
|
|
599
|
+
*
|
|
600
|
+
* # Errors
|
|
601
|
+
*
|
|
602
|
+
* [`SdkError`] when the source cannot be read or the MXF structure is malformed.
|
|
603
|
+
*/
|
|
604
|
+
locate(src: RangeSource, asyncOpts_?: {
|
|
605
|
+
signal: AbortSignal;
|
|
606
|
+
}): Promise<Array<Region>>;
|
|
607
|
+
/**
|
|
608
|
+
* The media types this plugin owns. The SDK asserts any `sniff` result is a member.
|
|
609
|
+
*/
|
|
610
|
+
mediaTypes(): Array<string>;
|
|
611
|
+
/**
|
|
612
|
+
* Reserve `reserve` bytes of manifest slot by writing MXF structure through `dst`, and
|
|
613
|
+
* return exactly where it landed. Never embeds: the SDK writes the signed manifest into
|
|
614
|
+
* the returned regions.
|
|
615
|
+
*
|
|
616
|
+
* # Errors
|
|
617
|
+
*
|
|
618
|
+
* [`SdkError`] when the sink cannot be written or `reserve` exceeds a `u32` slot.
|
|
619
|
+
*/
|
|
620
|
+
reserveSlot(dst: RangeSink, reserve: bigint, asyncOpts_?: {
|
|
621
|
+
signal: AbortSignal;
|
|
622
|
+
}): Promise<Array<Region>>;
|
|
623
|
+
/**
|
|
624
|
+
* Recognize MXF from the real bytes, or `None` to decline.
|
|
625
|
+
*
|
|
626
|
+
* # Errors
|
|
627
|
+
*
|
|
628
|
+
* [`SdkError`] when the source cannot be read.
|
|
629
|
+
*/
|
|
630
|
+
sniff(src: RangeSource, asyncOpts_?: {
|
|
631
|
+
signal: AbortSignal;
|
|
632
|
+
}): Promise<string | undefined>;
|
|
633
|
+
}
|
|
634
|
+
/**
|
|
635
|
+
* @deprecated Use `MxfAuthorLike` instead.
|
|
636
|
+
*/
|
|
637
|
+
type MxfAuthorInterface = MxfAuthorLike;
|
|
638
|
+
/**
|
|
639
|
+
* MXF slot authoring, as the object a host registers on the issuer's `PluginRegistry`.
|
|
640
|
+
*
|
|
641
|
+
* The four methods mirror the issuer's `PluginAuthor` exactly. They are declared flat,
|
|
642
|
+
* because UniFFI has no trait inheritance for foreign callbacks, so the generated binding
|
|
643
|
+
* satisfies that interface as-is, with nothing in between.
|
|
644
|
+
*/
|
|
645
|
+
declare class MxfAuthor extends UniffiAbstractObject implements MxfAuthorLike {
|
|
646
|
+
readonly [uniffiTypeNameSymbol] = "MxfAuthor";
|
|
647
|
+
readonly [destructorGuardSymbol]: UniffiGcObject;
|
|
648
|
+
readonly [pointerLiteralSymbol]: UniffiHandle;
|
|
649
|
+
constructor();
|
|
650
|
+
/**
|
|
651
|
+
* The manifest window(s), or empty when the asset carries none. Byte-identical whether
|
|
652
|
+
* the slot is empty, filled or zeroed: the SDK round-trips this and fails the sign if
|
|
653
|
+
* it drifts.
|
|
654
|
+
*
|
|
655
|
+
* # Errors
|
|
656
|
+
*
|
|
657
|
+
* [`SdkError`] when the source cannot be read or the MXF structure is malformed.
|
|
658
|
+
*/
|
|
659
|
+
locate(src: RangeSource, asyncOpts_?: {
|
|
660
|
+
signal: AbortSignal;
|
|
661
|
+
}): Promise<Array<Region>>;
|
|
662
|
+
/**
|
|
663
|
+
* The media types this plugin owns. The SDK asserts any `sniff` result is a member.
|
|
664
|
+
*/
|
|
665
|
+
mediaTypes(): Array<string>;
|
|
666
|
+
/**
|
|
667
|
+
* Reserve `reserve` bytes of manifest slot by writing MXF structure through `dst`, and
|
|
668
|
+
* return exactly where it landed. Never embeds: the SDK writes the signed manifest into
|
|
669
|
+
* the returned regions.
|
|
670
|
+
*
|
|
671
|
+
* # Errors
|
|
672
|
+
*
|
|
673
|
+
* [`SdkError`] when the sink cannot be written or `reserve` exceeds a `u32` slot.
|
|
674
|
+
*/
|
|
675
|
+
reserveSlot(dst: RangeSink, reserve: bigint, asyncOpts_?: {
|
|
676
|
+
signal: AbortSignal;
|
|
677
|
+
}): Promise<Array<Region>>;
|
|
678
|
+
/**
|
|
679
|
+
* Recognize MXF from the real bytes, or `None` to decline.
|
|
680
|
+
*
|
|
681
|
+
* # Errors
|
|
682
|
+
*
|
|
683
|
+
* [`SdkError`] when the source cannot be read.
|
|
684
|
+
*/
|
|
685
|
+
sniff(src: RangeSource, asyncOpts_?: {
|
|
686
|
+
signal: AbortSignal;
|
|
687
|
+
}): Promise<string | undefined>;
|
|
688
|
+
uniffiDestroy(): void;
|
|
689
|
+
static instanceOf(obj_: any): obj_ is MxfAuthor;
|
|
690
|
+
}
|
|
691
|
+
/**
|
|
692
|
+
* MXF reading, as the object a host registers on the verifier's `PluginRegistry`.
|
|
693
|
+
*
|
|
694
|
+
* The three methods mirror the verifier's `PluginRead` exactly, so the generated binding
|
|
695
|
+
* satisfies that interface as-is. Carries no libMXF++: locating a slot is pure Rust.
|
|
696
|
+
*/
|
|
697
|
+
interface MxfPluginLike {
|
|
698
|
+
/**
|
|
699
|
+
* The manifest window(s), or empty when the asset carries none. What the verifier hashes
|
|
700
|
+
* around: everything reported here is excluded from the signed content hash.
|
|
701
|
+
*
|
|
702
|
+
* # Errors
|
|
703
|
+
*
|
|
704
|
+
* [`SdkError`] when the source cannot be read or the MXF structure is malformed.
|
|
705
|
+
*/
|
|
706
|
+
locate(src: RangeSource, asyncOpts_?: {
|
|
707
|
+
signal: AbortSignal;
|
|
708
|
+
}): Promise<Array<Region>>;
|
|
709
|
+
/**
|
|
710
|
+
* The media types this plugin owns. The SDK asserts any `sniff` result is a member.
|
|
711
|
+
*/
|
|
712
|
+
mediaTypes(): Array<string>;
|
|
713
|
+
/**
|
|
714
|
+
* Recognize MXF from the real bytes, or `None` to decline.
|
|
715
|
+
*
|
|
716
|
+
* # Errors
|
|
717
|
+
*
|
|
718
|
+
* [`SdkError`] when the source cannot be read.
|
|
719
|
+
*/
|
|
720
|
+
sniff(src: RangeSource, asyncOpts_?: {
|
|
721
|
+
signal: AbortSignal;
|
|
722
|
+
}): Promise<string | undefined>;
|
|
723
|
+
}
|
|
724
|
+
/**
|
|
725
|
+
* @deprecated Use `MxfPluginLike` instead.
|
|
726
|
+
*/
|
|
727
|
+
type MxfPluginInterface = MxfPluginLike;
|
|
728
|
+
/**
|
|
729
|
+
* MXF reading, as the object a host registers on the verifier's `PluginRegistry`.
|
|
730
|
+
*
|
|
731
|
+
* The three methods mirror the verifier's `PluginRead` exactly, so the generated binding
|
|
732
|
+
* satisfies that interface as-is. Carries no libMXF++: locating a slot is pure Rust.
|
|
733
|
+
*/
|
|
734
|
+
declare class MxfPlugin extends UniffiAbstractObject implements MxfPluginLike {
|
|
735
|
+
readonly [uniffiTypeNameSymbol] = "MxfPlugin";
|
|
736
|
+
readonly [destructorGuardSymbol]: UniffiGcObject;
|
|
737
|
+
readonly [pointerLiteralSymbol]: UniffiHandle;
|
|
738
|
+
constructor();
|
|
739
|
+
/**
|
|
740
|
+
* The manifest window(s), or empty when the asset carries none. What the verifier hashes
|
|
741
|
+
* around: everything reported here is excluded from the signed content hash.
|
|
742
|
+
*
|
|
743
|
+
* # Errors
|
|
744
|
+
*
|
|
745
|
+
* [`SdkError`] when the source cannot be read or the MXF structure is malformed.
|
|
746
|
+
*/
|
|
747
|
+
locate(src: RangeSource, asyncOpts_?: {
|
|
748
|
+
signal: AbortSignal;
|
|
749
|
+
}): Promise<Array<Region>>;
|
|
750
|
+
/**
|
|
751
|
+
* The media types this plugin owns. The SDK asserts any `sniff` result is a member.
|
|
752
|
+
*/
|
|
753
|
+
mediaTypes(): Array<string>;
|
|
754
|
+
/**
|
|
755
|
+
* Recognize MXF from the real bytes, or `None` to decline.
|
|
756
|
+
*
|
|
757
|
+
* # Errors
|
|
758
|
+
*
|
|
759
|
+
* [`SdkError`] when the source cannot be read.
|
|
760
|
+
*/
|
|
761
|
+
sniff(src: RangeSource, asyncOpts_?: {
|
|
762
|
+
signal: AbortSignal;
|
|
763
|
+
}): Promise<string | undefined>;
|
|
764
|
+
uniffiDestroy(): void;
|
|
765
|
+
static instanceOf(obj_: any): obj_ is MxfPlugin;
|
|
766
|
+
}
|
|
767
|
+
/**
|
|
768
|
+
* This should be called before anything else.
|
|
769
|
+
*
|
|
770
|
+
* It is likely that this is being done for you by the library's `index.ts`.
|
|
771
|
+
*
|
|
772
|
+
* It checks versions of uniffi between when the Rust scaffolding was generated
|
|
773
|
+
* and when the bindings were generated.
|
|
774
|
+
*
|
|
775
|
+
* It also initializes the machinery to enable Rust to talk back to Javascript.
|
|
776
|
+
*/
|
|
777
|
+
declare function uniffiEnsureInitialized(): void;
|
|
778
|
+
declare const _default$1: Readonly<{
|
|
779
|
+
initialize: typeof uniffiEnsureInitialized;
|
|
780
|
+
converters: {
|
|
781
|
+
FfiConverterTypeCode: {
|
|
782
|
+
read(from: RustBuffer): Code;
|
|
783
|
+
write(value: Code, into: RustBuffer): void;
|
|
784
|
+
allocationSize(value: Code): number;
|
|
785
|
+
lift(value: UniffiByteArray): Code;
|
|
786
|
+
lower(value: Code, alloc: RustBufferAllocator): UniffiByteArray;
|
|
787
|
+
};
|
|
788
|
+
FfiConverterTypeFieldViolation: {
|
|
789
|
+
read(from: RustBuffer): FieldViolation;
|
|
790
|
+
write(value: FieldViolation, into: RustBuffer): void;
|
|
791
|
+
allocationSize(value: FieldViolation): number;
|
|
792
|
+
lift(value: UniffiByteArray): FieldViolation;
|
|
793
|
+
lower(value: FieldViolation, alloc: RustBufferAllocator): UniffiByteArray;
|
|
794
|
+
};
|
|
795
|
+
FfiConverterTypeMxfAuthor: FfiConverterObject<MxfAuthorLike>;
|
|
796
|
+
FfiConverterTypeMxfPlugin: FfiConverterObject<MxfPluginLike>;
|
|
797
|
+
FfiConverterTypeRegion: {
|
|
798
|
+
read(from: RustBuffer): Region;
|
|
799
|
+
write(value: Region, into: RustBuffer): void;
|
|
800
|
+
allocationSize(value: Region): number;
|
|
801
|
+
lift(value: UniffiByteArray): Region;
|
|
802
|
+
lower(value: Region, alloc: RustBufferAllocator): UniffiByteArray;
|
|
803
|
+
};
|
|
804
|
+
FfiConverterTypeSdkError: {
|
|
805
|
+
read(from: RustBuffer): SdkError;
|
|
806
|
+
write(value: SdkError, into: RustBuffer): void;
|
|
807
|
+
allocationSize(value: SdkError): number;
|
|
808
|
+
lift(value: UniffiByteArray): SdkError;
|
|
809
|
+
lower(value: SdkError, alloc: RustBufferAllocator): UniffiByteArray;
|
|
810
|
+
};
|
|
811
|
+
};
|
|
812
|
+
}>;
|
|
813
|
+
//#endregion
|
|
814
|
+
//#region ../../../../../target/verifox/codegen/ffi-verifox_plugin_mxf/index.d.ts
|
|
815
|
+
declare function uniffiInitAsync(): Promise<void>;
|
|
816
|
+
declare const _default: {
|
|
817
|
+
verifox_plugin_mxf: typeof verifox_plugin_mxf_d_exports;
|
|
818
|
+
};
|
|
819
|
+
//#endregion
|
|
820
|
+
export { Code, FieldViolation, MxfAuthor, MxfAuthorInterface, MxfAuthorLike, MxfPlugin, MxfPluginInterface, MxfPluginLike, RangeSink, RangeSource, Region, SdkError, SdkError_Tags, _default as default, uniffiInitAsync };
|