New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@cometh/checkout-sdk

Package Overview
Dependencies
Maintainers
5
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cometh/checkout-sdk - npm Package Compare versions

Comparing version

to
1.0.15

147

dist/schemas.gen.d.ts

@@ -299,6 +299,5 @@ export declare const $LydiaSettings: {

};
export declare const $Transaction: {
readonly additionalProperties: false;
export declare const $BaseTransaction: {
readonly type: "object";
readonly required: readonly ["id", "productId", "price", "currency", "chainId", "status", "userAddress", "email", "pspType", "pspIdentifier", "pspInfos", "relayedTxnId"];
readonly required: readonly ["id", "productId", "price", "currency", "chainId", "status", "userAddress", "txHash"];
readonly properties: {

@@ -341,8 +340,8 @@ readonly id: {

};
readonly email: {
readonly description: "Email address of the user making the purchase";
readonly txHash: {
readonly description: "Hash of the transaction on the blockchain";
readonly type: "string";
readonly format: "email";
readonly readOnly: true;
readonly nullable: true;
readonly readOnly: true;
readonly example: "0x3D9819210A31b4961b30EF54bE2aeD79B9c9Cd3B";
};

@@ -354,30 +353,63 @@ readonly parameters: {

};
readonly pspType: {
readonly type: "string";
readonly enum: readonly ["Lydia", "Stripe"];
readonly readOnly: true;
};
readonly pspIdentifier: {
readonly description: "Identifier specific to the PSP";
readonly type: "string";
readonly readOnly: true;
readonly example: "12097878";
};
readonly pspInfos: {
readonly description: "Any data specific to the checkout session for this PSP";
readonly type: "object";
readonly readOnly: true;
readonly example: {
readonly url: "https://homologation.lydia-app.com/collect/payment/139723a8a6c917d1fdfc73f76c4c25ee/cb";
readonly requestId: "12097878";
readonly requestUuid: "139723a8a6c917d1fdfc73f76c4c25ee";
};
};
export declare const $Transaction: {
readonly allOf: readonly [{
readonly $ref: "#/components/schemas/BaseTransaction";
}, {
readonly type: "object";
readonly required: readonly ["email", "pspType", "pspIdentifier", "pspInfos", "relayedTxnId"];
readonly properties: {
readonly email: {
readonly description: "Email address of the user making the purchase";
readonly type: "string";
readonly format: "email";
readonly nullable: true;
readonly readOnly: true;
};
readonly pspType: {
readonly type: "string";
readonly enum: readonly ["Lydia", "Stripe"];
readonly readOnly: true;
};
readonly pspIdentifier: {
readonly description: "Identifier specific to the PSP";
readonly type: "string";
readonly readOnly: true;
readonly example: "12097878";
};
readonly pspInfos: {
readonly description: "Any data specific to the checkout session for this PSP";
readonly type: "object";
readonly readOnly: true;
readonly additionalProperties: {
readonly anyOf: readonly [{
readonly type: "string";
}, {
readonly type: "number";
}, {
readonly type: "integer";
}, {
readonly type: "boolean";
}, {
readonly type: "array";
readonly items: {};
}, {
readonly type: "object";
}];
};
readonly example: {
readonly url: "https://homologation.lydia-app.com/collect/payment/139723a8a6c917d1fdfc73f76c4c25ee/cb";
readonly requestId: "12097878";
readonly requestUuid: "139723a8a6c917d1fdfc73f76c4c25ee";
};
};
readonly relayedTxnId: {
readonly description: "ID of the transaction as exposed by Cometh relayer";
readonly type: "string";
readonly nullable: true;
readonly readOnly: true;
};
};
readonly relayedTxnId: {
readonly description: "ID of the transaction as exposed by Cometh relayer";
readonly type: "string";
readonly nullable: true;
readonly readOnly: true;
};
};
}];
};

@@ -404,48 +436,5 @@ export declare const $PaginatedTransactions: {

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;
};
};
readonly allOf: readonly [{
readonly $ref: "#/components/schemas/BaseTransaction";
}];
};

@@ -452,0 +441,0 @@ export declare const $Event: {

@@ -306,6 +306,5 @@ // This file is auto-generated by @hey-api/openapi-ts

};
export const $Transaction = {
additionalProperties: false,
export const $BaseTransaction = {
type: 'object',
required: ['id', 'productId', 'price', 'currency', 'chainId', 'status', 'userAddress', 'email', 'pspType', 'pspIdentifier', 'pspInfos', 'relayedTxnId'],
required: ['id', 'productId', 'price', 'currency', 'chainId', 'status', 'userAddress', 'txHash'],
properties: {

@@ -348,8 +347,8 @@ id: {

},
email: {
description: 'Email address of the user making the purchase',
txHash: {
description: 'Hash of the transaction on the blockchain',
type: 'string',
format: 'email',
readOnly: true,
nullable: true,
readOnly: true
example: '0x3D9819210A31b4961b30EF54bE2aeD79B9c9Cd3B'
},

@@ -360,31 +359,74 @@ parameters: {

readOnly: true
}
}
};
export const $Transaction = {
allOf: [
{
'$ref': '#/components/schemas/BaseTransaction'
},
pspType: {
type: 'string',
enum: ['Lydia', 'Stripe'],
readOnly: true
},
pspIdentifier: {
description: 'Identifier specific to the PSP',
type: 'string',
readOnly: true,
example: '12097878'
},
pspInfos: {
description: 'Any data specific to the checkout session for this PSP',
{
type: 'object',
readOnly: true,
example: {
url: 'https://homologation.lydia-app.com/collect/payment/139723a8a6c917d1fdfc73f76c4c25ee/cb',
requestId: '12097878',
requestUuid: '139723a8a6c917d1fdfc73f76c4c25ee'
required: ['email', 'pspType', 'pspIdentifier', 'pspInfos', 'relayedTxnId'],
properties: {
email: {
description: 'Email address of the user making the purchase',
type: 'string',
format: 'email',
nullable: true,
readOnly: true
},
pspType: {
type: 'string',
enum: ['Lydia', 'Stripe'],
readOnly: true
},
pspIdentifier: {
description: 'Identifier specific to the PSP',
type: 'string',
readOnly: true,
example: '12097878'
},
pspInfos: {
description: 'Any data specific to the checkout session for this PSP',
type: 'object',
readOnly: true,
additionalProperties: {
anyOf: [
{
type: 'string'
},
{
type: 'number'
},
{
type: 'integer'
},
{
type: 'boolean'
},
{
type: 'array',
items: {}
},
{
type: 'object'
}
]
},
example: {
url: 'https://homologation.lydia-app.com/collect/payment/139723a8a6c917d1fdfc73f76c4c25ee/cb',
requestId: '12097878',
requestUuid: '139723a8a6c917d1fdfc73f76c4c25ee'
}
},
relayedTxnId: {
description: 'ID of the transaction as exposed by Cometh relayer',
type: 'string',
nullable: true,
readOnly: true
}
}
},
relayedTxnId: {
description: 'ID of the transaction as exposed by Cometh relayer',
type: 'string',
nullable: true,
readOnly: true
}
}
]
};

@@ -411,48 +453,7 @@ export const $PaginatedTransactions = {

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
allOf: [
{
'$ref': '#/components/schemas/BaseTransaction'
}
}
]
};

@@ -459,0 +460,0 @@ export const $Event = {

@@ -190,3 +190,3 @@ export type LydiaSettings = {

export type PageSkip = number;
export type Transaction = {
export type BaseTransaction = {
readonly id: string;

@@ -206,5 +206,5 @@ readonly productId: number;

/**
* Email address of the user making the purchase
* Hash of the transaction on the blockchain
*/
readonly email: string | null;
readonly txHash: string | null;
/**

@@ -214,17 +214,2 @@ * Dynamic parameters as given when creating the checkout session

readonly parameters?: CheckoutSessionParameters;
readonly pspType: 'Lydia' | 'Stripe';
/**
* Identifier specific to the PSP
*/
readonly pspIdentifier: string;
/**
* Any data specific to the checkout session for this PSP
*/
readonly pspInfos: {
[key: string]: unknown;
};
/**
* ID of the transaction as exposed by Cometh relayer
*/
readonly relayedTxnId: string | null;
};

@@ -246,2 +231,25 @@ /**

};
export type Transaction = BaseTransaction & {
/**
* Email address of the user making the purchase
*/
readonly email: string | null;
readonly pspType: 'Lydia' | 'Stripe';
/**
* Identifier specific to the PSP
*/
readonly pspIdentifier: string;
/**
* Any data specific to the checkout session for this PSP
*/
readonly pspInfos: {
[key: string]: (string | number | boolean | Array<unknown> | {
[key: string]: unknown;
});
};
/**
* ID of the transaction as exposed by Cometh relayer
*/
readonly relayedTxnId: string | null;
};
export type pspType = 'Lydia' | 'Stripe';

@@ -262,21 +270,3 @@ export declare const pspType: {

};
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 PublicTransaction = BaseTransaction;
export type Event = {

@@ -283,0 +273,0 @@ /**

{
"name": "@cometh/checkout-sdk",
"version": "1.0.13",
"version": "1.0.15",
"description": "SDK to use Cometh Checkout API",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -328,6 +328,5 @@ // This file is auto-generated by @hey-api/openapi-ts

export const $Transaction = {
additionalProperties: false,
export const $BaseTransaction = {
type: 'object',
required: ['id', 'productId', 'price', 'currency', 'chainId', 'status', 'userAddress', 'email', 'pspType', 'pspIdentifier', 'pspInfos', 'relayedTxnId'],
required: ['id', 'productId', 'price', 'currency', 'chainId', 'status', 'userAddress', 'txHash'],
properties: {

@@ -370,8 +369,8 @@ id: {

},
email: {
description: 'Email address of the user making the purchase',
txHash: {
description: 'Hash of the transaction on the blockchain',
type: 'string',
format: 'email',
readOnly: true,
nullable: true,
readOnly: true
example: '0x3D9819210A31b4961b30EF54bE2aeD79B9c9Cd3B'
},

@@ -382,31 +381,75 @@ parameters: {

readOnly: true
}
}
} as const;
export const $Transaction = {
allOf: [
{
'$ref': '#/components/schemas/BaseTransaction'
},
pspType: {
type: 'string',
enum: ['Lydia', 'Stripe'],
readOnly: true
},
pspIdentifier: {
description: 'Identifier specific to the PSP',
type: 'string',
readOnly: true,
example: '12097878'
},
pspInfos: {
description: 'Any data specific to the checkout session for this PSP',
{
type: 'object',
readOnly: true,
example: {
url: 'https://homologation.lydia-app.com/collect/payment/139723a8a6c917d1fdfc73f76c4c25ee/cb',
requestId: '12097878',
requestUuid: '139723a8a6c917d1fdfc73f76c4c25ee'
required: ['email', 'pspType', 'pspIdentifier', 'pspInfos', 'relayedTxnId'],
properties: {
email: {
description: 'Email address of the user making the purchase',
type: 'string',
format: 'email',
nullable: true,
readOnly: true
},
pspType: {
type: 'string',
enum: ['Lydia', 'Stripe'],
readOnly: true
},
pspIdentifier: {
description: 'Identifier specific to the PSP',
type: 'string',
readOnly: true,
example: '12097878'
},
pspInfos: {
description: 'Any data specific to the checkout session for this PSP',
type: 'object',
readOnly: true,
additionalProperties: {
anyOf: [
{
type: 'string'
},
{
type: 'number'
},
{
type: 'integer'
},
{
type: 'boolean'
},
{
type: 'array',
items: {}
},
{
type: 'object'
}
]
},
example: {
url: 'https://homologation.lydia-app.com/collect/payment/139723a8a6c917d1fdfc73f76c4c25ee/cb',
requestId: '12097878',
requestUuid: '139723a8a6c917d1fdfc73f76c4c25ee'
}
},
relayedTxnId: {
description: 'ID of the transaction as exposed by Cometh relayer',
type: 'string',
nullable: true,
readOnly: true
}
}
},
relayedTxnId: {
description: 'ID of the transaction as exposed by Cometh relayer',
type: 'string',
nullable: true,
readOnly: true
}
}
]
} as const;

@@ -435,48 +478,7 @@

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
allOf: [
{
'$ref': '#/components/schemas/BaseTransaction'
}
}
]
} as const;

@@ -483,0 +485,0 @@

@@ -217,3 +217,3 @@ // This file is auto-generated by @hey-api/openapi-ts

export type Transaction = {
export type BaseTransaction = {
readonly id: string;

@@ -233,5 +233,5 @@ readonly productId: number;

/**
* Email address of the user making the purchase
* Hash of the transaction on the blockchain
*/
readonly email: string | null;
readonly txHash: string | null;
/**

@@ -241,17 +241,2 @@ * Dynamic parameters as given when creating the checkout session

readonly parameters?: CheckoutSessionParameters;
readonly pspType: 'Lydia' | 'Stripe';
/**
* Identifier specific to the PSP
*/
readonly pspIdentifier: string;
/**
* Any data specific to the checkout session for this PSP
*/
readonly pspInfos: {
[key: string]: unknown;
};
/**
* ID of the transaction as exposed by Cometh relayer
*/
readonly relayedTxnId: string | null;
};

@@ -276,2 +261,26 @@

export type Transaction = BaseTransaction & {
/**
* Email address of the user making the purchase
*/
readonly email: string | null;
readonly pspType: 'Lydia' | 'Stripe';
/**
* Identifier specific to the PSP
*/
readonly pspIdentifier: string;
/**
* Any data specific to the checkout session for this PSP
*/
readonly pspInfos: {
[key: string]: (string | number | boolean | Array<unknown> | {
[key: string]: unknown;
});
};
/**
* ID of the transaction as exposed by Cometh relayer
*/
readonly relayedTxnId: string | null;
};
export type pspType = 'Lydia' | 'Stripe';

@@ -295,21 +304,3 @@

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 PublicTransaction = BaseTransaction;

@@ -316,0 +307,0 @@ export type Event = {