@rise-maritime/keelson-js 0.6.0-pre.3 → 0.6.0-pre.4
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/payloads/OperationalAuthority.d.ts +7 -1
- package/dist/payloads/OperationalAuthority.js +5 -5
- package/dist/payloads/WarrantRecord.d.ts +133 -0
- package/dist/payloads/WarrantRecord.js +765 -0
- package/dist/payloads/index.keelson.d.ts +1 -0
- package/dist/payloads/index.keelson.js +1 -0
- package/dist/qos.json +2 -1
- package/dist/subjects.json +1 -0
- package/package.json +1 -1
|
@@ -40,8 +40,14 @@ export interface OperationalAuthority {
|
|
|
40
40
|
* diagnostic subjects a source happens to publish is not a safety weight.
|
|
41
41
|
* Deliberately left uncapped: overwriting it when an essential component
|
|
42
42
|
* fails would falsely report that all monitored health had failed.
|
|
43
|
+
*
|
|
44
|
+
* `optional` because not every policy publishing on this subject scores:
|
|
45
|
+
* a policy that derives `level` from claim standings rather than from a
|
|
46
|
+
* score (see the warrant_aggregator connector) publishes no
|
|
47
|
+
* composite_score at all, and its absence must be distinguishable from
|
|
48
|
+
* 0.0, which asserts that all monitored health failed.
|
|
43
49
|
*/
|
|
44
|
-
compositeScore
|
|
50
|
+
compositeScore?: number | undefined;
|
|
45
51
|
/**
|
|
46
52
|
* Human-readable explanation. For operators and logs only — consumers
|
|
47
53
|
* MUST NOT parse this. Everything it says is available structurally in
|
|
@@ -150,7 +150,7 @@ function createBaseOperationalAuthority() {
|
|
|
150
150
|
$type: "keelson.OperationalAuthority",
|
|
151
151
|
timestamp: undefined,
|
|
152
152
|
level: 0,
|
|
153
|
-
compositeScore:
|
|
153
|
+
compositeScore: undefined,
|
|
154
154
|
reason: "",
|
|
155
155
|
componentScores: {},
|
|
156
156
|
authorityScore: undefined,
|
|
@@ -169,7 +169,7 @@ exports.OperationalAuthority = {
|
|
|
169
169
|
if (message.level !== 0) {
|
|
170
170
|
writer.uint32(16).int32(message.level);
|
|
171
171
|
}
|
|
172
|
-
if (message.compositeScore !==
|
|
172
|
+
if (message.compositeScore !== undefined) {
|
|
173
173
|
writer.uint32(29).float(message.compositeScore);
|
|
174
174
|
}
|
|
175
175
|
if (message.reason !== "") {
|
|
@@ -292,7 +292,7 @@ exports.OperationalAuthority = {
|
|
|
292
292
|
$type: exports.OperationalAuthority.$type,
|
|
293
293
|
timestamp: isSet(object.timestamp) ? fromJsonTimestamp(object.timestamp) : undefined,
|
|
294
294
|
level: isSet(object.level) ? operationalAuthority_AuthorityLevelFromJSON(object.level) : 0,
|
|
295
|
-
compositeScore: isSet(object.compositeScore) ? globalThis.Number(object.compositeScore) :
|
|
295
|
+
compositeScore: isSet(object.compositeScore) ? globalThis.Number(object.compositeScore) : undefined,
|
|
296
296
|
reason: isSet(object.reason) ? globalThis.String(object.reason) : "",
|
|
297
297
|
componentScores: isObject(object.componentScores)
|
|
298
298
|
? Object.entries(object.componentScores).reduce((acc, [key, value]) => {
|
|
@@ -319,7 +319,7 @@ exports.OperationalAuthority = {
|
|
|
319
319
|
if (message.level !== 0) {
|
|
320
320
|
obj.level = operationalAuthority_AuthorityLevelToJSON(message.level);
|
|
321
321
|
}
|
|
322
|
-
if (message.compositeScore !==
|
|
322
|
+
if (message.compositeScore !== undefined) {
|
|
323
323
|
obj.compositeScore = message.compositeScore;
|
|
324
324
|
}
|
|
325
325
|
if (message.reason !== "") {
|
|
@@ -358,7 +358,7 @@ exports.OperationalAuthority = {
|
|
|
358
358
|
const message = createBaseOperationalAuthority();
|
|
359
359
|
message.timestamp = object.timestamp ?? undefined;
|
|
360
360
|
message.level = object.level ?? 0;
|
|
361
|
-
message.compositeScore = object.compositeScore ??
|
|
361
|
+
message.compositeScore = object.compositeScore ?? undefined;
|
|
362
362
|
message.reason = object.reason ?? "";
|
|
363
363
|
message.componentScores = Object.entries(object.componentScores ?? {}).reduce((acc, [key, value]) => {
|
|
364
364
|
if (value !== undefined) {
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
2
|
+
/**
|
|
3
|
+
* WarrantRecord is the append-only audit stream for claim standings: the
|
|
4
|
+
* record of why a conclusion held, weakened or lapsed, produced by any
|
|
5
|
+
* evaluator aboard that maintains justification for its conclusions. The
|
|
6
|
+
* warrant_aggregator connector is its first producer; the subject is
|
|
7
|
+
* deliberately producer-neutral and the source_id names the evaluator:
|
|
8
|
+
*
|
|
9
|
+
* {base_path}/@v0/{entity_id}/pubsub/warrant_record/{source_id}
|
|
10
|
+
*
|
|
11
|
+
* so the entity's entire justification record is one subject family and an
|
|
12
|
+
* auditor or recorder watches one place, however many evaluators run.
|
|
13
|
+
*
|
|
14
|
+
* This stream is a reconstruction artifact, never a control input:
|
|
15
|
+
* statements, warrants, backing and evidence are strings by design, and
|
|
16
|
+
* consumers that act on determinations use the typed subjects the producing
|
|
17
|
+
* evaluator also publishes (the warrant_aggregator publishes
|
|
18
|
+
* operational_authority). Durability is a router storage_manager
|
|
19
|
+
* responsibility, not a payload one (protocol-specification.md section 6.3).
|
|
20
|
+
* Events are immutable once published: any future attestation must sign the
|
|
21
|
+
* stored Envelope bytes, never re-serialized state (section 6.3.1).
|
|
22
|
+
*/
|
|
23
|
+
export interface WarrantRecord {
|
|
24
|
+
$type: "keelson.WarrantRecord";
|
|
25
|
+
/** The source timestamp of the event. */
|
|
26
|
+
timestamp: Date | undefined;
|
|
27
|
+
standingTransition?: WarrantRecord_StandingTransition | undefined;
|
|
28
|
+
snapshot?: WarrantRecord_Snapshot | undefined;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* The standing of a claim. Every claim starts WITHDRAWN: standing must
|
|
32
|
+
* be positively established, and absence of evidence counts against a
|
|
33
|
+
* claim, never for it.
|
|
34
|
+
*/
|
|
35
|
+
export declare enum WarrantRecord_Standing {
|
|
36
|
+
STANDING_UNSPECIFIED = 0,
|
|
37
|
+
STANDING_WITHDRAWN = 1,
|
|
38
|
+
STANDING_WEAKENED = 2,
|
|
39
|
+
STANDING_LICENSED = 3,
|
|
40
|
+
UNRECOGNIZED = -1
|
|
41
|
+
}
|
|
42
|
+
export declare function warrantRecord_StandingFromJSON(object: any): WarrantRecord_Standing;
|
|
43
|
+
export declare function warrantRecord_StandingToJSON(object: WarrantRecord_Standing): string;
|
|
44
|
+
/** A rebuttal condition that fired, with the evidence that fired it. */
|
|
45
|
+
export interface WarrantRecord_RebuttalFired {
|
|
46
|
+
$type: "keelson.WarrantRecord.RebuttalFired";
|
|
47
|
+
id: string;
|
|
48
|
+
description: string;
|
|
49
|
+
/** Human-readable rendering of the evidence at firing time. */
|
|
50
|
+
evidence: string;
|
|
51
|
+
/**
|
|
52
|
+
* The health level of the evidence when determinable (the
|
|
53
|
+
* HealthLevel enum name from EntityHealth.proto), empty when the
|
|
54
|
+
* rebuttal fired on absence of evidence.
|
|
55
|
+
*/
|
|
56
|
+
evidenceLevel: string;
|
|
57
|
+
}
|
|
58
|
+
/** The standing of one ground at evaluation time. */
|
|
59
|
+
export interface WarrantRecord_GroundStanding {
|
|
60
|
+
$type: "keelson.WarrantRecord.GroundStanding";
|
|
61
|
+
claimId: string;
|
|
62
|
+
standing: WarrantRecord_Standing;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* One claim changed standing. Lean by design: justification prose lives
|
|
66
|
+
* in the periodic Snapshot, which makes the stream self-contained.
|
|
67
|
+
*/
|
|
68
|
+
export interface WarrantRecord_StandingTransition {
|
|
69
|
+
$type: "keelson.WarrantRecord.StandingTransition";
|
|
70
|
+
claimId: string;
|
|
71
|
+
fromStanding: WarrantRecord_Standing;
|
|
72
|
+
toStanding: WarrantRecord_Standing;
|
|
73
|
+
rebuttalsFired: WarrantRecord_RebuttalFired[];
|
|
74
|
+
grounds: WarrantRecord_GroundStanding[];
|
|
75
|
+
}
|
|
76
|
+
/** The full state of one claim, carried in snapshots. */
|
|
77
|
+
export interface WarrantRecord_ClaimState {
|
|
78
|
+
$type: "keelson.WarrantRecord.ClaimState";
|
|
79
|
+
claimId: string;
|
|
80
|
+
standing: WarrantRecord_Standing;
|
|
81
|
+
since: Date | undefined;
|
|
82
|
+
rebuttalsFired: WarrantRecord_RebuttalFired[];
|
|
83
|
+
grounds: WarrantRecord_GroundStanding[];
|
|
84
|
+
/**
|
|
85
|
+
* The configured justification, carried for legibility so the
|
|
86
|
+
* stream reconstructs without access to the evaluator's config.
|
|
87
|
+
*/
|
|
88
|
+
statement: string;
|
|
89
|
+
warrant: string;
|
|
90
|
+
backing: string;
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Periodic full state, so reconstruction needs only the stream: the
|
|
94
|
+
* state at any instant is the latest snapshot at or before it plus the
|
|
95
|
+
* transitions since.
|
|
96
|
+
*/
|
|
97
|
+
export interface WarrantRecord_Snapshot {
|
|
98
|
+
$type: "keelson.WarrantRecord.Snapshot";
|
|
99
|
+
claims: WarrantRecord_ClaimState[];
|
|
100
|
+
/**
|
|
101
|
+
* Identify the evaluator policy and configuration that produced
|
|
102
|
+
* this state, for replay and audit (same convention as
|
|
103
|
+
* OperationalAuthority).
|
|
104
|
+
*/
|
|
105
|
+
policyConfigDigest?: Uint8Array | undefined;
|
|
106
|
+
policyId?: string | undefined;
|
|
107
|
+
}
|
|
108
|
+
export declare const WarrantRecord: MessageFns<WarrantRecord, "keelson.WarrantRecord">;
|
|
109
|
+
export declare const WarrantRecord_RebuttalFired: MessageFns<WarrantRecord_RebuttalFired, "keelson.WarrantRecord.RebuttalFired">;
|
|
110
|
+
export declare const WarrantRecord_GroundStanding: MessageFns<WarrantRecord_GroundStanding, "keelson.WarrantRecord.GroundStanding">;
|
|
111
|
+
export declare const WarrantRecord_StandingTransition: MessageFns<WarrantRecord_StandingTransition, "keelson.WarrantRecord.StandingTransition">;
|
|
112
|
+
export declare const WarrantRecord_ClaimState: MessageFns<WarrantRecord_ClaimState, "keelson.WarrantRecord.ClaimState">;
|
|
113
|
+
export declare const WarrantRecord_Snapshot: MessageFns<WarrantRecord_Snapshot, "keelson.WarrantRecord.Snapshot">;
|
|
114
|
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
115
|
+
type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
|
|
116
|
+
[K in Exclude<keyof T, "$type">]?: DeepPartial<T[K]>;
|
|
117
|
+
} : Partial<T>;
|
|
118
|
+
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
119
|
+
type Exact<P, I extends P> = P extends Builtin ? P : P & {
|
|
120
|
+
[K in keyof P]: Exact<P[K], I[K]>;
|
|
121
|
+
} & {
|
|
122
|
+
[K in Exclude<keyof I, KeysOfUnion<P> | "$type">]: never;
|
|
123
|
+
};
|
|
124
|
+
interface MessageFns<T, V extends string> {
|
|
125
|
+
readonly $type: V;
|
|
126
|
+
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
|
127
|
+
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
|
128
|
+
fromJSON(object: any): T;
|
|
129
|
+
toJSON(message: T): unknown;
|
|
130
|
+
create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
|
|
131
|
+
fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
|
|
132
|
+
}
|
|
133
|
+
export {};
|
|
@@ -0,0 +1,765 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
3
|
+
// versions:
|
|
4
|
+
// protoc-gen-ts_proto v2.6.1
|
|
5
|
+
// protoc v6.30.2
|
|
6
|
+
// source: WarrantRecord.proto
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.WarrantRecord_Snapshot = exports.WarrantRecord_ClaimState = exports.WarrantRecord_StandingTransition = exports.WarrantRecord_GroundStanding = exports.WarrantRecord_RebuttalFired = exports.WarrantRecord = exports.warrantRecord_StandingToJSON = exports.warrantRecord_StandingFromJSON = exports.WarrantRecord_Standing = void 0;
|
|
9
|
+
/* eslint-disable */
|
|
10
|
+
const wire_1 = require("@bufbuild/protobuf/wire");
|
|
11
|
+
const timestamp_1 = require("./google/protobuf/timestamp");
|
|
12
|
+
const typeRegistry_1 = require("./typeRegistry");
|
|
13
|
+
/**
|
|
14
|
+
* The standing of a claim. Every claim starts WITHDRAWN: standing must
|
|
15
|
+
* be positively established, and absence of evidence counts against a
|
|
16
|
+
* claim, never for it.
|
|
17
|
+
*/
|
|
18
|
+
var WarrantRecord_Standing;
|
|
19
|
+
(function (WarrantRecord_Standing) {
|
|
20
|
+
WarrantRecord_Standing[WarrantRecord_Standing["STANDING_UNSPECIFIED"] = 0] = "STANDING_UNSPECIFIED";
|
|
21
|
+
WarrantRecord_Standing[WarrantRecord_Standing["STANDING_WITHDRAWN"] = 1] = "STANDING_WITHDRAWN";
|
|
22
|
+
WarrantRecord_Standing[WarrantRecord_Standing["STANDING_WEAKENED"] = 2] = "STANDING_WEAKENED";
|
|
23
|
+
WarrantRecord_Standing[WarrantRecord_Standing["STANDING_LICENSED"] = 3] = "STANDING_LICENSED";
|
|
24
|
+
WarrantRecord_Standing[WarrantRecord_Standing["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
25
|
+
})(WarrantRecord_Standing || (exports.WarrantRecord_Standing = WarrantRecord_Standing = {}));
|
|
26
|
+
function warrantRecord_StandingFromJSON(object) {
|
|
27
|
+
switch (object) {
|
|
28
|
+
case 0:
|
|
29
|
+
case "STANDING_UNSPECIFIED":
|
|
30
|
+
return WarrantRecord_Standing.STANDING_UNSPECIFIED;
|
|
31
|
+
case 1:
|
|
32
|
+
case "STANDING_WITHDRAWN":
|
|
33
|
+
return WarrantRecord_Standing.STANDING_WITHDRAWN;
|
|
34
|
+
case 2:
|
|
35
|
+
case "STANDING_WEAKENED":
|
|
36
|
+
return WarrantRecord_Standing.STANDING_WEAKENED;
|
|
37
|
+
case 3:
|
|
38
|
+
case "STANDING_LICENSED":
|
|
39
|
+
return WarrantRecord_Standing.STANDING_LICENSED;
|
|
40
|
+
case -1:
|
|
41
|
+
case "UNRECOGNIZED":
|
|
42
|
+
default:
|
|
43
|
+
return WarrantRecord_Standing.UNRECOGNIZED;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
exports.warrantRecord_StandingFromJSON = warrantRecord_StandingFromJSON;
|
|
47
|
+
function warrantRecord_StandingToJSON(object) {
|
|
48
|
+
switch (object) {
|
|
49
|
+
case WarrantRecord_Standing.STANDING_UNSPECIFIED:
|
|
50
|
+
return "STANDING_UNSPECIFIED";
|
|
51
|
+
case WarrantRecord_Standing.STANDING_WITHDRAWN:
|
|
52
|
+
return "STANDING_WITHDRAWN";
|
|
53
|
+
case WarrantRecord_Standing.STANDING_WEAKENED:
|
|
54
|
+
return "STANDING_WEAKENED";
|
|
55
|
+
case WarrantRecord_Standing.STANDING_LICENSED:
|
|
56
|
+
return "STANDING_LICENSED";
|
|
57
|
+
case WarrantRecord_Standing.UNRECOGNIZED:
|
|
58
|
+
default:
|
|
59
|
+
return "UNRECOGNIZED";
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
exports.warrantRecord_StandingToJSON = warrantRecord_StandingToJSON;
|
|
63
|
+
function createBaseWarrantRecord() {
|
|
64
|
+
return { $type: "keelson.WarrantRecord", timestamp: undefined, standingTransition: undefined, snapshot: undefined };
|
|
65
|
+
}
|
|
66
|
+
exports.WarrantRecord = {
|
|
67
|
+
$type: "keelson.WarrantRecord",
|
|
68
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
69
|
+
if (message.timestamp !== undefined) {
|
|
70
|
+
timestamp_1.Timestamp.encode(toTimestamp(message.timestamp), writer.uint32(10).fork()).join();
|
|
71
|
+
}
|
|
72
|
+
if (message.standingTransition !== undefined) {
|
|
73
|
+
exports.WarrantRecord_StandingTransition.encode(message.standingTransition, writer.uint32(18).fork()).join();
|
|
74
|
+
}
|
|
75
|
+
if (message.snapshot !== undefined) {
|
|
76
|
+
exports.WarrantRecord_Snapshot.encode(message.snapshot, writer.uint32(26).fork()).join();
|
|
77
|
+
}
|
|
78
|
+
return writer;
|
|
79
|
+
},
|
|
80
|
+
decode(input, length) {
|
|
81
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
82
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
83
|
+
const message = createBaseWarrantRecord();
|
|
84
|
+
while (reader.pos < end) {
|
|
85
|
+
const tag = reader.uint32();
|
|
86
|
+
switch (tag >>> 3) {
|
|
87
|
+
case 1: {
|
|
88
|
+
if (tag !== 10) {
|
|
89
|
+
break;
|
|
90
|
+
}
|
|
91
|
+
message.timestamp = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
|
|
92
|
+
continue;
|
|
93
|
+
}
|
|
94
|
+
case 2: {
|
|
95
|
+
if (tag !== 18) {
|
|
96
|
+
break;
|
|
97
|
+
}
|
|
98
|
+
message.standingTransition = exports.WarrantRecord_StandingTransition.decode(reader, reader.uint32());
|
|
99
|
+
continue;
|
|
100
|
+
}
|
|
101
|
+
case 3: {
|
|
102
|
+
if (tag !== 26) {
|
|
103
|
+
break;
|
|
104
|
+
}
|
|
105
|
+
message.snapshot = exports.WarrantRecord_Snapshot.decode(reader, reader.uint32());
|
|
106
|
+
continue;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
110
|
+
break;
|
|
111
|
+
}
|
|
112
|
+
reader.skip(tag & 7);
|
|
113
|
+
}
|
|
114
|
+
return message;
|
|
115
|
+
},
|
|
116
|
+
fromJSON(object) {
|
|
117
|
+
return {
|
|
118
|
+
$type: exports.WarrantRecord.$type,
|
|
119
|
+
timestamp: isSet(object.timestamp) ? fromJsonTimestamp(object.timestamp) : undefined,
|
|
120
|
+
standingTransition: isSet(object.standingTransition)
|
|
121
|
+
? exports.WarrantRecord_StandingTransition.fromJSON(object.standingTransition)
|
|
122
|
+
: undefined,
|
|
123
|
+
snapshot: isSet(object.snapshot) ? exports.WarrantRecord_Snapshot.fromJSON(object.snapshot) : undefined,
|
|
124
|
+
};
|
|
125
|
+
},
|
|
126
|
+
toJSON(message) {
|
|
127
|
+
const obj = {};
|
|
128
|
+
if (message.timestamp !== undefined) {
|
|
129
|
+
obj.timestamp = message.timestamp.toISOString();
|
|
130
|
+
}
|
|
131
|
+
if (message.standingTransition !== undefined) {
|
|
132
|
+
obj.standingTransition = exports.WarrantRecord_StandingTransition.toJSON(message.standingTransition);
|
|
133
|
+
}
|
|
134
|
+
if (message.snapshot !== undefined) {
|
|
135
|
+
obj.snapshot = exports.WarrantRecord_Snapshot.toJSON(message.snapshot);
|
|
136
|
+
}
|
|
137
|
+
return obj;
|
|
138
|
+
},
|
|
139
|
+
create(base) {
|
|
140
|
+
return exports.WarrantRecord.fromPartial(base ?? {});
|
|
141
|
+
},
|
|
142
|
+
fromPartial(object) {
|
|
143
|
+
const message = createBaseWarrantRecord();
|
|
144
|
+
message.timestamp = object.timestamp ?? undefined;
|
|
145
|
+
message.standingTransition = (object.standingTransition !== undefined && object.standingTransition !== null)
|
|
146
|
+
? exports.WarrantRecord_StandingTransition.fromPartial(object.standingTransition)
|
|
147
|
+
: undefined;
|
|
148
|
+
message.snapshot = (object.snapshot !== undefined && object.snapshot !== null)
|
|
149
|
+
? exports.WarrantRecord_Snapshot.fromPartial(object.snapshot)
|
|
150
|
+
: undefined;
|
|
151
|
+
return message;
|
|
152
|
+
},
|
|
153
|
+
};
|
|
154
|
+
typeRegistry_1.messageTypeRegistry.set(exports.WarrantRecord.$type, exports.WarrantRecord);
|
|
155
|
+
function createBaseWarrantRecord_RebuttalFired() {
|
|
156
|
+
return { $type: "keelson.WarrantRecord.RebuttalFired", id: "", description: "", evidence: "", evidenceLevel: "" };
|
|
157
|
+
}
|
|
158
|
+
exports.WarrantRecord_RebuttalFired = {
|
|
159
|
+
$type: "keelson.WarrantRecord.RebuttalFired",
|
|
160
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
161
|
+
if (message.id !== "") {
|
|
162
|
+
writer.uint32(10).string(message.id);
|
|
163
|
+
}
|
|
164
|
+
if (message.description !== "") {
|
|
165
|
+
writer.uint32(18).string(message.description);
|
|
166
|
+
}
|
|
167
|
+
if (message.evidence !== "") {
|
|
168
|
+
writer.uint32(26).string(message.evidence);
|
|
169
|
+
}
|
|
170
|
+
if (message.evidenceLevel !== "") {
|
|
171
|
+
writer.uint32(34).string(message.evidenceLevel);
|
|
172
|
+
}
|
|
173
|
+
return writer;
|
|
174
|
+
},
|
|
175
|
+
decode(input, length) {
|
|
176
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
177
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
178
|
+
const message = createBaseWarrantRecord_RebuttalFired();
|
|
179
|
+
while (reader.pos < end) {
|
|
180
|
+
const tag = reader.uint32();
|
|
181
|
+
switch (tag >>> 3) {
|
|
182
|
+
case 1: {
|
|
183
|
+
if (tag !== 10) {
|
|
184
|
+
break;
|
|
185
|
+
}
|
|
186
|
+
message.id = reader.string();
|
|
187
|
+
continue;
|
|
188
|
+
}
|
|
189
|
+
case 2: {
|
|
190
|
+
if (tag !== 18) {
|
|
191
|
+
break;
|
|
192
|
+
}
|
|
193
|
+
message.description = reader.string();
|
|
194
|
+
continue;
|
|
195
|
+
}
|
|
196
|
+
case 3: {
|
|
197
|
+
if (tag !== 26) {
|
|
198
|
+
break;
|
|
199
|
+
}
|
|
200
|
+
message.evidence = reader.string();
|
|
201
|
+
continue;
|
|
202
|
+
}
|
|
203
|
+
case 4: {
|
|
204
|
+
if (tag !== 34) {
|
|
205
|
+
break;
|
|
206
|
+
}
|
|
207
|
+
message.evidenceLevel = reader.string();
|
|
208
|
+
continue;
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
212
|
+
break;
|
|
213
|
+
}
|
|
214
|
+
reader.skip(tag & 7);
|
|
215
|
+
}
|
|
216
|
+
return message;
|
|
217
|
+
},
|
|
218
|
+
fromJSON(object) {
|
|
219
|
+
return {
|
|
220
|
+
$type: exports.WarrantRecord_RebuttalFired.$type,
|
|
221
|
+
id: isSet(object.id) ? globalThis.String(object.id) : "",
|
|
222
|
+
description: isSet(object.description) ? globalThis.String(object.description) : "",
|
|
223
|
+
evidence: isSet(object.evidence) ? globalThis.String(object.evidence) : "",
|
|
224
|
+
evidenceLevel: isSet(object.evidenceLevel) ? globalThis.String(object.evidenceLevel) : "",
|
|
225
|
+
};
|
|
226
|
+
},
|
|
227
|
+
toJSON(message) {
|
|
228
|
+
const obj = {};
|
|
229
|
+
if (message.id !== "") {
|
|
230
|
+
obj.id = message.id;
|
|
231
|
+
}
|
|
232
|
+
if (message.description !== "") {
|
|
233
|
+
obj.description = message.description;
|
|
234
|
+
}
|
|
235
|
+
if (message.evidence !== "") {
|
|
236
|
+
obj.evidence = message.evidence;
|
|
237
|
+
}
|
|
238
|
+
if (message.evidenceLevel !== "") {
|
|
239
|
+
obj.evidenceLevel = message.evidenceLevel;
|
|
240
|
+
}
|
|
241
|
+
return obj;
|
|
242
|
+
},
|
|
243
|
+
create(base) {
|
|
244
|
+
return exports.WarrantRecord_RebuttalFired.fromPartial(base ?? {});
|
|
245
|
+
},
|
|
246
|
+
fromPartial(object) {
|
|
247
|
+
const message = createBaseWarrantRecord_RebuttalFired();
|
|
248
|
+
message.id = object.id ?? "";
|
|
249
|
+
message.description = object.description ?? "";
|
|
250
|
+
message.evidence = object.evidence ?? "";
|
|
251
|
+
message.evidenceLevel = object.evidenceLevel ?? "";
|
|
252
|
+
return message;
|
|
253
|
+
},
|
|
254
|
+
};
|
|
255
|
+
typeRegistry_1.messageTypeRegistry.set(exports.WarrantRecord_RebuttalFired.$type, exports.WarrantRecord_RebuttalFired);
|
|
256
|
+
function createBaseWarrantRecord_GroundStanding() {
|
|
257
|
+
return { $type: "keelson.WarrantRecord.GroundStanding", claimId: "", standing: 0 };
|
|
258
|
+
}
|
|
259
|
+
exports.WarrantRecord_GroundStanding = {
|
|
260
|
+
$type: "keelson.WarrantRecord.GroundStanding",
|
|
261
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
262
|
+
if (message.claimId !== "") {
|
|
263
|
+
writer.uint32(10).string(message.claimId);
|
|
264
|
+
}
|
|
265
|
+
if (message.standing !== 0) {
|
|
266
|
+
writer.uint32(16).int32(message.standing);
|
|
267
|
+
}
|
|
268
|
+
return writer;
|
|
269
|
+
},
|
|
270
|
+
decode(input, length) {
|
|
271
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
272
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
273
|
+
const message = createBaseWarrantRecord_GroundStanding();
|
|
274
|
+
while (reader.pos < end) {
|
|
275
|
+
const tag = reader.uint32();
|
|
276
|
+
switch (tag >>> 3) {
|
|
277
|
+
case 1: {
|
|
278
|
+
if (tag !== 10) {
|
|
279
|
+
break;
|
|
280
|
+
}
|
|
281
|
+
message.claimId = reader.string();
|
|
282
|
+
continue;
|
|
283
|
+
}
|
|
284
|
+
case 2: {
|
|
285
|
+
if (tag !== 16) {
|
|
286
|
+
break;
|
|
287
|
+
}
|
|
288
|
+
message.standing = reader.int32();
|
|
289
|
+
continue;
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
293
|
+
break;
|
|
294
|
+
}
|
|
295
|
+
reader.skip(tag & 7);
|
|
296
|
+
}
|
|
297
|
+
return message;
|
|
298
|
+
},
|
|
299
|
+
fromJSON(object) {
|
|
300
|
+
return {
|
|
301
|
+
$type: exports.WarrantRecord_GroundStanding.$type,
|
|
302
|
+
claimId: isSet(object.claimId) ? globalThis.String(object.claimId) : "",
|
|
303
|
+
standing: isSet(object.standing) ? warrantRecord_StandingFromJSON(object.standing) : 0,
|
|
304
|
+
};
|
|
305
|
+
},
|
|
306
|
+
toJSON(message) {
|
|
307
|
+
const obj = {};
|
|
308
|
+
if (message.claimId !== "") {
|
|
309
|
+
obj.claimId = message.claimId;
|
|
310
|
+
}
|
|
311
|
+
if (message.standing !== 0) {
|
|
312
|
+
obj.standing = warrantRecord_StandingToJSON(message.standing);
|
|
313
|
+
}
|
|
314
|
+
return obj;
|
|
315
|
+
},
|
|
316
|
+
create(base) {
|
|
317
|
+
return exports.WarrantRecord_GroundStanding.fromPartial(base ?? {});
|
|
318
|
+
},
|
|
319
|
+
fromPartial(object) {
|
|
320
|
+
const message = createBaseWarrantRecord_GroundStanding();
|
|
321
|
+
message.claimId = object.claimId ?? "";
|
|
322
|
+
message.standing = object.standing ?? 0;
|
|
323
|
+
return message;
|
|
324
|
+
},
|
|
325
|
+
};
|
|
326
|
+
typeRegistry_1.messageTypeRegistry.set(exports.WarrantRecord_GroundStanding.$type, exports.WarrantRecord_GroundStanding);
|
|
327
|
+
function createBaseWarrantRecord_StandingTransition() {
|
|
328
|
+
return {
|
|
329
|
+
$type: "keelson.WarrantRecord.StandingTransition",
|
|
330
|
+
claimId: "",
|
|
331
|
+
fromStanding: 0,
|
|
332
|
+
toStanding: 0,
|
|
333
|
+
rebuttalsFired: [],
|
|
334
|
+
grounds: [],
|
|
335
|
+
};
|
|
336
|
+
}
|
|
337
|
+
exports.WarrantRecord_StandingTransition = {
|
|
338
|
+
$type: "keelson.WarrantRecord.StandingTransition",
|
|
339
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
340
|
+
if (message.claimId !== "") {
|
|
341
|
+
writer.uint32(10).string(message.claimId);
|
|
342
|
+
}
|
|
343
|
+
if (message.fromStanding !== 0) {
|
|
344
|
+
writer.uint32(16).int32(message.fromStanding);
|
|
345
|
+
}
|
|
346
|
+
if (message.toStanding !== 0) {
|
|
347
|
+
writer.uint32(24).int32(message.toStanding);
|
|
348
|
+
}
|
|
349
|
+
for (const v of message.rebuttalsFired) {
|
|
350
|
+
exports.WarrantRecord_RebuttalFired.encode(v, writer.uint32(34).fork()).join();
|
|
351
|
+
}
|
|
352
|
+
for (const v of message.grounds) {
|
|
353
|
+
exports.WarrantRecord_GroundStanding.encode(v, writer.uint32(42).fork()).join();
|
|
354
|
+
}
|
|
355
|
+
return writer;
|
|
356
|
+
},
|
|
357
|
+
decode(input, length) {
|
|
358
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
359
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
360
|
+
const message = createBaseWarrantRecord_StandingTransition();
|
|
361
|
+
while (reader.pos < end) {
|
|
362
|
+
const tag = reader.uint32();
|
|
363
|
+
switch (tag >>> 3) {
|
|
364
|
+
case 1: {
|
|
365
|
+
if (tag !== 10) {
|
|
366
|
+
break;
|
|
367
|
+
}
|
|
368
|
+
message.claimId = reader.string();
|
|
369
|
+
continue;
|
|
370
|
+
}
|
|
371
|
+
case 2: {
|
|
372
|
+
if (tag !== 16) {
|
|
373
|
+
break;
|
|
374
|
+
}
|
|
375
|
+
message.fromStanding = reader.int32();
|
|
376
|
+
continue;
|
|
377
|
+
}
|
|
378
|
+
case 3: {
|
|
379
|
+
if (tag !== 24) {
|
|
380
|
+
break;
|
|
381
|
+
}
|
|
382
|
+
message.toStanding = reader.int32();
|
|
383
|
+
continue;
|
|
384
|
+
}
|
|
385
|
+
case 4: {
|
|
386
|
+
if (tag !== 34) {
|
|
387
|
+
break;
|
|
388
|
+
}
|
|
389
|
+
message.rebuttalsFired.push(exports.WarrantRecord_RebuttalFired.decode(reader, reader.uint32()));
|
|
390
|
+
continue;
|
|
391
|
+
}
|
|
392
|
+
case 5: {
|
|
393
|
+
if (tag !== 42) {
|
|
394
|
+
break;
|
|
395
|
+
}
|
|
396
|
+
message.grounds.push(exports.WarrantRecord_GroundStanding.decode(reader, reader.uint32()));
|
|
397
|
+
continue;
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
401
|
+
break;
|
|
402
|
+
}
|
|
403
|
+
reader.skip(tag & 7);
|
|
404
|
+
}
|
|
405
|
+
return message;
|
|
406
|
+
},
|
|
407
|
+
fromJSON(object) {
|
|
408
|
+
return {
|
|
409
|
+
$type: exports.WarrantRecord_StandingTransition.$type,
|
|
410
|
+
claimId: isSet(object.claimId) ? globalThis.String(object.claimId) : "",
|
|
411
|
+
fromStanding: isSet(object.fromStanding) ? warrantRecord_StandingFromJSON(object.fromStanding) : 0,
|
|
412
|
+
toStanding: isSet(object.toStanding) ? warrantRecord_StandingFromJSON(object.toStanding) : 0,
|
|
413
|
+
rebuttalsFired: globalThis.Array.isArray(object?.rebuttalsFired)
|
|
414
|
+
? object.rebuttalsFired.map((e) => exports.WarrantRecord_RebuttalFired.fromJSON(e))
|
|
415
|
+
: [],
|
|
416
|
+
grounds: globalThis.Array.isArray(object?.grounds)
|
|
417
|
+
? object.grounds.map((e) => exports.WarrantRecord_GroundStanding.fromJSON(e))
|
|
418
|
+
: [],
|
|
419
|
+
};
|
|
420
|
+
},
|
|
421
|
+
toJSON(message) {
|
|
422
|
+
const obj = {};
|
|
423
|
+
if (message.claimId !== "") {
|
|
424
|
+
obj.claimId = message.claimId;
|
|
425
|
+
}
|
|
426
|
+
if (message.fromStanding !== 0) {
|
|
427
|
+
obj.fromStanding = warrantRecord_StandingToJSON(message.fromStanding);
|
|
428
|
+
}
|
|
429
|
+
if (message.toStanding !== 0) {
|
|
430
|
+
obj.toStanding = warrantRecord_StandingToJSON(message.toStanding);
|
|
431
|
+
}
|
|
432
|
+
if (message.rebuttalsFired?.length) {
|
|
433
|
+
obj.rebuttalsFired = message.rebuttalsFired.map((e) => exports.WarrantRecord_RebuttalFired.toJSON(e));
|
|
434
|
+
}
|
|
435
|
+
if (message.grounds?.length) {
|
|
436
|
+
obj.grounds = message.grounds.map((e) => exports.WarrantRecord_GroundStanding.toJSON(e));
|
|
437
|
+
}
|
|
438
|
+
return obj;
|
|
439
|
+
},
|
|
440
|
+
create(base) {
|
|
441
|
+
return exports.WarrantRecord_StandingTransition.fromPartial(base ?? {});
|
|
442
|
+
},
|
|
443
|
+
fromPartial(object) {
|
|
444
|
+
const message = createBaseWarrantRecord_StandingTransition();
|
|
445
|
+
message.claimId = object.claimId ?? "";
|
|
446
|
+
message.fromStanding = object.fromStanding ?? 0;
|
|
447
|
+
message.toStanding = object.toStanding ?? 0;
|
|
448
|
+
message.rebuttalsFired = object.rebuttalsFired?.map((e) => exports.WarrantRecord_RebuttalFired.fromPartial(e)) || [];
|
|
449
|
+
message.grounds = object.grounds?.map((e) => exports.WarrantRecord_GroundStanding.fromPartial(e)) || [];
|
|
450
|
+
return message;
|
|
451
|
+
},
|
|
452
|
+
};
|
|
453
|
+
typeRegistry_1.messageTypeRegistry.set(exports.WarrantRecord_StandingTransition.$type, exports.WarrantRecord_StandingTransition);
|
|
454
|
+
function createBaseWarrantRecord_ClaimState() {
|
|
455
|
+
return {
|
|
456
|
+
$type: "keelson.WarrantRecord.ClaimState",
|
|
457
|
+
claimId: "",
|
|
458
|
+
standing: 0,
|
|
459
|
+
since: undefined,
|
|
460
|
+
rebuttalsFired: [],
|
|
461
|
+
grounds: [],
|
|
462
|
+
statement: "",
|
|
463
|
+
warrant: "",
|
|
464
|
+
backing: "",
|
|
465
|
+
};
|
|
466
|
+
}
|
|
467
|
+
exports.WarrantRecord_ClaimState = {
|
|
468
|
+
$type: "keelson.WarrantRecord.ClaimState",
|
|
469
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
470
|
+
if (message.claimId !== "") {
|
|
471
|
+
writer.uint32(10).string(message.claimId);
|
|
472
|
+
}
|
|
473
|
+
if (message.standing !== 0) {
|
|
474
|
+
writer.uint32(16).int32(message.standing);
|
|
475
|
+
}
|
|
476
|
+
if (message.since !== undefined) {
|
|
477
|
+
timestamp_1.Timestamp.encode(toTimestamp(message.since), writer.uint32(26).fork()).join();
|
|
478
|
+
}
|
|
479
|
+
for (const v of message.rebuttalsFired) {
|
|
480
|
+
exports.WarrantRecord_RebuttalFired.encode(v, writer.uint32(34).fork()).join();
|
|
481
|
+
}
|
|
482
|
+
for (const v of message.grounds) {
|
|
483
|
+
exports.WarrantRecord_GroundStanding.encode(v, writer.uint32(42).fork()).join();
|
|
484
|
+
}
|
|
485
|
+
if (message.statement !== "") {
|
|
486
|
+
writer.uint32(50).string(message.statement);
|
|
487
|
+
}
|
|
488
|
+
if (message.warrant !== "") {
|
|
489
|
+
writer.uint32(58).string(message.warrant);
|
|
490
|
+
}
|
|
491
|
+
if (message.backing !== "") {
|
|
492
|
+
writer.uint32(66).string(message.backing);
|
|
493
|
+
}
|
|
494
|
+
return writer;
|
|
495
|
+
},
|
|
496
|
+
decode(input, length) {
|
|
497
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
498
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
499
|
+
const message = createBaseWarrantRecord_ClaimState();
|
|
500
|
+
while (reader.pos < end) {
|
|
501
|
+
const tag = reader.uint32();
|
|
502
|
+
switch (tag >>> 3) {
|
|
503
|
+
case 1: {
|
|
504
|
+
if (tag !== 10) {
|
|
505
|
+
break;
|
|
506
|
+
}
|
|
507
|
+
message.claimId = reader.string();
|
|
508
|
+
continue;
|
|
509
|
+
}
|
|
510
|
+
case 2: {
|
|
511
|
+
if (tag !== 16) {
|
|
512
|
+
break;
|
|
513
|
+
}
|
|
514
|
+
message.standing = reader.int32();
|
|
515
|
+
continue;
|
|
516
|
+
}
|
|
517
|
+
case 3: {
|
|
518
|
+
if (tag !== 26) {
|
|
519
|
+
break;
|
|
520
|
+
}
|
|
521
|
+
message.since = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
|
|
522
|
+
continue;
|
|
523
|
+
}
|
|
524
|
+
case 4: {
|
|
525
|
+
if (tag !== 34) {
|
|
526
|
+
break;
|
|
527
|
+
}
|
|
528
|
+
message.rebuttalsFired.push(exports.WarrantRecord_RebuttalFired.decode(reader, reader.uint32()));
|
|
529
|
+
continue;
|
|
530
|
+
}
|
|
531
|
+
case 5: {
|
|
532
|
+
if (tag !== 42) {
|
|
533
|
+
break;
|
|
534
|
+
}
|
|
535
|
+
message.grounds.push(exports.WarrantRecord_GroundStanding.decode(reader, reader.uint32()));
|
|
536
|
+
continue;
|
|
537
|
+
}
|
|
538
|
+
case 6: {
|
|
539
|
+
if (tag !== 50) {
|
|
540
|
+
break;
|
|
541
|
+
}
|
|
542
|
+
message.statement = reader.string();
|
|
543
|
+
continue;
|
|
544
|
+
}
|
|
545
|
+
case 7: {
|
|
546
|
+
if (tag !== 58) {
|
|
547
|
+
break;
|
|
548
|
+
}
|
|
549
|
+
message.warrant = reader.string();
|
|
550
|
+
continue;
|
|
551
|
+
}
|
|
552
|
+
case 8: {
|
|
553
|
+
if (tag !== 66) {
|
|
554
|
+
break;
|
|
555
|
+
}
|
|
556
|
+
message.backing = reader.string();
|
|
557
|
+
continue;
|
|
558
|
+
}
|
|
559
|
+
}
|
|
560
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
561
|
+
break;
|
|
562
|
+
}
|
|
563
|
+
reader.skip(tag & 7);
|
|
564
|
+
}
|
|
565
|
+
return message;
|
|
566
|
+
},
|
|
567
|
+
fromJSON(object) {
|
|
568
|
+
return {
|
|
569
|
+
$type: exports.WarrantRecord_ClaimState.$type,
|
|
570
|
+
claimId: isSet(object.claimId) ? globalThis.String(object.claimId) : "",
|
|
571
|
+
standing: isSet(object.standing) ? warrantRecord_StandingFromJSON(object.standing) : 0,
|
|
572
|
+
since: isSet(object.since) ? fromJsonTimestamp(object.since) : undefined,
|
|
573
|
+
rebuttalsFired: globalThis.Array.isArray(object?.rebuttalsFired)
|
|
574
|
+
? object.rebuttalsFired.map((e) => exports.WarrantRecord_RebuttalFired.fromJSON(e))
|
|
575
|
+
: [],
|
|
576
|
+
grounds: globalThis.Array.isArray(object?.grounds)
|
|
577
|
+
? object.grounds.map((e) => exports.WarrantRecord_GroundStanding.fromJSON(e))
|
|
578
|
+
: [],
|
|
579
|
+
statement: isSet(object.statement) ? globalThis.String(object.statement) : "",
|
|
580
|
+
warrant: isSet(object.warrant) ? globalThis.String(object.warrant) : "",
|
|
581
|
+
backing: isSet(object.backing) ? globalThis.String(object.backing) : "",
|
|
582
|
+
};
|
|
583
|
+
},
|
|
584
|
+
toJSON(message) {
|
|
585
|
+
const obj = {};
|
|
586
|
+
if (message.claimId !== "") {
|
|
587
|
+
obj.claimId = message.claimId;
|
|
588
|
+
}
|
|
589
|
+
if (message.standing !== 0) {
|
|
590
|
+
obj.standing = warrantRecord_StandingToJSON(message.standing);
|
|
591
|
+
}
|
|
592
|
+
if (message.since !== undefined) {
|
|
593
|
+
obj.since = message.since.toISOString();
|
|
594
|
+
}
|
|
595
|
+
if (message.rebuttalsFired?.length) {
|
|
596
|
+
obj.rebuttalsFired = message.rebuttalsFired.map((e) => exports.WarrantRecord_RebuttalFired.toJSON(e));
|
|
597
|
+
}
|
|
598
|
+
if (message.grounds?.length) {
|
|
599
|
+
obj.grounds = message.grounds.map((e) => exports.WarrantRecord_GroundStanding.toJSON(e));
|
|
600
|
+
}
|
|
601
|
+
if (message.statement !== "") {
|
|
602
|
+
obj.statement = message.statement;
|
|
603
|
+
}
|
|
604
|
+
if (message.warrant !== "") {
|
|
605
|
+
obj.warrant = message.warrant;
|
|
606
|
+
}
|
|
607
|
+
if (message.backing !== "") {
|
|
608
|
+
obj.backing = message.backing;
|
|
609
|
+
}
|
|
610
|
+
return obj;
|
|
611
|
+
},
|
|
612
|
+
create(base) {
|
|
613
|
+
return exports.WarrantRecord_ClaimState.fromPartial(base ?? {});
|
|
614
|
+
},
|
|
615
|
+
fromPartial(object) {
|
|
616
|
+
const message = createBaseWarrantRecord_ClaimState();
|
|
617
|
+
message.claimId = object.claimId ?? "";
|
|
618
|
+
message.standing = object.standing ?? 0;
|
|
619
|
+
message.since = object.since ?? undefined;
|
|
620
|
+
message.rebuttalsFired = object.rebuttalsFired?.map((e) => exports.WarrantRecord_RebuttalFired.fromPartial(e)) || [];
|
|
621
|
+
message.grounds = object.grounds?.map((e) => exports.WarrantRecord_GroundStanding.fromPartial(e)) || [];
|
|
622
|
+
message.statement = object.statement ?? "";
|
|
623
|
+
message.warrant = object.warrant ?? "";
|
|
624
|
+
message.backing = object.backing ?? "";
|
|
625
|
+
return message;
|
|
626
|
+
},
|
|
627
|
+
};
|
|
628
|
+
typeRegistry_1.messageTypeRegistry.set(exports.WarrantRecord_ClaimState.$type, exports.WarrantRecord_ClaimState);
|
|
629
|
+
function createBaseWarrantRecord_Snapshot() {
|
|
630
|
+
return { $type: "keelson.WarrantRecord.Snapshot", claims: [], policyConfigDigest: undefined, policyId: undefined };
|
|
631
|
+
}
|
|
632
|
+
exports.WarrantRecord_Snapshot = {
|
|
633
|
+
$type: "keelson.WarrantRecord.Snapshot",
|
|
634
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
635
|
+
for (const v of message.claims) {
|
|
636
|
+
exports.WarrantRecord_ClaimState.encode(v, writer.uint32(10).fork()).join();
|
|
637
|
+
}
|
|
638
|
+
if (message.policyConfigDigest !== undefined) {
|
|
639
|
+
writer.uint32(18).bytes(message.policyConfigDigest);
|
|
640
|
+
}
|
|
641
|
+
if (message.policyId !== undefined) {
|
|
642
|
+
writer.uint32(26).string(message.policyId);
|
|
643
|
+
}
|
|
644
|
+
return writer;
|
|
645
|
+
},
|
|
646
|
+
decode(input, length) {
|
|
647
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
648
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
649
|
+
const message = createBaseWarrantRecord_Snapshot();
|
|
650
|
+
while (reader.pos < end) {
|
|
651
|
+
const tag = reader.uint32();
|
|
652
|
+
switch (tag >>> 3) {
|
|
653
|
+
case 1: {
|
|
654
|
+
if (tag !== 10) {
|
|
655
|
+
break;
|
|
656
|
+
}
|
|
657
|
+
message.claims.push(exports.WarrantRecord_ClaimState.decode(reader, reader.uint32()));
|
|
658
|
+
continue;
|
|
659
|
+
}
|
|
660
|
+
case 2: {
|
|
661
|
+
if (tag !== 18) {
|
|
662
|
+
break;
|
|
663
|
+
}
|
|
664
|
+
message.policyConfigDigest = reader.bytes();
|
|
665
|
+
continue;
|
|
666
|
+
}
|
|
667
|
+
case 3: {
|
|
668
|
+
if (tag !== 26) {
|
|
669
|
+
break;
|
|
670
|
+
}
|
|
671
|
+
message.policyId = reader.string();
|
|
672
|
+
continue;
|
|
673
|
+
}
|
|
674
|
+
}
|
|
675
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
676
|
+
break;
|
|
677
|
+
}
|
|
678
|
+
reader.skip(tag & 7);
|
|
679
|
+
}
|
|
680
|
+
return message;
|
|
681
|
+
},
|
|
682
|
+
fromJSON(object) {
|
|
683
|
+
return {
|
|
684
|
+
$type: exports.WarrantRecord_Snapshot.$type,
|
|
685
|
+
claims: globalThis.Array.isArray(object?.claims)
|
|
686
|
+
? object.claims.map((e) => exports.WarrantRecord_ClaimState.fromJSON(e))
|
|
687
|
+
: [],
|
|
688
|
+
policyConfigDigest: isSet(object.policyConfigDigest) ? bytesFromBase64(object.policyConfigDigest) : undefined,
|
|
689
|
+
policyId: isSet(object.policyId) ? globalThis.String(object.policyId) : undefined,
|
|
690
|
+
};
|
|
691
|
+
},
|
|
692
|
+
toJSON(message) {
|
|
693
|
+
const obj = {};
|
|
694
|
+
if (message.claims?.length) {
|
|
695
|
+
obj.claims = message.claims.map((e) => exports.WarrantRecord_ClaimState.toJSON(e));
|
|
696
|
+
}
|
|
697
|
+
if (message.policyConfigDigest !== undefined) {
|
|
698
|
+
obj.policyConfigDigest = base64FromBytes(message.policyConfigDigest);
|
|
699
|
+
}
|
|
700
|
+
if (message.policyId !== undefined) {
|
|
701
|
+
obj.policyId = message.policyId;
|
|
702
|
+
}
|
|
703
|
+
return obj;
|
|
704
|
+
},
|
|
705
|
+
create(base) {
|
|
706
|
+
return exports.WarrantRecord_Snapshot.fromPartial(base ?? {});
|
|
707
|
+
},
|
|
708
|
+
fromPartial(object) {
|
|
709
|
+
const message = createBaseWarrantRecord_Snapshot();
|
|
710
|
+
message.claims = object.claims?.map((e) => exports.WarrantRecord_ClaimState.fromPartial(e)) || [];
|
|
711
|
+
message.policyConfigDigest = object.policyConfigDigest ?? undefined;
|
|
712
|
+
message.policyId = object.policyId ?? undefined;
|
|
713
|
+
return message;
|
|
714
|
+
},
|
|
715
|
+
};
|
|
716
|
+
typeRegistry_1.messageTypeRegistry.set(exports.WarrantRecord_Snapshot.$type, exports.WarrantRecord_Snapshot);
|
|
717
|
+
function bytesFromBase64(b64) {
|
|
718
|
+
if (globalThis.Buffer) {
|
|
719
|
+
return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));
|
|
720
|
+
}
|
|
721
|
+
else {
|
|
722
|
+
const bin = globalThis.atob(b64);
|
|
723
|
+
const arr = new Uint8Array(bin.length);
|
|
724
|
+
for (let i = 0; i < bin.length; ++i) {
|
|
725
|
+
arr[i] = bin.charCodeAt(i);
|
|
726
|
+
}
|
|
727
|
+
return arr;
|
|
728
|
+
}
|
|
729
|
+
}
|
|
730
|
+
function base64FromBytes(arr) {
|
|
731
|
+
if (globalThis.Buffer) {
|
|
732
|
+
return globalThis.Buffer.from(arr).toString("base64");
|
|
733
|
+
}
|
|
734
|
+
else {
|
|
735
|
+
const bin = [];
|
|
736
|
+
arr.forEach((byte) => {
|
|
737
|
+
bin.push(globalThis.String.fromCharCode(byte));
|
|
738
|
+
});
|
|
739
|
+
return globalThis.btoa(bin.join(""));
|
|
740
|
+
}
|
|
741
|
+
}
|
|
742
|
+
function toTimestamp(date) {
|
|
743
|
+
const seconds = Math.trunc(date.getTime() / 1000);
|
|
744
|
+
const nanos = (date.getTime() % 1000) * 1000000;
|
|
745
|
+
return { $type: "google.protobuf.Timestamp", seconds, nanos };
|
|
746
|
+
}
|
|
747
|
+
function fromTimestamp(t) {
|
|
748
|
+
let millis = (t.seconds || 0) * 1000;
|
|
749
|
+
millis += (t.nanos || 0) / 1000000;
|
|
750
|
+
return new globalThis.Date(millis);
|
|
751
|
+
}
|
|
752
|
+
function fromJsonTimestamp(o) {
|
|
753
|
+
if (o instanceof globalThis.Date) {
|
|
754
|
+
return o;
|
|
755
|
+
}
|
|
756
|
+
else if (typeof o === "string") {
|
|
757
|
+
return new globalThis.Date(o);
|
|
758
|
+
}
|
|
759
|
+
else {
|
|
760
|
+
return fromTimestamp(timestamp_1.Timestamp.fromJSON(o));
|
|
761
|
+
}
|
|
762
|
+
}
|
|
763
|
+
function isSet(value) {
|
|
764
|
+
return value !== null && value !== undefined;
|
|
765
|
+
}
|
|
@@ -48,4 +48,5 @@ __exportStar(require("./VehicleState"), exports);
|
|
|
48
48
|
__exportStar(require("./VesselNavStatus"), exports);
|
|
49
49
|
__exportStar(require("./VesselType"), exports);
|
|
50
50
|
__exportStar(require("./Voyage"), exports);
|
|
51
|
+
__exportStar(require("./WarrantRecord"), exports);
|
|
51
52
|
__exportStar(require("./Weather"), exports);
|
package/dist/qos.json
CHANGED
package/dist/subjects.json
CHANGED
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
"roc_status": "keelson.ROCStatus",
|
|
14
14
|
"operational_authority": "keelson.OperationalAuthority",
|
|
15
15
|
"entity_health": "keelson.EntityHealth",
|
|
16
|
+
"warrant_record": "keelson.WarrantRecord",
|
|
16
17
|
"test_object_status": "keelson.TestObjectStatus",
|
|
17
18
|
"vehicle_mode": "keelson.TimestampedString",
|
|
18
19
|
"vehicle_armed": "keelson.TimestampedBool",
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rise-maritime/keelson-js",
|
|
3
3
|
"//version": "NOT the published version. The release workflow overwrites it from the release tag (npm version --no-git-tag-version), so tag and artifact cannot disagree. Only matters for local installs; do not hand-bump before tagging — that manual step is what broke release 0.5.4.",
|
|
4
|
-
"version": "0.6.0-pre.
|
|
4
|
+
"version": "0.6.0-pre.4",
|
|
5
5
|
"description": "Keelson JavaScript SDK with Node-RED nodes",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"files": [
|