@reallyme/codec 0.1.22 → 0.2.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.
@@ -0,0 +1,31 @@
1
+ import type { CodecOperationRequest, CodecOperationResult } from "./proto/generated/reallyme/codec/v1/codec_pb.js";
2
+ /**
3
+ * Execute one binary generated-protobuf request and return the fully
4
+ * discriminated binary `CodecOperationResponse`.
5
+ *
6
+ * Oversized requests are rejected before the provider call. Malformed and
7
+ * unsupported in-limit requests are represented by the response error oneof
8
+ * rather than a boundary-local exception.
9
+ */
10
+ export declare const processOperation: (requestBytes: Uint8Array) => Uint8Array;
11
+ /**
12
+ * Execute one generated ProtoJSON request and return the same discriminated
13
+ * binary response used by `processOperation`.
14
+ */
15
+ export declare const processOperationJson: (requestJson: Uint8Array) => Uint8Array;
16
+ /**
17
+ * Execute a generated request through the fully discriminated response lane.
18
+ *
19
+ * Structured convenience methods use this boundary so a provider cannot
20
+ * return a valid payload of the wrong operation-specific result type.
21
+ */
22
+ export declare const processGeneratedOperationRequest: (request: CodecOperationRequest) => CodecOperationResult;
23
+ /**
24
+ * Clears mutable byte owners held by a generated operation result.
25
+ *
26
+ * Callers invoke this before rejecting an unexpected valid oneof variant and
27
+ * after copying a sensitive result into its public SDK owner. JavaScript
28
+ * strings remain subject to the managed-runtime memory model, but every
29
+ * mutable `Uint8Array` created by this adapter is released promptly.
30
+ */
31
+ export declare const clearGeneratedOperationResult: (result: CodecOperationResult) => void;