exposure-keys 1.18.0 → 1.18.2

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.
Files changed (3) hide show
  1. package/package.json +11 -8
  2. package/proto/export.d.ts +152 -109
  3. package/proto/export.js +423 -194
package/package.json CHANGED
@@ -2,13 +2,13 @@
2
2
  "author": "Florian Imdahl <git@ffflorian.de>",
3
3
  "dependencies": {
4
4
  "jszip": "3.10.1",
5
- "protobufjs": "8.0.0"
5
+ "protobufjs": "8.3.0"
6
6
  },
7
7
  "description": "Temporary Exposure Keys (TEK) library",
8
8
  "devDependencies": {
9
- "protobufjs-cli": "2.0.0",
10
- "tsx": "4.21.0",
11
- "typescript": "6.0.2"
9
+ "protobufjs-cli": "2.3.0",
10
+ "tsx": "4.22.0",
11
+ "typescript": "6.0.3"
12
12
  },
13
13
  "engines": {
14
14
  "node": ">= 18"
@@ -34,16 +34,19 @@
34
34
  "license": "GPL-3.0",
35
35
  "name": "exposure-keys",
36
36
  "readme": "https://github.com/ffflorian/node-packages#readme",
37
- "repository": "https://github.com/ffflorian/node-packages.git",
37
+ "repository": {
38
+ "type": "git",
39
+ "url": "git+https://github.com/ffflorian/node-packages.git"
40
+ },
38
41
  "scripts": {
39
42
  "build": "yarn build:proto && yarn build:ts",
40
43
  "build:proto": "pbjs --t static-module -w commonjs -o proto/export.js proto/export.proto && pbts --out proto/export.d.ts --no-comments proto/export.js",
41
44
  "build:ts": "tsc -p tsconfig.build.json",
42
45
  "clean": "rm -rf dist",
43
46
  "dist": "yarn clean && yarn build",
44
- "start": "tsx src/cli.ts -d"
47
+ "start": "tsx src/cli.ts -d",
48
+ "test": "vitest run"
45
49
  },
46
50
  "type": "module",
47
- "version": "1.18.0",
48
- "gitHead": "146d587751b7319816e1a638bfa1b90197cad9bd"
51
+ "version": "1.18.2"
49
52
  }
package/proto/export.d.ts CHANGED
@@ -1,91 +1,116 @@
1
1
  import * as $protobuf from "protobufjs";
2
2
  import Long = require("long");
3
- export interface ITemporaryExposureKeyExport {
4
- startTimestamp?: (number|Long|null);
5
- endTimestamp?: (number|Long|null);
6
- region?: (string|null);
7
- batchNum?: (number|null);
8
- batchSize?: (number|null);
9
- signatureInfos?: (ISignatureInfo[]|null);
10
- keys?: (ITemporaryExposureKey[]|null);
11
- revisedKeys?: (ITemporaryExposureKey[]|null);
3
+
4
+ export interface ITemporaryExposureKeyExport extends TemporaryExposureKeyExport.$Properties {
5
+ }
6
+
7
+ export class TemporaryExposureKeyExport {
8
+ constructor(properties?: TemporaryExposureKeyExport.$Properties);
9
+ $unknowns?: Uint8Array[];
10
+ startTimestamp: (number|Long);
11
+ endTimestamp: (number|Long);
12
+ region: string;
13
+ batchNum: number;
14
+ batchSize: number;
15
+ signatureInfos: SignatureInfo.$Properties[];
16
+ keys: TemporaryExposureKey.$Properties[];
17
+ revisedKeys: TemporaryExposureKey.$Properties[];
18
+ static create(properties: TemporaryExposureKeyExport.$Shape): TemporaryExposureKeyExport & TemporaryExposureKeyExport.$Shape;
19
+ static create(properties?: TemporaryExposureKeyExport.$Properties): TemporaryExposureKeyExport;
20
+ static encode(message: TemporaryExposureKeyExport.$Properties, writer?: $protobuf.Writer): $protobuf.Writer;
21
+ static encodeDelimited(message: TemporaryExposureKeyExport.$Properties, writer?: $protobuf.Writer): $protobuf.Writer;
22
+ static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): TemporaryExposureKeyExport & TemporaryExposureKeyExport.$Shape;
23
+ static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): TemporaryExposureKeyExport & TemporaryExposureKeyExport.$Shape;
24
+ static verify(message: { [k: string]: any }): (string|null);
25
+ static fromObject(object: { [k: string]: any }): TemporaryExposureKeyExport;
26
+ static toObject(message: TemporaryExposureKeyExport, options?: $protobuf.IConversionOptions): { [k: string]: any };
27
+ toJSON(): { [k: string]: any };
28
+ static getTypeUrl(prefix?: string): string;
12
29
  }
13
30
 
14
- export class TemporaryExposureKeyExport implements ITemporaryExposureKeyExport {
15
- constructor(properties?: ITemporaryExposureKeyExport);
16
- public startTimestamp: (number|Long);
17
- public endTimestamp: (number|Long);
18
- public region: string;
19
- public batchNum: number;
20
- public batchSize: number;
21
- public signatureInfos: ISignatureInfo[];
22
- public keys: ITemporaryExposureKey[];
23
- public revisedKeys: ITemporaryExposureKey[];
24
- public static create(properties?: ITemporaryExposureKeyExport): TemporaryExposureKeyExport;
25
- public static encode(message: ITemporaryExposureKeyExport, writer?: $protobuf.Writer): $protobuf.Writer;
26
- public static encodeDelimited(message: ITemporaryExposureKeyExport, writer?: $protobuf.Writer): $protobuf.Writer;
27
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): TemporaryExposureKeyExport;
28
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): TemporaryExposureKeyExport;
29
- public static verify(message: { [k: string]: any }): (string|null);
30
- public static fromObject(object: { [k: string]: any }): TemporaryExposureKeyExport;
31
- public static toObject(message: TemporaryExposureKeyExport, options?: $protobuf.IConversionOptions): { [k: string]: any };
32
- public toJSON(): { [k: string]: any };
33
- public static getTypeUrl(typeUrlPrefix?: string): string;
31
+ export namespace TemporaryExposureKeyExport {
32
+ interface $Properties {
33
+ startTimestamp?: (number|Long|null);
34
+ endTimestamp?: (number|Long|null);
35
+ region?: (string|null);
36
+ batchNum?: (number|null);
37
+ batchSize?: (number|null);
38
+ signatureInfos?: (SignatureInfo.$Properties[]|null);
39
+ keys?: (TemporaryExposureKey.$Properties[]|null);
40
+ revisedKeys?: (TemporaryExposureKey.$Properties[]|null);
41
+ $unknowns?: Uint8Array[];
42
+ }
43
+ type $Shape = TemporaryExposureKeyExport.$Properties;
34
44
  }
35
45
 
36
- export interface ISignatureInfo {
37
- verificationKeyVersion?: (string|null);
38
- verificationKeyId?: (string|null);
39
- signatureAlgorithm?: (string|null);
46
+ export interface ISignatureInfo extends SignatureInfo.$Properties {
40
47
  }
41
48
 
42
- export class SignatureInfo implements ISignatureInfo {
43
- constructor(properties?: ISignatureInfo);
44
- public verificationKeyVersion: string;
45
- public verificationKeyId: string;
46
- public signatureAlgorithm: string;
47
- public static create(properties?: ISignatureInfo): SignatureInfo;
48
- public static encode(message: ISignatureInfo, writer?: $protobuf.Writer): $protobuf.Writer;
49
- public static encodeDelimited(message: ISignatureInfo, writer?: $protobuf.Writer): $protobuf.Writer;
50
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): SignatureInfo;
51
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): SignatureInfo;
52
- public static verify(message: { [k: string]: any }): (string|null);
53
- public static fromObject(object: { [k: string]: any }): SignatureInfo;
54
- public static toObject(message: SignatureInfo, options?: $protobuf.IConversionOptions): { [k: string]: any };
55
- public toJSON(): { [k: string]: any };
56
- public static getTypeUrl(typeUrlPrefix?: string): string;
49
+ export class SignatureInfo {
50
+ constructor(properties?: SignatureInfo.$Properties);
51
+ $unknowns?: Uint8Array[];
52
+ verificationKeyVersion: string;
53
+ verificationKeyId: string;
54
+ signatureAlgorithm: string;
55
+ static create(properties: SignatureInfo.$Shape): SignatureInfo & SignatureInfo.$Shape;
56
+ static create(properties?: SignatureInfo.$Properties): SignatureInfo;
57
+ static encode(message: SignatureInfo.$Properties, writer?: $protobuf.Writer): $protobuf.Writer;
58
+ static encodeDelimited(message: SignatureInfo.$Properties, writer?: $protobuf.Writer): $protobuf.Writer;
59
+ static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): SignatureInfo & SignatureInfo.$Shape;
60
+ static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): SignatureInfo & SignatureInfo.$Shape;
61
+ static verify(message: { [k: string]: any }): (string|null);
62
+ static fromObject(object: { [k: string]: any }): SignatureInfo;
63
+ static toObject(message: SignatureInfo, options?: $protobuf.IConversionOptions): { [k: string]: any };
64
+ toJSON(): { [k: string]: any };
65
+ static getTypeUrl(prefix?: string): string;
66
+ }
67
+
68
+ export namespace SignatureInfo {
69
+ interface $Properties {
70
+ verificationKeyVersion?: (string|null);
71
+ verificationKeyId?: (string|null);
72
+ signatureAlgorithm?: (string|null);
73
+ $unknowns?: Uint8Array[];
74
+ }
75
+ type $Shape = SignatureInfo.$Properties;
57
76
  }
58
77
 
59
- export interface ITemporaryExposureKey {
60
- keyData?: (Uint8Array|null);
61
- transmissionRiskLevel?: (number|null);
62
- rollingStartIntervalNumber?: (number|null);
63
- rollingPeriod?: (number|null);
64
- reportType?: (TemporaryExposureKey.ReportType|null);
65
- daysSinceOnsetOfSymptoms?: (number|null);
78
+ export interface ITemporaryExposureKey extends TemporaryExposureKey.$Properties {
66
79
  }
67
80
 
68
- export class TemporaryExposureKey implements ITemporaryExposureKey {
69
- constructor(properties?: ITemporaryExposureKey);
70
- public keyData: Uint8Array;
71
- public transmissionRiskLevel: number;
72
- public rollingStartIntervalNumber: number;
73
- public rollingPeriod: number;
74
- public reportType: TemporaryExposureKey.ReportType;
75
- public daysSinceOnsetOfSymptoms: number;
76
- public static create(properties?: ITemporaryExposureKey): TemporaryExposureKey;
77
- public static encode(message: ITemporaryExposureKey, writer?: $protobuf.Writer): $protobuf.Writer;
78
- public static encodeDelimited(message: ITemporaryExposureKey, writer?: $protobuf.Writer): $protobuf.Writer;
79
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): TemporaryExposureKey;
80
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): TemporaryExposureKey;
81
- public static verify(message: { [k: string]: any }): (string|null);
82
- public static fromObject(object: { [k: string]: any }): TemporaryExposureKey;
83
- public static toObject(message: TemporaryExposureKey, options?: $protobuf.IConversionOptions): { [k: string]: any };
84
- public toJSON(): { [k: string]: any };
85
- public static getTypeUrl(typeUrlPrefix?: string): string;
81
+ export class TemporaryExposureKey {
82
+ constructor(properties?: TemporaryExposureKey.$Properties);
83
+ $unknowns?: Uint8Array[];
84
+ keyData: Uint8Array;
85
+ transmissionRiskLevel: number;
86
+ rollingStartIntervalNumber: number;
87
+ rollingPeriod: number;
88
+ reportType: TemporaryExposureKey.ReportType;
89
+ daysSinceOnsetOfSymptoms: number;
90
+ static create(properties: TemporaryExposureKey.$Shape): TemporaryExposureKey & TemporaryExposureKey.$Shape;
91
+ static create(properties?: TemporaryExposureKey.$Properties): TemporaryExposureKey;
92
+ static encode(message: TemporaryExposureKey.$Properties, writer?: $protobuf.Writer): $protobuf.Writer;
93
+ static encodeDelimited(message: TemporaryExposureKey.$Properties, writer?: $protobuf.Writer): $protobuf.Writer;
94
+ static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): TemporaryExposureKey & TemporaryExposureKey.$Shape;
95
+ static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): TemporaryExposureKey & TemporaryExposureKey.$Shape;
96
+ static verify(message: { [k: string]: any }): (string|null);
97
+ static fromObject(object: { [k: string]: any }): TemporaryExposureKey;
98
+ static toObject(message: TemporaryExposureKey, options?: $protobuf.IConversionOptions): { [k: string]: any };
99
+ toJSON(): { [k: string]: any };
100
+ static getTypeUrl(prefix?: string): string;
86
101
  }
87
102
 
88
103
  export namespace TemporaryExposureKey {
104
+ interface $Properties {
105
+ keyData?: (Uint8Array|null);
106
+ transmissionRiskLevel?: (number|null);
107
+ rollingStartIntervalNumber?: (number|null);
108
+ rollingPeriod?: (number|null);
109
+ reportType?: (TemporaryExposureKey.ReportType|null);
110
+ daysSinceOnsetOfSymptoms?: (number|null);
111
+ $unknowns?: Uint8Array[];
112
+ }
113
+ type $Shape = TemporaryExposureKey.$Properties;
89
114
 
90
115
  enum ReportType {
91
116
  UNKNOWN = 0,
@@ -97,46 +122,64 @@ export namespace TemporaryExposureKey {
97
122
  }
98
123
  }
99
124
 
100
- export interface ITEKSignatureList {
101
- signatures?: (ITEKSignature[]|null);
125
+ export interface ITEKSignatureList extends TEKSignatureList.$Properties {
126
+ }
127
+
128
+ export class TEKSignatureList {
129
+ constructor(properties?: TEKSignatureList.$Properties);
130
+ $unknowns?: Uint8Array[];
131
+ signatures: TEKSignature.$Properties[];
132
+ static create(properties: TEKSignatureList.$Shape): TEKSignatureList & TEKSignatureList.$Shape;
133
+ static create(properties?: TEKSignatureList.$Properties): TEKSignatureList;
134
+ static encode(message: TEKSignatureList.$Properties, writer?: $protobuf.Writer): $protobuf.Writer;
135
+ static encodeDelimited(message: TEKSignatureList.$Properties, writer?: $protobuf.Writer): $protobuf.Writer;
136
+ static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): TEKSignatureList & TEKSignatureList.$Shape;
137
+ static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): TEKSignatureList & TEKSignatureList.$Shape;
138
+ static verify(message: { [k: string]: any }): (string|null);
139
+ static fromObject(object: { [k: string]: any }): TEKSignatureList;
140
+ static toObject(message: TEKSignatureList, options?: $protobuf.IConversionOptions): { [k: string]: any };
141
+ toJSON(): { [k: string]: any };
142
+ static getTypeUrl(prefix?: string): string;
102
143
  }
103
144
 
104
- export class TEKSignatureList implements ITEKSignatureList {
105
- constructor(properties?: ITEKSignatureList);
106
- public signatures: ITEKSignature[];
107
- public static create(properties?: ITEKSignatureList): TEKSignatureList;
108
- public static encode(message: ITEKSignatureList, writer?: $protobuf.Writer): $protobuf.Writer;
109
- public static encodeDelimited(message: ITEKSignatureList, writer?: $protobuf.Writer): $protobuf.Writer;
110
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): TEKSignatureList;
111
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): TEKSignatureList;
112
- public static verify(message: { [k: string]: any }): (string|null);
113
- public static fromObject(object: { [k: string]: any }): TEKSignatureList;
114
- public static toObject(message: TEKSignatureList, options?: $protobuf.IConversionOptions): { [k: string]: any };
115
- public toJSON(): { [k: string]: any };
116
- public static getTypeUrl(typeUrlPrefix?: string): string;
145
+ export namespace TEKSignatureList {
146
+ interface $Properties {
147
+ signatures?: (TEKSignature.$Properties[]|null);
148
+ $unknowns?: Uint8Array[];
149
+ }
150
+ type $Shape = TEKSignatureList.$Properties;
117
151
  }
118
152
 
119
- export interface ITEKSignature {
120
- signatureInfo?: (ISignatureInfo|null);
121
- batchNum?: (number|null);
122
- batchSize?: (number|null);
123
- signature?: (Uint8Array|null);
153
+ export interface ITEKSignature extends TEKSignature.$Properties {
124
154
  }
125
155
 
126
- export class TEKSignature implements ITEKSignature {
127
- constructor(properties?: ITEKSignature);
128
- public signatureInfo?: (ISignatureInfo|null);
129
- public batchNum: number;
130
- public batchSize: number;
131
- public signature: Uint8Array;
132
- public static create(properties?: ITEKSignature): TEKSignature;
133
- public static encode(message: ITEKSignature, writer?: $protobuf.Writer): $protobuf.Writer;
134
- public static encodeDelimited(message: ITEKSignature, writer?: $protobuf.Writer): $protobuf.Writer;
135
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): TEKSignature;
136
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): TEKSignature;
137
- public static verify(message: { [k: string]: any }): (string|null);
138
- public static fromObject(object: { [k: string]: any }): TEKSignature;
139
- public static toObject(message: TEKSignature, options?: $protobuf.IConversionOptions): { [k: string]: any };
140
- public toJSON(): { [k: string]: any };
141
- public static getTypeUrl(typeUrlPrefix?: string): string;
156
+ export class TEKSignature {
157
+ constructor(properties?: TEKSignature.$Properties);
158
+ $unknowns?: Uint8Array[];
159
+ signatureInfo?: (SignatureInfo.$Properties|null);
160
+ batchNum: number;
161
+ batchSize: number;
162
+ signature: Uint8Array;
163
+ static create(properties: TEKSignature.$Shape): TEKSignature & TEKSignature.$Shape;
164
+ static create(properties?: TEKSignature.$Properties): TEKSignature;
165
+ static encode(message: TEKSignature.$Properties, writer?: $protobuf.Writer): $protobuf.Writer;
166
+ static encodeDelimited(message: TEKSignature.$Properties, writer?: $protobuf.Writer): $protobuf.Writer;
167
+ static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): TEKSignature & TEKSignature.$Shape;
168
+ static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): TEKSignature & TEKSignature.$Shape;
169
+ static verify(message: { [k: string]: any }): (string|null);
170
+ static fromObject(object: { [k: string]: any }): TEKSignature;
171
+ static toObject(message: TEKSignature, options?: $protobuf.IConversionOptions): { [k: string]: any };
172
+ toJSON(): { [k: string]: any };
173
+ static getTypeUrl(prefix?: string): string;
174
+ }
175
+
176
+ export namespace TEKSignature {
177
+ interface $Properties {
178
+ signatureInfo?: (SignatureInfo.$Properties|null);
179
+ batchNum?: (number|null);
180
+ batchSize?: (number|null);
181
+ signature?: (Uint8Array|null);
182
+ $unknowns?: Uint8Array[];
183
+ }
184
+ type $Shape = TEKSignature.$Properties;
142
185
  }