Skip to content

Variable: threadSchema ​

ts
const threadSchema: ZodObject<{
  is_group: ZodOptional<ZodBoolean>;
  items: ZodOptional<ZodArray<ZodObject<{
     item_id: ZodOptional<ZodString>;
     item_type: ZodOptional<ZodString>;
     text: ZodOptional<ZodString>;
     timestamp: ZodOptional<ZodCoercedString<unknown>>;
     user_id: ZodOptional<ZodCoercedString<unknown>>;
  }, $loose>>>;
  last_activity_at: ZodOptional<ZodCoercedString<unknown>>;
  last_permanent_item: ZodOptional<ZodObject<{
     item_id: ZodOptional<ZodString>;
     item_type: ZodOptional<ZodString>;
     text: ZodOptional<ZodString>;
     timestamp: ZodOptional<ZodCoercedString<unknown>>;
     user_id: ZodOptional<ZodCoercedString<unknown>>;
  }, $loose>>;
  thread_id: ZodOptional<ZodString>;
  thread_title: ZodOptional<ZodString>;
  users: ZodOptional<ZodArray<ZodObject<{
     biography: ZodOptional<ZodString>;
     external_url: ZodOptional<ZodNullable<ZodString>>;
     follower_count: ZodOptional<ZodNullable<ZodNumber>>;
     following_count: ZodOptional<ZodNullable<ZodNumber>>;
     full_name: ZodOptional<ZodString>;
     is_private: ZodOptional<ZodBoolean>;
     is_verified: ZodOptional<ZodBoolean>;
     media_count: ZodOptional<ZodNullable<ZodNumber>>;
     pk: ZodOptional<ZodCoercedString<unknown>>;
     profile_pic_url: ZodOptional<ZodNullable<ZodString>>;
     username: ZodOptional<ZodString>;
  }, $loose>>>;
}, $loose>;

A direct thread. The inbox returns threads with a last_permanent_item. The thread endpoint fills items. The author list is the shared User model.

MIT License. Not affiliated with, endorsed or sponsored by Meta or Instagram.