Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
cctdaniel committed Jun 6, 2024
1 parent d907ee4 commit 9edc2cd
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ repos:
additional_dependencies:
- "prettier@2.7.1"
- "prettier-plugin-solidity@1.0.0-rc.1"
exclude: target_chains/sui/vendor/|apps/hermes/client/js/src/serverTypes.d.ts
exclude: target_chains/sui/vendor/
- repo: local
hooks:
# Hooks for the remote executor
Expand Down
2 changes: 1 addition & 1 deletion apps/hermes/client/js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"test": "jest --testPathIgnorePatterns=.*.e2e.test.ts --passWithNoTests",
"test:e2e": "jest --testPathPattern=.*.e2e.test.ts",
"build": "tsc",
"generate-hermes-api-types": "openapi-typescript https://hermes.pyth.network/docs/openapi.json --output src/serverTypes.d.ts",
"generate-hermes-api-types": "openapi-typescript https://hermes.pyth.network/docs/openapi.json --output src/serverTypes.d.ts && prettier --write src/serverTypes.d.ts",
"check-hermes-api-types": "git diff --exit-code src/serverTypes.d.ts",
"example": "npm run build && node lib/examples/HermesClient.js",
"format": "prettier --write \"src/**/*.ts\"",
Expand Down
22 changes: 10 additions & 12 deletions apps/hermes/client/js/src/serverTypes.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
* Do not make direct changes to the file.
*/


export interface paths {
"/api/get_price_feed": {
/**
Expand Down Expand Up @@ -204,7 +203,7 @@ export interface components {
* Format: int64
* @description When the price was published. The `publish_time` is a unix timestamp, i.e., the number of
* seconds since the Unix epoch (00:00:00 UTC on 1 Jan 1970).
* @example 1714670176
* @example 1717632000
*/
publish_time: number;
};
Expand All @@ -227,12 +226,12 @@ export interface components {
emitter_chain: number;
/**
* Format: int64
* @example 1714670176
* @example 1717632000
*/
prev_publish_time?: number | null;
/**
* Format: int64
* @example 1714670176
* @example 1717632000
*/
price_service_receive_time?: number | null;
/**
Expand All @@ -244,12 +243,12 @@ export interface components {
RpcPriceFeedMetadataV2: {
/**
* Format: int64
* @example 1714670176
* @example 1717632000
*/
prev_publish_time?: number | null;
/**
* Format: int64
* @example 1714670176
* @example 1717632000
*/
proof_available_time?: number | null;
/**
Expand All @@ -273,7 +272,6 @@ export type $defs = Record<string, never>;
export type external = Record<string, never>;

export interface operations {

/**
* **Deprecated: use /v2/updates/price/{publish_time} instead**
* @deprecated
Expand All @@ -291,7 +289,7 @@ export interface operations {
/**
* @description The unix timestamp in seconds. This endpoint will return the first update whose
* publish_time is >= the provided value.
* @example 1714670176
* @example 1717632000
*/
publish_time: number;
/**
Expand Down Expand Up @@ -530,7 +528,7 @@ export interface operations {
* @example e62df6c8b4a85fe1a67db44dc12de5db330f7ac66b72dc658afedf0f4a415b43
*/
"ids[]": components["schemas"]["PriceIdInput"][];
/** @description If true, include the parsed price update in the `parsed` field of each returned feed. Default is `hex`. */
/** @description Optional encoding type. If true, return the price update in the encoding specified by the encoding parameter. Default is `hex`. */
encoding?: components["schemas"]["EncodingType"];
/** @description If true, include the parsed price update in the `parsed` field of each returned feed. Default is `true`. */
parsed?: boolean;
Expand Down Expand Up @@ -570,7 +568,7 @@ export interface operations {
* @example e62df6c8b4a85fe1a67db44dc12de5db330f7ac66b72dc658afedf0f4a415b43
*/
"ids[]": components["schemas"]["PriceIdInput"][];
/** @description If true, include the parsed price update in the `parsed` field of each returned feed. Default is `hex`. */
/** @description Optional encoding type. If true, return the price update in the encoding specified by the encoding parameter. Default is `hex`. */
encoding?: components["schemas"]["EncodingType"];
/** @description If true, include the parsed price update in the `parsed` field of each returned feed. Default is `true`. */
parsed?: boolean;
Expand Down Expand Up @@ -616,7 +614,7 @@ export interface operations {
* @example e62df6c8b4a85fe1a67db44dc12de5db330f7ac66b72dc658afedf0f4a415b43
*/
"ids[]": components["schemas"]["PriceIdInput"][];
/** @description If true, include the parsed price update in the `parsed` field of each returned feed. Default is `hex`. */
/** @description Optional encoding type. If true, return the price update in the encoding specified by the encoding parameter. Default is `hex`. */
encoding?: components["schemas"]["EncodingType"];
/** @description If true, include the parsed price update in the `parsed` field of each returned feed. Default is `true`. */
parsed?: boolean;
Expand All @@ -625,7 +623,7 @@ export interface operations {
/**
* @description The unix timestamp in seconds. This endpoint will return the first update whose
* publish_time is >= the provided value.
* @example 1714670176
* @example 1717632000
*/
publish_time: number;
};
Expand Down

0 comments on commit 9edc2cd

Please sign in to comment.