( type: PurchaseType, locale = globalThis?.navigator?.language ?? 'en-US', discountId?: string, )
| 110 | } |
| 111 | |
| 112 | export const fetchPricingPreview = async ( |
| 113 | type: PurchaseType, |
| 114 | locale = globalThis?.navigator?.language ?? 'en-US', |
| 115 | discountId?: string, |
| 116 | ): Promise<ProductPricingPreview[]> => { |
| 117 | const { pricingPreview } = await gqlClient.request<PricingPreviewResponse>( |
| 118 | PRICING_PREVIEW_QUERY, |
| 119 | { type, locale, discountId }, |
| 120 | ); |
| 121 | |
| 122 | return pricingPreview ?? []; |
| 123 | }; |
| 124 | |
| 125 | const PRICING_PREVIEW_BY_IDS_QUERY = gql` |
| 126 | query PricingPreviewByIds( |
no outgoing calls
no test coverage detected