Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@fiatconnect/fiatconnect-types

Package Overview
Dependencies
Maintainers
6
Versions
59
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fiatconnect/fiatconnect-types - npm Package Compare versions

Comparing version 9.1.0 to 10.0.0

161

dist/quote.d.ts

@@ -20,2 +20,3 @@ import { z } from 'zod';

region: z.ZodOptional<z.ZodString>;
preview: z.ZodOptional<z.ZodBoolean>;
}, "strip", z.ZodTypeAny, {

@@ -25,2 +26,3 @@ fiatAmount?: string | undefined;

region?: string | undefined;
preview?: boolean | undefined;
country: string;

@@ -34,2 +36,3 @@ address: string;

region?: string | undefined;
preview?: boolean | undefined;
country: string;

@@ -113,3 +116,3 @@ address: string;

export declare const quoteResponseSchema: z.ZodObject<{
quote: z.ZodObject<{
quote: z.ZodIntersection<z.ZodObject<{
fiatType: z.ZodNativeEnum<typeof import("./common").FiatType>;

@@ -120,3 +123,2 @@ cryptoType: z.ZodNativeEnum<typeof import("./common").CryptoType>;

guaranteedUntil: z.ZodString;
quoteId: z.ZodString;
transferType: z.ZodNativeEnum<typeof import("./transfer").TransferType>;

@@ -130,3 +132,2 @@ fee: z.ZodOptional<z.ZodString>;

feeFrequency?: FeeFrequency | undefined;
quoteId: string;
transferType: import("./transfer").TransferType;

@@ -142,3 +143,73 @@ fiatType: import("./common").FiatType;

feeFrequency?: FeeFrequency | undefined;
transferType: import("./transfer").TransferType;
fiatType: import("./common").FiatType;
cryptoType: import("./common").CryptoType;
fiatAmount: string;
cryptoAmount: string;
guaranteedUntil: string;
}>, z.ZodObject<{
quoteId: z.ZodString;
}, "strip", z.ZodTypeAny, {
quoteId: string;
}, {
quoteId: string;
}>>;
kyc: z.ZodObject<{
kycRequired: z.ZodBoolean;
kycSchemas: z.ZodArray<z.ZodObject<{
kycSchema: z.ZodNativeEnum<typeof import("./kyc").KycSchema>;
allowedValues: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString, "many">>;
}, "strip", z.ZodTypeAny, {
kycSchema: import("./kyc").KycSchema.PersonalDataAndDocuments;
allowedValues: Record<string, string[]>;
}, {
kycSchema: import("./kyc").KycSchema.PersonalDataAndDocuments;
allowedValues: Record<string, string[]>;
}>, "many">;
}, "strip", z.ZodTypeAny, {
kycRequired: boolean;
kycSchemas: {
kycSchema: import("./kyc").KycSchema.PersonalDataAndDocuments;
allowedValues: Record<string, string[]>;
}[];
}, {
kycRequired: boolean;
kycSchemas: {
kycSchema: import("./kyc").KycSchema.PersonalDataAndDocuments;
allowedValues: Record<string, string[]>;
}[];
}>;
fiatAccount: z.ZodRecord<z.ZodNativeEnum<typeof import("./fiat-account").FiatAccountType>, z.ZodObject<{
fiatAccountSchemas: z.ZodArray<z.ZodObject<{
fiatAccountSchema: z.ZodNativeEnum<typeof import("./fiat-account").FiatAccountSchema>;
allowedValues: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString, "many">>;
}, "strip", z.ZodTypeAny, {
fiatAccountSchema: import("./fiat-account").FiatAccountSchema;
allowedValues: Record<string, string[]>;
}, {
fiatAccountSchema: import("./fiat-account").FiatAccountSchema;
allowedValues: Record<string, string[]>;
}>, "many">;
settlementTimeLowerBound: z.ZodOptional<z.ZodString>;
settlementTimeUpperBound: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
settlementTimeLowerBound?: string | undefined;
settlementTimeUpperBound?: string | undefined;
fiatAccountSchemas: {
fiatAccountSchema: import("./fiat-account").FiatAccountSchema;
allowedValues: Record<string, string[]>;
}[];
}, {
settlementTimeLowerBound?: string | undefined;
settlementTimeUpperBound?: string | undefined;
fiatAccountSchemas: {
fiatAccountSchema: import("./fiat-account").FiatAccountSchema;
allowedValues: Record<string, string[]>;
}[];
}>>;
}, "strip", z.ZodTypeAny, {
quote: {
fee?: string | undefined;
feeType?: FeeType | undefined;
feeFrequency?: FeeFrequency | undefined;
transferType: import("./transfer").TransferType;

@@ -150,2 +221,82 @@ fiatType: import("./common").FiatType;

guaranteedUntil: string;
} & {
quoteId: string;
};
kyc: {
kycRequired: boolean;
kycSchemas: {
kycSchema: import("./kyc").KycSchema.PersonalDataAndDocuments;
allowedValues: Record<string, string[]>;
}[];
};
fiatAccount: Partial<Record<import("./fiat-account").FiatAccountType, {
settlementTimeLowerBound?: string | undefined;
settlementTimeUpperBound?: string | undefined;
fiatAccountSchemas: {
fiatAccountSchema: import("./fiat-account").FiatAccountSchema;
allowedValues: Record<string, string[]>;
}[];
}>>;
}, {
quote: {
fee?: string | undefined;
feeType?: FeeType | undefined;
feeFrequency?: FeeFrequency | undefined;
transferType: import("./transfer").TransferType;
fiatType: import("./common").FiatType;
cryptoType: import("./common").CryptoType;
fiatAmount: string;
cryptoAmount: string;
guaranteedUntil: string;
} & {
quoteId: string;
};
kyc: {
kycRequired: boolean;
kycSchemas: {
kycSchema: import("./kyc").KycSchema.PersonalDataAndDocuments;
allowedValues: Record<string, string[]>;
}[];
};
fiatAccount: Partial<Record<import("./fiat-account").FiatAccountType, {
settlementTimeLowerBound?: string | undefined;
settlementTimeUpperBound?: string | undefined;
fiatAccountSchemas: {
fiatAccountSchema: import("./fiat-account").FiatAccountSchema;
allowedValues: Record<string, string[]>;
}[];
}>>;
}>;
export declare type QuoteResponse = z.infer<typeof quoteResponseSchema>;
export declare const quotePreviewResponseSchema: z.ZodObject<{
quote: z.ZodObject<{
fiatType: z.ZodNativeEnum<typeof import("./common").FiatType>;
cryptoType: z.ZodNativeEnum<typeof import("./common").CryptoType>;
fiatAmount: z.ZodString;
cryptoAmount: z.ZodString;
guaranteedUntil: z.ZodString;
transferType: z.ZodNativeEnum<typeof import("./transfer").TransferType>;
fee: z.ZodOptional<z.ZodString>;
feeType: z.ZodOptional<z.ZodNativeEnum<typeof FeeType>>;
feeFrequency: z.ZodOptional<z.ZodNativeEnum<typeof FeeFrequency>>;
}, "strip", z.ZodTypeAny, {
fee?: string | undefined;
feeType?: FeeType | undefined;
feeFrequency?: FeeFrequency | undefined;
transferType: import("./transfer").TransferType;
fiatType: import("./common").FiatType;
cryptoType: import("./common").CryptoType;
fiatAmount: string;
cryptoAmount: string;
guaranteedUntil: string;
}, {
fee?: string | undefined;
feeType?: FeeType | undefined;
feeFrequency?: FeeFrequency | undefined;
transferType: import("./transfer").TransferType;
fiatType: import("./common").FiatType;
cryptoType: import("./common").CryptoType;
fiatAmount: string;
cryptoAmount: string;
guaranteedUntil: string;
}>;

@@ -210,3 +361,2 @@ kyc: z.ZodObject<{

feeFrequency?: FeeFrequency | undefined;
quoteId: string;
transferType: import("./transfer").TransferType;

@@ -239,3 +389,2 @@ fiatType: import("./common").FiatType;

feeFrequency?: FeeFrequency | undefined;
quoteId: string;
transferType: import("./transfer").TransferType;

@@ -264,2 +413,2 @@ fiatType: import("./common").FiatType;

}>;
export declare type QuoteResponse = z.infer<typeof quoteResponseSchema>;
export declare type QuotePreviewResponse = z.infer<typeof quotePreviewResponseSchema>;

44

dist/quote.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.quoteResponseSchema = exports.fiatAccountTypeQuoteDataSchema = exports.quoteResponseFiatAccountSchemaSchema = exports.quoteResponseKycSchemaSchema = exports.quoteErrorResponseSchema = exports.quoteRequestBodySchema = exports.feeFrequencySchema = exports.FeeFrequency = exports.feeTypeSchema = exports.FeeType = void 0;
exports.quotePreviewResponseSchema = exports.quoteResponseSchema = exports.fiatAccountTypeQuoteDataSchema = exports.quoteResponseFiatAccountSchemaSchema = exports.quoteResponseKycSchemaSchema = exports.quoteErrorResponseSchema = exports.quoteRequestBodySchema = exports.feeFrequencySchema = exports.FeeFrequency = exports.feeTypeSchema = exports.FeeType = void 0;
const zod_1 = require("zod");

@@ -36,2 +36,3 @@ const common_1 = require("./common");

region: zod_1.z.string().optional(),
preview: zod_1.z.boolean().optional(),
}, { description: 'quoteRequestBodySchema' });

@@ -61,21 +62,28 @@ exports.quoteErrorResponseSchema = zod_1.z.object({

}, { description: 'fiatAccountTypeQuoteDataSchema' });
const _quoteResponseQuoteObject = zod_1.z.object({
fiatType: common_1.fiatTypeSchema,
cryptoType: common_1.cryptoTypeSchema,
fiatAmount: zod_1.z.string(),
cryptoAmount: zod_1.z.string(),
guaranteedUntil: zod_1.z.string(),
transferType: transfer_1.transferTypeSchema,
fee: zod_1.z.string().optional(),
feeType: exports.feeTypeSchema.optional(),
feeFrequency: exports.feeFrequencySchema.optional(),
});
const _quoteResponseKycObject = zod_1.z.object({
kycRequired: zod_1.z.boolean(),
kycSchemas: zod_1.z.array(exports.quoteResponseKycSchemaSchema),
});
const _quoteResponseFiatAccountObject = zod_1.z.record(fiat_account_1.fiatAccountTypeSchema, exports.fiatAccountTypeQuoteDataSchema);
exports.quoteResponseSchema = zod_1.z.object({
quote: zod_1.z.object({
fiatType: common_1.fiatTypeSchema,
cryptoType: common_1.cryptoTypeSchema,
fiatAmount: zod_1.z.string(),
cryptoAmount: zod_1.z.string(),
guaranteedUntil: zod_1.z.string(),
quoteId: zod_1.z.string(),
transferType: transfer_1.transferTypeSchema,
fee: zod_1.z.string().optional(),
feeType: exports.feeTypeSchema.optional(),
feeFrequency: exports.feeFrequencySchema.optional(),
}),
kyc: zod_1.z.object({
kycRequired: zod_1.z.boolean(),
kycSchemas: zod_1.z.array(exports.quoteResponseKycSchemaSchema),
}),
fiatAccount: zod_1.z.record(fiat_account_1.fiatAccountTypeSchema, exports.fiatAccountTypeQuoteDataSchema),
quote: _quoteResponseQuoteObject.and(zod_1.z.object({ quoteId: zod_1.z.string() })),
kyc: _quoteResponseKycObject,
fiatAccount: _quoteResponseFiatAccountObject,
}, { description: 'quoteResponseSchema' });
exports.quotePreviewResponseSchema = zod_1.z.object({
quote: _quoteResponseQuoteObject,
kyc: _quoteResponseKycObject,
fiatAccount: _quoteResponseFiatAccountObject,
}, { description: 'quotePreviewResponseSchema' });
//# sourceMappingURL=quote.js.map
{
"name": "@fiatconnect/fiatconnect-types",
"version": "9.1.0",
"version": "10.0.0",
"description": "Types used in the FiatConnect specification. Offered as standalone module for payment providers and wallets to both use for FiatConnect APIs and integrations.",

@@ -5,0 +5,0 @@ "scripts": {

@@ -40,2 +40,3 @@ import { z } from 'zod'

region: z.string().optional(),
preview: z.boolean().optional(),
},

@@ -95,24 +96,29 @@ { description: 'quoteRequestBodySchema' },

const _quoteResponseQuoteObject = z.object({
fiatType: fiatTypeSchema,
cryptoType: cryptoTypeSchema,
fiatAmount: z.string(),
cryptoAmount: z.string(),
guaranteedUntil: z.string(),
transferType: transferTypeSchema,
fee: z.string().optional(),
feeType: feeTypeSchema.optional(),
feeFrequency: feeFrequencySchema.optional(),
})
const _quoteResponseKycObject = z.object({
kycRequired: z.boolean(),
kycSchemas: z.array(quoteResponseKycSchemaSchema),
})
const _quoteResponseFiatAccountObject = z.record(
fiatAccountTypeSchema,
fiatAccountTypeQuoteDataSchema,
)
export const quoteResponseSchema = z.object(
{
quote: z.object({
fiatType: fiatTypeSchema,
cryptoType: cryptoTypeSchema,
fiatAmount: z.string(),
cryptoAmount: z.string(),
guaranteedUntil: z.string(),
quoteId: z.string(),
transferType: transferTypeSchema,
fee: z.string().optional(),
feeType: feeTypeSchema.optional(),
feeFrequency: feeFrequencySchema.optional(),
}),
kyc: z.object({
kycRequired: z.boolean(),
kycSchemas: z.array(quoteResponseKycSchemaSchema),
}),
fiatAccount: z.record(
fiatAccountTypeSchema,
fiatAccountTypeQuoteDataSchema,
),
quote: _quoteResponseQuoteObject.and(z.object({ quoteId: z.string() })),
kyc: _quoteResponseKycObject,
fiatAccount: _quoteResponseFiatAccountObject,
},

@@ -122,1 +128,11 @@ { description: 'quoteResponseSchema' },

export type QuoteResponse = z.infer<typeof quoteResponseSchema>
export const quotePreviewResponseSchema = z.object(
{
quote: _quoteResponseQuoteObject,
kyc: _quoteResponseKycObject,
fiatAccount: _quoteResponseFiatAccountObject,
},
{ description: 'quotePreviewResponseSchema' },
)
export type QuotePreviewResponse = z.infer<typeof quotePreviewResponseSchema>

Sorry, the diff of this file is not supported yet

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