Align shared reference and opaque cursor contracts
This commit is contained in:
@@ -5,9 +5,12 @@ import type {
|
||||
EntityResolution,
|
||||
InventoryCursor,
|
||||
InventoryCursorState,
|
||||
InventoryCursorLookup,
|
||||
InventoryQuery,
|
||||
InventoryRow,
|
||||
InventoryQueryResult,
|
||||
LocationFact,
|
||||
ReferenceStationRecord,
|
||||
ResourceAuthorization,
|
||||
SignedMoneyNormalizationPolicy,
|
||||
WalletBalanceResult,
|
||||
@@ -62,6 +65,17 @@ export const singletonRows: readonly Pick<InventoryRow, 'isSingleton'>[] = [
|
||||
{ isSingleton: null },
|
||||
];
|
||||
|
||||
export const verifiedNamelessStation: ReferenceStationRecord = {
|
||||
id: 60000001, systemId: 30000142, systemName: 'Jita', regionId: 10000002,
|
||||
name: null, typeId: 1531, ownerId: 1000125, evidence: 'verified', sourceVerified: true, x: null, y: null, z: null,
|
||||
};
|
||||
export const systemListedStationPlaceholder: ReferenceStationRecord = {
|
||||
...verifiedNamelessStation, id: 60000002, evidence: 'system_listed', sourceVerified: false,
|
||||
};
|
||||
export const absentLocation: LocationFact = {
|
||||
kind: 'unknown', id: '60000003', name: null, parentId: null, sourceVerified: null, referenceVersion: 'reference-g1',
|
||||
};
|
||||
|
||||
export const ambiguousType: EntityResolution<{ id: number; name: string }> = {
|
||||
status: 'ambiguous',
|
||||
candidates: [{ id: 34, name: 'Tritanium' }, { id: 35, name: 'Pyerite' }],
|
||||
@@ -133,6 +147,26 @@ export const inventoryCursorState: InventoryCursorState = {
|
||||
},
|
||||
};
|
||||
|
||||
export const inventoryCursorLookup: InventoryCursorLookup = {
|
||||
token: inventoryCursor.token,
|
||||
callerUserId: 'fixture-user-a',
|
||||
queryFingerprint: 'sha256:fixture-query',
|
||||
selectedResources: [syntheticResource],
|
||||
authorizationRevisions: { 'character:90000000000000001': 7 },
|
||||
authorizationEpochs: { 'character:90000000000000001': 1 },
|
||||
snapshotGenerations: { assets: 'assets-g7' },
|
||||
referenceVersion: 'reference-g1',
|
||||
priceVersion: 'prices-g1',
|
||||
now: 1_700_000_200_000,
|
||||
};
|
||||
|
||||
export const borrowedInventoryCursorLookup: InventoryCursorLookup = { ...inventoryCursorLookup, callerUserId: 'fixture-user-b' };
|
||||
export const changedQueryInventoryCursorLookup: InventoryCursorLookup = { ...inventoryCursorLookup, queryFingerprint: 'sha256:changed-query' };
|
||||
export const changedRevisionInventoryCursorLookup: InventoryCursorLookup = {
|
||||
...inventoryCursorLookup,
|
||||
authorizationRevisions: { 'character:90000000000000001': 8 },
|
||||
};
|
||||
|
||||
export const inventoryQuery: InventoryQuery = {
|
||||
callerUserId: 'fixture-user-a',
|
||||
selectedResources: [syntheticResource],
|
||||
|
||||
Reference in New Issue
Block a user