@homespot-sdk/core 0.0.305 → 0.0.307

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.
@@ -324,27 +324,6 @@ export const zRateRecommendationItemRequest = z.object({
324
324
  decision: z.enum(['MAYBE', 'DISLIKE', 'LIKE', 'VISIT']),
325
325
  note: z.optional(z.string().min(0).max(100)),
326
326
  });
327
- export const zSendMessageRequest = z.object({
328
- text: z.string().min(0).max(2000),
329
- });
330
- export const zProblemDetail = z.object({
331
- type: z.optional(z.url()),
332
- title: z.optional(z.string()),
333
- status: z.optional(z
334
- .int()
335
- .min(-2147483648, {
336
- error: 'Invalid value: Expected int32 to be >= -2147483648',
337
- })
338
- .max(2147483647, {
339
- error: 'Invalid value: Expected int32 to be <= 2147483647',
340
- })),
341
- detail: z.optional(z.string()),
342
- instance: z.optional(z.url()),
343
- properties: z.optional(z.record(z.string(), z.unknown())),
344
- });
345
- export const zSendMessageResponse = z.object({
346
- messageId: z.optional(z.uuid()),
347
- });
348
327
  export const zAttendeeRequest = z.object({
349
328
  role: z.enum(['ORGANIZER', 'MEMBER', 'OWNER', 'CLIENT', 'OTHER']),
350
329
  memberId: z.optional(z.uuid()),
@@ -435,6 +414,27 @@ export const zAgencyPrincipalDto = z.object({
435
414
  isActive: z.optional(z.boolean()),
436
415
  isOwner: z.optional(z.boolean()),
437
416
  });
417
+ export const zSendMessageRequest = z.object({
418
+ text: z.string().min(0).max(2000),
419
+ });
420
+ export const zProblemDetail = z.object({
421
+ type: z.optional(z.url()),
422
+ title: z.optional(z.string()),
423
+ status: z.optional(z
424
+ .int()
425
+ .min(-2147483648, {
426
+ error: 'Invalid value: Expected int32 to be >= -2147483648',
427
+ })
428
+ .max(2147483647, {
429
+ error: 'Invalid value: Expected int32 to be <= 2147483647',
430
+ })),
431
+ detail: z.optional(z.string()),
432
+ instance: z.optional(z.url()),
433
+ properties: z.optional(z.record(z.string(), z.unknown())),
434
+ });
435
+ export const zIdResponseUuid = z.object({
436
+ id: z.uuid(),
437
+ });
438
438
  export const zCreateClientRecommendationsRequest = z.object({
439
439
  title: z.string().min(1),
440
440
  interestId: z.coerce
@@ -482,20 +482,14 @@ export const zInterestId = z.object({
482
482
  error: 'Invalid value: Expected int64 to be <= 9223372036854775807',
483
483
  })),
484
484
  });
485
- export const zIdResponseUuid = z.object({
486
- id: z.uuid(),
487
- });
488
485
  export const zContactInfoRequest = z.object({
489
486
  firstName: z.optional(z.string().min(1).max(20)),
490
487
  lastName: z.optional(z.string().min(1).max(20)),
491
488
  gender: z.optional(z.enum(['MALE', 'FEMALE', 'UNKNOWN'])),
492
489
  email: z.optional(z.email()),
493
490
  });
494
- export const zContactTitleRequest = z.object({
495
- title: z.optional(z.string().min(1).max(500)),
496
- });
497
491
  export const zOnboardClientRequest = z.object({
498
- title: zContactTitleRequest,
492
+ title: z.optional(z.string()),
499
493
  contactInfo: zContactInfoRequest,
500
494
  phoneNumber: z.string().min(1).max(20),
501
495
  contactMethods: z.array(z.enum(['WHATSAPP', 'VIBER', 'PHONE_CALL'])),
@@ -1243,6 +1237,12 @@ export const zCursorPageInboxResponse = z.object({
1243
1237
  export const zMessageContent = z.object({
1244
1238
  '@type': z.string(),
1245
1239
  });
1240
+ export const zSentBy = z.object({
1241
+ memberId: z.optional(z.uuid()),
1242
+ firstName: z.optional(z.string()),
1243
+ lastName: z.optional(z.string()),
1244
+ picture: z.optional(z.string()),
1245
+ });
1246
1246
  export const zText = zMessageContent.and(z.object({
1247
1247
  body: z.optional(z.string()),
1248
1248
  '@type': z.literal('Text'),
@@ -1252,18 +1252,34 @@ export const zUnsupported = zMessageContent.and(z.object({
1252
1252
  '@type': z.literal('Unsupported'),
1253
1253
  }));
1254
1254
  export const zMessageView = z.object({
1255
- id: z.optional(z.uuid()),
1256
- direction: z.optional(z.enum(['INBOUND', 'OUTBOUND'])),
1257
- content: z.optional(z.union([zText, zUnsupported])),
1258
- status: z.optional(z.enum(['RECEIVED', 'PENDING', 'SENT', 'DELIVERED', 'READ', 'FAILED'])),
1259
- sentAt: z.optional(z.iso.datetime()),
1260
- deliveredAt: z.optional(z.iso.datetime()),
1261
- readAt: z.optional(z.iso.datetime()),
1255
+ id: z.uuid(),
1256
+ seq: z.coerce
1257
+ .bigint()
1258
+ .min(BigInt('-9223372036854775808'), {
1259
+ error: 'Invalid value: Expected int64 to be >= -9223372036854775808',
1260
+ })
1261
+ .max(BigInt('9223372036854775807'), {
1262
+ error: 'Invalid value: Expected int64 to be <= 9223372036854775807',
1263
+ }),
1264
+ direction: z.enum(['INBOUND', 'OUTBOUND']),
1265
+ content: z.union([zText, zUnsupported]),
1266
+ status: z.enum(['RECEIVED', 'PENDING', 'SENT', 'FAILED']),
1267
+ sentAt: z.iso.datetime(),
1262
1268
  failureReason: z.optional(z.string()),
1263
- sentByMemberId: z.optional(z.uuid()),
1264
- sentByFirstName: z.optional(z.string()),
1265
- sentByLastName: z.optional(z.string()),
1266
- sentByPicture: z.optional(z.string()),
1269
+ sentBy: z.optional(zSentBy),
1270
+ });
1271
+ export const zThreadUpdates = z.object({
1272
+ customerReadUpTo: z.optional(z.iso.datetime()),
1273
+ messages: z.optional(z.array(zMessageView)),
1274
+ nextSeq: z.optional(z.coerce
1275
+ .bigint()
1276
+ .min(BigInt('-9223372036854775808'), {
1277
+ error: 'Invalid value: Expected int64 to be >= -9223372036854775808',
1278
+ })
1279
+ .max(BigInt('9223372036854775807'), {
1280
+ error: 'Invalid value: Expected int64 to be <= 9223372036854775807',
1281
+ })),
1282
+ hasMore: z.optional(z.boolean()),
1267
1283
  });
1268
1284
  export const zCursorPageMessageView = z.object({
1269
1285
  items: z.optional(z.array(zMessageView)),
@@ -2159,17 +2175,6 @@ export const zPostPublicRecomendationsByRecommendationsIdItemsByItemIdRateData =
2159
2175
  * No Content
2160
2176
  */
2161
2177
  export const zPostPublicRecomendationsByRecommendationsIdItemsByItemIdRateResponse = z.void();
2162
- export const zPostMessagingConversationsByConversationIdMessagesData = z.object({
2163
- body: zSendMessageRequest,
2164
- path: z.object({
2165
- conversationId: z.uuid(),
2166
- }),
2167
- query: z.optional(z.never()),
2168
- });
2169
- /**
2170
- * Message persisted and sent
2171
- */
2172
- export const zPostMessagingConversationsByConversationIdMessagesResponse = zSendMessageResponse;
2173
2178
  export const zPostMemberPresignedUrlsData = z.object({
2174
2179
  body: zPhotoRequest,
2175
2180
  path: z.optional(z.never()),
@@ -2255,6 +2260,40 @@ export const zPostInternalPrincipleData = z.object({
2255
2260
  * OK
2256
2261
  */
2257
2262
  export const zPostInternalPrincipleResponse = zAgencyPrincipalDto;
2263
+ export const zGetConversationsByConversationIdMessagesData = z.object({
2264
+ body: z.optional(z.never()),
2265
+ path: z.object({
2266
+ conversationId: z.uuid(),
2267
+ }),
2268
+ query: z.optional(z.object({
2269
+ cursor: z.optional(z.string()),
2270
+ limit: z
2271
+ .optional(z
2272
+ .int()
2273
+ .min(-2147483648, {
2274
+ error: 'Invalid value: Expected int32 to be >= -2147483648',
2275
+ })
2276
+ .max(2147483647, {
2277
+ error: 'Invalid value: Expected int32 to be <= 2147483647',
2278
+ }))
2279
+ .default(30),
2280
+ })),
2281
+ });
2282
+ /**
2283
+ * OK
2284
+ */
2285
+ export const zGetConversationsByConversationIdMessagesResponse = zCursorPageMessageView;
2286
+ export const zPostConversationsByConversationIdMessagesData = z.object({
2287
+ body: zSendMessageRequest,
2288
+ path: z.object({
2289
+ conversationId: z.uuid(),
2290
+ }),
2291
+ query: z.optional(z.never()),
2292
+ });
2293
+ /**
2294
+ * Message persisted and sent
2295
+ */
2296
+ export const zPostConversationsByConversationIdMessagesResponse = zIdResponseUuid;
2258
2297
  export const zPostContactsByContactIdRecommendationsData = z.object({
2259
2298
  body: zCreateClientRecommendationsRequest,
2260
2299
  path: z.object({
@@ -3215,6 +3254,26 @@ export const zGetInboxData = z.object({
3215
3254
  * OK
3216
3255
  */
3217
3256
  export const zGetInboxResponse = zCursorPageInboxResponse;
3257
+ export const zGetInboxContactByContactIdData = z.object({
3258
+ body: z.optional(z.never()),
3259
+ path: z.object({
3260
+ contactId: z.coerce
3261
+ .bigint()
3262
+ .min(BigInt('-9223372036854775808'), {
3263
+ error: 'Invalid value: Expected int64 to be >= -9223372036854775808',
3264
+ })
3265
+ .max(BigInt('9223372036854775807'), {
3266
+ error: 'Invalid value: Expected int64 to be <= 9223372036854775807',
3267
+ }),
3268
+ }),
3269
+ query: z.optional(z.object({
3270
+ status: z.optional(z.enum(['OPEN', 'RESOLVED'])),
3271
+ })),
3272
+ });
3273
+ /**
3274
+ * OK
3275
+ */
3276
+ export const zGetInboxContactByContactIdResponse = z.array(zInboxResponse);
3218
3277
  export const zGetInboxAgencyData = z.object({
3219
3278
  body: z.optional(z.never()),
3220
3279
  path: z.optional(z.never()),
@@ -3237,29 +3296,28 @@ export const zGetInboxAgencyData = z.object({
3237
3296
  * OK
3238
3297
  */
3239
3298
  export const zGetInboxAgencyResponse = zCursorPageInboxResponse;
3240
- export const zGetConversationsByConversationIdMessagesData = z.object({
3299
+ export const zGetConversationsByConversationIdUpdatesData = z.object({
3241
3300
  body: z.optional(z.never()),
3242
3301
  path: z.object({
3243
3302
  conversationId: z.uuid(),
3244
3303
  }),
3245
3304
  query: z.optional(z.object({
3246
- cursor: z.optional(z.string()),
3247
- limit: z
3248
- .optional(z
3249
- .int()
3250
- .min(-2147483648, {
3251
- error: 'Invalid value: Expected int32 to be >= -2147483648',
3305
+ after: z
3306
+ .optional(z.coerce
3307
+ .bigint()
3308
+ .min(BigInt('-9223372036854775808'), {
3309
+ error: 'Invalid value: Expected int64 to be >= -9223372036854775808',
3252
3310
  })
3253
- .max(2147483647, {
3254
- error: 'Invalid value: Expected int32 to be <= 2147483647',
3311
+ .max(BigInt('9223372036854775807'), {
3312
+ error: 'Invalid value: Expected int64 to be <= 9223372036854775807',
3255
3313
  }))
3256
- .default(30),
3314
+ .default(BigInt(0)),
3257
3315
  })),
3258
3316
  });
3259
3317
  /**
3260
3318
  * OK
3261
3319
  */
3262
- export const zGetConversationsByConversationIdMessagesResponse = zCursorPageMessageView;
3320
+ export const zGetConversationsByConversationIdUpdatesResponse = zThreadUpdates;
3263
3321
  export const zGetContactsByContactIdRecommendationsByRecommendationsIdData = z.object({
3264
3322
  body: z.optional(z.never()),
3265
3323
  path: z.object({