@dynamic-labs/sdk-api-core 0.31.0 → 0.32.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs/sdk-api-core",
3
- "version": "0.31.0",
3
+ "version": "0.32.0",
4
4
  "author": "Dynamic Labs",
5
5
  "license": "Apache-2.0",
6
6
  "publishConfig": {
@@ -4937,7 +4937,7 @@ class SDKApi extends runtime.BaseAPI {
4937
4937
  await this.getPasskeyRegistrationOptionsOptionsRaw(requestParameters, initOverrides);
4938
4938
  }
4939
4939
  /**
4940
- * Returns a short-lived JWT for subscribing to realtime channels. Accepts either a JWT (via Authorization header) or a checkout session token with transaction ID for unauthenticated checkout flows.
4940
+ * Returns a short-lived JWT for subscribing to realtime channels. Accepts either a JWT (via Authorization header) or a checkout session token with transaction ID for unauthenticated checkout flows. The token is always scoped to the channels of the resources the caller is entitled to: session tokens are scoped to their own transaction or flow, while JWT callers must name the flow and/or checkout transaction to follow via the X-Dynamic-Flow-Id and X-Dynamic-Checkout-Transaction-Id headers.
4941
4941
  * Get a realtime auth token
4942
4942
  */
4943
4943
  async getRealtimeAuthTokenRaw(requestParameters, initOverrides) {
@@ -4955,6 +4955,12 @@ class SDKApi extends runtime.BaseAPI {
4955
4955
  if (requestParameters.xDynamicFlowId !== undefined && requestParameters.xDynamicFlowId !== null) {
4956
4956
  headerParameters['X-Dynamic-Flow-Id'] = String(requestParameters.xDynamicFlowId);
4957
4957
  }
4958
+ if (requestParameters.xDynamicCheckoutSessionToken !== undefined && requestParameters.xDynamicCheckoutSessionToken !== null) {
4959
+ headerParameters['X-Dynamic-Checkout-Session-Token'] = String(requestParameters.xDynamicCheckoutSessionToken);
4960
+ }
4961
+ if (requestParameters.xDynamicCheckoutTransactionId !== undefined && requestParameters.xDynamicCheckoutTransactionId !== null) {
4962
+ headerParameters['X-Dynamic-Checkout-Transaction-Id'] = String(requestParameters.xDynamicCheckoutTransactionId);
4963
+ }
4958
4964
  if (this.configuration && this.configuration.accessToken) {
4959
4965
  const token = this.configuration.accessToken;
4960
4966
  const tokenString = await token("bearerAuth", []);
@@ -4971,7 +4977,7 @@ class SDKApi extends runtime.BaseAPI {
4971
4977
  return new runtime.JSONApiResponse(response, (jsonValue) => RealtimeAuthTokenResponse.RealtimeAuthTokenResponseFromJSON(jsonValue));
4972
4978
  }
4973
4979
  /**
4974
- * Returns a short-lived JWT for subscribing to realtime channels. Accepts either a JWT (via Authorization header) or a checkout session token with transaction ID for unauthenticated checkout flows.
4980
+ * Returns a short-lived JWT for subscribing to realtime channels. Accepts either a JWT (via Authorization header) or a checkout session token with transaction ID for unauthenticated checkout flows. The token is always scoped to the channels of the resources the caller is entitled to: session tokens are scoped to their own transaction or flow, while JWT callers must name the flow and/or checkout transaction to follow via the X-Dynamic-Flow-Id and X-Dynamic-Checkout-Transaction-Id headers.
4975
4981
  * Get a realtime auth token
4976
4982
  */
4977
4983
  async getRealtimeAuthToken(requestParameters, initOverrides) {