feat: add dataset consent and primary character model

This commit is contained in:
jb
2026-09-19 12:12:10 -04:00
parent a3dc8637f0
commit 4d3c7a7521
23 changed files with 1068 additions and 138 deletions
+1 -1
View File
@@ -10,7 +10,7 @@ const url = process.env.CONVEX_SELF_HOSTED_URL!;
const store = new ConvexStore(url, process.env.CONVEX_BRIDGE_SECRET!);
const now = Date.now(); const hash = hashSecret(randomSecret());
const characterId = 90_000_000 + Math.floor(Math.random() * 1_000_000);
const user = await store.completeLogin({ characterId, name: 'Disposable Test Pilot', ownerHash: hashSecret(randomSecret()), scopes: ['esi-assets.read_assets.v1'], encryptedTokens: 'test-only-encrypted-placeholder', tokenExpiresAt: now + 60_000, sessionHash: hash, sessionExpiresAt: now + 60_000 });
const user = await store.completeLogin({ characterId, name: 'Disposable Test Pilot', ownerHash: hashSecret(randomSecret()), scopes: ['esi-assets.read_assets.v1'], intent: 'initial_login', capability: 'asset_search', requestedScopes: ['esi-assets.read_assets.v1'], approvedExistingScopes: [], encryptedTokens: 'test-only-encrypted-placeholder', tokenExpiresAt: now + 60_000, sessionHash: hash, sessionExpiresAt: now + 60_000 });
assert.equal((await store.session(hash))?.userId, user.userId);
const generation = await store.beginSync(user.userId, characterId);
await store.stageAssets(user.userId, characterId, generation, 0, [{ itemId: '9223372036854775806', characterId, typeId: 34, quantity: 50, locationId: '60003760', locationType: 'station', locationFlag: 'Hangar' }]);
+4
View File
@@ -34,6 +34,10 @@ if (phase === 'write') {
name: `Restore marker ${marker}`,
ownerHash,
scopes: ['esi-assets.read_assets.v1'],
intent: 'initial_login',
capability: 'asset_search',
requestedScopes: ['esi-assets.read_assets.v1'],
approvedExistingScopes: [],
encryptedTokens: `restore-marker-placeholder:${marker}`,
tokenExpiresAt: sessionExpiresAt,
sessionHash,