waha-shared 1.0.532-orpc.2 → 1.0.533-orpc-app-client.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.
@@ -1,11 +1,13 @@
1
1
  // contract/fields.ts
2
2
  import z from "zod";
3
3
  var QueryBoolean = z.union([z.boolean(), z.stringbool()]);
4
- var Email = z.string().trim().toLowerCase().pipe(z.email());
4
+ var EMAIL_MAX_LENGTH = 254;
5
+ var Email = z.string().trim().max(EMAIL_MAX_LENGTH).toLowerCase().pipe(z.email());
5
6
  var Name = z.string().trim().max(200);
6
7
 
7
8
  export {
8
9
  QueryBoolean,
10
+ EMAIL_MAX_LENGTH,
9
11
  Email,
10
12
  Name
11
13
  };
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  forms
3
- } from "./chunk-2MRJ3NHH.mjs";
3
+ } from "./chunk-NNABTW2O.mjs";
4
4
  import {
5
5
  location
6
6
  } from "./chunk-B6AHOHTE.mjs";
7
7
  import {
8
8
  resend
9
- } from "./chunk-HQZNMKDF.mjs";
9
+ } from "./chunk-CIH644YK.mjs";
10
10
  import {
11
11
  content
12
- } from "./chunk-YHXIMP5W.mjs";
12
+ } from "./chunk-7ZNOTSZE.mjs";
13
13
  import {
14
14
  donations
15
15
  } from "./chunk-WABRK7MS.mjs";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  QueryBoolean
3
- } from "./chunk-TR5OECTS.mjs";
3
+ } from "./chunk-3U6OCX3W.mjs";
4
4
  import {
5
5
  publicProcedure
6
6
  } from "./chunk-RQBWI27C.mjs";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  Email,
3
3
  Name
4
- } from "./chunk-TR5OECTS.mjs";
4
+ } from "./chunk-3U6OCX3W.mjs";
5
5
  import {
6
6
  accountProcedure,
7
7
  procedure,
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  Email,
3
3
  Name
4
- } from "./chunk-TR5OECTS.mjs";
4
+ } from "./chunk-3U6OCX3W.mjs";
5
5
  import {
6
6
  procedure,
7
7
  publicProcedure
@@ -30,6 +30,8 @@ var FeedbackFields = z.object({
30
30
  app: z.object({ version: z.string(), os: z.enum(["ios", "android", "web"]) }).optional()
31
31
  });
32
32
  var Message = z.string().trim().min(1).max(5e3);
33
+ var Goals = z.string().trim().min(1).max(1e3);
34
+ var Hear = z.string().trim().max(1e3);
33
35
  var FeedbackBody = z.discriminatedUnion("form", [
34
36
  FeedbackFields.extend({
35
37
  form: z.literal("contact"),
@@ -41,8 +43,8 @@ var FeedbackBody = z.discriminatedUnion("form", [
41
43
  FeedbackFields.extend({
42
44
  form: z.literal("code-request"),
43
45
  journey: z.enum(JOURNEY_OPTION_KEYS),
44
- goals: z.string().trim().min(1).max(1e3),
45
- hear: z.string().trim().max(1e3).optional()
46
+ goals: Goals,
47
+ hear: Hear.optional()
46
48
  })
47
49
  ]);
48
50
  var feedback = procedure.route({ method: "POST", path: "/feedback" }).errors({ UPSTREAM_FAILED }).input(FeedbackBody).output(z.void());
@@ -58,14 +60,15 @@ var DmmFamiliarity = z.enum([
58
60
  "I have started 2-3 generations of discovery groups or churches",
59
61
  "I have over 4 generations of discovery groups or churches"
60
62
  ]);
63
+ var VolunteerLanguages = z.string().trim().min(1).max(1e3);
64
+ var AnythingElse = z.string().trim().max(5e3);
61
65
  var VolunteerFormBody = z.object({
62
66
  name: Name.min(1),
63
67
  email: Email,
64
- /** Free text: the languages they'd like to see in Waha. */
65
- languages: z.string().trim().min(1).max(1e3),
68
+ languages: VolunteerLanguages,
66
69
  involvement: VolunteerInvolvement,
67
70
  dmm_familiarity: DmmFamiliarity,
68
- anything_else: z.string().trim().max(5e3).optional()
71
+ anything_else: AnythingElse.optional()
69
72
  });
70
73
  var volunteer = procedure.route({ method: "POST", path: "/submit-volunteer" }).errors({ UPSTREAM_FAILED }).input(VolunteerFormBody).output(z.void());
71
74
  var microLesson = publicProcedure.route({ method: "POST", path: "/submit-micro-lesson" }).errors({ UPSTREAM_FAILED }).input(
@@ -80,9 +83,14 @@ var microLesson = publicProcedure.route({ method: "POST", path: "/submit-micro-l
80
83
  var forms = { feedback, volunteer, microLesson };
81
84
 
82
85
  export {
86
+ Message,
87
+ Goals,
88
+ Hear,
83
89
  FeedbackBody,
84
90
  VolunteerInvolvement,
85
91
  DmmFamiliarity,
92
+ VolunteerLanguages,
93
+ AnythingElse,
86
94
  VolunteerFormBody,
87
95
  forms
88
96
  };
@@ -3,8 +3,8 @@ import {
3
3
  ContentLanguagesResponse,
4
4
  MicroLessonsResponse,
5
5
  content
6
- } from "../chunks/chunk-YHXIMP5W.mjs";
7
- import "../chunks/chunk-TR5OECTS.mjs";
6
+ } from "../chunks/chunk-7ZNOTSZE.mjs";
7
+ import "../chunks/chunk-3U6OCX3W.mjs";
8
8
  import "../chunks/chunk-RQBWI27C.mjs";
9
9
  import "../chunks/chunk-NCJ6KJVG.mjs";
10
10
  import "../chunks/chunk-AJDVACGU.mjs";
@@ -5,6 +5,11 @@ import z from 'zod';
5
5
  * callers still pass a real boolean.
6
6
  */
7
7
  export declare const QueryBoolean: z.ZodUnion<readonly [z.ZodBoolean, z.ZodCodec<z.ZodString, z.ZodBoolean>]>;
8
+ /**
9
+ * The longest valid email address (RFC 5321). Its own constant, since a form
10
+ * can't read `maxLength` off `Email`, which is a pipe.
11
+ */
12
+ export declare const EMAIL_MAX_LENGTH = 254;
8
13
  /**
9
14
  * An email address someone typed into a form. Lowercased, so the same address
10
15
  * typed differently matches one contact.
@@ -1,10 +1,12 @@
1
1
  import {
2
+ EMAIL_MAX_LENGTH,
2
3
  Email,
3
4
  Name,
4
5
  QueryBoolean
5
- } from "../chunks/chunk-TR5OECTS.mjs";
6
+ } from "../chunks/chunk-3U6OCX3W.mjs";
6
7
  import "../chunks/chunk-5AVXA5JL.mjs";
7
8
  export {
9
+ EMAIL_MAX_LENGTH,
8
10
  Email,
9
11
  Name,
10
12
  QueryBoolean
@@ -1,4 +1,7 @@
1
1
  import z from 'zod';
2
+ export declare const Message: z.ZodString;
3
+ export declare const Goals: z.ZodString;
4
+ export declare const Hear: z.ZodString;
2
5
  /**
3
6
  * A feedback form, with the fields that form asks for. The server adds who
4
7
  * sent it (the ID token's uid), where from (Vercel's geolocation headers), and
@@ -68,6 +71,9 @@ export declare const DmmFamiliarity: z.ZodEnum<{
68
71
  "I have started 2-3 generations of discovery groups or churches": "I have started 2-3 generations of discovery groups or churches";
69
72
  "I have over 4 generations of discovery groups or churches": "I have over 4 generations of discovery groups or churches";
70
73
  }>;
74
+ /** Free text: the languages a volunteer would like to see in Waha. */
75
+ export declare const VolunteerLanguages: z.ZodString;
76
+ export declare const AnythingElse: z.ZodString;
71
77
  /** A website add-your-language form, as saved to `volunteers`. */
72
78
  export declare const VolunteerFormBody: z.ZodObject<{
73
79
  name: z.ZodString;
@@ -1,11 +1,16 @@
1
1
  import {
2
+ AnythingElse,
2
3
  DmmFamiliarity,
3
4
  FeedbackBody,
5
+ Goals,
6
+ Hear,
7
+ Message,
4
8
  VolunteerFormBody,
5
9
  VolunteerInvolvement,
10
+ VolunteerLanguages,
6
11
  forms
7
- } from "../chunks/chunk-2MRJ3NHH.mjs";
8
- import "../chunks/chunk-TR5OECTS.mjs";
12
+ } from "../chunks/chunk-NNABTW2O.mjs";
13
+ import "../chunks/chunk-3U6OCX3W.mjs";
9
14
  import "../chunks/chunk-RQBWI27C.mjs";
10
15
  import "../chunks/chunk-NCJ6KJVG.mjs";
11
16
  import "../chunks/chunk-XIRJNFTI.mjs";
@@ -15,9 +20,14 @@ import "../chunks/chunk-OPBYJMFJ.mjs";
15
20
  import "../chunks/chunk-AOV74NGM.mjs";
16
21
  import "../chunks/chunk-5AVXA5JL.mjs";
17
22
  export {
23
+ AnythingElse,
18
24
  DmmFamiliarity,
19
25
  FeedbackBody,
26
+ Goals,
27
+ Hear,
28
+ Message,
20
29
  VolunteerFormBody,
21
30
  VolunteerInvolvement,
31
+ VolunteerLanguages,
22
32
  forms
23
33
  };
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  contract
3
- } from "../chunks/chunk-JGHPELIU.mjs";
4
- import "../chunks/chunk-2MRJ3NHH.mjs";
3
+ } from "../chunks/chunk-5JH2NRCU.mjs";
4
+ import "../chunks/chunk-NNABTW2O.mjs";
5
5
  import "../chunks/chunk-B6AHOHTE.mjs";
6
- import "../chunks/chunk-HQZNMKDF.mjs";
7
- import "../chunks/chunk-YHXIMP5W.mjs";
8
- import "../chunks/chunk-TR5OECTS.mjs";
6
+ import "../chunks/chunk-CIH644YK.mjs";
7
+ import "../chunks/chunk-7ZNOTSZE.mjs";
8
+ import "../chunks/chunk-3U6OCX3W.mjs";
9
9
  import "../chunks/chunk-WABRK7MS.mjs";
10
10
  import "../chunks/chunk-RQBWI27C.mjs";
11
11
  import "../chunks/chunk-NCJ6KJVG.mjs";
@@ -4,8 +4,8 @@ import {
4
4
  SubscribeDripBody,
5
5
  UnsubscribeBody,
6
6
  resend
7
- } from "../chunks/chunk-HQZNMKDF.mjs";
8
- import "../chunks/chunk-TR5OECTS.mjs";
7
+ } from "../chunks/chunk-CIH644YK.mjs";
8
+ import "../chunks/chunk-3U6OCX3W.mjs";
9
9
  import "../chunks/chunk-RQBWI27C.mjs";
10
10
  import "../chunks/chunk-NCJ6KJVG.mjs";
11
11
  import "../chunks/chunk-IIGS6PNG.mjs";
package/dist/contract.mjs CHANGED
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  contract
3
- } from "./chunks/chunk-JGHPELIU.mjs";
4
- import "./chunks/chunk-2MRJ3NHH.mjs";
3
+ } from "./chunks/chunk-5JH2NRCU.mjs";
4
+ import "./chunks/chunk-NNABTW2O.mjs";
5
5
  import "./chunks/chunk-B6AHOHTE.mjs";
6
- import "./chunks/chunk-HQZNMKDF.mjs";
7
- import "./chunks/chunk-YHXIMP5W.mjs";
8
- import "./chunks/chunk-TR5OECTS.mjs";
6
+ import "./chunks/chunk-CIH644YK.mjs";
7
+ import "./chunks/chunk-7ZNOTSZE.mjs";
8
+ import "./chunks/chunk-3U6OCX3W.mjs";
9
9
  import "./chunks/chunk-WABRK7MS.mjs";
10
10
  import "./chunks/chunk-RQBWI27C.mjs";
11
11
  import "./chunks/chunk-NCJ6KJVG.mjs";
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  contract
3
- } from "../chunks/chunk-JGHPELIU.mjs";
4
- import "../chunks/chunk-2MRJ3NHH.mjs";
3
+ } from "../chunks/chunk-5JH2NRCU.mjs";
4
+ import "../chunks/chunk-NNABTW2O.mjs";
5
5
  import "../chunks/chunk-B6AHOHTE.mjs";
6
- import "../chunks/chunk-HQZNMKDF.mjs";
7
- import "../chunks/chunk-YHXIMP5W.mjs";
8
- import "../chunks/chunk-TR5OECTS.mjs";
6
+ import "../chunks/chunk-CIH644YK.mjs";
7
+ import "../chunks/chunk-7ZNOTSZE.mjs";
8
+ import "../chunks/chunk-3U6OCX3W.mjs";
9
9
  import "../chunks/chunk-WABRK7MS.mjs";
10
10
  import {
11
11
  ApiAuth,
@@ -6,6 +6,7 @@ export declare const Feedback: z.ZodObject<{
6
6
  timeSubmitted: z.ZodNumber;
7
7
  formName: z.ZodString;
8
8
  country: z.ZodOptional<z.ZodString>;
9
+ region: z.ZodOptional<z.ZodString>;
9
10
  city: z.ZodOptional<z.ZodString>;
10
11
  lessonId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
11
12
  wahaUserId: z.ZodOptional<z.ZodString>;
@@ -9,6 +9,7 @@ var Feedback = z.object({
9
9
  timeSubmitted: z.number(),
10
10
  formName: z.string(),
11
11
  country: z.string().optional(),
12
+ region: z.string().optional(),
12
13
  city: z.string().optional(),
13
14
  lessonId: z.string().nullable().optional(),
14
15
  wahaUserId: z.string().optional(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "waha-shared",
3
- "version": "1.0.532-orpc.2",
3
+ "version": "1.0.533-orpc-app-client.0",
4
4
  "author": "Waha",
5
5
  "dependencies": {
6
6
  "@types/signale": "^1.4.7",