@wf-financing/ui-assets 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,26 @@
1
+ import { z } from 'zod';
2
+
3
+ export declare const GenericOfferSchema: z.ZodObject<{
4
+ version: z.ZodString;
5
+ language: z.ZodString;
6
+ cohort: z.ZodString;
7
+ } & {
8
+ mainText: z.ZodString;
9
+ bulletPoints: z.ZodArray<z.ZodString, "many">;
10
+ buttonText: z.ZodString;
11
+ }, "strip", z.ZodTypeAny, {
12
+ version: string;
13
+ language: string;
14
+ cohort: string;
15
+ mainText: string;
16
+ bulletPoints: string[];
17
+ buttonText: string;
18
+ }, {
19
+ version: string;
20
+ language: string;
21
+ cohort: string;
22
+ mainText: string;
23
+ bulletPoints: string[];
24
+ buttonText: string;
25
+ }>;
26
+ export type GenericOffer = z.infer<typeof GenericOfferSchema>;
@@ -0,0 +1,11 @@
1
+ export { type WayflyerDocument, WayflyerDocumentSchema } from './wayflyerDocument';
2
+ export { type PartnerTemplate, PartnerTemplateSchema } from './partnerTemplate';
3
+ export { type GenericOffer, GenericOfferSchema } from './genericOffer';
4
+ export { type IndicativeOffer, IndicativeOfferSchema } from './indicativeOffer';
5
+ export { type ConsentModal, ConsentModalSchema } from './consentModal';
6
+ export { type CompleteApplication, CompleteApplicationSchema } from './completeApplication.ts';
7
+ export { type SelectOffer, SelectOfferSchema } from './selectOffer.ts';
8
+ export { type CompleteKyc, CompleteKycSchema } from './completeKyc.ts';
9
+ export { type SignContract, SignContractSchema } from './signContract';
10
+ export { type CopyBundle, type Copy, CopyBundleSchema, CopySchema } from './copyBundle';
11
+ export { type ProvideAdditionalInfo, ProvideAdditionalInfoSchema } from './provideAdditionalInfo.ts';
@@ -0,0 +1,26 @@
1
+ import { z } from 'zod';
2
+
3
+ export declare const IndicativeOfferSchema: z.ZodObject<{
4
+ version: z.ZodString;
5
+ language: z.ZodString;
6
+ cohort: z.ZodString;
7
+ } & {
8
+ mainText: z.ZodEffects<z.ZodString, string, string>;
9
+ bulletPoints: z.ZodArray<z.ZodString, "many">;
10
+ buttonText: z.ZodString;
11
+ }, "strip", z.ZodTypeAny, {
12
+ version: string;
13
+ language: string;
14
+ cohort: string;
15
+ mainText: string;
16
+ bulletPoints: string[];
17
+ buttonText: string;
18
+ }, {
19
+ version: string;
20
+ language: string;
21
+ cohort: string;
22
+ mainText: string;
23
+ bulletPoints: string[];
24
+ buttonText: string;
25
+ }>;
26
+ export type IndicativeOffer = z.infer<typeof IndicativeOfferSchema>;
@@ -0,0 +1,26 @@
1
+ import { z } from 'zod';
2
+
3
+ export declare const PartnerTemplateSchema: z.ZodObject<{
4
+ version: z.ZodString;
5
+ language: z.ZodString;
6
+ cohort: z.ZodString;
7
+ } & {
8
+ partnerName: z.ZodString;
9
+ termsOfServiceTitle: z.ZodString;
10
+ termsAndServiceUrl: z.ZodString;
11
+ }, "strip", z.ZodTypeAny, {
12
+ version: string;
13
+ language: string;
14
+ cohort: string;
15
+ partnerName: string;
16
+ termsOfServiceTitle: string;
17
+ termsAndServiceUrl: string;
18
+ }, {
19
+ version: string;
20
+ language: string;
21
+ cohort: string;
22
+ partnerName: string;
23
+ termsOfServiceTitle: string;
24
+ termsAndServiceUrl: string;
25
+ }>;
26
+ export type PartnerTemplate = z.infer<typeof PartnerTemplateSchema>;
@@ -0,0 +1,23 @@
1
+ import { z } from 'zod';
2
+
3
+ export declare const ProvideAdditionalInfoSchema: z.ZodObject<{
4
+ version: z.ZodString;
5
+ language: z.ZodString;
6
+ cohort: z.ZodString;
7
+ } & {
8
+ mainText: z.ZodString;
9
+ buttonText: z.ZodString;
10
+ }, "strip", z.ZodTypeAny, {
11
+ version: string;
12
+ language: string;
13
+ cohort: string;
14
+ mainText: string;
15
+ buttonText: string;
16
+ }, {
17
+ version: string;
18
+ language: string;
19
+ cohort: string;
20
+ mainText: string;
21
+ buttonText: string;
22
+ }>;
23
+ export type ProvideAdditionalInfo = z.infer<typeof ProvideAdditionalInfoSchema>;
@@ -0,0 +1,26 @@
1
+ import { z } from 'zod';
2
+
3
+ export declare const SelectOfferSchema: z.ZodObject<{
4
+ version: z.ZodString;
5
+ language: z.ZodString;
6
+ cohort: z.ZodString;
7
+ } & {
8
+ mainText: z.ZodEffects<z.ZodString, string, string>;
9
+ bulletPoints: z.ZodArray<z.ZodString, "many">;
10
+ buttonText: z.ZodString;
11
+ }, "strip", z.ZodTypeAny, {
12
+ version: string;
13
+ language: string;
14
+ cohort: string;
15
+ mainText: string;
16
+ bulletPoints: string[];
17
+ buttonText: string;
18
+ }, {
19
+ version: string;
20
+ language: string;
21
+ cohort: string;
22
+ mainText: string;
23
+ bulletPoints: string[];
24
+ buttonText: string;
25
+ }>;
26
+ export type SelectOffer = z.infer<typeof SelectOfferSchema>;
@@ -0,0 +1,23 @@
1
+ import { z } from 'zod';
2
+
3
+ export declare const SignContractSchema: z.ZodObject<{
4
+ version: z.ZodString;
5
+ language: z.ZodString;
6
+ cohort: z.ZodString;
7
+ } & {
8
+ mainText: z.ZodString;
9
+ buttonText: z.ZodString;
10
+ }, "strip", z.ZodTypeAny, {
11
+ version: string;
12
+ language: string;
13
+ cohort: string;
14
+ mainText: string;
15
+ buttonText: string;
16
+ }, {
17
+ version: string;
18
+ language: string;
19
+ cohort: string;
20
+ mainText: string;
21
+ buttonText: string;
22
+ }>;
23
+ export type SignContract = z.infer<typeof SignContractSchema>;
@@ -0,0 +1,16 @@
1
+ import { z } from 'zod';
2
+
3
+ export declare const WayflyerDocumentSchema: z.ZodObject<{
4
+ version: z.ZodString;
5
+ language: z.ZodString;
6
+ cohort: z.ZodString;
7
+ }, "strip", z.ZodTypeAny, {
8
+ version: string;
9
+ language: string;
10
+ cohort: string;
11
+ }, {
12
+ version: string;
13
+ language: string;
14
+ cohort: string;
15
+ }>;
16
+ export type WayflyerDocument = z.infer<typeof WayflyerDocumentSchema>;
@@ -0,0 +1 @@
1
+ export type { Options } from './options';
@@ -0,0 +1,4 @@
1
+ export type Options = {
2
+ cohort?: string;
3
+ language?: string;
4
+ };
@@ -0,0 +1,6 @@
1
+ import { CopyBundle, Copy } from '../schemas';
2
+ import { Options } from '../types';
3
+
4
+ type FilterCopy = (copy: CopyBundle, options?: Options) => Copy;
5
+ export declare const filterCopy: FilterCopy;
6
+ export {};
@@ -0,0 +1,4 @@
1
+ export { mustContainPlaceholders } from './validators';
2
+ export { CohortMap, LanguageMap } from './normalizers';
3
+ export { filterCopy } from './filterCopy';
4
+ export { loadAndConfigureCopy } from './loadCopy';
@@ -0,0 +1,12 @@
1
+ import { Copy } from '../schemas';
2
+ import { Options } from '../types';
3
+
4
+ type LoadCopyParams = {
5
+ partnerId: string;
6
+ companyId?: string;
7
+ version?: string;
8
+ options?: Options;
9
+ };
10
+ type LoadCopy = (params: LoadCopyParams) => Promise<Copy | null>;
11
+ export declare const loadAndConfigureCopy: LoadCopy;
12
+ export {};
@@ -0,0 +1,4 @@
1
+ import { z } from 'zod';
2
+
3
+ export declare const CohortMap: <T extends z.ZodTypeAny>(schema: T) => z.ZodRecord<z.ZodString, T>;
4
+ export declare const LanguageMap: <T extends z.ZodTypeAny>(schema: T) => z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, T>>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export declare const mustContainPlaceholders: (placeholders: string[]) => (value: string) => boolean;
package/package.json ADDED
@@ -0,0 +1,29 @@
1
+ {
2
+ "name": "@wf-financing/ui-assets",
3
+ "version": "0.1.0",
4
+ "main": "dist/index.cjs.js",
5
+ "module": "dist/index.es.js",
6
+ "types": "dist/index.d.ts",
7
+ "exports": {
8
+ ".": {
9
+ "import": "./dist/index.es.js",
10
+ "types": "./dist/index.d.ts",
11
+ "require": "./dist/index.cjs.js"
12
+ }
13
+ },
14
+ "files": [
15
+ "dist"
16
+ ],
17
+ "engines": {
18
+ "node": ">=18"
19
+ },
20
+ "dependencies": {
21
+ "zod": "^3.23.8"
22
+ },
23
+ "devDependencies": {
24
+ "dotenv": "^17.2.3"
25
+ },
26
+ "scripts": {
27
+ "build": "vite build"
28
+ }
29
+ }