Add links from typescript-frontend-integration.md to GeoApiClient.ts with line anchors for each constructor and method. Made-with: Cursor
This commit is contained in:
@@ -37,31 +37,33 @@ Integration tests in `test/integration.test.ts` cover the recommended flow: regi
|
||||
|
||||
### Class: `GeoApiClient`
|
||||
|
||||
Source: [GeoApiClient.ts](https://git.produktor.io/momswap/backend/src/branch/main/libs/geo-api-client/src/GeoApiClient.ts)
|
||||
|
||||
Constructor:
|
||||
|
||||
- `new GeoApiClient(baseUrl, storage, storageKey?)`
|
||||
- [`new GeoApiClient(baseUrl, storage, storageKey?)`](https://git.produktor.io/momswap/backend/src/branch/main/libs/geo-api-client/src/GeoApiClient.ts#L14)
|
||||
|
||||
Key methods:
|
||||
|
||||
- `ensureKeysInStorage()`
|
||||
- `getStoredKeys()`
|
||||
- `derivePublicKey(privateKey)` — restore public key from private key (Ed25519)
|
||||
- `importKeys(keys)`
|
||||
- `exportKeys()`
|
||||
- `setAccessToken(token)`
|
||||
- `getServicePublicKey()`
|
||||
- `createChallenge(publicKey)`
|
||||
- `loginWithSignature(publicKey, privateKey)`
|
||||
- `registerBySigningServiceKey(publicKey, privateKey)` — register by signing the API service public key (no invitation required)
|
||||
- `createInvitation(payload, inviterPrivateKey)`
|
||||
- `registerWithInvitation(...)`
|
||||
- `listCollections()`
|
||||
- `createCollection(name)`
|
||||
- `updateCollection(collectionId, name)`
|
||||
- `deleteCollection(collectionId)`
|
||||
- `listFeatures(collectionId)`
|
||||
- `createPointFeature(collectionId, lon, lat, properties)`
|
||||
- `deleteFeature(featureId)`
|
||||
- [`ensureKeysInStorage()`](https://git.produktor.io/momswap/backend/src/branch/main/libs/geo-api-client/src/GeoApiClient.ts#L20)
|
||||
- [`getStoredKeys()`](https://git.produktor.io/momswap/backend/src/branch/main/libs/geo-api-client/src/GeoApiClient.ts#L29)
|
||||
- [`derivePublicKey(privateKey)`](https://git.produktor.io/momswap/backend/src/branch/main/libs/geo-api-client/src/GeoApiClient.ts#L33) — restore public key from private key (Ed25519)
|
||||
- [`importKeys(keys)`](https://git.produktor.io/momswap/backend/src/branch/main/libs/geo-api-client/src/GeoApiClient.ts#L37)
|
||||
- [`exportKeys()`](https://git.produktor.io/momswap/backend/src/branch/main/libs/geo-api-client/src/GeoApiClient.ts#L41)
|
||||
- [`setAccessToken(token)`](https://git.produktor.io/momswap/backend/src/branch/main/libs/geo-api-client/src/GeoApiClient.ts#L45)
|
||||
- [`getServicePublicKey()`](https://git.produktor.io/momswap/backend/src/branch/main/libs/geo-api-client/src/GeoApiClient.ts#L69)
|
||||
- [`createChallenge(publicKey)`](https://git.produktor.io/momswap/backend/src/branch/main/libs/geo-api-client/src/GeoApiClient.ts#L73)
|
||||
- [`loginWithSignature(publicKey, privateKey)`](https://git.produktor.io/momswap/backend/src/branch/main/libs/geo-api-client/src/GeoApiClient.ts#L86)
|
||||
- [`registerBySigningServiceKey(publicKey, privateKey)`](https://git.produktor.io/momswap/backend/src/branch/main/libs/geo-api-client/src/GeoApiClient.ts#L76) — register by signing the API service public key (no invitation required)
|
||||
- [`createInvitation(payload, inviterPrivateKey)`](https://git.produktor.io/momswap/backend/src/branch/main/libs/geo-api-client/src/GeoApiClient.ts#L101)
|
||||
- [`registerWithInvitation(...)`](https://git.produktor.io/momswap/backend/src/branch/main/libs/geo-api-client/src/GeoApiClient.ts#L114)
|
||||
- [`listCollections()`](https://git.produktor.io/momswap/backend/src/branch/main/libs/geo-api-client/src/GeoApiClient.ts#L133)
|
||||
- [`createCollection(name)`](https://git.produktor.io/momswap/backend/src/branch/main/libs/geo-api-client/src/GeoApiClient.ts#L137)
|
||||
- [`updateCollection(collectionId, name)`](https://git.produktor.io/momswap/backend/src/branch/main/libs/geo-api-client/src/GeoApiClient.ts#L140)
|
||||
- [`deleteCollection(collectionId)`](https://git.produktor.io/momswap/backend/src/branch/main/libs/geo-api-client/src/GeoApiClient.ts#L148)
|
||||
- [`listFeatures(collectionId)`](https://git.produktor.io/momswap/backend/src/branch/main/libs/geo-api-client/src/GeoApiClient.ts#L153)
|
||||
- [`createPointFeature(collectionId, lon, lat, properties)`](https://git.produktor.io/momswap/backend/src/branch/main/libs/geo-api-client/src/GeoApiClient.ts#L156)
|
||||
- [`deleteFeature(featureId)`](https://git.produktor.io/momswap/backend/src/branch/main/libs/geo-api-client/src/GeoApiClient.ts#L172)
|
||||
|
||||
## Recommended integration flow
|
||||
|
||||
|
||||
Reference in New Issue
Block a user