cli icon indicating copy to clipboard operation
cli copied to clipboard

Add BP mutation to ensure access to a dev store

Open gordonhirsch opened this issue 10 months ago β€’ 5 comments

WHY are these changes introduced?

Support the provisioning of user access to stores through fbusiness platform.

WHAT is this pull request doing?

Adds the graphql and generated code for the BP organizationUserProvisionShopAccess mutation.

Because it requires the new scope (organization.on-demand-user-access) that scope is added to the the list of requested scopes for BP API calls.

Before merging, we'll need to add the new scope to the allowed scopes for the shopify-cli oauth app in identity.

How to test your changes?

Best tested via gthe entire PR stack using the instructions here.

Post-release steps

Measuring impact

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

  • [ ] n/a - this doesn't need measurement, e.g. a linting rule or a bug-fix
  • [x] 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

gordonhirsch avatar Mar 16 '25 00:03 gordonhirsch

This stack of pull requests is managed by Graphite. Learn more about stacking.

gordonhirsch avatar Mar 16 '25 00:03 gordonhirsch

Coverage report

St.:grey_question:
Category Percentage Covered / Total
🟑 Statements
78.02% (+0.03% πŸ”Ό)
12473/15987
🟑 Branches
72.17% (+0.05% πŸ”Ό)
6041/8370
🟑 Functions
78.26% (-0.02% πŸ”»)
3275/4185
🟑 Lines
78.45% (+0.03% πŸ”Ό)
11800/15041
Show new covered files 🐣
St.:grey_question:
File Statements Branches Functions Lines
🟒
... / provision_shop_access.ts
100% 100% 100% 100%
Show files with reduced coverage πŸ”»
St.:grey_question:
File Statements Branches Functions Lines
🟒
... / app.test-data.ts
92.04% (-0.46% πŸ”»)
93.75%
82.56% (-0.97% πŸ”»)
91.44% (-0.49% πŸ”»)
πŸ”΄
... / partners-client.ts
26.14% 31.58%
16.67% (-0.28% πŸ”»)
25.85%

Test suite run success

2869 tests passing in 1254 suites.

Report generated by πŸ§ͺjest coverage report action from 36b074b0d0549b8bc4763802d64bed6f500dd5bf

github-actions[bot] avatar Mar 28 '25 15:03 github-actions[bot]

We detected some changes at packages/*/src and there are no updates in the .changeset. If the changes are user-facing, run "pnpm changeset add" to track your changes and include them in the next release CHANGELOG.

github-actions[bot] avatar Apr 01 '25 22:04 github-actions[bot]

Differences in type declarations

We detected differences in the type declarations generated by Typescript for this branch compared to the baseline ('main' branch). Please, review them to ensure they are backward-compatible. Here are some important things to keep in mind:

  • Some seemingly private modules might be re-exported through public modules.
  • If the branch is behind main you might see odd diffs, rebase main into this branch.

New type declarations

We found no new type declarations in this PR

Existing type declarations

packages/cli-kit/dist/public/common/object.d.ts
@@ -1,4 +1,4 @@
-import { Dictionary, ObjectIterator, PropertyPath, ValueKeyIteratee } from 'lodash';
+import { Dictionary, ObjectIterator, ValueKeyIteratee } from 'lodash';
 /**
  * Deep merges the two objects and returns a new object with the merge result.
  *
@@ -53,7 +53,7 @@ export declare function deepDifference(one: object, two: object): [object, objec
  * @param path - The path of the property to get.
  * @returns - Returns the resolved value.
  */
-export declare function getPathValue<T = object>(object: object, path: PropertyPath): T | undefined;
+export declare function getPathValue<T = object>(object: object, path: string): T | undefined;
 /**
  * Sets the value at path of object. If a portion of path doesn't exist, it's create.
  *
@@ -62,15 +62,7 @@ export declare function getPathValue<T = object>(object: object, path: PropertyP
  * @param value - The value to set.
  * @returns - Returns object.
  */
-export declare function setPathValue(object: object, path: PropertyPath, value?: unknown): object;
-/**
- * Removes the property at path of object.
- *
- * @param object - The object to modify.
- * @param path - The path of the property to unset.
- * @returns - Returns true if the property is deleted or not found, else false.
- */
-export declare function unsetPathValue(object: object, path: PropertyPath): boolean;
+export declare function setPathValue(object: object, path: string, value?: unknown): object;
 /**
  * Checks if value is an empty object, collection, map, or set.
  *

packages/cli-kit/dist/public/common/version.d.ts
@@ -1 +1 @@
-export declare const CLI_KIT_VERSION = "3.78.0";
\ No newline at end of file
+export declare const CLI_KIT_VERSION = "3.77.0";
\ No newline at end of file

packages/cli-kit/dist/public/node/archiver.d.ts
@@ -8,9 +8,9 @@ interface ZipOptions {
      */
     outputZipPath: string;
     /**
-     * Pattern(s) to match when adding files to zip, uses glob expressions.
+     * Pattern to match when adding files to zip, uses glob expressions.
      */
-    matchFilePattern?: string | string[];
+    matchFilePattern?: string;
 }
 /**
  * It zips a directory and by default normalizes the paths to be forward-slash.

packages/cli-kit/dist/public/node/api/business-platform.d.ts
@@ -40,6 +40,6 @@ export declare function businessPlatformOrganizationsRequest<T>(query: string, t
  * @param variables - GraphQL variables to pass to the query.
  * @returns The response of the query of generic type <T>.
  */
-export declare function businessPlatformOrganizationsRequestDoc<TResult>(query: TypedDocumentNode<TResult, GraphQLVariables> | TypedDocumentNode<TResult, Exact<{
+export declare function businessPlatformOrganizationsRequestDoc<TResult, TVariables extends Variables>(query: TypedDocumentNode<TResult, TVariables> | TypedDocumentNode<TResult, Exact<{
     [key: string]: never;
-}>>, token: string, organizationId: string, variables?: GraphQLVariables): Promise<TResult>;
\ No newline at end of file
+}>>, token: string, organizationId: string, variables?: TVariables): Promise<TResult>;
\ No newline at end of file

github-actions[bot] avatar Apr 18 '25 15:04 github-actions[bot]

Differences in type declarations

We detected differences in the type declarations generated by Typescript for this branch compared to the baseline ('main' branch). Please, review them to ensure they are backward-compatible. Here are some important things to keep in mind:

  • Some seemingly private modules might be re-exported through public modules.
  • If the branch is behind main you might see odd diffs, rebase main into this branch.

New type declarations

We found no new type declarations in this PR

Existing type declarations

packages/cli-kit/dist/public/node/api/business-platform.d.ts
@@ -40,6 +40,6 @@ export declare function businessPlatformOrganizationsRequest<T>(query: string, t
  * @param variables - GraphQL variables to pass to the query.
  * @returns The response of the query of generic type <T>.
  */
-export declare function businessPlatformOrganizationsRequestDoc<TResult>(query: TypedDocumentNode<TResult, GraphQLVariables> | TypedDocumentNode<TResult, Exact<{
+export declare function businessPlatformOrganizationsRequestDoc<TResult, TVariables extends Variables>(query: TypedDocumentNode<TResult, TVariables> | TypedDocumentNode<TResult, Exact<{
     [key: string]: never;
-}>>, token: string, organizationId: string, variables?: GraphQLVariables): Promise<TResult>;
\ No newline at end of file
+}>>, token: string, organizationId: string, variables?: TVariables): Promise<TResult>;
\ No newline at end of file

github-actions[bot] avatar Apr 22 '25 18:04 github-actions[bot]

This PR seems inactive. If it's still relevant, please add a comment saying so. Otherwise, take no action. β†’ If there's no activity within a week, then a bot will automatically close this. Thanks for helping to improve Shopify's dev tooling and experience.

github-actions[bot] avatar Jun 01 '25 03:06 github-actions[bot]

We detected some changes at packages/*/src and there are no updates in the .changeset. If the changes are user-facing, run pnpm changeset add to track your changes and include them in the next release CHANGELOG.

[!CAUTION] DO NOT create changesets for features which you do not wish to be included in the public changelog of the next CLI release.

github-actions[bot] avatar Jun 03 '25 16:06 github-actions[bot]