import debounce from 'lodash-es/debounce'; import isEqual from 'lodash-es/isEqual'; /** * Full URL string (https://abc.com/path), without trailing slash */ type TUrl$1 = string; type LANGUAGES = "en" | "fr" | "de" | "es" | "it" | "pl" | "ja"; /** * Basic info needed to call the Beam API. * Endpoints may also require parameters such as chainId, storeId, and order/cart details. */ type BeamBaseAPIConfig = { apiKey: string; baseUrl?: TUrl$1; }; declare const WIDGET_NAMES: { readonly select_nonprofit: "select-nonprofit"; readonly redeem_transaction: "redeem-transaction"; readonly impact_overview: "impact-overview"; readonly community_impact: "community-impact"; readonly cumulative_impact: "cumulative-impact"; readonly product_details_page: "product-details-page"; readonly subscription_management: "subscription-management"; readonly subscription_impact: "subscription-impact"; readonly select_subscription_nonprofit: "select-subscription-nonprofit"; readonly social_share: "social-share"; readonly subscriber_select_nonprofit: "subscriber-select-nonprofit"; }; declare const HELPER_NAMES: { cart_update: string; }; /** Number ID */ type TNumericId = number; /** String ID */ type TId = string; /** Beam API key format (prefix.uuid) */ type TApiKey = string; /** Full URL without trailing slash */ type TUrl = string; type WidgetName = (typeof WIDGET_NAMES)[keyof typeof WIDGET_NAMES]; type HelperName = (typeof HELPER_NAMES)[keyof typeof HELPER_NAMES]; /** * This file was auto-generated by openapi-typescript. * Do not make direct changes to the file. */ interface paths { "/chain/{chainId}/nonprofits": { get: { parameters: { path: { chainId: number; }; query: { /** Postal code used to find relevant nonprofits */ postalCode?: string; /** Country code used to find relevant nonprofits */ countryCode?: string; /** * For chains with more than one store, storeId. * If postal code and storeId are sent, storeId acts as fallback * if no local nonprofits are found near postal code. */ storeId?: number; /** Language code. */ lang?: "en" | "fr" | "de" | "es" | "it" | "pl" | "ja"; /** The type of view to fetch the config for */ widgetName: "select-nonprofit" | "redeem-transaction"; /** The version of the config */ version: string; }; }; responses: { /** List of all of the non-profits for the chain and their impact */ 200: { content: { "application/json": { chain: { name: string; /** * @description URL including file extension, e.g., an image path * @example https://cdn.beamimpact.com/logos/beam.png */ logoUrl: string | null; /** * @description Image pre baked with partner logo next to Beam logo * @example https://cdn.beamimpact.com/logos/beam.png */ logoLockupUrl?: string | null; /** * @description A URL string, but can be null * @example https://beamimpact.com */ communityImpactUrl: string | null; donationTypeName: string | null; matchDonationTypeName: string | null; }; config: { web: { /** * @description Header/title for the widget * @example Choose your impact */ title: string; /** @description Subtitle/description for the widget */ description: string; /** * @description The prefix promo description for the widget for web * @example At no extra cost, */ promoDescriptionPrefix?: string; /** * @description The promo description for the widget for web * @example choose your impact and 1% of your purchase will be donated. */ promoDescription?: string; /** * @description confirm button * @example Confirm free donation */ confirmButton?: string; /** * @description copy once confirm button is clicked * @example Confirmed! */ confirmedButton?: string; /** * @description collapsed button copy * @example Choose a nonprofit */ collapsedButton?: string; /** @description Remote config theme data as requested by the given widgetName & version query params */ theme?: { [key: string]: unknown; } | null; /** * @description nonprofit Selected Header for select-nonprofit-cta widget * @example Your impact */ nonprofitSelectedHeader?: string; /** * @description nonprofit Unselected Header for select-nonprofit-cta widget * @example Make your purchase a force for good */ nonprofitUnselectedHeader?: string; /** @description An object containing dynamic strings for the widget. These strings serve as templates and include dynamic variables that vary based on the widget type. */ dynamicStrings?: { [key: string]: string; } | null; /** @description An object containing additional static strings specific to each widget. These strings are unique to the widget and are not shared across different widgets. */ additionalStrings?: { [key: string]: string; } | null; /** @description Disables counter animation for cumulative-impact widget */ disableAnimation?: boolean; /** @description promo copy is sent in this object to be used in conditionally rendered UI components. This object serves as a repository for server-generated copy */ promo?: { /** @example Donations are 2x for Black History Month */ "promo-text-long": string; /** @example Donations are 2x */ "promo-text-short": string; /** * @description replaces cause copy * @example 2x boosting donations */ "promo-cause-alt-text": string; }; }; mobileWeb?: { /** * @description Header/title for the widget * @example Choose your impact */ title: string; /** * @description Subtitle/description for the widget * @example choose your impact and 1% of your purchase will be donated. */ description: string; /** * @description nonprofit Selected Header for select-nonprofit-cta widget * @example Your impact */ nonprofitSelectedHeader?: string; /** * @description nonprofit Unselected Header for select-nonprofit-cta widget * @example Make your purchase a force for good */ nonprofitUnselectedHeader?: string; }; mobile: { /** * @description Header/title for the widget * @example Choose your impact */ title: string; /** * @description Subtitle/description for the widget * @example choose your impact and 1% of your purchase will be donated. */ description: string; /** * @description nonprofit Selected Header for select-nonprofit-cta widget * @example Your impact */ nonprofitSelectedHeader?: string; /** * @description nonprofit Unselected Header for select-nonprofit-cta widget * @example Make your purchase a force for good */ nonprofitUnselectedHeader?: string; }; /** * @description determines if a chain can enable nonprofit deselection for the select-nonprofit widget * @default false */ enableNonprofitDeselection?: boolean; } & { web?: { /** @example Confirm */ redeemButtonText?: string; }; mobileWeb?: { /** @example Confirm */ redeemButtonText?: string; }; mobile?: { /** @example Confirm */ redeemButtonText?: string; }; }; /** @description The list of non-profits, sorted on server */ nonprofits: { imageUrl: Partial & Partial; nonprofit: { /** * @description Numeric ID * @example 1001 */ id: number; /** @example LA Regional Food Bank */ name: string; /** @example Food Security */ cause: string | null; /** * @description URL including file extension, e.g., an image path * @example https://cdn.beamimpact.com/logos/beam.png */ causeIconUrl: string | null; /** * @description URL including file extension, e.g., an image path * @example https://cdn.beamimpact.com/logos/beam.png */ causeIconSelectedUrl: string | null; /** * @description Hex code of the color for the nonprofit when it is selected * @example #000000 */ causeColor: string | null; extensibility?: { /** @description The cause icon for the extensibility widgets due to color scheme limitations */ causeIconUrl?: string | null; /** @description The cause selected icon for the extensibility widgets due to color scheme limitations */ causeIconSelectedUrl?: string | null; /** @description The cause selected icon with a background the post purchase extensibility widget due to color scheme limitations */ causeIconAndBackgroundUrl?: string | null; }; /** * @description A URL string * @example https://beamimpact.com */ website: string | null; /** @example Learn More */ websiteLinkText: string; /** * @description a label that can be used for location * @example Hawaii */ badge?: string; /** @description should include nonprofit in personal impact */ includeInPersonalImpact?: boolean; }; impact: { /** * @description The description of the funding * @example Fund 10 sewing machines... */ description: string | null; /** * @description The string representing the number of times the goal has been completed * @example Funded 2 times so far */ goalCompletionText: string; /** * @description The text next to the progress bar * @example 54% funded */ goalProgressText: string; /** * @description The progress towards the next goal completion * @example 41 */ goalProgressPercentage: number; }; promo?: { type?: string; isActive: boolean; /** * @description When a promo is active, the total amount donated is multiplied by this value. ex:\ (subtotal * donationAmount) * multiplier -> ($100 * 1%) * 2 = $2.00 donated * @example 2 */ multiplier: number | null; } | null; }[]; /** @description a site-specific identifier */ store: { id: number; }; /** @description regional store based on request query parameters */ region: { id: string | null; }; promos?: { validatedPromoCodes: { /** @description promoCodeId */ promoCodeId: string | null; promoCodeGroupId?: string | null; promoId?: number; /** * Format: date-time * @description ISO formatted date * @example 2023-04-19T03:23:59.301Z */ validatedAt: string; apply: boolean; }[]; }; /** @description Extensibility-related settings */ extensibility?: { /** * @description Whether to exclude B2B orders from reporting and from seeing Beam widgets * @example true */ excludeB2BOrders?: boolean; }; settings?: { excludeDonationsForRecurringTransactions: boolean; }; }; }; }; /** Standard error */ default: { content: { "application/json": { /** @description Beam code for the error, meant to be used programmatically */ code: string; /** @description A short, human-readable summary of the problem that SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization */ title: string; /** @description A human-readable explanation specific to this occurrence of the problem. Like title, this field's value can be localized */ detail: string; /** @description a JSON Pointer to the associated entity in the request document */ field?: string; /** @description A meta object containing non-standard meta-information about the error */ metadata?: { [key: string]: unknown; }; /** @description Whether the API or user can resend the request */ retryable?: boolean; } & { source: unknown; meta: unknown; }; }; }; }; }; }; "/chain/{chainId}/cumulativeImpact": { get: { parameters: { path: { /** The ID of the chain. Must be greater than 0 */ chainId: number; }; query: { /** Language code. */ lang?: "en" | "fr" | "de" | "es" | "it" | "pl" | "ja"; version: string; /** When set to true, draft themes are returned */ draftConfig?: boolean; }; }; responses: { /** Combined impact for all the causes the chain supports */ 200: { content: { "application/json": { /** * @description Numeric ID * @example 1001 */ id?: number; chain?: { name: string; /** * @description URL including file extension, e.g., an image path * @example https://cdn.beamimpact.com/logos/beam.png */ logoUrl: string | null; /** * @description Image pre baked with partner logo next to Beam logo * @example https://cdn.beamimpact.com/logos/beam.png */ logoLockupUrl?: string | null; /** * @description A URL string, but can be null * @example https://beamimpact.com */ communityImpactUrl: string | null; donationTypeName: string | null; matchDonationTypeName: string | null; }; config?: { web: { /** * @description Header/title for the widget * @example Choose your impact */ title: string; /** @description Subtitle/description for the widget */ description: string; /** * @description The prefix promo description for the widget for web * @example At no extra cost, */ promoDescriptionPrefix?: string; /** * @description The promo description for the widget for web * @example choose your impact and 1% of your purchase will be donated. */ promoDescription?: string; /** * @description confirm button * @example Confirm free donation */ confirmButton?: string; /** * @description copy once confirm button is clicked * @example Confirmed! */ confirmedButton?: string; /** * @description collapsed button copy * @example Choose a nonprofit */ collapsedButton?: string; /** @description Remote config theme data as requested by the given widgetName & version query params */ theme?: { [key: string]: unknown; } | null; /** * @description nonprofit Selected Header for select-nonprofit-cta widget * @example Your impact */ nonprofitSelectedHeader?: string; /** * @description nonprofit Unselected Header for select-nonprofit-cta widget * @example Make your purchase a force for good */ nonprofitUnselectedHeader?: string; /** @description An object containing dynamic strings for the widget. These strings serve as templates and include dynamic variables that vary based on the widget type. */ dynamicStrings?: { [key: string]: string; } | null; /** @description An object containing additional static strings specific to each widget. These strings are unique to the widget and are not shared across different widgets. */ additionalStrings?: { [key: string]: string; } | null; /** @description Disables counter animation for cumulative-impact widget */ disableAnimation?: boolean; /** @description promo copy is sent in this object to be used in conditionally rendered UI components. This object serves as a repository for server-generated copy */ promo?: { /** @example Donations are 2x for Black History Month */ "promo-text-long": string; /** @example Donations are 2x */ "promo-text-short": string; /** * @description replaces cause copy * @example 2x boosting donations */ "promo-cause-alt-text": string; }; }; mobileWeb?: { /** * @description Header/title for the widget * @example Choose your impact */ title: string; /** * @description Subtitle/description for the widget * @example choose your impact and 1% of your purchase will be donated. */ description: string; /** * @description nonprofit Selected Header for select-nonprofit-cta widget * @example Your impact */ nonprofitSelectedHeader?: string; /** * @description nonprofit Unselected Header for select-nonprofit-cta widget * @example Make your purchase a force for good */ nonprofitUnselectedHeader?: string; }; mobile: { /** * @description Header/title for the widget * @example Choose your impact */ title: string; /** * @description Subtitle/description for the widget * @example choose your impact and 1% of your purchase will be donated. */ description: string; /** * @description nonprofit Selected Header for select-nonprofit-cta widget * @example Your impact */ nonprofitSelectedHeader?: string; /** * @description nonprofit Unselected Header for select-nonprofit-cta widget * @example Make your purchase a force for good */ nonprofitUnselectedHeader?: string; }; /** * @description determines if a chain can enable nonprofit deselection for the select-nonprofit widget * @default false */ enableNonprofitDeselection?: boolean; }; /** @description The list of cumulative impacts */ impacts?: { /** * @description The summary of the cause * @example Days of daily hot meals */ summary?: string; /** * @description The unit that describes the values * @example Meals */ unit?: string; /** * @description The amount of impact in regards to the unit for that impact * @example 100 */ value?: number; }[]; }; }; }; /** Standard error */ default: { content: { "application/json": { /** @description Beam code for the error, meant to be used programmatically */ code: string; /** @description A short, human-readable summary of the problem that SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization */ title: string; /** @description A human-readable explanation specific to this occurrence of the problem. Like title, this field's value can be localized */ detail: string; /** @description a JSON Pointer to the associated entity in the request document */ field?: string; /** @description A meta object containing non-standard meta-information about the error */ metadata?: { [key: string]: unknown; }; /** @description Whether the API or user can resend the request */ retryable?: boolean; } & { source: unknown; meta: unknown; }; }; }; }; }; }; "/chainStores": { get: { responses: { /** A list of objects that contain both the id and custom store id for each store associated with the chain */ 200: { content: { "application/json": { stores: { id: number; customId: string; }[]; }; }; }; /** Standard error */ default: { content: { "application/json": { /** @description Beam code for the error, meant to be used programmatically */ code: string; /** @description A short, human-readable summary of the problem that SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization */ title: string; /** @description A human-readable explanation specific to this occurrence of the problem. Like title, this field's value can be localized */ detail: string; /** @description a JSON Pointer to the associated entity in the request document */ field?: string; /** @description A meta object containing non-standard meta-information about the error */ metadata?: { [key: string]: unknown; }; /** @description Whether the API or user can resend the request */ retryable?: boolean; } & { source: unknown; meta: unknown; }; }; }; }; }; }; "/chain/findEligibleNonprofitsForCart": { post: { responses: { /** List of all the non-profits for the given transaction and their impact. */ 200: { content: { "application/json": { chain: { name: string; /** * @description URL including file extension, e.g., an image path * @example https://cdn.beamimpact.com/logos/beam.png */ logoUrl: string | null; /** * @description Image pre baked with partner logo next to Beam logo * @example https://cdn.beamimpact.com/logos/beam.png */ logoLockupUrl?: string | null; /** * @description A URL string, but can be null * @example https://beamimpact.com */ communityImpactUrl: string | null; donationTypeName: string | null; matchDonationTypeName: string | null; }; config: { web: { /** * @description Header/title for the widget * @example Choose your impact */ title: string; /** @description Subtitle/description for the widget */ description: string; /** * @description The prefix promo description for the widget for web * @example At no extra cost, */ promoDescriptionPrefix?: string; /** * @description The promo description for the widget for web * @example choose your impact and 1% of your purchase will be donated. */ promoDescription?: string; /** * @description confirm button * @example Confirm free donation */ confirmButton?: string; /** * @description copy once confirm button is clicked * @example Confirmed! */ confirmedButton?: string; /** * @description collapsed button copy * @example Choose a nonprofit */ collapsedButton?: string; /** @description Remote config theme data as requested by the given widgetName & version query params */ theme?: { [key: string]: unknown; } | null; /** * @description nonprofit Selected Header for select-nonprofit-cta widget * @example Your impact */ nonprofitSelectedHeader?: string; /** * @description nonprofit Unselected Header for select-nonprofit-cta widget * @example Make your purchase a force for good */ nonprofitUnselectedHeader?: string; /** @description An object containing dynamic strings for the widget. These strings serve as templates and include dynamic variables that vary based on the widget type. */ dynamicStrings?: { [key: string]: string; } | null; /** @description An object containing additional static strings specific to each widget. These strings are unique to the widget and are not shared across different widgets. */ additionalStrings?: { [key: string]: string; } | null; /** @description Disables counter animation for cumulative-impact widget */ disableAnimation?: boolean; /** @description promo copy is sent in this object to be used in conditionally rendered UI components. This object serves as a repository for server-generated copy */ promo?: { /** @example Donations are 2x for Black History Month */ "promo-text-long": string; /** @example Donations are 2x */ "promo-text-short": string; /** * @description replaces cause copy * @example 2x boosting donations */ "promo-cause-alt-text": string; }; }; mobileWeb?: { /** * @description Header/title for the widget * @example Choose your impact */ title: string; /** * @description Subtitle/description for the widget * @example choose your impact and 1% of your purchase will be donated. */ description: string; /** * @description nonprofit Selected Header for select-nonprofit-cta widget * @example Your impact */ nonprofitSelectedHeader?: string; /** * @description nonprofit Unselected Header for select-nonprofit-cta widget * @example Make your purchase a force for good */ nonprofitUnselectedHeader?: string; }; mobile: { /** * @description Header/title for the widget * @example Choose your impact */ title: string; /** * @description Subtitle/description for the widget * @example choose your impact and 1% of your purchase will be donated. */ description: string; /** * @description nonprofit Selected Header for select-nonprofit-cta widget * @example Your impact */ nonprofitSelectedHeader?: string; /** * @description nonprofit Unselected Header for select-nonprofit-cta widget * @example Make your purchase a force for good */ nonprofitUnselectedHeader?: string; }; /** * @description determines if a chain can enable nonprofit deselection for the select-nonprofit widget * @default false */ enableNonprofitDeselection?: boolean; } & { web?: { /** @example Confirm */ redeemButtonText?: string; }; mobileWeb?: { /** @example Confirm */ redeemButtonText?: string; }; mobile?: { /** @example Confirm */ redeemButtonText?: string; }; }; /** @description The list of non-profits, sorted on server */ nonprofits: { imageUrl: Partial & Partial; nonprofit: { /** * @description Numeric ID * @example 1001 */ id: number; /** @example LA Regional Food Bank */ name: string; /** @example Food Security */ cause: string | null; /** * @description URL including file extension, e.g., an image path * @example https://cdn.beamimpact.com/logos/beam.png */ causeIconUrl: string | null; /** * @description URL including file extension, e.g., an image path * @example https://cdn.beamimpact.com/logos/beam.png */ causeIconSelectedUrl: string | null; /** * @description Hex code of the color for the nonprofit when it is selected * @example #000000 */ causeColor: string | null; extensibility?: { /** @description The cause icon for the extensibility widgets due to color scheme limitations */ causeIconUrl?: string | null; /** @description The cause selected icon for the extensibility widgets due to color scheme limitations */ causeIconSelectedUrl?: string | null; /** @description The cause selected icon with a background the post purchase extensibility widget due to color scheme limitations */ causeIconAndBackgroundUrl?: string | null; }; /** * @description A URL string * @example https://beamimpact.com */ website: string | null; /** @example Learn More */ websiteLinkText: string; /** * @description a label that can be used for location * @example Hawaii */ badge?: string; /** @description should include nonprofit in personal impact */ includeInPersonalImpact?: boolean; }; impact: { /** * @description The description of the funding * @example Fund 10 sewing machines... */ description: string | null; /** * @description The string representing the number of times the goal has been completed * @example Funded 2 times so far */ goalCompletionText: string; /** * @description The text next to the progress bar * @example 54% funded */ goalProgressText: string; /** * @description The progress towards the next goal completion * @example 41 */ goalProgressPercentage: number; }; promo?: { type?: string; isActive: boolean; /** * @description When a promo is active, the total amount donated is multiplied by this value. ex:\ (subtotal * donationAmount) * multiplier -> ($100 * 1%) * 2 = $2.00 donated * @example 2 */ multiplier: number | null; } | null; }[]; /** @description a site-specific identifier */ store: { id: number; }; /** @description regional store based on request query parameters */ region: { id: string | null; }; promos?: { validatedPromoCodes: { /** @description promoCodeId */ promoCodeId: string | null; promoCodeGroupId?: string | null; promoId?: number; /** * Format: date-time * @description ISO formatted date * @example 2023-04-19T03:23:59.301Z */ validatedAt: string; apply: boolean; }[]; }; /** @description Extensibility-related settings */ extensibility?: { /** * @description Whether to exclude B2B orders from reporting and from seeing Beam widgets * @example true */ excludeB2BOrders?: boolean; }; settings?: { excludeDonationsForRecurringTransactions: boolean; }; }; }; }; }; requestBody: { content: { "application/json": (Partial<{ storeId: number; }> & Partial<{ countryCode?: string; postalCode?: string; }>) & { chainId?: number; storeId?: number; postalCode?: string; countryCode?: string; /** * @default en * @enum {string} */ lang?: "en" | "fr" | "de" | "es" | "it" | "pl" | "ja"; /** @enum {string} */ widgetName: "select-nonprofit" | "redeem-transaction" | "post-purchase" | "subscription-management" | "select-subscription-nonprofit" | "subscriber-select-nonprofit"; /** @example 1.0 */ version: string; cart?: { schema: { /** @enum {string} */ source: "shopify"; /** @enum {string} */ variant: "ajax"; version?: string; }; content: { localAmount?: number; /** @description Order or cart level discounts */ discounts?: { /** @description The code for the discount */ code: string; /** @description Whether the discount code is applicable to the current order, cart, or item */ applicable: boolean; }[] | null; items: { id?: number | null; gift_card?: boolean | null; /** @description Price for line item (qty * unit price), after discounts, in integer cents format (3.50 => 350) */ final_line_price: number | null; /** @description Unit price for line item, in integer cents format (3.50 => 350) */ final_price?: number | null; /** @description Line item discounts */ line_level_discount_applications?: ({ /** @description The code for the discount */ title: string; } & { [key: string]: unknown; })[] | null; quantity?: number | null; sku: string | null; product_id?: number | null; product_title?: string | null; product_type?: string | null; variant_id?: number | null; }[]; subscriptions?: { remoteSubscriptionId: string; isNew?: boolean; }[]; }; } | { schema: { /** @enum {string} */ source: "shopify"; /** @enum {string} */ variant: "liquid"; version?: string; }; content: { localAmount?: number; /** @description Order or cart level discounts */ discounts?: { /** @description The code for the discount */ code: string; /** @description Whether the discount code is applicable to the current order, cart, or item */ applicable: boolean; }[] | null; items: { id?: number | null; gift_card?: boolean | null; /** @description Price for line item (qty * unit price), after discounts, in decimal format (3.50) */ final_line_price: number | null; /** @description Unit price for line item in decimal format (3.50) */ final_price?: number | null; /** @description Line item discounts */ line_level_discount_applications?: ({ /** @description The code for the discount */ title: string; } & { [key: string]: unknown; })[] | null; quantity?: number | null; sku: string | null; product_id?: number | null; variant_id?: number | null; }[]; subscriptions?: { remoteSubscriptionId: string; isNew?: boolean; }[]; }; } | { schema: { /** * @default generic * @enum {string} */ source: "generic"; /** @enum {string} */ variant?: "default"; version?: string; }; content: { localAmount?: number; /** @description Order or cart level discounts */ discounts?: { /** @description The code for the discount */ code: string; /** @description Whether the discount code is applicable to the current order, cart, or item */ applicable: boolean; }[] | null; items: { remoteProductIdentifier?: string | null; localAmount: number; remoteSubscriptionId?: string; /** @description Line item discounts */ discounts?: { /** @description The code for the discount */ code: string; /** @description Whether the discount code is applicable to the current order, cart, or item */ applicable: boolean; }[] | null; }[]; subscriptions?: { remoteSubscriptionId: string; isNew?: boolean; }[]; }; }; promos?: { unvalidatedPromoCodes: (Partial<{ /** @enum {string} */ type?: "manual" | "url"; } & { attributes?: { value?: string; }; }> & Partial<{ /** @enum {string} */ type?: "manual" | "url"; } & { attributes?: { url?: string; }; }>)[]; validatedPromoCodes: { /** @description promoCodeId */ promoCodeId: string | null; promoCodeGroupId?: string | null; promoId?: number; /** * Format: date-time * @description ISO formatted date * @example 2023-04-19T03:23:59.301Z */ validatedAt: string; apply: boolean; }[]; }; /** * @description UUID * @example bqkdk-0393b-jbkdd-02difj */ transactionId?: string; /** * @description UUID * @example bqkdk-0393b-jbkdd-02difj */ beamCartId?: string; /** * @description UUID * @example bqkdk-0393b-jbkdd-02difj */ cartId?: string; options?: { config?: { /** @description Removes the themes object from the remote config object in the response. */ omitThemes?: boolean; draftConfig?: boolean; }; }; }; }; }; }; }; "/impact": { get: { parameters: { query: { /** @deprecated No longer needed, chainId inferred from API Key */ chainId?: number; storeId?: number; beamUserId?: string; /** Nonprofit ID */ nonprofitId?: number; /** The limit on the number of community impact objects to return */ communityImpactLimit?: number; /** The limit on the number of personal impact objects to return */ personalImpactLimit?: number; /** The type of view to fetch the config for */ widgetName: "impact-overview" | "community-impact" | "subscription-impact" | "subscription-management"; /** The version of the config */ version: string; /** Language code. */ lang?: "en" | "fr" | "de" | "es" | "it" | "pl" | "ja"; /** When set to true, themes are removed from widget config objects */ omitThemes?: boolean; /** When set to true, draft themes are returned */ draftConfig?: boolean; /** Discount codes applied to the order */ discountCodes?: string[]; /** The transactionId of the purchase */ transactionId?: string; /** The id of the user in the partner's system */ partnerUserId?: string; }; }; responses: { /** The post-transaction impact for both the user and the community on that non-profit */ 200: { content: { "application/json": { chain: { name: string; /** * @description URL including file extension, e.g., an image path * @example https://cdn.beamimpact.com/logos/beam.png */ logoUrl: string | null; /** * @description Image pre baked with partner logo next to Beam logo * @example https://cdn.beamimpact.com/logos/beam.png */ logoLockupUrl?: string | null; /** * @description A URL string, but can be null * @example https://beamimpact.com */ communityImpactUrl: string | null; donationTypeName: string | null; matchDonationTypeName: string | null; }; store: { name: string | null; displayName: string | null; /** * @description A URL string, but can be null * @example https://beamimpact.com */ communityPageURL: string | null; }; config: { web: { /** * @description Header/title for the widget * @example Choose your impact */ title: string; /** @description Subtitle/description for the widget */ description: string; /** * @description The prefix promo description for the widget for web * @example At no extra cost, */ promoDescriptionPrefix?: string; /** * @description The promo description for the widget for web * @example choose your impact and 1% of your purchase will be donated. */ promoDescription?: string; /** * @description confirm button * @example Confirm free donation */ confirmButton?: string; /** * @description copy once confirm button is clicked * @example Confirmed! */ confirmedButton?: string; /** * @description collapsed button copy * @example Choose a nonprofit */ collapsedButton?: string; /** @description Remote config theme data as requested by the given widgetName & version query params */ theme?: { [key: string]: unknown; } | null; /** * @description nonprofit Selected Header for select-nonprofit-cta widget * @example Your impact */ nonprofitSelectedHeader?: string; /** * @description nonprofit Unselected Header for select-nonprofit-cta widget * @example Make your purchase a force for good */ nonprofitUnselectedHeader?: string; /** @description An object containing dynamic strings for the widget. These strings serve as templates and include dynamic variables that vary based on the widget type. */ dynamicStrings?: { [key: string]: string; } | null; /** @description An object containing additional static strings specific to each widget. These strings are unique to the widget and are not shared across different widgets. */ additionalStrings?: { [key: string]: string; } | null; /** @description Disables counter animation for cumulative-impact widget */ disableAnimation?: boolean; /** @description promo copy is sent in this object to be used in conditionally rendered UI components. This object serves as a repository for server-generated copy */ promo?: { /** @example Donations are 2x for Black History Month */ "promo-text-long": string; /** @example Donations are 2x */ "promo-text-short": string; /** * @description replaces cause copy * @example 2x boosting donations */ "promo-cause-alt-text": string; }; }; mobileWeb?: { /** * @description Header/title for the widget * @example Choose your impact */ title: string; /** * @description Subtitle/description for the widget * @example choose your impact and 1% of your purchase will be donated. */ description: string; /** * @description nonprofit Selected Header for select-nonprofit-cta widget * @example Your impact */ nonprofitSelectedHeader?: string; /** * @description nonprofit Unselected Header for select-nonprofit-cta widget * @example Make your purchase a force for good */ nonprofitUnselectedHeader?: string; }; mobile: { /** * @description Header/title for the widget * @example Choose your impact */ title: string; /** * @description Subtitle/description for the widget * @example choose your impact and 1% of your purchase will be donated. */ description: string; /** * @description nonprofit Selected Header for select-nonprofit-cta widget * @example Your impact */ nonprofitSelectedHeader?: string; /** * @description nonprofit Unselected Header for select-nonprofit-cta widget * @example Make your purchase a force for good */ nonprofitUnselectedHeader?: string; }; /** * @description determines if a chain can enable nonprofit deselection for the select-nonprofit widget * @default false */ enableNonprofitDeselection?: boolean; }; personal: { /** * @description URL including file extension, e.g., an image path * @example https://cdn.beamimpact.com/logos/beam.png */ imageUrl: string | null; nonprofit: { /** * @description Numeric ID * @example 1001 */ id: number; /** @example LA Regional Food Bank */ name: string; /** @example Food Security */ cause: string | null; /** * @description URL including file extension, e.g., an image path * @example https://cdn.beamimpact.com/logos/beam.png */ causeIconUrl: string | null; /** * @description URL including file extension, e.g., an image path * @example https://cdn.beamimpact.com/logos/beam.png */ causeIconSelectedUrl: string | null; /** * @description Hex code of the color for the nonprofit when it is selected * @example #000000 */ causeColor: string | null; extensibility?: { /** @description The cause icon for the extensibility widgets due to color scheme limitations */ causeIconUrl?: string | null; /** @description The cause selected icon for the extensibility widgets due to color scheme limitations */ causeIconSelectedUrl?: string | null; /** @description The cause selected icon with a background the post purchase extensibility widget due to color scheme limitations */ causeIconAndBackgroundUrl?: string | null; }; /** * @description A URL string * @example https://beamimpact.com */ website: string | null; /** @example Learn More */ websiteLinkText: string; /** * @description a label that can be used for location * @example Hawaii */ badge?: string; /** @description should include nonprofit in personal impact */ includeInPersonalImpact?: boolean; }; impact: { /** * @description The description of the funding * @example Fund 10 sewing machines... */ description: string | null; /** * @description The string representing the number of times the goal has been completed * @example Funded 2 times so far */ goalCompletionText: string; /** * @description The text next to the progress bar * @example 54% funded */ goalProgressText: string; /** * @description The progress towards the next goal completion * @example 41 */ goalProgressPercentage: number; }; share: { /** * @description URL including file extension, e.g., an image path * @example https://cdn.beamimpact.com/logos/beam.png */ imageUrl: string | null; }; /** * @example [ * "Midwest", * "Southeast" * ] */ filters?: string[]; }[]; community: { /** * @description URL including file extension, e.g., an image path * @example https://cdn.beamimpact.com/logos/beam.png */ imageUrl: string | null; nonprofit: { /** * @description Numeric ID * @example 1001 */ id: number; /** @example LA Regional Food Bank */ name: string; /** @example Food Security */ cause: string | null; /** * @description URL including file extension, e.g., an image path * @example https://cdn.beamimpact.com/logos/beam.png */ causeIconUrl: string | null; /** * @description URL including file extension, e.g., an image path * @example https://cdn.beamimpact.com/logos/beam.png */ causeIconSelectedUrl: string | null; /** * @description Hex code of the color for the nonprofit when it is selected * @example #000000 */ causeColor: string | null; extensibility?: { /** @description The cause icon for the extensibility widgets due to color scheme limitations */ causeIconUrl?: string | null; /** @description The cause selected icon for the extensibility widgets due to color scheme limitations */ causeIconSelectedUrl?: string | null; /** @description The cause selected icon with a background the post purchase extensibility widget due to color scheme limitations */ causeIconAndBackgroundUrl?: string | null; }; /** * @description A URL string * @example https://beamimpact.com */ website: string | null; /** @example Learn More */ websiteLinkText: string; /** * @description a label that can be used for location * @example Hawaii */ badge?: string; /** @description should include nonprofit in personal impact */ includeInPersonalImpact?: boolean; }; impact: { /** * @description The description of the funding * @example Fund 10 sewing machines... */ description: string | null; /** * @description The string representing the number of times the goal has been completed * @example Funded 2 times so far */ goalCompletionText: string; /** * @description The text next to the progress bar * @example 54% funded */ goalProgressText: string; /** * @description The progress towards the next goal completion * @example 41 */ goalProgressPercentage: number; }; share: { /** * @description URL including file extension, e.g., an image path * @example https://cdn.beamimpact.com/logos/beam.png */ imageUrl: string | null; }; /** * @example [ * "Midwest", * "Southeast" * ] */ filters?: string[]; }[]; promo: { type?: string; isActive: boolean; /** * @description When a promo is active, the total amount donated is multiplied by this value. ex:\ (subtotal * donationAmount) * multiplier -> ($100 * 1%) * 2 = $2.00 donated * @example 2 */ multiplier: number | null; } | null; promoAssetUrl: string | null; personalImpactAssetUrl: string | null; settings?: { excludeDonationsForRecurringTransactions: boolean; }; }; }; }; /** Standard error */ default: { content: { "application/json": { /** @description Beam code for the error, meant to be used programmatically */ code: string; /** @description A short, human-readable summary of the problem that SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization */ title: string; /** @description A human-readable explanation specific to this occurrence of the problem. Like title, this field's value can be localized */ detail: string; /** @description a JSON Pointer to the associated entity in the request document */ field?: string; /** @description A meta object containing non-standard meta-information about the error */ metadata?: { [key: string]: unknown; }; /** @description Whether the API or user can resend the request */ retryable?: boolean; } & { source: unknown; meta: unknown; }; }; }; }; }; }; "/impact/calculateImpactPreview": { post: { responses: { /** The post-transaction impact for both the user and the community on that non-profit */ 200: { content: { "application/json": { chain: { name: string; /** * @description URL including file extension, e.g., an image path * @example https://cdn.beamimpact.com/logos/beam.png */ logoUrl: string | null; /** * @description Image pre baked with partner logo next to Beam logo * @example https://cdn.beamimpact.com/logos/beam.png */ logoLockupUrl?: string | null; /** * @description A URL string, but can be null * @example https://beamimpact.com */ communityImpactUrl: string | null; donationTypeName: string | null; matchDonationTypeName: string | null; }; store: { name: string | null; displayName: string | null; /** * @description A URL string, but can be null * @example https://beamimpact.com */ communityPageURL: string | null; }; config: { web: { /** * @description Header/title for the widget * @example Choose your impact */ title: string; /** @description Subtitle/description for the widget */ description: string; /** * @description The prefix promo description for the widget for web * @example At no extra cost, */ promoDescriptionPrefix?: string; /** * @description The promo description for the widget for web * @example choose your impact and 1% of your purchase will be donated. */ promoDescription?: string; /** * @description confirm button * @example Confirm free donation */ confirmButton?: string; /** * @description copy once confirm button is clicked * @example Confirmed! */ confirmedButton?: string; /** * @description collapsed button copy * @example Choose a nonprofit */ collapsedButton?: string; /** @description Remote config theme data as requested by the given widgetName & version query params */ theme?: { [key: string]: unknown; } | null; /** * @description nonprofit Selected Header for select-nonprofit-cta widget * @example Your impact */ nonprofitSelectedHeader?: string; /** * @description nonprofit Unselected Header for select-nonprofit-cta widget * @example Make your purchase a force for good */ nonprofitUnselectedHeader?: string; /** @description An object containing dynamic strings for the widget. These strings serve as templates and include dynamic variables that vary based on the widget type. */ dynamicStrings?: { [key: string]: string; } | null; /** @description An object containing additional static strings specific to each widget. These strings are unique to the widget and are not shared across different widgets. */ additionalStrings?: { [key: string]: string; } | null; /** @description Disables counter animation for cumulative-impact widget */ disableAnimation?: boolean; /** @description promo copy is sent in this object to be used in conditionally rendered UI components. This object serves as a repository for server-generated copy */ promo?: { /** @example Donations are 2x for Black History Month */ "promo-text-long": string; /** @example Donations are 2x */ "promo-text-short": string; /** * @description replaces cause copy * @example 2x boosting donations */ "promo-cause-alt-text": string; }; }; mobileWeb?: { /** * @description Header/title for the widget * @example Choose your impact */ title: string; /** * @description Subtitle/description for the widget * @example choose your impact and 1% of your purchase will be donated. */ description: string; /** * @description nonprofit Selected Header for select-nonprofit-cta widget * @example Your impact */ nonprofitSelectedHeader?: string; /** * @description nonprofit Unselected Header for select-nonprofit-cta widget * @example Make your purchase a force for good */ nonprofitUnselectedHeader?: string; }; mobile: { /** * @description Header/title for the widget * @example Choose your impact */ title: string; /** * @description Subtitle/description for the widget * @example choose your impact and 1% of your purchase will be donated. */ description: string; /** * @description nonprofit Selected Header for select-nonprofit-cta widget * @example Your impact */ nonprofitSelectedHeader?: string; /** * @description nonprofit Unselected Header for select-nonprofit-cta widget * @example Make your purchase a force for good */ nonprofitUnselectedHeader?: string; }; /** * @description determines if a chain can enable nonprofit deselection for the select-nonprofit widget * @default false */ enableNonprofitDeselection?: boolean; }; personal: { /** * @description URL including file extension, e.g., an image path * @example https://cdn.beamimpact.com/logos/beam.png */ imageUrl: string | null; nonprofit: { /** * @description Numeric ID * @example 1001 */ id: number; /** @example LA Regional Food Bank */ name: string; /** @example Food Security */ cause: string | null; /** * @description URL including file extension, e.g., an image path * @example https://cdn.beamimpact.com/logos/beam.png */ causeIconUrl: string | null; /** * @description URL including file extension, e.g., an image path * @example https://cdn.beamimpact.com/logos/beam.png */ causeIconSelectedUrl: string | null; /** * @description Hex code of the color for the nonprofit when it is selected * @example #000000 */ causeColor: string | null; extensibility?: { /** @description The cause icon for the extensibility widgets due to color scheme limitations */ causeIconUrl?: string | null; /** @description The cause selected icon for the extensibility widgets due to color scheme limitations */ causeIconSelectedUrl?: string | null; /** @description The cause selected icon with a background the post purchase extensibility widget due to color scheme limitations */ causeIconAndBackgroundUrl?: string | null; }; /** * @description A URL string * @example https://beamimpact.com */ website: string | null; /** @example Learn More */ websiteLinkText: string; /** * @description a label that can be used for location * @example Hawaii */ badge?: string; /** @description should include nonprofit in personal impact */ includeInPersonalImpact?: boolean; }; impact: { /** * @description The description of the funding * @example Fund 10 sewing machines... */ description: string | null; /** * @description The string representing the number of times the goal has been completed * @example Funded 2 times so far */ goalCompletionText: string; /** * @description The text next to the progress bar * @example 54% funded */ goalProgressText: string; /** * @description The progress towards the next goal completion * @example 41 */ goalProgressPercentage: number; }; share: { /** * @description URL including file extension, e.g., an image path * @example https://cdn.beamimpact.com/logos/beam.png */ imageUrl: string | null; }; /** * @example [ * "Midwest", * "Southeast" * ] */ filters?: string[]; }[]; community: { /** * @description URL including file extension, e.g., an image path * @example https://cdn.beamimpact.com/logos/beam.png */ imageUrl: string | null; nonprofit: { /** * @description Numeric ID * @example 1001 */ id: number; /** @example LA Regional Food Bank */ name: string; /** @example Food Security */ cause: string | null; /** * @description URL including file extension, e.g., an image path * @example https://cdn.beamimpact.com/logos/beam.png */ causeIconUrl: string | null; /** * @description URL including file extension, e.g., an image path * @example https://cdn.beamimpact.com/logos/beam.png */ causeIconSelectedUrl: string | null; /** * @description Hex code of the color for the nonprofit when it is selected * @example #000000 */ causeColor: string | null; extensibility?: { /** @description The cause icon for the extensibility widgets due to color scheme limitations */ causeIconUrl?: string | null; /** @description The cause selected icon for the extensibility widgets due to color scheme limitations */ causeIconSelectedUrl?: string | null; /** @description The cause selected icon with a background the post purchase extensibility widget due to color scheme limitations */ causeIconAndBackgroundUrl?: string | null; }; /** * @description A URL string * @example https://beamimpact.com */ website: string | null; /** @example Learn More */ websiteLinkText: string; /** * @description a label that can be used for location * @example Hawaii */ badge?: string; /** @description should include nonprofit in personal impact */ includeInPersonalImpact?: boolean; }; impact: { /** * @description The description of the funding * @example Fund 10 sewing machines... */ description: string | null; /** * @description The string representing the number of times the goal has been completed * @example Funded 2 times so far */ goalCompletionText: string; /** * @description The text next to the progress bar * @example 54% funded */ goalProgressText: string; /** * @description The progress towards the next goal completion * @example 41 */ goalProgressPercentage: number; }; share: { /** * @description URL including file extension, e.g., an image path * @example https://cdn.beamimpact.com/logos/beam.png */ imageUrl: string | null; }; /** * @example [ * "Midwest", * "Southeast" * ] */ filters?: string[]; }[]; promo: { type?: string; isActive: boolean; /** * @description When a promo is active, the total amount donated is multiplied by this value. ex:\ (subtotal * donationAmount) * multiplier -> ($100 * 1%) * 2 = $2.00 donated * @example 2 */ multiplier: number | null; } | null; promoAssetUrl: string | null; personalImpactAssetUrl: string | null; settings?: { excludeDonationsForRecurringTransactions: boolean; }; }; }; }; /** Standard error */ default: { content: { "application/json": { /** @description Beam code for the error, meant to be used programmatically */ code: string; /** @description A short, human-readable summary of the problem that SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization */ title: string; /** @description A human-readable explanation specific to this occurrence of the problem. Like title, this field's value can be localized */ detail: string; /** @description a JSON Pointer to the associated entity in the request document */ field?: string; /** @description A meta object containing non-standard meta-information about the error */ metadata?: { [key: string]: unknown; }; /** @description Whether the API or user can resend the request */ retryable?: boolean; } & { source: unknown; meta: unknown; }; }; }; }; requestBody: { content: { "application/json": { /** @description The partner's order ID */ orderId: string | number; /** * @description The ID of the store * @example 1001 */ storeId: number; /** @description nonprofit ID selected when a transaction is created/updated. When present and set to null, nonprofitId is deleted from DB for existing transactions. When not present, existing transactions remain unaffected. */ nonprofitId?: number | null; /** @description ISO currency code */ currencyCode: string; /** @description The amount in the cart */ cartTotal: number; cart?: { schema: { /** @enum {string} */ source: "shopify"; /** @enum {string} */ variant: "ajax"; version?: string; }; content: { localAmount?: number; /** @description Order or cart level discounts */ discounts?: { /** @description The code for the discount */ code: string; /** @description Whether the discount code is applicable to the current order, cart, or item */ applicable: boolean; }[] | null; items: { id?: number | null; gift_card?: boolean | null; /** @description Price for line item (qty * unit price), after discounts, in integer cents format (3.50 => 350) */ final_line_price: number | null; /** @description Unit price for line item, in integer cents format (3.50 => 350) */ final_price?: number | null; /** @description Line item discounts */ line_level_discount_applications?: ({ /** @description The code for the discount */ title: string; } & { [key: string]: unknown; })[] | null; quantity?: number | null; sku: string | null; product_id?: number | null; product_title?: string | null; product_type?: string | null; variant_id?: number | null; }[]; subscriptions?: { remoteSubscriptionId: string; isNew?: boolean; }[]; }; } | { schema: { /** @enum {string} */ source: "shopify"; /** @enum {string} */ variant: "liquid"; version?: string; }; content: { localAmount?: number; /** @description Order or cart level discounts */ discounts?: { /** @description The code for the discount */ code: string; /** @description Whether the discount code is applicable to the current order, cart, or item */ applicable: boolean; }[] | null; items: { id?: number | null; gift_card?: boolean | null; /** @description Price for line item (qty * unit price), after discounts, in decimal format (3.50) */ final_line_price: number | null; /** @description Unit price for line item in decimal format (3.50) */ final_price?: number | null; /** @description Line item discounts */ line_level_discount_applications?: ({ /** @description The code for the discount */ title: string; } & { [key: string]: unknown; })[] | null; quantity?: number | null; sku: string | null; product_id?: number | null; variant_id?: number | null; }[]; subscriptions?: { remoteSubscriptionId: string; isNew?: boolean; }[]; }; } | { schema: { /** * @default generic * @enum {string} */ source: "generic"; /** @enum {string} */ variant?: "default"; version?: string; }; content: { localAmount?: number; /** @description Order or cart level discounts */ discounts?: { /** @description The code for the discount */ code: string; /** @description Whether the discount code is applicable to the current order, cart, or item */ applicable: boolean; }[] | null; items: { remoteProductIdentifier?: string | null; localAmount: number; remoteSubscriptionId?: string; /** @description Line item discounts */ discounts?: { /** @description The code for the discount */ code: string; /** @description Whether the discount code is applicable to the current order, cart, or item */ applicable: boolean; }[] | null; }[]; subscriptions?: { remoteSubscriptionId: string; isNew?: boolean; }[]; }; }; options?: { communityImpactLimit?: number; personalImpactLimit?: number; lang?: string; widgetName?: string; widgetVersion?: string; omitThemes?: boolean; }; }; }; }; }; }; "/registerUser": { post: { responses: { /** User exists */ 200: { content: { "application/json": { /** @description The Beam internal ID */ beamUserId: string; }; }; }; /** User created */ 201: { content: { "application/json": { /** @description The Beam internal ID */ beamUserId: string; }; }; }; /** Standard error */ default: { content: { "application/json": { /** @description Beam code for the error, meant to be used programmatically */ code: string; /** @description A short, human-readable summary of the problem that SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization */ title: string; /** @description A human-readable explanation specific to this occurrence of the problem. Like title, this field's value can be localized */ detail: string; /** @description a JSON Pointer to the associated entity in the request document */ field?: string; /** @description A meta object containing non-standard meta-information about the error */ metadata?: { [key: string]: unknown; }; /** @description Whether the API or user can resend the request */ retryable?: boolean; } & { source: unknown; meta: unknown; }; }; }; }; requestBody: { content: { "application/json": { /** @description Email of the user. */ email: string; }; }; }; }; }; "/updateUserEmail": { post: { responses: { /** Customer email updated */ 200: unknown; /** Standard error */ default: { content: { "application/json": { /** @description Beam code for the error, meant to be used programmatically */ code: string; /** @description A short, human-readable summary of the problem that SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization */ title: string; /** @description A human-readable explanation specific to this occurrence of the problem. Like title, this field's value can be localized */ detail: string; /** @description a JSON Pointer to the associated entity in the request document */ field?: string; /** @description A meta object containing non-standard meta-information about the error */ metadata?: { [key: string]: unknown; }; /** @description Whether the API or user can resend the request */ retryable?: boolean; } & { source: unknown; meta: unknown; }; }; }; }; requestBody: { content: { "application/json": { partnerUserId?: string; email: string; previousEmail?: string; }; }; }; }; }; "/transaction": { /** One of `beamUserId` or `email` is required to identify the user. One of cartTotal or donation is required to create a valid transaction. */ post: { responses: { /** Existing transaction updated */ 200: { content: { "application/json": { /** * @description UUID * @example bqkdk-0393b-jbkdd-02difj */ transactionId: string; /** @description Whether the transaction was created (T) or updated (F) */ transactionCreated?: boolean; /** * @description UUID * @example bqkdk-0393b-jbkdd-02difj */ beamUserId: string; /** * @description UUID * @example bqkdk-0393b-jbkdd-02difj */ beamCartId?: string | null; /** * @description Numeric ID * @example 1001 */ chainId: number; nonprofitId: number | (number | null); /** @default */ creationMethod?: string; impact?: { personal?: { /** * @description URL including file extension, e.g., an image path * @example https://cdn.beamimpact.com/logos/beam.png */ imageUrl: string | null; nonprofit: { /** * @description Numeric ID * @example 1001 */ id: number; /** @example LA Regional Food Bank */ name: string; /** @example Food Security */ cause: string | null; /** * @description URL including file extension, e.g., an image path * @example https://cdn.beamimpact.com/logos/beam.png */ causeIconUrl: string | null; /** * @description URL including file extension, e.g., an image path * @example https://cdn.beamimpact.com/logos/beam.png */ causeIconSelectedUrl: string | null; /** * @description Hex code of the color for the nonprofit when it is selected * @example #000000 */ causeColor: string | null; extensibility?: { /** @description The cause icon for the extensibility widgets due to color scheme limitations */ causeIconUrl?: string | null; /** @description The cause selected icon for the extensibility widgets due to color scheme limitations */ causeIconSelectedUrl?: string | null; /** @description The cause selected icon with a background the post purchase extensibility widget due to color scheme limitations */ causeIconAndBackgroundUrl?: string | null; }; /** * @description A URL string * @example https://beamimpact.com */ website: string | null; /** @example Learn More */ websiteLinkText: string; /** * @description a label that can be used for location * @example Hawaii */ badge?: string; /** @description should include nonprofit in personal impact */ includeInPersonalImpact?: boolean; }; impact: { /** * @description The description of the funding * @example Fund 10 sewing machines... */ description: string | null; /** * @description The string representing the number of times the goal has been completed * @example Funded 2 times so far */ goalCompletionText: string; /** * @description The text next to the progress bar * @example 54% funded */ goalProgressText: string; /** * @description The progress towards the next goal completion * @example 41 */ goalProgressPercentage: number; }; share: { /** * @description URL including file extension, e.g., an image path * @example https://cdn.beamimpact.com/logos/beam.png */ imageUrl: string | null; }; /** * @example [ * "Midwest", * "Southeast" * ] */ filters?: string[]; }[]; community?: { /** * @description URL including file extension, e.g., an image path * @example https://cdn.beamimpact.com/logos/beam.png */ imageUrl: string | null; nonprofit: { /** * @description Numeric ID * @example 1001 */ id: number; /** @example LA Regional Food Bank */ name: string; /** @example Food Security */ cause: string | null; /** * @description URL including file extension, e.g., an image path * @example https://cdn.beamimpact.com/logos/beam.png */ causeIconUrl: string | null; /** * @description URL including file extension, e.g., an image path * @example https://cdn.beamimpact.com/logos/beam.png */ causeIconSelectedUrl: string | null; /** * @description Hex code of the color for the nonprofit when it is selected * @example #000000 */ causeColor: string | null; extensibility?: { /** @description The cause icon for the extensibility widgets due to color scheme limitations */ causeIconUrl?: string | null; /** @description The cause selected icon for the extensibility widgets due to color scheme limitations */ causeIconSelectedUrl?: string | null; /** @description The cause selected icon with a background the post purchase extensibility widget due to color scheme limitations */ causeIconAndBackgroundUrl?: string | null; }; /** * @description A URL string * @example https://beamimpact.com */ website: string | null; /** @example Learn More */ websiteLinkText: string; /** * @description a label that can be used for location * @example Hawaii */ badge?: string; /** @description should include nonprofit in personal impact */ includeInPersonalImpact?: boolean; }; impact: { /** * @description The description of the funding * @example Fund 10 sewing machines... */ description: string | null; /** * @description The string representing the number of times the goal has been completed * @example Funded 2 times so far */ goalCompletionText: string; /** * @description The text next to the progress bar * @example 54% funded */ goalProgressText: string; /** * @description The progress towards the next goal completion * @example 41 */ goalProgressPercentage: number; }; share: { /** * @description URL including file extension, e.g., an image path * @example https://cdn.beamimpact.com/logos/beam.png */ imageUrl: string | null; }; /** * @example [ * "Midwest", * "Southeast" * ] */ filters?: string[]; }[]; }; config?: { mobile?: { /** * @description The header for the widget for mobile * @example What we've funded */ title?: unknown; /** * @description The description for the widget for mobile * @example Here's the impact that our community has made so far in our partnership with Beam */ description?: string; /** @description The remote config theme data */ theme?: { [key: string]: unknown; } | null; }; mobileWeb?: { /** * @description The header for the widget for mobile * @example What we've funded */ title?: unknown; /** * @description The description for the widget for mobile * @example Here's the impact that our community has made so far in our partnership with Beam */ description?: string; /** @description The remote config theme data */ theme?: { [key: string]: unknown; } | null; }; web?: { /** * @description The header for the widget for web * @example What we've funded */ title?: string; /** * @description The description for the widget for web * @example Here's the impact that our community has made so far in our partnership with Beam */ description?: string; /** @description The remote config theme data */ theme?: { [key: string]: unknown; } | null; }; }; /** @description Extensibility-related settings */ extensibility?: { /** * @description Whether to exclude B2B orders from reporting and from seeing Beam widgets * @example true */ excludeB2BOrders?: boolean; }; /** @description Report Settings */ reportSettings?: { /** * @description Whether to exclude donations on recurring transactions * @example true */ excludeRecurringDonations?: boolean; }; }; }; }; /** Transaction created */ 201: { content: { "application/json": { /** * @description UUID * @example bqkdk-0393b-jbkdd-02difj */ transactionId: string; /** @description Whether the transaction was created (T) or updated (F) */ transactionCreated?: boolean; /** * @description UUID * @example bqkdk-0393b-jbkdd-02difj */ beamUserId: string; /** * @description UUID * @example bqkdk-0393b-jbkdd-02difj */ beamCartId?: string | null; /** * @description Numeric ID * @example 1001 */ chainId: number; nonprofitId: number | (number | null); /** @default */ creationMethod?: string; impact?: { personal?: { /** * @description URL including file extension, e.g., an image path * @example https://cdn.beamimpact.com/logos/beam.png */ imageUrl: string | null; nonprofit: { /** * @description Numeric ID * @example 1001 */ id: number; /** @example LA Regional Food Bank */ name: string; /** @example Food Security */ cause: string | null; /** * @description URL including file extension, e.g., an image path * @example https://cdn.beamimpact.com/logos/beam.png */ causeIconUrl: string | null; /** * @description URL including file extension, e.g., an image path * @example https://cdn.beamimpact.com/logos/beam.png */ causeIconSelectedUrl: string | null; /** * @description Hex code of the color for the nonprofit when it is selected * @example #000000 */ causeColor: string | null; extensibility?: { /** @description The cause icon for the extensibility widgets due to color scheme limitations */ causeIconUrl?: string | null; /** @description The cause selected icon for the extensibility widgets due to color scheme limitations */ causeIconSelectedUrl?: string | null; /** @description The cause selected icon with a background the post purchase extensibility widget due to color scheme limitations */ causeIconAndBackgroundUrl?: string | null; }; /** * @description A URL string * @example https://beamimpact.com */ website: string | null; /** @example Learn More */ websiteLinkText: string; /** * @description a label that can be used for location * @example Hawaii */ badge?: string; /** @description should include nonprofit in personal impact */ includeInPersonalImpact?: boolean; }; impact: { /** * @description The description of the funding * @example Fund 10 sewing machines... */ description: string | null; /** * @description The string representing the number of times the goal has been completed * @example Funded 2 times so far */ goalCompletionText: string; /** * @description The text next to the progress bar * @example 54% funded */ goalProgressText: string; /** * @description The progress towards the next goal completion * @example 41 */ goalProgressPercentage: number; }; share: { /** * @description URL including file extension, e.g., an image path * @example https://cdn.beamimpact.com/logos/beam.png */ imageUrl: string | null; }; /** * @example [ * "Midwest", * "Southeast" * ] */ filters?: string[]; }[]; community?: { /** * @description URL including file extension, e.g., an image path * @example https://cdn.beamimpact.com/logos/beam.png */ imageUrl: string | null; nonprofit: { /** * @description Numeric ID * @example 1001 */ id: number; /** @example LA Regional Food Bank */ name: string; /** @example Food Security */ cause: string | null; /** * @description URL including file extension, e.g., an image path * @example https://cdn.beamimpact.com/logos/beam.png */ causeIconUrl: string | null; /** * @description URL including file extension, e.g., an image path * @example https://cdn.beamimpact.com/logos/beam.png */ causeIconSelectedUrl: string | null; /** * @description Hex code of the color for the nonprofit when it is selected * @example #000000 */ causeColor: string | null; extensibility?: { /** @description The cause icon for the extensibility widgets due to color scheme limitations */ causeIconUrl?: string | null; /** @description The cause selected icon for the extensibility widgets due to color scheme limitations */ causeIconSelectedUrl?: string | null; /** @description The cause selected icon with a background the post purchase extensibility widget due to color scheme limitations */ causeIconAndBackgroundUrl?: string | null; }; /** * @description A URL string * @example https://beamimpact.com */ website: string | null; /** @example Learn More */ websiteLinkText: string; /** * @description a label that can be used for location * @example Hawaii */ badge?: string; /** @description should include nonprofit in personal impact */ includeInPersonalImpact?: boolean; }; impact: { /** * @description The description of the funding * @example Fund 10 sewing machines... */ description: string | null; /** * @description The string representing the number of times the goal has been completed * @example Funded 2 times so far */ goalCompletionText: string; /** * @description The text next to the progress bar * @example 54% funded */ goalProgressText: string; /** * @description The progress towards the next goal completion * @example 41 */ goalProgressPercentage: number; }; share: { /** * @description URL including file extension, e.g., an image path * @example https://cdn.beamimpact.com/logos/beam.png */ imageUrl: string | null; }; /** * @example [ * "Midwest", * "Southeast" * ] */ filters?: string[]; }[]; }; config?: { mobile?: { /** * @description The header for the widget for mobile * @example What we've funded */ title?: unknown; /** * @description The description for the widget for mobile * @example Here's the impact that our community has made so far in our partnership with Beam */ description?: string; /** @description The remote config theme data */ theme?: { [key: string]: unknown; } | null; }; mobileWeb?: { /** * @description The header for the widget for mobile * @example What we've funded */ title?: unknown; /** * @description The description for the widget for mobile * @example Here's the impact that our community has made so far in our partnership with Beam */ description?: string; /** @description The remote config theme data */ theme?: { [key: string]: unknown; } | null; }; web?: { /** * @description The header for the widget for web * @example What we've funded */ title?: string; /** * @description The description for the widget for web * @example Here's the impact that our community has made so far in our partnership with Beam */ description?: string; /** @description The remote config theme data */ theme?: { [key: string]: unknown; } | null; }; }; /** @description Extensibility-related settings */ extensibility?: { /** * @description Whether to exclude B2B orders from reporting and from seeing Beam widgets * @example true */ excludeB2BOrders?: boolean; }; /** @description Report Settings */ reportSettings?: { /** * @description Whether to exclude donations on recurring transactions * @example true */ excludeRecurringDonations?: boolean; }; }; }; }; /** Standard error */ default: { content: { "application/json": { /** @description Beam code for the error, meant to be used programmatically */ code: string; /** @description A short, human-readable summary of the problem that SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization */ title: string; /** @description A human-readable explanation specific to this occurrence of the problem. Like title, this field's value can be localized */ detail: string; /** @description a JSON Pointer to the associated entity in the request document */ field?: string; /** @description A meta object containing non-standard meta-information about the error */ metadata?: { [key: string]: unknown; }; /** @description Whether the API or user can resend the request */ retryable?: boolean; } & { source: unknown; meta: unknown; }; }; }; }; requestBody: { content: { "application/json": { /** @description The partner's order ID */ orderId: string | number; /** * @description The ID of the store * @example 1001 */ storeId?: number; /** * @description The ID of the selection * @example bqkdk-0393b-jbkdd-02difj */ selectionId?: string; /** * @description Beam generated cart id if exists * @example bqkdk-0393b-jbkdd-02difj */ beamCartId?: string; /** @description (externalCartId) Unique identifier for the cart provided by partner. */ cartId?: string; /** @description nonprofit ID selected when a transaction is created/updated. When present and set to null, nonprofitId is deleted from DB for existing transactions. When not present, existing transactions remain unaffected. */ nonprofitId?: number | null; /** * @description Beam ID of the user. Required if email and partner user ID are not provided * @example bqkdk-0393b-jbkdd-02difj */ beamUserId?: string; /** @description Email of the user. Required if beam ID and partner user ID are not provided */ email?: string; /** @description The user ID of the partner. Required if beam ID and email are not provided */ partnerUserId?: string; /** @description ISO currency code */ currencyCode: string; /** * @description Whether or not to use the user's last nonprofit. Requires a user identifier * @default false */ defaultToLastNonprofit?: boolean; /** @example 10292 */ postalCode?: string; /** @example US */ countryCode?: string; cart?: { schema: { /** @enum {string} */ source: "shopify"; /** @enum {string} */ variant: "ajax"; version?: string; }; content: { localAmount?: number; /** @description Order or cart level discounts */ discounts?: { /** @description The code for the discount */ code: string; /** @description Whether the discount code is applicable to the current order, cart, or item */ applicable: boolean; }[] | null; items: { id?: number | null; gift_card?: boolean | null; /** @description Price for line item (qty * unit price), after discounts, in integer cents format (3.50 => 350) */ final_line_price: number | null; /** @description Unit price for line item, in integer cents format (3.50 => 350) */ final_price?: number | null; /** @description Line item discounts */ line_level_discount_applications?: ({ /** @description The code for the discount */ title: string; } & { [key: string]: unknown; })[] | null; quantity?: number | null; sku: string | null; product_id?: number | null; product_title?: string | null; product_type?: string | null; variant_id?: number | null; }[]; subscriptions?: { remoteSubscriptionId: string; isNew?: boolean; }[]; }; } | { schema: { /** @enum {string} */ source: "shopify"; /** @enum {string} */ variant: "liquid"; version?: string; }; content: { localAmount?: number; /** @description Order or cart level discounts */ discounts?: { /** @description The code for the discount */ code: string; /** @description Whether the discount code is applicable to the current order, cart, or item */ applicable: boolean; }[] | null; items: { id?: number | null; gift_card?: boolean | null; /** @description Price for line item (qty * unit price), after discounts, in decimal format (3.50) */ final_line_price: number | null; /** @description Unit price for line item in decimal format (3.50) */ final_price?: number | null; /** @description Line item discounts */ line_level_discount_applications?: ({ /** @description The code for the discount */ title: string; } & { [key: string]: unknown; })[] | null; quantity?: number | null; sku: string | null; product_id?: number | null; variant_id?: number | null; }[]; subscriptions?: { remoteSubscriptionId: string; isNew?: boolean; }[]; }; } | { schema: { /** * @default generic * @enum {string} */ source: "generic"; /** @enum {string} */ variant?: "default"; version?: string; }; content: { localAmount?: number; /** @description Order or cart level discounts */ discounts?: { /** @description The code for the discount */ code: string; /** @description Whether the discount code is applicable to the current order, cart, or item */ applicable: boolean; }[] | null; items: { remoteProductIdentifier?: string | null; localAmount: number; remoteSubscriptionId?: string; /** @description Line item discounts */ discounts?: { /** @description The code for the discount */ code: string; /** @description Whether the discount code is applicable to the current order, cart, or item */ applicable: boolean; }[] | null; }[]; subscriptions?: { remoteSubscriptionId: string; isNew?: boolean; }[]; }; }; remoteSessionId?: string; options?: { config?: { /** @description Removes the themes object from the remote config object in the response. */ omitThemes?: boolean; draftConfig?: boolean; }; response?: { /** @description Returns the user's overall impact toward the given nonprofit. */ personalImpact?: boolean; /** @description Returns the community's overall impact toward the given nonprofit. */ communityImpact?: boolean; }; }; /** @enum {string} */ widgetName?: "select-nonprofit" | "redeem-transaction" | "select-nonprofit-cta"; /** @example 1.0 */ version?: string; donation?: { currencyCode: string; /** @example 1.25 */ amount: number; }; /** @description The amount in the cart */ cartTotal?: number; discountCodes?: string[]; /** @enum {string|null} */ creationMethod?: "recurring" | null; promos?: { unvalidatedPromoCodes: (Partial<{ /** @enum {string} */ type?: "manual" | "url"; } & { attributes?: { value?: string; }; }> & Partial<{ /** @enum {string} */ type?: "manual" | "url"; } & { attributes?: { url?: string; }; }>)[]; validatedPromoCodes: { /** @description promoCodeId */ promoCodeId: string | null; promoCodeGroupId?: string | null; promoId?: number; /** * Format: date-time * @description ISO formatted date * @example 2023-04-19T03:23:59.301Z */ validatedAt: string; apply: boolean; }[]; }; }; }; }; }; }; "/transaction/{transactionId}": { put: { parameters: { path: { transactionId: number; }; }; responses: { /** Updated successfully */ 204: never; /** Standard error */ default: { content: { "application/json": { /** @description Beam code for the error, meant to be used programmatically */ code: string; /** @description A short, human-readable summary of the problem that SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization */ title: string; /** @description A human-readable explanation specific to this occurrence of the problem. Like title, this field's value can be localized */ detail: string; /** @description a JSON Pointer to the associated entity in the request document */ field?: string; /** @description A meta object containing non-standard meta-information about the error */ metadata?: { [key: string]: unknown; }; /** @description Whether the API or user can resend the request */ retryable?: boolean; } & { source: unknown; meta: unknown; }; }; }; }; requestBody: { content: { "application/json": { /** * @description The ID of the nonprofit * @example 1001 */ nonprofitId?: number; }; }; }; }; }; "/cancelTransactionByOrderId": { put: { parameters: { query: { orderId: Partial & Partial; }; }; responses: { /** Transaction cancelled successfully */ 200: { content: { "application/json": { /** * @description UUID * @example bqkdk-0393b-jbkdd-02difj */ transactionId: string; message: string; }; }; }; /** Standard error */ default: { content: { "application/json": { /** @description Beam code for the error, meant to be used programmatically */ code: string; /** @description A short, human-readable summary of the problem that SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization */ title: string; /** @description A human-readable explanation specific to this occurrence of the problem. Like title, this field's value can be localized */ detail: string; /** @description a JSON Pointer to the associated entity in the request document */ field?: string; /** @description A meta object containing non-standard meta-information about the error */ metadata?: { [key: string]: unknown; }; /** @description Whether the API or user can resend the request */ retryable?: boolean; } & { source: unknown; meta: unknown; }; }; }; }; }; }; "/updateTransactionByOrderId": { post: { responses: { /** Transaction updated successfully */ 200: { content: { "application/json": { /** * @description UUID * @example bqkdk-0393b-jbkdd-02difj */ transactionId: string; message?: string; beamUserId?: string; nonprofitId?: number | null; chainId?: number; config?: { web: { /** * @description Header/title for the widget * @example Choose your impact */ title: string; /** @description Subtitle/description for the widget */ description: string; /** * @description The prefix promo description for the widget for web * @example At no extra cost, */ promoDescriptionPrefix?: string; /** * @description The promo description for the widget for web * @example choose your impact and 1% of your purchase will be donated. */ promoDescription?: string; /** * @description confirm button * @example Confirm free donation */ confirmButton?: string; /** * @description copy once confirm button is clicked * @example Confirmed! */ confirmedButton?: string; /** * @description collapsed button copy * @example Choose a nonprofit */ collapsedButton?: string; /** @description Remote config theme data as requested by the given widgetName & version query params */ theme?: { [key: string]: unknown; } | null; /** * @description nonprofit Selected Header for select-nonprofit-cta widget * @example Your impact */ nonprofitSelectedHeader?: string; /** * @description nonprofit Unselected Header for select-nonprofit-cta widget * @example Make your purchase a force for good */ nonprofitUnselectedHeader?: string; /** @description An object containing dynamic strings for the widget. These strings serve as templates and include dynamic variables that vary based on the widget type. */ dynamicStrings?: { [key: string]: string; } | null; /** @description An object containing additional static strings specific to each widget. These strings are unique to the widget and are not shared across different widgets. */ additionalStrings?: { [key: string]: string; } | null; /** @description Disables counter animation for cumulative-impact widget */ disableAnimation?: boolean; /** @description promo copy is sent in this object to be used in conditionally rendered UI components. This object serves as a repository for server-generated copy */ promo?: { /** @example Donations are 2x for Black History Month */ "promo-text-long": string; /** @example Donations are 2x */ "promo-text-short": string; /** * @description replaces cause copy * @example 2x boosting donations */ "promo-cause-alt-text": string; }; }; mobileWeb?: { /** * @description Header/title for the widget * @example Choose your impact */ title: string; /** * @description Subtitle/description for the widget * @example choose your impact and 1% of your purchase will be donated. */ description: string; /** * @description nonprofit Selected Header for select-nonprofit-cta widget * @example Your impact */ nonprofitSelectedHeader?: string; /** * @description nonprofit Unselected Header for select-nonprofit-cta widget * @example Make your purchase a force for good */ nonprofitUnselectedHeader?: string; }; mobile: { /** * @description Header/title for the widget * @example Choose your impact */ title: string; /** * @description Subtitle/description for the widget * @example choose your impact and 1% of your purchase will be donated. */ description: string; /** * @description nonprofit Selected Header for select-nonprofit-cta widget * @example Your impact */ nonprofitSelectedHeader?: string; /** * @description nonprofit Unselected Header for select-nonprofit-cta widget * @example Make your purchase a force for good */ nonprofitUnselectedHeader?: string; }; /** * @description determines if a chain can enable nonprofit deselection for the select-nonprofit widget * @default false */ enableNonprofitDeselection?: boolean; } | null; impact?: { personal?: { /** * @description URL including file extension, e.g., an image path * @example https://cdn.beamimpact.com/logos/beam.png */ imageUrl: string | null; nonprofit: { /** * @description Numeric ID * @example 1001 */ id: number; /** @example LA Regional Food Bank */ name: string; /** @example Food Security */ cause: string | null; /** * @description URL including file extension, e.g., an image path * @example https://cdn.beamimpact.com/logos/beam.png */ causeIconUrl: string | null; /** * @description URL including file extension, e.g., an image path * @example https://cdn.beamimpact.com/logos/beam.png */ causeIconSelectedUrl: string | null; /** * @description Hex code of the color for the nonprofit when it is selected * @example #000000 */ causeColor: string | null; extensibility?: { /** @description The cause icon for the extensibility widgets due to color scheme limitations */ causeIconUrl?: string | null; /** @description The cause selected icon for the extensibility widgets due to color scheme limitations */ causeIconSelectedUrl?: string | null; /** @description The cause selected icon with a background the post purchase extensibility widget due to color scheme limitations */ causeIconAndBackgroundUrl?: string | null; }; /** * @description A URL string * @example https://beamimpact.com */ website: string | null; /** @example Learn More */ websiteLinkText: string; /** * @description a label that can be used for location * @example Hawaii */ badge?: string; /** @description should include nonprofit in personal impact */ includeInPersonalImpact?: boolean; }; impact: { /** * @description The description of the funding * @example Fund 10 sewing machines... */ description: string | null; /** * @description The string representing the number of times the goal has been completed * @example Funded 2 times so far */ goalCompletionText: string; /** * @description The text next to the progress bar * @example 54% funded */ goalProgressText: string; /** * @description The progress towards the next goal completion * @example 41 */ goalProgressPercentage: number; }; share: { /** * @description URL including file extension, e.g., an image path * @example https://cdn.beamimpact.com/logos/beam.png */ imageUrl: string | null; }; /** * @example [ * "Midwest", * "Southeast" * ] */ filters?: string[]; }[]; community?: { /** * @description URL including file extension, e.g., an image path * @example https://cdn.beamimpact.com/logos/beam.png */ imageUrl: string | null; nonprofit: { /** * @description Numeric ID * @example 1001 */ id: number; /** @example LA Regional Food Bank */ name: string; /** @example Food Security */ cause: string | null; /** * @description URL including file extension, e.g., an image path * @example https://cdn.beamimpact.com/logos/beam.png */ causeIconUrl: string | null; /** * @description URL including file extension, e.g., an image path * @example https://cdn.beamimpact.com/logos/beam.png */ causeIconSelectedUrl: string | null; /** * @description Hex code of the color for the nonprofit when it is selected * @example #000000 */ causeColor: string | null; extensibility?: { /** @description The cause icon for the extensibility widgets due to color scheme limitations */ causeIconUrl?: string | null; /** @description The cause selected icon for the extensibility widgets due to color scheme limitations */ causeIconSelectedUrl?: string | null; /** @description The cause selected icon with a background the post purchase extensibility widget due to color scheme limitations */ causeIconAndBackgroundUrl?: string | null; }; /** * @description A URL string * @example https://beamimpact.com */ website: string | null; /** @example Learn More */ websiteLinkText: string; /** * @description a label that can be used for location * @example Hawaii */ badge?: string; /** @description should include nonprofit in personal impact */ includeInPersonalImpact?: boolean; }; impact: { /** * @description The description of the funding * @example Fund 10 sewing machines... */ description: string | null; /** * @description The string representing the number of times the goal has been completed * @example Funded 2 times so far */ goalCompletionText: string; /** * @description The text next to the progress bar * @example 54% funded */ goalProgressText: string; /** * @description The progress towards the next goal completion * @example 41 */ goalProgressPercentage: number; }; share: { /** * @description URL including file extension, e.g., an image path * @example https://cdn.beamimpact.com/logos/beam.png */ imageUrl: string | null; }; /** * @example [ * "Midwest", * "Southeast" * ] */ filters?: string[]; }[]; }; }; }; }; /** Standard error */ default: { content: { "application/json": { /** @description Beam code for the error, meant to be used programmatically */ code: string; /** @description A short, human-readable summary of the problem that SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization */ title: string; /** @description A human-readable explanation specific to this occurrence of the problem. Like title, this field's value can be localized */ detail: string; /** @description a JSON Pointer to the associated entity in the request document */ field?: string; /** @description A meta object containing non-standard meta-information about the error */ metadata?: { [key: string]: unknown; }; /** @description Whether the API or user can resend the request */ retryable?: boolean; } & { source: unknown; meta: unknown; }; }; }; }; requestBody: { content: { "application/json": Partial<{ /** @description The partner's order ID */ orderId: string; /** * @description The ID of the store * @example 1001 */ storeId: number; /** * @description The ID of the selection * @example bqkdk-0393b-jbkdd-02difj */ selectionId?: string; /** @description Beam generated cart id if exists */ beamCartId?: string; /** @description (externalCartId) Unique identifier for the cart provided by partner. */ cartId?: string; /** * @description The ID of the nonprofit * @example 1001 */ nonprofitId?: number; /** * @description Beam ID of the user. Required if email is not provided * @example bqkdk-0393b-jbkdd-02difj */ beamUserId?: string; /** @description Email of the user. Required if beam ID is not provided */ email?: string; /** @description The amount in the cart */ cartTotal: number; donation?: { currencyCode: string; /** @example 1.25 */ amount: number; }; /** @description ISO currency code */ currencyCode: string; /** @example 10292 */ postalCode?: string; /** @example US */ countryCode?: string; isCanceled?: boolean; discountCodes?: string[]; /** @enum {string|null} */ creationMethod?: "recurring" | null; cart?: { schema: { /** @enum {string} */ source: "shopify"; /** @enum {string} */ variant: "ajax"; version?: string; }; content: { localAmount?: number; /** @description Order or cart level discounts */ discounts?: { /** @description The code for the discount */ code: string; /** @description Whether the discount code is applicable to the current order, cart, or item */ applicable: boolean; }[] | null; items: { id?: number | null; gift_card?: boolean | null; /** @description Price for line item (qty * unit price), after discounts, in integer cents format (3.50 => 350) */ final_line_price: number | null; /** @description Unit price for line item, in integer cents format (3.50 => 350) */ final_price?: number | null; /** @description Line item discounts */ line_level_discount_applications?: ({ /** @description The code for the discount */ title: string; } & { [key: string]: unknown; })[] | null; quantity?: number | null; sku: string | null; product_id?: number | null; product_title?: string | null; product_type?: string | null; variant_id?: number | null; }[]; subscriptions?: { remoteSubscriptionId: string; isNew?: boolean; }[]; }; } | { schema: { /** @enum {string} */ source: "shopify"; /** @enum {string} */ variant: "liquid"; version?: string; }; content: { localAmount?: number; /** @description Order or cart level discounts */ discounts?: { /** @description The code for the discount */ code: string; /** @description Whether the discount code is applicable to the current order, cart, or item */ applicable: boolean; }[] | null; items: { id?: number | null; gift_card?: boolean | null; /** @description Price for line item (qty * unit price), after discounts, in decimal format (3.50) */ final_line_price: number | null; /** @description Unit price for line item in decimal format (3.50) */ final_price?: number | null; /** @description Line item discounts */ line_level_discount_applications?: ({ /** @description The code for the discount */ title: string; } & { [key: string]: unknown; })[] | null; quantity?: number | null; sku: string | null; product_id?: number | null; variant_id?: number | null; }[]; subscriptions?: { remoteSubscriptionId: string; isNew?: boolean; }[]; }; } | { schema: { /** * @default generic * @enum {string} */ source: "generic"; /** @enum {string} */ variant?: "default"; version?: string; }; content: { localAmount?: number; /** @description Order or cart level discounts */ discounts?: { /** @description The code for the discount */ code: string; /** @description Whether the discount code is applicable to the current order, cart, or item */ applicable: boolean; }[] | null; items: { remoteProductIdentifier?: string | null; localAmount: number; remoteSubscriptionId?: string; /** @description Line item discounts */ discounts?: { /** @description The code for the discount */ code: string; /** @description Whether the discount code is applicable to the current order, cart, or item */ applicable: boolean; }[] | null; }[]; subscriptions?: { remoteSubscriptionId: string; isNew?: boolean; }[]; }; }; }> & Partial<{ chainId: number; orderId: string; nonprofitId?: number; isCanceled?: boolean; /** @enum {string} */ widgetName?: "community-impact" | "impact-overview" | "select-nonprofit" | "redeem-transaction" | "cumulative-impact" | "mobile-full-screen-nonprofit-selection" | "mobile-impact-list" | "mobile-minimal-nonprofit-selection" | "mobile-personal-impact" | "mobile-selected-nonprofit" | "mobile-progress-bar" | "select-nonprofit-cta" | "mobile-share-button" | "subscription-management" | "product-details-page" | "select-subscription-nonprofit" | "subscription-impact" | "subscriber-select-nonprofit"; version?: string; options?: { response?: { /** @description Returns the user's overall impact toward the given nonprofit. */ personalImpact?: boolean; /** @description Returns the community's overall impact toward the given nonprofit. */ communityImpact?: boolean; }; config?: { /** @description Removes the themes object from the remote config object in the response. */ omitThemes?: boolean; draftConfig?: boolean; }; }; }>; }; }; }; }; "/v4/transaction": { post: { responses: { /** Transaction that was either created or existing */ 201: { content: { "application/json": { transactionId: string; /** * Format: uuid * @description The ID of the selection * @example bqkdk-0393b-jbkdd-02difj */ selectionId: string | null; transactionCreated: boolean; beamUserId: string; nonprofitId: number | null; /** @description Report Settings */ reportSettings?: { /** * @description Whether to exclude donations on recurring transactions * @default false * @example true */ excludeRecurringDonations?: boolean; }; /** @description Extensibility-related settings */ extensibility?: { /** * @description Whether to exclude B2B orders from reporting and from seeing Beam widgets * @example true */ excludeB2BOrders?: boolean; }; creationMethod: string | null; timestamp: string; }; }; }; /** Standard error */ default: { content: { "application/json": { /** @description Beam code for the error, meant to be used programmatically */ code: string; /** @description A short, human-readable summary of the problem that SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization */ title: string; /** @description A human-readable explanation specific to this occurrence of the problem. Like title, this field's value can be localized */ detail: string; /** @description a JSON Pointer to the associated entity in the request document */ field?: string; /** @description A meta object containing non-standard meta-information about the error */ metadata?: { [key: string]: unknown; }; /** @description Whether the API or user can resend the request */ retryable?: boolean; } & { source: unknown; meta: unknown; }; }; }; }; requestBody: { content: { "application/json": { /** @description The partner's order ID */ orderId: string | number; /** * @description The ID of the store * @example 1001 */ storeId?: number; /** * @description The ID of the selection * @example bqkdk-0393b-jbkdd-02difj */ selectionId?: string; /** * @description Beam generated cart id if exists * @example bqkdk-0393b-jbkdd-02difj */ beamCartId?: string; /** @description (externalCartId) Unique identifier for the cart provided by partner. */ cartId?: string; /** @description Email of the user. Required if partner user ID are not provided */ email?: string; /** @description The user ID of the partner. Required if email are not provided */ partnerUserId?: string; /** @description ISO currency code */ currencyCode: string; /** @example 10292 */ postalCode?: string; /** @example US */ countryCode?: string; cart?: { schema: { /** @enum {string} */ source: "shopify"; /** @enum {string} */ variant: "ajax"; version?: string; }; content: { localAmount?: number; /** @description Order or cart level discounts */ discounts?: { /** @description The code for the discount */ code: string; /** @description Whether the discount code is applicable to the current order, cart, or item */ applicable: boolean; }[] | null; items: { id?: number | null; gift_card?: boolean | null; /** @description Price for line item (qty * unit price), after discounts, in integer cents format (3.50 => 350) */ final_line_price: number | null; /** @description Unit price for line item, in integer cents format (3.50 => 350) */ final_price?: number | null; /** @description Line item discounts */ line_level_discount_applications?: ({ /** @description The code for the discount */ title: string; } & { [key: string]: unknown; })[] | null; quantity?: number | null; sku: string | null; product_id?: number | null; product_title?: string | null; product_type?: string | null; variant_id?: number | null; }[]; subscriptions?: { remoteSubscriptionId: string; isNew?: boolean; }[]; }; } | { schema: { /** @enum {string} */ source: "shopify"; /** @enum {string} */ variant: "liquid"; version?: string; }; content: { localAmount?: number; /** @description Order or cart level discounts */ discounts?: { /** @description The code for the discount */ code: string; /** @description Whether the discount code is applicable to the current order, cart, or item */ applicable: boolean; }[] | null; items: { id?: number | null; gift_card?: boolean | null; /** @description Price for line item (qty * unit price), after discounts, in decimal format (3.50) */ final_line_price: number | null; /** @description Unit price for line item in decimal format (3.50) */ final_price?: number | null; /** @description Line item discounts */ line_level_discount_applications?: ({ /** @description The code for the discount */ title: string; } & { [key: string]: unknown; })[] | null; quantity?: number | null; sku: string | null; product_id?: number | null; variant_id?: number | null; }[]; subscriptions?: { remoteSubscriptionId: string; isNew?: boolean; }[]; }; } | { schema: { /** * @default generic * @enum {string} */ source: "generic"; /** @enum {string} */ variant?: "default"; version?: string; }; content: { localAmount?: number; /** @description Order or cart level discounts */ discounts?: { /** @description The code for the discount */ code: string; /** @description Whether the discount code is applicable to the current order, cart, or item */ applicable: boolean; }[] | null; items: { remoteProductIdentifier?: string | null; localAmount: number; remoteSubscriptionId?: string; /** @description Line item discounts */ discounts?: { /** @description The code for the discount */ code: string; /** @description Whether the discount code is applicable to the current order, cart, or item */ applicable: boolean; }[] | null; }[]; subscriptions?: { remoteSubscriptionId: string; isNew?: boolean; }[]; }; }; remoteSessionId?: string; donation?: { currencyCode: string; /** @example 1.25 */ amount: number; }; /** @description The amount in the cart */ cartTotal?: number; discountCodes?: string[]; promos?: { unvalidatedPromoCodes: (Partial<{ /** @enum {string} */ type?: "manual" | "url"; } & { attributes?: { value?: string; }; }> & Partial<{ /** @enum {string} */ type?: "manual" | "url"; } & { attributes?: { url?: string; }; }>)[]; validatedPromoCodes: { /** @description promoCodeId */ promoCodeId: string | null; promoCodeGroupId?: string | null; promoId?: number; /** * Format: date-time * @description ISO formatted date * @example 2023-04-19T03:23:59.301Z */ validatedAt: string; apply: boolean; }[]; }; /** @description Timestamp e.g. 2025-10-14 or 2025-09-23 00:19:41.199000 +00:00 */ orderProcessedAt?: string; }; }; }; }; }; "/v4/transaction/redeem/{transactionId}": { put: { parameters: { path: { transactionId: string; }; }; responses: { /** The redeemed transaction */ 200: { content: { "application/json": { transactionId: string; beamUserId: string; nonprofitId: number | null; }; }; }; /** Standard error */ default: { content: { "application/json": { /** @description Beam code for the error, meant to be used programmatically */ code: string; /** @description A short, human-readable summary of the problem that SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization */ title: string; /** @description A human-readable explanation specific to this occurrence of the problem. Like title, this field's value can be localized */ detail: string; /** @description a JSON Pointer to the associated entity in the request document */ field?: string; /** @description A meta object containing non-standard meta-information about the error */ metadata?: { [key: string]: unknown; }; /** @description Whether the API or user can resend the request */ retryable?: boolean; } & { source: unknown; meta: unknown; }; }; }; }; requestBody: { content: { "application/json": { nonprofitId: number; }; }; }; }; }; "/v4/transaction/impact/{transactionId}": { get: { parameters: { path: { transactionId: string; }; query: { includeExtensibility?: boolean; widgetName: string; version: string; /** Language code. */ lang?: "en" | "fr" | "de" | "es" | "it" | "pl" | "ja"; /** When set to true, draft themes are returned */ draftConfig?: boolean; }; }; responses: { /** The impact from the transaction */ 200: { content: { "application/json": { transactionId: string; beamUserId: string; impact: { personalImpact: { nonprofit: { name: string; causeIconUrl: string | null; causeIconSelectedUrl: string | null; causeIconAndBackground: string | null; website: string; }; description: string; /** * @description The progress towards the goal for the nonprofit and brand * @example 70% Funded */ goalProgressText: string; /** * @description The progress towards the next goal completion * @example 70 */ goalProgressPercentage: number; /** * @description The number of times the goal has been reached * @example Funded 3 times */ goalCompletionText: string | null; imageUrl: string | null; shareImageUrl: string | null; cause: string | null; }; communityImpact: { nonprofit: { name: string; causeIconUrl: string | null; causeIconSelectedUrl: string | null; causeIconAndBackground: string | null; website: string; }; description: string; /** * @description The progress towards the goal for the nonprofit and brand * @example 70% Funded */ goalProgressText: string; /** * @description The progress towards the next goal completion * @example 70 */ goalProgressPercentage: number; /** * @description The number of times the goal has been reached * @example Funded 3 times */ goalCompletionText: string | null; imageUrl: string | null; shareImageUrl: string | null; cause: string | null; }; }; config: { web: { /** * @description The header for the widget for mobile * @example What we've funded */ title: string; /** * @description The description for the widget for mobile * @example Here's the impact that our community has made so far in our partnership with Beam */ description: string; /** @description The remote config theme data */ theme: { [key: string]: unknown; } | null; /** * @description The prefix promo description for the widget for web * @example At no extra cost, */ promoDescriptionPrefix: string | null; /** * @description The promo description for the widget for web * @example choose your impact and 1% of your purchase will be donated. */ promoDescription: string | null; /** * @description confirm button * @example Confirm free donation */ confirmButton: string | null; /** * @description copy once confirm button is clicked * @example Confirmed! */ confirmedButton: string | null; /** * @description collapsed button copy * @example Choose a nonprofit */ collapsedButton: string | null; /** @description promo copy is sent in this object to be used in conditionally rendered UI components. This object serves as a repository for server-generated copy */ promo: { /** @example Donations are 2x for Black History Month */ "promo-text-long": string; /** @example Donations are 2x */ "promo-text-short": string; /** * @description replaces cause copy * @example 2x boosting donations */ "promo-cause-alt-text": string; } | null; }; }; chain: { displayName: string; logoUrl: string; communityPageUrl: string; logoLockupUrl: string | null; }; store: { communityPageUrl: string; displayName: string; }; }; }; }; /** Standard error */ default: { content: { "application/json": { /** @description Beam code for the error, meant to be used programmatically */ code: string; /** @description A short, human-readable summary of the problem that SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization */ title: string; /** @description A human-readable explanation specific to this occurrence of the problem. Like title, this field's value can be localized */ detail: string; /** @description a JSON Pointer to the associated entity in the request document */ field?: string; /** @description A meta object containing non-standard meta-information about the error */ metadata?: { [key: string]: unknown; }; /** @description Whether the API or user can resend the request */ retryable?: boolean; } & { source: unknown; meta: unknown; }; }; }; }; }; }; "/v4/transaction/{transactionId}/update": { post: { parameters: { path: { transactionId: string; }; }; responses: { /** The updated transaction */ 200: { content: { "application/json": { transactionId: string; selectionId: string | null; transactionCreated: boolean; beamUserId: string; nonprofitId: number | null; creationMethod: string | null; timestamp: string; }; }; }; /** Standard error */ default: { content: { "application/json": { /** @description Beam code for the error, meant to be used programmatically */ code: string; /** @description A short, human-readable summary of the problem that SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization */ title: string; /** @description A human-readable explanation specific to this occurrence of the problem. Like title, this field's value can be localized */ detail: string; /** @description a JSON Pointer to the associated entity in the request document */ field?: string; /** @description A meta object containing non-standard meta-information about the error */ metadata?: { [key: string]: unknown; }; /** @description Whether the API or user can resend the request */ retryable?: boolean; } & { source: unknown; meta: unknown; }; }; }; }; requestBody: { content: { "application/json": { /** * @description The ID of the selection to add to the transaction * @example bqkdk-0393b-jbkdd-02difj */ selectionId: string; }; }; }; }; }; "/v4/events/socialShare": { post: { responses: { /** Social Share event created */ 200: unknown; /** Standard error */ default: { content: { "application/json": { /** @description Beam code for the error, meant to be used programmatically */ code: string; /** @description A short, human-readable summary of the problem that SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization */ title: string; /** @description A human-readable explanation specific to this occurrence of the problem. Like title, this field's value can be localized */ detail: string; /** @description a JSON Pointer to the associated entity in the request document */ field?: string; /** @description A meta object containing non-standard meta-information about the error */ metadata?: { [key: string]: unknown; }; /** @description Whether the API or user can resend the request */ retryable?: boolean; } & { source: unknown; meta: unknown; }; }; }; }; requestBody: { content: { "application/json": { eventName: string; nonprofitId: number; storeId: number; transactionId: number; timestamp: number; }; }; }; }; }; "/subscriptions/updateSubscriptionNonprofit": { post: { responses: { /** Subscription updated */ 200: unknown; }; requestBody: { content: { "application/json": { /** @description Id derived from partner services. Not the Beam subscription ID. */ remoteSubscriptionId: string; nonprofitId: number | null; /** @enum {string|null} */ selectionMethod?: ("dashboard" | "remote_order" | "checkout" | "subscription_management_widget" | "subscriber_select_nonprofit_widget") | null; }; }; }; }; }; "/subscriptions/cancelSubscription": { post: { responses: { /** Subscription updated */ 200: unknown; }; requestBody: { content: { "application/json": { /** @description Id derived from partner services. Not the Beam subscription ID. */ remoteSubscriptionId: string; }; }; }; }; }; "/subscriptions/findOrCreateSubscription": { post: { responses: { /** Sends subscription info along with corresponding nonprofit and cause data */ 200: { content: { "application/json": { beamUserId: string; remoteSubscriptionId: string; internalSubscriptionId: string; settings?: { excludeDonationsForRecurringTransactions: boolean; }; nonprofit: { /** * @description Numeric ID * @example 1001 */ id: number; name?: string; } | null; }; }; }; /** Standard error */ default: { content: { "application/json": { /** @description Beam code for the error, meant to be used programmatically */ code: string; /** @description A short, human-readable summary of the problem that SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization */ title: string; /** @description A human-readable explanation specific to this occurrence of the problem. Like title, this field's value can be localized */ detail: string; /** @description a JSON Pointer to the associated entity in the request document */ field?: string; /** @description A meta object containing non-standard meta-information about the error */ metadata?: { [key: string]: unknown; }; /** @description Whether the API or user can resend the request */ retryable?: boolean; } & { source: unknown; meta: unknown; }; }; }; }; requestBody: { content: { "application/json": ({ remoteSubscriptionId: string; options?: { disableDefaultToUniversalSubscriptionIfNotFound?: boolean; }; } & { [key: string]: unknown; }) & (Partial<{ partnerUserId: string; }> & Partial<{ email: string; }>); }; }; }; }; "/subscriptions/findNonprofitForSubscription": { post: { responses: { /** Nonprofit information associated to the subscription */ 200: { content: { "application/json": { /** * @description Numeric ID * @example 1001 */ id?: number; name?: string; cause?: string | null; } | null; }; }; /** Standard error */ default: { content: { "application/json": { /** @description Beam code for the error, meant to be used programmatically */ code: string; /** @description A short, human-readable summary of the problem that SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization */ title: string; /** @description A human-readable explanation specific to this occurrence of the problem. Like title, this field's value can be localized */ detail: string; /** @description a JSON Pointer to the associated entity in the request document */ field?: string; /** @description A meta object containing non-standard meta-information about the error */ metadata?: { [key: string]: unknown; }; /** @description Whether the API or user can resend the request */ retryable?: boolean; } & { source: unknown; meta: unknown; }; }; }; }; requestBody: { content: { "application/json": ({ remoteSubscriptionId: string; } & { [key: string]: unknown; }) & (Partial<{ partnerUserId: string; }> & Partial<{ email: string; }>); }; }; }; }; "/selectNonprofit": { post: { responses: { /** Existing selection updated OK */ 200: { content: { "application/json": { /** * @description UUID * @example bqkdk-0393b-jbkdd-02difj */ selectionId: string; }; }; }; /** New selection created OK */ 201: { content: { "application/json": { /** * @description UUID * @example bqkdk-0393b-jbkdd-02difj */ selectionId: string; }; }; }; /** Standard error */ default: { content: { "application/json": { /** @description Beam code for the error, meant to be used programmatically */ code: string; /** @description A short, human-readable summary of the problem that SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization */ title: string; /** @description A human-readable explanation specific to this occurrence of the problem. Like title, this field's value can be localized */ detail: string; /** @description a JSON Pointer to the associated entity in the request document */ field?: string; /** @description A meta object containing non-standard meta-information about the error */ metadata?: { [key: string]: unknown; }; /** @description Whether the API or user can resend the request */ retryable?: boolean; } & { source: unknown; meta: unknown; }; }; }; }; requestBody: { content: { "application/json": { nonprofitId: number | null; /** * @description UUID * @example bqkdk-0393b-jbkdd-02difj */ selectionId?: string | null; /** @description Cart ID from partner site */ cartId?: string; /** * @description internal cart ID * @example bqkdk-0393b-jbkdd-02difj */ beamCartId?: string; /** @description Beam store ID */ storeId?: number; /** @description UUID of existing beam user. Used to update user's `lastNonprofitId` */ beamUserId?: string | null; /** @example 10292 */ postalCode?: string; /** @example US */ countryCode?: string; /** @description is this a test selection? */ isTest?: boolean; /** * @description The source from where the selection was made * @enum {string} */ creationMethod?: "cart" | "checkout"; }; }; }; }; }; "/getLastSelectedNonprofit": { get: { parameters: { query: { beamUserId: string; }; }; responses: { /** Retrieved user's last selected nonprofit. */ 200: { content: { "application/json": { /** @description ID of last selected nonprofit */ nonprofitId: number; }; }; }; /** Standard error */ default: { content: { "application/json": { /** @description Beam code for the error, meant to be used programmatically */ code: string; /** @description A short, human-readable summary of the problem that SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization */ title: string; /** @description A human-readable explanation specific to this occurrence of the problem. Like title, this field's value can be localized */ detail: string; /** @description a JSON Pointer to the associated entity in the request document */ field?: string; /** @description A meta object containing non-standard meta-information about the error */ metadata?: { [key: string]: unknown; }; /** @description Whether the API or user can resend the request */ retryable?: boolean; } & { source: unknown; meta: unknown; }; }; }; }; }; }; "/remoteConfig": { get: { parameters: { query: { chainId: number; widgetName: "community-impact" | "impact-overview" | "select-nonprofit" | "redeem-transaction" | "cumulative-impact" | "mobile-full-screen-nonprofit-selection" | "mobile-impact-list" | "mobile-minimal-nonprofit-selection" | "mobile-personal-impact" | "mobile-selected-nonprofit" | "mobile-progress-bar" | "select-nonprofit-cta" | "mobile-share-button" | "subscription-management" | "product-details-page" | "select-subscription-nonprofit" | "subscription-impact" | "subscriber-select-nonprofit"; version: string; }; }; responses: { /** Fetch remote config for the provided chain and widget OK */ 200: { content: { "application/json": { [key: string]: unknown; }; }; }; }; }; post: { responses: { /** Remote config created successfully */ 201: unknown; /** Remote config updated successfully */ 204: never; /** Standard error */ default: { content: { "application/json": { /** @description Beam code for the error, meant to be used programmatically */ code: string; /** @description A short, human-readable summary of the problem that SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization */ title: string; /** @description A human-readable explanation specific to this occurrence of the problem. Like title, this field's value can be localized */ detail: string; /** @description a JSON Pointer to the associated entity in the request document */ field?: string; /** @description A meta object containing non-standard meta-information about the error */ metadata?: { [key: string]: unknown; }; /** @description Whether the API or user can resend the request */ retryable?: boolean; } & { source: unknown; meta: unknown; }; }; }; }; requestBody: { content: { "application/json": { /** @example 4058 */ chainId: number; /** @enum {string} */ widgetName: "community-impact" | "impact-overview" | "select-nonprofit" | "redeem-transaction" | "cumulative-impact" | "mobile-full-screen-nonprofit-selection" | "mobile-impact-list" | "mobile-minimal-nonprofit-selection" | "mobile-personal-impact" | "mobile-selected-nonprofit" | "mobile-progress-bar" | "select-nonprofit-cta" | "mobile-share-button" | "subscription-management" | "product-details-page" | "select-subscription-nonprofit" | "subscription-impact" | "subscriber-select-nonprofit"; /** @example 1.0 */ version: string; config: { live: { web: { /** * @description Header/title for the widget * @example Choose your impact */ title: string; /** @description Subtitle/description for the widget */ description: string; /** * @description The prefix promo description for the widget for web * @example At no extra cost, */ promoDescriptionPrefix?: string; /** * @description The promo description for the widget for web * @example choose your impact and 1% of your purchase will be donated. */ promoDescription?: string; /** * @description confirm button * @example Confirm free donation */ confirmButton?: string; /** * @description copy once confirm button is clicked * @example Confirmed! */ confirmedButton?: string; /** * @description collapsed button copy * @example Choose a nonprofit */ collapsedButton?: string; /** @description Remote config theme data as requested by the given widgetName & version query params */ theme?: { [key: string]: unknown; } | null; /** * @description nonprofit Selected Header for select-nonprofit-cta widget * @example Your impact */ nonprofitSelectedHeader?: string; /** * @description nonprofit Unselected Header for select-nonprofit-cta widget * @example Make your purchase a force for good */ nonprofitUnselectedHeader?: string; /** @description An object containing dynamic strings for the widget. These strings serve as templates and include dynamic variables that vary based on the widget type. */ dynamicStrings?: { [key: string]: string; } | null; /** @description An object containing additional static strings specific to each widget. These strings are unique to the widget and are not shared across different widgets. */ additionalStrings?: { [key: string]: string; } | null; /** @description Disables counter animation for cumulative-impact widget */ disableAnimation?: boolean; /** @description promo copy is sent in this object to be used in conditionally rendered UI components. This object serves as a repository for server-generated copy */ promo?: { /** @example Donations are 2x for Black History Month */ "promo-text-long": string; /** @example Donations are 2x */ "promo-text-short": string; /** * @description replaces cause copy * @example 2x boosting donations */ "promo-cause-alt-text": string; }; }; mobileWeb?: { /** * @description Header/title for the widget * @example Choose your impact */ title: string; /** * @description Subtitle/description for the widget * @example choose your impact and 1% of your purchase will be donated. */ description: string; /** * @description nonprofit Selected Header for select-nonprofit-cta widget * @example Your impact */ nonprofitSelectedHeader?: string; /** * @description nonprofit Unselected Header for select-nonprofit-cta widget * @example Make your purchase a force for good */ nonprofitUnselectedHeader?: string; }; mobile: { /** * @description Header/title for the widget * @example Choose your impact */ title: string; /** * @description Subtitle/description for the widget * @example choose your impact and 1% of your purchase will be donated. */ description: string; /** * @description nonprofit Selected Header for select-nonprofit-cta widget * @example Your impact */ nonprofitSelectedHeader?: string; /** * @description nonprofit Unselected Header for select-nonprofit-cta widget * @example Make your purchase a force for good */ nonprofitUnselectedHeader?: string; }; /** * @description determines if a chain can enable nonprofit deselection for the select-nonprofit widget * @default false */ enableNonprofitDeselection?: boolean; }; draft?: { web: { /** * @description Header/title for the widget * @example Choose your impact */ title: string; /** @description Subtitle/description for the widget */ description: string; /** * @description The prefix promo description for the widget for web * @example At no extra cost, */ promoDescriptionPrefix?: string; /** * @description The promo description for the widget for web * @example choose your impact and 1% of your purchase will be donated. */ promoDescription?: string; /** * @description confirm button * @example Confirm free donation */ confirmButton?: string; /** * @description copy once confirm button is clicked * @example Confirmed! */ confirmedButton?: string; /** * @description collapsed button copy * @example Choose a nonprofit */ collapsedButton?: string; /** @description Remote config theme data as requested by the given widgetName & version query params */ theme?: { [key: string]: unknown; } | null; /** * @description nonprofit Selected Header for select-nonprofit-cta widget * @example Your impact */ nonprofitSelectedHeader?: string; /** * @description nonprofit Unselected Header for select-nonprofit-cta widget * @example Make your purchase a force for good */ nonprofitUnselectedHeader?: string; /** @description An object containing dynamic strings for the widget. These strings serve as templates and include dynamic variables that vary based on the widget type. */ dynamicStrings?: { [key: string]: string; } | null; /** @description An object containing additional static strings specific to each widget. These strings are unique to the widget and are not shared across different widgets. */ additionalStrings?: { [key: string]: string; } | null; /** @description Disables counter animation for cumulative-impact widget */ disableAnimation?: boolean; /** @description promo copy is sent in this object to be used in conditionally rendered UI components. This object serves as a repository for server-generated copy */ promo?: { /** @example Donations are 2x for Black History Month */ "promo-text-long": string; /** @example Donations are 2x */ "promo-text-short": string; /** * @description replaces cause copy * @example 2x boosting donations */ "promo-cause-alt-text": string; }; }; mobileWeb?: { /** * @description Header/title for the widget * @example Choose your impact */ title: string; /** * @description Subtitle/description for the widget * @example choose your impact and 1% of your purchase will be donated. */ description: string; /** * @description nonprofit Selected Header for select-nonprofit-cta widget * @example Your impact */ nonprofitSelectedHeader?: string; /** * @description nonprofit Unselected Header for select-nonprofit-cta widget * @example Make your purchase a force for good */ nonprofitUnselectedHeader?: string; }; mobile: { /** * @description Header/title for the widget * @example Choose your impact */ title: string; /** * @description Subtitle/description for the widget * @example choose your impact and 1% of your purchase will be donated. */ description: string; /** * @description nonprofit Selected Header for select-nonprofit-cta widget * @example Your impact */ nonprofitSelectedHeader?: string; /** * @description nonprofit Unselected Header for select-nonprofit-cta widget * @example Make your purchase a force for good */ nonprofitUnselectedHeader?: string; }; /** * @description determines if a chain can enable nonprofit deselection for the select-nonprofit widget * @default false */ enableNonprofitDeselection?: boolean; }; }; }; }; }; }; }; "/remoteConfig/mobile": { get: { parameters: { query: { chainId: number; /** Widget version. Defaults to 1.0 */ version?: string; }; }; responses: { /** Fetch remote config for the provided chain and widget OK */ 200: { content: { "application/json": { communityImpact?: { /** * @description Header/title for the widget * @example Choose your impact */ title: string; /** * @description Subtitle/description for the widget * @example choose your impact and 1% of your purchase will be donated. */ description: string; /** * @description nonprofit Selected Header for select-nonprofit-cta widget * @example Your impact */ nonprofitSelectedHeader?: string; /** * @description nonprofit Unselected Header for select-nonprofit-cta widget * @example Make your purchase a force for good */ nonprofitUnselectedHeader?: string; }; impactOverview?: { /** * @description Header/title for the widget * @example Choose your impact */ title: string; /** * @description Subtitle/description for the widget * @example choose your impact and 1% of your purchase will be donated. */ description: string; /** * @description nonprofit Selected Header for select-nonprofit-cta widget * @example Your impact */ nonprofitSelectedHeader?: string; /** * @description nonprofit Unselected Header for select-nonprofit-cta widget * @example Make your purchase a force for good */ nonprofitUnselectedHeader?: string; }; selectNonprofit?: { /** * @description Header/title for the widget * @example Choose your impact */ title: string; /** * @description Subtitle/description for the widget * @example choose your impact and 1% of your purchase will be donated. */ description: string; /** * @description nonprofit Selected Header for select-nonprofit-cta widget * @example Your impact */ nonprofitSelectedHeader?: string; /** * @description nonprofit Unselected Header for select-nonprofit-cta widget * @example Make your purchase a force for good */ nonprofitUnselectedHeader?: string; }; redeemTransaction?: { /** * @description Header/title for the widget * @example Choose your impact */ title: string; /** * @description Subtitle/description for the widget * @example choose your impact and 1% of your purchase will be donated. */ description: string; /** * @description nonprofit Selected Header for select-nonprofit-cta widget * @example Your impact */ nonprofitSelectedHeader?: string; /** * @description nonprofit Unselected Header for select-nonprofit-cta widget * @example Make your purchase a force for good */ nonprofitUnselectedHeader?: string; }; cumulativeImpact?: { /** * @description Header/title for the widget * @example Choose your impact */ title: string; /** * @description Subtitle/description for the widget * @example choose your impact and 1% of your purchase will be donated. */ description: string; /** * @description nonprofit Selected Header for select-nonprofit-cta widget * @example Your impact */ nonprofitSelectedHeader?: string; /** * @description nonprofit Unselected Header for select-nonprofit-cta widget * @example Make your purchase a force for good */ nonprofitUnselectedHeader?: string; }; }; }; }; }; }; }; "/cart": { post: { responses: { /** Cart created or updated */ 200: { content: { "application/json": { /** * @deprecated * @description id of external cart object */ id: string | null; /** * Format: date-time * @description ISO formatted date * @example 2023-04-19T03:23:59.301Z */ expiresAt: string | null; /** * @description UUID * @example bqkdk-0393b-jbkdd-02difj */ beamCartId: string | null; /** @description Whether the Beam Cart was created (T) or updated (F). Null if beamCartId is null. */ beamCartCreated?: boolean | null; /** @description Whether the external Cart was created (T) or updated (F). Null if external cart id is null. */ externalCartCreated?: boolean | null; }; }; }; /** Standard error */ default: { content: { "application/json": { /** @description Beam code for the error, meant to be used programmatically */ code: string; /** @description A short, human-readable summary of the problem that SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization */ title: string; /** @description A human-readable explanation specific to this occurrence of the problem. Like title, this field's value can be localized */ detail: string; /** @description a JSON Pointer to the associated entity in the request document */ field?: string; /** @description A meta object containing non-standard meta-information about the error */ metadata?: { [key: string]: unknown; }; /** @description Whether the API or user can resend the request */ retryable?: boolean; } & { source: unknown; meta: unknown; }; }; }; }; requestBody: { content: { "application/json": { /** @description Beam-generated cart id if exists */ beamCartId?: string | null; /** @description (externalCartId) Unique identifier for the cart provided by partner. */ cartId?: string; /** @description Beam store ID */ storeId: number; /** @default 0 */ itemCount?: number; /** @default 0 */ subtotal?: number; /** @default USD */ currencyCode?: string; remoteSessionId?: string; /** @enum {string} */ creationMethod?: "cart" | "checkout"; }; }; }; }; }; "/marketing/email-trigger/test": { post: { responses: { /** Test email trigger sent */ 201: unknown; /** Standard error */ default: { content: { "application/json": { /** @description Beam code for the error, meant to be used programmatically */ code: string; /** @description A short, human-readable summary of the problem that SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization */ title: string; /** @description A human-readable explanation specific to this occurrence of the problem. Like title, this field's value can be localized */ detail: string; /** @description a JSON Pointer to the associated entity in the request document */ field?: string; /** @description A meta object containing non-standard meta-information about the error */ metadata?: { [key: string]: unknown; }; /** @description Whether the API or user can resend the request */ retryable?: boolean; } & { source: unknown; meta: unknown; }; }; }; }; requestBody: { content: { "application/json": { /** * @description Email of the recipient * @example test@beamimpact.com */ recipient: string; /** * @description Name for the template * @example Beam Test */ template: string; /** * @description Name for the template * @example Beam Test */ chainId: number; global_properties?: { [key: string]: unknown; }; }; }; }; }; }; "/getChainIntegrationSettings": { post: { responses: { /** Successful fetch */ 200: { content: { "application/json": { /** * @description The ID of the chain * @example 1001 */ chainId: number; /** * Format: date-time * @description ISO formatted date * @example 2023-04-19T03:23:59.301Z */ effectiveAt: string; settings: { /** @description The key of the update */ key: string; /** @description The value of the update */ value: boolean; dateRange: { /** * Format: date-time * @description ISO formatted date * @example 2023-04-19T03:23:59.301Z */ startsAt: string | null; /** * Format: date-time * @description ISO formatted date * @example 2023-04-19T03:23:59.301Z */ endsAt: string | null; }; }[]; }; }; }; }; requestBody: { content: { "application/json": { /** * @description The ID of the chain * @example 1001 */ chainId: number; /** * Format: date-time * @description ISO formatted date * @example 2023-04-19T03:23:59.301Z */ effectiveAt: string; }; }; }; }; }; "/updateChainIntegrationSettings": { post: { responses: { /** Settings updated */ 200: { content: { "application/json": { /** * @description The ID of the chain * @example 1001 */ chainId: number; /** * Format: date-time * @description ISO formatted date * @example 2023-04-19T03:23:59.301Z */ effectiveAt: string; settings: { /** @description The key of the update */ key: string; /** @description The value of the update */ value: boolean; dateRange: { /** * Format: date-time * @description ISO formatted date * @example 2023-04-19T03:23:59.301Z */ startsAt: string | null; /** * Format: date-time * @description ISO formatted date * @example 2023-04-19T03:23:59.301Z */ endsAt: string | null; }; }[]; }; }; }; }; requestBody: { content: { "application/json": { /** * @description The ID of the chain * @example 1001 */ chainId: number; updates: { /** @description The key of the update */ key: string; /** @description The value of the update */ value: boolean | null; dateRange: { /** * Format: date-time * @description ISO formatted date * @example 2023-04-19T03:23:59.301Z */ startsAt: string | null; /** * Format: date-time * @description ISO formatted date * @example 2023-04-19T03:23:59.301Z */ endsAt: string | null; }; }[]; }; }; }; }; }; "/discovery/admin/deleteDiscoveryUser": { post: { responses: { /** Successfully deleted Discovery User. */ 201: unknown; /** Discovery User doesn't exist. */ 404: unknown; /** Standard error */ default: { content: { "application/json": { /** @description Beam code for the error, meant to be used programmatically */ code: string; /** @description A short, human-readable summary of the problem that SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization */ title: string; /** @description A human-readable explanation specific to this occurrence of the problem. Like title, this field's value can be localized */ detail: string; /** @description a JSON Pointer to the associated entity in the request document */ field?: string; /** @description A meta object containing non-standard meta-information about the error */ metadata?: { [key: string]: unknown; }; /** @description Whether the API or user can resend the request */ retryable?: boolean; } & { source: unknown; meta: unknown; }; }; }; }; requestBody: { content: { "application/json": { /** @description Discovery User's email. */ email: string; }; }; }; }; }; "/discovery/causes": { get: { responses: { /** List of all causes on Beam. Note that this needs a sort order in the DB, but is returned already sorted in the API. */ 200: { content: { "application/json": { causes?: { /** * @description Numeric ID * @example 1001 */ id?: number; /** * @description Name of the cause * @example Sustainability */ name?: string; /** * @description The background image shown in cause details * @example https://cdn.beamimpact.com/logos/beam.png */ image?: string; /** * @description The gradient icon for a cause * @example https://cdn.beamimpact.com/logos/beam.png */ illustration?: string; }[]; }; }; }; }; }; }; "/discovery/causes/{causeId}": { get: { parameters: { path: { causeId: number; }; }; responses: { /** Information for a specific cause on Beam */ 200: { content: { "application/json": { /** * @description The ID of the cause * @example 1001 */ id?: number; /** * @description Name of the cause * @example Sustainability */ name?: string; /** * @description Description of the cause * @example Lorem ipsum dolor sit amet */ description?: string; /** * @description The gradient icon for a cause * @example https://cdn.beamimpact.com/logos/beam.png */ illustration?: string; /** * @description The background image shown in cause details * @example https://cdn.beamimpact.com/logos/beam.png */ image?: string | null; /** @description The nonprofits the cause relates to */ nonprofits?: { /** * @description The ID of the nonprofit * @example 1001 */ id?: number; /** * @description Name of the nonprofit * @example Arbor Day Foundation */ name?: string; /** * @description Short summary of the nonprofit * @example Protect our planet's most critcal ecosystems */ summary?: string; /** * @description The image for the nonprofit * @example https://cdn.beamimpact.com/logos/beam.png */ image?: string | null; /** * @description The number of brands funding this nonprofit. Displayed as "10 Brands Funding". Note that this should reflect the number of brands where that nonprofit is part of a store, not just isActive — if this intros too much complexity we may need to add another bool to rep what isActive is representing right now. Currently isActive basically means shouldShow on community impact which is different than isActive. Probably makes sense to clean up this logic inconsistency * @example 10 */ brandsFunding?: number; /** @description Determines whether or not user has saved this chain into favorites */ saved?: boolean; }[]; }; }; }; /** Cause not found */ 400: { content: { "application/json": { ok?: boolean; }; }; }; }; }; }; "/discovery/chains": { get: { responses: { /** List of all Chains on Beam. Note that this needs a sort order in the DB, but is returned already sorted in the API. */ 200: { content: { "application/json": { filters?: { causes?: { /** * @description The ID of the cause * @example 1001 */ id?: number; /** * @description The name of the cause * @example Sustainability */ name?: string; /** * @description URL including file extension, e.g., an image path * @example https://cdn.beamimpact.com/logos/beam.png */ illustration?: string; }[]; categories?: { /** * @description The ID of the L0 category * @example 1001 */ id?: number; /** * @description The name of the L0 category * @example Clothing */ name?: string; /** @description The subcategories (L1) that belong to the category (L0) */ subcategories?: { /** * @description The ID of the L1 category * @example 1001 */ id?: number; /** * @description The name of the L1 category * @example Women's Clothing */ name?: string; }[]; }[]; }; chains?: { /** * @description Numeric ID * @example 1001 */ id?: number; /** * @description Name of the brand * @example Frankie */ name?: string; /** * @description The Chain's marketing image. * @example https://cdn.beamimpact.com/logos/beam.png */ image?: string; /** * @description The display name of the category it belongs to * @example Clothing / Women's Clothing */ categoryDisplayName?: string; /** @description The IDs of the L0 categories this brand belongs to. Used for filtering */ categories?: number[]; /** @description The IDs of the L1 categories this brand belongs to. Used for filtering */ subcategories?: number[]; /** @description The IDs of the causes this brand belongs to. Used for filtering */ causes?: number[]; /** @description The list of cause icons the brand supports. Used for the tags in the list */ causeIcons?: string[]; /** @description Determines whether or not user has saved this chain into favorites */ saved: boolean; }[]; }; }; }; /** Standard error */ default: { content: { "application/json": { /** @description Beam code for the error, meant to be used programmatically */ code: string; /** @description A short, human-readable summary of the problem that SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization */ title: string; /** @description A human-readable explanation specific to this occurrence of the problem. Like title, this field's value can be localized */ detail: string; /** @description a JSON Pointer to the associated entity in the request document */ field?: string; /** @description A meta object containing non-standard meta-information about the error */ metadata?: { [key: string]: unknown; }; /** @description Whether the API or user can resend the request */ retryable?: boolean; } & { source: unknown; meta: unknown; }; }; }; }; }; }; "/discovery/chains/{chainId}": { get: { parameters: { path: { /** The ID of the chain. Must be greater than 0 */ chainId: number; }; query: { lang?: "en" | "fr" | "de" | "es" | "it" | "pl" | "ja"; }; }; responses: { /** Information for a specific brand on Beam */ 200: { content: { "application/json": { /** * @description The ID of the brand * @example 1001 */ id: number; /** * @description Name of the brand * @example Frankie Collective */ name: string; /** * @description Description of the brand * @example Frankie's Collective is dedicated to innovating women's streetwear... */ description: string; /** @description The list of images for the chain with marketing image first */ images: string[]; /** * @description The Chain's logo image. * @example https://cdn.beamimpact.com/logos/beam.png */ logo: string; /** * @description The category display name * @example Clothing / Women's Clothing */ categoryDisplayName: string; /** @example https://beamimpact.com */ website: string; /** @description The list of causes the brand supports */ causes: { /** * @description Numeric ID * @example 1001 */ id?: number; /** * @description Display name of the cause * @example Sustainability */ displayName?: string; /** * @description URL including file extension, e.g., an image path * @example https://cdn.beamimpact.com/logos/beam.png */ icon?: string; /** @description The nonprofits and the impact that the cause and brand relate to */ nonprofitImpacts?: { /** * @description UUID * @example bqkdk-0393b-jbkdd-02difj */ id?: string; /** * @description The name of the nonprofit * @example Arbor Day Foundation */ name?: string; /** * @description URL including file extension, e.g., an image path * @example https://cdn.beamimpact.com/logos/beam.png */ image?: string; /** * @description The description of the chain's impact on the nonprofit * @example 60 trees to be planted in CA, absorbing 2,000 pounds of CO2 per year */ impactDescription?: string; /** * @description The progress towards the goal for the nonprofit and chain * @example 70% Funded */ goalProgressText?: string; /** * @description The progress towards the next goal completion * @example 70 */ goalProgressPercentage?: number; /** * @description The number of times the goal has been reached * @example Funded 3 times */ goalCompletionText?: string | null; }[]; }[]; /** @description Determines whether or not user has saved this chain into favorites */ saved: boolean; }; }; }; /** Chain not found */ 400: { content: { "application/json": { ok?: boolean; }; }; }; /** Standard error */ default: { content: { "application/json": { /** @description Beam code for the error, meant to be used programmatically */ code: string; /** @description A short, human-readable summary of the problem that SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization */ title: string; /** @description A human-readable explanation specific to this occurrence of the problem. Like title, this field's value can be localized */ detail: string; /** @description a JSON Pointer to the associated entity in the request document */ field?: string; /** @description A meta object containing non-standard meta-information about the error */ metadata?: { [key: string]: unknown; }; /** @description Whether the API or user can resend the request */ retryable?: boolean; } & { source: unknown; meta: unknown; }; }; }; }; }; }; "/discovery/copy": { get: { responses: { /** Copy data for editable sections of the app */ 200: { content: { "application/json": { [key: string]: unknown; }; }; }; }; }; }; "/discovery/impact": { get: { parameters: { query: { lang?: "en" | "fr" | "de" | "es" | "it" | "pl" | "ja"; }; }; responses: { /** The post-transaction impact for both the user and the community on that non-profit */ 200: { content: { "application/json": { /** @description The number of donations the user has made. Set to 0 if no donations made */ numberOfDonations?: number; personal?: { /** * @description ID of the SDK user that made this impact * @example 1 */ sdkUserId?: string; /** * @description ID of the nonprofit * @example 1 */ nonprofitId: number; /** * @description The name of the nonprofit * @example Arbor Day Foundation */ nonprofitName: string; /** * @description URL of the image for the nonprofit. Note that this is `target.image` or `nonprofit.personalPhoto` for personal impact and `target.chainImpactImage` or `nonprofit.communityPhoto` for community impact * @example some url */ nonprofitImage: string | null; /** * @description ID of the nonprofit * @example 1 */ chainId: number; /** * @description The name of the chain * @example Frankie Collective */ chainName: string; /** * @description URL including file extension, e.g., an image path * @example https://cdn.beamimpact.com/logos/beam.png */ chainLogo: string | null; /** * @description The description of the chain's impact on the nonprofit * @example 60 trees to be planted in CA, absorbing 2,000 pounds of CO2 per year */ chainImpactDescription: string; /** * @description The progress towards the goal for the nonprofit and chain * @example 70% Funded */ chainGoalProgressText: string; /** * @description The progress towards the next goal completion * @example 70 */ chainGoalProgressPercentage: number; }[]; /** @description The community impact for the impacted nonprofits. */ community?: { /** * @description ID of the SDK user that made this impact * @example 1 */ sdkUserId?: string; /** * @description ID of the nonprofit * @example 1 */ nonprofitId: number; /** * @description The name of the nonprofit * @example Arbor Day Foundation */ nonprofitName: string; /** * @description URL of the image for the nonprofit. Note that this is `target.image` or `nonprofit.personalPhoto` for personal impact and `target.chainImpactImage` or `nonprofit.communityPhoto` for community impact * @example some url */ nonprofitImage: string | null; /** * @description ID of the nonprofit * @example 1 */ chainId: number; /** * @description The name of the chain * @example Frankie Collective */ chainName: string; /** * @description URL including file extension, e.g., an image path * @example https://cdn.beamimpact.com/logos/beam.png */ chainLogo: string | null; /** * @description The description of the chain's impact on the nonprofit * @example 60 trees to be planted in CA, absorbing 2,000 pounds of CO2 per year */ chainImpactDescription: string; /** * @description The progress towards the goal for the nonprofit and chain * @example 70% Funded */ chainGoalProgressText: string; /** * @description The progress towards the next goal completion * @example 70 */ chainGoalProgressPercentage: number; }[]; }; }; }; }; }; }; "/discovery/highlights": { get: { parameters: { query: { /** Language to display home highlights copy in. */ lang?: string; }; }; responses: { /** Information to display on the home page */ 200: { content: { "application/json": { /** @description The number of donations the user has made. Set to 0 if no donations made. */ numberOfDonations?: number; /** @description The list of causes to highlight. Note that this is sorted by the backend in the order that it should be displayed. */ causes?: { /** * @description Numeric ID * @example 1001 */ id?: number; /** * @description Name of the cause * @example Sustainability */ name?: string; /** * @description The background image shown in cause details * @example https://cdn.beamimpact.com/logos/beam.png */ image?: string; /** * @description The gradient icon for a cause * @example https://cdn.beamimpact.com/logos/beam.png */ illustration?: string; }[]; /** @description The list of brands to highlight. Note that this is sorted by the backend in the order that it should be displayed. */ chains?: { /** * @description Numeric ID * @example 1001 */ id?: number; /** * @description Name of the brand * @example Frankie */ name?: string; /** * @description The Chain's marketing image. * @example https://cdn.beamimpact.com/logos/beam.png */ image?: string; /** * @description The display name of the category it belongs to * @example Clothing / Women's Clothing */ categoryDisplayName?: string; /** @description The IDs of the L0 categories this brand belongs to. Used for filtering */ categories?: number[]; /** @description The IDs of the L1 categories this brand belongs to. Used for filtering */ subcategories?: number[]; /** @description The IDs of the causes this brand belongs to. Used for filtering */ causes?: number[]; /** @description The list of cause icons the brand supports. Used for the tags in the list */ causeIcons?: string[]; /** @description Determines whether or not user has saved this chain into favorites */ saved: boolean; }[]; /** @description Title for the brands section of the homepage. */ chainHighlightsTitle?: string; /** @description Subtitle for the brands section of the homepage. */ chainHighlightsSubtitle?: string; /** @description Title for the causes section of the homepage. */ causeHighlightsTitle?: string; /** @description Title for the themes section of the homepage. */ themeHighlightsTitle?: string; /** @description Title for the nonprofits section of the homepage. */ nonprofitHighlightsTitle?: string; /** @description Title for the category section of the homepage. */ categoryHighlightsTitle?: string; /** @description The list of themes to highlight. */ themes?: { /** @description The ID of the theme */ id: string; /** @description The title of the theme */ title: string; /** @description The link to the preview image */ previewImage: string; }[]; /** @description The nonprofits the cause relates to */ nonprofits?: { /** * @description The ID of the nonprofit * @example 1001 */ id?: number; /** * @description Name of the nonprofit * @example Arbor Day Foundation */ name?: string; /** * @description Short summary of the nonprofit * @example Protect our planet's most critcal ecosystems */ summary?: string; /** * @description The image for the nonprofit * @example https://cdn.beamimpact.com/logos/beam.png */ image?: string | null; /** * @description The number of brands funding this nonprofit. Displayed as "10 Brands Funding". Note that this should reflect the number of brands where that nonprofit is part of a store, not just isActive — if this intros too much complexity we may need to add another bool to rep what isActive is representing right now. Currently isActive basically means shouldShow on community impact which is different than isActive. Probably makes sense to clean up this logic inconsistency * @example 10 */ brandsFunding?: number; /** @description Determines whether or not user has saved this chain into favorites */ saved?: boolean; }[]; /** @description The list of categories to highlight. */ categories?: { /** * @description UUID * @example bqkdk-0393b-jbkdd-02difj */ id: string; /** * @description The ID of the category * @example 1001 */ categoryId: number; /** @description The name of the category */ name: string; }[]; }; }; }; }; }; }; "/discovery/login": { post: { responses: { /** Successfully signed in. */ 200: { content: { "application/json": { /** * @description UUID * @example bqkdk-0393b-jbkdd-02difj */ id?: string; firstName?: string; lastName?: string; /** * Format: email * @example pudding@email.com */ email?: string; /** @description A nonprofit ID. */ lastNonprofitId?: number | null; }; }; }; /** Standard error */ default: { content: { "application/json": { /** @description Beam code for the error, meant to be used programmatically */ code: string; /** @description A short, human-readable summary of the problem that SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization */ title: string; /** @description A human-readable explanation specific to this occurrence of the problem. Like title, this field's value can be localized */ detail: string; /** @description a JSON Pointer to the associated entity in the request document */ field?: string; /** @description A meta object containing non-standard meta-information about the error */ metadata?: { [key: string]: unknown; }; /** @description Whether the API or user can resend the request */ retryable?: boolean; } & { source: unknown; meta: unknown; }; }; }; }; requestBody: { content: { "application/json": { /** @description GlobalUser's account email. */ email: string; /** @description GlobalUser's account password. */ password: string; }; }; }; }; }; "/discovery/logout": { post: { responses: { /** Successfully signed out. */ 201: { content: { "application/json": { ok?: boolean; }; }; }; /** Standard error */ default: { content: { "application/json": { /** @description Beam code for the error, meant to be used programmatically */ code: string; /** @description A short, human-readable summary of the problem that SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization */ title: string; /** @description A human-readable explanation specific to this occurrence of the problem. Like title, this field's value can be localized */ detail: string; /** @description a JSON Pointer to the associated entity in the request document */ field?: string; /** @description A meta object containing non-standard meta-information about the error */ metadata?: { [key: string]: unknown; }; /** @description Whether the API or user can resend the request */ retryable?: boolean; } & { source: unknown; meta: unknown; }; }; }; }; }; }; "/discovery/nonprofits/{nonprofitId}": { get: { parameters: { path: { nonprofitId: number; }; query: { lang?: "en" | "fr" | "de" | "es" | "it" | "pl" | "ja"; }; }; responses: { /** Information for a specific nonprofit on Beam */ 200: { content: { "application/json": { /** * @description ID of the nonprofit * @example 1 */ id?: number; /** * @description Name of the nonprofit * @example Arbor Day Collective */ name?: string; /** * @description URL of the image for the nonprofit * @example some url */ image?: string; /** @description The causes the nonprofit supports */ causes?: { /** * @description The cause of the nonprofit * @example Sustainability */ name?: string; /** * @description The cause icon of the nonprofit * @example some url */ icon?: string; }[]; /** * @description The mission statement for the nonprofit * @example Restore forests and improve tree cover in communities. */ missionStatement?: string; /** * @description How the nonprofit accomplishes their goal * @example Mostly, they plant trees globally -- within communities, and in forests. */ howTheyGetItDone?: string; /** @description The list of brands that support this nonprofit and their impact */ chains?: { /** * @description ID of the brand * @example 1 */ chainId?: number; /** * @description The name of the brand * @example Frankie Collective */ name?: string; /** * @description The description of the brand's impact on the nonprofit * @example 60 trees to be planted in CA, absorbing 2,000 pounds of CO2 per year */ impactDescription?: string; /** * @description The progress towards the goal for the nonprofit and brand * @example 70% Funded */ goalProgressText?: string; /** * @description The progress towards the next goal completion * @example 70 */ goalProgressPercentage?: number; /** * @description The number of times the goal has been reached * @example Funded 3 times */ goalCompletionText?: string | null; }[]; /** @description Determines whether or not user has saved this chain into favorites */ saved: boolean; /** @description The nonprofits website */ website?: string | null; /** @description A link to the nonprofits instagram */ socialLink?: string | null; /** @description Other ways the nonprofit can be helped beyond beams impact */ howToHelpBeyondBeam?: string | null; }; }; }; }; }; }; "/discovery/registerDevice/android": { post: { responses: { /** Device already registered */ 200: { content: { "application/json": { /** * @description The db ID of the UserDevice entry. * @example 1001 */ id?: number; /** * @description The deviceId provided when the device was registered. * @example bqkdk-0393b-jbkdd-02difj */ deviceId?: string; pushNotificationToken?: string; }; }; }; /** Device newly registered */ 201: { content: { "application/json": { /** * @description The db ID of the UserDevice entry. * @example 1001 */ id?: number; /** * @description The deviceId provided when the device was registered. * @example bqkdk-0393b-jbkdd-02difj */ deviceId?: string; pushNotificationToken?: string; }; }; }; }; requestBody: { content: { "application/json": { /** @example The discovery user's device ID. Usually UUID. */ deviceId: string; /** @example Push notification token. */ pushNotificationToken?: string; }; }; }; }; }; "/discovery/registerDevice/ios": { post: { responses: { /** Device already registered */ 200: { content: { "application/json": { /** * @description The db ID of the UserDevice entry. * @example 1001 */ id?: number; /** * @description The deviceId provided when the device was registered. * @example bqkdk-0393b-jbkdd-02difj */ deviceId?: string; pushNotificationToken?: string; }; }; }; /** Device newly registered */ 201: { content: { "application/json": { /** * @description The db ID of the UserDevice entry. * @example 1001 */ id?: number; /** * @description The deviceId provided when the device was registered. * @example bqkdk-0393b-jbkdd-02difj */ deviceId?: string; pushNotificationToken?: string; }; }; }; }; requestBody: { content: { "application/json": { /** @example The discovery user's device ID. Usually UUID. */ deviceId: string; /** @example Push notification token. */ pushNotificationToken?: string; }; }; }; }; }; "/discovery/reset-password": { post: { responses: { /** Password reset email sent. */ 201: { content: { "text/plain": string; }; }; /** Standard error */ default: { content: { "application/json": { /** @description Beam code for the error, meant to be used programmatically */ code: string; /** @description A short, human-readable summary of the problem that SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization */ title: string; /** @description A human-readable explanation specific to this occurrence of the problem. Like title, this field's value can be localized */ detail: string; /** @description a JSON Pointer to the associated entity in the request document */ field?: string; /** @description A meta object containing non-standard meta-information about the error */ metadata?: { [key: string]: unknown; }; /** @description Whether the API or user can resend the request */ retryable?: boolean; } & { source: unknown; meta: unknown; }; }; }; }; requestBody: { content: { "application/json": { /** @description GlobalUser's account email. */ email: string; }; }; }; }; }; "/discovery/auth/createUser": { post: { responses: { /** Successfully created user. */ 200: { content: { "application/json": { user?: { firstName?: string; lastName?: string; emails?: { /** * Format: email * @example pudding@email.com */ email?: string; isPrimary?: boolean; }[]; isActive?: boolean; isVerified?: boolean; }; authorization?: { /** Format: JWT */ authorizationToken?: string; /** Format: JWT */ refreshToken?: string; }; }; }; }; /** Standard error */ default: { content: { "application/json": { /** @description Beam code for the error */ code: string; /** @description Human readable message describing error. */ message: string; }; }; }; }; requestBody: { content: { "application/json": { /** @description DiscoveryUser's account email. */ email: string; /** @description DiscoveryUser's account password. */ password: string; firstName?: string; lastName?: string; noEmailConfirmation?: boolean; }; }; }; }; }; "/discovery/auth/login": { post: { responses: { /** Successfully logged in. */ 200: { content: { "application/json": { user?: { firstName?: string; lastName?: string; emails?: { /** * Format: email * @example pudding@email.com */ email?: string; isPrimary?: boolean; }[]; isActive?: boolean; isVerified?: boolean; }; authorization?: { /** Format: JWT */ authorizationToken?: string; /** Format: JWT */ refreshToken?: string; }; }; }; }; /** Standard error */ default: { content: { "application/json": { /** @description Beam code for the error */ code: string; /** @description Human readable message describing error. */ message: string; }; }; }; }; requestBody: { content: { "application/json": { /** @description DiscoveryUser's account email. */ email: string; /** @description DiscoveryUser's account password. */ password: string; }; }; }; }; }; "/discovery/auth/logout": { post: { parameters: { header: { Authorization?: string; }; }; responses: { /** Successfully logged out user. */ 201: unknown; /** Standard error */ default: { content: { "application/json": { /** @description Beam code for the error */ code: string; /** @description Human readable message describing error. */ message: string; }; }; }; }; }; }; "/discovery/auth/deleteUser": { post: { parameters: { header: { Authorization?: string; }; }; responses: { /** Successfully deleted user. */ 201: unknown; /** Standard error */ default: { content: { "application/json": { /** @description Beam code for the error */ code: string; /** @description Human readable message describing error. */ message: string; }; }; }; }; }; }; "/discovery/auth/resetPassword": { post: { responses: { /** Password reset email sent. */ 201: { content: { "text/plain": string; }; }; /** Standard error */ default: { content: { "application/json": { /** @description Beam code for the error */ code: string; /** @description Human readable message describing error. */ message: string; }; }; }; }; requestBody: { content: { "application/json": { /** @description DiscoveryUser's account email. */ email: string; }; }; }; }; }; "/discovery/auth/refreshToken": { post: { responses: { /** Successfully refreshed token. */ 200: { content: { "application/json": { user?: { firstName?: string; lastName?: string; emails?: { /** * Format: email * @example pudding@email.com */ email?: string; isPrimary?: boolean; }[]; isActive?: boolean; isVerified?: boolean; }; authorization?: { /** Format: JWT */ authorizationToken?: string; /** Format: JWT */ refreshToken?: string; }; }; }; }; /** Standard error */ default: { content: { "application/json": { /** @description Beam code for the error */ code: string; /** @description Human readable message describing error. */ message: string; }; }; }; }; requestBody: { content: { "application/json": { /** @description DiscoveryUser's account email. */ refreshToken: string; }; }; }; }; }; "/discovery/auth/confirmEmail/{userId}": { get: { parameters: { path: { /** Numeric ID of the user to get */ userId: string; }; }; responses: { /** Successfully verified email. */ 200: unknown; /** Standard error */ default: { content: { "application/json": { /** @description Beam code for the error */ code: string; /** @description Human readable message describing error. */ message: string; }; }; }; }; }; }; "/discovery/auth/setNewPassword": { post: { responses: { /** Successfully created user. */ 200: { content: { "application/json": { user?: { firstName?: string; lastName?: string; emails?: { /** * Format: email * @example pudding@email.com */ email?: string; isPrimary?: boolean; }[]; isActive?: boolean; isVerified?: boolean; }; authorization?: { /** Format: JWT */ authorizationToken?: string; /** Format: JWT */ refreshToken?: string; }; }; }; }; /** Standard error */ default: { content: { "application/json": { /** @description Beam code for the error */ code: string; /** @description Human readable message describing error. */ message: string; }; }; }; }; requestBody: { content: { "application/json": { /** @description New password for user. */ newPassword: string; resetToken: string; }; }; }; }; }; "/discovery/toggleSavedChain": { post: { responses: { /** Successfully set the saved property */ 200: unknown; /** Standard error */ default: { content: { "application/json": { /** @description Beam code for the error, meant to be used programmatically */ code: string; /** @description A short, human-readable summary of the problem that SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization */ title: string; /** @description A human-readable explanation specific to this occurrence of the problem. Like title, this field's value can be localized */ detail: string; /** @description a JSON Pointer to the associated entity in the request document */ field?: string; /** @description A meta object containing non-standard meta-information about the error */ metadata?: { [key: string]: unknown; }; /** @description Whether the API or user can resend the request */ retryable?: boolean; } & { source: unknown; meta: unknown; }; }; }; }; requestBody: { content: { "application/json": { /** @description The ID of the chain. Must be greater than 0 */ chainId: number; /** @description The value we want to set active to */ value: boolean; }; }; }; }; }; "/discovery/toggleSavedNonprofit": { post: { responses: { /** Successfully set the saved property */ 200: unknown; /** Standard error */ default: { content: { "application/json": { /** @description Beam code for the error, meant to be used programmatically */ code: string; /** @description A short, human-readable summary of the problem that SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization */ title: string; /** @description A human-readable explanation specific to this occurrence of the problem. Like title, this field's value can be localized */ detail: string; /** @description a JSON Pointer to the associated entity in the request document */ field?: string; /** @description A meta object containing non-standard meta-information about the error */ metadata?: { [key: string]: unknown; }; /** @description Whether the API or user can resend the request */ retryable?: boolean; } & { source: unknown; meta: unknown; }; }; }; }; requestBody: { content: { "application/json": { /** @description The ID of the nonprofit. Must be greater than 0 */ nonprofitId: number; /** @description The value we want to set active to */ value: boolean; }; }; }; }; }; "/discovery/collections": { post: { responses: { /** Successfully returned a list of chains and/or nonprofits */ 200: { content: { "application/json": { chains: { /** * @description Numeric ID * @example 1001 */ id?: number; /** * @description Name of the brand * @example Frankie */ name?: string; /** * @description The Chain's marketing image. * @example https://cdn.beamimpact.com/logos/beam.png */ image?: string; /** * @description The display name of the category it belongs to * @example Clothing / Women's Clothing */ categoryDisplayName?: string; /** @description The IDs of the L0 categories this brand belongs to. Used for filtering */ categories?: number[]; /** @description The IDs of the L1 categories this brand belongs to. Used for filtering */ subcategories?: number[]; /** @description The IDs of the causes this brand belongs to. Used for filtering */ causes?: number[]; /** @description The list of cause icons the brand supports. Used for the tags in the list */ causeIcons?: string[]; /** @description Determines whether or not user has saved this chain into favorites */ saved: boolean; }[]; nonprofits: { /** * @description The ID of the nonprofit * @example 1001 */ id?: number; /** * @description Name of the nonprofit * @example Arbor Day Foundation */ name?: string; /** * @description Short summary of the nonprofit * @example Protect our planet's most critcal ecosystems */ summary?: string; /** * @description The image for the nonprofit * @example https://cdn.beamimpact.com/logos/beam.png */ image?: string | null; /** * @description The number of brands funding this nonprofit. Displayed as "10 Brands Funding". Note that this should reflect the number of brands where that nonprofit is part of a store, not just isActive — if this intros too much complexity we may need to add another bool to rep what isActive is representing right now. Currently isActive basically means shouldShow on community impact which is different than isActive. Probably makes sense to clean up this logic inconsistency * @example 10 */ brandsFunding?: number; /** @description Determines whether or not user has saved this chain into favorites */ saved?: boolean; }[]; }; }; }; /** Standard error */ default: { content: { "application/json": { /** @description Beam code for the error, meant to be used programmatically */ code: string; /** @description A short, human-readable summary of the problem that SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization */ title: string; /** @description A human-readable explanation specific to this occurrence of the problem. Like title, this field's value can be localized */ detail: string; /** @description a JSON Pointer to the associated entity in the request document */ field?: string; /** @description A meta object containing non-standard meta-information about the error */ metadata?: { [key: string]: unknown; }; /** @description Whether the API or user can resend the request */ retryable?: boolean; } & { source: unknown; meta: unknown; }; }; }; }; }; }; "/discovery/createTheme": { post: { responses: { /** Successfully created the theme */ 201: { content: { "application/json": { /** @description The UUID of the theme. */ themeId?: string; }; }; }; /** Standard error */ default: { content: { "application/json": { /** @description Beam code for the error, meant to be used programmatically */ code: string; /** @description A short, human-readable summary of the problem that SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization */ title: string; /** @description A human-readable explanation specific to this occurrence of the problem. Like title, this field's value can be localized */ detail: string; /** @description a JSON Pointer to the associated entity in the request document */ field?: string; /** @description A meta object containing non-standard meta-information about the error */ metadata?: { [key: string]: unknown; }; /** @description Whether the API or user can resend the request */ retryable?: boolean; } & { source: unknown; meta: unknown; }; }; }; }; requestBody: { content: { "application/json": { /** @description The title of the theme */ title: string; /** @description The description of the theme */ description: string; /** @description The preview image of the theme */ previewImage: string; /** @description The detail image of the theme */ detailImage: string; /** @description The tag for the theme */ tag?: string; /** * @description The flag for hiding a theme * @default false */ hidden?: boolean; /** * Format: date-time * @description The start date of the theme * @example 2023-04-19T03:23:59.301Z */ startsAt?: string | null; /** * Format: date-time * @description The end date of the theme * @example 2023-04-19T03:23:59.301Z */ endsAt?: string | null; /** @description The UUID of the first theme */ relatedThemeId?: string | null; /** @description The subcategories for the theme */ subcategories: { /** @description The title of the subcategory */ title: string; /** @description The description of the subcategory */ description: string; /** @description The IDs of the chains associated with the subcategory */ chainIds: number[]; }[]; }; }; }; }; }; "/discovery/updateTheme": { post: { responses: { /** Successfully updated the theme */ 200: unknown; /** Standard error */ default: { content: { "application/json": { /** @description Beam code for the error, meant to be used programmatically */ code: string; /** @description A short, human-readable summary of the problem that SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization */ title: string; /** @description A human-readable explanation specific to this occurrence of the problem. Like title, this field's value can be localized */ detail: string; /** @description a JSON Pointer to the associated entity in the request document */ field?: string; /** @description A meta object containing non-standard meta-information about the error */ metadata?: { [key: string]: unknown; }; /** @description Whether the API or user can resend the request */ retryable?: boolean; } & { source: unknown; meta: unknown; }; }; }; }; requestBody: { content: { "application/json": { /** @description The UUID of the theme */ themeId: string; /** * Format: date-time * @description The start date of the theme * @example 2023-04-19T03:23:59.301Z */ startsAt?: string; /** * Format: date-time * @description The end date of the theme * @example 2023-04-19T03:23:59.301Z */ endsAt?: string; /** @description The flag for hiding a theme */ hidden?: boolean; /** @description The UUID of the first theme */ relatedThemeId?: string; }; }; }; }; }; "/discovery/getThemeById": { post: { responses: { /** Successfully fetched the theme */ 200: { content: { "application/json": { theme?: { /** @description The UUID of the theme */ id: string; /** @description The title of the theme */ title: string; /** @description The description of the theme */ description: string; /** @description The link to the detail image */ detailImage: string; /** @description The tag associated with the theme */ tag?: string | null; /** @description The sorted list of subcategories */ subcategories: { /** @description The title of the subcategory */ title: string; /** @description The description of the subcategory */ description: string; chains: { /** * @description Numeric ID * @example 1001 */ id?: number; /** * @description Name of the brand * @example Frankie */ name?: string; /** * @description The Chain's marketing image. * @example https://cdn.beamimpact.com/logos/beam.png */ image?: string; /** * @description The display name of the category it belongs to * @example Clothing / Women's Clothing */ categoryDisplayName?: string; /** @description The IDs of the L0 categories this brand belongs to. Used for filtering */ categories?: number[]; /** @description The IDs of the L1 categories this brand belongs to. Used for filtering */ subcategories?: number[]; /** @description The IDs of the causes this brand belongs to. Used for filtering */ causes?: number[]; /** @description The list of cause icons the brand supports. Used for the tags in the list */ causeIcons?: string[]; /** @description Determines whether or not user has saved this chain into favorites */ saved: boolean; }[]; }[]; /** @description The list of causes supported in this theme */ causes: { /** * @description Numeric ID * @example 1001 */ id?: number; /** * @description Name of the cause * @example Sustainability */ name?: string; /** * @description The background image shown in cause details * @example https://cdn.beamimpact.com/logos/beam.png */ image?: string; /** * @description The gradient icon for a cause * @example https://cdn.beamimpact.com/logos/beam.png */ illustration?: string; }[]; /** @description The list of other active themes with the primary theme listed first */ otherThemes: { /** @description The ID of the theme */ id: string; /** @description The title of the theme */ title: string; /** @description The link to the preview image */ previewImage: string; }[]; }; }; }; }; /** Standard error */ default: { content: { "application/json": { /** @description Beam code for the error, meant to be used programmatically */ code: string; /** @description A short, human-readable summary of the problem that SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization */ title: string; /** @description A human-readable explanation specific to this occurrence of the problem. Like title, this field's value can be localized */ detail: string; /** @description a JSON Pointer to the associated entity in the request document */ field?: string; /** @description A meta object containing non-standard meta-information about the error */ metadata?: { [key: string]: unknown; }; /** @description Whether the API or user can resend the request */ retryable?: boolean; } & { source: unknown; meta: unknown; }; }; }; }; requestBody: { content: { "application/json": { /** @description The UUID of the theme. */ themeId: string; }; }; }; }; }; "/discovery/reorderThemes": { post: { responses: { /** Successfully updated the sort order */ 200: { content: { "application/json": { /** @description The list of themes to highlight. */ themes?: { /** @description The ID of the theme */ id: string; /** @description The title of the theme */ title: string; /** @description The link to the preview image */ previewImage: string; }[]; }; }; }; /** Standard error */ default: { content: { "application/json": { /** @description Beam code for the error, meant to be used programmatically */ code: string; /** @description A short, human-readable summary of the problem that SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization */ title: string; /** @description A human-readable explanation specific to this occurrence of the problem. Like title, this field's value can be localized */ detail: string; /** @description a JSON Pointer to the associated entity in the request document */ field?: string; /** @description A meta object containing non-standard meta-information about the error */ metadata?: { [key: string]: unknown; }; /** @description Whether the API or user can resend the request */ retryable?: boolean; } & { source: unknown; meta: unknown; }; }; }; }; requestBody: { content: { "application/json": { /** @description The new sort order of themes */ reorder: { /** @description The UUID of the theme */ themeId: string; /** @description The sort order for the theme compared to other themes */ sortOrder: number; }[]; }; }; }; }; }; "/experimentSession": { post: { responses: { /** Session already exists */ 200: unknown; /** Experiment session created */ 201: unknown; }; requestBody: { content: { "application/json": { /** @description UUID representing an individual user for A/B testing */ remoteSessionId: string; /** @description flat object of boolean values representing experiment assignments */ experiments: { /** @description experiment assignment that delegates if Beam integration should injected */ showBeam: boolean; /** @description Log of user events associated with the session */ events?: { /** * @description Name of the event recorded for the session * @enum {string} */ eventName: "session_return"; /** * @description The source through which the user returned to their session * @enum {string} */ eventValue: "cart_abandon" | "checkout_abandon"; /** * Format: date-time * @description Time the event occurred */ timestamp: string; }[]; }; /** @description Beam Store Id */ storeId?: number; }; }; }; }; }; "/finalizeInvoiceInterval": { post: { responses: { /** Successfully finalized invoice interval */ 200: { content: { "application/json": { interval?: { /** * Format: date-time * @description ISO formatted date * @example 2023-04-19T03:23:59.301Z */ startsAt: string; /** * Format: date-time * @description ISO formatted date * @example 2023-04-19T03:23:59.301Z */ endsAt: string; /** @enum {string} */ status: "scheduled" | "open" | "pending" | "finalized"; /** * Format: date-time * @description ISO formatted date * @example 2023-04-19T03:23:59.301Z */ finalizeBy: string; }; donations?: { /** @description The Id of the store making this donation */ storeId?: number; /** @description The nonprofit Id */ nonprofitId?: number; /** * @description The cumulative donation amount for the given interval * @example 1000.25 */ amount?: number; /** * @description 3-letter ISO currency code * @example USD */ currencyCode?: string; }[]; }; }; }; /** Standard error */ default: { content: { "application/json": { /** @description Beam code for the error, meant to be used programmatically */ code: string; /** @description A short, human-readable summary of the problem that SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization */ title: string; /** @description A human-readable explanation specific to this occurrence of the problem. Like title, this field's value can be localized */ detail: string; /** @description a JSON Pointer to the associated entity in the request document */ field?: string; /** @description A meta object containing non-standard meta-information about the error */ metadata?: { [key: string]: unknown; }; /** @description Whether the API or user can resend the request */ retryable?: boolean; } & { source: unknown; meta: unknown; }; }; }; }; requestBody: { content: { "application/json": { /** * Format: date-time * @description ISO formatted date * @example 2023-04-19T03:23:59.301Z */ intervalStartsAt: string; /** * Format: date-time * @description ISO formatted date * @example 2023-04-19T03:23:59.301Z */ intervalEndsAt: string; }; }; }; }; }; "/submitInvoiceData": { post: { responses: { /** Successfully submitted invoice */ 200: { content: { "application/json": { intervals: { /** * Format: date-time * @description ISO formatted date * @example 2023-04-19T03:23:59.301Z */ startsAt: string; /** * Format: date-time * @description ISO formatted date * @example 2023-04-19T03:23:59.301Z */ endsAt: string; /** @enum {string} */ status: "scheduled" | "open" | "pending" | "finalized"; /** * Format: date-time * @description The final date by which an interval should be closed. This is later than the endsAt date. * @example 2023-04-19T03:23:59.301Z */ finalizeBy: string | null; }[]; donations: { storeId: number; nonprofitId: number; amount: number; /** * @description 3-letter ISO currency code * @example USD */ currencyCode: string; }[]; }; }; }; /** Standard error */ default: { content: { "application/json": { /** @description Beam code for the error, meant to be used programmatically */ code: string; /** @description A short, human-readable summary of the problem that SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization */ title: string; /** @description A human-readable explanation specific to this occurrence of the problem. Like title, this field's value can be localized */ detail: string; /** @description a JSON Pointer to the associated entity in the request document */ field?: string; /** @description A meta object containing non-standard meta-information about the error */ metadata?: { [key: string]: unknown; }; /** @description Whether the API or user can resend the request */ retryable?: boolean; } & { source: unknown; meta: unknown; }; }; }; }; requestBody: { content: { "application/json": { /** * Format: date-time * @description ISO formatted date * @example 2023-04-19T03:23:59.301Z */ intervalStartsAt: string; /** * Format: date-time * @description ISO formatted date * @example 2023-04-19T03:23:59.301Z */ intervalEndsAt: string; donations: { storeId: number; nonprofitId: number; /** @description The cumulative donation amount to this nonprofit for the given interval. */ amount: number; /** * @description 3-letter ISO currency code * @example USD */ currencyCode: string; }[]; }; }; }; }; }; "/getInvoicingInterval": { post: { responses: { /** Successfully retrieved invoice interval */ 200: { content: { "application/json": { /** @description The interval spanned by the given ongoingAt date */ interval?: { /** * Format: date-time * @description ISO formatted date * @example 2023-04-19T03:23:59.301Z */ startsAt: string; /** * Format: date-time * @description ISO formatted date * @example 2023-04-19T03:23:59.301Z */ endsAt: string; /** @enum {string} */ status: "scheduled" | "open" | "pending" | "finalized"; /** * Format: date-time * @description ISO formatted date * @example 2023-04-19T03:23:59.301Z */ finalizeBy: string; }; /** @description Array of donation amounts originating from each store to be applied to each nonprofit partner */ donations?: { /** * @description The ID of the store making this donation * @example 2 */ storeId: number; /** * @description The nonprofit ID * @example 2 */ nonprofitId: number; /** * @description The cumulative donation amount from EG to this nonprofit, for the given interval * @example 22.22 */ amount: number; /** * @description 3-letter ISO currency code * @example USD */ currencyCode: string; }[]; }; }; }; /** Standard error */ default: { content: { "application/json": { /** @description Beam code for the error, meant to be used programmatically */ code: string; /** @description A short, human-readable summary of the problem that SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization */ title: string; /** @description A human-readable explanation specific to this occurrence of the problem. Like title, this field's value can be localized */ detail: string; /** @description a JSON Pointer to the associated entity in the request document */ field?: string; /** @description A meta object containing non-standard meta-information about the error */ metadata?: { [key: string]: unknown; }; /** @description Whether the API or user can resend the request */ retryable?: boolean; } & { source: unknown; meta: unknown; }; }; }; }; requestBody: { content: { "application/json": { /** * Format: date-time * @description ISO formatted date * @example 2023-04-19T03:23:59.301Z */ ongoingAt: string; }; }; }; }; }; "/getInvoicingIntervals": { post: { responses: { /** Successfully retrieved invoice intervals */ 200: { content: { "application/json": { chainId: number; intervals: { /** * Format: date-time * @description ISO formatted date * @example 2023-04-19T03:23:59.301Z */ startsAt: string; /** * Format: date-time * @description ISO formatted date * @example 2023-04-19T03:23:59.301Z */ endsAt: string; /** @enum {string} */ status: "scheduled" | "open" | "pending" | "finalized"; /** * Format: date-time * @description ISO formatted date * @example 2023-04-19T03:23:59.301Z */ finalizeBy: string; }[]; }; }; }; }; requestBody: { content: { "application/json": { /** * Format: date-time * @description ISO formatted date * @example 2023-04-19T03:23:59.301Z */ minOngoingAt: string; /** * Format: date-time * @description ISO formatted date * @example 2023-04-19T03:23:59.301Z */ maxOngoingAt: string; }; }; }; }; }; "/verifyShopifyCustomApp": { post: { responses: { /** returns status 200, chainName and shopName for manual validation purposes */ 200: { content: { "application/json": { chainId?: number; chainName?: string; shopName?: string; shopifyQueryResponses?: unknown[]; isVerified?: boolean; }; }; }; /** Standard error */ default: { content: { "application/json": { /** @description Beam code for the error, meant to be used programmatically */ code: string; /** @description A short, human-readable summary of the problem that SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization */ title: string; /** @description A human-readable explanation specific to this occurrence of the problem. Like title, this field's value can be localized */ detail: string; /** @description a JSON Pointer to the associated entity in the request document */ field?: string; /** @description A meta object containing non-standard meta-information about the error */ metadata?: { [key: string]: unknown; }; /** @description Whether the API or user can resend the request */ retryable?: boolean; } & { source: unknown; meta: unknown; }; }; }; }; requestBody: { content: { "application/json": { chainId: number; shopName: string; }; }; }; }; }; "/logs": { post: { responses: { /** Successful response */ 200: unknown; }; requestBody: { content: { "application/json": { /** @enum {string} */ type: "error" | "log"; code: string; metadata?: { [key: string]: unknown; }; }; }; }; }; }; "/chainWidgetVersion": { post: { responses: { /** Chain widget version created */ 200: unknown; /** Standard error */ default: { content: { "application/json": { /** @description Beam code for the error, meant to be used programmatically */ code: string; /** @description A short, human-readable summary of the problem that SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization */ title: string; /** @description A human-readable explanation specific to this occurrence of the problem. Like title, this field's value can be localized */ detail: string; /** @description a JSON Pointer to the associated entity in the request document */ field?: string; /** @description A meta object containing non-standard meta-information about the error */ metadata?: { [key: string]: unknown; }; /** @description Whether the API or user can resend the request */ retryable?: boolean; } & { source: unknown; meta: unknown; }; }; }; }; requestBody: { content: { "application/json": { /** * @description A production release version of the Beam web widgets * @example v1.0.0 */ widgetVersion: string; chainId: number; }; }; }; }; }; "/widgetVersion": { post: { responses: { /** Widget version created */ 200: unknown; /** Standard error */ default: { content: { "application/json": { /** @description Beam code for the error, meant to be used programmatically */ code: string; /** @description A short, human-readable summary of the problem that SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization */ title: string; /** @description A human-readable explanation specific to this occurrence of the problem. Like title, this field's value can be localized */ detail: string; /** @description a JSON Pointer to the associated entity in the request document */ field?: string; /** @description A meta object containing non-standard meta-information about the error */ metadata?: { [key: string]: unknown; }; /** @description Whether the API or user can resend the request */ retryable?: boolean; } & { source: unknown; meta: unknown; }; }; }; }; requestBody: { content: { "application/json": { /** * @description A production release version of the Beam web widgets * @example v1.0.0 */ widgetVersion: string; }; }; }; }; }; "/productDetailsPage": { get: { parameters: { query: { lang?: "en" | "fr" | "de" | "es" | "it" | "pl" | "ja"; /** The version of the config */ version: string; storeId: number; /** When set to true, draft themes are returned */ draftConfig?: boolean; widgetName?: "community-impact" | "impact-overview" | "select-nonprofit" | "redeem-transaction" | "cumulative-impact" | "mobile-full-screen-nonprofit-selection" | "mobile-impact-list" | "mobile-minimal-nonprofit-selection" | "mobile-personal-impact" | "mobile-selected-nonprofit" | "mobile-progress-bar" | "select-nonprofit-cta" | "mobile-share-button" | "subscription-management" | "product-details-page" | "select-subscription-nonprofit" | "subscription-impact" | "subscriber-select-nonprofit"; /** The identifier for the product */ remoteProductIdentifier?: string; }; }; responses: { /** Fetches config/copy for product display page widget */ 200: { content: { "application/json": { /** @description Widget config for the product display page widget */ config: { web: { /** * @description Header/title for the widget * @example Choose your impact */ title: string; /** @description Subtitle/description for the widget */ description: string; /** * @description The prefix promo description for the widget for web * @example At no extra cost, */ promoDescriptionPrefix?: string; /** * @description The promo description for the widget for web * @example choose your impact and 1% of your purchase will be donated. */ promoDescription?: string; /** * @description confirm button * @example Confirm free donation */ confirmButton?: string; /** * @description copy once confirm button is clicked * @example Confirmed! */ confirmedButton?: string; /** * @description collapsed button copy * @example Choose a nonprofit */ collapsedButton?: string; /** @description Remote config theme data as requested by the given widgetName & version query params */ theme?: { [key: string]: unknown; } | null; /** * @description nonprofit Selected Header for select-nonprofit-cta widget * @example Your impact */ nonprofitSelectedHeader?: string; /** * @description nonprofit Unselected Header for select-nonprofit-cta widget * @example Make your purchase a force for good */ nonprofitUnselectedHeader?: string; /** @description An object containing dynamic strings for the widget. These strings serve as templates and include dynamic variables that vary based on the widget type. */ dynamicStrings?: { [key: string]: string; } | null; /** @description An object containing additional static strings specific to each widget. These strings are unique to the widget and are not shared across different widgets. */ additionalStrings?: { [key: string]: string; } | null; /** @description Disables counter animation for cumulative-impact widget */ disableAnimation?: boolean; /** @description promo copy is sent in this object to be used in conditionally rendered UI components. This object serves as a repository for server-generated copy */ promo?: { /** @example Donations are 2x for Black History Month */ "promo-text-long": string; /** @example Donations are 2x */ "promo-text-short": string; /** * @description replaces cause copy * @example 2x boosting donations */ "promo-cause-alt-text": string; }; }; mobileWeb?: { /** * @description Header/title for the widget * @example Choose your impact */ title: string; /** * @description Subtitle/description for the widget * @example choose your impact and 1% of your purchase will be donated. */ description: string; /** * @description nonprofit Selected Header for select-nonprofit-cta widget * @example Your impact */ nonprofitSelectedHeader?: string; /** * @description nonprofit Unselected Header for select-nonprofit-cta widget * @example Make your purchase a force for good */ nonprofitUnselectedHeader?: string; }; mobile: { /** * @description Header/title for the widget * @example Choose your impact */ title: string; /** * @description Subtitle/description for the widget * @example choose your impact and 1% of your purchase will be donated. */ description: string; /** * @description nonprofit Selected Header for select-nonprofit-cta widget * @example Your impact */ nonprofitSelectedHeader?: string; /** * @description nonprofit Unselected Header for select-nonprofit-cta widget * @example Make your purchase a force for good */ nonprofitUnselectedHeader?: string; }; /** * @description determines if a chain can enable nonprofit deselection for the select-nonprofit widget * @default false */ enableNonprofitDeselection?: boolean; }; ppgfDisclosure?: { copy: string; }; ppgfDisclosureHyperlink?: { /** Format: uri */ url: string; copy: string; }; }; }; }; }; }; post: { parameters: { query: { lang?: "en" | "fr" | "de" | "es" | "it" | "pl" | "ja"; /** The version of the config */ version: string; storeId: number; /** When set to true, draft themes are returned */ draftConfig?: boolean; widgetName?: "community-impact" | "impact-overview" | "select-nonprofit" | "redeem-transaction" | "cumulative-impact" | "mobile-full-screen-nonprofit-selection" | "mobile-impact-list" | "mobile-minimal-nonprofit-selection" | "mobile-personal-impact" | "mobile-selected-nonprofit" | "mobile-progress-bar" | "select-nonprofit-cta" | "mobile-share-button" | "subscription-management" | "product-details-page" | "select-subscription-nonprofit" | "subscription-impact" | "subscriber-select-nonprofit"; /** The identifier for the product */ remoteProductIdentifier?: string; }; }; responses: { /** Fetches config/copy for product display page widget */ 200: { content: { "application/json": { /** @description Widget config for the product display page widget */ config: { web: { /** * @description Header/title for the widget * @example Choose your impact */ title: string; /** @description Subtitle/description for the widget */ description: string; /** * @description The prefix promo description for the widget for web * @example At no extra cost, */ promoDescriptionPrefix?: string; /** * @description The promo description for the widget for web * @example choose your impact and 1% of your purchase will be donated. */ promoDescription?: string; /** * @description confirm button * @example Confirm free donation */ confirmButton?: string; /** * @description copy once confirm button is clicked * @example Confirmed! */ confirmedButton?: string; /** * @description collapsed button copy * @example Choose a nonprofit */ collapsedButton?: string; /** @description Remote config theme data as requested by the given widgetName & version query params */ theme?: { [key: string]: unknown; } | null; /** * @description nonprofit Selected Header for select-nonprofit-cta widget * @example Your impact */ nonprofitSelectedHeader?: string; /** * @description nonprofit Unselected Header for select-nonprofit-cta widget * @example Make your purchase a force for good */ nonprofitUnselectedHeader?: string; /** @description An object containing dynamic strings for the widget. These strings serve as templates and include dynamic variables that vary based on the widget type. */ dynamicStrings?: { [key: string]: string; } | null; /** @description An object containing additional static strings specific to each widget. These strings are unique to the widget and are not shared across different widgets. */ additionalStrings?: { [key: string]: string; } | null; /** @description Disables counter animation for cumulative-impact widget */ disableAnimation?: boolean; /** @description promo copy is sent in this object to be used in conditionally rendered UI components. This object serves as a repository for server-generated copy */ promo?: { /** @example Donations are 2x for Black History Month */ "promo-text-long": string; /** @example Donations are 2x */ "promo-text-short": string; /** * @description replaces cause copy * @example 2x boosting donations */ "promo-cause-alt-text": string; }; }; mobileWeb?: { /** * @description Header/title for the widget * @example Choose your impact */ title: string; /** * @description Subtitle/description for the widget * @example choose your impact and 1% of your purchase will be donated. */ description: string; /** * @description nonprofit Selected Header for select-nonprofit-cta widget * @example Your impact */ nonprofitSelectedHeader?: string; /** * @description nonprofit Unselected Header for select-nonprofit-cta widget * @example Make your purchase a force for good */ nonprofitUnselectedHeader?: string; }; mobile: { /** * @description Header/title for the widget * @example Choose your impact */ title: string; /** * @description Subtitle/description for the widget * @example choose your impact and 1% of your purchase will be donated. */ description: string; /** * @description nonprofit Selected Header for select-nonprofit-cta widget * @example Your impact */ nonprofitSelectedHeader?: string; /** * @description nonprofit Unselected Header for select-nonprofit-cta widget * @example Make your purchase a force for good */ nonprofitUnselectedHeader?: string; }; /** * @description determines if a chain can enable nonprofit deselection for the select-nonprofit widget * @default false */ enableNonprofitDeselection?: boolean; }; ppgfDisclosure?: { copy: string; }; ppgfDisclosureHyperlink?: { /** Format: uri */ url: string; copy: string; }; promos?: { /** @description The list of validated promo codes */ validatedPromoCodes?: { /** @description promoCodeId */ promoCodeId: string | null; promoCodeGroupId?: string | null; promoId?: number; /** * Format: date-time * @description ISO formatted date * @example 2023-04-19T03:23:59.301Z */ validatedAt: string; apply: boolean; }[]; }; }; }; }; }; requestBody: { content: { "application/json": { lang?: string; version?: string; storeId?: number; widgetName?: string; remoteProductIdentifier?: string; beamCartId?: string; draftConfig?: boolean; promos?: { unvalidatedPromoCodes: (Partial<{ /** @enum {string} */ type?: "manual" | "url"; } & { attributes?: { value?: string; }; }> & Partial<{ /** @enum {string} */ type?: "manual" | "url"; } & { attributes?: { url?: string; }; }>)[]; validatedPromoCodes: { /** @description promoCodeId */ promoCodeId: string | null; promoCodeGroupId?: string | null; promoId?: number; /** * Format: date-time * @description ISO formatted date * @example 2023-04-19T03:23:59.301Z */ validatedAt: string; apply: boolean; }[]; }; }; }; }; }; }; "/webhooks/shopify/redactCustomer": { post: { responses: { /** Webhook received and verified */ 200: { content: { "application/json": { [key: string]: unknown; }; }; }; /** Standard error */ default: { content: { "application/json": { /** @description Beam code for the error, meant to be used programmatically */ code: string; /** @description A short, human-readable summary of the problem that SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization */ title: string; /** @description A human-readable explanation specific to this occurrence of the problem. Like title, this field's value can be localized */ detail: string; /** @description a JSON Pointer to the associated entity in the request document */ field?: string; /** @description A meta object containing non-standard meta-information about the error */ metadata?: { [key: string]: unknown; }; /** @description Whether the API or user can resend the request */ retryable?: boolean; } & { source: unknown; meta: unknown; }; }; }; }; requestBody: { content: { "application/json": { [key: string]: unknown; }; }; }; }; }; "/webhooks/shopify/requestCustomerData": { post: { responses: { /** Webhook received and verified */ 200: { content: { "application/json": { [key: string]: unknown; }; }; }; /** Standard error */ default: { content: { "application/json": { /** @description Beam code for the error, meant to be used programmatically */ code: string; /** @description A short, human-readable summary of the problem that SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization */ title: string; /** @description A human-readable explanation specific to this occurrence of the problem. Like title, this field's value can be localized */ detail: string; /** @description a JSON Pointer to the associated entity in the request document */ field?: string; /** @description A meta object containing non-standard meta-information about the error */ metadata?: { [key: string]: unknown; }; /** @description Whether the API or user can resend the request */ retryable?: boolean; } & { source: unknown; meta: unknown; }; }; }; }; requestBody: { content: { "application/json": { [key: string]: unknown; }; }; }; }; }; "/webhooks/shopify/redactShop": { post: { responses: { /** Webhook received and verified */ 200: { content: { "application/json": { [key: string]: unknown; }; }; }; /** Standard error */ default: { content: { "application/json": { /** @description Beam code for the error, meant to be used programmatically */ code: string; /** @description A short, human-readable summary of the problem that SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization */ title: string; /** @description A human-readable explanation specific to this occurrence of the problem. Like title, this field's value can be localized */ detail: string; /** @description a JSON Pointer to the associated entity in the request document */ field?: string; /** @description A meta object containing non-standard meta-information about the error */ metadata?: { [key: string]: unknown; }; /** @description Whether the API or user can resend the request */ retryable?: boolean; } & { source: unknown; meta: unknown; }; }; }; }; requestBody: { content: { "application/json": { [key: string]: unknown; }; }; }; }; }; "/webhooks/shopify/orderCreated": { post: { responses: { /** Webhook received and verified */ 200: { content: { "application/json": { [key: string]: unknown; }; }; }; /** Standard error */ default: { content: { "application/json": { /** @description Beam code for the error, meant to be used programmatically */ code: string; /** @description A short, human-readable summary of the problem that SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization */ title: string; /** @description A human-readable explanation specific to this occurrence of the problem. Like title, this field's value can be localized */ detail: string; /** @description a JSON Pointer to the associated entity in the request document */ field?: string; /** @description A meta object containing non-standard meta-information about the error */ metadata?: { [key: string]: unknown; }; /** @description Whether the API or user can resend the request */ retryable?: boolean; } & { source: unknown; meta: unknown; }; }; }; }; requestBody: { content: { "application/json": { [key: string]: unknown; }; }; }; }; }; "/compliance/redactCustomer": { delete: { responses: { /** Returns status of the event */ 200: { content: { "application/json": { /** @enum {string} */ status?: "ok" | "error"; }; }; }; }; requestBody: { content: { "application/json": { email: string; } | { partnerUserId: string; }; }; }; }; }; } type TCartApi = paths["/chain/findEligibleNonprofitsForCart"]["post"]["requestBody"]["content"]["application/json"]["cart"]; type TCart = TCartApi & { content: { items: Record[]; discounts?: Record[] | undefined | null; }; }; type TBeamCartLocalStorage = { cartId: string; beamCartId?: string; subtotal: number; itemCount: number; currencyCode: string; } & TCart; declare class BeamError extends Error { supportUrl: string; constructor(msg?: string, { cause, name }?: { cause?: any; name?: string; }); } declare class NetworkError extends BeamError { /** Fetch Response object with .ok, .status, etc.*/ response: Response; /** If network response included JSON payload, it is parsed and available here */ body?: Record; constructor(response: Response, body?: Record, msg?: string); } declare class MissingConfig extends BeamError { missingConfigKeyNames: string[]; constructor(missingConfigKeyNames?: string[], msg?: string); } declare class LocalStorageError extends BeamError { constructor(msg?: string); } declare class SetupError extends BeamError { constructor(msg?: string); } type beamErrors_BeamError = BeamError; declare const beamErrors_BeamError: typeof BeamError; type beamErrors_LocalStorageError = LocalStorageError; declare const beamErrors_LocalStorageError: typeof LocalStorageError; type beamErrors_MissingConfig = MissingConfig; declare const beamErrors_MissingConfig: typeof MissingConfig; type beamErrors_NetworkError = NetworkError; declare const beamErrors_NetworkError: typeof NetworkError; type beamErrors_SetupError = SetupError; declare const beamErrors_SetupError: typeof SetupError; declare namespace beamErrors { export { beamErrors_BeamError as BeamError, beamErrors_LocalStorageError as LocalStorageError, beamErrors_MissingConfig as MissingConfig, beamErrors_NetworkError as NetworkError, beamErrors_SetupError as SetupError, }; } type TPromoCodeRequest = paths["/productDetailsPage"]["post"]["requestBody"]["content"]["application/json"]["promos"]; type TUnvalidatedPromoRequest = NonNullable["unvalidatedPromoCodes"]; type TPromoCodeAttribute = { value: string; url?: never; } | { url: string; value?: never; }; type TPromoCodeResponse = paths["/productDetailsPage"]["post"]["responses"]["200"]["content"]["application/json"]["promos"]; type TValidatedPromoResponse = NonNullable["validatedPromoCodes"]; type NetworkEventDetail = { url: string; method: string; type: "fetch"; response: Response; } | { url: string; method: string; type: "xhr"; xhr: XMLHttpRequest; }; /** * beamnetworkcall * Emitted by the Beam network listener whenever any API calls are made on the page */ declare class BeamNetworkCallEvent extends CustomEvent { static eventName: "beamnetworkcall"; constructor(detail: NetworkEventDetail); } type NonprofitSelectDetail = { selectionId?: string; selectedNonprofitId?: number | null; nonprofitName?: string | null; source?: WidgetName | null; timestamp?: Date; }; /** * beamnonprofitselect * Emitted when the end user selects a nonprofit in the Beam widget, and when the previous selection was restored * automatically */ declare class BeamNonprofitSelectEvent extends CustomEvent { static eventName: "beamnonprofitselect"; constructor(detail: NonprofitSelectDetail); } type CartChangeDetail = TCartApi & { cartId?: string; subtotal?: number; itemCount?: number; currencyCode?: string; }; /** * beamcartchange * Emitted when Beam detects that cart contents have changed, and when items are added to the cart for the first time */ declare class BeamCartChangeEvent extends CustomEvent { static eventName: "beamcartchange"; constructor(detail: CartChangeDetail); } type CartCreatedDetail = CartChangeDetail; /** * beamcartcreated * Emitted when a cart is created in Beam for the first time, but NOT when the cart is updated * Beam's cart expiration rules are used to determine when a returning visit counts as the same cart */ declare class BeamCartCreatedEvent extends CustomEvent { static eventName: "beamcartcreated"; constructor(detail: CartCreatedDetail); } type OrderCreatedDetail = { orderId: TId; transactionId: TId; cartTotal: number; currencyCode: string; selectionId?: string | null; cartId?: string | null; beamCartId?: string | null; storeId?: number | null; postalCode?: string | null; countryCode?: string | null; remoteSessionId?: string | null; transactionNonprofitId?: number | null; orderProcessedAt?: string | null; }; /** * beamordercreated * Emitted when an order is registered with Beam for the first time, but NOT on repeat visits, page refreshes, etc. */ declare class BeamOrderCreatedEvent extends CustomEvent { static eventName: "beamordercreated"; constructor(detail: OrderCreatedDetail); } /** * beamstatuschange * Emitted when the Beam config object has finished initializing along with all plugins */ type BeamStatusChangeEventDetail = { status: "pending"; } | { status: "error"; error: Error; } | { status: "ready"; }; declare class BeamStatusChangeEvent extends CustomEvent { static eventName: "beamstatuschange"; constructor(detail: BeamStatusChangeEventDetail); } type NonprofitSelectionRemovedDetail = { previousNonprofitId?: number | null; newNonprofitId?: number | null; selectionId?: string; timestamp?: Date; }; /** * beamnonprofitselectionremoved * Emitted when the nonprofit selection is removed from deselection or due to nonprofit cohort change */ declare class BeamNonprofitSelectionRemovedEvent extends CustomEvent { static eventName: "beamnonprofitselectionremoved"; constructor(detail: NonprofitSelectionRemovedDetail); } type PromoStoredDetail = { promoCodes: TPromoCodeRequest; }; /** * Emitted when a URL with query parameters is sanitized and stored in localStorage * * @event beampromocodesstored */ declare class BeamPromoCodesStoredEvent extends CustomEvent { static eventName: string; constructor(detail: PromoStoredDetail); } type WidgetStoredPromosDetail = { source?: WidgetName | HelperName | null; }; /** * Emitted when a widget stores the url or manual promoCodes in local storage * * @event beamwidgetstoredpromocodes */ declare class BeamWidgetStoredPromoCodesEvent extends CustomEvent { static eventName: "beamwidgetstoredpromocodes"; constructor(detail: WidgetStoredPromosDetail); } type WidgetInitialNonprofitSyncDetail = { nonprofitId?: number | null; nonprofitIdChanged?: boolean; selectionId?: string; selectionIdChanged?: boolean; }; /** * [Shopify Specific] - Emitted the first time a widget restores nonprofit selection from custom attributes * * @event beamwidgetinitialnonprofitsync */ declare class BeamWidgetInitialNonprofitSyncEvent extends CustomEvent { static eventName: "beamwidgetinitialnonprofitsync"; constructor(detail: WidgetInitialNonprofitSyncDetail); } type BeamWidgetInitialNonprofitSyncCancelDetail = { cancelled?: boolean; }; /** * [Shopify Specific] - Allows WidgetInitialNonprofitSyncDetail to be cancelled asynchronously * * @event beamwidgetinitialnonprofitsynccancel */ declare class BeamWidgetInitialNonprofitSyncCancelEvent extends CustomEvent { static eventName: "beamwidgetinitialnonprofitsynccancel"; constructor(detail: BeamWidgetInitialNonprofitSyncCancelDetail); } type BeamStatsigInitializedDetail = { showBeam: boolean; stableId?: string; }; /** * Fired when Statsig experiment assignments for Beam are initialized * * @event beamstatsiginitialized */ declare class BeamStatsigInitializedEvent extends CustomEvent { static eventName: "beamstatsiginitialized"; constructor(detail: BeamStatsigInitializedDetail); } type events_BeamCartChangeEvent = BeamCartChangeEvent; declare const events_BeamCartChangeEvent: typeof BeamCartChangeEvent; type events_BeamCartCreatedEvent = BeamCartCreatedEvent; declare const events_BeamCartCreatedEvent: typeof BeamCartCreatedEvent; type events_BeamNetworkCallEvent = BeamNetworkCallEvent; declare const events_BeamNetworkCallEvent: typeof BeamNetworkCallEvent; type events_BeamNonprofitSelectEvent = BeamNonprofitSelectEvent; declare const events_BeamNonprofitSelectEvent: typeof BeamNonprofitSelectEvent; type events_BeamNonprofitSelectionRemovedEvent = BeamNonprofitSelectionRemovedEvent; declare const events_BeamNonprofitSelectionRemovedEvent: typeof BeamNonprofitSelectionRemovedEvent; type events_BeamOrderCreatedEvent = BeamOrderCreatedEvent; declare const events_BeamOrderCreatedEvent: typeof BeamOrderCreatedEvent; type events_BeamPromoCodesStoredEvent = BeamPromoCodesStoredEvent; declare const events_BeamPromoCodesStoredEvent: typeof BeamPromoCodesStoredEvent; type events_BeamStatsigInitializedEvent = BeamStatsigInitializedEvent; declare const events_BeamStatsigInitializedEvent: typeof BeamStatsigInitializedEvent; type events_BeamStatusChangeEvent = BeamStatusChangeEvent; declare const events_BeamStatusChangeEvent: typeof BeamStatusChangeEvent; type events_BeamWidgetInitialNonprofitSyncCancelEvent = BeamWidgetInitialNonprofitSyncCancelEvent; declare const events_BeamWidgetInitialNonprofitSyncCancelEvent: typeof BeamWidgetInitialNonprofitSyncCancelEvent; type events_BeamWidgetInitialNonprofitSyncEvent = BeamWidgetInitialNonprofitSyncEvent; declare const events_BeamWidgetInitialNonprofitSyncEvent: typeof BeamWidgetInitialNonprofitSyncEvent; type events_BeamWidgetStoredPromoCodesEvent = BeamWidgetStoredPromoCodesEvent; declare const events_BeamWidgetStoredPromoCodesEvent: typeof BeamWidgetStoredPromoCodesEvent; declare namespace events { export { events_BeamCartChangeEvent as BeamCartChangeEvent, events_BeamCartCreatedEvent as BeamCartCreatedEvent, events_BeamNetworkCallEvent as BeamNetworkCallEvent, events_BeamNonprofitSelectEvent as BeamNonprofitSelectEvent, events_BeamNonprofitSelectionRemovedEvent as BeamNonprofitSelectionRemovedEvent, events_BeamOrderCreatedEvent as BeamOrderCreatedEvent, events_BeamPromoCodesStoredEvent as BeamPromoCodesStoredEvent, events_BeamStatsigInitializedEvent as BeamStatsigInitializedEvent, events_BeamStatusChangeEvent as BeamStatusChangeEvent, events_BeamWidgetInitialNonprofitSyncCancelEvent as BeamWidgetInitialNonprofitSyncCancelEvent, events_BeamWidgetInitialNonprofitSyncEvent as BeamWidgetInitialNonprofitSyncEvent, events_BeamWidgetStoredPromoCodesEvent as BeamWidgetStoredPromoCodesEvent, }; } declare const logger: { error: (...args: any[]) => void; log: (...args: any[]) => void; warn: (...args: any[]) => void; debug: (...args: any[]) => void; }; declare const initNetworkListeners: () => void; /** * Disables Beam event dispatching from the fetch/XHR Proxies without * un-patching them (un-patching is unsafe if another script wrapped * fetch/XHR after us — restoring our saved reference would remove * their wrapper too). */ declare const teardownNetworkListeners: () => void; /** * Creates an object that has the same API as normal localStorage, but adds a beam_ prefix and apiKey postfix to keys * Also adds helper methods for JSON (de-)serialization */ declare const createScopedLocalStorage: (config: { apiKey: string; }) => { readonly prefix: string; readonly postfix: string; getItem(key: string): string | null; setItem(key: string, value: unknown): void; removeItem(key: string): void; /** Safely parses value as JSON and return JS object */ getItemJson>(key: string): T | null; /** Safely stringifies value as JSON */ setItemJson(key: string, value: object): void; }; declare function waitForElement(selector: string, { timeout }?: { timeout?: number | undefined; }): Promise; declare const getCookieMap: (cookieString?: string) => Map; declare const getCookieValue: (name: string) => string | undefined; declare const setCookieValue: (options: CookieInit) => undefined; declare const deleteCookieValue: (options: { name: string; domain?: string; path?: string; }) => undefined; interface CookieInit { name: string; value: string; path?: string; domain?: string; expires?: number; sameSite?: "strict" | "lax" | "none"; } declare function saveRemoteSession({ remoteSessionId, apiKey }: { remoteSessionId: string; apiKey?: string; }): void; declare function getRemoteSession({ apiKey }: { apiKey?: string; }): string | null; type Func = (...args: T) => R; /** * Takes a function and returns a new memoized function. * If the same arguments are passed to the memoized function, it will return the previously computed result. * This is a "memoize once" function meaning it only compares the previous and current arguments, not historic values. * Results that throw errors or return rejected Promises are not cached. * * @param {Function} fn - The function to be memoized. * @param {(value: any) => boolean} [isEqual]- The equality function used to compare arguments. * @returns {Function} - The memoized function. * @param func */ declare function memoizeLast(func: Func, { isEqual }?: { isEqual?: ((value: any, other: any) => boolean) | undefined; }): MemoizedLast>; type MemoizedLast any> = T & { /** Clears the cached args/result so the next call always executes. */ reset: () => void; }; /** * Retrieves all validated promo codes stored in the "beam_promo_codes" cookie and parses it * * @returns {TPromoCodeResponse | undefined} An array of `ValidatedPromoCode` objects if found and parsed successfully, otherwise `undefined` */ declare const getAllPromoCodesFromCookie: () => TPromoCodeResponse | undefined; /** * Stores the validated promo codes in the "beam_promo_codes" cookie, replaces and does not merge * * @param {TValidatedPromoResponse} validatedPromoCodes * @param {string} domain */ declare const setPromoCodeInCookie: ({ validatedPromoCodes, domain, }: { validatedPromoCodes: TValidatedPromoResponse; domain?: string; }) => void; /** * Retrieves promo codes from localStorage, scoped by API key * @param {string} apiKey API key used for storage scoping * @returns {TPromoCodeRequest | null} - Returns stored promo codes object containing both * validated and unvalidated codes * - If no codes exist, returns a fresh object with empty arrays * */ declare const getPromoCodesLocalStorage: ({ apiKey }: { apiKey: string; }) => TPromoCodeRequest | null; /** * Sets promo codes in localStorage * @param {TPromoCodeRequest} promoCodes New promo codes to add * @param {string} apiKey API key for storage scoping */ declare const setPromoCodesInLocalStorage: ({ apiKey, promoCodes, }: { apiKey?: string; promoCodes: Partial; }) => void; /** * Merges new promo codes with existing ones and returns the combined result * @param {Partial} newPromos New promo codes to add * @param {string} apiKey API key for storage scoping * @returns {TPromoCodeRequest} An object containing both validated and unvalidated promo codes * @example * const result = mergePromoCodes({ * apiKey: 'beam_123', * newPromos: { * unvalidatedPromoCodes: [ * { type: 'manual', attributes: { value: 'WINTER20' } }, * { type: 'url', attributes: { url: 'www.example.com/?promo=HOLIDAY25' } } * ] * } * }); */ declare const mergeStoreAndReturnPromos: ({ newPromos, apiKey, }: { newPromos: Partial; apiKey: string; }) => TPromoCodeRequest; /** * Formats unvalidated promo codes by determining their source and attributes * The function will assign `QueryParam` as the source if a `url` exists, * otherwise, it will assign `Manual` as the source * * @param {TPromoCodeAttribute[]} promoAttributes An array of promo attributes to be formatted * @returns {TUnvalidatedPromoRequest} - An array of UnvalidatedPromoCode objects, * each with a source and attributes object */ declare const mapToUnvalidatedPromoCodes: (promoAttributes: TPromoCodeAttribute[]) => TUnvalidatedPromoRequest; /** * @param {TPromoCodeAttribute[]} promoAttributes An array of promo attributes to be formatted * @param {string} apiKey API key for storage scoping * @returns {TPromoCodeRequest} An object containing both validated and unvalidated promo codes */ declare const formatStoreAndReturnPromoCodes: (promoAttributes: TPromoCodeAttribute[], apiKey: string) => TPromoCodeRequest; /** * Extracts applicable promo codes from the cart object * This function retrieves discounts stored in the cart's `content.discounts` array, * filters out only the applicable promo codes, and returns them as an array of strings * * @param {TBeamCartLocalStorage} cart The cart object retrieved from local storage * @returns {string[]} An array of applicable promo codes */ declare const getPromoCodesFromCart: (cart: TBeamCartLocalStorage) => string[]; /** * Gets promo code exclusively from Shopify discount cookie * @returns {string | null} Single discount code or null if not found */ declare const getPromoCodeFromShopifyCookie: () => string | null; /** * Safely parses a JSON string into an array of strings * If parsing fails or the input is not a valid JSON array, it returns an empty array * * @param {string | undefined | null} jsonString The JSON string to parse * @returns {string[]} The parsed array of strings or an empty array if parsing fails */ declare const parseJsonStringArray: (jsonString: string | undefined | null) => string[]; /** * Retrieves and sanitizes the current URL for storage, preserving only safe query parameters * * @returns {TPromoCodeAttribute} Returns an object with only the `url` property set */ declare const getSanitizedUrlForStorage: () => TPromoCodeAttribute | undefined; declare const promoCodesAreEqual: (a: TPromoCodeRequest, b: TPromoCodeRequest) => boolean; declare const isEmptyPromoData: (promos: { unvalidatedPromoCodes?: unknown[]; validatedPromoCodes?: unknown[]; }) => boolean; /** * Clears every piece of Beam-related browser state this SDK writes, by iterating the * LOCAL_STORAGE_KEYS/BEAM_COOKIE_NAMES registries (src/api-sdk/constants.ts) directly — * anything added to those objects is cleared automatically, with nothing to update here. * * Not tied to any one integration's lifecycle (e.g. registerCartIntegration/ * unregisterCartIntegration) — safe to call on its own, from any integration or directly, * whenever a full reset of Beam's local footprint is needed. */ declare function clearBeamStorage(config: { apiKey: string; domain?: string; }): void; type index_MemoizedLast any> = MemoizedLast; declare const index_clearBeamStorage: typeof clearBeamStorage; declare const index_createScopedLocalStorage: typeof createScopedLocalStorage; declare const index_debounce: typeof debounce; declare const index_deleteCookieValue: typeof deleteCookieValue; declare const index_events: typeof events; declare const index_formatStoreAndReturnPromoCodes: typeof formatStoreAndReturnPromoCodes; declare const index_getAllPromoCodesFromCookie: typeof getAllPromoCodesFromCookie; declare const index_getCookieMap: typeof getCookieMap; declare const index_getCookieValue: typeof getCookieValue; declare const index_getPromoCodeFromShopifyCookie: typeof getPromoCodeFromShopifyCookie; declare const index_getPromoCodesFromCart: typeof getPromoCodesFromCart; declare const index_getPromoCodesLocalStorage: typeof getPromoCodesLocalStorage; declare const index_getRemoteSession: typeof getRemoteSession; declare const index_getSanitizedUrlForStorage: typeof getSanitizedUrlForStorage; declare const index_initNetworkListeners: typeof initNetworkListeners; declare const index_isEmptyPromoData: typeof isEmptyPromoData; declare const index_isEqual: typeof isEqual; declare const index_logger: typeof logger; declare const index_mapToUnvalidatedPromoCodes: typeof mapToUnvalidatedPromoCodes; declare const index_memoizeLast: typeof memoizeLast; declare const index_mergeStoreAndReturnPromos: typeof mergeStoreAndReturnPromos; declare const index_parseJsonStringArray: typeof parseJsonStringArray; declare const index_promoCodesAreEqual: typeof promoCodesAreEqual; declare const index_saveRemoteSession: typeof saveRemoteSession; declare const index_setCookieValue: typeof setCookieValue; declare const index_setPromoCodeInCookie: typeof setPromoCodeInCookie; declare const index_setPromoCodesInLocalStorage: typeof setPromoCodesInLocalStorage; declare const index_teardownNetworkListeners: typeof teardownNetworkListeners; declare const index_waitForElement: typeof waitForElement; declare namespace index { export { index_clearBeamStorage as clearBeamStorage, index_createScopedLocalStorage as createScopedLocalStorage, index_debounce as debounce, index_deleteCookieValue as deleteCookieValue, beamErrors as errors, index_events as events, index_formatStoreAndReturnPromoCodes as formatStoreAndReturnPromoCodes, index_getAllPromoCodesFromCookie as getAllPromoCodesFromCookie, index_getCookieMap as getCookieMap, index_getCookieValue as getCookieValue, index_getPromoCodeFromShopifyCookie as getPromoCodeFromShopifyCookie, index_getPromoCodesFromCart as getPromoCodesFromCart, index_getPromoCodesLocalStorage as getPromoCodesLocalStorage, index_getRemoteSession as getRemoteSession, index_getSanitizedUrlForStorage as getSanitizedUrlForStorage, index_initNetworkListeners as initNetworkListeners, index_isEmptyPromoData as isEmptyPromoData, index_isEqual as isEqual, index_logger as logger, index_mapToUnvalidatedPromoCodes as mapToUnvalidatedPromoCodes, index_memoizeLast as memoizeLast, index_mergeStoreAndReturnPromos as mergeStoreAndReturnPromos, index_parseJsonStringArray as parseJsonStringArray, index_promoCodesAreEqual as promoCodesAreEqual, index_saveRemoteSession as saveRemoteSession, index_setCookieValue as setCookieValue, index_setPromoCodeInCookie as setPromoCodeInCookie, index_setPromoCodesInLocalStorage as setPromoCodesInLocalStorage, index_teardownNetworkListeners as teardownNetworkListeners, index_waitForElement as waitForElement }; export type { index_MemoizedLast as MemoizedLast }; } /** * Retrieves the Beam cart ID from cookies * @param CART_COOKIE_NAME - The name of the cookie that stores the Beam cart ID * @returns The Beam cart ID if present in cookies or local storage, otherwise null */ declare const getBeamCartId: (CART_COOKIE_NAME: string, config: { apiKey: string; }) => string | null; /** * Retrieves the external cart ID * @param CART_COOKIE_NAME - The name of the cookie that stores the external cart ID * @returns The external cart ID if available or null if neither is available */ declare const getExternalCartId: (CART_COOKIE_NAME: string, config: { apiKey: string; }) => string | null; declare function makeApiKeyHeader(apiKey: string): { authorization: string; }; export { BeamStatusChangeEvent as $, memoizeLast as A, BeamNonprofitSelectEvent as B, mergeStoreAndReturnPromos as C, parseJsonStringArray as D, promoCodesAreEqual as E, saveRemoteSession as F, setCookieValue as G, setPromoCodeInCookie as H, setPromoCodesInLocalStorage as I, teardownNetworkListeners as J, BeamError as O, LocalStorageError as P, MissingConfig as Q, NetworkError as R, SetupError as S, BeamCartChangeEvent as U, BeamCartCreatedEvent as V, BeamNetworkCallEvent as W, BeamNonprofitSelectionRemovedEvent as X, BeamOrderCreatedEvent as Y, BeamPromoCodesStoredEvent as Z, BeamStatsigInitializedEvent as _, index as a, BeamWidgetInitialNonprofitSyncCancelEvent as a0, BeamWidgetInitialNonprofitSyncEvent as a1, BeamWidgetStoredPromoCodesEvent as a2, getBeamCartId as a3, getExternalCartId as a4, makeApiKeyHeader as a5, events as e, initNetworkListeners as i, clearBeamStorage as j, createScopedLocalStorage as k, deleteCookieValue as l, beamErrors as m, formatStoreAndReturnPromoCodes as n, getAllPromoCodesFromCookie as o, getCookieMap as p, getCookieValue as q, getPromoCodeFromShopifyCookie as r, getPromoCodesFromCart as s, getPromoCodesLocalStorage as t, getRemoteSession as u, getSanitizedUrlForStorage as v, waitForElement as w, isEmptyPromoData as x, logger as y, mapToUnvalidatedPromoCodes as z }; export type { paths as K, LANGUAGES as L, MemoizedLast as M, TApiKey as N, TUrl$1 as T, TNumericId as b, TId as c, TCart as d, TUrl as f, BeamBaseAPIConfig as g, TCartApi as h };