@homespot-sdk/core 0.0.306 → 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,9 +482,6 @@ 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)),
@@ -1240,6 +1237,12 @@ export const zCursorPageInboxResponse = z.object({
1240
1237
  export const zMessageContent = z.object({
1241
1238
  '@type': z.string(),
1242
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
+ });
1243
1246
  export const zText = zMessageContent.and(z.object({
1244
1247
  body: z.optional(z.string()),
1245
1248
  '@type': z.literal('Text'),
@@ -1249,18 +1252,34 @@ export const zUnsupported = zMessageContent.and(z.object({
1249
1252
  '@type': z.literal('Unsupported'),
1250
1253
  }));
1251
1254
  export const zMessageView = z.object({
1252
- id: z.optional(z.uuid()),
1253
- direction: z.optional(z.enum(['INBOUND', 'OUTBOUND'])),
1254
- content: z.optional(z.union([zText, zUnsupported])),
1255
- status: z.optional(z.enum(['RECEIVED', 'PENDING', 'SENT', 'DELIVERED', 'READ', 'FAILED'])),
1256
- sentAt: z.optional(z.iso.datetime()),
1257
- deliveredAt: z.optional(z.iso.datetime()),
1258
- 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(),
1259
1268
  failureReason: z.optional(z.string()),
1260
- sentByMemberId: z.optional(z.uuid()),
1261
- sentByFirstName: z.optional(z.string()),
1262
- sentByLastName: z.optional(z.string()),
1263
- 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()),
1264
1283
  });
1265
1284
  export const zCursorPageMessageView = z.object({
1266
1285
  items: z.optional(z.array(zMessageView)),
@@ -2156,17 +2175,6 @@ export const zPostPublicRecomendationsByRecommendationsIdItemsByItemIdRateData =
2156
2175
  * No Content
2157
2176
  */
2158
2177
  export const zPostPublicRecomendationsByRecommendationsIdItemsByItemIdRateResponse = z.void();
2159
- export const zPostMessagingConversationsByConversationIdMessagesData = z.object({
2160
- body: zSendMessageRequest,
2161
- path: z.object({
2162
- conversationId: z.uuid(),
2163
- }),
2164
- query: z.optional(z.never()),
2165
- });
2166
- /**
2167
- * Message persisted and sent
2168
- */
2169
- export const zPostMessagingConversationsByConversationIdMessagesResponse = zSendMessageResponse;
2170
2178
  export const zPostMemberPresignedUrlsData = z.object({
2171
2179
  body: zPhotoRequest,
2172
2180
  path: z.optional(z.never()),
@@ -2252,6 +2260,40 @@ export const zPostInternalPrincipleData = z.object({
2252
2260
  * OK
2253
2261
  */
2254
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;
2255
2297
  export const zPostContactsByContactIdRecommendationsData = z.object({
2256
2298
  body: zCreateClientRecommendationsRequest,
2257
2299
  path: z.object({
@@ -3212,6 +3254,26 @@ export const zGetInboxData = z.object({
3212
3254
  * OK
3213
3255
  */
3214
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);
3215
3277
  export const zGetInboxAgencyData = z.object({
3216
3278
  body: z.optional(z.never()),
3217
3279
  path: z.optional(z.never()),
@@ -3234,29 +3296,28 @@ export const zGetInboxAgencyData = z.object({
3234
3296
  * OK
3235
3297
  */
3236
3298
  export const zGetInboxAgencyResponse = zCursorPageInboxResponse;
3237
- export const zGetConversationsByConversationIdMessagesData = z.object({
3299
+ export const zGetConversationsByConversationIdUpdatesData = z.object({
3238
3300
  body: z.optional(z.never()),
3239
3301
  path: z.object({
3240
3302
  conversationId: z.uuid(),
3241
3303
  }),
3242
3304
  query: z.optional(z.object({
3243
- cursor: z.optional(z.string()),
3244
- limit: z
3245
- .optional(z
3246
- .int()
3247
- .min(-2147483648, {
3248
- 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',
3249
3310
  })
3250
- .max(2147483647, {
3251
- error: 'Invalid value: Expected int32 to be <= 2147483647',
3311
+ .max(BigInt('9223372036854775807'), {
3312
+ error: 'Invalid value: Expected int64 to be <= 9223372036854775807',
3252
3313
  }))
3253
- .default(30),
3314
+ .default(BigInt(0)),
3254
3315
  })),
3255
3316
  });
3256
3317
  /**
3257
3318
  * OK
3258
3319
  */
3259
- export const zGetConversationsByConversationIdMessagesResponse = zCursorPageMessageView;
3320
+ export const zGetConversationsByConversationIdUpdatesResponse = zThreadUpdates;
3260
3321
  export const zGetContactsByContactIdRecommendationsByRecommendationsIdData = z.object({
3261
3322
  body: z.optional(z.never()),
3262
3323
  path: z.object({