cli icon indicating copy to clipboard operation
cli copied to clipboard

Add ability to query organizations API for stores

Open amcaplan opened this issue 1 year ago • 0 comments

WHY are these changes introduced?

Allows us to query the Business Platform Organizations API for dev stores.

Since it sets up access to that API, this also paves the way for querying organization feature flags, which will be required for hosting template specifications. (Note that I successfully attempted querying feature flags with the current permissions, though that work is not reflected in the PR contents.)

WHAT is this pull request doing?

Currently queries the Organizations API for all stores. This covers the work of aligning the returned value to the types required in the CLI, and unblocks any work downstream of store selection.

Not yet addressed is how we will filter the stores to dev stores only, as there is no way to do this in the current API but it will be added later.

NOTE: This will only work pending https://github.com/Shopify/business-platform/pull/19208 and [To be added: PR introducing additional scope access to the CLI identity app]

How to test your changes?

Run dev and see that we are able to get a prompt listing all stores. (It will crash at the next step, this is expected.)

Measuring impact

How do we know this change was effective? Please choose one:

  • [x] n/a - this doesn't need measurement, e.g. a linting rule or a bug-fix
  • [ ] Existing analytics will cater for this addition
  • [ ] PR includes analytics changes to measure impact

Checklist

  • [x] I've considered possible cross-platform impacts (Mac, Linux, Windows)
  • [x] I've considered possible documentation changes
  • [x] I've made sure that any changes to dev or deploy have been reflected in the internal flowchart.

amcaplan avatar May 19 '24 09:05 amcaplan