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