@voyantjs/storefront-verification 0.5.0 → 0.6.2

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.
package/dist/index.d.ts CHANGED
@@ -1,12 +1,12 @@
1
1
  import type { HonoModule } from "@voyantjs/hono/module";
2
- import { createStorefrontVerificationPublicRoutes } from "./routes-public.js";
2
+ import { type StorefrontVerificationRoutesOptions } from "./routes-public.js";
3
3
  export type { StorefrontVerificationPublicRoutes, StorefrontVerificationRoutesOptions, } from "./routes-public.js";
4
- export { createStorefrontVerificationPublicRoutes } from "./routes-public.js";
4
+ export { buildStorefrontVerificationSenders, createStorefrontVerificationPublicRoutes, STOREFRONT_VERIFICATION_SENDERS_CONTAINER_KEY, } from "./routes-public.js";
5
5
  export type { NewStorefrontVerificationChallenge, StorefrontVerificationChallenge, } from "./schema.js";
6
6
  export { storefrontVerificationChallenges, storefrontVerificationChannelEnum, storefrontVerificationLinkable, storefrontVerificationModule, storefrontVerificationStatusEnum, } from "./schema.js";
7
7
  export type { StorefrontVerificationDeliveryResult, StorefrontVerificationEmailSendInput, StorefrontVerificationProviderOptions, StorefrontVerificationSenders, StorefrontVerificationServiceOptions, StorefrontVerificationSmsSendInput, } from "./service.js";
8
8
  export { createStorefrontVerificationSendersFromProviders, createStorefrontVerificationService, StorefrontVerificationError, } from "./service.js";
9
9
  export type { ConfirmEmailVerificationChallengeInput, ConfirmSmsVerificationChallengeInput, StartEmailVerificationChallengeInput, StartSmsVerificationChallengeInput, StorefrontVerificationChallengeRecord, StorefrontVerificationChannel, StorefrontVerificationConfirmResult, StorefrontVerificationStartResult, StorefrontVerificationStatus, } from "./validation.js";
10
10
  export { confirmEmailVerificationChallengeSchema, confirmSmsVerificationChallengeSchema, startEmailVerificationChallengeSchema, startSmsVerificationChallengeSchema, storefrontVerificationChallengeRecordSchema, storefrontVerificationChannelSchema, storefrontVerificationConfirmResultSchema, storefrontVerificationStartResultSchema, storefrontVerificationStatusSchema, } from "./validation.js";
11
- export declare function createStorefrontVerificationHonoModule(options?: Parameters<typeof createStorefrontVerificationPublicRoutes>[0]): HonoModule;
11
+ export declare function createStorefrontVerificationHonoModule(options?: StorefrontVerificationRoutesOptions): HonoModule;
12
12
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAA;AAEvD,OAAO,EAAE,wCAAwC,EAAE,MAAM,oBAAoB,CAAA;AAG7E,YAAY,EACV,kCAAkC,EAClC,mCAAmC,GACpC,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EAAE,wCAAwC,EAAE,MAAM,oBAAoB,CAAA;AAC7E,YAAY,EACV,kCAAkC,EAClC,+BAA+B,GAChC,MAAM,aAAa,CAAA;AACpB,OAAO,EACL,gCAAgC,EAChC,iCAAiC,EACjC,8BAA8B,EAC9B,4BAA4B,EAC5B,gCAAgC,GACjC,MAAM,aAAa,CAAA;AACpB,YAAY,EACV,oCAAoC,EACpC,oCAAoC,EACpC,qCAAqC,EACrC,6BAA6B,EAC7B,oCAAoC,EACpC,kCAAkC,GACnC,MAAM,cAAc,CAAA;AACrB,OAAO,EACL,gDAAgD,EAChD,mCAAmC,EACnC,2BAA2B,GAC5B,MAAM,cAAc,CAAA;AACrB,YAAY,EACV,sCAAsC,EACtC,oCAAoC,EACpC,oCAAoC,EACpC,kCAAkC,EAClC,qCAAqC,EACrC,6BAA6B,EAC7B,mCAAmC,EACnC,iCAAiC,EACjC,4BAA4B,GAC7B,MAAM,iBAAiB,CAAA;AACxB,OAAO,EACL,uCAAuC,EACvC,qCAAqC,EACrC,qCAAqC,EACrC,mCAAmC,EACnC,2CAA2C,EAC3C,mCAAmC,EACnC,yCAAyC,EACzC,uCAAuC,EACvC,kCAAkC,GACnC,MAAM,iBAAiB,CAAA;AAExB,wBAAgB,sCAAsC,CACpD,OAAO,CAAC,EAAE,UAAU,CAAC,OAAO,wCAAwC,CAAC,CAAC,CAAC,CAAC,GACvE,UAAU,CAKZ"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAA;AACvD,OAAO,EAIL,KAAK,mCAAmC,EACzC,MAAM,oBAAoB,CAAA;AAG3B,YAAY,EACV,kCAAkC,EAClC,mCAAmC,GACpC,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EACL,kCAAkC,EAClC,wCAAwC,EACxC,6CAA6C,GAC9C,MAAM,oBAAoB,CAAA;AAC3B,YAAY,EACV,kCAAkC,EAClC,+BAA+B,GAChC,MAAM,aAAa,CAAA;AACpB,OAAO,EACL,gCAAgC,EAChC,iCAAiC,EACjC,8BAA8B,EAC9B,4BAA4B,EAC5B,gCAAgC,GACjC,MAAM,aAAa,CAAA;AACpB,YAAY,EACV,oCAAoC,EACpC,oCAAoC,EACpC,qCAAqC,EACrC,6BAA6B,EAC7B,oCAAoC,EACpC,kCAAkC,GACnC,MAAM,cAAc,CAAA;AACrB,OAAO,EACL,gDAAgD,EAChD,mCAAmC,EACnC,2BAA2B,GAC5B,MAAM,cAAc,CAAA;AACrB,YAAY,EACV,sCAAsC,EACtC,oCAAoC,EACpC,oCAAoC,EACpC,kCAAkC,EAClC,qCAAqC,EACrC,6BAA6B,EAC7B,mCAAmC,EACnC,iCAAiC,EACjC,4BAA4B,GAC7B,MAAM,iBAAiB,CAAA;AACxB,OAAO,EACL,uCAAuC,EACvC,qCAAqC,EACrC,qCAAqC,EACrC,mCAAmC,EACnC,2CAA2C,EAC3C,mCAAmC,EACnC,yCAAyC,EACzC,uCAAuC,EACvC,kCAAkC,GACnC,MAAM,iBAAiB,CAAA;AAExB,wBAAgB,sCAAsC,CACpD,OAAO,CAAC,EAAE,mCAAmC,GAC5C,UAAU,CAeZ"}
package/dist/index.js CHANGED
@@ -1,12 +1,18 @@
1
- import { createStorefrontVerificationPublicRoutes } from "./routes-public.js";
1
+ import { buildStorefrontVerificationSenders, createStorefrontVerificationPublicRoutes, STOREFRONT_VERIFICATION_SENDERS_CONTAINER_KEY, } from "./routes-public.js";
2
2
  import { storefrontVerificationModule } from "./schema.js";
3
- export { createStorefrontVerificationPublicRoutes } from "./routes-public.js";
3
+ export { buildStorefrontVerificationSenders, createStorefrontVerificationPublicRoutes, STOREFRONT_VERIFICATION_SENDERS_CONTAINER_KEY, } from "./routes-public.js";
4
4
  export { storefrontVerificationChallenges, storefrontVerificationChannelEnum, storefrontVerificationLinkable, storefrontVerificationModule, storefrontVerificationStatusEnum, } from "./schema.js";
5
5
  export { createStorefrontVerificationSendersFromProviders, createStorefrontVerificationService, StorefrontVerificationError, } from "./service.js";
6
6
  export { confirmEmailVerificationChallengeSchema, confirmSmsVerificationChallengeSchema, startEmailVerificationChallengeSchema, startSmsVerificationChallengeSchema, storefrontVerificationChallengeRecordSchema, storefrontVerificationChannelSchema, storefrontVerificationConfirmResultSchema, storefrontVerificationStartResultSchema, storefrontVerificationStatusSchema, } from "./validation.js";
7
7
  export function createStorefrontVerificationHonoModule(options) {
8
+ const module = {
9
+ ...storefrontVerificationModule,
10
+ bootstrap: ({ bindings, container }) => {
11
+ container.register(STOREFRONT_VERIFICATION_SENDERS_CONTAINER_KEY, buildStorefrontVerificationSenders(bindings, options));
12
+ },
13
+ };
8
14
  return {
9
- module: storefrontVerificationModule,
15
+ module,
10
16
  publicRoutes: createStorefrontVerificationPublicRoutes(options),
11
17
  };
12
18
  }
@@ -1,9 +1,11 @@
1
+ import type { ModuleContainer } from "@voyantjs/core";
1
2
  import type { NotificationProvider } from "@voyantjs/notifications";
2
3
  import type { PostgresJsDatabase } from "drizzle-orm/postgres-js";
3
4
  import { type StorefrontVerificationProviderOptions, type StorefrontVerificationSenders, type StorefrontVerificationServiceOptions } from "./service.js";
4
5
  type Env = {
5
6
  Bindings: Record<string, unknown>;
6
7
  Variables: {
8
+ container: ModuleContainer;
7
9
  db: PostgresJsDatabase;
8
10
  userId?: string;
9
11
  };
@@ -14,6 +16,8 @@ export interface StorefrontVerificationRoutesOptions extends StorefrontVerificat
14
16
  providers?: ReadonlyArray<NotificationProvider>;
15
17
  resolveProviders?: (bindings: Record<string, unknown>) => ReadonlyArray<NotificationProvider>;
16
18
  }
19
+ export declare const STOREFRONT_VERIFICATION_SENDERS_CONTAINER_KEY = "providers.storefrontVerification.senders";
20
+ export declare function buildStorefrontVerificationSenders(bindings: Record<string, unknown>, options?: StorefrontVerificationRoutesOptions): StorefrontVerificationSenders;
17
21
  export declare function createStorefrontVerificationPublicRoutes(options?: StorefrontVerificationRoutesOptions): import("hono/hono-base").HonoBase<Env, {
18
22
  "/email/start": {
19
23
  $post: {
@@ -24,7 +28,7 @@ export declare function createStorefrontVerificationPublicRoutes(options?: Store
24
28
  channel: "email" | "sms";
25
29
  destination: string;
26
30
  purpose: string;
27
- status: "expired" | "cancelled" | "pending" | "failed" | "verified";
31
+ status: "pending" | "expired" | "cancelled" | "failed" | "verified";
28
32
  expiresAt: string;
29
33
  verifiedAt: string | null;
30
34
  createdAt: string;
@@ -51,7 +55,7 @@ export declare function createStorefrontVerificationPublicRoutes(options?: Store
51
55
  error: string;
52
56
  };
53
57
  outputFormat: "json";
54
- status: 404 | 400 | 409 | 410 | 501;
58
+ status: 400 | 404 | 409 | 410 | 501;
55
59
  };
56
60
  };
57
61
  } & {
@@ -74,7 +78,7 @@ export declare function createStorefrontVerificationPublicRoutes(options?: Store
74
78
  error: string;
75
79
  };
76
80
  outputFormat: "json";
77
- status: 404 | 400 | 409 | 410 | 501;
81
+ status: 400 | 404 | 409 | 410 | 501;
78
82
  } | {
79
83
  input: {};
80
84
  output: {
@@ -83,7 +87,7 @@ export declare function createStorefrontVerificationPublicRoutes(options?: Store
83
87
  channel: "email" | "sms";
84
88
  destination: string;
85
89
  purpose: string;
86
- status: "expired" | "cancelled" | "pending" | "failed" | "verified";
90
+ status: "pending" | "expired" | "cancelled" | "failed" | "verified";
87
91
  expiresAt: string;
88
92
  verifiedAt: string | null;
89
93
  createdAt: string;
@@ -114,7 +118,7 @@ export declare function createStorefrontVerificationPublicRoutes(options?: Store
114
118
  error: string;
115
119
  };
116
120
  outputFormat: "json";
117
- status: 404 | 400 | 409 | 410 | 501;
121
+ status: 400 | 404 | 409 | 410 | 501;
118
122
  } | {
119
123
  input: {};
120
124
  output: {
@@ -123,7 +127,7 @@ export declare function createStorefrontVerificationPublicRoutes(options?: Store
123
127
  channel: "email" | "sms";
124
128
  destination: string;
125
129
  purpose: string;
126
- status: "expired" | "cancelled" | "pending" | "failed" | "verified";
130
+ status: "pending" | "expired" | "cancelled" | "failed" | "verified";
127
131
  expiresAt: string;
128
132
  verifiedAt: string | null;
129
133
  createdAt: string;
@@ -154,7 +158,7 @@ export declare function createStorefrontVerificationPublicRoutes(options?: Store
154
158
  error: string;
155
159
  };
156
160
  outputFormat: "json";
157
- status: 404 | 400 | 409 | 410 | 501;
161
+ status: 400 | 404 | 409 | 410 | 501;
158
162
  } | {
159
163
  input: {};
160
164
  output: {
@@ -163,7 +167,7 @@ export declare function createStorefrontVerificationPublicRoutes(options?: Store
163
167
  channel: "email" | "sms";
164
168
  destination: string;
165
169
  purpose: string;
166
- status: "expired" | "cancelled" | "pending" | "failed" | "verified";
170
+ status: "pending" | "expired" | "cancelled" | "failed" | "verified";
167
171
  expiresAt: string;
168
172
  verifiedAt: string | null;
169
173
  createdAt: string;
@@ -1 +1 @@
1
- {"version":3,"file":"routes-public.d.ts","sourceRoot":"","sources":["../src/routes-public.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAA;AACnE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AAEjE,OAAO,EAIL,KAAK,qCAAqC,EAC1C,KAAK,6BAA6B,EAClC,KAAK,oCAAoC,EAC1C,MAAM,cAAc,CAAA;AAQrB,KAAK,GAAG,GAAG;IACT,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACjC,SAAS,EAAE;QACT,EAAE,EAAE,kBAAkB,CAAA;QACtB,MAAM,CAAC,EAAE,MAAM,CAAA;KAChB,CAAA;CACF,CAAA;AAED,MAAM,WAAW,mCACf,SAAQ,oCAAoC,EAC1C,qCAAqC;IACvC,kBAAkB,CAAC,EAAE,6BAA6B,CAAC,oBAAoB,CAAC,CAAA;IACxE,gBAAgB,CAAC,EAAE,6BAA6B,CAAC,kBAAkB,CAAC,CAAA;IACpE,SAAS,CAAC,EAAE,aAAa,CAAC,oBAAoB,CAAC,CAAA;IAC/C,gBAAgB,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,aAAa,CAAC,oBAAoB,CAAC,CAAA;CAC9F;AA8CD,wBAAgB,wCAAwC,CACtD,OAAO,CAAC,EAAE,mCAAmC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBAuD9C;AAED,MAAM,MAAM,kCAAkC,GAAG,UAAU,CACzD,OAAO,wCAAwC,CAChD,CAAA"}
1
+ {"version":3,"file":"routes-public.d.ts","sourceRoot":"","sources":["../src/routes-public.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAErD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAA;AACnE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AAEjE,OAAO,EAIL,KAAK,qCAAqC,EAC1C,KAAK,6BAA6B,EAClC,KAAK,oCAAoC,EAC1C,MAAM,cAAc,CAAA;AAQrB,KAAK,GAAG,GAAG;IACT,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACjC,SAAS,EAAE;QACT,SAAS,EAAE,eAAe,CAAA;QAC1B,EAAE,EAAE,kBAAkB,CAAA;QACtB,MAAM,CAAC,EAAE,MAAM,CAAA;KAChB,CAAA;CACF,CAAA;AAED,MAAM,WAAW,mCACf,SAAQ,oCAAoC,EAC1C,qCAAqC;IACvC,kBAAkB,CAAC,EAAE,6BAA6B,CAAC,oBAAoB,CAAC,CAAA;IACxE,gBAAgB,CAAC,EAAE,6BAA6B,CAAC,kBAAkB,CAAC,CAAA;IACpE,SAAS,CAAC,EAAE,aAAa,CAAC,oBAAoB,CAAC,CAAA;IAC/C,gBAAgB,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,aAAa,CAAC,oBAAoB,CAAC,CAAA;CAC9F;AAED,eAAO,MAAM,6CAA6C,6CACd,CAAA;AAE5C,wBAAgB,kCAAkC,CAChD,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACjC,OAAO,CAAC,EAAE,mCAAmC,GAC5C,6BAA6B,CAgB/B;AA2CD,wBAAgB,wCAAwC,CACtD,OAAO,CAAC,EAAE,mCAAmC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBAuD9C;AAED,MAAM,MAAM,kCAAkC,GAAG,UAAU,CACzD,OAAO,wCAAwC,CAChD,CAAA"}
@@ -1,7 +1,9 @@
1
+ import { parseJsonBody } from "@voyantjs/hono";
1
2
  import { Hono } from "hono";
2
3
  import { createStorefrontVerificationSendersFromProviders, createStorefrontVerificationService, StorefrontVerificationError, } from "./service.js";
3
4
  import { confirmEmailVerificationChallengeSchema, confirmSmsVerificationChallengeSchema, startEmailVerificationChallengeSchema, startSmsVerificationChallengeSchema, } from "./validation.js";
4
- function getSenders(bindings, options) {
5
+ export const STOREFRONT_VERIFICATION_SENDERS_CONTAINER_KEY = "providers.storefrontVerification.senders";
6
+ export function buildStorefrontVerificationSenders(bindings, options) {
5
7
  const senders = {
6
8
  sendEmailChallenge: options?.sendEmailChallenge,
7
9
  sendSmsChallenge: options?.sendSmsChallenge,
@@ -16,6 +18,17 @@ function getSenders(bindings, options) {
16
18
  }
17
19
  return senders;
18
20
  }
21
+ function getSenders(bindings, options, resolveFromContainer) {
22
+ if (resolveFromContainer) {
23
+ try {
24
+ return resolveFromContainer(STOREFRONT_VERIFICATION_SENDERS_CONTAINER_KEY);
25
+ }
26
+ catch {
27
+ // Fall back to per-request sender construction when bootstrap has not run.
28
+ }
29
+ }
30
+ return buildStorefrontVerificationSenders(bindings, options);
31
+ }
19
32
  function errorResponse(error) {
20
33
  if (error instanceof StorefrontVerificationError) {
21
34
  if (error.code === "sender_not_configured") {
@@ -39,7 +52,7 @@ export function createStorefrontVerificationPublicRoutes(options) {
39
52
  return new Hono()
40
53
  .post("/email/start", async (c) => {
41
54
  try {
42
- const result = await service.startEmailChallenge(c.get("db"), startEmailVerificationChallengeSchema.parse(await c.req.json()), getSenders(c.env, options));
55
+ const result = await service.startEmailChallenge(c.get("db"), await parseJsonBody(c, startEmailVerificationChallengeSchema), getSenders(c.env, options, (key) => c.var.container.resolve(key)));
43
56
  return c.json({ data: result }, 201);
44
57
  }
45
58
  catch (error) {
@@ -49,7 +62,7 @@ export function createStorefrontVerificationPublicRoutes(options) {
49
62
  })
50
63
  .post("/email/confirm", async (c) => {
51
64
  try {
52
- const result = await service.confirmEmailChallenge(c.get("db"), confirmEmailVerificationChallengeSchema.parse(await c.req.json()));
65
+ const result = await service.confirmEmailChallenge(c.get("db"), await parseJsonBody(c, confirmEmailVerificationChallengeSchema));
53
66
  return c.json({ data: result });
54
67
  }
55
68
  catch (error) {
@@ -59,7 +72,7 @@ export function createStorefrontVerificationPublicRoutes(options) {
59
72
  })
60
73
  .post("/sms/start", async (c) => {
61
74
  try {
62
- const result = await service.startSmsChallenge(c.get("db"), startSmsVerificationChallengeSchema.parse(await c.req.json()), getSenders(c.env, options));
75
+ const result = await service.startSmsChallenge(c.get("db"), await parseJsonBody(c, startSmsVerificationChallengeSchema), getSenders(c.env, options, (key) => c.var.container.resolve(key)));
63
76
  return c.json({ data: result }, 201);
64
77
  }
65
78
  catch (error) {
@@ -69,7 +82,7 @@ export function createStorefrontVerificationPublicRoutes(options) {
69
82
  })
70
83
  .post("/sms/confirm", async (c) => {
71
84
  try {
72
- const result = await service.confirmSmsChallenge(c.get("db"), confirmSmsVerificationChallengeSchema.parse(await c.req.json()));
85
+ const result = await service.confirmSmsChallenge(c.get("db"), await parseJsonBody(c, confirmSmsVerificationChallengeSchema));
73
86
  return c.json({ data: result });
74
87
  }
75
88
  catch (error) {
package/dist/schema.d.ts CHANGED
@@ -95,7 +95,7 @@ export declare const storefrontVerificationChallenges: import("drizzle-orm/pg-co
95
95
  tableName: "storefront_verification_challenges";
96
96
  dataType: "string";
97
97
  columnType: "PgEnumColumn";
98
- data: "expired" | "cancelled" | "pending" | "failed" | "verified";
98
+ data: "pending" | "expired" | "cancelled" | "failed" | "verified";
99
99
  driverParam: string;
100
100
  notNull: true;
101
101
  hasDefault: true;
package/dist/service.d.ts CHANGED
@@ -53,7 +53,7 @@ export declare function createStorefrontVerificationService(options?: Storefront
53
53
  channel: "email" | "sms";
54
54
  destination: string;
55
55
  purpose: string;
56
- status: "expired" | "cancelled" | "pending" | "failed" | "verified";
56
+ status: "pending" | "expired" | "cancelled" | "failed" | "verified";
57
57
  expiresAt: Date;
58
58
  verifiedAt: Date | null;
59
59
  createdAt: Date;
@@ -64,7 +64,7 @@ export declare function createStorefrontVerificationService(options?: Storefront
64
64
  channel: "email" | "sms";
65
65
  destination: string;
66
66
  purpose: string;
67
- status: "expired" | "cancelled" | "pending" | "failed" | "verified";
67
+ status: "pending" | "expired" | "cancelled" | "failed" | "verified";
68
68
  expiresAt: Date;
69
69
  verifiedAt: Date | null;
70
70
  createdAt: Date;
@@ -75,7 +75,7 @@ export declare function createStorefrontVerificationService(options?: Storefront
75
75
  channel: "email" | "sms";
76
76
  destination: string;
77
77
  purpose: string;
78
- status: "expired" | "cancelled" | "pending" | "failed" | "verified";
78
+ status: "pending" | "expired" | "cancelled" | "failed" | "verified";
79
79
  expiresAt: Date;
80
80
  verifiedAt: Date | null;
81
81
  createdAt: Date;
@@ -86,7 +86,7 @@ export declare function createStorefrontVerificationService(options?: Storefront
86
86
  channel: "email" | "sms";
87
87
  destination: string;
88
88
  purpose: string;
89
- status: "expired" | "cancelled" | "pending" | "failed" | "verified";
89
+ status: "pending" | "expired" | "cancelled" | "failed" | "verified";
90
90
  expiresAt: Date;
91
91
  verifiedAt: Date | null;
92
92
  createdAt: Date;
@@ -4,9 +4,9 @@ export declare const storefrontVerificationChannelSchema: z.ZodEnum<{
4
4
  sms: "sms";
5
5
  }>;
6
6
  export declare const storefrontVerificationStatusSchema: z.ZodEnum<{
7
+ pending: "pending";
7
8
  expired: "expired";
8
9
  cancelled: "cancelled";
9
- pending: "pending";
10
10
  failed: "failed";
11
11
  verified: "verified";
12
12
  }>;
@@ -41,9 +41,9 @@ export declare const storefrontVerificationChallengeRecordSchema: z.ZodObject<{
41
41
  destination: z.ZodString;
42
42
  purpose: z.ZodString;
43
43
  status: z.ZodEnum<{
44
+ pending: "pending";
44
45
  expired: "expired";
45
46
  cancelled: "cancelled";
46
- pending: "pending";
47
47
  failed: "failed";
48
48
  verified: "verified";
49
49
  }>;
@@ -61,9 +61,9 @@ export declare const storefrontVerificationStartResultSchema: z.ZodObject<{
61
61
  destination: z.ZodString;
62
62
  purpose: z.ZodString;
63
63
  status: z.ZodEnum<{
64
+ pending: "pending";
64
65
  expired: "expired";
65
66
  cancelled: "cancelled";
66
- pending: "pending";
67
67
  failed: "failed";
68
68
  verified: "verified";
69
69
  }>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@voyantjs/storefront-verification",
3
- "version": "0.5.0",
3
+ "version": "0.6.2",
4
4
  "license": "FSL-1.1-Apache-2.0",
5
5
  "type": "module",
6
6
  "exports": {
@@ -29,10 +29,10 @@
29
29
  "drizzle-orm": "^0.45.2",
30
30
  "hono": "^4.12.10",
31
31
  "zod": "^4.3.6",
32
- "@voyantjs/core": "0.5.0",
33
- "@voyantjs/db": "0.5.0",
34
- "@voyantjs/hono": "0.5.0",
35
- "@voyantjs/notifications": "0.5.0"
32
+ "@voyantjs/core": "0.6.2",
33
+ "@voyantjs/db": "0.6.2",
34
+ "@voyantjs/hono": "0.6.2",
35
+ "@voyantjs/notifications": "0.6.2"
36
36
  },
37
37
  "devDependencies": {
38
38
  "typescript": "^6.0.2",