ducjs 2.1.0 → 2.2.3
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/dist/flatbuffers/duc/delta.d.ts +6 -4
- package/dist/flatbuffers/duc/delta.js +22 -11
- package/dist/flatbuffers/duc/duc-block-collection-entry.d.ts +16 -0
- package/dist/flatbuffers/duc/duc-block-collection-entry.js +48 -0
- package/dist/flatbuffers/duc/duc-block-collection.d.ts +31 -0
- package/dist/flatbuffers/duc/duc-block-collection.js +97 -0
- package/dist/flatbuffers/duc/duc-block-instance-element.d.ts +0 -20
- package/dist/flatbuffers/duc/duc-block-instance-element.js +0 -66
- package/dist/flatbuffers/duc/duc-block-instance.d.ts +32 -0
- package/dist/flatbuffers/duc/duc-block-instance.js +100 -0
- package/dist/flatbuffers/duc/duc-block-metadata.d.ts +26 -0
- package/dist/flatbuffers/duc/duc-block-metadata.js +90 -0
- package/dist/flatbuffers/duc/duc-block.d.ts +9 -7
- package/dist/flatbuffers/duc/duc-block.js +31 -30
- package/dist/flatbuffers/duc/duc-element-base.d.ts +14 -2
- package/dist/flatbuffers/duc/duc-element-base.js +50 -4
- package/dist/flatbuffers/duc/exported-data-state.d.ts +12 -0
- package/dist/flatbuffers/duc/exported-data-state.js +45 -1
- package/dist/flatbuffers/duc.d.ts +4 -0
- package/dist/flatbuffers/duc.js +4 -0
- package/dist/parse.js +110 -31
- package/dist/restore/restoreDataState.d.ts +23 -1
- package/dist/restore/restoreDataState.js +167 -13
- package/dist/serialize.js +132 -47
- package/dist/types/elements/index.d.ts +91 -20
- package/dist/types/elements/typeChecks.d.ts +1 -2
- package/dist/types/elements/typeChecks.js +0 -4
- package/dist/types/index.d.ts +5 -2
- package/dist/utils/bounds.js +1 -1
- package/dist/utils/constants.d.ts +12 -2
- package/dist/utils/constants.js +19 -3
- package/dist/utils/elements/index.js +1 -0
- package/dist/utils/elements/newElement.d.ts +1 -7
- package/dist/utils/elements/newElement.js +3 -5
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.js +5 -0
- package/package.json +6 -5
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import * as flatbuffers from 'flatbuffers';
|
|
2
|
-
import { JSONPatchOperation } from '../duc/jsonpatch-operation';
|
|
3
2
|
import { VersionBase } from '../duc/version-base';
|
|
4
3
|
export declare class Delta {
|
|
5
4
|
bb: flatbuffers.ByteBuffer | null;
|
|
@@ -8,13 +7,16 @@ export declare class Delta {
|
|
|
8
7
|
static getRootAsDelta(bb: flatbuffers.ByteBuffer, obj?: Delta): Delta;
|
|
9
8
|
static getSizePrefixedRootAsDelta(bb: flatbuffers.ByteBuffer, obj?: Delta): Delta;
|
|
10
9
|
base(obj?: VersionBase): VersionBase | null;
|
|
11
|
-
|
|
10
|
+
sizeBytes(): bigint;
|
|
11
|
+
patch(index: number): number | null;
|
|
12
12
|
patchLength(): number;
|
|
13
|
+
patchArray(): Uint8Array | null;
|
|
13
14
|
static startDelta(builder: flatbuffers.Builder): void;
|
|
14
15
|
static addBase(builder: flatbuffers.Builder, baseOffset: flatbuffers.Offset): void;
|
|
16
|
+
static addSizeBytes(builder: flatbuffers.Builder, sizeBytes: bigint): void;
|
|
15
17
|
static addPatch(builder: flatbuffers.Builder, patchOffset: flatbuffers.Offset): void;
|
|
16
|
-
static createPatchVector(builder: flatbuffers.Builder, data:
|
|
18
|
+
static createPatchVector(builder: flatbuffers.Builder, data: number[] | Uint8Array): flatbuffers.Offset;
|
|
17
19
|
static startPatchVector(builder: flatbuffers.Builder, numElems: number): void;
|
|
18
20
|
static endDelta(builder: flatbuffers.Builder): flatbuffers.Offset;
|
|
19
|
-
static createDelta(builder: flatbuffers.Builder, baseOffset: flatbuffers.Offset, patchOffset: flatbuffers.Offset): flatbuffers.Offset;
|
|
21
|
+
static createDelta(builder: flatbuffers.Builder, baseOffset: flatbuffers.Offset, sizeBytes: bigint, patchOffset: flatbuffers.Offset): flatbuffers.Offset;
|
|
20
22
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
// automatically generated by the FlatBuffers compiler, do not modify
|
|
2
2
|
/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
|
|
3
3
|
import * as flatbuffers from 'flatbuffers';
|
|
4
|
-
import { JSONPatchOperation } from '../duc/jsonpatch-operation';
|
|
5
4
|
import { VersionBase } from '../duc/version-base';
|
|
6
5
|
export class Delta {
|
|
7
6
|
constructor() {
|
|
@@ -24,40 +23,52 @@ export class Delta {
|
|
|
24
23
|
const offset = this.bb.__offset(this.bb_pos, 4);
|
|
25
24
|
return offset ? (obj || new VersionBase()).__init(this.bb.__indirect(this.bb_pos + offset), this.bb) : null;
|
|
26
25
|
}
|
|
27
|
-
|
|
28
|
-
const offset = this.bb.__offset(this.bb_pos,
|
|
29
|
-
return offset ?
|
|
26
|
+
sizeBytes() {
|
|
27
|
+
const offset = this.bb.__offset(this.bb_pos, 8);
|
|
28
|
+
return offset ? this.bb.readInt64(this.bb_pos + offset) : BigInt('0');
|
|
29
|
+
}
|
|
30
|
+
patch(index) {
|
|
31
|
+
const offset = this.bb.__offset(this.bb_pos, 10);
|
|
32
|
+
return offset ? this.bb.readUint8(this.bb.__vector(this.bb_pos + offset) + index) : 0;
|
|
30
33
|
}
|
|
31
34
|
patchLength() {
|
|
32
|
-
const offset = this.bb.__offset(this.bb_pos,
|
|
35
|
+
const offset = this.bb.__offset(this.bb_pos, 10);
|
|
33
36
|
return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
|
|
34
37
|
}
|
|
38
|
+
patchArray() {
|
|
39
|
+
const offset = this.bb.__offset(this.bb_pos, 10);
|
|
40
|
+
return offset ? new Uint8Array(this.bb.bytes().buffer, this.bb.bytes().byteOffset + this.bb.__vector(this.bb_pos + offset), this.bb.__vector_len(this.bb_pos + offset)) : null;
|
|
41
|
+
}
|
|
35
42
|
static startDelta(builder) {
|
|
36
|
-
builder.startObject(
|
|
43
|
+
builder.startObject(4);
|
|
37
44
|
}
|
|
38
45
|
static addBase(builder, baseOffset) {
|
|
39
46
|
builder.addFieldOffset(0, baseOffset, 0);
|
|
40
47
|
}
|
|
48
|
+
static addSizeBytes(builder, sizeBytes) {
|
|
49
|
+
builder.addFieldInt64(2, sizeBytes, BigInt('0'));
|
|
50
|
+
}
|
|
41
51
|
static addPatch(builder, patchOffset) {
|
|
42
|
-
builder.addFieldOffset(
|
|
52
|
+
builder.addFieldOffset(3, patchOffset, 0);
|
|
43
53
|
}
|
|
44
54
|
static createPatchVector(builder, data) {
|
|
45
|
-
builder.startVector(
|
|
55
|
+
builder.startVector(1, data.length, 1);
|
|
46
56
|
for (let i = data.length - 1; i >= 0; i--) {
|
|
47
|
-
builder.
|
|
57
|
+
builder.addInt8(data[i]);
|
|
48
58
|
}
|
|
49
59
|
return builder.endVector();
|
|
50
60
|
}
|
|
51
61
|
static startPatchVector(builder, numElems) {
|
|
52
|
-
builder.startVector(
|
|
62
|
+
builder.startVector(1, numElems, 1);
|
|
53
63
|
}
|
|
54
64
|
static endDelta(builder) {
|
|
55
65
|
const offset = builder.endObject();
|
|
56
66
|
return offset;
|
|
57
67
|
}
|
|
58
|
-
static createDelta(builder, baseOffset, patchOffset) {
|
|
68
|
+
static createDelta(builder, baseOffset, sizeBytes, patchOffset) {
|
|
59
69
|
Delta.startDelta(builder);
|
|
60
70
|
Delta.addBase(builder, baseOffset);
|
|
71
|
+
Delta.addSizeBytes(builder, sizeBytes);
|
|
61
72
|
Delta.addPatch(builder, patchOffset);
|
|
62
73
|
return Delta.endDelta(builder);
|
|
63
74
|
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as flatbuffers from 'flatbuffers';
|
|
2
|
+
export declare class DucBlockCollectionEntry {
|
|
3
|
+
bb: flatbuffers.ByteBuffer | null;
|
|
4
|
+
bb_pos: number;
|
|
5
|
+
__init(i: number, bb: flatbuffers.ByteBuffer): DucBlockCollectionEntry;
|
|
6
|
+
static getRootAsDucBlockCollectionEntry(bb: flatbuffers.ByteBuffer, obj?: DucBlockCollectionEntry): DucBlockCollectionEntry;
|
|
7
|
+
static getSizePrefixedRootAsDucBlockCollectionEntry(bb: flatbuffers.ByteBuffer, obj?: DucBlockCollectionEntry): DucBlockCollectionEntry;
|
|
8
|
+
id(): string | null;
|
|
9
|
+
id(optionalEncoding: flatbuffers.Encoding): string | Uint8Array | null;
|
|
10
|
+
isCollection(): boolean;
|
|
11
|
+
static startDucBlockCollectionEntry(builder: flatbuffers.Builder): void;
|
|
12
|
+
static addId(builder: flatbuffers.Builder, idOffset: flatbuffers.Offset): void;
|
|
13
|
+
static addIsCollection(builder: flatbuffers.Builder, isCollection: boolean): void;
|
|
14
|
+
static endDucBlockCollectionEntry(builder: flatbuffers.Builder): flatbuffers.Offset;
|
|
15
|
+
static createDucBlockCollectionEntry(builder: flatbuffers.Builder, idOffset: flatbuffers.Offset, isCollection: boolean): flatbuffers.Offset;
|
|
16
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
// automatically generated by the FlatBuffers compiler, do not modify
|
|
2
|
+
/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
|
|
3
|
+
import * as flatbuffers from 'flatbuffers';
|
|
4
|
+
export class DucBlockCollectionEntry {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.bb = null;
|
|
7
|
+
this.bb_pos = 0;
|
|
8
|
+
}
|
|
9
|
+
__init(i, bb) {
|
|
10
|
+
this.bb_pos = i;
|
|
11
|
+
this.bb = bb;
|
|
12
|
+
return this;
|
|
13
|
+
}
|
|
14
|
+
static getRootAsDucBlockCollectionEntry(bb, obj) {
|
|
15
|
+
return (obj || new DucBlockCollectionEntry()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
|
16
|
+
}
|
|
17
|
+
static getSizePrefixedRootAsDucBlockCollectionEntry(bb, obj) {
|
|
18
|
+
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
|
|
19
|
+
return (obj || new DucBlockCollectionEntry()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
|
20
|
+
}
|
|
21
|
+
id(optionalEncoding) {
|
|
22
|
+
const offset = this.bb.__offset(this.bb_pos, 4);
|
|
23
|
+
return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null;
|
|
24
|
+
}
|
|
25
|
+
isCollection() {
|
|
26
|
+
const offset = this.bb.__offset(this.bb_pos, 6);
|
|
27
|
+
return offset ? !!this.bb.readInt8(this.bb_pos + offset) : false;
|
|
28
|
+
}
|
|
29
|
+
static startDucBlockCollectionEntry(builder) {
|
|
30
|
+
builder.startObject(2);
|
|
31
|
+
}
|
|
32
|
+
static addId(builder, idOffset) {
|
|
33
|
+
builder.addFieldOffset(0, idOffset, 0);
|
|
34
|
+
}
|
|
35
|
+
static addIsCollection(builder, isCollection) {
|
|
36
|
+
builder.addFieldInt8(1, +isCollection, +false);
|
|
37
|
+
}
|
|
38
|
+
static endDucBlockCollectionEntry(builder) {
|
|
39
|
+
const offset = builder.endObject();
|
|
40
|
+
return offset;
|
|
41
|
+
}
|
|
42
|
+
static createDucBlockCollectionEntry(builder, idOffset, isCollection) {
|
|
43
|
+
DucBlockCollectionEntry.startDucBlockCollectionEntry(builder);
|
|
44
|
+
DucBlockCollectionEntry.addId(builder, idOffset);
|
|
45
|
+
DucBlockCollectionEntry.addIsCollection(builder, isCollection);
|
|
46
|
+
return DucBlockCollectionEntry.endDucBlockCollectionEntry(builder);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import * as flatbuffers from 'flatbuffers';
|
|
2
|
+
import { DucBlockCollectionEntry } from '../duc/duc-block-collection-entry';
|
|
3
|
+
import { DucBlockMetadata } from '../duc/duc-block-metadata';
|
|
4
|
+
export declare class DucBlockCollection {
|
|
5
|
+
bb: flatbuffers.ByteBuffer | null;
|
|
6
|
+
bb_pos: number;
|
|
7
|
+
__init(i: number, bb: flatbuffers.ByteBuffer): DucBlockCollection;
|
|
8
|
+
static getRootAsDucBlockCollection(bb: flatbuffers.ByteBuffer, obj?: DucBlockCollection): DucBlockCollection;
|
|
9
|
+
static getSizePrefixedRootAsDucBlockCollection(bb: flatbuffers.ByteBuffer, obj?: DucBlockCollection): DucBlockCollection;
|
|
10
|
+
id(): string | null;
|
|
11
|
+
id(optionalEncoding: flatbuffers.Encoding): string | Uint8Array | null;
|
|
12
|
+
label(): string | null;
|
|
13
|
+
label(optionalEncoding: flatbuffers.Encoding): string | Uint8Array | null;
|
|
14
|
+
children(index: number, obj?: DucBlockCollectionEntry): DucBlockCollectionEntry | null;
|
|
15
|
+
childrenLength(): number;
|
|
16
|
+
metadata(obj?: DucBlockMetadata): DucBlockMetadata | null;
|
|
17
|
+
thumbnail(index: number): number | null;
|
|
18
|
+
thumbnailLength(): number;
|
|
19
|
+
thumbnailArray(): Uint8Array | null;
|
|
20
|
+
static startDucBlockCollection(builder: flatbuffers.Builder): void;
|
|
21
|
+
static addId(builder: flatbuffers.Builder, idOffset: flatbuffers.Offset): void;
|
|
22
|
+
static addLabel(builder: flatbuffers.Builder, labelOffset: flatbuffers.Offset): void;
|
|
23
|
+
static addChildren(builder: flatbuffers.Builder, childrenOffset: flatbuffers.Offset): void;
|
|
24
|
+
static createChildrenVector(builder: flatbuffers.Builder, data: flatbuffers.Offset[]): flatbuffers.Offset;
|
|
25
|
+
static startChildrenVector(builder: flatbuffers.Builder, numElems: number): void;
|
|
26
|
+
static addMetadata(builder: flatbuffers.Builder, metadataOffset: flatbuffers.Offset): void;
|
|
27
|
+
static addThumbnail(builder: flatbuffers.Builder, thumbnailOffset: flatbuffers.Offset): void;
|
|
28
|
+
static createThumbnailVector(builder: flatbuffers.Builder, data: number[] | Uint8Array): flatbuffers.Offset;
|
|
29
|
+
static startThumbnailVector(builder: flatbuffers.Builder, numElems: number): void;
|
|
30
|
+
static endDucBlockCollection(builder: flatbuffers.Builder): flatbuffers.Offset;
|
|
31
|
+
}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
// automatically generated by the FlatBuffers compiler, do not modify
|
|
2
|
+
/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
|
|
3
|
+
import * as flatbuffers from 'flatbuffers';
|
|
4
|
+
import { DucBlockCollectionEntry } from '../duc/duc-block-collection-entry';
|
|
5
|
+
import { DucBlockMetadata } from '../duc/duc-block-metadata';
|
|
6
|
+
export class DucBlockCollection {
|
|
7
|
+
constructor() {
|
|
8
|
+
this.bb = null;
|
|
9
|
+
this.bb_pos = 0;
|
|
10
|
+
}
|
|
11
|
+
__init(i, bb) {
|
|
12
|
+
this.bb_pos = i;
|
|
13
|
+
this.bb = bb;
|
|
14
|
+
return this;
|
|
15
|
+
}
|
|
16
|
+
static getRootAsDucBlockCollection(bb, obj) {
|
|
17
|
+
return (obj || new DucBlockCollection()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
|
18
|
+
}
|
|
19
|
+
static getSizePrefixedRootAsDucBlockCollection(bb, obj) {
|
|
20
|
+
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
|
|
21
|
+
return (obj || new DucBlockCollection()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
|
22
|
+
}
|
|
23
|
+
id(optionalEncoding) {
|
|
24
|
+
const offset = this.bb.__offset(this.bb_pos, 4);
|
|
25
|
+
return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null;
|
|
26
|
+
}
|
|
27
|
+
label(optionalEncoding) {
|
|
28
|
+
const offset = this.bb.__offset(this.bb_pos, 6);
|
|
29
|
+
return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null;
|
|
30
|
+
}
|
|
31
|
+
children(index, obj) {
|
|
32
|
+
const offset = this.bb.__offset(this.bb_pos, 8);
|
|
33
|
+
return offset ? (obj || new DucBlockCollectionEntry()).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos + offset) + index * 4), this.bb) : null;
|
|
34
|
+
}
|
|
35
|
+
childrenLength() {
|
|
36
|
+
const offset = this.bb.__offset(this.bb_pos, 8);
|
|
37
|
+
return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
|
|
38
|
+
}
|
|
39
|
+
metadata(obj) {
|
|
40
|
+
const offset = this.bb.__offset(this.bb_pos, 10);
|
|
41
|
+
return offset ? (obj || new DucBlockMetadata()).__init(this.bb.__indirect(this.bb_pos + offset), this.bb) : null;
|
|
42
|
+
}
|
|
43
|
+
thumbnail(index) {
|
|
44
|
+
const offset = this.bb.__offset(this.bb_pos, 12);
|
|
45
|
+
return offset ? this.bb.readUint8(this.bb.__vector(this.bb_pos + offset) + index) : 0;
|
|
46
|
+
}
|
|
47
|
+
thumbnailLength() {
|
|
48
|
+
const offset = this.bb.__offset(this.bb_pos, 12);
|
|
49
|
+
return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
|
|
50
|
+
}
|
|
51
|
+
thumbnailArray() {
|
|
52
|
+
const offset = this.bb.__offset(this.bb_pos, 12);
|
|
53
|
+
return offset ? new Uint8Array(this.bb.bytes().buffer, this.bb.bytes().byteOffset + this.bb.__vector(this.bb_pos + offset), this.bb.__vector_len(this.bb_pos + offset)) : null;
|
|
54
|
+
}
|
|
55
|
+
static startDucBlockCollection(builder) {
|
|
56
|
+
builder.startObject(5);
|
|
57
|
+
}
|
|
58
|
+
static addId(builder, idOffset) {
|
|
59
|
+
builder.addFieldOffset(0, idOffset, 0);
|
|
60
|
+
}
|
|
61
|
+
static addLabel(builder, labelOffset) {
|
|
62
|
+
builder.addFieldOffset(1, labelOffset, 0);
|
|
63
|
+
}
|
|
64
|
+
static addChildren(builder, childrenOffset) {
|
|
65
|
+
builder.addFieldOffset(2, childrenOffset, 0);
|
|
66
|
+
}
|
|
67
|
+
static createChildrenVector(builder, data) {
|
|
68
|
+
builder.startVector(4, data.length, 4);
|
|
69
|
+
for (let i = data.length - 1; i >= 0; i--) {
|
|
70
|
+
builder.addOffset(data[i]);
|
|
71
|
+
}
|
|
72
|
+
return builder.endVector();
|
|
73
|
+
}
|
|
74
|
+
static startChildrenVector(builder, numElems) {
|
|
75
|
+
builder.startVector(4, numElems, 4);
|
|
76
|
+
}
|
|
77
|
+
static addMetadata(builder, metadataOffset) {
|
|
78
|
+
builder.addFieldOffset(3, metadataOffset, 0);
|
|
79
|
+
}
|
|
80
|
+
static addThumbnail(builder, thumbnailOffset) {
|
|
81
|
+
builder.addFieldOffset(4, thumbnailOffset, 0);
|
|
82
|
+
}
|
|
83
|
+
static createThumbnailVector(builder, data) {
|
|
84
|
+
builder.startVector(1, data.length, 1);
|
|
85
|
+
for (let i = data.length - 1; i >= 0; i--) {
|
|
86
|
+
builder.addInt8(data[i]);
|
|
87
|
+
}
|
|
88
|
+
return builder.endVector();
|
|
89
|
+
}
|
|
90
|
+
static startThumbnailVector(builder, numElems) {
|
|
91
|
+
builder.startVector(1, numElems, 1);
|
|
92
|
+
}
|
|
93
|
+
static endDucBlockCollection(builder) {
|
|
94
|
+
const offset = builder.endObject();
|
|
95
|
+
return offset;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
@@ -1,30 +1,10 @@
|
|
|
1
1
|
import * as flatbuffers from 'flatbuffers';
|
|
2
|
-
import { DucBlockDuplicationArray } from '../duc/duc-block-duplication-array';
|
|
3
|
-
import { StringValueEntry } from '../duc/string-value-entry';
|
|
4
|
-
import { _DucElementBase } from '../duc/duc-element-base';
|
|
5
2
|
export declare class DucBlockInstanceElement {
|
|
6
3
|
bb: flatbuffers.ByteBuffer | null;
|
|
7
4
|
bb_pos: number;
|
|
8
5
|
__init(i: number, bb: flatbuffers.ByteBuffer): DucBlockInstanceElement;
|
|
9
6
|
static getRootAsDucBlockInstanceElement(bb: flatbuffers.ByteBuffer, obj?: DucBlockInstanceElement): DucBlockInstanceElement;
|
|
10
7
|
static getSizePrefixedRootAsDucBlockInstanceElement(bb: flatbuffers.ByteBuffer, obj?: DucBlockInstanceElement): DucBlockInstanceElement;
|
|
11
|
-
base(obj?: _DucElementBase): _DucElementBase | null;
|
|
12
|
-
blockId(): string | null;
|
|
13
|
-
blockId(optionalEncoding: flatbuffers.Encoding): string | Uint8Array | null;
|
|
14
|
-
elementOverrides(index: number, obj?: StringValueEntry): StringValueEntry | null;
|
|
15
|
-
elementOverridesLength(): number;
|
|
16
|
-
attributeValues(index: number, obj?: StringValueEntry): StringValueEntry | null;
|
|
17
|
-
attributeValuesLength(): number;
|
|
18
|
-
duplicationArray(obj?: DucBlockDuplicationArray): DucBlockDuplicationArray | null;
|
|
19
8
|
static startDucBlockInstanceElement(builder: flatbuffers.Builder): void;
|
|
20
|
-
static addBase(builder: flatbuffers.Builder, baseOffset: flatbuffers.Offset): void;
|
|
21
|
-
static addBlockId(builder: flatbuffers.Builder, blockIdOffset: flatbuffers.Offset): void;
|
|
22
|
-
static addElementOverrides(builder: flatbuffers.Builder, elementOverridesOffset: flatbuffers.Offset): void;
|
|
23
|
-
static createElementOverridesVector(builder: flatbuffers.Builder, data: flatbuffers.Offset[]): flatbuffers.Offset;
|
|
24
|
-
static startElementOverridesVector(builder: flatbuffers.Builder, numElems: number): void;
|
|
25
|
-
static addAttributeValues(builder: flatbuffers.Builder, attributeValuesOffset: flatbuffers.Offset): void;
|
|
26
|
-
static createAttributeValuesVector(builder: flatbuffers.Builder, data: flatbuffers.Offset[]): flatbuffers.Offset;
|
|
27
|
-
static startAttributeValuesVector(builder: flatbuffers.Builder, numElems: number): void;
|
|
28
|
-
static addDuplicationArray(builder: flatbuffers.Builder, duplicationArrayOffset: flatbuffers.Offset): void;
|
|
29
9
|
static endDucBlockInstanceElement(builder: flatbuffers.Builder): flatbuffers.Offset;
|
|
30
10
|
}
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
// automatically generated by the FlatBuffers compiler, do not modify
|
|
2
2
|
/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
|
|
3
3
|
import * as flatbuffers from 'flatbuffers';
|
|
4
|
-
import { DucBlockDuplicationArray } from '../duc/duc-block-duplication-array';
|
|
5
|
-
import { StringValueEntry } from '../duc/string-value-entry';
|
|
6
|
-
import { _DucElementBase } from '../duc/duc-element-base';
|
|
7
4
|
export class DucBlockInstanceElement {
|
|
8
5
|
constructor() {
|
|
9
6
|
this.bb = null;
|
|
@@ -21,72 +18,9 @@ export class DucBlockInstanceElement {
|
|
|
21
18
|
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
|
|
22
19
|
return (obj || new DucBlockInstanceElement()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
|
23
20
|
}
|
|
24
|
-
base(obj) {
|
|
25
|
-
const offset = this.bb.__offset(this.bb_pos, 4);
|
|
26
|
-
return offset ? (obj || new _DucElementBase()).__init(this.bb.__indirect(this.bb_pos + offset), this.bb) : null;
|
|
27
|
-
}
|
|
28
|
-
blockId(optionalEncoding) {
|
|
29
|
-
const offset = this.bb.__offset(this.bb_pos, 6);
|
|
30
|
-
return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null;
|
|
31
|
-
}
|
|
32
|
-
elementOverrides(index, obj) {
|
|
33
|
-
const offset = this.bb.__offset(this.bb_pos, 8);
|
|
34
|
-
return offset ? (obj || new StringValueEntry()).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos + offset) + index * 4), this.bb) : null;
|
|
35
|
-
}
|
|
36
|
-
elementOverridesLength() {
|
|
37
|
-
const offset = this.bb.__offset(this.bb_pos, 8);
|
|
38
|
-
return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
|
|
39
|
-
}
|
|
40
|
-
attributeValues(index, obj) {
|
|
41
|
-
const offset = this.bb.__offset(this.bb_pos, 10);
|
|
42
|
-
return offset ? (obj || new StringValueEntry()).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos + offset) + index * 4), this.bb) : null;
|
|
43
|
-
}
|
|
44
|
-
attributeValuesLength() {
|
|
45
|
-
const offset = this.bb.__offset(this.bb_pos, 10);
|
|
46
|
-
return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
|
|
47
|
-
}
|
|
48
|
-
duplicationArray(obj) {
|
|
49
|
-
const offset = this.bb.__offset(this.bb_pos, 12);
|
|
50
|
-
return offset ? (obj || new DucBlockDuplicationArray()).__init(this.bb.__indirect(this.bb_pos + offset), this.bb) : null;
|
|
51
|
-
}
|
|
52
21
|
static startDucBlockInstanceElement(builder) {
|
|
53
22
|
builder.startObject(5);
|
|
54
23
|
}
|
|
55
|
-
static addBase(builder, baseOffset) {
|
|
56
|
-
builder.addFieldOffset(0, baseOffset, 0);
|
|
57
|
-
}
|
|
58
|
-
static addBlockId(builder, blockIdOffset) {
|
|
59
|
-
builder.addFieldOffset(1, blockIdOffset, 0);
|
|
60
|
-
}
|
|
61
|
-
static addElementOverrides(builder, elementOverridesOffset) {
|
|
62
|
-
builder.addFieldOffset(2, elementOverridesOffset, 0);
|
|
63
|
-
}
|
|
64
|
-
static createElementOverridesVector(builder, data) {
|
|
65
|
-
builder.startVector(4, data.length, 4);
|
|
66
|
-
for (let i = data.length - 1; i >= 0; i--) {
|
|
67
|
-
builder.addOffset(data[i]);
|
|
68
|
-
}
|
|
69
|
-
return builder.endVector();
|
|
70
|
-
}
|
|
71
|
-
static startElementOverridesVector(builder, numElems) {
|
|
72
|
-
builder.startVector(4, numElems, 4);
|
|
73
|
-
}
|
|
74
|
-
static addAttributeValues(builder, attributeValuesOffset) {
|
|
75
|
-
builder.addFieldOffset(3, attributeValuesOffset, 0);
|
|
76
|
-
}
|
|
77
|
-
static createAttributeValuesVector(builder, data) {
|
|
78
|
-
builder.startVector(4, data.length, 4);
|
|
79
|
-
for (let i = data.length - 1; i >= 0; i--) {
|
|
80
|
-
builder.addOffset(data[i]);
|
|
81
|
-
}
|
|
82
|
-
return builder.endVector();
|
|
83
|
-
}
|
|
84
|
-
static startAttributeValuesVector(builder, numElems) {
|
|
85
|
-
builder.startVector(4, numElems, 4);
|
|
86
|
-
}
|
|
87
|
-
static addDuplicationArray(builder, duplicationArrayOffset) {
|
|
88
|
-
builder.addFieldOffset(4, duplicationArrayOffset, 0);
|
|
89
|
-
}
|
|
90
24
|
static endDucBlockInstanceElement(builder) {
|
|
91
25
|
const offset = builder.endObject();
|
|
92
26
|
return offset;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import * as flatbuffers from 'flatbuffers';
|
|
2
|
+
import { DucBlockDuplicationArray } from '../duc/duc-block-duplication-array';
|
|
3
|
+
import { StringValueEntry } from '../duc/string-value-entry';
|
|
4
|
+
export declare class DucBlockInstance {
|
|
5
|
+
bb: flatbuffers.ByteBuffer | null;
|
|
6
|
+
bb_pos: number;
|
|
7
|
+
__init(i: number, bb: flatbuffers.ByteBuffer): DucBlockInstance;
|
|
8
|
+
static getRootAsDucBlockInstance(bb: flatbuffers.ByteBuffer, obj?: DucBlockInstance): DucBlockInstance;
|
|
9
|
+
static getSizePrefixedRootAsDucBlockInstance(bb: flatbuffers.ByteBuffer, obj?: DucBlockInstance): DucBlockInstance;
|
|
10
|
+
id(): string | null;
|
|
11
|
+
id(optionalEncoding: flatbuffers.Encoding): string | Uint8Array | null;
|
|
12
|
+
blockId(): string | null;
|
|
13
|
+
blockId(optionalEncoding: flatbuffers.Encoding): string | Uint8Array | null;
|
|
14
|
+
elementOverrides(index: number, obj?: StringValueEntry): StringValueEntry | null;
|
|
15
|
+
elementOverridesLength(): number;
|
|
16
|
+
attributeValues(index: number, obj?: StringValueEntry): StringValueEntry | null;
|
|
17
|
+
attributeValuesLength(): number;
|
|
18
|
+
duplicationArray(obj?: DucBlockDuplicationArray): DucBlockDuplicationArray | null;
|
|
19
|
+
version(): number;
|
|
20
|
+
static startDucBlockInstance(builder: flatbuffers.Builder): void;
|
|
21
|
+
static addId(builder: flatbuffers.Builder, idOffset: flatbuffers.Offset): void;
|
|
22
|
+
static addBlockId(builder: flatbuffers.Builder, blockIdOffset: flatbuffers.Offset): void;
|
|
23
|
+
static addElementOverrides(builder: flatbuffers.Builder, elementOverridesOffset: flatbuffers.Offset): void;
|
|
24
|
+
static createElementOverridesVector(builder: flatbuffers.Builder, data: flatbuffers.Offset[]): flatbuffers.Offset;
|
|
25
|
+
static startElementOverridesVector(builder: flatbuffers.Builder, numElems: number): void;
|
|
26
|
+
static addAttributeValues(builder: flatbuffers.Builder, attributeValuesOffset: flatbuffers.Offset): void;
|
|
27
|
+
static createAttributeValuesVector(builder: flatbuffers.Builder, data: flatbuffers.Offset[]): flatbuffers.Offset;
|
|
28
|
+
static startAttributeValuesVector(builder: flatbuffers.Builder, numElems: number): void;
|
|
29
|
+
static addDuplicationArray(builder: flatbuffers.Builder, duplicationArrayOffset: flatbuffers.Offset): void;
|
|
30
|
+
static addVersion(builder: flatbuffers.Builder, version: number): void;
|
|
31
|
+
static endDucBlockInstance(builder: flatbuffers.Builder): flatbuffers.Offset;
|
|
32
|
+
}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
// automatically generated by the FlatBuffers compiler, do not modify
|
|
2
|
+
/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
|
|
3
|
+
import * as flatbuffers from 'flatbuffers';
|
|
4
|
+
import { DucBlockDuplicationArray } from '../duc/duc-block-duplication-array';
|
|
5
|
+
import { StringValueEntry } from '../duc/string-value-entry';
|
|
6
|
+
export class DucBlockInstance {
|
|
7
|
+
constructor() {
|
|
8
|
+
this.bb = null;
|
|
9
|
+
this.bb_pos = 0;
|
|
10
|
+
}
|
|
11
|
+
__init(i, bb) {
|
|
12
|
+
this.bb_pos = i;
|
|
13
|
+
this.bb = bb;
|
|
14
|
+
return this;
|
|
15
|
+
}
|
|
16
|
+
static getRootAsDucBlockInstance(bb, obj) {
|
|
17
|
+
return (obj || new DucBlockInstance()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
|
18
|
+
}
|
|
19
|
+
static getSizePrefixedRootAsDucBlockInstance(bb, obj) {
|
|
20
|
+
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
|
|
21
|
+
return (obj || new DucBlockInstance()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
|
22
|
+
}
|
|
23
|
+
id(optionalEncoding) {
|
|
24
|
+
const offset = this.bb.__offset(this.bb_pos, 4);
|
|
25
|
+
return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null;
|
|
26
|
+
}
|
|
27
|
+
blockId(optionalEncoding) {
|
|
28
|
+
const offset = this.bb.__offset(this.bb_pos, 6);
|
|
29
|
+
return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null;
|
|
30
|
+
}
|
|
31
|
+
elementOverrides(index, obj) {
|
|
32
|
+
const offset = this.bb.__offset(this.bb_pos, 8);
|
|
33
|
+
return offset ? (obj || new StringValueEntry()).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos + offset) + index * 4), this.bb) : null;
|
|
34
|
+
}
|
|
35
|
+
elementOverridesLength() {
|
|
36
|
+
const offset = this.bb.__offset(this.bb_pos, 8);
|
|
37
|
+
return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
|
|
38
|
+
}
|
|
39
|
+
attributeValues(index, obj) {
|
|
40
|
+
const offset = this.bb.__offset(this.bb_pos, 10);
|
|
41
|
+
return offset ? (obj || new StringValueEntry()).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos + offset) + index * 4), this.bb) : null;
|
|
42
|
+
}
|
|
43
|
+
attributeValuesLength() {
|
|
44
|
+
const offset = this.bb.__offset(this.bb_pos, 10);
|
|
45
|
+
return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
|
|
46
|
+
}
|
|
47
|
+
duplicationArray(obj) {
|
|
48
|
+
const offset = this.bb.__offset(this.bb_pos, 12);
|
|
49
|
+
return offset ? (obj || new DucBlockDuplicationArray()).__init(this.bb.__indirect(this.bb_pos + offset), this.bb) : null;
|
|
50
|
+
}
|
|
51
|
+
version() {
|
|
52
|
+
const offset = this.bb.__offset(this.bb_pos, 14);
|
|
53
|
+
return offset ? this.bb.readInt32(this.bb_pos + offset) : 0;
|
|
54
|
+
}
|
|
55
|
+
static startDucBlockInstance(builder) {
|
|
56
|
+
builder.startObject(6);
|
|
57
|
+
}
|
|
58
|
+
static addId(builder, idOffset) {
|
|
59
|
+
builder.addFieldOffset(0, idOffset, 0);
|
|
60
|
+
}
|
|
61
|
+
static addBlockId(builder, blockIdOffset) {
|
|
62
|
+
builder.addFieldOffset(1, blockIdOffset, 0);
|
|
63
|
+
}
|
|
64
|
+
static addElementOverrides(builder, elementOverridesOffset) {
|
|
65
|
+
builder.addFieldOffset(2, elementOverridesOffset, 0);
|
|
66
|
+
}
|
|
67
|
+
static createElementOverridesVector(builder, data) {
|
|
68
|
+
builder.startVector(4, data.length, 4);
|
|
69
|
+
for (let i = data.length - 1; i >= 0; i--) {
|
|
70
|
+
builder.addOffset(data[i]);
|
|
71
|
+
}
|
|
72
|
+
return builder.endVector();
|
|
73
|
+
}
|
|
74
|
+
static startElementOverridesVector(builder, numElems) {
|
|
75
|
+
builder.startVector(4, numElems, 4);
|
|
76
|
+
}
|
|
77
|
+
static addAttributeValues(builder, attributeValuesOffset) {
|
|
78
|
+
builder.addFieldOffset(3, attributeValuesOffset, 0);
|
|
79
|
+
}
|
|
80
|
+
static createAttributeValuesVector(builder, data) {
|
|
81
|
+
builder.startVector(4, data.length, 4);
|
|
82
|
+
for (let i = data.length - 1; i >= 0; i--) {
|
|
83
|
+
builder.addOffset(data[i]);
|
|
84
|
+
}
|
|
85
|
+
return builder.endVector();
|
|
86
|
+
}
|
|
87
|
+
static startAttributeValuesVector(builder, numElems) {
|
|
88
|
+
builder.startVector(4, numElems, 4);
|
|
89
|
+
}
|
|
90
|
+
static addDuplicationArray(builder, duplicationArrayOffset) {
|
|
91
|
+
builder.addFieldOffset(4, duplicationArrayOffset, 0);
|
|
92
|
+
}
|
|
93
|
+
static addVersion(builder, version) {
|
|
94
|
+
builder.addFieldInt32(5, version, 0);
|
|
95
|
+
}
|
|
96
|
+
static endDucBlockInstance(builder) {
|
|
97
|
+
const offset = builder.endObject();
|
|
98
|
+
return offset;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import * as flatbuffers from 'flatbuffers';
|
|
2
|
+
export declare class DucBlockMetadata {
|
|
3
|
+
bb: flatbuffers.ByteBuffer | null;
|
|
4
|
+
bb_pos: number;
|
|
5
|
+
__init(i: number, bb: flatbuffers.ByteBuffer): DucBlockMetadata;
|
|
6
|
+
static getRootAsDucBlockMetadata(bb: flatbuffers.ByteBuffer, obj?: DucBlockMetadata): DucBlockMetadata;
|
|
7
|
+
static getSizePrefixedRootAsDucBlockMetadata(bb: flatbuffers.ByteBuffer, obj?: DucBlockMetadata): DucBlockMetadata;
|
|
8
|
+
source(): string | null;
|
|
9
|
+
source(optionalEncoding: flatbuffers.Encoding): string | Uint8Array | null;
|
|
10
|
+
usageCount(): number;
|
|
11
|
+
createdAt(): bigint;
|
|
12
|
+
updatedAt(): bigint;
|
|
13
|
+
localization(index: number): number | null;
|
|
14
|
+
localizationLength(): number;
|
|
15
|
+
localizationArray(): Uint8Array | null;
|
|
16
|
+
static startDucBlockMetadata(builder: flatbuffers.Builder): void;
|
|
17
|
+
static addSource(builder: flatbuffers.Builder, sourceOffset: flatbuffers.Offset): void;
|
|
18
|
+
static addUsageCount(builder: flatbuffers.Builder, usageCount: number): void;
|
|
19
|
+
static addCreatedAt(builder: flatbuffers.Builder, createdAt: bigint): void;
|
|
20
|
+
static addUpdatedAt(builder: flatbuffers.Builder, updatedAt: bigint): void;
|
|
21
|
+
static addLocalization(builder: flatbuffers.Builder, localizationOffset: flatbuffers.Offset): void;
|
|
22
|
+
static createLocalizationVector(builder: flatbuffers.Builder, data: number[] | Uint8Array): flatbuffers.Offset;
|
|
23
|
+
static startLocalizationVector(builder: flatbuffers.Builder, numElems: number): void;
|
|
24
|
+
static endDucBlockMetadata(builder: flatbuffers.Builder): flatbuffers.Offset;
|
|
25
|
+
static createDucBlockMetadata(builder: flatbuffers.Builder, sourceOffset: flatbuffers.Offset, usageCount: number, createdAt: bigint, updatedAt: bigint, localizationOffset: flatbuffers.Offset): flatbuffers.Offset;
|
|
26
|
+
}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
// automatically generated by the FlatBuffers compiler, do not modify
|
|
2
|
+
/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
|
|
3
|
+
import * as flatbuffers from 'flatbuffers';
|
|
4
|
+
export class DucBlockMetadata {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.bb = null;
|
|
7
|
+
this.bb_pos = 0;
|
|
8
|
+
}
|
|
9
|
+
__init(i, bb) {
|
|
10
|
+
this.bb_pos = i;
|
|
11
|
+
this.bb = bb;
|
|
12
|
+
return this;
|
|
13
|
+
}
|
|
14
|
+
static getRootAsDucBlockMetadata(bb, obj) {
|
|
15
|
+
return (obj || new DucBlockMetadata()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
|
16
|
+
}
|
|
17
|
+
static getSizePrefixedRootAsDucBlockMetadata(bb, obj) {
|
|
18
|
+
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
|
|
19
|
+
return (obj || new DucBlockMetadata()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
|
20
|
+
}
|
|
21
|
+
source(optionalEncoding) {
|
|
22
|
+
const offset = this.bb.__offset(this.bb_pos, 4);
|
|
23
|
+
return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null;
|
|
24
|
+
}
|
|
25
|
+
usageCount() {
|
|
26
|
+
const offset = this.bb.__offset(this.bb_pos, 6);
|
|
27
|
+
return offset ? this.bb.readInt32(this.bb_pos + offset) : 0;
|
|
28
|
+
}
|
|
29
|
+
createdAt() {
|
|
30
|
+
const offset = this.bb.__offset(this.bb_pos, 8);
|
|
31
|
+
return offset ? this.bb.readInt64(this.bb_pos + offset) : BigInt('0');
|
|
32
|
+
}
|
|
33
|
+
updatedAt() {
|
|
34
|
+
const offset = this.bb.__offset(this.bb_pos, 10);
|
|
35
|
+
return offset ? this.bb.readInt64(this.bb_pos + offset) : BigInt('0');
|
|
36
|
+
}
|
|
37
|
+
localization(index) {
|
|
38
|
+
const offset = this.bb.__offset(this.bb_pos, 14);
|
|
39
|
+
return offset ? this.bb.readUint8(this.bb.__vector(this.bb_pos + offset) + index) : 0;
|
|
40
|
+
}
|
|
41
|
+
localizationLength() {
|
|
42
|
+
const offset = this.bb.__offset(this.bb_pos, 14);
|
|
43
|
+
return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
|
|
44
|
+
}
|
|
45
|
+
localizationArray() {
|
|
46
|
+
const offset = this.bb.__offset(this.bb_pos, 14);
|
|
47
|
+
return offset ? new Uint8Array(this.bb.bytes().buffer, this.bb.bytes().byteOffset + this.bb.__vector(this.bb_pos + offset), this.bb.__vector_len(this.bb_pos + offset)) : null;
|
|
48
|
+
}
|
|
49
|
+
static startDucBlockMetadata(builder) {
|
|
50
|
+
builder.startObject(6);
|
|
51
|
+
}
|
|
52
|
+
static addSource(builder, sourceOffset) {
|
|
53
|
+
builder.addFieldOffset(0, sourceOffset, 0);
|
|
54
|
+
}
|
|
55
|
+
static addUsageCount(builder, usageCount) {
|
|
56
|
+
builder.addFieldInt32(1, usageCount, 0);
|
|
57
|
+
}
|
|
58
|
+
static addCreatedAt(builder, createdAt) {
|
|
59
|
+
builder.addFieldInt64(2, createdAt, BigInt('0'));
|
|
60
|
+
}
|
|
61
|
+
static addUpdatedAt(builder, updatedAt) {
|
|
62
|
+
builder.addFieldInt64(3, updatedAt, BigInt('0'));
|
|
63
|
+
}
|
|
64
|
+
static addLocalization(builder, localizationOffset) {
|
|
65
|
+
builder.addFieldOffset(5, localizationOffset, 0);
|
|
66
|
+
}
|
|
67
|
+
static createLocalizationVector(builder, data) {
|
|
68
|
+
builder.startVector(1, data.length, 1);
|
|
69
|
+
for (let i = data.length - 1; i >= 0; i--) {
|
|
70
|
+
builder.addInt8(data[i]);
|
|
71
|
+
}
|
|
72
|
+
return builder.endVector();
|
|
73
|
+
}
|
|
74
|
+
static startLocalizationVector(builder, numElems) {
|
|
75
|
+
builder.startVector(1, numElems, 1);
|
|
76
|
+
}
|
|
77
|
+
static endDucBlockMetadata(builder) {
|
|
78
|
+
const offset = builder.endObject();
|
|
79
|
+
return offset;
|
|
80
|
+
}
|
|
81
|
+
static createDucBlockMetadata(builder, sourceOffset, usageCount, createdAt, updatedAt, localizationOffset) {
|
|
82
|
+
DucBlockMetadata.startDucBlockMetadata(builder);
|
|
83
|
+
DucBlockMetadata.addSource(builder, sourceOffset);
|
|
84
|
+
DucBlockMetadata.addUsageCount(builder, usageCount);
|
|
85
|
+
DucBlockMetadata.addCreatedAt(builder, createdAt);
|
|
86
|
+
DucBlockMetadata.addUpdatedAt(builder, updatedAt);
|
|
87
|
+
DucBlockMetadata.addLocalization(builder, localizationOffset);
|
|
88
|
+
return DucBlockMetadata.endDucBlockMetadata(builder);
|
|
89
|
+
}
|
|
90
|
+
}
|