CrowdStrike / gofalcon

Golang-based SDK to CrowdStrike's APIs
MIT License
58 stars 43 forks source link

Transform fixes for falconjs #444

Closed evanstoner closed 1 month ago

evanstoner commented 1 month ago

Three types of fixes:

  1. Parameters of type array that define an enum at the parameter root, versus on the items of the parameter, are incorrect since the root enum would define possible array values. We want to define possible values for strings in the array. Move those enums under items. NOTE: the parameter index is hardcoded...I see this done one other place in the file already but it makes me nervous. There is probably a smarter way to search for an array element with a value?
  2. SavedSearchExecuteRequestV1 defined Parameters object with string values and another parameters object with no defined value. Prefer the uppercase one since it's more specific.
  3. AccessTokenResponseV1 doesn't define any required fields, so in typescript the accessToken is string | undefined. This makes it incompatible with strings. Seems like if we have a token response, it's definitely going to have a token in it.
evanstoner commented 1 month ago

Adding these directly to falconjs. https://github.com/CrowdStrike/falconjs/pull/211