jemgold / figma-js

Little wrapper (+ types) for the Figma API
https://jongold.github.io/figma-js/
MIT License
490 stars 47 forks source link

fix: double cursor property typing #51

Closed erictaylor closed 3 years ago

erictaylor commented 3 years ago

Bug fix

Typing for TeamComponentsResponse and TeamStylesResponse has pagination fields typed as:

response.meta.cursor.cursor.{after|before}`

Typing for TeamComponentsResponse and TeamStylesResponse has corrected typing for pagination meta:

response.meta.cursor.{after|before}

Figma API: https://www.figma.com/developers/api#get-team-styles-endpoint

{
  "status": Number,
  "error": Boolean,
  "meta": { 
    "styles": [
      {
       "key": String,
       "file_key": String,
       "node_id": String,
       "style_type": StyleType,
       "thumbnail_url": String,
       "name": String,
       "description": String,
       "updated_at": String,
       "created_at": String,
       "sort_position": String,
       "user": User, 
       },
      ...
    ],
    "cursor": { 
      "before": Number,
      "after": Number,
    }, 
   }, 
}
erictaylor commented 3 years ago

@chrisdrackett any idea when a release will be cut with this fix?