web-api: type is_stoppable and date_status_processing_expire on conversations.list agent statuses

Đang mở Phù hợp với người mới
#2,900 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
72/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
typescript
Lĩnh vực
api

Hướng nghiên cứu

Bắt đầu bằng cách đọc scripts/generate-web-api-types.sh và các phản hồi API đã ghi lại trong slackapi/java-slack-sdk's json-logs/samples/api. Kiểm tra các mẫu conversations.list và users.conversations để tìm trạng thái agent, sau đó lần theo luồng tạo mã để xem AgentStatus được định nghĩa như thế nào. Hoàn tất khi các kiểu phản hồi được tạo có hai trường tùy chọn trong cả hai phản hồi, khớp với ConversationsHistoryResponse.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

area:typescript enhancement pkg:web-api
Summary

In #2899, the AgentStatus type in ConversationsListResponse and UsersConversationsResponse has only agent_bot_user_id and status, while ConversationsHistoryResponse already types it with date_status_processing_expire and is_stoppable too. On conversations.list, agent_statuses was any[] before #2899, so code that reads those two fields from a conversations.list agent session no longer compiles.

Expected

AgentStatus in ConversationsListResponse and UsersConversationsResponse matches ConversationsHistoryResponse, with date_status_processing_expire?: number and is_stoppable?: boolean.

Approach

These types are generated by scripts/generate-web-api-types.sh from the recorded responses in slackapi/java-slack-sdk json-logs/samples/api. Once the recorded conversations.list and users.conversations responses include agent statuses with these fields, the next regeneration picks them up.

Raised in review: https://github.com/slackapi/node-slack-sdk/pull/2899#discussion_r4793467957

Ngôn ngữ chính
TypeScript
Star
3.4k
Fork
694
Merge trung bình
1 ngày 10 giờ
Pull request đã merge (30 ngày)
75

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của slackapi/node-slack-sdk

Tất cả issue của slackapi/node-slack-sdk

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.