@fiatconnect/fiatconnect-types
Advanced tools
Comparing version 13.1.3 to 13.2.0
@@ -76,3 +76,4 @@ import { z } from 'zod'; | ||
IBANUserAction = "IBANUserAction", | ||
PSEUserAction = "PSEUserAction" | ||
PSEUserAction = "PSEUserAction", | ||
URLUserAction = "URLUserAction" | ||
} | ||
@@ -113,1 +114,11 @@ export declare const transferInUserActionDetailsSchema: z.ZodNativeEnum<typeof TransferInUserActionDetails>; | ||
}>; | ||
export declare const urlUserActionSchema: z.ZodObject<{ | ||
userActionType: z.ZodLiteral<TransferInUserActionDetails.URLUserAction>; | ||
url: z.ZodString; | ||
}, "strip", z.ZodTypeAny, { | ||
userActionType: TransferInUserActionDetails.URLUserAction; | ||
url: string; | ||
}, { | ||
userActionType: TransferInUserActionDetails.URLUserAction; | ||
url: string; | ||
}>; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.pseUserActionSchema = exports.ibanUserActionSchema = exports.pixUserActionSchema = exports.transferInUserActionDetailsSchema = exports.TransferInUserActionDetails = exports.EMAIL_REGEX = exports.cryptoTypeSchema = exports.CryptoType = exports.fiatTypeSchema = exports.FiatType = exports.networkSchema = exports.Network = exports.fiatConnectErrorSchema = exports.FiatConnectError = void 0; | ||
exports.urlUserActionSchema = exports.pseUserActionSchema = exports.ibanUserActionSchema = exports.pixUserActionSchema = exports.transferInUserActionDetailsSchema = exports.TransferInUserActionDetails = exports.EMAIL_REGEX = exports.cryptoTypeSchema = exports.CryptoType = exports.fiatTypeSchema = exports.FiatType = exports.networkSchema = exports.Network = exports.fiatConnectErrorSchema = exports.FiatConnectError = void 0; | ||
const zod_1 = require("zod"); | ||
@@ -104,2 +104,3 @@ // Errors returned by FiatConnect endpoints | ||
TransferInUserActionDetails["PSEUserAction"] = "PSEUserAction"; | ||
TransferInUserActionDetails["URLUserAction"] = "URLUserAction"; | ||
})(TransferInUserActionDetails || (exports.TransferInUserActionDetails = TransferInUserActionDetails = {})); | ||
@@ -118,2 +119,3 @@ exports.transferInUserActionDetailsSchema = zod_1.z.nativeEnum(TransferInUserActionDetails, { | ||
}, { description: 'ibanUserActionSchema' }); | ||
// @deprecated - use URLUserAction instead | ||
exports.pseUserActionSchema = zod_1.z.object({ | ||
@@ -123,2 +125,6 @@ userActionType: zod_1.z.literal(TransferInUserActionDetails.PSEUserAction), | ||
}, { description: 'pseUserActionSchema' }); | ||
exports.urlUserActionSchema = zod_1.z.object({ | ||
userActionType: zod_1.z.literal(TransferInUserActionDetails.URLUserAction), | ||
url: zod_1.z.string(), | ||
}, { description: 'urlUserActionSchema' }); | ||
//# sourceMappingURL=common.js.map |
@@ -82,2 +82,11 @@ import { z } from 'zod'; | ||
url: string; | ||
}>, z.ZodObject<{ | ||
userActionType: z.ZodLiteral<import("./common").TransferInUserActionDetails.URLUserAction>; | ||
url: z.ZodString; | ||
}, "strip", z.ZodTypeAny, { | ||
userActionType: import("./common").TransferInUserActionDetails.URLUserAction; | ||
url: string; | ||
}, { | ||
userActionType: import("./common").TransferInUserActionDetails.URLUserAction; | ||
url: string; | ||
}>]>>; | ||
@@ -98,2 +107,5 @@ }, "strip", z.ZodTypeAny, { | ||
url: string; | ||
} | { | ||
userActionType: import("./common").TransferInUserActionDetails.URLUserAction; | ||
url: string; | ||
} | undefined; | ||
@@ -114,2 +126,5 @@ }, { | ||
url: string; | ||
} | { | ||
userActionType: import("./common").TransferInUserActionDetails.URLUserAction; | ||
url: string; | ||
} | undefined; | ||
@@ -152,2 +167,11 @@ }>; | ||
url: string; | ||
}>, z.ZodObject<{ | ||
userActionType: z.ZodLiteral<import("./common").TransferInUserActionDetails.URLUserAction>; | ||
url: z.ZodString; | ||
}, "strip", z.ZodTypeAny, { | ||
userActionType: import("./common").TransferInUserActionDetails.URLUserAction; | ||
url: string; | ||
}, { | ||
userActionType: import("./common").TransferInUserActionDetails.URLUserAction; | ||
url: string; | ||
}>]>>; | ||
@@ -168,2 +192,5 @@ }, "strip", z.ZodTypeAny, { | ||
url: string; | ||
} | { | ||
userActionType: import("./common").TransferInUserActionDetails.URLUserAction; | ||
url: string; | ||
} | undefined; | ||
@@ -184,2 +211,5 @@ }, { | ||
url: string; | ||
} | { | ||
userActionType: import("./common").TransferInUserActionDetails.URLUserAction; | ||
url: string; | ||
} | undefined; | ||
@@ -249,2 +279,11 @@ }>, z.ZodObject<{ | ||
url: string; | ||
}>, z.ZodObject<{ | ||
userActionType: z.ZodLiteral<import("./common").TransferInUserActionDetails.URLUserAction>; | ||
url: z.ZodString; | ||
}, "strip", z.ZodTypeAny, { | ||
userActionType: import("./common").TransferInUserActionDetails.URLUserAction; | ||
url: string; | ||
}, { | ||
userActionType: import("./common").TransferInUserActionDetails.URLUserAction; | ||
url: string; | ||
}>]>>; | ||
@@ -272,2 +311,5 @@ }, "strip", z.ZodTypeAny, { | ||
url: string; | ||
} | { | ||
userActionType: import("./common").TransferInUserActionDetails.URLUserAction; | ||
url: string; | ||
} | undefined; | ||
@@ -295,2 +337,5 @@ }, { | ||
url: string; | ||
} | { | ||
userActionType: import("./common").TransferInUserActionDetails.URLUserAction; | ||
url: string; | ||
} | undefined; | ||
@@ -331,2 +376,11 @@ }>, z.ZodObject<{ | ||
url: string; | ||
}>, z.ZodObject<{ | ||
userActionType: z.ZodLiteral<import("./common").TransferInUserActionDetails.URLUserAction>; | ||
url: z.ZodString; | ||
}, "strip", z.ZodTypeAny, { | ||
userActionType: import("./common").TransferInUserActionDetails.URLUserAction; | ||
url: string; | ||
}, { | ||
userActionType: import("./common").TransferInUserActionDetails.URLUserAction; | ||
url: string; | ||
}>]>>; | ||
@@ -362,2 +416,5 @@ transferType: z.ZodLiteral<TransferType.TransferIn>; | ||
url: string; | ||
} | { | ||
userActionType: import("./common").TransferInUserActionDetails.URLUserAction; | ||
url: string; | ||
} | undefined; | ||
@@ -386,2 +443,5 @@ fee?: string | undefined; | ||
url: string; | ||
} | { | ||
userActionType: import("./common").TransferInUserActionDetails.URLUserAction; | ||
url: string; | ||
} | undefined; | ||
@@ -424,2 +484,11 @@ fee?: string | undefined; | ||
url: string; | ||
}>, z.ZodObject<{ | ||
userActionType: z.ZodLiteral<import("./common").TransferInUserActionDetails.URLUserAction>; | ||
url: z.ZodString; | ||
}, "strip", z.ZodTypeAny, { | ||
userActionType: import("./common").TransferInUserActionDetails.URLUserAction; | ||
url: string; | ||
}, { | ||
userActionType: import("./common").TransferInUserActionDetails.URLUserAction; | ||
url: string; | ||
}>]>>; | ||
@@ -453,2 +522,5 @@ fiatType: z.ZodNativeEnum<typeof import("./common").FiatType>; | ||
url: string; | ||
} | { | ||
userActionType: import("./common").TransferInUserActionDetails.URLUserAction; | ||
url: string; | ||
} | undefined; | ||
@@ -476,2 +548,5 @@ fee?: string | undefined; | ||
url: string; | ||
} | { | ||
userActionType: import("./common").TransferInUserActionDetails.URLUserAction; | ||
url: string; | ||
} | undefined; | ||
@@ -521,2 +596,11 @@ fee?: string | undefined; | ||
url: string; | ||
}>, z.ZodObject<{ | ||
userActionType: z.ZodLiteral<import("./common").TransferInUserActionDetails.URLUserAction>; | ||
url: z.ZodString; | ||
}, "strip", z.ZodTypeAny, { | ||
userActionType: import("./common").TransferInUserActionDetails.URLUserAction; | ||
url: string; | ||
}, { | ||
userActionType: import("./common").TransferInUserActionDetails.URLUserAction; | ||
url: string; | ||
}>]>>; | ||
@@ -544,2 +628,5 @@ }, "strip", z.ZodTypeAny, { | ||
url: string; | ||
} | { | ||
userActionType: import("./common").TransferInUserActionDetails.URLUserAction; | ||
url: string; | ||
} | undefined; | ||
@@ -567,2 +654,5 @@ }, { | ||
url: string; | ||
} | { | ||
userActionType: import("./common").TransferInUserActionDetails.URLUserAction; | ||
url: string; | ||
} | undefined; | ||
@@ -603,2 +693,11 @@ }>, z.ZodObject<{ | ||
url: string; | ||
}>, z.ZodObject<{ | ||
userActionType: z.ZodLiteral<import("./common").TransferInUserActionDetails.URLUserAction>; | ||
url: z.ZodString; | ||
}, "strip", z.ZodTypeAny, { | ||
userActionType: import("./common").TransferInUserActionDetails.URLUserAction; | ||
url: string; | ||
}, { | ||
userActionType: import("./common").TransferInUserActionDetails.URLUserAction; | ||
url: string; | ||
}>]>>; | ||
@@ -634,2 +733,5 @@ transferType: z.ZodLiteral<TransferType.TransferIn>; | ||
url: string; | ||
} | { | ||
userActionType: import("./common").TransferInUserActionDetails.URLUserAction; | ||
url: string; | ||
} | undefined; | ||
@@ -658,2 +760,5 @@ fee?: string | undefined; | ||
url: string; | ||
} | { | ||
userActionType: import("./common").TransferInUserActionDetails.URLUserAction; | ||
url: string; | ||
} | undefined; | ||
@@ -695,2 +800,11 @@ fee?: string | undefined; | ||
url: string; | ||
}>, z.ZodObject<{ | ||
userActionType: z.ZodLiteral<import("./common").TransferInUserActionDetails.URLUserAction>; | ||
url: z.ZodString; | ||
}, "strip", z.ZodTypeAny, { | ||
userActionType: import("./common").TransferInUserActionDetails.URLUserAction; | ||
url: string; | ||
}, { | ||
userActionType: import("./common").TransferInUserActionDetails.URLUserAction; | ||
url: string; | ||
}>]>>; | ||
@@ -724,2 +838,5 @@ fiatType: z.ZodNativeEnum<typeof import("./common").FiatType>; | ||
url: string; | ||
} | { | ||
userActionType: import("./common").TransferInUserActionDetails.URLUserAction; | ||
url: string; | ||
} | undefined; | ||
@@ -747,2 +864,5 @@ fee?: string | undefined; | ||
url: string; | ||
} | { | ||
userActionType: import("./common").TransferInUserActionDetails.URLUserAction; | ||
url: string; | ||
} | undefined; | ||
@@ -749,0 +869,0 @@ fee?: string | undefined; |
@@ -64,2 +64,3 @@ "use strict"; | ||
common_1.pseUserActionSchema, | ||
common_1.urlUserActionSchema, | ||
]); | ||
@@ -66,0 +67,0 @@ /* |
@@ -66,2 +66,11 @@ import { z } from 'zod'; | ||
url: string; | ||
}>, z.ZodObject<{ | ||
userActionType: z.ZodLiteral<import("./common").TransferInUserActionDetails.URLUserAction>; | ||
url: z.ZodString; | ||
}, "strip", z.ZodTypeAny, { | ||
userActionType: import("./common").TransferInUserActionDetails.URLUserAction; | ||
url: string; | ||
}, { | ||
userActionType: import("./common").TransferInUserActionDetails.URLUserAction; | ||
url: string; | ||
}>]>>; | ||
@@ -89,2 +98,5 @@ }, "strip", z.ZodTypeAny, { | ||
url: string; | ||
} | { | ||
userActionType: import("./common").TransferInUserActionDetails.URLUserAction; | ||
url: string; | ||
} | undefined; | ||
@@ -112,2 +124,5 @@ }, { | ||
url: string; | ||
} | { | ||
userActionType: import("./common").TransferInUserActionDetails.URLUserAction; | ||
url: string; | ||
} | undefined; | ||
@@ -148,2 +163,11 @@ }>, z.ZodObject<{ | ||
url: string; | ||
}>, z.ZodObject<{ | ||
userActionType: z.ZodLiteral<import("./common").TransferInUserActionDetails.URLUserAction>; | ||
url: z.ZodString; | ||
}, "strip", z.ZodTypeAny, { | ||
userActionType: import("./common").TransferInUserActionDetails.URLUserAction; | ||
url: string; | ||
}, { | ||
userActionType: import("./common").TransferInUserActionDetails.URLUserAction; | ||
url: string; | ||
}>]>>; | ||
@@ -179,2 +203,5 @@ transferType: z.ZodLiteral<import("./transfer").TransferType.TransferIn>; | ||
url: string; | ||
} | { | ||
userActionType: import("./common").TransferInUserActionDetails.URLUserAction; | ||
url: string; | ||
} | undefined; | ||
@@ -203,2 +230,5 @@ fee?: string | undefined; | ||
url: string; | ||
} | { | ||
userActionType: import("./common").TransferInUserActionDetails.URLUserAction; | ||
url: string; | ||
} | undefined; | ||
@@ -230,2 +260,5 @@ fee?: string | undefined; | ||
url: string; | ||
} | { | ||
userActionType: import("./common").TransferInUserActionDetails.URLUserAction; | ||
url: string; | ||
} | undefined; | ||
@@ -253,2 +286,5 @@ } | { | ||
url: string; | ||
} | { | ||
userActionType: import("./common").TransferInUserActionDetails.URLUserAction; | ||
url: string; | ||
} | undefined; | ||
@@ -280,2 +316,5 @@ fee?: string | undefined; | ||
url: string; | ||
} | { | ||
userActionType: import("./common").TransferInUserActionDetails.URLUserAction; | ||
url: string; | ||
} | undefined; | ||
@@ -303,2 +342,5 @@ } | { | ||
url: string; | ||
} | { | ||
userActionType: import("./common").TransferInUserActionDetails.URLUserAction; | ||
url: string; | ||
} | undefined; | ||
@@ -360,2 +402,11 @@ fee?: string | undefined; | ||
url: string; | ||
}>, z.ZodObject<{ | ||
userActionType: z.ZodLiteral<import("./common").TransferInUserActionDetails.URLUserAction>; | ||
url: z.ZodString; | ||
}, "strip", z.ZodTypeAny, { | ||
userActionType: import("./common").TransferInUserActionDetails.URLUserAction; | ||
url: string; | ||
}, { | ||
userActionType: import("./common").TransferInUserActionDetails.URLUserAction; | ||
url: string; | ||
}>]>>; | ||
@@ -389,2 +440,5 @@ fiatType: z.ZodNativeEnum<typeof import("./common").FiatType>; | ||
url: string; | ||
} | { | ||
userActionType: import("./common").TransferInUserActionDetails.URLUserAction; | ||
url: string; | ||
} | undefined; | ||
@@ -412,2 +466,5 @@ fee?: string | undefined; | ||
url: string; | ||
} | { | ||
userActionType: import("./common").TransferInUserActionDetails.URLUserAction; | ||
url: string; | ||
} | undefined; | ||
@@ -438,2 +495,5 @@ fee?: string | undefined; | ||
url: string; | ||
} | { | ||
userActionType: import("./common").TransferInUserActionDetails.URLUserAction; | ||
url: string; | ||
} | undefined; | ||
@@ -464,2 +524,5 @@ fee?: string | undefined; | ||
url: string; | ||
} | { | ||
userActionType: import("./common").TransferInUserActionDetails.URLUserAction; | ||
url: string; | ||
} | undefined; | ||
@@ -569,2 +632,11 @@ fee?: string | undefined; | ||
url: string; | ||
}>, z.ZodObject<{ | ||
userActionType: z.ZodLiteral<import("./common").TransferInUserActionDetails.URLUserAction>; | ||
url: z.ZodString; | ||
}, "strip", z.ZodTypeAny, { | ||
userActionType: import("./common").TransferInUserActionDetails.URLUserAction; | ||
url: string; | ||
}, { | ||
userActionType: import("./common").TransferInUserActionDetails.URLUserAction; | ||
url: string; | ||
}>]>>; | ||
@@ -592,2 +664,5 @@ }, "strip", z.ZodTypeAny, { | ||
url: string; | ||
} | { | ||
userActionType: import("./common").TransferInUserActionDetails.URLUserAction; | ||
url: string; | ||
} | undefined; | ||
@@ -615,2 +690,5 @@ }, { | ||
url: string; | ||
} | { | ||
userActionType: import("./common").TransferInUserActionDetails.URLUserAction; | ||
url: string; | ||
} | undefined; | ||
@@ -651,2 +729,11 @@ }>, z.ZodObject<{ | ||
url: string; | ||
}>, z.ZodObject<{ | ||
userActionType: z.ZodLiteral<import("./common").TransferInUserActionDetails.URLUserAction>; | ||
url: z.ZodString; | ||
}, "strip", z.ZodTypeAny, { | ||
userActionType: import("./common").TransferInUserActionDetails.URLUserAction; | ||
url: string; | ||
}, { | ||
userActionType: import("./common").TransferInUserActionDetails.URLUserAction; | ||
url: string; | ||
}>]>>; | ||
@@ -682,2 +769,5 @@ transferType: z.ZodLiteral<import("./transfer").TransferType.TransferIn>; | ||
url: string; | ||
} | { | ||
userActionType: import("./common").TransferInUserActionDetails.URLUserAction; | ||
url: string; | ||
} | undefined; | ||
@@ -706,2 +796,5 @@ fee?: string | undefined; | ||
url: string; | ||
} | { | ||
userActionType: import("./common").TransferInUserActionDetails.URLUserAction; | ||
url: string; | ||
} | undefined; | ||
@@ -733,2 +826,5 @@ fee?: string | undefined; | ||
url: string; | ||
} | { | ||
userActionType: import("./common").TransferInUserActionDetails.URLUserAction; | ||
url: string; | ||
} | undefined; | ||
@@ -756,2 +852,5 @@ } | { | ||
url: string; | ||
} | { | ||
userActionType: import("./common").TransferInUserActionDetails.URLUserAction; | ||
url: string; | ||
} | undefined; | ||
@@ -783,2 +882,5 @@ fee?: string | undefined; | ||
url: string; | ||
} | { | ||
userActionType: import("./common").TransferInUserActionDetails.URLUserAction; | ||
url: string; | ||
} | undefined; | ||
@@ -806,2 +908,5 @@ } | { | ||
url: string; | ||
} | { | ||
userActionType: import("./common").TransferInUserActionDetails.URLUserAction; | ||
url: string; | ||
} | undefined; | ||
@@ -861,2 +966,11 @@ fee?: string | undefined; | ||
url: string; | ||
}>, z.ZodObject<{ | ||
userActionType: z.ZodLiteral<import("./common").TransferInUserActionDetails.URLUserAction>; | ||
url: z.ZodString; | ||
}, "strip", z.ZodTypeAny, { | ||
userActionType: import("./common").TransferInUserActionDetails.URLUserAction; | ||
url: string; | ||
}, { | ||
userActionType: import("./common").TransferInUserActionDetails.URLUserAction; | ||
url: string; | ||
}>]>>; | ||
@@ -890,2 +1004,5 @@ fiatType: z.ZodNativeEnum<typeof import("./common").FiatType>; | ||
url: string; | ||
} | { | ||
userActionType: import("./common").TransferInUserActionDetails.URLUserAction; | ||
url: string; | ||
} | undefined; | ||
@@ -913,2 +1030,5 @@ fee?: string | undefined; | ||
url: string; | ||
} | { | ||
userActionType: import("./common").TransferInUserActionDetails.URLUserAction; | ||
url: string; | ||
} | undefined; | ||
@@ -939,2 +1059,5 @@ fee?: string | undefined; | ||
url: string; | ||
} | { | ||
userActionType: import("./common").TransferInUserActionDetails.URLUserAction; | ||
url: string; | ||
} | undefined; | ||
@@ -965,2 +1088,5 @@ fee?: string | undefined; | ||
url: string; | ||
} | { | ||
userActionType: import("./common").TransferInUserActionDetails.URLUserAction; | ||
url: string; | ||
} | undefined; | ||
@@ -967,0 +1093,0 @@ fee?: string | undefined; |
{ | ||
"name": "@fiatconnect/fiatconnect-types", | ||
"version": "13.1.3", | ||
"version": "13.2.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.", | ||
@@ -30,3 +30,3 @@ "scripts": { | ||
"devDependencies": { | ||
"@typescript-eslint/eslint-plugin": "^6.4.0", | ||
"@typescript-eslint/eslint-plugin": "^6.4.1", | ||
"@valora/eslint-config-typescript": "^1.0.2", | ||
@@ -36,3 +36,3 @@ "@valora/prettier-config": "^0.0.1", | ||
"eslint": "^8.47.0", | ||
"eslint-plugin-import": "^2.28.0", | ||
"eslint-plugin-import": "^2.28.1", | ||
"eslint-plugin-jest": "^27.2.3", | ||
@@ -42,3 +42,3 @@ "eslint-plugin-react": "^7.33.2", | ||
"eslint-plugin-react-native": "^4.0.0", | ||
"jest": "^29.6.2", | ||
"jest": "^29.6.4", | ||
"prettier": "^3.0.2", | ||
@@ -45,0 +45,0 @@ "semantic-release": "^19.0.5", |
@@ -29,2 +29,3 @@ import { z } from 'zod' | ||
} | ||
export const fiatConnectErrorSchema = z.nativeEnum(FiatConnectError, { | ||
@@ -38,2 +39,3 @@ description: 'fiatConnectErrorSchema', | ||
} | ||
export const networkSchema = z.nativeEnum(Network, { | ||
@@ -83,2 +85,3 @@ description: 'networkSchema', | ||
} | ||
export const fiatTypeSchema = z.nativeEnum(FiatType, { | ||
@@ -94,2 +97,3 @@ description: 'fiatTypeSchema', | ||
} | ||
export const cryptoTypeSchema = z.nativeEnum(CryptoType, { | ||
@@ -106,3 +110,5 @@ description: 'cryptoTypeSchema', | ||
PSEUserAction = 'PSEUserAction', | ||
URLUserAction = 'URLUserAction', | ||
} | ||
export const transferInUserActionDetailsSchema = z.nativeEnum( | ||
@@ -130,2 +136,4 @@ TransferInUserActionDetails, | ||
) | ||
// @deprecated - use URLUserAction instead | ||
export const pseUserActionSchema = z.object( | ||
@@ -138,1 +146,9 @@ { | ||
) | ||
export const urlUserActionSchema = z.object( | ||
{ | ||
userActionType: z.literal(TransferInUserActionDetails.URLUserAction), | ||
url: z.string(), | ||
}, | ||
{ description: 'urlUserActionSchema' }, | ||
) |
@@ -8,2 +8,3 @@ import { z } from 'zod' | ||
pseUserActionSchema, | ||
urlUserActionSchema, | ||
} from './common' | ||
@@ -84,2 +85,3 @@ import { fiatAccountIdSchema } from './fiat-account' | ||
pseUserActionSchema, | ||
urlUserActionSchema, | ||
]) | ||
@@ -86,0 +88,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
257266
5725