Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get account info from client #5623

Draft
wants to merge 1 commit into
base: zl/identification_for_partner_or_dev_dash_orgs
Choose a base branch
from

Conversation

zzooeeyy
Copy link
Contributor

@zzooeeyy zzooeeyy commented Apr 8, 2025

WHY are these changes introduced?

Fixes #0000

WHAT is this pull request doing?

How to test your changes?

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
  • Existing analytics will cater for this addition
  • PR includes analytics changes to measure impact

Checklist

  • I've considered possible cross-platform impacts (Mac, Linux, Windows)
  • I've considered possible documentation changes

Copy link
Contributor Author

zzooeeyy commented Apr 8, 2025

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

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

Copy link
Contributor

github-actions bot commented Apr 8, 2025

Coverage report

St.
Category Percentage Covered / Total
🟡 Statements
76.51% (-0.06% 🔻)
9398/12284
🟡 Branches
71.63% (-0.05% 🔻)
4602/6425
🟡 Functions
76.23% (-0.09% 🔻)
2441/3202
🟡 Lines
77.03% (-0.06% 🔻)
8885/11535
Show files with reduced coverage 🔻
St.
File Statements Branches Functions Lines
🔴
... / current_account_info.ts
10% (-50% 🔻)
0% (-33.33% 🔻)
0% (-100% 🔻)
10% (-50% 🔻)
🟢
... / app.test-data.ts
92% (-0.5% 🔻)
93.75%
82.35% (-1.18% 🔻)
91.4% (-0.54% 🔻)
🟢
... / fetch.ts
84.09% (-0.35% 🔻)
75% 77.78%
84.62% (-0.38% 🔻)
🟢
... / ConcurrentOutput.tsx
98.36% (-1.64% 🔻)
88% (-4% 🔻)
100%
98.33% (-1.67% 🔻)

Test suite run success

2177 tests passing in 954 suites.

Report generated by 🧪jest coverage report action from 0c55307

@zzooeeyy zzooeeyy force-pushed the zl/add_cli_token_support_for_app_management_and_bp_api branch from ce7514a to 18e783a Compare April 8, 2025 20:35
@zzooeeyy zzooeeyy force-pushed the zl/get_account_info_from_client branch from 74503b1 to b5863b9 Compare April 8, 2025 20:35
@zzooeeyy zzooeeyy force-pushed the zl/add_cli_token_support_for_app_management_and_bp_api branch from 18e783a to a50e3a7 Compare April 9, 2025 15:38
@zzooeeyy zzooeeyy force-pushed the zl/get_account_info_from_client branch from b5863b9 to 26ee75a Compare April 9, 2025 15:38
@zzooeeyy zzooeeyy force-pushed the zl/add_cli_token_support_for_app_management_and_bp_api branch from a50e3a7 to 06c54fd Compare April 9, 2025 16:44
@zzooeeyy zzooeeyy force-pushed the zl/get_account_info_from_client branch from 26ee75a to c4af871 Compare April 9, 2025 16:44
@zzooeeyy zzooeeyy changed the base branch from zl/add_cli_token_support_for_app_management_and_bp_api to zl/identification_for_partner_or_dev_dash_orgs April 9, 2025 16:44
@zzooeeyy zzooeeyy force-pushed the zl/identification_for_partner_or_dev_dash_orgs branch from 92b0424 to 8fb695f Compare April 9, 2025 17:15
@zzooeeyy zzooeeyy force-pushed the zl/get_account_info_from_client branch from c4af871 to 09e8fe2 Compare April 9, 2025 17:15
@zzooeeyy zzooeeyy force-pushed the zl/identification_for_partner_or_dev_dash_orgs branch from 8fb695f to fc65f64 Compare April 9, 2025 17:30
@zzooeeyy zzooeeyy force-pushed the zl/get_account_info_from_client branch from 09e8fe2 to b350ff1 Compare April 9, 2025 17:30
@zzooeeyy zzooeeyy force-pushed the zl/identification_for_partner_or_dev_dash_orgs branch from fc65f64 to 87b2088 Compare April 9, 2025 19:00
@zzooeeyy zzooeeyy force-pushed the zl/get_account_info_from_client branch from b350ff1 to 3f47bab Compare April 9, 2025 19:00
@zzooeeyy zzooeeyy force-pushed the zl/identification_for_partner_or_dev_dash_orgs branch from 87b2088 to 42273aa Compare April 9, 2025 19:06
@zzooeeyy zzooeeyy force-pushed the zl/get_account_info_from_client branch from 3f47bab to 576a682 Compare April 9, 2025 19:06
@zzooeeyy zzooeeyy force-pushed the zl/identification_for_partner_or_dev_dash_orgs branch from 42273aa to a3144a0 Compare April 9, 2025 19:48
@zzooeeyy zzooeeyy force-pushed the zl/get_account_info_from_client branch from 576a682 to 2a1690f Compare April 9, 2025 19:48
@zzooeeyy zzooeeyy force-pushed the zl/identification_for_partner_or_dev_dash_orgs branch from a3144a0 to d138af7 Compare April 9, 2025 22:49
@zzooeeyy zzooeeyy force-pushed the zl/get_account_info_from_client branch from 2a1690f to 8218215 Compare April 9, 2025 22:49
@zzooeeyy zzooeeyy force-pushed the zl/identification_for_partner_or_dev_dash_orgs branch from d138af7 to 2309d2c Compare April 10, 2025 14:58
@zzooeeyy zzooeeyy force-pushed the zl/get_account_info_from_client branch from 8218215 to c325763 Compare April 10, 2025 14:58
Co-authored-by: Zoey Lan <zoey.lan@shopify.com>
@zzooeeyy zzooeeyy force-pushed the zl/identification_for_partner_or_dev_dash_orgs branch from 2309d2c to 2ea27c2 Compare April 10, 2025 17:30
@zzooeeyy zzooeeyy force-pushed the zl/get_account_info_from_client branch from c325763 to 0c55307 Compare April 10, 2025 17:30
Copy link
Contributor

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/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/private/node/session/exchange.d.ts
@@ -26,15 +26,33 @@ export declare function exchangeAccessForApplicationTokens(identityToken: Identi
  */
 export declare function refreshAccessToken(currentToken: IdentityToken): Promise<IdentityToken>;
 /**
- * Given a custom CLI token passed as ENV variable, request a valid partners API token
+ * Given a custom CLI token passed as ENV variable, request a valid Partners API token
  * This token does not accept extra scopes, just the cli one.
- * @param token - The CLI token passed as ENV variable
+ * @param token - The CLI token passed as ENV variable 
  * @returns An instance with the application access tokens.
  */
 export declare function exchangeCustomPartnerToken(token: string): Promise<{
     accessToken: string;
     userId: string;
 }>;
+/**
+ * Given a custom CLI token passed as ENV variable, request a valid App Management API token
+ * @param token - The CLI token passed as ENV variable 
+ * @returns An instance with the application access tokens.
+ */
+export declare function exchangeCliTokenForAppManagementAccessToken(token: string): Promise<{
+    accessToken: string;
+    userId: string;
+}>;
+/**
+ * Given a custom CLI token passed as ENV variable, request a valid Business Platform API token
+ * @param token - The CLI token passed as ENV variable 
+ * @returns An instance with the application access tokens.
+ */
+export declare function exchangeCliTokenForBusinessPlatformAccessToken(token: string): Promise<{
+    accessToken: string;
+    userId: string;
+}>;
 type IdentityDeviceError = 'authorization_pending' | 'access_denied' | 'expired_token' | 'slow_down' | 'unknown_failure';
 /**
  * Given a deviceCode obtained after starting a device identity flow, request an identity token.
packages/cli-kit/dist/public/node/context/local.d.ts
@@ -25,13 +25,6 @@ export declare function isDevelopment(env?: NodeJS.ProcessEnv): boolean;
  * @returns True if SHOPIFY_FLAG_VERBOSE is truthy or the flag --verbose has been passed.
  */
 export declare function isVerbose(env?: NodeJS.ProcessEnv): boolean;
-/**
- * It returns true if the App Management API is disabled.
- * This should only be relevant when using a Partners token.
- *
- * @returns True if the App Management API is disabled.
- */
-export declare function isAppManagementDisabled(): boolean;
 /**
  * Returns true if the environment in which the CLI is running is either
  * a local environment (where dev is present) or a cloud environment (spin).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant