Skip to content

Commit

Permalink
update swagger.
Browse files Browse the repository at this point in the history
  • Loading branch information
b4rtaz committed Jan 23, 2024
1 parent a4bcdf1 commit 0c1ab91
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export interface SolMetaplexTokenJSON {
readonly metadataUri: string;
readonly masterEdition: boolean;
readonly isMutable: boolean;
readonly primarySaleHappened: boolean;
readonly primarySaleHappened: number;
readonly sellerFeeBasisPoints: number;
readonly updateAuthority: string;
}
Expand All @@ -21,7 +21,7 @@ export interface SolMetaplexTokenInput {
readonly metadataUri: string;
readonly masterEdition: boolean;
readonly isMutable: boolean;
readonly primarySaleHappened: boolean;
readonly primarySaleHappened: number;
readonly sellerFeeBasisPoints: number;
readonly updateAuthority: string;
}
Expand Down Expand Up @@ -49,7 +49,7 @@ export class SolMetaplexToken {
public readonly metadataUri: string;
public readonly masterEdition: boolean;
public readonly isMutable: boolean;
public readonly primarySaleHappened: boolean;
public readonly primarySaleHappened: number;
public readonly sellerFeeBasisPoints: number;
public readonly updateAuthority: string;

Expand Down
24 changes: 12 additions & 12 deletions packages/common/solUtils/src/generated/types/SolSPLTokenPrice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,16 @@ import { SolAddress, SolAddressInput, SolAddressJSON } from '../../dataTypes';

export interface SolSPLTokenPriceJSON {
readonly nativePrice?: SolSPLNativePriceJSON;
readonly usdPrice: number;
readonly exchangeAddress: SolAddressJSON;
readonly exchangeName: string;
readonly usdPrice?: number;
readonly exchangeAddress?: SolAddressJSON;
readonly exchangeName?: string;
}

export interface SolSPLTokenPriceInput {
readonly nativePrice?: SolSPLNativePriceInput | SolSPLNativePrice;
readonly usdPrice: number;
readonly exchangeAddress: SolAddressInput | SolAddress;
readonly exchangeName: string;
readonly usdPrice?: number;
readonly exchangeAddress?: SolAddressInput | SolAddress;
readonly exchangeName?: string;
}

export class SolSPLTokenPrice {
Expand All @@ -35,29 +35,29 @@ export class SolSPLTokenPrice {
const input: SolSPLTokenPriceInput = {
nativePrice: json.nativePrice ? SolSPLNativePrice.fromJSON(json.nativePrice) : undefined,
usdPrice: json.usdPrice,
exchangeAddress: SolAddress.fromJSON(json.exchangeAddress),
exchangeAddress: json.exchangeAddress ? SolAddress.fromJSON(json.exchangeAddress) : undefined,
exchangeName: json.exchangeName,
};
return SolSPLTokenPrice.create(input);
}

public readonly nativePrice?: SolSPLNativePrice;
public readonly usdPrice: number;
public readonly exchangeAddress: SolAddress;
public readonly exchangeName: string;
public readonly usdPrice?: number;
public readonly exchangeAddress?: SolAddress;
public readonly exchangeName?: string;

private constructor(input: SolSPLTokenPriceInput) {
this.nativePrice = input.nativePrice ? SolSPLNativePrice.create(input.nativePrice) : undefined;
this.usdPrice = input.usdPrice;
this.exchangeAddress = SolAddress.create(input.exchangeAddress);
this.exchangeAddress = input.exchangeAddress ? SolAddress.create(input.exchangeAddress) : undefined;
this.exchangeName = input.exchangeName;
}

public toJSON(): SolSPLTokenPriceJSON {
return {
nativePrice: this.nativePrice ? this.nativePrice.toJSON() : undefined,
usdPrice: this.usdPrice,
exchangeAddress: this.exchangeAddress.toJSON(),
exchangeAddress: this.exchangeAddress ? this.exchangeAddress.toJSON() : undefined,
exchangeName: this.exchangeName,
}
}
Expand Down
10 changes: 5 additions & 5 deletions packages/common/solUtils/src/operations/openapi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export interface components {
metadataUri: string;
masterEdition: boolean;
isMutable: boolean;
primarySaleHappened: boolean;
primarySaleHappened: number;
sellerFeeBasisPoints: number;
updateAuthority: string;
};
Expand All @@ -83,15 +83,15 @@ export interface components {
};
SPLTokenPrice: {
nativePrice?: components["schemas"]["SPLNativePrice"];
usdPrice: number;
exchangeAddress: string;
exchangeName: string;
usdPrice?: number;
exchangeAddress?: string;
exchangeName?: string;
};
MetaplexToken: {
metadataUri: string;
masterEdition: boolean;
isMutable: boolean;
primarySaleHappened: boolean;
primarySaleHappened: number;
sellerFeeBasisPoints: number;
updateAuthority: string;
};
Expand Down

0 comments on commit 0c1ab91

Please sign in to comment.