feat: add dataset consent and primary character model
This commit is contained in:
@@ -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' }]);
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user