@qcobro/common 1.11.3 → 1.12.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.
Files changed (173) hide show
  1. package/dist/config.d.ts +307 -0
  2. package/dist/config.d.ts.map +1 -0
  3. package/{src/config.ts → dist/config.js} +123 -154
  4. package/dist/config.js.map +1 -0
  5. package/dist/errors/ValidationError.d.ts +27 -0
  6. package/dist/errors/ValidationError.d.ts.map +1 -0
  7. package/dist/errors/ValidationError.js +52 -0
  8. package/dist/errors/ValidationError.js.map +1 -0
  9. package/{src/errors/index.ts → dist/errors/index.d.ts} +1 -0
  10. package/dist/errors/index.d.ts.map +1 -0
  11. package/dist/errors/index.js +2 -0
  12. package/dist/errors/index.js.map +1 -0
  13. package/dist/index.d.ts +19 -0
  14. package/dist/index.d.ts.map +1 -0
  15. package/{src/index.ts → dist/index.js} +2 -5
  16. package/dist/index.js.map +1 -0
  17. package/dist/schemas/agentTemplates.d.ts +73 -0
  18. package/dist/schemas/agentTemplates.d.ts.map +1 -0
  19. package/dist/schemas/agentTemplates.js +90 -0
  20. package/dist/schemas/agentTemplates.js.map +1 -0
  21. package/dist/schemas/apiKeys.d.ts +17 -0
  22. package/dist/schemas/apiKeys.d.ts.map +1 -0
  23. package/{src/schemas/apiKeys.ts → dist/schemas/apiKeys.js} +11 -16
  24. package/dist/schemas/apiKeys.js.map +1 -0
  25. package/dist/schemas/auth.d.ts +74 -0
  26. package/dist/schemas/auth.d.ts.map +1 -0
  27. package/dist/schemas/auth.js +53 -0
  28. package/dist/schemas/auth.js.map +1 -0
  29. package/dist/schemas/campaigns.d.ts +61 -0
  30. package/dist/schemas/campaigns.d.ts.map +1 -0
  31. package/{src/schemas/campaigns.ts → dist/schemas/campaigns.js} +20 -32
  32. package/dist/schemas/campaigns.js.map +1 -0
  33. package/dist/schemas/contactLog.d.ts +121 -0
  34. package/dist/schemas/contactLog.d.ts.map +1 -0
  35. package/dist/schemas/contactLog.js +83 -0
  36. package/dist/schemas/contactLog.js.map +1 -0
  37. package/dist/schemas/dispatch.d.ts +51 -0
  38. package/dist/schemas/dispatch.d.ts.map +1 -0
  39. package/{src/schemas/dispatch.ts → dist/schemas/dispatch.js} +55 -61
  40. package/dist/schemas/dispatch.js.map +1 -0
  41. package/dist/schemas/email.d.ts +38 -0
  42. package/dist/schemas/email.d.ts.map +1 -0
  43. package/dist/schemas/email.js +34 -0
  44. package/dist/schemas/email.js.map +1 -0
  45. package/dist/schemas/index.d.ts +16 -0
  46. package/dist/schemas/index.d.ts.map +1 -0
  47. package/{src/schemas/index.ts → dist/schemas/index.js} +1 -0
  48. package/dist/schemas/index.js.map +1 -0
  49. package/dist/schemas/insight.d.ts +25 -0
  50. package/dist/schemas/insight.d.ts.map +1 -0
  51. package/{src/schemas/insight.ts → dist/schemas/insight.js} +6 -9
  52. package/dist/schemas/insight.js.map +1 -0
  53. package/dist/schemas/portfolios.d.ts +65 -0
  54. package/dist/schemas/portfolios.d.ts.map +1 -0
  55. package/dist/schemas/portfolios.js +40 -0
  56. package/dist/schemas/portfolios.js.map +1 -0
  57. package/dist/schemas/userSettings.d.ts +25 -0
  58. package/dist/schemas/userSettings.d.ts.map +1 -0
  59. package/{src/schemas/userSettings.ts → dist/schemas/userSettings.js} +4 -9
  60. package/dist/schemas/userSettings.js.map +1 -0
  61. package/dist/schemas/users.d.ts +7 -0
  62. package/dist/schemas/users.d.ts.map +1 -0
  63. package/dist/schemas/users.js +6 -0
  64. package/dist/schemas/users.js.map +1 -0
  65. package/dist/schemas/voiceEvent.d.ts +37 -0
  66. package/dist/schemas/voiceEvent.d.ts.map +1 -0
  67. package/dist/schemas/voiceEvent.js +35 -0
  68. package/dist/schemas/voiceEvent.js.map +1 -0
  69. package/dist/schemas/whatsApp.d.ts +76 -0
  70. package/dist/schemas/whatsApp.d.ts.map +1 -0
  71. package/dist/schemas/whatsApp.js +85 -0
  72. package/dist/schemas/whatsApp.js.map +1 -0
  73. package/dist/schemas/workspaceSettings.d.ts +27 -0
  74. package/dist/schemas/workspaceSettings.d.ts.map +1 -0
  75. package/{src/schemas/workspaceSettings.ts → dist/schemas/workspaceSettings.js} +6 -11
  76. package/dist/schemas/workspaceSettings.js.map +1 -0
  77. package/dist/schemas/workspaces.d.ts +50 -0
  78. package/dist/schemas/workspaces.d.ts.map +1 -0
  79. package/dist/schemas/workspaces.js +36 -0
  80. package/dist/schemas/workspaces.js.map +1 -0
  81. package/dist/types/agentTemplates.d.ts +119 -0
  82. package/dist/types/agentTemplates.d.ts.map +1 -0
  83. package/dist/types/agentTemplates.js +2 -0
  84. package/dist/types/agentTemplates.js.map +1 -0
  85. package/dist/types/campaigns.d.ts +257 -0
  86. package/dist/types/campaigns.d.ts.map +1 -0
  87. package/dist/types/campaigns.js +2 -0
  88. package/dist/types/campaigns.js.map +1 -0
  89. package/dist/types/dispatch.d.ts +168 -0
  90. package/dist/types/dispatch.d.ts.map +1 -0
  91. package/dist/types/dispatch.js +8 -0
  92. package/dist/types/dispatch.js.map +1 -0
  93. package/dist/types/email.d.ts +65 -0
  94. package/dist/types/email.d.ts.map +1 -0
  95. package/dist/types/email.js +7 -0
  96. package/dist/types/email.js.map +1 -0
  97. package/{src/types/engine.ts → dist/types/engine.d.ts} +23 -46
  98. package/dist/types/engine.d.ts.map +1 -0
  99. package/dist/types/engine.js +10 -0
  100. package/dist/types/engine.js.map +1 -0
  101. package/dist/types/index.d.ts +12 -0
  102. package/dist/types/index.d.ts.map +1 -0
  103. package/{src/types/index.ts → dist/types/index.js} +1 -0
  104. package/dist/types/index.js.map +1 -0
  105. package/{src/types/insight.ts → dist/types/insight.d.ts} +10 -8
  106. package/dist/types/insight.d.ts.map +1 -0
  107. package/dist/types/insight.js +2 -0
  108. package/dist/types/insight.js.map +1 -0
  109. package/dist/types/portfolios.d.ts +153 -0
  110. package/dist/types/portfolios.d.ts.map +1 -0
  111. package/dist/types/portfolios.js +2 -0
  112. package/dist/types/portfolios.js.map +1 -0
  113. package/dist/types/userSettings.d.ts +25 -0
  114. package/dist/types/userSettings.d.ts.map +1 -0
  115. package/dist/types/userSettings.js +2 -0
  116. package/dist/types/userSettings.js.map +1 -0
  117. package/dist/types/voiceApplication.d.ts +32 -0
  118. package/dist/types/voiceApplication.d.ts.map +1 -0
  119. package/dist/types/voiceApplication.js +7 -0
  120. package/dist/types/voiceApplication.js.map +1 -0
  121. package/dist/types/whatsApp.d.ts +97 -0
  122. package/dist/types/whatsApp.d.ts.map +1 -0
  123. package/dist/types/whatsApp.js +2 -0
  124. package/dist/types/whatsApp.js.map +1 -0
  125. package/dist/types/workspaceSettings.d.ts +26 -0
  126. package/dist/types/workspaceSettings.d.ts.map +1 -0
  127. package/dist/types/workspaceSettings.js +2 -0
  128. package/dist/types/workspaceSettings.js.map +1 -0
  129. package/dist/utils/index.d.ts +4 -0
  130. package/dist/utils/index.d.ts.map +1 -0
  131. package/dist/utils/index.js +4 -0
  132. package/dist/utils/index.js.map +1 -0
  133. package/{src/utils/outreach.ts → dist/utils/outreach.d.ts} +17 -32
  134. package/dist/utils/outreach.d.ts.map +1 -0
  135. package/dist/utils/outreach.js +116 -0
  136. package/dist/utils/outreach.js.map +1 -0
  137. package/dist/utils/time.d.ts +25 -0
  138. package/dist/utils/time.d.ts.map +1 -0
  139. package/dist/utils/time.js +52 -0
  140. package/dist/utils/time.js.map +1 -0
  141. package/dist/utils/withErrorHandlingAndValidation.d.ts +18 -0
  142. package/dist/utils/withErrorHandlingAndValidation.d.ts.map +1 -0
  143. package/{src/utils/withErrorHandlingAndValidation.ts → dist/utils/withErrorHandlingAndValidation.js} +9 -15
  144. package/dist/utils/withErrorHandlingAndValidation.js.map +1 -0
  145. package/package.json +4 -1
  146. package/CHANGELOG.md +0 -115
  147. package/src/config.test.ts +0 -19
  148. package/src/errors/ValidationError.test.ts +0 -38
  149. package/src/errors/ValidationError.ts +0 -68
  150. package/src/schemas/agentTemplates.ts +0 -100
  151. package/src/schemas/apiKeys.test.ts +0 -38
  152. package/src/schemas/auth.ts +0 -76
  153. package/src/schemas/contactLog.ts +0 -96
  154. package/src/schemas/email.ts +0 -37
  155. package/src/schemas/portfolios.ts +0 -49
  156. package/src/schemas/users.ts +0 -7
  157. package/src/schemas/voiceEvent.ts +0 -45
  158. package/src/schemas/whatsApp.ts +0 -101
  159. package/src/schemas/workspaces.ts +0 -53
  160. package/src/types/agentTemplates.ts +0 -104
  161. package/src/types/campaigns.ts +0 -210
  162. package/src/types/dispatch.ts +0 -160
  163. package/src/types/email.ts +0 -66
  164. package/src/types/portfolios.ts +0 -128
  165. package/src/types/userSettings.ts +0 -21
  166. package/src/types/voiceApplication.ts +0 -29
  167. package/src/types/whatsApp.ts +0 -82
  168. package/src/types/workspaceSettings.ts +0 -22
  169. package/src/utils/index.ts +0 -14
  170. package/src/utils/outreach.test.ts +0 -83
  171. package/src/utils/time.ts +0 -66
  172. package/src/utils/withErrorHandlingAndValidation.test.ts +0 -33
  173. package/tsconfig.json +0 -9
@@ -1,29 +0,0 @@
1
- /**
2
- * Port for syncing VOICE_AI agent templates to an external voice-application
3
- * provider (Fonoster Autopilot). Kept provider-agnostic so service functions
4
- * depend on this interface and tests inject a stub — no live SDK in unit tests.
5
- */
6
-
7
- /** Domain-level inputs the engine needs to (re)build a voice application. */
8
- export interface VoiceApplicationInput {
9
- /** Application name (maps to VoiceAiConfig.fonosterAppName). */
10
- name: string;
11
- /** Provider voice id (e.g. an ElevenLabs voice id). */
12
- voice: string;
13
- /** The AI agent's persona/instructions. */
14
- systemPrompt: string;
15
- /** The opening line spoken to the contact; optional — falls back to the autopilot
16
- * template's default greeting when the agent has no scripted first message. */
17
- firstMessage?: string;
18
- /** Language code (e.g. `es`, `en`). */
19
- language: string;
20
- }
21
-
22
- export interface VoiceApplicationClient {
23
- /** Create the remote application; resolves with its provider ref. */
24
- createApplication(input: VoiceApplicationInput): Promise<{ ref: string }>;
25
- /** Update an existing remote application by ref. */
26
- updateApplication(ref: string, input: VoiceApplicationInput): Promise<{ ref: string }>;
27
- /** Delete the remote application by ref (best-effort cleanup). */
28
- deleteApplication(ref: string): Promise<void>;
29
- }
@@ -1,82 +0,0 @@
1
- import type { WhatsAppCapabilities } from "../schemas/whatsApp.js";
2
-
3
- /** One message in a WhatsApp conversation thread. */
4
- export interface WhatsAppThreadMessage {
5
- direction: "outbound" | "inbound";
6
- /** "agent" for outbound; the customer's E.164 number for inbound. */
7
- from: string;
8
- at: string;
9
- body: string;
10
- metaMessageId?: string;
11
- }
12
-
13
- /** The per-gestión WhatsApp conversation thread stored in `channelData.whatsAppThread`. */
14
- export interface WhatsAppThread {
15
- customerPhone: string;
16
- messages: WhatsAppThreadMessage[];
17
- agentReplyCount: number;
18
- /** ISO timestamp of the customer's last inbound message — drives the 24 h window check. */
19
- lastCustomerMessageAt: string;
20
- }
21
-
22
- /**
23
- * DB record + client surfaces for the per-workspace WhatsApp integration. The
24
- * `accessToken` is encrypted at rest (cloak) and MUST NOT be returned to clients —
25
- * read procedures project to {@link WhatsAppIntegrationView}.
26
- */
27
- export interface WhatsAppIntegrationRecord {
28
- id: string;
29
- workspaceRef: string;
30
- wabaId: string;
31
- /** Tenant secret — encrypted at rest; never serialized to the client. */
32
- accessToken: string;
33
- verifyToken: string;
34
- /** Meta template-send language for this workspace (e.g. `es_DO`). */
35
- defaultLanguage: string;
36
- createdAt: Date;
37
- updatedAt: Date;
38
- }
39
-
40
- /** Client-safe projection of the integration (no secret). */
41
- export interface WhatsAppIntegrationView {
42
- connected: boolean;
43
- wabaId: string;
44
- verifyToken: string;
45
- defaultLanguage: string;
46
- }
47
-
48
- export interface WhatsAppSenderNumberRecord {
49
- id: string;
50
- workspaceRef: string;
51
- phoneNumberId: string;
52
- displayNumber: string;
53
- label: string;
54
- /** Cached from Meta quality callbacks: GREEN | YELLOW | RED | null (unknown). */
55
- qualityRating: string | null;
56
- capabilities: WhatsAppCapabilities;
57
- createdAt: Date;
58
- updatedAt: Date;
59
- }
60
-
61
- /** The DB surface the WhatsApp integration functions need (tests inject a stub). */
62
- export interface WhatsAppIntegrationClient {
63
- whatsAppIntegration: {
64
- findUnique(args: {
65
- where: { workspaceRef: string };
66
- }): Promise<WhatsAppIntegrationRecord | null>;
67
- findFirst(args: { where: { verifyToken: string } }): Promise<WhatsAppIntegrationRecord | null>;
68
- upsert(args: {
69
- where: { workspaceRef: string };
70
- create: Record<string, unknown>;
71
- update: Record<string, unknown>;
72
- }): Promise<WhatsAppIntegrationRecord>;
73
- };
74
- whatsAppSenderNumber: {
75
- findUnique(args: {
76
- where: { phoneNumberId: string };
77
- }): Promise<WhatsAppSenderNumberRecord | null>;
78
- findMany(args: { where: { workspaceRef: string } }): Promise<WhatsAppSenderNumberRecord[]>;
79
- create(args: { data: Record<string, unknown> }): Promise<WhatsAppSenderNumberRecord>;
80
- delete(args: { where: { phoneNumberId: string } }): Promise<WhatsAppSenderNumberRecord>;
81
- };
82
- }
@@ -1,22 +0,0 @@
1
- import type { Currency } from "../schemas/workspaceSettings.js";
2
-
3
- export interface WorkspaceSettingsRecord {
4
- workspaceRef: string;
5
- currency: Currency;
6
- timezone: string;
7
- createdAt: Date;
8
- updatedAt: Date;
9
- }
10
-
11
- /** The DB surface the workspace-settings functions need (tests inject a stub). */
12
- export interface WorkspaceSettingsClient {
13
- workspaceSettings: {
14
- findUnique(args: { where: { workspaceRef: string } }): Promise<WorkspaceSettingsRecord | null>;
15
-
16
- upsert(args: {
17
- where: { workspaceRef: string };
18
- create: Record<string, unknown>;
19
- update: Record<string, unknown>;
20
- }): Promise<WorkspaceSettingsRecord>;
21
- };
22
- }
@@ -1,14 +0,0 @@
1
- export { withErrorHandlingAndValidation } from "./withErrorHandlingAndValidation.js";
2
- export {
3
- renderTemplate,
4
- extractTemplateTokens,
5
- buildOutreachContext,
6
- pickRandomNumber
7
- } from "./outreach.js";
8
- export {
9
- localParts,
10
- localDateString,
11
- isSameLocalDay,
12
- localWeekdayISO,
13
- localTimeHHMM
14
- } from "./time.js";
@@ -1,83 +0,0 @@
1
- import { describe, it } from "node:test";
2
- import assert from "node:assert/strict";
3
- import { renderTemplate, buildOutreachContext, pickRandomNumber } from "./outreach.js";
4
- import type { PortfolioAccountRecord } from "../types/portfolios.js";
5
-
6
- function makeAccount(overrides: Partial<PortfolioAccountRecord> = {}): PortfolioAccountRecord {
7
- return {
8
- id: "acc-1",
9
- portfolioId: "pf-1",
10
- externalId: "EXT-1",
11
- fullName: "María López",
12
- phone: "+50670000000",
13
- preferredLanguage: "es",
14
- bestTimeToCall: null,
15
- customerSegment: null,
16
- principalAmount: 1000,
17
- termsAmount: 0,
18
- termsFrequency: null,
19
- termsLength: 0,
20
- outstandingBalance: 1500,
21
- daysPastDue: 30,
22
- missedInstallments: 2,
23
- lastPaymentDate: null,
24
- lastPaymentAmount: null,
25
- negotiationOptions: null,
26
- archivedAt: null,
27
- createdAt: new Date(),
28
- updatedAt: new Date(),
29
- ...overrides
30
- };
31
- }
32
-
33
- describe("renderTemplate + buildOutreachContext", () => {
34
- it("personalizes a body with account data and derived fields", () => {
35
- const ctx = buildOutreachContext(makeAccount(), { currency: "CRC" });
36
- const out = renderTemplate(
37
- "Hola {{firstName}}, su saldo es {{outstandingBalance}} {{currency}}",
38
- ctx
39
- );
40
- assert.equal(out, "Hola María, su saldo es 1500 CRC");
41
- });
42
-
43
- it("renders a missing field as empty without throwing", () => {
44
- const ctx = buildOutreachContext(makeAccount(), { currency: "CRC" });
45
- const out = renderTemplate("Hola {{firstName}} {{unknownField}}!", ctx);
46
- assert.equal(out, "Hola María !");
47
- });
48
-
49
- it("derives firstName from the first token of fullName", () => {
50
- const ctx = buildOutreachContext(makeAccount({ fullName: "Juan Carlos Pérez" }), {
51
- currency: "USD"
52
- });
53
- assert.equal(ctx.firstName, "Juan");
54
- });
55
-
56
- it("derives isDue from daysPastDue", () => {
57
- const overdue = buildOutreachContext(makeAccount({ daysPastDue: 30 }), { currency: "CRC" });
58
- const current = buildOutreachContext(makeAccount({ daysPastDue: 0 }), { currency: "CRC" });
59
- assert.equal(overdue.isDue, true);
60
- assert.equal(current.isDue, false);
61
- });
62
-
63
- it("branches a template on the isDue conditional", () => {
64
- const tpl = "{{#if isDue}}Su pago está vencido{{else}}Gracias por estar al día{{/if}}";
65
- const overdue = renderTemplate(
66
- tpl,
67
- buildOutreachContext(makeAccount({ daysPastDue: 5 }), { currency: "CRC" })
68
- );
69
- const current = renderTemplate(
70
- tpl,
71
- buildOutreachContext(makeAccount({ daysPastDue: 0 }), { currency: "CRC" })
72
- );
73
- assert.equal(overdue, "Su pago está vencido");
74
- assert.equal(current, "Gracias por estar al día");
75
- });
76
- });
77
-
78
- describe("pickRandomNumber", () => {
79
- it("returns a number from the pool", () => {
80
- const pool = ["+1", "+2", "+3"];
81
- assert.ok(pool.includes(pickRandomNumber(pool)));
82
- });
83
- });
package/src/utils/time.ts DELETED
@@ -1,66 +0,0 @@
1
- /**
2
- * Timezone-aware wall-clock helpers. The campaigns engine evaluates schedule
3
- * windows and daily caps in the deployment timezone (from `qcobro.json`), not UTC.
4
- * All functions take an IANA timezone string and use `Intl` so DST is handled.
5
- */
6
-
7
- interface LocalParts {
8
- /** Local calendar date as `YYYY-MM-DD`. */
9
- date: string;
10
- /** ISO weekday: 1 = Monday … 7 = Sunday. */
11
- weekday: number;
12
- /** Local time as `HH:MM` (24h, zero-padded). */
13
- time: string;
14
- }
15
-
16
- const WEEKDAY_TO_ISO: Record<string, number> = {
17
- Mon: 1,
18
- Tue: 2,
19
- Wed: 3,
20
- Thu: 4,
21
- Fri: 5,
22
- Sat: 6,
23
- Sun: 7
24
- };
25
-
26
- /** Decompose an instant into local date/weekday/time parts for the given timezone. */
27
- export function localParts(date: Date, timeZone: string): LocalParts {
28
- const fmt = new Intl.DateTimeFormat("en-US", {
29
- timeZone,
30
- weekday: "short",
31
- year: "numeric",
32
- month: "2-digit",
33
- day: "2-digit",
34
- hour: "2-digit",
35
- minute: "2-digit",
36
- hour12: false
37
- });
38
- const parts = Object.fromEntries(fmt.formatToParts(date).map((p) => [p.type, p.value]));
39
- // `hour` can come back as "24" at midnight under hour12:false; normalize to "00".
40
- const hour = parts.hour === "24" ? "00" : parts.hour;
41
- return {
42
- date: `${parts.year}-${parts.month}-${parts.day}`,
43
- weekday: WEEKDAY_TO_ISO[parts.weekday] ?? 0,
44
- time: `${hour}:${parts.minute}`
45
- };
46
- }
47
-
48
- /** Local calendar date (`YYYY-MM-DD`) for an instant in the given timezone. */
49
- export function localDateString(date: Date, timeZone: string): string {
50
- return localParts(date, timeZone).date;
51
- }
52
-
53
- /** True when two instants fall on the same local calendar day in the timezone. */
54
- export function isSameLocalDay(a: Date, b: Date, timeZone: string): boolean {
55
- return localDateString(a, timeZone) === localDateString(b, timeZone);
56
- }
57
-
58
- /** ISO weekday (1=Mon … 7=Sun) for an instant in the timezone. */
59
- export function localWeekdayISO(date: Date, timeZone: string): number {
60
- return localParts(date, timeZone).weekday;
61
- }
62
-
63
- /** Local `HH:MM` (24h) for an instant in the timezone. */
64
- export function localTimeHHMM(date: Date, timeZone: string): string {
65
- return localParts(date, timeZone).time;
66
- }
@@ -1,33 +0,0 @@
1
- import { describe, it } from "node:test";
2
- import assert from "node:assert/strict";
3
- import { z } from "zod";
4
- import { withErrorHandlingAndValidation } from "./withErrorHandlingAndValidation.js";
5
- import { ValidationError } from "../errors/ValidationError.js";
6
-
7
- const schema = z.object({ name: z.string().min(1) });
8
-
9
- describe("withErrorHandlingAndValidation", () => {
10
- it("passes parsed, typed input to the wrapped function and returns its result", async () => {
11
- let received: { name: string } | null = null;
12
- const wrapped = withErrorHandlingAndValidation(async (params: { name: string }) => {
13
- received = params;
14
- return `hello ${params.name}`;
15
- }, schema);
16
-
17
- const result = await wrapped({ name: "Ada" });
18
-
19
- assert.equal(result, "hello Ada");
20
- assert.deepEqual(received, { name: "Ada" });
21
- });
22
-
23
- it("throws ValidationError and never calls the inner function on invalid input", async () => {
24
- let called = false;
25
- const wrapped = withErrorHandlingAndValidation(async (params: { name: string }) => {
26
- called = true;
27
- return params.name;
28
- }, schema);
29
-
30
- await assert.rejects(() => wrapped({ name: "" }), ValidationError);
31
- assert.equal(called, false);
32
- });
33
- });
package/tsconfig.json DELETED
@@ -1,9 +0,0 @@
1
- {
2
- "extends": "../../tsconfig.json",
3
- "compilerOptions": {
4
- "outDir": "dist",
5
- "rootDir": "src"
6
- },
7
- "include": ["src"],
8
- "exclude": ["src/**/*.test.ts"]
9
- }