Get the Shopify store data of a session through the commerce panel (the Gleap Shopify app's connection): the signed-in storefront customer or the customer matching the contact's email, their last 5 orders with lines, totals, tracking and returns, and the order actions a teammate may run. Empty when Shopify is not connected.
Bearer <token>.Ok
A shop platform's key (shopify, woocommerce, custom, shopware, …).
The keys and where each platform keeps its connections come from the
platform registry (platforms/registry.ts): commerceProviderKeys(),
commerceIntegrationKey(provider).
How the panel found the shop data: verified (the signed-in storefront customer), email (the contact's
email, which the browser can set to anyone's), order (an order number + email the guest gave in the chat).
Shopify panel (the Gleap Shopify app): lines, totals, returns and the actions a teammate may run.
How the order is tied to the contact: the signed-in Shopify customer, or the contact's email.
Actions this teammate could run for the signed-in customer, shown disabled with the reason (email match only).
Shopify: what is left to refund (formatted) and the order currency with its decimals (refund dialog).
create_return (also exchanges) or refund.
Refund: the amount asked for, formatted ("€20.00"), or everything left when absent.
Construct a type with a set of properties K of type T