seratch / slack-edge

Slack app development framework for edge functions with streamlined TypeScript support
https://github.com/seratch/slack-edge-app-template
MIT License
87 stars 5 forks source link

Update types for uploaded file dimension fields #17

Closed StephenTangCook closed 6 months ago

StephenTangCook commented 6 months ago

Change

Update the types of original_w and original_h fields to be number for various slack File-related types.

Ref

Example UploadedFile object when uploading a file via a modal (note original_w and original_h):

{
  id: 'F06KZDE4L2Z',
  created: 1708578780,
  timestamp: 1708578780,
  name: 'screely-1708464493924.png',
  title: 'screely-1708464493924.png',
  mimetype: 'image/png',
  filetype: 'png',
  pretty_type: 'PNG',
  user: ...,
  user_team: ...,
  editable: false,
  size: 2187248,
  mode: 'hosted',
  is_external: false,
  external_type: '',
  is_public: false,
  public_url_shared: false,
  display_as_bot: false,
  username: ...,
  url_private: ...,
  url_private_download: ...,
  media_display_type: 'unknown',
  thumb_...
  original_w: 2654,
  original_h: 1358,
  thumb_tiny: ...,
  permalink: ...,
  permalink_public: ...,
  comments_count: 0,
  shares: {},
  channels: [],
  groups: [],
  ims: [],
  has_more_shares: false,
  has_rich_preview: false,
  file_access: 'visible'
}