@spectrum-ts/imessage 5.1.0 → 5.2.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.
package/dist/index.d.ts CHANGED
@@ -199,7 +199,16 @@ declare const imessage: import("@spectrum-ts/core").Platform<import("@spectrum-t
199
199
  token: import("zod").ZodString;
200
200
  phone: import("zod").ZodString;
201
201
  }, import("zod/v4/core").$strip>>]>>;
202
- }, import("zod/v4/core").$strip>]>, import("zod").ZodType<object, unknown, import("zod/v4/core").$ZodTypeInternals<object, unknown>> | undefined, import("zod").ZodObject<{
202
+ }, import("zod/v4/core").$strip>]>, import("zod").ZodObject<{
203
+ address: import("zod").ZodOptional<import("zod").ZodString>;
204
+ country: import("zod").ZodOptional<import("zod").ZodString>;
205
+ service: import("zod").ZodOptional<import("zod").ZodEnum<{
206
+ iMessage: "iMessage";
207
+ unknown: "unknown";
208
+ SMS: "SMS";
209
+ RCS: "RCS";
210
+ }>>;
211
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
203
212
  id: import("zod").ZodString;
204
213
  type: import("zod").ZodEnum<{
205
214
  dm: "dm";
package/dist/index.js CHANGED
@@ -186,7 +186,7 @@ const configSchema = z.union([z.object({ local: z.literal(true) }), z.object({
186
186
  local: z.literal(false).optional().default(false),
187
187
  clients: clientEntry.or(z.array(clientEntry)).optional()
188
188
  })]);
189
- z.object({
189
+ const userSchema = z.object({
190
190
  address: z.string().optional(),
191
191
  country: z.string().optional(),
192
192
  service: z.enum([
@@ -2060,7 +2060,10 @@ const imessage = definePlatform("iMessage", {
2060
2060
  await Promise.all(client.map((entry) => entry.client.close()));
2061
2061
  }
2062
2062
  },
2063
- user: { resolve: async ({ input }) => ({ id: input.userID }) },
2063
+ user: {
2064
+ schema: userSchema,
2065
+ resolve: async ({ input }) => ({ id: input.userID })
2066
+ },
2064
2067
  space: {
2065
2068
  schema: spaceSchema,
2066
2069
  params: spaceParamsSchema,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spectrum-ts/imessage",
3
- "version": "5.1.0",
3
+ "version": "5.2.0",
4
4
  "description": "iMessage provider for spectrum-ts — local and remote (advanced) modes.",
5
5
  "repository": {
6
6
  "type": "git",