+3
-3
index.ts
+3
-3
index.ts
···
3
3
import * as dotenv from "dotenv";
4
4
import { existsSync, readFileSync, writeFileSync } from "fs";
5
5
import * as smartcar from "smartcar";
6
-
import type { Record } from "./lexiconTypes/types/net/mmatt/personal/vitals/car";
6
+
import type { Record } from "./lexiconTypes/types/net/mmatt/vitals/car";
7
7
8
8
// Load environment variables
9
9
dotenv.config();
···
185
185
// Create car data record if we have both fuel and odometer data
186
186
if (fuelLevel && odometer) {
187
187
const data: Record = {
188
-
$type: "net.mmatt.personal.vitals.car",
188
+
$type: "net.mmatt.vitals.car",
189
189
createdAt: new Date().toISOString(),
190
190
carFuelRange: fuelLevel.range || 0,
191
191
carPercentFuelRemaining: (fuelLevel.percentRemaining || 0) * 100,
···
194
194
};
195
195
196
196
await agent.com.atproto.repo.createRecord({
197
-
collection: "net.mmatt.personal.vitals.car",
197
+
collection: "net.mmatt.vitals.car",
198
198
record: data,
199
199
repo: process.env.BSKY_DID!,
200
200
});
+3
-13
lexiconTypes/index.ts
+3
-13
lexiconTypes/index.ts
···
37
37
38
38
export class NetMmattNS {
39
39
_server: Server
40
-
personal: NetMmattPersonalNS
41
-
42
-
constructor(server: Server) {
43
-
this._server = server
44
-
this.personal = new NetMmattPersonalNS(server)
45
-
}
46
-
}
47
-
48
-
export class NetMmattPersonalNS {
49
-
_server: Server
50
-
vitals: NetMmattPersonalVitalsNS
40
+
vitals: NetMmattVitalsNS
51
41
52
42
constructor(server: Server) {
53
43
this._server = server
54
-
this.vitals = new NetMmattPersonalVitalsNS(server)
44
+
this.vitals = new NetMmattVitalsNS(server)
55
45
}
56
46
}
57
47
58
-
export class NetMmattPersonalVitalsNS {
48
+
export class NetMmattVitalsNS {
59
49
_server: Server
60
50
61
51
constructor(server: Server) {
+3
-3
lexiconTypes/lexicons.ts
+3
-3
lexiconTypes/lexicons.ts
···
10
10
import { type $Typed, is$typed, maybe$typed } from './util.js'
11
11
12
12
export const schemaDict = {
13
-
NetMmattPersonalVitalsCar: {
13
+
NetMmattVitalsCar: {
14
14
lexicon: 1,
15
-
id: 'net.mmatt.personal.vitals.car',
15
+
id: 'net.mmatt.vitals.car',
16
16
defs: {
17
17
main: {
18
18
type: 'record',
···
86
86
}
87
87
88
88
export const ids = {
89
-
NetMmattPersonalVitalsCar: 'net.mmatt.personal.vitals.car',
89
+
NetMmattVitalsCar: 'net.mmatt.vitals.car',
90
90
} as const
+4
-4
lexiconTypes/types/net/mmatt/personal/vitals/car.ts
lexiconTypes/types/net/mmatt/vitals/car.ts
+4
-4
lexiconTypes/types/net/mmatt/personal/vitals/car.ts
lexiconTypes/types/net/mmatt/vitals/car.ts
···
3
3
*/
4
4
import { type ValidationResult, BlobRef } from '@atproto/lexicon'
5
5
import { CID } from 'multiformats/cid'
6
-
import { validate as _validate } from '../../../../../lexicons'
6
+
import { validate as _validate } from '../../../../lexicons'
7
7
import {
8
8
type $Typed,
9
9
is$typed as _is$typed,
10
10
type OmitKey,
11
-
} from '../../../../../util'
11
+
} from '../../../../util'
12
12
13
13
const is$typed = _is$typed,
14
14
validate = _validate
15
-
const id = 'net.mmatt.personal.vitals.car'
15
+
const id = 'net.mmatt.vitals.car'
16
16
17
17
export interface Record {
18
-
$type: 'net.mmatt.personal.vitals.car'
18
+
$type: 'net.mmatt.vitals.car'
19
19
/** The unix timestamp of when the vital was recorded */
20
20
createdAt: string
21
21
/** The car fuel range value in miles */
+1
-1
lexicons/net/mmatt/personal/vitals/car.json
lexicons/net/mmatt/vitals/car.json
+1
-1
lexicons/net/mmatt/personal/vitals/car.json
lexicons/net/mmatt/vitals/car.json