space-data-module-sdk 0.8.27 → 0.9.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.
- package/README.md +5 -4
- package/docs/assembly.js +0 -18
- package/docs/assets/ai-credits/ai-credits.js +116 -0
- package/docs/assets/sdn-chrome/sdn-chrome.css +434 -0
- package/docs/assets/sdn-chrome/sdn-chrome.js +236 -0
- package/docs/browser-wasmedge-isomorphic.html +29 -41
- package/docs/byo-wasm-quickstart.html +29 -41
- package/docs/conformance.html +29 -41
- package/docs/events-abi.html +29 -41
- package/docs/families/analytics.html +29 -41
- package/docs/families/attitude.html +29 -41
- package/docs/families/behavior.html +29 -41
- package/docs/families/breakup.html +29 -41
- package/docs/families/conjunction.html +29 -41
- package/docs/families/data-source.html +29 -41
- package/docs/families/effects.html +29 -41
- package/docs/families/environment.html +29 -41
- package/docs/families/estimation.html +29 -41
- package/docs/families/gnc.html +29 -41
- package/docs/families/maneuver.html +29 -41
- package/docs/families/obstruction.html +29 -41
- package/docs/families/propagator.html +29 -41
- package/docs/families/propulsion.html +29 -41
- package/docs/families/reentry.html +29 -41
- package/docs/families/rf.html +29 -41
- package/docs/families/scheduler.html +29 -41
- package/docs/families/sensor.html +29 -41
- package/docs/families/signature.html +29 -41
- package/docs/flatsql-host-contract.html +29 -41
- package/docs/flatsql-streaming-standard.html +29 -41
- package/docs/gpu-module-abi.html +29 -41
- package/docs/index.html +43 -47
- package/docs/isomorphic-pthreads.html +29 -41
- package/docs/isomorphic-sdn-runtime-plan.html +29 -41
- package/docs/language-runtime-matrix.html +29 -41
- package/docs/media/module-sdk-reel-poster.webp +0 -0
- package/docs/media/module-sdk-reel.mp4 +0 -0
- package/docs/media/module-sdk-reel.webm +0 -0
- package/docs/media/reel/reel.css +53 -0
- package/docs/media/reel/reel.js +272 -0
- package/docs/module-bundle-runtime-plan.html +29 -41
- package/docs/module-publication-standard.html +29 -41
- package/docs/node-red-default-node-parity.html +29 -41
- package/docs/protect-and-sign.html +29 -41
- package/docs/protocol-installation.html +29 -41
- package/docs/publication-submission.html +29 -41
- package/docs/secrets-capability.html +29 -41
- package/docs/styles.css +89 -157
- package/docs/testing-harness.html +29 -41
- package/docs/tri-runtime-parity-gate.html +29 -41
- package/docs/tri-runtime-parity.html +29 -41
- package/package.json +5 -3
- package/schemas/runtime/FlowNotice.fbs +39 -0
- package/schemas/runtime/HostOps.fbs +455 -0
- package/schemas/runtime/HttpRequest.fbs +25 -0
- package/schemas/runtime/HttpResponse.fbs +24 -0
- package/schemas/runtime/IngestRequest.fbs +61 -0
- package/schemas/runtime/IngestResult.fbs +23 -0
- package/schemas/runtime/ModuleConfig.fbs +41 -0
- package/schemas/runtime/RuntimeCommon.fbs +33 -0
- package/schemas/runtime/TimerTick.fbs +18 -0
- package/src/capabilities.js +3 -0
- package/src/compiler/compileModule.js +20 -2
- package/src/generated/runtime/aligned/HostOps_aligned.js +3913 -0
- package/src/generated/runtime/aligned/HostOps_aligned.ts +4605 -0
- package/src/generated/runtime/aligned/HostOps_enums.js +12 -0
- package/src/generated/runtime/aligned/HostOps_enums.ts +6 -0
- package/src/generated/runtime/cpp/FlowNotice_generated.h +367 -0
- package/src/generated/runtime/cpp/HostOps_aligned.h +3540 -0
- package/src/generated/runtime/cpp/HttpRequest_generated.h +317 -0
- package/src/generated/runtime/cpp/HttpResponse_generated.h +315 -0
- package/src/generated/runtime/cpp/IngestRequest_generated.h +829 -0
- package/src/generated/runtime/cpp/IngestResult_generated.h +319 -0
- package/src/generated/runtime/cpp/ModuleConfig_generated.h +604 -0
- package/src/generated/runtime/cpp/RuntimeCommon_generated.h +410 -0
- package/src/generated/runtime/cpp/TimerTick_generated.h +229 -0
- package/src/generated/runtime/sdn/runtime/ArchiveTarget.js +78 -0
- package/src/generated/runtime/sdn/runtime/ArchiveTarget.ts +104 -0
- package/src/generated/runtime/sdn/runtime/ConfigEntry.js +202 -0
- package/src/generated/runtime/sdn/runtime/ConfigEntry.ts +251 -0
- package/src/generated/runtime/sdn/runtime/ConfigTable.js +80 -0
- package/src/generated/runtime/sdn/runtime/ConfigTable.ts +97 -0
- package/src/generated/runtime/sdn/runtime/FlowNotice.js +196 -0
- package/src/generated/runtime/sdn/runtime/FlowNotice.ts +254 -0
- package/src/generated/runtime/sdn/runtime/Header.js +79 -0
- package/src/generated/runtime/sdn/runtime/Header.ts +100 -0
- package/src/generated/runtime/sdn/runtime/HttpRequest.js +216 -0
- package/src/generated/runtime/sdn/runtime/HttpRequest.ts +265 -0
- package/src/generated/runtime/sdn/runtime/HttpResponse.js +216 -0
- package/src/generated/runtime/sdn/runtime/HttpResponse.ts +267 -0
- package/src/generated/runtime/sdn/runtime/IngestRequest.js +121 -0
- package/src/generated/runtime/sdn/runtime/IngestRequest.ts +155 -0
- package/src/generated/runtime/sdn/runtime/IngestResult.js +184 -0
- package/src/generated/runtime/sdn/runtime/IngestResult.ts +235 -0
- package/src/generated/runtime/sdn/runtime/ModuleConfig.js +92 -0
- package/src/generated/runtime/sdn/runtime/ModuleConfig.ts +114 -0
- package/src/generated/runtime/sdn/runtime/Provenance.js +320 -0
- package/src/generated/runtime/sdn/runtime/Provenance.ts +405 -0
- package/src/generated/runtime/sdn/runtime/SourceTags.js +181 -0
- package/src/generated/runtime/sdn/runtime/SourceTags.ts +253 -0
- package/src/generated/runtime/sdn/runtime/TimerTick.js +119 -0
- package/src/generated/runtime/sdn/runtime/TimerTick.ts +148 -0
- package/src/generated/runtime/sdn/runtime/configValueKind.js +12 -0
- package/src/generated/runtime/sdn/runtime/configValueKind.ts +19 -0
- package/src/generated/runtime/sdn/runtime/flowNoticeKind.js +11 -0
- package/src/generated/runtime/sdn/runtime/flowNoticeKind.ts +34 -0
- package/src/generated/runtime/sdn/runtime/reconcileMode.js +9 -0
- package/src/generated/runtime/sdn/runtime/reconcileMode.ts +23 -0
- package/src/generated/runtime/sdn/runtime.js +16 -0
- package/src/generated/runtime/sdn/runtime.ts +17 -0
- package/src/host/abi.js +32 -6
- package/src/host/adapterOperations.js +79 -0
- package/src/host/browserHost.js +65 -2
- package/src/host/cpp/typedHostcall.hpp +252 -0
- package/src/host/hostWorkerBundleSources.js +3 -3
- package/src/host/nodeHost.js +50 -0
- package/src/host/typedDispatch.js +582 -0
- package/src/index.d.ts +25 -2
- package/src/invoke/codec.js +3 -2
- package/src/standards/runtimeContracts.js +596 -0
- package/src/standards/sharedCatalog.js +27 -0
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
4
|
+
import * as flatbuffers from "flatbuffers";
|
|
5
|
+
import { ConfigEntry } from "./ConfigEntry.js";
|
|
6
|
+
class ConfigTable {
|
|
7
|
+
constructor() {
|
|
8
|
+
__publicField(this, "bb", null);
|
|
9
|
+
__publicField(this, "bb_pos", 0);
|
|
10
|
+
}
|
|
11
|
+
__init(i, bb) {
|
|
12
|
+
this.bb_pos = i;
|
|
13
|
+
this.bb = bb;
|
|
14
|
+
return this;
|
|
15
|
+
}
|
|
16
|
+
static getRootAsConfigTable(bb, obj) {
|
|
17
|
+
return (obj || new ConfigTable()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
|
18
|
+
}
|
|
19
|
+
static getSizePrefixedRootAsConfigTable(bb, obj) {
|
|
20
|
+
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
|
|
21
|
+
return (obj || new ConfigTable()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
|
22
|
+
}
|
|
23
|
+
ENTRIES(index, obj) {
|
|
24
|
+
const offset = this.bb.__offset(this.bb_pos, 4);
|
|
25
|
+
return offset ? (obj || new ConfigEntry()).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos + offset) + index * 4), this.bb) : null;
|
|
26
|
+
}
|
|
27
|
+
entriesLength() {
|
|
28
|
+
const offset = this.bb.__offset(this.bb_pos, 4);
|
|
29
|
+
return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
|
|
30
|
+
}
|
|
31
|
+
static startConfigTable(builder) {
|
|
32
|
+
builder.startObject(1);
|
|
33
|
+
}
|
|
34
|
+
static addEntries(builder, ENTRIESOffset) {
|
|
35
|
+
builder.addFieldOffset(0, ENTRIESOffset, 0);
|
|
36
|
+
}
|
|
37
|
+
static createEntriesVector(builder, data) {
|
|
38
|
+
builder.startVector(4, data.length, 4);
|
|
39
|
+
for (let i = data.length - 1; i >= 0; i--) {
|
|
40
|
+
builder.addOffset(data[i]);
|
|
41
|
+
}
|
|
42
|
+
return builder.endVector();
|
|
43
|
+
}
|
|
44
|
+
static startEntriesVector(builder, numElems) {
|
|
45
|
+
builder.startVector(4, numElems, 4);
|
|
46
|
+
}
|
|
47
|
+
static endConfigTable(builder) {
|
|
48
|
+
const offset = builder.endObject();
|
|
49
|
+
return offset;
|
|
50
|
+
}
|
|
51
|
+
static createConfigTable(builder, ENTRIESOffset) {
|
|
52
|
+
ConfigTable.startConfigTable(builder);
|
|
53
|
+
ConfigTable.addEntries(builder, ENTRIESOffset);
|
|
54
|
+
return ConfigTable.endConfigTable(builder);
|
|
55
|
+
}
|
|
56
|
+
unpack() {
|
|
57
|
+
return new ConfigTableT(
|
|
58
|
+
this.bb.createObjList(this.ENTRIES.bind(this), this.entriesLength())
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
unpackTo(_o) {
|
|
62
|
+
_o.ENTRIES = this.bb.createObjList(this.ENTRIES.bind(this), this.entriesLength());
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
class ConfigTableT {
|
|
66
|
+
constructor(ENTRIES = []) {
|
|
67
|
+
__publicField(this, "ENTRIES", ENTRIES);
|
|
68
|
+
}
|
|
69
|
+
pack(builder) {
|
|
70
|
+
const ENTRIES = ConfigTable.createEntriesVector(builder, builder.createObjectOffsetList(this.ENTRIES));
|
|
71
|
+
return ConfigTable.createConfigTable(
|
|
72
|
+
builder,
|
|
73
|
+
ENTRIES
|
|
74
|
+
);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
export {
|
|
78
|
+
ConfigTable,
|
|
79
|
+
ConfigTableT
|
|
80
|
+
};
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
// automatically generated by the FlatBuffers compiler, do not modify
|
|
2
|
+
|
|
3
|
+
/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
|
|
4
|
+
|
|
5
|
+
import * as flatbuffers from 'flatbuffers';
|
|
6
|
+
|
|
7
|
+
import { ConfigEntry, ConfigEntryT } from './ConfigEntry.js';
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* A nested table of entries, sorted by KEY.
|
|
12
|
+
*/
|
|
13
|
+
export class ConfigTable implements flatbuffers.IUnpackableObject<ConfigTableT> {
|
|
14
|
+
bb: flatbuffers.ByteBuffer|null = null;
|
|
15
|
+
bb_pos = 0;
|
|
16
|
+
__init(i:number, bb:flatbuffers.ByteBuffer):ConfigTable {
|
|
17
|
+
this.bb_pos = i;
|
|
18
|
+
this.bb = bb;
|
|
19
|
+
return this;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
static getRootAsConfigTable(bb:flatbuffers.ByteBuffer, obj?:ConfigTable):ConfigTable {
|
|
23
|
+
return (obj || new ConfigTable()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
static getSizePrefixedRootAsConfigTable(bb:flatbuffers.ByteBuffer, obj?:ConfigTable):ConfigTable {
|
|
27
|
+
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
|
|
28
|
+
return (obj || new ConfigTable()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
ENTRIES(index: number, obj?:ConfigEntry):ConfigEntry|null {
|
|
32
|
+
const offset = this.bb!.__offset(this.bb_pos, 4);
|
|
33
|
+
return offset ? (obj || new ConfigEntry()).__init(this.bb!.__indirect(this.bb!.__vector(this.bb_pos + offset) + index * 4), this.bb!) : null;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
entriesLength():number {
|
|
37
|
+
const offset = this.bb!.__offset(this.bb_pos, 4);
|
|
38
|
+
return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
static startConfigTable(builder:flatbuffers.Builder) {
|
|
42
|
+
builder.startObject(1);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
static addEntries(builder:flatbuffers.Builder, ENTRIESOffset:flatbuffers.Offset) {
|
|
46
|
+
builder.addFieldOffset(0, ENTRIESOffset, 0);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
static createEntriesVector(builder:flatbuffers.Builder, data:flatbuffers.Offset[]):flatbuffers.Offset {
|
|
50
|
+
builder.startVector(4, data.length, 4);
|
|
51
|
+
for (let i = data.length - 1; i >= 0; i--) {
|
|
52
|
+
builder.addOffset(data[i]!);
|
|
53
|
+
}
|
|
54
|
+
return builder.endVector();
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
static startEntriesVector(builder:flatbuffers.Builder, numElems:number) {
|
|
58
|
+
builder.startVector(4, numElems, 4);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
static endConfigTable(builder:flatbuffers.Builder):flatbuffers.Offset {
|
|
62
|
+
const offset = builder.endObject();
|
|
63
|
+
return offset;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
static createConfigTable(builder:flatbuffers.Builder, ENTRIESOffset:flatbuffers.Offset):flatbuffers.Offset {
|
|
67
|
+
ConfigTable.startConfigTable(builder);
|
|
68
|
+
ConfigTable.addEntries(builder, ENTRIESOffset);
|
|
69
|
+
return ConfigTable.endConfigTable(builder);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
unpack(): ConfigTableT {
|
|
73
|
+
return new ConfigTableT(
|
|
74
|
+
this.bb!.createObjList<ConfigEntry, ConfigEntryT>(this.ENTRIES.bind(this), this.entriesLength())
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
unpackTo(_o: ConfigTableT): void {
|
|
80
|
+
_o.ENTRIES = this.bb!.createObjList<ConfigEntry, ConfigEntryT>(this.ENTRIES.bind(this), this.entriesLength());
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export class ConfigTableT implements flatbuffers.IGeneratedObject {
|
|
85
|
+
constructor(
|
|
86
|
+
public ENTRIES: (ConfigEntryT)[] = []
|
|
87
|
+
){}
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
pack(builder:flatbuffers.Builder): flatbuffers.Offset {
|
|
91
|
+
const ENTRIES = ConfigTable.createEntriesVector(builder, builder.createObjectOffsetList(this.ENTRIES));
|
|
92
|
+
|
|
93
|
+
return ConfigTable.createConfigTable(builder,
|
|
94
|
+
ENTRIES
|
|
95
|
+
);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
4
|
+
import * as flatbuffers from "flatbuffers";
|
|
5
|
+
import { flowNoticeKind } from "./flowNoticeKind.js";
|
|
6
|
+
class FlowNotice {
|
|
7
|
+
constructor() {
|
|
8
|
+
__publicField(this, "bb", null);
|
|
9
|
+
__publicField(this, "bb_pos", 0);
|
|
10
|
+
}
|
|
11
|
+
__init(i, bb) {
|
|
12
|
+
this.bb_pos = i;
|
|
13
|
+
this.bb = bb;
|
|
14
|
+
return this;
|
|
15
|
+
}
|
|
16
|
+
static getRootAsFlowNotice(bb, obj) {
|
|
17
|
+
return (obj || new FlowNotice()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
|
18
|
+
}
|
|
19
|
+
static getSizePrefixedRootAsFlowNotice(bb, obj) {
|
|
20
|
+
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
|
|
21
|
+
return (obj || new FlowNotice()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
|
22
|
+
}
|
|
23
|
+
static bufferHasIdentifier(bb) {
|
|
24
|
+
return bb.__has_identifier("FNTC");
|
|
25
|
+
}
|
|
26
|
+
KIND() {
|
|
27
|
+
const offset = this.bb.__offset(this.bb_pos, 4);
|
|
28
|
+
return offset ? this.bb.readUint8(this.bb_pos + offset) : flowNoticeKind.Unchanged;
|
|
29
|
+
}
|
|
30
|
+
SCHEMA(optionalEncoding) {
|
|
31
|
+
const offset = this.bb.__offset(this.bb_pos, 6);
|
|
32
|
+
return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null;
|
|
33
|
+
}
|
|
34
|
+
PROVIDER_ID(optionalEncoding) {
|
|
35
|
+
const offset = this.bb.__offset(this.bb_pos, 8);
|
|
36
|
+
return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null;
|
|
37
|
+
}
|
|
38
|
+
SOURCE_NAME(optionalEncoding) {
|
|
39
|
+
const offset = this.bb.__offset(this.bb_pos, 10);
|
|
40
|
+
return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null;
|
|
41
|
+
}
|
|
42
|
+
BATCH_ID(optionalEncoding) {
|
|
43
|
+
const offset = this.bb.__offset(this.bb_pos, 12);
|
|
44
|
+
return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* How many (records expired, leads missing, inventories unchanged ...).
|
|
48
|
+
*/
|
|
49
|
+
COUNT() {
|
|
50
|
+
const offset = this.bb.__offset(this.bb_pos, 14);
|
|
51
|
+
return offset ? this.bb.readUint64(this.bb_pos + offset) : BigInt("0");
|
|
52
|
+
}
|
|
53
|
+
REASON(optionalEncoding) {
|
|
54
|
+
const offset = this.bb.__offset(this.bb_pos, 16);
|
|
55
|
+
return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null;
|
|
56
|
+
}
|
|
57
|
+
ITEMS(index, optionalEncoding) {
|
|
58
|
+
const offset = this.bb.__offset(this.bb_pos, 18);
|
|
59
|
+
return offset ? this.bb.__string(this.bb.__vector(this.bb_pos + offset) + index * 4, optionalEncoding) : null;
|
|
60
|
+
}
|
|
61
|
+
itemsLength() {
|
|
62
|
+
const offset = this.bb.__offset(this.bb_pos, 18);
|
|
63
|
+
return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* A time the notice is about (e.g. a retention cutoff), Unix milliseconds UTC; 0 = none.
|
|
67
|
+
*/
|
|
68
|
+
AT_MS() {
|
|
69
|
+
const offset = this.bb.__offset(this.bb_pos, 20);
|
|
70
|
+
return offset ? this.bb.readUint64(this.bb_pos + offset) : BigInt("0");
|
|
71
|
+
}
|
|
72
|
+
static startFlowNotice(builder) {
|
|
73
|
+
builder.startObject(9);
|
|
74
|
+
}
|
|
75
|
+
static addKind(builder, KIND) {
|
|
76
|
+
builder.addFieldInt8(0, KIND, flowNoticeKind.Unchanged);
|
|
77
|
+
}
|
|
78
|
+
static addSchema(builder, SCHEMAOffset) {
|
|
79
|
+
builder.addFieldOffset(1, SCHEMAOffset, 0);
|
|
80
|
+
}
|
|
81
|
+
static addProviderId(builder, PROVIDER_IDOffset) {
|
|
82
|
+
builder.addFieldOffset(2, PROVIDER_IDOffset, 0);
|
|
83
|
+
}
|
|
84
|
+
static addSourceName(builder, SOURCE_NAMEOffset) {
|
|
85
|
+
builder.addFieldOffset(3, SOURCE_NAMEOffset, 0);
|
|
86
|
+
}
|
|
87
|
+
static addBatchId(builder, BATCH_IDOffset) {
|
|
88
|
+
builder.addFieldOffset(4, BATCH_IDOffset, 0);
|
|
89
|
+
}
|
|
90
|
+
static addCount(builder, COUNT) {
|
|
91
|
+
builder.addFieldInt64(5, COUNT, BigInt("0"));
|
|
92
|
+
}
|
|
93
|
+
static addReason(builder, REASONOffset) {
|
|
94
|
+
builder.addFieldOffset(6, REASONOffset, 0);
|
|
95
|
+
}
|
|
96
|
+
static addItems(builder, ITEMSOffset) {
|
|
97
|
+
builder.addFieldOffset(7, ITEMSOffset, 0);
|
|
98
|
+
}
|
|
99
|
+
static createItemsVector(builder, data) {
|
|
100
|
+
builder.startVector(4, data.length, 4);
|
|
101
|
+
for (let i = data.length - 1; i >= 0; i--) {
|
|
102
|
+
builder.addOffset(data[i]);
|
|
103
|
+
}
|
|
104
|
+
return builder.endVector();
|
|
105
|
+
}
|
|
106
|
+
static startItemsVector(builder, numElems) {
|
|
107
|
+
builder.startVector(4, numElems, 4);
|
|
108
|
+
}
|
|
109
|
+
static addAtMs(builder, AT_MS) {
|
|
110
|
+
builder.addFieldInt64(8, AT_MS, BigInt("0"));
|
|
111
|
+
}
|
|
112
|
+
static endFlowNotice(builder) {
|
|
113
|
+
const offset = builder.endObject();
|
|
114
|
+
return offset;
|
|
115
|
+
}
|
|
116
|
+
static finishFlowNoticeBuffer(builder, offset) {
|
|
117
|
+
builder.finish(offset, "FNTC");
|
|
118
|
+
}
|
|
119
|
+
static finishSizePrefixedFlowNoticeBuffer(builder, offset) {
|
|
120
|
+
builder.finish(offset, "FNTC", true);
|
|
121
|
+
}
|
|
122
|
+
static createFlowNotice(builder, KIND, SCHEMAOffset, PROVIDER_IDOffset, SOURCE_NAMEOffset, BATCH_IDOffset, COUNT, REASONOffset, ITEMSOffset, AT_MS) {
|
|
123
|
+
FlowNotice.startFlowNotice(builder);
|
|
124
|
+
FlowNotice.addKind(builder, KIND);
|
|
125
|
+
FlowNotice.addSchema(builder, SCHEMAOffset);
|
|
126
|
+
FlowNotice.addProviderId(builder, PROVIDER_IDOffset);
|
|
127
|
+
FlowNotice.addSourceName(builder, SOURCE_NAMEOffset);
|
|
128
|
+
FlowNotice.addBatchId(builder, BATCH_IDOffset);
|
|
129
|
+
FlowNotice.addCount(builder, COUNT);
|
|
130
|
+
FlowNotice.addReason(builder, REASONOffset);
|
|
131
|
+
FlowNotice.addItems(builder, ITEMSOffset);
|
|
132
|
+
FlowNotice.addAtMs(builder, AT_MS);
|
|
133
|
+
return FlowNotice.endFlowNotice(builder);
|
|
134
|
+
}
|
|
135
|
+
unpack() {
|
|
136
|
+
return new FlowNoticeT(
|
|
137
|
+
this.KIND(),
|
|
138
|
+
this.SCHEMA(),
|
|
139
|
+
this.PROVIDER_ID(),
|
|
140
|
+
this.SOURCE_NAME(),
|
|
141
|
+
this.BATCH_ID(),
|
|
142
|
+
this.COUNT(),
|
|
143
|
+
this.REASON(),
|
|
144
|
+
this.bb.createScalarList(this.ITEMS.bind(this), this.itemsLength()),
|
|
145
|
+
this.AT_MS()
|
|
146
|
+
);
|
|
147
|
+
}
|
|
148
|
+
unpackTo(_o) {
|
|
149
|
+
_o.KIND = this.KIND();
|
|
150
|
+
_o.SCHEMA = this.SCHEMA();
|
|
151
|
+
_o.PROVIDER_ID = this.PROVIDER_ID();
|
|
152
|
+
_o.SOURCE_NAME = this.SOURCE_NAME();
|
|
153
|
+
_o.BATCH_ID = this.BATCH_ID();
|
|
154
|
+
_o.COUNT = this.COUNT();
|
|
155
|
+
_o.REASON = this.REASON();
|
|
156
|
+
_o.ITEMS = this.bb.createScalarList(this.ITEMS.bind(this), this.itemsLength());
|
|
157
|
+
_o.AT_MS = this.AT_MS();
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
class FlowNoticeT {
|
|
161
|
+
constructor(KIND = flowNoticeKind.Unchanged, SCHEMA = null, PROVIDER_ID = null, SOURCE_NAME = null, BATCH_ID = null, COUNT = BigInt("0"), REASON = null, ITEMS = [], AT_MS = BigInt("0")) {
|
|
162
|
+
__publicField(this, "KIND", KIND);
|
|
163
|
+
__publicField(this, "SCHEMA", SCHEMA);
|
|
164
|
+
__publicField(this, "PROVIDER_ID", PROVIDER_ID);
|
|
165
|
+
__publicField(this, "SOURCE_NAME", SOURCE_NAME);
|
|
166
|
+
__publicField(this, "BATCH_ID", BATCH_ID);
|
|
167
|
+
__publicField(this, "COUNT", COUNT);
|
|
168
|
+
__publicField(this, "REASON", REASON);
|
|
169
|
+
__publicField(this, "ITEMS", ITEMS);
|
|
170
|
+
__publicField(this, "AT_MS", AT_MS);
|
|
171
|
+
}
|
|
172
|
+
pack(builder) {
|
|
173
|
+
const SCHEMA = this.SCHEMA !== null ? builder.createString(this.SCHEMA) : 0;
|
|
174
|
+
const PROVIDER_ID = this.PROVIDER_ID !== null ? builder.createString(this.PROVIDER_ID) : 0;
|
|
175
|
+
const SOURCE_NAME = this.SOURCE_NAME !== null ? builder.createString(this.SOURCE_NAME) : 0;
|
|
176
|
+
const BATCH_ID = this.BATCH_ID !== null ? builder.createString(this.BATCH_ID) : 0;
|
|
177
|
+
const REASON = this.REASON !== null ? builder.createString(this.REASON) : 0;
|
|
178
|
+
const ITEMS = FlowNotice.createItemsVector(builder, builder.createObjectOffsetList(this.ITEMS));
|
|
179
|
+
return FlowNotice.createFlowNotice(
|
|
180
|
+
builder,
|
|
181
|
+
this.KIND,
|
|
182
|
+
SCHEMA,
|
|
183
|
+
PROVIDER_ID,
|
|
184
|
+
SOURCE_NAME,
|
|
185
|
+
BATCH_ID,
|
|
186
|
+
this.COUNT,
|
|
187
|
+
REASON,
|
|
188
|
+
ITEMS,
|
|
189
|
+
this.AT_MS
|
|
190
|
+
);
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
export {
|
|
194
|
+
FlowNotice,
|
|
195
|
+
FlowNoticeT
|
|
196
|
+
};
|
|
@@ -0,0 +1,254 @@
|
|
|
1
|
+
// automatically generated by the FlatBuffers compiler, do not modify
|
|
2
|
+
|
|
3
|
+
/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
|
|
4
|
+
|
|
5
|
+
import * as flatbuffers from 'flatbuffers';
|
|
6
|
+
|
|
7
|
+
import { flowNoticeKind } from './flowNoticeKind.js';
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* A module's report of a pass, to the flow's egress and the node's ledger. Replaces the JSON status, report and
|
|
12
|
+
* unchanged-notice frames.
|
|
13
|
+
*/
|
|
14
|
+
export class FlowNotice implements flatbuffers.IUnpackableObject<FlowNoticeT> {
|
|
15
|
+
bb: flatbuffers.ByteBuffer|null = null;
|
|
16
|
+
bb_pos = 0;
|
|
17
|
+
__init(i:number, bb:flatbuffers.ByteBuffer):FlowNotice {
|
|
18
|
+
this.bb_pos = i;
|
|
19
|
+
this.bb = bb;
|
|
20
|
+
return this;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
static getRootAsFlowNotice(bb:flatbuffers.ByteBuffer, obj?:FlowNotice):FlowNotice {
|
|
24
|
+
return (obj || new FlowNotice()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
static getSizePrefixedRootAsFlowNotice(bb:flatbuffers.ByteBuffer, obj?:FlowNotice):FlowNotice {
|
|
28
|
+
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
|
|
29
|
+
return (obj || new FlowNotice()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
static bufferHasIdentifier(bb:flatbuffers.ByteBuffer):boolean {
|
|
33
|
+
return bb.__has_identifier('FNTC');
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
KIND():flowNoticeKind {
|
|
37
|
+
const offset = this.bb!.__offset(this.bb_pos, 4);
|
|
38
|
+
return offset ? this.bb!.readUint8(this.bb_pos + offset) : flowNoticeKind.Unchanged;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* The lane it concerns (any of them may be empty).
|
|
43
|
+
*/
|
|
44
|
+
SCHEMA():string|null
|
|
45
|
+
SCHEMA(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
|
|
46
|
+
SCHEMA(optionalEncoding?:any):string|Uint8Array|null {
|
|
47
|
+
const offset = this.bb!.__offset(this.bb_pos, 6);
|
|
48
|
+
return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
PROVIDER_ID():string|null
|
|
52
|
+
PROVIDER_ID(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
|
|
53
|
+
PROVIDER_ID(optionalEncoding?:any):string|Uint8Array|null {
|
|
54
|
+
const offset = this.bb!.__offset(this.bb_pos, 8);
|
|
55
|
+
return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
SOURCE_NAME():string|null
|
|
59
|
+
SOURCE_NAME(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
|
|
60
|
+
SOURCE_NAME(optionalEncoding?:any):string|Uint8Array|null {
|
|
61
|
+
const offset = this.bb!.__offset(this.bb_pos, 10);
|
|
62
|
+
return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
BATCH_ID():string|null
|
|
66
|
+
BATCH_ID(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
|
|
67
|
+
BATCH_ID(optionalEncoding?:any):string|Uint8Array|null {
|
|
68
|
+
const offset = this.bb!.__offset(this.bb_pos, 12);
|
|
69
|
+
return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* How many (records expired, leads missing, inventories unchanged ...).
|
|
74
|
+
*/
|
|
75
|
+
COUNT():bigint {
|
|
76
|
+
const offset = this.bb!.__offset(this.bb_pos, 14);
|
|
77
|
+
return offset ? this.bb!.readUint64(this.bb_pos + offset) : BigInt('0');
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* A short reason, e.g. "already-planned".
|
|
82
|
+
*/
|
|
83
|
+
REASON():string|null
|
|
84
|
+
REASON(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
|
|
85
|
+
REASON(optionalEncoding?:any):string|Uint8Array|null {
|
|
86
|
+
const offset = this.bb!.__offset(this.bb_pos, 16);
|
|
87
|
+
return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* The items concerned, e.g. the missing inventories' URLs.
|
|
92
|
+
*/
|
|
93
|
+
ITEMS(index: number):string
|
|
94
|
+
ITEMS(index: number,optionalEncoding:flatbuffers.Encoding):string|Uint8Array
|
|
95
|
+
ITEMS(index: number,optionalEncoding?:any):string|Uint8Array|null {
|
|
96
|
+
const offset = this.bb!.__offset(this.bb_pos, 18);
|
|
97
|
+
return offset ? this.bb!.__string(this.bb!.__vector(this.bb_pos + offset) + index * 4, optionalEncoding) : null;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
itemsLength():number {
|
|
101
|
+
const offset = this.bb!.__offset(this.bb_pos, 18);
|
|
102
|
+
return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* A time the notice is about (e.g. a retention cutoff), Unix milliseconds UTC; 0 = none.
|
|
107
|
+
*/
|
|
108
|
+
AT_MS():bigint {
|
|
109
|
+
const offset = this.bb!.__offset(this.bb_pos, 20);
|
|
110
|
+
return offset ? this.bb!.readUint64(this.bb_pos + offset) : BigInt('0');
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
static startFlowNotice(builder:flatbuffers.Builder) {
|
|
114
|
+
builder.startObject(9);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
static addKind(builder:flatbuffers.Builder, KIND:flowNoticeKind) {
|
|
118
|
+
builder.addFieldInt8(0, KIND, flowNoticeKind.Unchanged);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
static addSchema(builder:flatbuffers.Builder, SCHEMAOffset:flatbuffers.Offset) {
|
|
122
|
+
builder.addFieldOffset(1, SCHEMAOffset, 0);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
static addProviderId(builder:flatbuffers.Builder, PROVIDER_IDOffset:flatbuffers.Offset) {
|
|
126
|
+
builder.addFieldOffset(2, PROVIDER_IDOffset, 0);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
static addSourceName(builder:flatbuffers.Builder, SOURCE_NAMEOffset:flatbuffers.Offset) {
|
|
130
|
+
builder.addFieldOffset(3, SOURCE_NAMEOffset, 0);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
static addBatchId(builder:flatbuffers.Builder, BATCH_IDOffset:flatbuffers.Offset) {
|
|
134
|
+
builder.addFieldOffset(4, BATCH_IDOffset, 0);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
static addCount(builder:flatbuffers.Builder, COUNT:bigint) {
|
|
138
|
+
builder.addFieldInt64(5, COUNT, BigInt('0'));
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
static addReason(builder:flatbuffers.Builder, REASONOffset:flatbuffers.Offset) {
|
|
142
|
+
builder.addFieldOffset(6, REASONOffset, 0);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
static addItems(builder:flatbuffers.Builder, ITEMSOffset:flatbuffers.Offset) {
|
|
146
|
+
builder.addFieldOffset(7, ITEMSOffset, 0);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
static createItemsVector(builder:flatbuffers.Builder, data:flatbuffers.Offset[]):flatbuffers.Offset {
|
|
150
|
+
builder.startVector(4, data.length, 4);
|
|
151
|
+
for (let i = data.length - 1; i >= 0; i--) {
|
|
152
|
+
builder.addOffset(data[i]!);
|
|
153
|
+
}
|
|
154
|
+
return builder.endVector();
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
static startItemsVector(builder:flatbuffers.Builder, numElems:number) {
|
|
158
|
+
builder.startVector(4, numElems, 4);
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
static addAtMs(builder:flatbuffers.Builder, AT_MS:bigint) {
|
|
162
|
+
builder.addFieldInt64(8, AT_MS, BigInt('0'));
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
static endFlowNotice(builder:flatbuffers.Builder):flatbuffers.Offset {
|
|
166
|
+
const offset = builder.endObject();
|
|
167
|
+
return offset;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
static finishFlowNoticeBuffer(builder:flatbuffers.Builder, offset:flatbuffers.Offset) {
|
|
171
|
+
builder.finish(offset, 'FNTC');
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
static finishSizePrefixedFlowNoticeBuffer(builder:flatbuffers.Builder, offset:flatbuffers.Offset) {
|
|
175
|
+
builder.finish(offset, 'FNTC', true);
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
static createFlowNotice(builder:flatbuffers.Builder, KIND:flowNoticeKind, SCHEMAOffset:flatbuffers.Offset, PROVIDER_IDOffset:flatbuffers.Offset, SOURCE_NAMEOffset:flatbuffers.Offset, BATCH_IDOffset:flatbuffers.Offset, COUNT:bigint, REASONOffset:flatbuffers.Offset, ITEMSOffset:flatbuffers.Offset, AT_MS:bigint):flatbuffers.Offset {
|
|
179
|
+
FlowNotice.startFlowNotice(builder);
|
|
180
|
+
FlowNotice.addKind(builder, KIND);
|
|
181
|
+
FlowNotice.addSchema(builder, SCHEMAOffset);
|
|
182
|
+
FlowNotice.addProviderId(builder, PROVIDER_IDOffset);
|
|
183
|
+
FlowNotice.addSourceName(builder, SOURCE_NAMEOffset);
|
|
184
|
+
FlowNotice.addBatchId(builder, BATCH_IDOffset);
|
|
185
|
+
FlowNotice.addCount(builder, COUNT);
|
|
186
|
+
FlowNotice.addReason(builder, REASONOffset);
|
|
187
|
+
FlowNotice.addItems(builder, ITEMSOffset);
|
|
188
|
+
FlowNotice.addAtMs(builder, AT_MS);
|
|
189
|
+
return FlowNotice.endFlowNotice(builder);
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
unpack(): FlowNoticeT {
|
|
193
|
+
return new FlowNoticeT(
|
|
194
|
+
this.KIND(),
|
|
195
|
+
this.SCHEMA(),
|
|
196
|
+
this.PROVIDER_ID(),
|
|
197
|
+
this.SOURCE_NAME(),
|
|
198
|
+
this.BATCH_ID(),
|
|
199
|
+
this.COUNT(),
|
|
200
|
+
this.REASON(),
|
|
201
|
+
this.bb!.createScalarList<string>(this.ITEMS.bind(this), this.itemsLength()),
|
|
202
|
+
this.AT_MS()
|
|
203
|
+
);
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
|
|
207
|
+
unpackTo(_o: FlowNoticeT): void {
|
|
208
|
+
_o.KIND = this.KIND();
|
|
209
|
+
_o.SCHEMA = this.SCHEMA();
|
|
210
|
+
_o.PROVIDER_ID = this.PROVIDER_ID();
|
|
211
|
+
_o.SOURCE_NAME = this.SOURCE_NAME();
|
|
212
|
+
_o.BATCH_ID = this.BATCH_ID();
|
|
213
|
+
_o.COUNT = this.COUNT();
|
|
214
|
+
_o.REASON = this.REASON();
|
|
215
|
+
_o.ITEMS = this.bb!.createScalarList<string>(this.ITEMS.bind(this), this.itemsLength());
|
|
216
|
+
_o.AT_MS = this.AT_MS();
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
export class FlowNoticeT implements flatbuffers.IGeneratedObject {
|
|
221
|
+
constructor(
|
|
222
|
+
public KIND: flowNoticeKind = flowNoticeKind.Unchanged,
|
|
223
|
+
public SCHEMA: string|Uint8Array|null = null,
|
|
224
|
+
public PROVIDER_ID: string|Uint8Array|null = null,
|
|
225
|
+
public SOURCE_NAME: string|Uint8Array|null = null,
|
|
226
|
+
public BATCH_ID: string|Uint8Array|null = null,
|
|
227
|
+
public COUNT: bigint = BigInt('0'),
|
|
228
|
+
public REASON: string|Uint8Array|null = null,
|
|
229
|
+
public ITEMS: (string)[] = [],
|
|
230
|
+
public AT_MS: bigint = BigInt('0')
|
|
231
|
+
){}
|
|
232
|
+
|
|
233
|
+
|
|
234
|
+
pack(builder:flatbuffers.Builder): flatbuffers.Offset {
|
|
235
|
+
const SCHEMA = (this.SCHEMA !== null ? builder.createString(this.SCHEMA!) : 0);
|
|
236
|
+
const PROVIDER_ID = (this.PROVIDER_ID !== null ? builder.createString(this.PROVIDER_ID!) : 0);
|
|
237
|
+
const SOURCE_NAME = (this.SOURCE_NAME !== null ? builder.createString(this.SOURCE_NAME!) : 0);
|
|
238
|
+
const BATCH_ID = (this.BATCH_ID !== null ? builder.createString(this.BATCH_ID!) : 0);
|
|
239
|
+
const REASON = (this.REASON !== null ? builder.createString(this.REASON!) : 0);
|
|
240
|
+
const ITEMS = FlowNotice.createItemsVector(builder, builder.createObjectOffsetList(this.ITEMS));
|
|
241
|
+
|
|
242
|
+
return FlowNotice.createFlowNotice(builder,
|
|
243
|
+
this.KIND,
|
|
244
|
+
SCHEMA,
|
|
245
|
+
PROVIDER_ID,
|
|
246
|
+
SOURCE_NAME,
|
|
247
|
+
BATCH_ID,
|
|
248
|
+
this.COUNT,
|
|
249
|
+
REASON,
|
|
250
|
+
ITEMS,
|
|
251
|
+
this.AT_MS
|
|
252
|
+
);
|
|
253
|
+
}
|
|
254
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
4
|
+
import * as flatbuffers from "flatbuffers";
|
|
5
|
+
class Header {
|
|
6
|
+
constructor() {
|
|
7
|
+
__publicField(this, "bb", null);
|
|
8
|
+
__publicField(this, "bb_pos", 0);
|
|
9
|
+
}
|
|
10
|
+
__init(i, bb) {
|
|
11
|
+
this.bb_pos = i;
|
|
12
|
+
this.bb = bb;
|
|
13
|
+
return this;
|
|
14
|
+
}
|
|
15
|
+
static getRootAsHeader(bb, obj) {
|
|
16
|
+
return (obj || new Header()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
|
17
|
+
}
|
|
18
|
+
static getSizePrefixedRootAsHeader(bb, obj) {
|
|
19
|
+
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
|
|
20
|
+
return (obj || new Header()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
|
21
|
+
}
|
|
22
|
+
NAME(optionalEncoding) {
|
|
23
|
+
const offset = this.bb.__offset(this.bb_pos, 4);
|
|
24
|
+
return this.bb.__string(this.bb_pos + offset, optionalEncoding);
|
|
25
|
+
}
|
|
26
|
+
VALUE(optionalEncoding) {
|
|
27
|
+
const offset = this.bb.__offset(this.bb_pos, 6);
|
|
28
|
+
return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null;
|
|
29
|
+
}
|
|
30
|
+
static startHeader(builder) {
|
|
31
|
+
builder.startObject(2);
|
|
32
|
+
}
|
|
33
|
+
static addName(builder, NAMEOffset) {
|
|
34
|
+
builder.addFieldOffset(0, NAMEOffset, 0);
|
|
35
|
+
}
|
|
36
|
+
static addValue(builder, VALUEOffset) {
|
|
37
|
+
builder.addFieldOffset(1, VALUEOffset, 0);
|
|
38
|
+
}
|
|
39
|
+
static endHeader(builder) {
|
|
40
|
+
const offset = builder.endObject();
|
|
41
|
+
builder.requiredField(offset, 4);
|
|
42
|
+
return offset;
|
|
43
|
+
}
|
|
44
|
+
static createHeader(builder, NAMEOffset, VALUEOffset) {
|
|
45
|
+
Header.startHeader(builder);
|
|
46
|
+
Header.addName(builder, NAMEOffset);
|
|
47
|
+
Header.addValue(builder, VALUEOffset);
|
|
48
|
+
return Header.endHeader(builder);
|
|
49
|
+
}
|
|
50
|
+
unpack() {
|
|
51
|
+
return new HeaderT(
|
|
52
|
+
this.NAME(),
|
|
53
|
+
this.VALUE()
|
|
54
|
+
);
|
|
55
|
+
}
|
|
56
|
+
unpackTo(_o) {
|
|
57
|
+
_o.NAME = this.NAME();
|
|
58
|
+
_o.VALUE = this.VALUE();
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
class HeaderT {
|
|
62
|
+
constructor(NAME = null, VALUE = null) {
|
|
63
|
+
__publicField(this, "NAME", NAME);
|
|
64
|
+
__publicField(this, "VALUE", VALUE);
|
|
65
|
+
}
|
|
66
|
+
pack(builder) {
|
|
67
|
+
const NAME = this.NAME !== null ? builder.createString(this.NAME) : 0;
|
|
68
|
+
const VALUE = this.VALUE !== null ? builder.createString(this.VALUE) : 0;
|
|
69
|
+
return Header.createHeader(
|
|
70
|
+
builder,
|
|
71
|
+
NAME,
|
|
72
|
+
VALUE
|
|
73
|
+
);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
export {
|
|
77
|
+
Header,
|
|
78
|
+
HeaderT
|
|
79
|
+
};
|