@cometh/checkout-sdk
Advanced tools
Comparing version 1.0.12 to 1.0.13
@@ -400,2 +400,50 @@ export declare const $LydiaSettings: { | ||
}; | ||
export declare const $PublicTransaction: { | ||
readonly additionalProperties: false; | ||
readonly type: "object"; | ||
readonly required: readonly ["id", "productId", "price", "currency", "chainId", "status", "userAddress"]; | ||
readonly properties: { | ||
readonly id: { | ||
readonly type: "string"; | ||
readonly format: "uuid"; | ||
readonly readOnly: true; | ||
}; | ||
readonly productId: { | ||
readonly type: "integer"; | ||
readonly format: "int64"; | ||
readonly readOnly: true; | ||
readonly example: 1; | ||
}; | ||
readonly price: { | ||
readonly $ref: "#/components/schemas/Price"; | ||
readonly readOnly: true; | ||
}; | ||
readonly currency: { | ||
readonly $ref: "#/components/schemas/Currency"; | ||
readonly readOnly: true; | ||
}; | ||
readonly chainId: { | ||
readonly type: "integer"; | ||
readonly format: "int64"; | ||
readonly readOnly: true; | ||
readonly example: 137; | ||
}; | ||
readonly status: { | ||
readonly description: "Status of the transaction"; | ||
readonly type: "string"; | ||
readonly enum: readonly ["initiated", "cashed", "relayed", "reverted", "cancelled", "completed"]; | ||
}; | ||
readonly userAddress: { | ||
readonly description: "Wallet which would receive the purchased NFT"; | ||
readonly $ref: "#/components/schemas/UserAddress"; | ||
readonly readOnly: true; | ||
readonly example: "0x3D9819210A31b4961b30EF54bE2aeD79B9c9Cd3B"; | ||
}; | ||
readonly parameters: { | ||
readonly description: "Dynamic parameters as given when creating the checkout session"; | ||
readonly $ref: "#/components/schemas/CheckoutSessionParameters"; | ||
readonly readOnly: true; | ||
}; | ||
}; | ||
}; | ||
export declare const $Event: { | ||
@@ -402,0 +450,0 @@ readonly additionalProperties: true; |
@@ -407,2 +407,50 @@ // This file is auto-generated by @hey-api/openapi-ts | ||
}; | ||
export const $PublicTransaction = { | ||
additionalProperties: false, | ||
type: 'object', | ||
required: ['id', 'productId', 'price', 'currency', 'chainId', 'status', 'userAddress'], | ||
properties: { | ||
id: { | ||
type: 'string', | ||
format: 'uuid', | ||
readOnly: true | ||
}, | ||
productId: { | ||
type: 'integer', | ||
format: 'int64', | ||
readOnly: true, | ||
example: 1 | ||
}, | ||
price: { | ||
'$ref': '#/components/schemas/Price', | ||
readOnly: true | ||
}, | ||
currency: { | ||
'$ref': '#/components/schemas/Currency', | ||
readOnly: true | ||
}, | ||
chainId: { | ||
type: 'integer', | ||
format: 'int64', | ||
readOnly: true, | ||
example: 137 | ||
}, | ||
status: { | ||
description: 'Status of the transaction', | ||
type: 'string', | ||
enum: ['initiated', 'cashed', 'relayed', 'reverted', 'cancelled', 'completed'] | ||
}, | ||
userAddress: { | ||
description: 'Wallet which would receive the purchased NFT', | ||
'$ref': '#/components/schemas/UserAddress', | ||
readOnly: true, | ||
example: '0x3D9819210A31b4961b30EF54bE2aeD79B9c9Cd3B' | ||
}, | ||
parameters: { | ||
description: 'Dynamic parameters as given when creating the checkout session', | ||
'$ref': '#/components/schemas/CheckoutSessionParameters', | ||
readOnly: true | ||
} | ||
} | ||
}; | ||
export const $Event = { | ||
@@ -409,0 +457,0 @@ additionalProperties: true, |
import type { CancelablePromise } from './core/CancelablePromise'; | ||
import type { BaseHttpRequest } from './core/BaseHttpRequest'; | ||
import type { GetProjectSettingsResponse, SetProjectSettingsData, SetProjectSettingsResponse, UpdateProjectSettingsData, UpdateProjectSettingsResponse, GetProductsResponse, CreateProductData, CreateProductResponse, GetProductByIdData, GetProductByIdResponse, UpdateProductData, UpdateProductResponse, DeleteProductData, DeleteProductResponse, CreateCheckoutSessionData, CreateCheckoutSessionResponse, GetTransactionsData, GetTransactionsResponse, GetTransactionByIdData, GetTransactionByIdResponse, RetryTransactionByIdData, RetryTransactionByIdResponse, LydiaHandleEventData, LydiaHandleEventResponse, StripeCreateConnectAccountData, StripeCreateConnectAccountResponse, StripeLinkConnectAccountData, StripeLinkConnectAccountResponse, StripeHandleEventData, StripeHandleEventResponse, WhitelistClientContractData, WhitelistClientContractResponse, GetWhitelistedContractsOfProjectData, GetWhitelistedContractsOfProjectResponse, DeleteFromWhitelistOfProjectData, DeleteFromWhitelistOfProjectResponse, UpdateWhitelistContractData, UpdateWhitelistContractResponse, AddContractToReviewData, AddContractToReviewResponse, GetWhitelistedContractsResponse } from './types.gen'; | ||
import type { GetProjectSettingsResponse, SetProjectSettingsData, SetProjectSettingsResponse, UpdateProjectSettingsData, UpdateProjectSettingsResponse, GetProductsResponse, CreateProductData, CreateProductResponse, GetProductByIdData, GetProductByIdResponse, UpdateProductData, UpdateProductResponse, DeleteProductData, DeleteProductResponse, CreateCheckoutSessionData, CreateCheckoutSessionResponse, GetTransactionsData, GetTransactionsResponse, GetTransactionByIdData, GetTransactionByIdResponse, RetryTransactionByIdData, RetryTransactionByIdResponse, GetPublicTransactionByIdData, GetPublicTransactionByIdResponse, LydiaHandleEventData, LydiaHandleEventResponse, StripeCreateConnectAccountData, StripeCreateConnectAccountResponse, StripeLinkConnectAccountData, StripeLinkConnectAccountResponse, StripeHandleEventData, StripeHandleEventResponse, WhitelistClientContractData, WhitelistClientContractResponse, GetWhitelistedContractsOfProjectData, GetWhitelistedContractsOfProjectResponse, DeleteFromWhitelistOfProjectData, DeleteFromWhitelistOfProjectResponse, UpdateWhitelistContractData, UpdateWhitelistContractResponse, AddContractToReviewData, AddContractToReviewResponse, GetWhitelistedContractsResponse } from './types.gen'; | ||
export declare class SettingsService { | ||
@@ -126,2 +126,11 @@ readonly httpRequest: BaseHttpRequest; | ||
retryTransactionById(data: RetryTransactionByIdData): CancelablePromise<RetryTransactionByIdResponse>; | ||
/** | ||
* Fetch public transaction details | ||
* Fetch public transaction details by transaction ID | ||
* @param data The data for the request. | ||
* @param data.transactionId | ||
* @returns PublicTransaction Transaction | ||
* @throws ApiError | ||
*/ | ||
getPublicTransactionById(data: GetPublicTransactionByIdData): CancelablePromise<GetPublicTransactionByIdResponse>; | ||
} | ||
@@ -128,0 +137,0 @@ export declare class LydiaService { |
@@ -307,2 +307,26 @@ // This file is auto-generated by @hey-api/openapi-ts | ||
} | ||
/** | ||
* Fetch public transaction details | ||
* Fetch public transaction details by transaction ID | ||
* @param data The data for the request. | ||
* @param data.transactionId | ||
* @returns PublicTransaction Transaction | ||
* @throws ApiError | ||
*/ | ||
getPublicTransactionById(data) { | ||
return this.httpRequest.request({ | ||
method: 'GET', | ||
url: '/transactions/{transactionId}/public-view', | ||
path: { | ||
transactionId: data.transactionId | ||
}, | ||
errors: { | ||
400: 'Invalid input, object invalid.', | ||
401: 'Missing API key or secret', | ||
403: 'Resource is access restricted.', | ||
404: 'Ressource not found.', | ||
500: 'Internal server error' | ||
} | ||
}); | ||
} | ||
} | ||
@@ -309,0 +333,0 @@ export class LydiaService { |
@@ -258,2 +258,21 @@ export type LydiaSettings = { | ||
}; | ||
export type PublicTransaction = { | ||
readonly id: string; | ||
readonly productId: number; | ||
readonly price: Price; | ||
readonly currency: Currency; | ||
readonly chainId: number; | ||
/** | ||
* Status of the transaction | ||
*/ | ||
status: 'initiated' | 'cashed' | 'relayed' | 'reverted' | 'cancelled' | 'completed'; | ||
/** | ||
* Wallet which would receive the purchased NFT | ||
*/ | ||
readonly userAddress: UserAddress; | ||
/** | ||
* Dynamic parameters as given when creating the checkout session | ||
*/ | ||
readonly parameters?: CheckoutSessionParameters; | ||
}; | ||
export type Event = { | ||
@@ -419,2 +438,6 @@ /** | ||
export type RetryTransactionByIdResponse = Transaction; | ||
export type GetPublicTransactionByIdData = { | ||
transactionId: string; | ||
}; | ||
export type GetPublicTransactionByIdResponse = PublicTransaction; | ||
export type LydiaHandleEventData = { | ||
@@ -990,2 +1013,44 @@ formData: Event; | ||
}; | ||
'/transactions/{transactionId}/public-view': { | ||
get: { | ||
req: GetPublicTransactionByIdData; | ||
res: { | ||
/** | ||
* Transaction | ||
*/ | ||
200: PublicTransaction; | ||
/** | ||
* Invalid input, object invalid. | ||
*/ | ||
400: { | ||
message?: string; | ||
}; | ||
/** | ||
* Missing API key or secret | ||
*/ | ||
401: { | ||
message?: string; | ||
}; | ||
/** | ||
* Resource is access restricted. | ||
*/ | ||
403: { | ||
message?: string; | ||
}; | ||
/** | ||
* Ressource not found. | ||
*/ | ||
404: { | ||
message?: string; | ||
}; | ||
/** | ||
* Internal server error | ||
*/ | ||
500: { | ||
message?: string; | ||
errors?: unknown[]; | ||
}; | ||
}; | ||
}; | ||
}; | ||
'/lydia/webhooks': { | ||
@@ -992,0 +1057,0 @@ post: { |
{ | ||
"name": "@cometh/checkout-sdk", | ||
"version": "1.0.12", | ||
"version": "1.0.13", | ||
"description": "SDK to use Cometh Checkout API", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -431,2 +431,51 @@ // This file is auto-generated by @hey-api/openapi-ts | ||
export const $PublicTransaction = { | ||
additionalProperties: false, | ||
type: 'object', | ||
required: ['id', 'productId', 'price', 'currency', 'chainId', 'status', 'userAddress'], | ||
properties: { | ||
id: { | ||
type: 'string', | ||
format: 'uuid', | ||
readOnly: true | ||
}, | ||
productId: { | ||
type: 'integer', | ||
format: 'int64', | ||
readOnly: true, | ||
example: 1 | ||
}, | ||
price: { | ||
'$ref': '#/components/schemas/Price', | ||
readOnly: true | ||
}, | ||
currency: { | ||
'$ref': '#/components/schemas/Currency', | ||
readOnly: true | ||
}, | ||
chainId: { | ||
type: 'integer', | ||
format: 'int64', | ||
readOnly: true, | ||
example: 137 | ||
}, | ||
status: { | ||
description: 'Status of the transaction', | ||
type: 'string', | ||
enum: ['initiated', 'cashed', 'relayed', 'reverted', 'cancelled', 'completed'] | ||
}, | ||
userAddress: { | ||
description: 'Wallet which would receive the purchased NFT', | ||
'$ref': '#/components/schemas/UserAddress', | ||
readOnly: true, | ||
example: '0x3D9819210A31b4961b30EF54bE2aeD79B9c9Cd3B' | ||
}, | ||
parameters: { | ||
description: 'Dynamic parameters as given when creating the checkout session', | ||
'$ref': '#/components/schemas/CheckoutSessionParameters', | ||
readOnly: true | ||
} | ||
} | ||
} as const; | ||
export const $Event = { | ||
@@ -433,0 +482,0 @@ additionalProperties: true, |
@@ -5,3 +5,3 @@ // This file is auto-generated by @hey-api/openapi-ts | ||
import type { BaseHttpRequest } from './core/BaseHttpRequest'; | ||
import type { GetProjectSettingsResponse, SetProjectSettingsData, SetProjectSettingsResponse, UpdateProjectSettingsData, UpdateProjectSettingsResponse, GetProductsResponse, CreateProductData, CreateProductResponse, GetProductByIdData, GetProductByIdResponse, UpdateProductData, UpdateProductResponse, DeleteProductData, DeleteProductResponse, CreateCheckoutSessionData, CreateCheckoutSessionResponse, GetTransactionsData, GetTransactionsResponse, GetTransactionByIdData, GetTransactionByIdResponse, RetryTransactionByIdData, RetryTransactionByIdResponse, LydiaHandleEventData, LydiaHandleEventResponse, StripeCreateConnectAccountData, StripeCreateConnectAccountResponse, StripeLinkConnectAccountData, StripeLinkConnectAccountResponse, StripeHandleEventData, StripeHandleEventResponse, WhitelistClientContractData, WhitelistClientContractResponse, GetWhitelistedContractsOfProjectData, GetWhitelistedContractsOfProjectResponse, DeleteFromWhitelistOfProjectData, DeleteFromWhitelistOfProjectResponse, UpdateWhitelistContractData, UpdateWhitelistContractResponse, AddContractToReviewData, AddContractToReviewResponse, GetWhitelistedContractsResponse } from './types.gen'; | ||
import type { GetProjectSettingsResponse, SetProjectSettingsData, SetProjectSettingsResponse, UpdateProjectSettingsData, UpdateProjectSettingsResponse, GetProductsResponse, CreateProductData, CreateProductResponse, GetProductByIdData, GetProductByIdResponse, UpdateProductData, UpdateProductResponse, DeleteProductData, DeleteProductResponse, CreateCheckoutSessionData, CreateCheckoutSessionResponse, GetTransactionsData, GetTransactionsResponse, GetTransactionByIdData, GetTransactionByIdResponse, RetryTransactionByIdData, RetryTransactionByIdResponse, GetPublicTransactionByIdData, GetPublicTransactionByIdResponse, LydiaHandleEventData, LydiaHandleEventResponse, StripeCreateConnectAccountData, StripeCreateConnectAccountResponse, StripeLinkConnectAccountData, StripeLinkConnectAccountResponse, StripeHandleEventData, StripeHandleEventResponse, WhitelistClientContractData, WhitelistClientContractResponse, GetWhitelistedContractsOfProjectData, GetWhitelistedContractsOfProjectResponse, DeleteFromWhitelistOfProjectData, DeleteFromWhitelistOfProjectResponse, UpdateWhitelistContractData, UpdateWhitelistContractResponse, AddContractToReviewData, AddContractToReviewResponse, GetWhitelistedContractsResponse } from './types.gen'; | ||
@@ -324,2 +324,27 @@ export class SettingsService { | ||
/** | ||
* Fetch public transaction details | ||
* Fetch public transaction details by transaction ID | ||
* @param data The data for the request. | ||
* @param data.transactionId | ||
* @returns PublicTransaction Transaction | ||
* @throws ApiError | ||
*/ | ||
public getPublicTransactionById(data: GetPublicTransactionByIdData): CancelablePromise<GetPublicTransactionByIdResponse> { | ||
return this.httpRequest.request({ | ||
method: 'GET', | ||
url: '/transactions/{transactionId}/public-view', | ||
path: { | ||
transactionId: data.transactionId | ||
}, | ||
errors: { | ||
400: 'Invalid input, object invalid.', | ||
401: 'Missing API key or secret', | ||
403: 'Resource is access restricted.', | ||
404: 'Ressource not found.', | ||
500: 'Internal server error' | ||
} | ||
}); | ||
} | ||
} | ||
@@ -326,0 +351,0 @@ |
@@ -291,2 +291,22 @@ // This file is auto-generated by @hey-api/openapi-ts | ||
export type PublicTransaction = { | ||
readonly id: string; | ||
readonly productId: number; | ||
readonly price: Price; | ||
readonly currency: Currency; | ||
readonly chainId: number; | ||
/** | ||
* Status of the transaction | ||
*/ | ||
status: 'initiated' | 'cashed' | 'relayed' | 'reverted' | 'cancelled' | 'completed'; | ||
/** | ||
* Wallet which would receive the purchased NFT | ||
*/ | ||
readonly userAddress: UserAddress; | ||
/** | ||
* Dynamic parameters as given when creating the checkout session | ||
*/ | ||
readonly parameters?: CheckoutSessionParameters; | ||
}; | ||
export type Event = { | ||
@@ -488,2 +508,8 @@ /** | ||
export type GetPublicTransactionByIdData = { | ||
transactionId: string; | ||
}; | ||
export type GetPublicTransactionByIdResponse = PublicTransaction; | ||
export type LydiaHandleEventData = { | ||
@@ -1078,2 +1104,44 @@ formData: Event; | ||
}; | ||
'/transactions/{transactionId}/public-view': { | ||
get: { | ||
req: GetPublicTransactionByIdData; | ||
res: { | ||
/** | ||
* Transaction | ||
*/ | ||
200: PublicTransaction; | ||
/** | ||
* Invalid input, object invalid. | ||
*/ | ||
400: { | ||
message?: string; | ||
}; | ||
/** | ||
* Missing API key or secret | ||
*/ | ||
401: { | ||
message?: string; | ||
}; | ||
/** | ||
* Resource is access restricted. | ||
*/ | ||
403: { | ||
message?: string; | ||
}; | ||
/** | ||
* Ressource not found. | ||
*/ | ||
404: { | ||
message?: string; | ||
}; | ||
/** | ||
* Internal server error | ||
*/ | ||
500: { | ||
message?: string; | ||
errors?: unknown[]; | ||
}; | ||
}; | ||
}; | ||
}; | ||
'/lydia/webhooks': { | ||
@@ -1080,0 +1148,0 @@ post: { |
233694
7295