UNPKG

@epilot/pricing-client

Version:
1,334 lines (1,332 loc) 482 kB
/* eslint-disable */ import type { OpenAPIClient, Parameters, UnknownParamsObject, OperationResponse, AxiosRequestConfig, } from 'openapi-client-axios'; declare namespace Components { namespace Schemas { export interface Address { [name: string]: any; /** * example: * [ * "billing" * ] */ _tags?: string[]; /** * The first line of the address. Typically the street address or PO Box number. */ street?: string | null; /** * The second line of the address. Typically the number of the apartment, suite, or unit. */ street_number?: string | null; /** * The postal code for the address. */ postal_code?: string | null; /** * The name of the city, district, village, or town. */ city?: string | null; /** * The two-letter code for the country of the address. */ country?: string | null; /** * An additional description for the address */ additional_info?: string | null; /** * the company name, usually used as extra delivery instructions */ company_name?: string | null; /** * the first name of the recipient, usually used as extra delivery instructions */ first_name?: string | null; /** * the last name of the recipient, usually used as extra delivery instructions */ last_name?: string | null; /** * the salutation of the recipient, usually used as extra delivery instructions */ salutation?: string | null; /** * the title of the recipient, usually used as extra delivery instructions */ title?: string | null; } export interface Amounts { /** * Total of all items before (discounts or) taxes are applied. */ amount_subtotal?: number; /** * Total of all items before (discounts or) taxes are applied, as a string with all the decimal places. */ amount_subtotal_decimal?: string; /** * Total of all items after (discounts and) taxes are applied. */ amount_total?: number; /** * Total of all items after (discounts and) taxes are applied, as a string with all the decimal places. */ amount_total_decimal?: string; /** * The cashback amount. */ cashback_amount?: number; /** * The cashback amount as a string with all the decimal places. */ cashback_amount_decimal?: string; cashback_period?: /* The cashback period, for now it's limited to either 0 months or 12 months */ CashbackPeriod; /** * Total amount after cashback is applied. */ after_cashback_amount_total?: number; /** * Total amount after cashback is applied as a string with all the decimal places. */ after_cashback_amount_total_decimal?: string; /** * The discount amount. */ discount_amount?: number; /** * The discount amount as a string with all the decimal places. */ discount_amount_decimal?: string; /** * The discount percentage, if the applied coupon had a percentage type. */ discount_percentage?: number; /** * Total amount before discount is applied. */ before_discount_amount_total?: number; /** * Total amount before discount is applied as a string with all the decimal places. */ before_discount_amount_total_decimal?: string; /** * Total amount before discount is applied, excluding taxes. */ before_discount_amount_subtotal?: number; /** * Total amount before discount is applied, excluding taxes, as a string with all the decimal places. */ before_discount_amount_subtotal_decimal?: string; } /** * Availability check request payload */ export interface AvailabilityCheckParams { /** * Products to check availability */ products: string[]; filters: /* Availability filters dimensions */ AvailabilityFilters; } /** * Availability filters dimensions */ export interface AvailabilityFilters { location: AvailabilityLocation; /** * A value to be matched against the availability window (start & end date) * example: * 2017-07-21 */ available_date?: string; // date } export interface AvailabilityLocation { /** * The first line of the address. Typically the street address or PO Box number. */ street?: string; /** * The second line of the address. Typically the number of the apartment, suite, or unit. */ street_number?: string; /** * The postal code for the address. */ postal_code?: string; /** * The name of the city, district, village, or town. */ city?: string; /** * The name of the country. */ country?: string; } /** * The product availability check result payload * example: * { * "available_products": [], * "check_results": [ * { * "product_id": "my-product-id-123-1", * "matching_hits": 0 * }, * { * "product_id": "my-product-id-123-2", * "matching_hits": 0 * } * ] * } */ export interface AvailabilityResult { available_products: string[]; /** * The check result details */ check_results?: { product_id: string; /** * The number of rules matched */ matching_hits?: number; /** * A set of matching errors when checking availability */ matching_error?: { [name: string]: any; }; }[]; } /** * An average market price over a given period in time. */ export interface AverageMarketPriceRecord { /** * Cost in Cents, e.g. 12.3 for 12,3 Cents = 0.123€. * example: * 12.3 */ unit_amount: number; /** * Cost in decimal format, e.g. 0.123€. * example: * 0.123 */ unit_amount_decimal: string; unit_amount_currency: /** * Three-letter ISO currency code, in lowercase. Must be a supported currency. * ISO 4217 CURRENCY CODES as specified in the documentation: https://www.iso.org/iso-4217-currency-codes.html * * example: * EUR */ Currency; /** * An ISO 8601 interval in the format 'start/end'. * example: * 2025-01-01T00:00:00Z/2025-01-31T23:59:59Z */ timestamp: string; } export interface AverageMarketPriceResult { market: /* The market for a spot market price. */ SpotMarketType; bidding_zone: /* The bidding zone for a spot market price. */ SpotMarketBiddingZone; price: /* An average market price over a given period in time. */ AverageMarketPriceRecord; _meta?: /* Signature meta data payload */ SignatureMeta; } /** * The common properties for a composite price entity, without the price components * example: * { * "_id": "c2a95ca9-7a50-41a4-a73c-b5fb1a57d40f", * "_schema": "price", * "_title": "My Composite Price", * "description": "My Composite Price", * "_org": "739224", * "_created_at": "2022-02-18T10:10:26.439Z", * "_updated_at": "2022-02-18T11:53:04.191Z", * "active": true, * "is_composite_price": true, * "price_components": { * "$relation": [ * { * "entity_id": "comp1-2a95ca9-7a50-41a4-a73c-b5fb1a57d40f", * "_schema": "price", * "_product_id": "target-price-product-id", * "quantity": 1, * "item": { * "_id": "comp1-2a95ca9-7a50-41a4-a73c-b5fb1a57d40f", * "unit_amount": 10000, * "unit_amount_currency": "EUR", * "unit_amount_decimal": "100.00", * "sales_tax": "standard", * "is_tax_inclusive": false, * "price_display_in_journeys": "show_price", * "type": "one_time", * "_schema": "price", * "_title": "Test 1", * "description": "Test 1", * "tax": { * "$relation": [ * { * "entity_id": "18bbbc2e-2c37-4f91-924a-07ae60d830e4" * } * ] * }, * "_org": "739224", * "_created_at": "2022-02-18T10:10:26.439Z", * "_updated_at": "2022-02-18T11:53:04.191Z", * "active": true, * "billing_period": "weekly", * "billing_duration_unit": "months", * "notice_time_unit": "months", * "termination_time_unit": "months", * "renewal_duration_unit": "months", * "is_composite_price": false * } * }, * { * "entity_id": "comp2-2a95ca9-7a50-41a4-a73c-b5fb1a57d40f", * "_schema": "price", * "_product_id": "target-price-product-id", * "quantity": 2, * "item": { * "_id": "comp2-2a95ca9-7a50-41a4-a73c-b5fb1a57d40f", * "unit_amount": 10000, * "unit_amount_currency": "EUR", * "unit_amount_decimal": "100.00", * "sales_tax": "standard", * "is_tax_inclusive": false, * "price_display_in_journeys": "show_price", * "type": "one_time", * "_schema": "price", * "_title": "Test 1", * "description": "Test 1", * "tax": { * "$relation": [ * { * "entity_id": "18bbbc2e-2c37-4f91-924a-07ae60d830e4" * } * ] * }, * "_org": "739224", * "_created_at": "2022-02-18T10:10:26.439Z", * "_updated_at": "2022-02-18T11:53:04.191Z", * "active": true, * "billing_period": "weekly", * "billing_duration_unit": "months", * "notice_time_unit": "months", * "termination_time_unit": "months", * "renewal_duration_unit": "months", * "is_composite_price": false * } * } * ] * } * } */ export interface BaseCompositePrice { [name: string]: any; /** * The billing period duration */ billing_duration_amount?: number | null; /** * The billing period duration unit */ billing_duration_unit?: "days" | "weeks" | "months" | "years"; /** * The notice period duration */ notice_time_amount?: number | null; /** * The notice period duration unit */ notice_time_unit?: "days" | "weeks" | "months" | "years"; /** * The termination period duration */ termination_time_amount?: number | null; /** * The termination period duration unit */ termination_time_unit?: "days" | "weeks" | "months" | "years"; /** * The renewal period duration */ renewal_duration_amount?: number | null; /** * The renewal period duration unit */ renewal_duration_unit?: "days" | "weeks" | "months" | "years"; /** * Whether the price can be used for new purchases. */ active?: boolean; /** * A brief description of the price. */ description?: string; /** * A set of [price](/api/pricing#tag/simple_price_schema) components that define the composite price. */ price_components?: /* A set of [price](/api/pricing#tag/simple_price_schema) components that define the composite price. */ /** * The price entity schema for simple pricing * example: * { * "unit_amount": 100000, * "unit_amount_currency": "EUR", * "unit_amount_decimal": "1000", * "sales_tax": "standard", * "is_tax_inclusive": true, * "price_display_in_journeys": "show_price", * "type": "one_time", * "billing_period": "weekly", * "billing_duration_unit": "months", * "notice_time_unit": "months", * "termination_time_unit": "months", * "renewal_duration_unit": "months", * "_schema": "price", * "_title": "Solar Panel Module", * "description": "Solar Panel Module", * "active": true, * "_id": "9c36c23b-1574-4193-beff-b1b5e1124bc7", * "_org": "728", * "_created_at": "2022-06-03T16:04:10.369Z", * "_updated_at": "2022-06-03T16:04:10.369Z", * "pricing_model": "per_unit", * "is_composite_price": false * } */ Price[] | { $relation?: PriceComponentRelation[]; }; /** * Three-letter ISO currency code, in lowercase. */ unit_amount_currency?: /* Three-letter ISO currency code, in lowercase. */ /** * Three-letter ISO currency code, in lowercase. Must be a supported currency. * ISO 4217 CURRENCY CODES as specified in the documentation: https://www.iso.org/iso-4217-currency-codes.html * * example: * EUR */ Currency; /** * The flag for prices that contain price components. */ is_composite_price: true; /** * The price creation date */ _created_at?: string; /** * The price id */ _id?: string; /** * The price autogenerated title */ _title?: string; /** * The price last update date */ _updated_at?: string; /** * The organization id the price belongs to */ _org_id?: string; /** * An arbitrary set of tags attached to the composite price */ _tags?: string[]; } /** * The shared properties for the coupon entity and coupon item entity */ export interface BaseCouponCommon { [name: string]: any; _id: EntityId /* uuid */; /** * The auto-generated title for the title */ _title: string; /** * Organization Id the entity belongs to */ _org: string; /** * The schema of the entity, for coupons it is always `coupon` */ _schema: "coupon"; _tags?: string[]; /** * The creation date for the opportunity */ _created_at: string; // date-time /** * The date the coupon was last updated */ _updated_at: string; // date-time name: string | null; description?: string | null; type: "fixed" | "percentage"; category: "discount" | "cashback"; /** * Use if type is set to percentage. The percentage to be discounted, represented as a whole integer. */ percentage_value?: string | null; /** * Use if type is set to fixed. The fixed amount in cents to be discounted, represented as a whole integer. */ fixed_value?: number; /** * Use if type is set to fixed. The unit amount in eur to be discounted, represented as a decimal string with at most 12 decimal places. */ fixed_value_decimal?: string; /** * Use if type is set to fixed. Three-letter ISO currency code, in lowercase. */ fixed_value_currency?: /* Use if type is set to fixed. Three-letter ISO currency code, in lowercase. */ /** * Three-letter ISO currency code, in lowercase. Must be a supported currency. * ISO 4217 CURRENCY CODES as specified in the documentation: https://www.iso.org/iso-4217-currency-codes.html * * example: * EUR */ Currency; cashback_period?: /* The cashback period, for now it's limited to either 0 months or 12 months */ CashbackPeriod; active?: boolean; /** * Whether the coupon requires a promo code to be applied */ requires_promo_code?: boolean; } export interface BaseMarketPriceRecord { /** * Cost in Cents, e.g. 12.3 for 12,3 Cents = 0.123€. * example: * 12.3 */ unit_amount: number; /** * Cost in decimal format, e.g. 0.123€. * example: * 0.123 */ unit_amount_decimal: string; unit_amount_currency: /** * Three-letter ISO currency code, in lowercase. Must be a supported currency. * ISO 4217 CURRENCY CODES as specified in the documentation: https://www.iso.org/iso-4217-currency-codes.html * * example: * EUR */ Currency; } /** * Represents a price item * example: * { * "amount_subtotal": 10000, * "amount_total": 10600, * "currency": "EUR", * "description": "Annual internet service", * "price_id": "7e24ff5d-d580-4136-a32f-19191eed039a", * "product_id": "6241487f-b7fd-428b-ab92-24ee0b37fd84", * "taxes": [ * { * "amount": 600, * "tax": { * "active": true, * "description": "Without Behaviour", * "rate": 6, * "region": "DE", * "type": "VAT", * "_created_at": "2022-02-07T14:49:08.831Z", * "_id": "18bbbc2e-2c37-4f91-924a-07ae60d830e4", * "_org": "739224", * "_schema": "tax", * "_title": "Tax Without Behaviour", * "_updated_at": "2022-02-07T14:49:08.831Z" * } * } * ], * "unit_amount": 10000, * "unit_amount_net": 10000, * "pricing_model": "per_unit", * "_price": { * "unit_amount": 10000, * "unit_amount_currency": "EUR", * "unit_amount_decimal": "100.00", * "sales_tax": "standard", * "is_tax_inclusive": false, * "price_display_in_journeys": "show_price", * "type": "one_time", * "billing_period": "weekly", * "billing_duration_unit": "months", * "notice_time_unit": "months", * "termination_time_unit": "months", * "renewal_duration_unit": "months", * "_schema": "price", * "_title": "Solar Panel Module", * "description": "Solar Panel Module", * "active": true, * "tax": { * "$relation": [ * { * "entity_id": "24641e82-0690-4135-8b43-ef12a9b1c5dc" * } * ] * }, * "_id": "7e24ff5d-d580-4136-a32f-19191eed039a", * "_org": "728", * "_created_at": "2022-06-03T16:04:10.369Z", * "_updated_at": "2022-06-03T16:04:10.369Z", * "pricing_model": "per_unit" * }, * "_product": { * "name": "Cool box", * "type": "product", * "_id": "73f857a4-0fbc-4aa6-983f-87c0d6d410a6", * "_title": "Cool box" * } * } */ export interface BasePriceItem { /** * Total of all items before (discounts or) taxes are applied. */ amount_subtotal?: number; /** * Total of all items before (discounts or) taxes are applied, as a string with all the decimal places. */ amount_subtotal_decimal?: string; /** * Total of all items after (discounts and) taxes are applied. */ amount_total?: number; /** * Total of all items after (discounts and) taxes are applied, as a string with all the decimal places. */ amount_total_decimal?: string; /** * The cashback amount. */ cashback_amount?: number; /** * The cashback amount as a string with all the decimal places. */ cashback_amount_decimal?: string; cashback_period?: /* The cashback period, for now it's limited to either 0 months or 12 months */ CashbackPeriod; /** * Total amount after cashback is applied. */ after_cashback_amount_total?: number; /** * Total amount after cashback is applied as a string with all the decimal places. */ after_cashback_amount_total_decimal?: string; /** * The discount amount. */ discount_amount?: number; /** * The discount amount as a string with all the decimal places. */ discount_amount_decimal?: string; /** * The discount percentage, if the applied coupon had a percentage type. */ discount_percentage?: number; /** * Total amount before discount is applied. */ before_discount_amount_total?: number; /** * Total amount before discount is applied as a string with all the decimal places. */ before_discount_amount_total_decimal?: string; /** * Total amount before discount is applied, excluding taxes. */ before_discount_amount_subtotal?: number; /** * Total amount before discount is applied, excluding taxes, as a string with all the decimal places. */ before_discount_amount_subtotal_decimal?: string; metadata?: /* A set of key-value pairs used to store meta data information about an entity. */ MetaData; /** * The quantity of products being purchased. */ quantity?: number; /** * The id of the product. */ product_id?: string; /** * The id of the price. */ price_id?: string; /** * An arbitrary string attached to the price item. Often useful for displaying to users. Defaults to product name. */ description?: string; /** * The description for the product. */ product_description?: string; /** * The name for the product. */ product_name?: string; price_mappings?: /** * example: * [ * { * "price_id": "589B011B-F8D9-4F8E-AD71-BACE4B543C0F", * "frequency_unit": "weekly", * "value": 1000.245, * "name": "avg consumption", * "metadata": { * "journey_title": "energy journey", * "step_name": "avg consumption picker" * } * } * ] */ PriceInputMappings; /** * Specifies whether the price is considered `inclusive` of taxes or not. */ is_tax_inclusive?: boolean; /** * The snapshot of the product. * example: * { * "type": "product", * "_schema": "product", * "_title": "Solar Panel with Battery Storage", * "name": "Solar Panel with Battery Storage", * "code": "SOLAR-BATT", * "active": true, * "description": "Solar Panel with battery solution, optimized for max efficiency. ", * "feature": [ * { * "_tags": [], * "feature": "Eco-Panels" * }, * { * "_tags": [], * "feature": "Remote Management Platform" * }, * { * "_tags": [], * "feature": "Battery Remote Control" * }, * { * "_tags": [], * "feature": "Mobile App" * } * ], * "cross_sellable_products": { * "$relation": [ * { * "entity_id": "068d0713-a650-4668-9ed2-eca7be31e337", * "_schema": "product", * "_tags": [] * }, * { * "entity_id": "c8402ee7-fba9-4f3d-bffd-6803ca655782", * "_tags": [] * } * ] * }, * "product_images": { * "$relation": [ * { * "entity_id": "37bdeaaa-65fe-403e-9894-65b01cd277f1" * }, * { * "entity_id": "56dde657-795c-41bb-bf53-98fd586b7e6e" * } * ] * }, * "product_downloads": { * "$relation": [ * { * "entity_id": "64211361-8759-414b-81c0-afbf24f83aa9" * } * ] * }, * "_id": "a7f4771a-6368-4d77-bb01-71f1e4902de5", * "_org": "728", * "_created_at": "2022-06-03T15: 52: 27.512Z", * "_updated_at": "2022-06-03T16: 05: 15.029Z", * "price_options": { * "$relation": [ * { * "entity_id": "9c36c23b-1574-4193-beff-b1b5e1124bc7", * "_tags": [] * }, * { * "entity_id": "146aa2cc-f267-4d5e-bda4-cbe2669b7741", * "_tags": [] * } * ] * } * } */ _product?: { [name: string]: any; /** * The description for the product */ description?: string; /** * The product code */ code?: string; /** * The type of Product: * * | type | description | * |----| ----| * | `product` | Represents a physical good | * | `service` | Represents a service or virtual product | * */ type?: "product" | "service"; /** * The product main name */ name?: string; /** * The product categories */ categories?: string[]; feature?: { /** * An arbitrary set of tags attached to a feature */ _tags?: string[]; feature?: string; }[]; /** * Stores references to products that can be cross sold with the current product. */ cross_sellable_products?: { $relation?: EntityRelation[]; }; /** * Stores references to a set of file images of the product */ product_images?: /* Stores references to a set of file images of the product */ { $relation?: EntityRelation[]; } | File[]; /** * Stores references to a set of files downloadable from the product. * e.g: tech specifications, quality control sheets, privacy policy agreements * */ product_downloads?: /** * Stores references to a set of files downloadable from the product. * e.g: tech specifications, quality control sheets, privacy policy agreements * */ { $relation?: EntityRelation[]; } | File[]; /** * A set of [prices](/api/pricing#tag/simple_price_schema) or [composite prices](/api/pricing#tag/dynamic_price_schema) for the current product. */ price_options?: { $relation?: EntityRelation[]; }; /** * Stores references to the availability files that define where this product is available. * These files are used when interacting with products via epilot Journeys, thought the AvailabilityCheck block. * */ _availability_files?: File[]; /** * The product id */ _id?: string; /** * The autogenerated product title */ _title?: string; /** * The organization id the product belongs to */ _org_id?: string; /** * The product creation date */ _created_at?: string; /** * The product last update date */ _updated_at?: string; }; /** * price item id */ _id?: string; /** * The unit amount value */ unit_amount?: number; /** * The unit amount in eur to be charged, represented as a decimal string with at most 12 decimal places. */ unit_amount_decimal?: string; /** * The unit amount before any discount is applied */ before_discount_unit_amount?: number; /** * The unit amount before any discount is applied, represented as a decimal string with at most 12 decimal places. */ before_discount_unit_amount_decimal?: string; /** * The unit gross amount before any discount is applied */ before_discount_unit_amount_gross?: number; /** * The unit gross amount before any discount is applied, represented as a decimal string with at most 12 decimal places. */ before_discount_unit_amount_gross_decimal?: string; /** * The unit net amount before any discount is applied */ before_discount_unit_amount_net?: number; /** * The unit net amount before any discount is applied, represented as a decimal string with at most 12 decimal places. */ before_discount_unit_amount_net_decimal?: string; /** * The discount amount applied for each unit */ unit_discount_amount?: number; /** * The discount amount applied for each unit represented as a decimal string */ unit_discount_amount_decimal?: string; /** * The unit gross amount value. */ unit_amount_gross?: number; /** * The unit gross amount value. */ unit_amount_gross_decimal?: string; /** * Net unit amount without taxes or discounts. */ unit_amount_net?: number; /** * Net unit amount without taxes or discounts. */ unit_amount_net_decimal?: string; /** * The net discount amount applied for each unit */ unit_discount_amount_net?: number; /** * The net discount amount applied for each unit represented as a decimal string */ unit_discount_amount_net_decimal?: string; /** * The discount amount applied to the tax */ tax_discount_amount?: number; /** * The discount amount applied to the tax represented as a decimal string */ tax_discount_amount_decimal?: string; /** * The net discount amount applied */ discount_amount_net?: number; /** * The net discount amount applied represented as a decimal string */ discount_amount_net_decimal?: string; /** * Total tax amount for this line item. */ amount_tax?: number; /** * The tax amount before any discount is applied */ before_discount_tax_amount?: number; /** * The tax amount before any discount is applied represented as a decimal string */ before_discount_tax_amount_decimal?: string; currency?: /** * Three-letter ISO currency code, in lowercase. Must be a supported currency. * ISO 4217 CURRENCY CODES as specified in the documentation: https://www.iso.org/iso-4217-currency-codes.html * * example: * EUR */ Currency; /** * The taxes applied to the price item. */ taxes?: (/* A tax amount associated with a specific tax rate. */ TaxAmount)[]; /** * The sum of amounts of the price items by recurrence. */ recurrences?: (/* An amount associated with a specific recurrence. */ RecurrenceAmount)[]; /** * The coupons applicable to the price item */ _coupons?: (/* The shared properties for the coupon entity and coupon item entity */ CouponItem)[]; /** * When set to true on a `_price` displayed as OnRequest (`show_as_on_request: 'on_request'`) this flag means the price has been approved and can now be displayed to the customer. This flag is only valid for prices shown as 'on_request'. */ on_request_approved?: boolean; } /** * Represents the common keys in BasePriceItem and BasePriceItemDto */ export interface BasePriceItemCommon { metadata?: /* A set of key-value pairs used to store meta data information about an entity. */ MetaData; /** * The quantity of products being purchased. */ quantity?: number; /** * The id of the product. */ product_id?: string; /** * The id of the price. */ price_id?: string; /** * An arbitrary string attached to the price item. Often useful for displaying to users. Defaults to product name. */ description?: string; /** * The description for the product. */ product_description?: string; /** * The name for the product. */ product_name?: string; price_mappings?: /** * example: * [ * { * "price_id": "589B011B-F8D9-4F8E-AD71-BACE4B543C0F", * "frequency_unit": "weekly", * "value": 1000.245, * "name": "avg consumption", * "metadata": { * "journey_title": "energy journey", * "step_name": "avg consumption picker" * } * } * ] */ PriceInputMappings; /** * Specifies whether the price is considered `inclusive` of taxes or not. */ is_tax_inclusive?: boolean; /** * The snapshot of the product. * example: * { * "type": "product", * "_schema": "product", * "_title": "Solar Panel with Battery Storage", * "name": "Solar Panel with Battery Storage", * "code": "SOLAR-BATT", * "active": true, * "description": "Solar Panel with battery solution, optimized for max efficiency. ", * "feature": [ * { * "_tags": [], * "feature": "Eco-Panels" * }, * { * "_tags": [], * "feature": "Remote Management Platform" * }, * { * "_tags": [], * "feature": "Battery Remote Control" * }, * { * "_tags": [], * "feature": "Mobile App" * } * ], * "cross_sellable_products": { * "$relation": [ * { * "entity_id": "068d0713-a650-4668-9ed2-eca7be31e337", * "_schema": "product", * "_tags": [] * }, * { * "entity_id": "c8402ee7-fba9-4f3d-bffd-6803ca655782", * "_tags": [] * } * ] * }, * "product_images": { * "$relation": [ * { * "entity_id": "37bdeaaa-65fe-403e-9894-65b01cd277f1" * }, * { * "entity_id": "56dde657-795c-41bb-bf53-98fd586b7e6e" * } * ] * }, * "product_downloads": { * "$relation": [ * { * "entity_id": "64211361-8759-414b-81c0-afbf24f83aa9" * } * ] * }, * "_id": "a7f4771a-6368-4d77-bb01-71f1e4902de5", * "_org": "728", * "_created_at": "2022-06-03T15: 52: 27.512Z", * "_updated_at": "2022-06-03T16: 05: 15.029Z", * "price_options": { * "$relation": [ * { * "entity_id": "9c36c23b-1574-4193-beff-b1b5e1124bc7", * "_tags": [] * }, * { * "entity_id": "146aa2cc-f267-4d5e-bda4-cbe2669b7741", * "_tags": [] * } * ] * } * } */ _product?: { [name: string]: any; /** * The description for the product */ description?: string; /** * The product code */ code?: string; /** * The type of Product: * * | type | description | * |----| ----| * | `product` | Represents a physical good | * | `service` | Represents a service or virtual product | * */ type?: "product" | "service"; /** * The product main name */ name?: string; /** * The product categories */ categories?: string[]; feature?: { /** * An arbitrary set of tags attached to a feature */ _tags?: string[]; feature?: string; }[]; /** * Stores references to products that can be cross sold with the current product. */ cross_sellable_products?: { $relation?: EntityRelation[]; }; /** * Stores references to a set of file images of the product */ product_images?: /* Stores references to a set of file images of the product */ { $relation?: EntityRelation[]; } | File[]; /** * Stores references to a set of files downloadable from the product. * e.g: tech specifications, quality control sheets, privacy policy agreements * */ product_downloads?: /** * Stores references to a set of files downloadable from the product. * e.g: tech specifications, quality control sheets, privacy policy agreements * */ { $relation?: EntityRelation[]; } | File[]; /** * A set of [prices](/api/pricing#tag/simple_price_schema) or [composite prices](/api/pricing#tag/dynamic_price_schema) for the current product. */ price_options?: { $relation?: EntityRelation[]; }; /** * Stores references to the availability files that define where this product is available. * These files are used when interacting with products via epilot Journeys, thought the AvailabilityCheck block. * */ _availability_files?: File[]; /** * The product id */ _id?: string; /** * The autogenerated product title */ _title?: string; /** * The organization id the product belongs to */ _org_id?: string; /** * The product creation date */ _created_at?: string; /** * The product last update date */ _updated_at?: string; }; } /** * Represents a valid base price item from a client. */ export interface BasePriceItemDto { metadata?: /* A set of key-value pairs used to store meta data information about an entity. */ MetaData; /** * The quantity of products being purchased. */ quantity?: number; /** * The id of the product. */ product_id?: string; /** * The id of the price. */ price_id?: string; /** * An arbitrary string attached to the price item. Often useful for displaying to users. Defaults to product name. */ description?: string; /** * The description for the product. */ product_description?: string; /** * The name for the product. */ product_name?: string; price_mappings?: /** * example: * [ * { * "price_id": "589B011B-F8D9-4F8E-AD71-BACE4B543C0F", * "frequency_unit": "weekly", * "value": 1000.245, * "name": "avg consumption", * "metadata": { * "journey_title": "energy journey", * "step_name": "avg consumption picker" * } * } * ] */ PriceInputMappings; /** * Specifies whether the price is considered `inclusive` of taxes or not. */ is_tax_inclusive?: boolean; /** * The snapshot of the product. * example: * { * "type": "product", * "_schema": "product", * "_title": "Solar Panel with Battery Storage", * "name": "Solar Panel with Battery Storage", * "code": "SOLAR-BATT", * "active": true, * "description": "Solar Panel with battery solution, optimized for max efficiency. ", * "feature": [ * { * "_tags": [], * "feature": "Eco-Panels" * }, * { * "_tags": [], * "feature": "Remote Management Platform" * }, * { * "_tags": [], * "feature": "Battery Remote Control" * }, * { * "_tags": [], * "feature": "Mobile App" * } * ], * "cross_sellable_products": { * "$relation": [ * { * "entity_id": "068d0713-a650-4668-9ed2-eca7be31e337", * "_schema": "product", * "_tags": [] * }, * { * "entity_id": "c8402ee7-fba9-4f3d-bffd-6803ca655782", * "_tags": [] * } * ] * }, * "product_images": { * "$relation": [ * { * "entity_id": "37bdeaaa-65fe-403e-9894-65b01cd277f1" * }, * { * "entity_id": "56dde657-795c-41bb-bf53-98fd586b7e6e" * } * ] * }, * "product_downloads": { * "$relation": [ * { * "entity_id": "64211361-8759-414b-81c0-afbf24f83aa9" * } * ] * }, * "_id": "a7f4771a-6368-4d77-bb01-71f1e4902de5", * "_org": "728", * "_created_at": "2022-06-03T15: 52: 27.512