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
0
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 1.0.1 to 1.0.2

6

dist/core/ApiError.js

@@ -1,5 +0,2 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ApiError = void 0;
class ApiError extends Error {
export class ApiError extends Error {
constructor(request, response, message) {

@@ -15,2 +12,1 @@ super(message);

}
exports.ApiError = ApiError;

3

dist/core/ApiRequestOptions.js

@@ -1,2 +0,1 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
export {};

@@ -1,2 +0,1 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
export {};

@@ -1,7 +0,4 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.AxiosHttpRequest = void 0;
const BaseHttpRequest_1 = require("./BaseHttpRequest");
const request_1 = require("./request");
class AxiosHttpRequest extends BaseHttpRequest_1.BaseHttpRequest {
import { BaseHttpRequest } from './BaseHttpRequest';
import { request as __request } from './request';
export class AxiosHttpRequest extends BaseHttpRequest {
constructor(config) {

@@ -17,5 +14,4 @@ super(config);

request(options) {
return (0, request_1.request)(this.config, options);
return __request(this.config, options);
}
}
exports.AxiosHttpRequest = AxiosHttpRequest;

@@ -1,5 +0,2 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.BaseHttpRequest = void 0;
class BaseHttpRequest {
export class BaseHttpRequest {
constructor(config) {

@@ -9,2 +6,1 @@ this.config = config;

}
exports.BaseHttpRequest = BaseHttpRequest;

@@ -1,2 +0,1 @@

"use strict";
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {

@@ -14,8 +13,6 @@ if (kind === "m") throw new TypeError("Private method is not writable");

var _CancelablePromise_isResolved, _CancelablePromise_isRejected, _CancelablePromise_isCancelled, _CancelablePromise_cancelHandlers, _CancelablePromise_promise, _CancelablePromise_resolve, _CancelablePromise_reject;
Object.defineProperty(exports, "__esModule", { value: true });
exports.CancelablePromise = exports.CancelError = void 0;
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
class CancelError extends Error {
export class CancelError extends Error {
constructor(message) {

@@ -29,4 +26,3 @@ super(message);

}
exports.CancelError = CancelError;
class CancelablePromise {
export class CancelablePromise {
constructor(executor) {

@@ -114,2 +110,1 @@ _CancelablePromise_isResolved.set(this, void 0);

}
exports.CancelablePromise = CancelablePromise;

@@ -1,5 +0,2 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.OpenAPI = void 0;
exports.OpenAPI = {
export const OpenAPI = {
BASE: 'https://checkout.cometh.io/v1',

@@ -6,0 +3,0 @@ VERSION: '0.1',

@@ -1,14 +0,8 @@

"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.request = void 0;
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
const axios_1 = __importDefault(require("axios"));
const form_data_1 = __importDefault(require("form-data"));
const ApiError_1 = require("./ApiError");
const CancelablePromise_1 = require("./CancelablePromise");
import axios from 'axios';
import FormData from 'form-data';
import { ApiError } from './ApiError';
import { CancelablePromise } from './CancelablePromise';
const isDefined = (value) => {

@@ -34,3 +28,3 @@ return value !== undefined && value !== null;

const isFormData = (value) => {
return value instanceof form_data_1.default;
return value instanceof FormData;
};

@@ -97,3 +91,3 @@ const isSuccess = (status) => {

if (options.formData) {
const formData = new form_data_1.default();
const formData = new FormData();
const process = (key, value) => {

@@ -174,3 +168,3 @@ if (isString(value) || isBlob(value)) {

const sendRequest = async (config, options, url, body, formData, headers, onCancel) => {
const source = axios_1.default.CancelToken.source();
const source = axios.CancelToken.source();
const requestConfig = {

@@ -186,3 +180,3 @@ url,

try {
return await axios_1.default.request(requestConfig);
return await axios.request(requestConfig);
}

@@ -225,6 +219,6 @@ catch (error) {

if (error) {
throw new ApiError_1.ApiError(options, result, error);
throw new ApiError(options, result, error);
}
if (!result.ok) {
throw new ApiError_1.ApiError(options, result, 'Generic Error');
throw new ApiError(options, result, 'Generic Error');
}

@@ -239,4 +233,4 @@ };

*/
const request = (config, options) => {
return new CancelablePromise_1.CancelablePromise(async (resolve, reject, onCancel) => {
export const request = (config, options) => {
return new CancelablePromise(async (resolve, reject, onCancel) => {
try {

@@ -267,2 +261,1 @@ const url = getUrl(config, options);

};
exports.request = request;

@@ -1,14 +0,11 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.FiatMintingApi = void 0;
const AxiosHttpRequest_1 = require("./core/AxiosHttpRequest");
const AdminService_1 = require("./services/AdminService");
const CheckoutSessionsService_1 = require("./services/CheckoutSessionsService");
const LydiaService_1 = require("./services/LydiaService");
const ProductsService_1 = require("./services/ProductsService");
const SettingsService_1 = require("./services/SettingsService");
const StripeService_1 = require("./services/StripeService");
const TransactionsService_1 = require("./services/TransactionsService");
class FiatMintingApi {
constructor(config, HttpRequest = AxiosHttpRequest_1.AxiosHttpRequest) {
import { AxiosHttpRequest } from './core/AxiosHttpRequest';
import { AdminService } from './services/AdminService';
import { CheckoutSessionsService } from './services/CheckoutSessionsService';
import { LydiaService } from './services/LydiaService';
import { ProductsService } from './services/ProductsService';
import { SettingsService } from './services/SettingsService';
import { StripeService } from './services/StripeService';
import { TransactionsService } from './services/TransactionsService';
export class FiatMintingApi {
constructor(config, HttpRequest = AxiosHttpRequest) {
this.request = new HttpRequest({

@@ -25,11 +22,10 @@ BASE: config?.BASE ?? 'https://checkout.cometh.io/v1',

});
this.admin = new AdminService_1.AdminService(this.request);
this.checkoutSessions = new CheckoutSessionsService_1.CheckoutSessionsService(this.request);
this.lydia = new LydiaService_1.LydiaService(this.request);
this.products = new ProductsService_1.ProductsService(this.request);
this.settings = new SettingsService_1.SettingsService(this.request);
this.stripe = new StripeService_1.StripeService(this.request);
this.transactions = new TransactionsService_1.TransactionsService(this.request);
this.admin = new AdminService(this.request);
this.checkoutSessions = new CheckoutSessionsService(this.request);
this.lydia = new LydiaService(this.request);
this.products = new ProductsService(this.request);
this.settings = new SettingsService(this.request);
this.stripe = new StripeService(this.request);
this.transactions = new TransactionsService(this.request);
}
}
exports.FiatMintingApi = FiatMintingApi;

@@ -1,39 +0,19 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.TransactionsService = exports.StripeService = exports.SettingsService = exports.ProductsService = exports.LydiaService = exports.CheckoutSessionsService = exports.AdminService = exports.Transaction = exports.StripeConnectAccountDetails = exports.Product = exports.LydiaSettings = exports.OpenAPI = exports.CancelError = exports.CancelablePromise = exports.BaseHttpRequest = exports.ApiError = exports.FiatMintingApi = void 0;
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
var FiatMintingApi_1 = require("./FiatMintingApi");
Object.defineProperty(exports, "FiatMintingApi", { enumerable: true, get: function () { return FiatMintingApi_1.FiatMintingApi; } });
var ApiError_1 = require("./core/ApiError");
Object.defineProperty(exports, "ApiError", { enumerable: true, get: function () { return ApiError_1.ApiError; } });
var BaseHttpRequest_1 = require("./core/BaseHttpRequest");
Object.defineProperty(exports, "BaseHttpRequest", { enumerable: true, get: function () { return BaseHttpRequest_1.BaseHttpRequest; } });
var CancelablePromise_1 = require("./core/CancelablePromise");
Object.defineProperty(exports, "CancelablePromise", { enumerable: true, get: function () { return CancelablePromise_1.CancelablePromise; } });
Object.defineProperty(exports, "CancelError", { enumerable: true, get: function () { return CancelablePromise_1.CancelError; } });
var OpenAPI_1 = require("./core/OpenAPI");
Object.defineProperty(exports, "OpenAPI", { enumerable: true, get: function () { return OpenAPI_1.OpenAPI; } });
var LydiaSettings_1 = require("./models/LydiaSettings");
Object.defineProperty(exports, "LydiaSettings", { enumerable: true, get: function () { return LydiaSettings_1.LydiaSettings; } });
var Product_1 = require("./models/Product");
Object.defineProperty(exports, "Product", { enumerable: true, get: function () { return Product_1.Product; } });
var StripeConnectAccountDetails_1 = require("./models/StripeConnectAccountDetails");
Object.defineProperty(exports, "StripeConnectAccountDetails", { enumerable: true, get: function () { return StripeConnectAccountDetails_1.StripeConnectAccountDetails; } });
var Transaction_1 = require("./models/Transaction");
Object.defineProperty(exports, "Transaction", { enumerable: true, get: function () { return Transaction_1.Transaction; } });
var AdminService_1 = require("./services/AdminService");
Object.defineProperty(exports, "AdminService", { enumerable: true, get: function () { return AdminService_1.AdminService; } });
var CheckoutSessionsService_1 = require("./services/CheckoutSessionsService");
Object.defineProperty(exports, "CheckoutSessionsService", { enumerable: true, get: function () { return CheckoutSessionsService_1.CheckoutSessionsService; } });
var LydiaService_1 = require("./services/LydiaService");
Object.defineProperty(exports, "LydiaService", { enumerable: true, get: function () { return LydiaService_1.LydiaService; } });
var ProductsService_1 = require("./services/ProductsService");
Object.defineProperty(exports, "ProductsService", { enumerable: true, get: function () { return ProductsService_1.ProductsService; } });
var SettingsService_1 = require("./services/SettingsService");
Object.defineProperty(exports, "SettingsService", { enumerable: true, get: function () { return SettingsService_1.SettingsService; } });
var StripeService_1 = require("./services/StripeService");
Object.defineProperty(exports, "StripeService", { enumerable: true, get: function () { return StripeService_1.StripeService; } });
var TransactionsService_1 = require("./services/TransactionsService");
Object.defineProperty(exports, "TransactionsService", { enumerable: true, get: function () { return TransactionsService_1.TransactionsService; } });
export { FiatMintingApi } from './FiatMintingApi';
export { ApiError } from './core/ApiError';
export { BaseHttpRequest } from './core/BaseHttpRequest';
export { CancelablePromise, CancelError } from './core/CancelablePromise';
export { OpenAPI } from './core/OpenAPI';
export { LydiaSettings } from './models/LydiaSettings';
export { Product } from './models/Product';
export { StripeConnectAccountDetails } from './models/StripeConnectAccountDetails';
export { Transaction } from './models/Transaction';
export { AdminService } from './services/AdminService';
export { CheckoutSessionsService } from './services/CheckoutSessionsService';
export { LydiaService } from './services/LydiaService';
export { ProductsService } from './services/ProductsService';
export { SettingsService } from './services/SettingsService';
export { StripeService } from './services/StripeService';
export { TransactionsService } from './services/TransactionsService';

@@ -1,5 +0,4 @@

"use strict";
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
Object.defineProperty(exports, "__esModule", { value: true });
export {};

@@ -1,5 +0,4 @@

"use strict";
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
Object.defineProperty(exports, "__esModule", { value: true });
export {};

@@ -1,5 +0,4 @@

"use strict";
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
Object.defineProperty(exports, "__esModule", { value: true });
export {};

@@ -1,5 +0,4 @@

"use strict";
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
Object.defineProperty(exports, "__esModule", { value: true });
export {};

@@ -1,5 +0,4 @@

"use strict";
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
Object.defineProperty(exports, "__esModule", { value: true });
export {};

@@ -1,5 +0,4 @@

"use strict";
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
Object.defineProperty(exports, "__esModule", { value: true });
export {};

@@ -1,5 +0,4 @@

"use strict";
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
Object.defineProperty(exports, "__esModule", { value: true });
export {};

@@ -1,5 +0,4 @@

"use strict";
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
Object.defineProperty(exports, "__esModule", { value: true });
export {};

@@ -1,8 +0,5 @@

"use strict";
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
Object.defineProperty(exports, "__esModule", { value: true });
exports.LydiaSettings = void 0;
var LydiaSettings;
export var LydiaSettings;
(function (LydiaSettings) {

@@ -14,2 +11,2 @@ let endpoint;

})(endpoint = LydiaSettings.endpoint || (LydiaSettings.endpoint = {}));
})(LydiaSettings || (exports.LydiaSettings = LydiaSettings = {}));
})(LydiaSettings || (LydiaSettings = {}));

@@ -1,5 +0,4 @@

"use strict";
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
Object.defineProperty(exports, "__esModule", { value: true });
export {};

@@ -1,5 +0,4 @@

"use strict";
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
Object.defineProperty(exports, "__esModule", { value: true });
export {};

@@ -1,5 +0,4 @@

"use strict";
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
Object.defineProperty(exports, "__esModule", { value: true });
export {};

@@ -1,5 +0,4 @@

"use strict";
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
Object.defineProperty(exports, "__esModule", { value: true });
export {};

@@ -1,8 +0,5 @@

"use strict";
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
Object.defineProperty(exports, "__esModule", { value: true });
exports.Product = void 0;
var Product;
export var Product;
(function (Product) {

@@ -17,2 +14,2 @@ /**

})(currency = Product.currency || (Product.currency = {}));
})(Product || (exports.Product = Product = {}));
})(Product || (Product = {}));

@@ -1,5 +0,4 @@

"use strict";
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
Object.defineProperty(exports, "__esModule", { value: true });
export {};

@@ -1,5 +0,4 @@

"use strict";
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
Object.defineProperty(exports, "__esModule", { value: true });
export {};

@@ -1,5 +0,4 @@

"use strict";
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
Object.defineProperty(exports, "__esModule", { value: true });
export {};

@@ -1,5 +0,4 @@

"use strict";
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
Object.defineProperty(exports, "__esModule", { value: true });
export {};

@@ -1,8 +0,5 @@

"use strict";
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
Object.defineProperty(exports, "__esModule", { value: true });
exports.StripeConnectAccountDetails = void 0;
var StripeConnectAccountDetails;
export var StripeConnectAccountDetails;
(function (StripeConnectAccountDetails) {

@@ -24,2 +21,2 @@ let businessType;

})(currency = StripeConnectAccountDetails.currency || (StripeConnectAccountDetails.currency = {}));
})(StripeConnectAccountDetails || (exports.StripeConnectAccountDetails = StripeConnectAccountDetails = {}));
})(StripeConnectAccountDetails || (StripeConnectAccountDetails = {}));

@@ -1,5 +0,4 @@

"use strict";
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
Object.defineProperty(exports, "__esModule", { value: true });
export {};

@@ -1,8 +0,5 @@

"use strict";
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
Object.defineProperty(exports, "__esModule", { value: true });
exports.Transaction = void 0;
var Transaction;
export var Transaction;
(function (Transaction) {

@@ -26,2 +23,2 @@ /**

})(pspType = Transaction.pspType || (Transaction.pspType = {}));
})(Transaction || (exports.Transaction = Transaction = {}));
})(Transaction || (Transaction = {}));

@@ -1,5 +0,4 @@

"use strict";
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
Object.defineProperty(exports, "__esModule", { value: true });
export {};

@@ -1,5 +0,4 @@

"use strict";
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
Object.defineProperty(exports, "__esModule", { value: true });
export {};

@@ -1,5 +0,2 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.AdminService = void 0;
class AdminService {
export class AdminService {
constructor(httpRequest) {

@@ -72,2 +69,1 @@ this.httpRequest = httpRequest;

}
exports.AdminService = AdminService;

@@ -1,5 +0,2 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.CheckoutSessionsService = void 0;
class CheckoutSessionsService {
export class CheckoutSessionsService {
constructor(httpRequest) {

@@ -31,2 +28,1 @@ this.httpRequest = httpRequest;

}
exports.CheckoutSessionsService = CheckoutSessionsService;

@@ -1,5 +0,2 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.LydiaService = void 0;
class LydiaService {
export class LydiaService {
constructor(httpRequest) {

@@ -29,2 +26,1 @@ this.httpRequest = httpRequest;

}
exports.LydiaService = LydiaService;

@@ -1,5 +0,2 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ProductsService = void 0;
class ProductsService {
export class ProductsService {
constructor(httpRequest) {

@@ -101,2 +98,1 @@ this.httpRequest = httpRequest;

}
exports.ProductsService = ProductsService;

@@ -1,5 +0,2 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.SettingsService = void 0;
class SettingsService {
export class SettingsService {
constructor(httpRequest) {

@@ -74,2 +71,1 @@ this.httpRequest = httpRequest;

}
exports.SettingsService = SettingsService;

@@ -1,5 +0,2 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.StripeService = void 0;
class StripeService {
export class StripeService {
constructor(httpRequest) {

@@ -62,2 +59,1 @@ this.httpRequest = httpRequest;

}
exports.StripeService = StripeService;

@@ -1,5 +0,2 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.TransactionsService = void 0;
class TransactionsService {
export class TransactionsService {
constructor(httpRequest) {

@@ -83,2 +80,1 @@ this.httpRequest = httpRequest;

}
exports.TransactionsService = TransactionsService;
{
"name": "@cometh/checkout-sdk",
"version": "1.0.1",
"version": "1.0.2",
"description": "SDK to use Cometh Checkout API",

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc