Skip to content

Commit

Permalink
Update pgtyped
Browse files Browse the repository at this point in the history
  • Loading branch information
SebastienGllmt committed Dec 29, 2023
1 parent 6f425eb commit aca8c0c
Show file tree
Hide file tree
Showing 66 changed files with 438 additions and 281 deletions.
2 changes: 0 additions & 2 deletions deployment/config/indexer/docker.mainnet.env
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ PGPASSFILE="$(realpath secrets/.pgpass)"
# as this command will gracefully fallback to PGPASSFILE if no password is specified
# However, some dev tools like pgtyped & zapatos don't support .pgpass files
DATABASE_URL=postgresql://${PGUSER}:${PGPASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DB}
# Needed for PgTyped
PGURI=$DATABASE_URL

CARDANO_NODE_VERSION=8.1.2
CARDANO_NODE_EXPOSED_PORT=3001
Expand Down
2 changes: 0 additions & 2 deletions deployment/config/indexer/docker.preprod.env
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ PGPASSFILE="$(realpath secrets/.pgpass)"
# as this command will gracefully fallback to PGPASSFILE if no password is specified
# However, some dev tools like pgtyped & zapatos don't support .pgpass files
DATABASE_URL=postgresql://${PGUSER}:${PGPASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DB}
# Needed for PgTyped
PGURI=$DATABASE_URL

CARDANO_NODE_VERSION=8.1.2
CARDANO_NODE_EXPOSED_PORT=3001
Expand Down
2 changes: 0 additions & 2 deletions deployment/config/indexer/docker.preview.env
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ PGPASSFILE="$(realpath secrets/.pgpass)"
# as this command will gracefully fallback to PGPASSFILE if no password is specified
# However, some dev tools like pgtyped & zapatos don't support .pgpass files
DATABASE_URL=postgresql://${PGUSER}:${PGPASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DB}
# Needed for PgTyped
PGURI=$DATABASE_URL

CARDANO_NODE_VERSION=8.1.2
CARDANO_NODE_EXPOSED_PORT=3001
Expand Down
12 changes: 2 additions & 10 deletions docs/bin/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -443,8 +443,7 @@
"format": "double"
},
"txId": {
"type": "string",
"nullable": true
"type": "string"
},
"pool": {
"allOf": [
Expand Down Expand Up @@ -874,18 +873,12 @@
},
"plutusDatum": {
"type": "string",
"nullable": true,
"description": "Projected NFT datum: serialized state of the Projected NFT",
"example": "d8799fd8799f581c9040f057461d9adc09108fe5cb630077cf75c6e981d3ed91f6fb18f6ffd87980ff",
"pattern": "[0-9a-fA-F]+"
},
"status": {
"allOf": [
{
"$ref": "#/components/schemas/ProjectedNftStatus"
}
],
"nullable": true,
"$ref": "#/components/schemas/ProjectedNftStatus",
"description": "Projected NFT status: Lock / Unlocking / Claim / Invalid",
"example": "Lock"
},
Expand Down Expand Up @@ -929,7 +922,6 @@
},
"actionTxId": {
"type": "string",
"nullable": true,
"description": "Transaction id of related Projected NFT event",
"example": "28eb069e3e8c13831d431e3b2e35f58525493ab2d77fde83184993e4aa7a0eda",
"pattern": "[0-9a-fA-F]{64}"
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/indexer/Tasks/ByronAddressTask.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ pub struct EmptyConfig {}


## Full source
[source](https://github.com/dcSpark/carp/tree/main/indexer/tasks/src/byron/byron_address.rs)
[source](https://github.com/dcSpark/carp/tree/main/indexer/indexer/tasks/src/byron/byron_address.rs)
2 changes: 1 addition & 1 deletion docs/docs/indexer/Tasks/ByronBlockTask.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ pub struct PayloadAndReadonlyConfig {


## Full source
[source](https://github.com/dcSpark/carp/tree/main/indexer/tasks/src/byron/byron_block.rs)
[source](https://github.com/dcSpark/carp/tree/main/indexer/indexer/tasks/src/byron/byron_block.rs)
2 changes: 1 addition & 1 deletion docs/docs/indexer/Tasks/ByronInputTask.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ pub struct EmptyConfig {}


## Full source
[source](https://github.com/dcSpark/carp/tree/main/indexer/tasks/src/byron/byron_inputs.rs)
[source](https://github.com/dcSpark/carp/tree/main/indexer/indexer/tasks/src/byron/byron_inputs.rs)
2 changes: 1 addition & 1 deletion docs/docs/indexer/Tasks/ByronOutputTask.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ pub struct EmptyConfig {}


## Full source
[source](https://github.com/dcSpark/carp/tree/main/indexer/tasks/src/byron/byron_outputs.rs)
[source](https://github.com/dcSpark/carp/tree/main/indexer/indexer/tasks/src/byron/byron_outputs.rs)
2 changes: 1 addition & 1 deletion docs/docs/indexer/Tasks/ByronTransactionTask.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ pub struct PayloadAndReadonlyConfig {


## Full source
[source](https://github.com/dcSpark/carp/tree/main/indexer/tasks/src/byron/byron_txs.rs)
[source](https://github.com/dcSpark/carp/tree/main/indexer/indexer/tasks/src/byron/byron_txs.rs)
2 changes: 1 addition & 1 deletion docs/docs/indexer/Tasks/ExampleTask.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ pub struct EmptyConfig {}


## Full source
[source](https://github.com/dcSpark/carp/tree/main/indexer/tasks/src/dsl/example_task.rs)
[source](https://github.com/dcSpark/carp/tree/main/indexer/indexer/tasks/src/dsl/example_task.rs)
2 changes: 1 addition & 1 deletion docs/docs/indexer/Tasks/GenesisBlockTask.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ pub struct PayloadConfig {


## Full source
[source](https://github.com/dcSpark/carp/tree/main/indexer/tasks/src/genesis/genesis_block.rs)
[source](https://github.com/dcSpark/carp/tree/main/indexer/indexer/tasks/src/genesis/genesis_block.rs)
2 changes: 1 addition & 1 deletion docs/docs/indexer/Tasks/GenesisTransactionTask.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ pub struct PayloadConfig {


## Full source
[source](https://github.com/dcSpark/carp/tree/main/indexer/tasks/src/genesis/genesis_txs.rs)
[source](https://github.com/dcSpark/carp/tree/main/indexer/indexer/tasks/src/genesis/genesis_txs.rs)
2 changes: 1 addition & 1 deletion docs/docs/indexer/Tasks/MultiEraProjectedNftTask.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ pub struct AddressConfig {


## Full source
[source](https://github.com/dcSpark/carp/tree/main/indexer/tasks/src/multiera/multiera_projected_nft.rs)
[source](https://github.com/dcSpark/carp/tree/main/indexer/indexer/tasks/src/multiera/multiera_projected_nft.rs)
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ pub struct ReadonlyConfig {


## Full source
[source](https://github.com/dcSpark/carp/tree/main/indexer/tasks/src/multiera/multiera_address_credential_relations.rs)
[source](https://github.com/dcSpark/carp/tree/main/indexer/indexer/tasks/src/multiera/multiera_address_credential_relations.rs)
2 changes: 1 addition & 1 deletion docs/docs/indexer/Tasks/MultieraAddressDelegationTask.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ pub struct EmptyConfig {}


## Full source
[source](https://github.com/dcSpark/carp/tree/main/indexer/tasks/src/multiera/multiera_address_delegation.rs)
[source](https://github.com/dcSpark/carp/tree/main/indexer/indexer/tasks/src/multiera/multiera_address_delegation.rs)
2 changes: 1 addition & 1 deletion docs/docs/indexer/Tasks/MultieraAddressTask.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ pub struct EmptyConfig {}


## Full source
[source](https://github.com/dcSpark/carp/tree/main/indexer/tasks/src/multiera/multiera_address.rs)
[source](https://github.com/dcSpark/carp/tree/main/indexer/indexer/tasks/src/multiera/multiera_address.rs)
2 changes: 1 addition & 1 deletion docs/docs/indexer/Tasks/MultieraAssetMintTask.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ pub struct ReadonlyConfig {


## Full source
[source](https://github.com/dcSpark/carp/tree/main/indexer/tasks/src/multiera/multiera_asset_mint.rs)
[source](https://github.com/dcSpark/carp/tree/main/indexer/indexer/tasks/src/multiera/multiera_asset_mint.rs)
2 changes: 1 addition & 1 deletion docs/docs/indexer/Tasks/MultieraBlockTask.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ pub struct PayloadAndReadonlyConfig {


## Full source
[source](https://github.com/dcSpark/carp/tree/main/indexer/tasks/src/multiera/multiera_block.rs)
[source](https://github.com/dcSpark/carp/tree/main/indexer/indexer/tasks/src/multiera/multiera_block.rs)
2 changes: 1 addition & 1 deletion docs/docs/indexer/Tasks/MultieraCip25EntryTask.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ pub struct EmptyConfig {}


## Full source
[source](https://github.com/dcSpark/carp/tree/main/indexer/tasks/src/multiera/multiera_cip25entry.rs)
[source](https://github.com/dcSpark/carp/tree/main/indexer/indexer/tasks/src/multiera/multiera_cip25entry.rs)
2 changes: 1 addition & 1 deletion docs/docs/indexer/Tasks/MultieraDatumTask.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ pub struct ReadonlyConfig {


## Full source
[source](https://github.com/dcSpark/carp/tree/main/indexer/tasks/src/multiera/multiera_datum.rs)
[source](https://github.com/dcSpark/carp/tree/main/indexer/indexer/tasks/src/multiera/multiera_datum.rs)
2 changes: 1 addition & 1 deletion docs/docs/indexer/Tasks/MultieraMetadataTask.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ pub struct ReadonlyConfig {


## Full source
[source](https://github.com/dcSpark/carp/tree/main/indexer/tasks/src/multiera/multiera_metadata.rs)
[source](https://github.com/dcSpark/carp/tree/main/indexer/indexer/tasks/src/multiera/multiera_metadata.rs)
2 changes: 1 addition & 1 deletion docs/docs/indexer/Tasks/MultieraMinSwapV1MeanPriceTask.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ pub struct EmptyConfig {}


## Full source
[source](https://github.com/dcSpark/carp/tree/main/indexer/tasks/src/multiera/multiera_minswap_v1_mean_price.rs)
[source](https://github.com/dcSpark/carp/tree/main/indexer/indexer/tasks/src/multiera/multiera_minswap_v1_mean_price.rs)
2 changes: 1 addition & 1 deletion docs/docs/indexer/Tasks/MultieraMinSwapV1SwapTask.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ pub struct EmptyConfig {}


## Full source
[source](https://github.com/dcSpark/carp/tree/main/indexer/tasks/src/multiera/multiera_minswap_v1_swap.rs)
[source](https://github.com/dcSpark/carp/tree/main/indexer/indexer/tasks/src/multiera/multiera_minswap_v1_swap.rs)
2 changes: 1 addition & 1 deletion docs/docs/indexer/Tasks/MultieraOutputTask.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ pub struct ReadonlyConfig {


## Full source
[source](https://github.com/dcSpark/carp/tree/main/indexer/tasks/src/multiera/multiera_used_outputs.rs)
[source](https://github.com/dcSpark/carp/tree/main/indexer/indexer/tasks/src/multiera/multiera_used_outputs.rs)
2 changes: 1 addition & 1 deletion docs/docs/indexer/Tasks/MultieraReferenceInputTask.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ pub struct ReadonlyConfig {


## Full source
[source](https://github.com/dcSpark/carp/tree/main/indexer/tasks/src/multiera/multiera_reference_inputs.rs)
[source](https://github.com/dcSpark/carp/tree/main/indexer/indexer/tasks/src/multiera/multiera_reference_inputs.rs)
2 changes: 1 addition & 1 deletion docs/docs/indexer/Tasks/MultieraStakeCredentialTask.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ pub struct EmptyConfig {}


## Full source
[source](https://github.com/dcSpark/carp/tree/main/indexer/tasks/src/multiera/multiera_stake_credentials.rs)
[source](https://github.com/dcSpark/carp/tree/main/indexer/indexer/tasks/src/multiera/multiera_stake_credentials.rs)
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ pub struct EmptyConfig {}


## Full source
[source](https://github.com/dcSpark/carp/tree/main/indexer/tasks/src/multiera/multiera_sundaeswap_v1_mean_price.rs)
[source](https://github.com/dcSpark/carp/tree/main/indexer/indexer/tasks/src/multiera/multiera_sundaeswap_v1_mean_price.rs)
2 changes: 1 addition & 1 deletion docs/docs/indexer/Tasks/MultieraSundaeSwapV1SwapTask.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ pub struct EmptyConfig {}


## Full source
[source](https://github.com/dcSpark/carp/tree/main/indexer/tasks/src/multiera/multiera_sundaeswap_v1_swap.rs)
[source](https://github.com/dcSpark/carp/tree/main/indexer/indexer/tasks/src/multiera/multiera_sundaeswap_v1_swap.rs)
2 changes: 1 addition & 1 deletion docs/docs/indexer/Tasks/MultieraTransactionTask.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ pub struct PayloadAndReadonlyConfig {


## Full source
[source](https://github.com/dcSpark/carp/tree/main/indexer/tasks/src/multiera/multiera_txs.rs)
[source](https://github.com/dcSpark/carp/tree/main/indexer/indexer/tasks/src/multiera/multiera_txs.rs)
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ pub struct EmptyConfig {}


## Full source
[source](https://github.com/dcSpark/carp/tree/main/indexer/tasks/src/multiera/multiera_tx_credential_relations.rs)
[source](https://github.com/dcSpark/carp/tree/main/indexer/indexer/tasks/src/multiera/multiera_tx_credential_relations.rs)
2 changes: 1 addition & 1 deletion docs/docs/indexer/Tasks/MultieraUnusedInputTask.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ pub struct EmptyConfig {}


## Full source
[source](https://github.com/dcSpark/carp/tree/main/indexer/tasks/src/multiera/multiera_unused_input.rs)
[source](https://github.com/dcSpark/carp/tree/main/indexer/indexer/tasks/src/multiera/multiera_unused_input.rs)
2 changes: 1 addition & 1 deletion docs/docs/indexer/Tasks/MultieraUsedInputTask.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ pub struct ReadonlyConfig {


## Full source
[source](https://github.com/dcSpark/carp/tree/main/indexer/tasks/src/multiera/multiera_used_inputs.rs)
[source](https://github.com/dcSpark/carp/tree/main/indexer/indexer/tasks/src/multiera/multiera_used_inputs.rs)
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ pub struct EmptyConfig {}


## Full source
[source](https://github.com/dcSpark/carp/tree/main/indexer/tasks/src/multiera/multiera_wingriders_v1_mean_price.rs)
[source](https://github.com/dcSpark/carp/tree/main/indexer/indexer/tasks/src/multiera/multiera_wingriders_v1_mean_price.rs)
2 changes: 1 addition & 1 deletion docs/docs/indexer/Tasks/MultieraWingRidersV1SwapTask.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ pub struct EmptyConfig {}


## Full source
[source](https://github.com/dcSpark/carp/tree/main/indexer/tasks/src/multiera/multiera_wingriders_v1_swap.rs)
[source](https://github.com/dcSpark/carp/tree/main/indexer/indexer/tasks/src/multiera/multiera_wingriders_v1_swap.rs)
2 changes: 0 additions & 2 deletions docs/docs/indexer/docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,6 @@ PGPASSFILE="$(realpath secrets/.pgpass)"
# as this command will gracefully fallback to PGPASSFILE if no password is specified
# However, some dev tools like pgtyped & zapatos don't support .pgpass files
DATABASE_URL=postgresql://${PGUSER}:${PGPASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DB}
# Needed for PgTyped
PGURI=$DATABASE_URL
```

Please set `NETWORK`, `CONFIG_FILE` and postgres variables carefully. `CONFIG_FILE` should be located in `deployment/config/indexer` folder. You can use `CARP_CONFIG` env variable instead of `CONFIG_FILE` if you want to use just env variables for configuration.
Expand Down
2 changes: 0 additions & 2 deletions docs/docs/indexer/run.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,6 @@ PGPASSFILE="$(realpath secrets/.pgpass)"
# as this command will gracefully fallback to PGPASSFILE if no password is specified
# However, some dev tools like pgtyped & zapatos don't support .pgpass files
DATABASE_URL=postgresql://${PGUSER}:${PGPASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DB}
# Needed for PgTyped
PGURI=$DATABASE_URL
```

Variables related to postgres are described above in `Setting up the database` section.
4 changes: 2 additions & 2 deletions indexer/tasks/src/multiera/multiera_projected_nft.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ impl TryFrom<i32> for ProjectedNftOperation {
3 => Ok(ProjectedNftOperation::ParseError),
4 => Ok(ProjectedNftOperation::NoDatum),
5 => Ok(ProjectedNftOperation::NotInlineDatum),
_ => Err("can't parse projeced nft operation".to_string()),
_ => Err("can't parse projected nft operation".to_string()),
}
}
}
Expand Down Expand Up @@ -565,7 +565,7 @@ impl AssetData {

#[derive(Debug, Clone, Default)]
struct ProjectedNftData {
pub previous_utxo_tx_hash: Vec<u8>,
pub previous_utxo_tx_hash: Vec<u8>, // warning: this isn't nullable, but can be an empty vector to represent null
pub previous_utxo_tx_output_index: Option<i64>,
pub address: Vec<u8>,
pub plutus_data: Vec<u8>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ export class DelegationForPoolController extends Controller {
});

return data.map(data => ({
credential: data.credential as string,
credential: data.credential,
pool: data.pool,
txId: data.tx_id as string,
txId: data.tx_id,
slot: data.slot,
}));
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export class ProjectedNftRangeController extends Controller {
policyId: data.policy_id,
assetName: data.asset_name,
amount: data.amount,
status: data.status as ProjectedNftStatus | null,
status: data.status as ProjectedNftStatus,
plutusDatum: data.plutus_datum,
actionSlot: data.action_slot,
forHowLong: data.for_how_long,
Expand Down Expand Up @@ -108,7 +108,7 @@ export class ProjectedNftRangeController extends Controller {
policyId: data.policy_id,
assetName: data.asset_name,
amount: data.amount,
status: data.status as ProjectedNftStatus | null,
status: data.status as ProjectedNftStatus,
plutusDatum: data.plutus_datum,
actionSlot: data.action_slot,
forHowLong: data.for_how_long,
Expand Down
10 changes: 6 additions & 4 deletions webserver/server/app/models/address/sqlAddressUsed.queries.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
/** Types generated for queries found in "app/models/address/sqlAddressUsed.sql" */
import { PreparedQuery } from '@pgtyped/query';
import { PreparedQuery } from '@pgtyped/runtime';

export type BufferArray = (Buffer)[];

export type NumberOrString = number | string;

/** 'SqlAddressUsed' parameters type */
export interface ISqlAddressUsedParams {
addresses: BufferArray | null | void;
after_tx_id: string | null | void;
until_tx_id: string | null | void;
addresses?: BufferArray | null | void;
after_tx_id?: NumberOrString | null | void;
until_tx_id?: NumberOrString | null | void;
}

/** 'SqlAddressUsed' return type */
Expand Down
10 changes: 6 additions & 4 deletions webserver/server/app/models/address/sqlCredentialUsed.queries.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
/** Types generated for queries found in "app/models/address/sqlCredentialUsed.sql" */
import { PreparedQuery } from '@pgtyped/query';
import { PreparedQuery } from '@pgtyped/runtime';

export type BufferArray = (Buffer)[];

export type NumberOrString = number | string;

/** 'SqlCredentialUsed' parameters type */
export interface ISqlCredentialUsedParams {
after_tx_id: string | null | void;
credentials: BufferArray | null | void;
until_tx_id: string | null | void;
after_tx_id?: NumberOrString | null | void;
credentials?: BufferArray | null | void;
until_tx_id?: NumberOrString | null | void;
}

/** 'SqlCredentialUsed' return type */
Expand Down
2 changes: 1 addition & 1 deletion webserver/server/app/models/asset/assetUtxos.queries.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/** Types generated for queries found in "app/models/asset/assetUtxos.sql" */
import { PreparedQuery } from '@pgtyped/query';
import { PreparedQuery } from '@pgtyped/runtime';

/** 'AssetUtxos' parameters type */
export interface IAssetUtxosParams {
Expand Down
6 changes: 4 additions & 2 deletions webserver/server/app/models/block/sqlBlockLatest.queries.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
/** Types generated for queries found in "app/models/block/sqlBlockLatest.sql" */
import { PreparedQuery } from '@pgtyped/query';
import { PreparedQuery } from '@pgtyped/runtime';

export type NumberOrString = number | string;

/** 'SqlBlockLatest' parameters type */
export interface ISqlBlockLatestParams {
offset: string | null | void;
offset?: NumberOrString | null | void;
}

/** 'SqlBlockLatest' return type */
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
/** Types generated for queries found in "app/models/credentials/sqlCredentialAddresses.sql" */
import { PreparedQuery } from '@pgtyped/query';
import { PreparedQuery } from '@pgtyped/runtime';

export type BufferArray = (Buffer)[];

export type NumberOrString = number | string;

/** 'SqlCredentialAddresses' parameters type */
export interface ISqlCredentialAddressesParams {
after_address: Buffer | null | void;
credentials: BufferArray | null | void;
double_limit: string | null | void;
limit: string | null | void;
until_tx_id: string | null | void;
after_address?: Buffer | null | void;
credentials?: BufferArray | null | void;
double_limit?: NumberOrString | null | void;
limit?: NumberOrString | null | void;
until_tx_id?: NumberOrString | null | void;
}

/** 'SqlCredentialAddresses' return type */
Expand Down
Loading

0 comments on commit aca8c0c

Please sign in to comment.