From 549d28bdc80b1a3f9788d3c71f1b86ad9a2f9920 Mon Sep 17 00:00:00 2001 From: fern-api <115122769+fern-api[bot]@users.noreply.github.com> Date: Thu, 11 Jan 2024 10:58:00 +0000 Subject: [PATCH] Release 1.3.3 --- package.json | 2 +- .../businessUserEvents/client/Client.ts | 2 +- .../resources/businessUsers/client/Client.ts | 4 ++-- .../consumerUserEvents/client/Client.ts | 2 +- .../resources/consumerUsers/client/Client.ts | 4 ++-- .../transactionEvents/client/Client.ts | 4 ++-- src/api/resources/transactions/client/Client.ts | 4 ++-- .../{CardDetailsCardBrand.ts => CardBrand.ts} | 11 ++--------- src/api/types/CardDetails.ts | 8 +++----- ...CardDetailsCardFunding.ts => CardFunding.ts} | 4 ++-- .../{CardDetailsCardType.ts => CardType.ts} | 7 +++++-- ...DeliveryStatus.ts => CheckDeliveryStatus.ts} | 4 ++-- src/api/types/CheckDetails.ts | 2 +- .../types/{UserDetailsGender.ts => Gender.ts} | 4 ++-- src/api/types/MpesaDetails.ts | 3 +-- ...ansactionType.ts => MpesaTransactionType.ts} | 4 ++-- src/api/types/UserDetails.ts | 3 +-- src/api/types/index.ts | 12 ++++++------ .../{CardDetailsCardBrand.ts => CardBrand.ts} | 8 +++----- src/serialization/types/CardDetails.ts | 12 ++++++------ .../types/CardDetailsCardFunding.ts | 16 ---------------- src/serialization/types/CardDetailsCardType.ts | 16 ---------------- src/serialization/types/CardFunding.ts | 14 ++++++++++++++ src/serialization/types/CardType.ts | 14 ++++++++++++++ ...DeliveryStatus.ts => CheckDeliveryStatus.ts} | 8 ++++---- src/serialization/types/CheckDetails.ts | 4 ++-- src/serialization/types/Gender.ts | 17 +++++++++++++++++ src/serialization/types/MpesaDetails.ts | 4 ++-- ...ansactionType.ts => MpesaTransactionType.ts} | 8 ++++---- src/serialization/types/UserDetails.ts | 4 ++-- src/serialization/types/UserDetailsGender.ts | 16 ---------------- src/serialization/types/index.ts | 12 ++++++------ yarn.lock | 6 +++--- 33 files changed, 115 insertions(+), 128 deletions(-) rename src/api/types/{CardDetailsCardBrand.ts => CardBrand.ts} (60%) rename src/api/types/{CardDetailsCardFunding.ts => CardFunding.ts} (62%) rename src/api/types/{CardDetailsCardType.ts => CardType.ts} (58%) rename src/api/types/{CheckDetailsDeliveryStatus.ts => CheckDeliveryStatus.ts} (59%) rename src/api/types/{UserDetailsGender.ts => Gender.ts} (69%) rename src/api/types/{MpesaDetailsTransactionType.ts => MpesaTransactionType.ts} (84%) rename src/serialization/types/{CardDetailsCardBrand.ts => CardBrand.ts} (57%) delete mode 100644 src/serialization/types/CardDetailsCardFunding.ts delete mode 100644 src/serialization/types/CardDetailsCardType.ts create mode 100644 src/serialization/types/CardFunding.ts create mode 100644 src/serialization/types/CardType.ts rename src/serialization/types/{CheckDetailsDeliveryStatus.ts => CheckDeliveryStatus.ts} (64%) create mode 100644 src/serialization/types/Gender.ts rename src/serialization/types/{MpesaDetailsTransactionType.ts => MpesaTransactionType.ts} (70%) delete mode 100644 src/serialization/types/UserDetailsGender.ts diff --git a/package.json b/package.json index 4b437c4..e79ee32 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "flagright", - "version": "1.3.2", + "version": "1.3.3", "private": false, "repository": "https://github.com/flagright/flagright-node", "main": "./index.js", diff --git a/src/api/resources/businessUserEvents/client/Client.ts b/src/api/resources/businessUserEvents/client/Client.ts index 3cd0120..9044dc6 100644 --- a/src/api/resources/businessUserEvents/client/Client.ts +++ b/src/api/resources/businessUserEvents/client/Client.ts @@ -68,7 +68,7 @@ export class BusinessUserEvents { "x-api-key": await core.Supplier.get(this._options.apiKey), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "flagright", - "X-Fern-SDK-Version": "1.3.2", + "X-Fern-SDK-Version": "1.3.3", }, contentType: "application/json", queryParameters: _queryParams, diff --git a/src/api/resources/businessUsers/client/Client.ts b/src/api/resources/businessUsers/client/Client.ts index f6ee330..e378f4e 100644 --- a/src/api/resources/businessUsers/client/Client.ts +++ b/src/api/resources/businessUsers/client/Client.ts @@ -56,7 +56,7 @@ export class BusinessUsers { "x-api-key": await core.Supplier.get(this._options.apiKey), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "flagright", - "X-Fern-SDK-Version": "1.3.2", + "X-Fern-SDK-Version": "1.3.3", }, contentType: "application/json", body: await serializers.Business.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), @@ -126,7 +126,7 @@ export class BusinessUsers { "x-api-key": await core.Supplier.get(this._options.apiKey), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "flagright", - "X-Fern-SDK-Version": "1.3.2", + "X-Fern-SDK-Version": "1.3.3", }, contentType: "application/json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, diff --git a/src/api/resources/consumerUserEvents/client/Client.ts b/src/api/resources/consumerUserEvents/client/Client.ts index 2688389..d3bdfa7 100644 --- a/src/api/resources/consumerUserEvents/client/Client.ts +++ b/src/api/resources/consumerUserEvents/client/Client.ts @@ -68,7 +68,7 @@ export class ConsumerUserEvents { "x-api-key": await core.Supplier.get(this._options.apiKey), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "flagright", - "X-Fern-SDK-Version": "1.3.2", + "X-Fern-SDK-Version": "1.3.3", }, contentType: "application/json", queryParameters: _queryParams, diff --git a/src/api/resources/consumerUsers/client/Client.ts b/src/api/resources/consumerUsers/client/Client.ts index c6f1d5b..2891b8b 100644 --- a/src/api/resources/consumerUsers/client/Client.ts +++ b/src/api/resources/consumerUsers/client/Client.ts @@ -55,7 +55,7 @@ export class ConsumerUsers { "x-api-key": await core.Supplier.get(this._options.apiKey), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "flagright", - "X-Fern-SDK-Version": "1.3.2", + "X-Fern-SDK-Version": "1.3.3", }, contentType: "application/json", body: await serializers.User.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), @@ -122,7 +122,7 @@ export class ConsumerUsers { "x-api-key": await core.Supplier.get(this._options.apiKey), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "flagright", - "X-Fern-SDK-Version": "1.3.2", + "X-Fern-SDK-Version": "1.3.3", }, contentType: "application/json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, diff --git a/src/api/resources/transactionEvents/client/Client.ts b/src/api/resources/transactionEvents/client/Client.ts index 3aff8a2..586aed0 100644 --- a/src/api/resources/transactionEvents/client/Client.ts +++ b/src/api/resources/transactionEvents/client/Client.ts @@ -63,7 +63,7 @@ export class TransactionEvents { "x-api-key": await core.Supplier.get(this._options.apiKey), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "flagright", - "X-Fern-SDK-Version": "1.3.2", + "X-Fern-SDK-Version": "1.3.3", }, contentType: "application/json", body: await serializers.TransactionEvent.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), @@ -133,7 +133,7 @@ export class TransactionEvents { "x-api-key": await core.Supplier.get(this._options.apiKey), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "flagright", - "X-Fern-SDK-Version": "1.3.2", + "X-Fern-SDK-Version": "1.3.3", }, contentType: "application/json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, diff --git a/src/api/resources/transactions/client/Client.ts b/src/api/resources/transactions/client/Client.ts index 2c08041..6cc54e3 100644 --- a/src/api/resources/transactions/client/Client.ts +++ b/src/api/resources/transactions/client/Client.ts @@ -73,7 +73,7 @@ export class Transactions { "x-api-key": await core.Supplier.get(this._options.apiKey), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "flagright", - "X-Fern-SDK-Version": "1.3.2", + "X-Fern-SDK-Version": "1.3.3", }, contentType: "application/json", queryParameters: _queryParams, @@ -144,7 +144,7 @@ export class Transactions { "x-api-key": await core.Supplier.get(this._options.apiKey), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "flagright", - "X-Fern-SDK-Version": "1.3.2", + "X-Fern-SDK-Version": "1.3.3", }, contentType: "application/json", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, diff --git a/src/api/types/CardDetailsCardBrand.ts b/src/api/types/CardBrand.ts similarity index 60% rename from src/api/types/CardDetailsCardBrand.ts rename to src/api/types/CardBrand.ts index ca12b71..27dbf3d 100644 --- a/src/api/types/CardDetailsCardBrand.ts +++ b/src/api/types/CardBrand.ts @@ -5,16 +5,9 @@ /** * Brand of Card */ -export type CardDetailsCardBrand = - | "VISA" - | "MASTERCARD" - | "AMERICAN_EXPRESS" - | "DISCOVER" - | "UNIONPAY" - | "RUPAY" - | "JCB"; +export type CardBrand = "VISA" | "MASTERCARD" | "AMERICAN_EXPRESS" | "DISCOVER" | "UNIONPAY" | "RUPAY" | "JCB"; -export const CardDetailsCardBrand = { +export const CardBrand = { Visa: "VISA", Mastercard: "MASTERCARD", AmericanExpress: "AMERICAN_EXPRESS", diff --git a/src/api/types/CardDetails.ts b/src/api/types/CardDetails.ts index 8d8db7c..71ce6b5 100644 --- a/src/api/types/CardDetails.ts +++ b/src/api/types/CardDetails.ts @@ -19,14 +19,12 @@ export interface CardDetails { cardExpiry?: Flagright.CardExpiry; /** Last 4 digits of Card */ cardLast4Digits?: string; - /** Brand of Card */ - cardBrand?: Flagright.CardDetailsCardBrand; - /** Funding of Card */ - cardFunding?: Flagright.CardDetailsCardFunding; + cardBrand?: Flagright.CardBrand; + cardFunding?: Flagright.CardFunding; /** Authentication of Card */ cardAuthenticated?: boolean; paymentChannel?: string; - cardType?: Flagright.CardDetailsCardType; + cardType?: Flagright.CardType; merchantDetails?: Flagright.CardMerchantDetails; /** Additional information that can be added via tags */ tags?: Flagright.Tag[]; diff --git a/src/api/types/CardDetailsCardFunding.ts b/src/api/types/CardFunding.ts similarity index 62% rename from src/api/types/CardDetailsCardFunding.ts rename to src/api/types/CardFunding.ts index 0668a50..bfa0dba 100644 --- a/src/api/types/CardDetailsCardFunding.ts +++ b/src/api/types/CardFunding.ts @@ -5,9 +5,9 @@ /** * Funding of Card */ -export type CardDetailsCardFunding = "CREDIT" | "DEBIT" | "PREPAID"; +export type CardFunding = "CREDIT" | "DEBIT" | "PREPAID"; -export const CardDetailsCardFunding = { +export const CardFunding = { Credit: "CREDIT", Debit: "DEBIT", Prepaid: "PREPAID", diff --git a/src/api/types/CardDetailsCardType.ts b/src/api/types/CardType.ts similarity index 58% rename from src/api/types/CardDetailsCardType.ts rename to src/api/types/CardType.ts index e0f3a8f..40b957c 100644 --- a/src/api/types/CardDetailsCardType.ts +++ b/src/api/types/CardType.ts @@ -2,9 +2,12 @@ * This file was auto-generated by Fern from our API Definition. */ -export type CardDetailsCardType = "VIRTUAL" | "PHYSICAL"; +/** + * Type of card + */ +export type CardType = "VIRTUAL" | "PHYSICAL"; -export const CardDetailsCardType = { +export const CardType = { Virtual: "VIRTUAL", Physical: "PHYSICAL", } as const; diff --git a/src/api/types/CheckDetailsDeliveryStatus.ts b/src/api/types/CheckDeliveryStatus.ts similarity index 59% rename from src/api/types/CheckDetailsDeliveryStatus.ts rename to src/api/types/CheckDeliveryStatus.ts index 134d08e..74c5ef8 100644 --- a/src/api/types/CheckDetailsDeliveryStatus.ts +++ b/src/api/types/CheckDeliveryStatus.ts @@ -2,9 +2,9 @@ * This file was auto-generated by Fern from our API Definition. */ -export type CheckDetailsDeliveryStatus = "COMPLETED" | "PENDING" | "SETTLED" | "CANCELED" | "REFUND" | "DECLINED"; +export type CheckDeliveryStatus = "COMPLETED" | "PENDING" | "SETTLED" | "CANCELED" | "REFUND" | "DECLINED"; -export const CheckDetailsDeliveryStatus = { +export const CheckDeliveryStatus = { Completed: "COMPLETED", Pending: "PENDING", Settled: "SETTLED", diff --git a/src/api/types/CheckDetails.ts b/src/api/types/CheckDetails.ts index ac97b21..e5c0963 100644 --- a/src/api/types/CheckDetails.ts +++ b/src/api/types/CheckDetails.ts @@ -8,7 +8,7 @@ export interface CheckDetails { checkNumber?: string; checkIdentifier?: string; name?: string; - deliveryStatus?: Flagright.CheckDetailsDeliveryStatus; + deliveryStatus?: Flagright.CheckDeliveryStatus; etaTimestamp?: number; shippingAddress?: Flagright.Address; /** Additional information that can be added via tags */ diff --git a/src/api/types/UserDetailsGender.ts b/src/api/types/Gender.ts similarity index 69% rename from src/api/types/UserDetailsGender.ts rename to src/api/types/Gender.ts index 7ba9822..c4321f4 100644 --- a/src/api/types/UserDetailsGender.ts +++ b/src/api/types/Gender.ts @@ -5,9 +5,9 @@ /** * Gender of the individual - Male, Female or Non-Binary */ -export type UserDetailsGender = "M" | "F" | "NB"; +export type Gender = "M" | "F" | "NB"; -export const UserDetailsGender = { +export const Gender = { M: "M", F: "F", Nb: "NB", diff --git a/src/api/types/MpesaDetails.ts b/src/api/types/MpesaDetails.ts index 749bcb1..765c786 100644 --- a/src/api/types/MpesaDetails.ts +++ b/src/api/types/MpesaDetails.ts @@ -10,8 +10,7 @@ import * as Flagright from ".."; export interface MpesaDetails { /** Business code */ businessShortCode: string; - /** Type of transaction */ - transactionType: Flagright.MpesaDetailsTransactionType; + transactionType: Flagright.MpesaTransactionType; /** Contact Number of the account holder */ phoneNumber: string; /** Additional information that can be added via tags */ diff --git a/src/api/types/MpesaDetailsTransactionType.ts b/src/api/types/MpesaTransactionType.ts similarity index 84% rename from src/api/types/MpesaDetailsTransactionType.ts rename to src/api/types/MpesaTransactionType.ts index 69f93bd..1588117 100644 --- a/src/api/types/MpesaDetailsTransactionType.ts +++ b/src/api/types/MpesaTransactionType.ts @@ -5,14 +5,14 @@ /** * Type of transaction */ -export type MpesaDetailsTransactionType = +export type MpesaTransactionType = | "CustomerPayBillOnline" | "CustomerBuyGoodsOnline" | "SalaryPayment" | "BusinessPayment" | "PromotionPayment"; -export const MpesaDetailsTransactionType = { +export const MpesaTransactionType = { CustomerPayBillOnline: "CustomerPayBillOnline", CustomerBuyGoodsOnline: "CustomerBuyGoodsOnline", SalaryPayment: "SalaryPayment", diff --git a/src/api/types/UserDetails.ts b/src/api/types/UserDetails.ts index 5c1d5f1..36fb51c 100644 --- a/src/api/types/UserDetails.ts +++ b/src/api/types/UserDetails.ts @@ -13,6 +13,5 @@ export interface UserDetails { dateOfBirth?: string; countryOfResidence?: Flagright.CountryCode; countryOfNationality?: Flagright.CountryCode; - /** Gender of the individual - Male, Female or Non-Binary */ - gender?: Flagright.UserDetailsGender; + gender?: Flagright.Gender; } diff --git a/src/api/types/index.ts b/src/api/types/index.ts index e7483f9..c612b32 100644 --- a/src/api/types/index.ts +++ b/src/api/types/index.ts @@ -28,7 +28,6 @@ export * from "./LegalEntity"; export * from "./SourceOfFunds"; export * from "./ContactDetails"; export * from "./CompanyFinancialDetails"; -export * from "./UserDetailsGender"; export * from "./UserDetails"; export * from "./UserRegistrationStatus"; export * from "./BusinessUserSegment"; @@ -40,15 +39,11 @@ export * from "./BusinessBase"; export * from "./BusinessOptional"; export * from "./BusinessUsersResponse"; export * from "./ConsumerUsersResponse"; -export * from "./CardDetailsCardBrand"; -export * from "./CardDetailsCardFunding"; -export * from "./CardDetailsCardType"; export * from "./CardDetails"; export * from "./IbanDetails"; export * from "./WalletDetails"; export * from "./AchDetails"; export * from "./SwiftDetails"; -export * from "./MpesaDetailsTransactionType"; export * from "./MpesaDetails"; export * from "./GenericBankAccountDetails"; export * from "./UpiDetails"; @@ -101,7 +96,6 @@ export * from "./ListExisted"; export * from "./ListHeader"; export * from "./PaymentMethod"; export * from "./CardMerchantDetails"; -export * from "./CheckDetailsDeliveryStatus"; export * from "./CheckDetails"; export * from "./CountryCode"; export * from "./CurrencyCode"; @@ -119,3 +113,9 @@ export * from "./UserResponse"; export * from "./BusinessWithRulesResult"; export * from "./BusinessResponse"; export * from "./BooleanString"; +export * from "./Gender"; +export * from "./CardBrand"; +export * from "./CardFunding"; +export * from "./CardType"; +export * from "./MpesaTransactionType"; +export * from "./CheckDeliveryStatus"; diff --git a/src/serialization/types/CardDetailsCardBrand.ts b/src/serialization/types/CardBrand.ts similarity index 57% rename from src/serialization/types/CardDetailsCardBrand.ts rename to src/serialization/types/CardBrand.ts index 4a36a91..938f95b 100644 --- a/src/serialization/types/CardDetailsCardBrand.ts +++ b/src/serialization/types/CardBrand.ts @@ -6,11 +6,9 @@ import * as serializers from ".."; import * as Flagright from "../../api"; import * as core from "../../core"; -export const CardDetailsCardBrand: core.serialization.Schema< - serializers.CardDetailsCardBrand.Raw, - Flagright.CardDetailsCardBrand -> = core.serialization.enum_(["VISA", "MASTERCARD", "AMERICAN_EXPRESS", "DISCOVER", "UNIONPAY", "RUPAY", "JCB"]); +export const CardBrand: core.serialization.Schema = + core.serialization.enum_(["VISA", "MASTERCARD", "AMERICAN_EXPRESS", "DISCOVER", "UNIONPAY", "RUPAY", "JCB"]); -export declare namespace CardDetailsCardBrand { +export declare namespace CardBrand { type Raw = "VISA" | "MASTERCARD" | "AMERICAN_EXPRESS" | "DISCOVER" | "UNIONPAY" | "RUPAY" | "JCB"; } diff --git a/src/serialization/types/CardDetails.ts b/src/serialization/types/CardDetails.ts index c137e00..7a0b498 100644 --- a/src/serialization/types/CardDetails.ts +++ b/src/serialization/types/CardDetails.ts @@ -15,11 +15,11 @@ export const CardDetails: core.serialization.ObjectSchema (await import("..")).ConsumerName).optional(), cardExpiry: core.serialization.lazyObject(async () => (await import("..")).CardExpiry).optional(), cardLast4Digits: core.serialization.string().optional(), - cardBrand: core.serialization.lazy(async () => (await import("..")).CardDetailsCardBrand).optional(), - cardFunding: core.serialization.lazy(async () => (await import("..")).CardDetailsCardFunding).optional(), + cardBrand: core.serialization.lazy(async () => (await import("..")).CardBrand).optional(), + cardFunding: core.serialization.lazy(async () => (await import("..")).CardFunding).optional(), cardAuthenticated: core.serialization.boolean().optional(), paymentChannel: core.serialization.string().optional(), - cardType: core.serialization.lazy(async () => (await import("..")).CardDetailsCardType).optional(), + cardType: core.serialization.lazy(async () => (await import("..")).CardType).optional(), merchantDetails: core.serialization.lazyObject(async () => (await import("..")).CardMerchantDetails).optional(), tags: core.serialization.list(core.serialization.lazyObject(async () => (await import("..")).Tag)).optional(), }); @@ -33,11 +33,11 @@ export declare namespace CardDetails { nameOnCard?: serializers.ConsumerName.Raw | null; cardExpiry?: serializers.CardExpiry.Raw | null; cardLast4Digits?: string | null; - cardBrand?: serializers.CardDetailsCardBrand.Raw | null; - cardFunding?: serializers.CardDetailsCardFunding.Raw | null; + cardBrand?: serializers.CardBrand.Raw | null; + cardFunding?: serializers.CardFunding.Raw | null; cardAuthenticated?: boolean | null; paymentChannel?: string | null; - cardType?: serializers.CardDetailsCardType.Raw | null; + cardType?: serializers.CardType.Raw | null; merchantDetails?: serializers.CardMerchantDetails.Raw | null; tags?: serializers.Tag.Raw[] | null; } diff --git a/src/serialization/types/CardDetailsCardFunding.ts b/src/serialization/types/CardDetailsCardFunding.ts deleted file mode 100644 index b877a5b..0000000 --- a/src/serialization/types/CardDetailsCardFunding.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from ".."; -import * as Flagright from "../../api"; -import * as core from "../../core"; - -export const CardDetailsCardFunding: core.serialization.Schema< - serializers.CardDetailsCardFunding.Raw, - Flagright.CardDetailsCardFunding -> = core.serialization.enum_(["CREDIT", "DEBIT", "PREPAID"]); - -export declare namespace CardDetailsCardFunding { - type Raw = "CREDIT" | "DEBIT" | "PREPAID"; -} diff --git a/src/serialization/types/CardDetailsCardType.ts b/src/serialization/types/CardDetailsCardType.ts deleted file mode 100644 index 7a14fd1..0000000 --- a/src/serialization/types/CardDetailsCardType.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from ".."; -import * as Flagright from "../../api"; -import * as core from "../../core"; - -export const CardDetailsCardType: core.serialization.Schema< - serializers.CardDetailsCardType.Raw, - Flagright.CardDetailsCardType -> = core.serialization.enum_(["VIRTUAL", "PHYSICAL"]); - -export declare namespace CardDetailsCardType { - type Raw = "VIRTUAL" | "PHYSICAL"; -} diff --git a/src/serialization/types/CardFunding.ts b/src/serialization/types/CardFunding.ts new file mode 100644 index 0000000..bb220e6 --- /dev/null +++ b/src/serialization/types/CardFunding.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from ".."; +import * as Flagright from "../../api"; +import * as core from "../../core"; + +export const CardFunding: core.serialization.Schema = + core.serialization.enum_(["CREDIT", "DEBIT", "PREPAID"]); + +export declare namespace CardFunding { + type Raw = "CREDIT" | "DEBIT" | "PREPAID"; +} diff --git a/src/serialization/types/CardType.ts b/src/serialization/types/CardType.ts new file mode 100644 index 0000000..be50c07 --- /dev/null +++ b/src/serialization/types/CardType.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from ".."; +import * as Flagright from "../../api"; +import * as core from "../../core"; + +export const CardType: core.serialization.Schema = + core.serialization.enum_(["VIRTUAL", "PHYSICAL"]); + +export declare namespace CardType { + type Raw = "VIRTUAL" | "PHYSICAL"; +} diff --git a/src/serialization/types/CheckDetailsDeliveryStatus.ts b/src/serialization/types/CheckDeliveryStatus.ts similarity index 64% rename from src/serialization/types/CheckDetailsDeliveryStatus.ts rename to src/serialization/types/CheckDeliveryStatus.ts index aaf05be..3d2834b 100644 --- a/src/serialization/types/CheckDetailsDeliveryStatus.ts +++ b/src/serialization/types/CheckDeliveryStatus.ts @@ -6,11 +6,11 @@ import * as serializers from ".."; import * as Flagright from "../../api"; import * as core from "../../core"; -export const CheckDetailsDeliveryStatus: core.serialization.Schema< - serializers.CheckDetailsDeliveryStatus.Raw, - Flagright.CheckDetailsDeliveryStatus +export const CheckDeliveryStatus: core.serialization.Schema< + serializers.CheckDeliveryStatus.Raw, + Flagright.CheckDeliveryStatus > = core.serialization.enum_(["COMPLETED", "PENDING", "SETTLED", "CANCELED", "REFUND", "DECLINED"]); -export declare namespace CheckDetailsDeliveryStatus { +export declare namespace CheckDeliveryStatus { type Raw = "COMPLETED" | "PENDING" | "SETTLED" | "CANCELED" | "REFUND" | "DECLINED"; } diff --git a/src/serialization/types/CheckDetails.ts b/src/serialization/types/CheckDetails.ts index ef1f4af..20e9270 100644 --- a/src/serialization/types/CheckDetails.ts +++ b/src/serialization/types/CheckDetails.ts @@ -11,7 +11,7 @@ export const CheckDetails: core.serialization.ObjectSchema (await import("..")).CheckDetailsDeliveryStatus).optional(), + deliveryStatus: core.serialization.lazy(async () => (await import("..")).CheckDeliveryStatus).optional(), etaTimestamp: core.serialization.number().optional(), shippingAddress: core.serialization.lazyObject(async () => (await import("..")).Address).optional(), tags: core.serialization.list(core.serialization.lazyObject(async () => (await import("..")).Tag)).optional(), @@ -22,7 +22,7 @@ export declare namespace CheckDetails { checkNumber?: string | null; checkIdentifier?: string | null; name?: string | null; - deliveryStatus?: serializers.CheckDetailsDeliveryStatus.Raw | null; + deliveryStatus?: serializers.CheckDeliveryStatus.Raw | null; etaTimestamp?: number | null; shippingAddress?: serializers.Address.Raw | null; tags?: serializers.Tag.Raw[] | null; diff --git a/src/serialization/types/Gender.ts b/src/serialization/types/Gender.ts new file mode 100644 index 0000000..bd11f0f --- /dev/null +++ b/src/serialization/types/Gender.ts @@ -0,0 +1,17 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from ".."; +import * as Flagright from "../../api"; +import * as core from "../../core"; + +export const Gender: core.serialization.Schema = core.serialization.enum_([ + "M", + "F", + "NB", +]); + +export declare namespace Gender { + type Raw = "M" | "F" | "NB"; +} diff --git a/src/serialization/types/MpesaDetails.ts b/src/serialization/types/MpesaDetails.ts index 19843ea..248e496 100644 --- a/src/serialization/types/MpesaDetails.ts +++ b/src/serialization/types/MpesaDetails.ts @@ -9,7 +9,7 @@ import * as core from "../../core"; export const MpesaDetails: core.serialization.ObjectSchema = core.serialization.object({ businessShortCode: core.serialization.string(), - transactionType: core.serialization.lazy(async () => (await import("..")).MpesaDetailsTransactionType), + transactionType: core.serialization.lazy(async () => (await import("..")).MpesaTransactionType), phoneNumber: core.serialization.string(), tags: core.serialization.list(core.serialization.lazyObject(async () => (await import("..")).Tag)).optional(), }); @@ -17,7 +17,7 @@ export const MpesaDetails: core.serialization.ObjectSchema = core.serialization.enum_([ "CustomerPayBillOnline", "CustomerBuyGoodsOnline", @@ -17,7 +17,7 @@ export const MpesaDetailsTransactionType: core.serialization.Schema< "PromotionPayment", ]); -export declare namespace MpesaDetailsTransactionType { +export declare namespace MpesaTransactionType { type Raw = | "CustomerPayBillOnline" | "CustomerBuyGoodsOnline" diff --git a/src/serialization/types/UserDetails.ts b/src/serialization/types/UserDetails.ts index 56fc909..46dc986 100644 --- a/src/serialization/types/UserDetails.ts +++ b/src/serialization/types/UserDetails.ts @@ -12,7 +12,7 @@ export const UserDetails: core.serialization.ObjectSchema (await import("..")).CountryCode).optional(), countryOfNationality: core.serialization.lazy(async () => (await import("..")).CountryCode).optional(), - gender: core.serialization.lazy(async () => (await import("..")).UserDetailsGender).optional(), + gender: core.serialization.lazy(async () => (await import("..")).Gender).optional(), }); export declare namespace UserDetails { @@ -21,6 +21,6 @@ export declare namespace UserDetails { dateOfBirth?: string | null; countryOfResidence?: serializers.CountryCode.Raw | null; countryOfNationality?: serializers.CountryCode.Raw | null; - gender?: serializers.UserDetailsGender.Raw | null; + gender?: serializers.Gender.Raw | null; } } diff --git a/src/serialization/types/UserDetailsGender.ts b/src/serialization/types/UserDetailsGender.ts deleted file mode 100644 index 73feff4..0000000 --- a/src/serialization/types/UserDetailsGender.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from ".."; -import * as Flagright from "../../api"; -import * as core from "../../core"; - -export const UserDetailsGender: core.serialization.Schema< - serializers.UserDetailsGender.Raw, - Flagright.UserDetailsGender -> = core.serialization.enum_(["M", "F", "NB"]); - -export declare namespace UserDetailsGender { - type Raw = "M" | "F" | "NB"; -} diff --git a/src/serialization/types/index.ts b/src/serialization/types/index.ts index e7483f9..c612b32 100644 --- a/src/serialization/types/index.ts +++ b/src/serialization/types/index.ts @@ -28,7 +28,6 @@ export * from "./LegalEntity"; export * from "./SourceOfFunds"; export * from "./ContactDetails"; export * from "./CompanyFinancialDetails"; -export * from "./UserDetailsGender"; export * from "./UserDetails"; export * from "./UserRegistrationStatus"; export * from "./BusinessUserSegment"; @@ -40,15 +39,11 @@ export * from "./BusinessBase"; export * from "./BusinessOptional"; export * from "./BusinessUsersResponse"; export * from "./ConsumerUsersResponse"; -export * from "./CardDetailsCardBrand"; -export * from "./CardDetailsCardFunding"; -export * from "./CardDetailsCardType"; export * from "./CardDetails"; export * from "./IbanDetails"; export * from "./WalletDetails"; export * from "./AchDetails"; export * from "./SwiftDetails"; -export * from "./MpesaDetailsTransactionType"; export * from "./MpesaDetails"; export * from "./GenericBankAccountDetails"; export * from "./UpiDetails"; @@ -101,7 +96,6 @@ export * from "./ListExisted"; export * from "./ListHeader"; export * from "./PaymentMethod"; export * from "./CardMerchantDetails"; -export * from "./CheckDetailsDeliveryStatus"; export * from "./CheckDetails"; export * from "./CountryCode"; export * from "./CurrencyCode"; @@ -119,3 +113,9 @@ export * from "./UserResponse"; export * from "./BusinessWithRulesResult"; export * from "./BusinessResponse"; export * from "./BooleanString"; +export * from "./Gender"; +export * from "./CardBrand"; +export * from "./CardFunding"; +export * from "./CardType"; +export * from "./MpesaTransactionType"; +export * from "./CheckDeliveryStatus"; diff --git a/yarn.lock b/yarn.lock index 94365c3..ee567e2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -11,9 +11,9 @@ form-data "^4.0.0" "@types/node@*": - version "20.10.8" - resolved "https://registry.yarnpkg.com/@types/node/-/node-20.10.8.tgz#f1e223cbde9e25696661d167a5b93a9b2a5d57c7" - integrity sha512-f8nQs3cLxbAFc00vEU59yf9UyGUftkPaLGfvbVOIDdx2i1b8epBqj2aNGyP19fiyXWvlmZ7qC1XLjAzw/OKIeA== + version "20.11.0" + resolved "https://registry.yarnpkg.com/@types/node/-/node-20.11.0.tgz#8e0b99e70c0c1ade1a86c4a282f7b7ef87c9552f" + integrity sha512-o9bjXmDNcF7GbM4CNQpmi+TutCgap/K3w1JyKgxAjqx41zp9qlIAVFi0IhCNsJcXolEqLWhbFbEeL0PvYm4pcQ== dependencies: undici-types "~5.26.4"