@epilot/sdk 2.15.8 → 2.15.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/definitions/pricing.json +84 -2
- package/dist/apis/access-token.cjs +6 -6
- package/dist/apis/access-token.js +1 -1
- package/dist/apis/address-suggestions.cjs +6 -6
- package/dist/apis/address-suggestions.js +1 -1
- package/dist/apis/address.cjs +6 -6
- package/dist/apis/address.js +1 -1
- package/dist/apis/ai-agents.cjs +6 -6
- package/dist/apis/ai-agents.js +1 -1
- package/dist/apis/app.cjs +6 -6
- package/dist/apis/app.js +1 -1
- package/dist/apis/audit-logs.cjs +6 -6
- package/dist/apis/audit-logs.js +1 -1
- package/dist/apis/automation.cjs +6 -6
- package/dist/apis/automation.js +1 -1
- package/dist/apis/billing.cjs +6 -6
- package/dist/apis/billing.js +1 -1
- package/dist/apis/blueprint-manifest.cjs +6 -6
- package/dist/apis/blueprint-manifest.js +1 -1
- package/dist/apis/calendar.cjs +6 -6
- package/dist/apis/calendar.js +1 -1
- package/dist/apis/configuration-hub.cjs +6 -6
- package/dist/apis/configuration-hub.js +1 -1
- package/dist/apis/consent.cjs +6 -6
- package/dist/apis/consent.js +1 -1
- package/dist/apis/customer-portal.cjs +6 -6
- package/dist/apis/customer-portal.js +1 -1
- package/dist/apis/dashboard.cjs +6 -6
- package/dist/apis/dashboard.js +1 -1
- package/dist/apis/data-governance.cjs +6 -6
- package/dist/apis/data-governance.js +1 -1
- package/dist/apis/deduplication.cjs +6 -6
- package/dist/apis/deduplication.js +1 -1
- package/dist/apis/design.cjs +6 -6
- package/dist/apis/design.js +1 -1
- package/dist/apis/document.cjs +6 -6
- package/dist/apis/document.js +1 -1
- package/dist/apis/email-settings.cjs +6 -6
- package/dist/apis/email-settings.js +1 -1
- package/dist/apis/email-template.cjs +6 -6
- package/dist/apis/email-template.js +1 -1
- package/dist/apis/entity-mapping.cjs +6 -6
- package/dist/apis/entity-mapping.js +1 -1
- package/dist/apis/entity.cjs +6 -6
- package/dist/apis/entity.js +1 -1
- package/dist/apis/environments.cjs +6 -6
- package/dist/apis/environments.js +1 -1
- package/dist/apis/event-catalog.cjs +6 -6
- package/dist/apis/event-catalog.js +1 -1
- package/dist/apis/file.cjs +6 -6
- package/dist/apis/file.js +1 -1
- package/dist/apis/iban.cjs +6 -6
- package/dist/apis/iban.js +1 -1
- package/dist/apis/integration-toolkit.cjs +6 -6
- package/dist/apis/integration-toolkit.js +1 -1
- package/dist/apis/journey.cjs +6 -6
- package/dist/apis/journey.js +1 -1
- package/dist/apis/kanban.cjs +6 -6
- package/dist/apis/kanban.js +1 -1
- package/dist/apis/message.cjs +6 -6
- package/dist/apis/message.js +1 -1
- package/dist/apis/metering.cjs +6 -6
- package/dist/apis/metering.js +1 -1
- package/dist/apis/notes.cjs +6 -6
- package/dist/apis/notes.js +1 -1
- package/dist/apis/notification.cjs +6 -6
- package/dist/apis/notification.js +1 -1
- package/dist/apis/organization.cjs +6 -6
- package/dist/apis/organization.js +1 -1
- package/dist/apis/partner-directory.cjs +6 -6
- package/dist/apis/partner-directory.js +1 -1
- package/dist/apis/permissions.cjs +6 -6
- package/dist/apis/permissions.js +1 -1
- package/dist/apis/pricing-tier.cjs +6 -6
- package/dist/apis/pricing-tier.js +1 -1
- package/dist/apis/pricing.cjs +6 -6
- package/dist/apis/pricing.d.cts +2 -2
- package/dist/apis/pricing.d.ts +2 -2
- package/dist/apis/pricing.js +1 -1
- package/dist/apis/purpose.cjs +6 -6
- package/dist/apis/purpose.js +1 -1
- package/dist/apis/query.cjs +6 -6
- package/dist/apis/query.js +1 -1
- package/dist/apis/sandbox.cjs +6 -6
- package/dist/apis/sandbox.js +1 -1
- package/dist/apis/sharing.cjs +6 -6
- package/dist/apis/sharing.js +1 -1
- package/dist/apis/snapshot.cjs +6 -6
- package/dist/apis/snapshot.js +1 -1
- package/dist/apis/submission.cjs +6 -6
- package/dist/apis/submission.js +1 -1
- package/dist/apis/target.cjs +6 -6
- package/dist/apis/target.js +1 -1
- package/dist/apis/targeting.cjs +6 -6
- package/dist/apis/targeting.js +1 -1
- package/dist/apis/template-variables.cjs +6 -6
- package/dist/apis/template-variables.js +1 -1
- package/dist/apis/user.cjs +6 -6
- package/dist/apis/user.js +1 -1
- package/dist/apis/validation-rules.cjs +6 -6
- package/dist/apis/validation-rules.js +1 -1
- package/dist/apis/webhooks.cjs +6 -6
- package/dist/apis/webhooks.js +1 -1
- package/dist/apis/workflow-definition.cjs +6 -6
- package/dist/apis/workflow-definition.js +1 -1
- package/dist/apis/workflow.cjs +6 -6
- package/dist/apis/workflow.js +1 -1
- package/dist/{chunk-USC6N3WG.cjs → chunk-B4LJU7Y7.cjs} +1 -1
- package/dist/{chunk-H5DNNZU5.js → chunk-IFYIYXKG.js} +1 -1
- package/dist/index.cjs +8 -8
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/js-yaml-DLCVPJ7G.js +0 -0
- package/dist/pricing-5GBNQOLX.cjs +7 -0
- package/dist/pricing-YJHJTRJS.js +7 -0
- package/dist/{pricing.d-BgjfwicJ.d.cts → pricing.d-C95oaAtN.d.cts} +137 -3
- package/dist/{pricing.d-BgjfwicJ.d.ts → pricing.d-C95oaAtN.d.ts} +137 -3
- package/docs/pricing.md +57 -0
- package/package.json +12 -11
- package/dist/pricing-CXWAKLA6.js +0 -7
- package/dist/pricing-L7VUML4H.cjs +0 -7
|
@@ -4111,6 +4111,84 @@ declare namespace Components {
|
|
|
4111
4111
|
export interface ComputedPriceComponents {
|
|
4112
4112
|
[name: string]: /* The computed price */ ComputedBasePrice;
|
|
4113
4113
|
}
|
|
4114
|
+
/**
|
|
4115
|
+
* An error from a conditional-pricing operation, carrying a machine-readable `code`
|
|
4116
|
+
* from the conditional-pricing vocabulary plus any structured data about the failure,
|
|
4117
|
+
* so a client can branch on the kind of failure rather than parse the message.
|
|
4118
|
+
* Referenced only by the operations that emit these codes; every other operation
|
|
4119
|
+
* keeps the plain `Error` shape.
|
|
4120
|
+
*
|
|
4121
|
+
*/
|
|
4122
|
+
export interface ConditionalPricingError {
|
|
4123
|
+
/**
|
|
4124
|
+
* Error message
|
|
4125
|
+
*/
|
|
4126
|
+
message: string;
|
|
4127
|
+
/**
|
|
4128
|
+
* The HTTP status code
|
|
4129
|
+
*/
|
|
4130
|
+
status?: number;
|
|
4131
|
+
/**
|
|
4132
|
+
* The cause of the error (visible for bad requests - http 400)
|
|
4133
|
+
*/
|
|
4134
|
+
cause?: string;
|
|
4135
|
+
/**
|
|
4136
|
+
* The error message. Carries the same string as `message`, which the shared `Error`
|
|
4137
|
+
* schema requires — `error` is the field responses have always used, and every caller
|
|
4138
|
+
* to date reads. Declared here rather than on the shared `Error` because a request
|
|
4139
|
+
* validation failure puts a list of validation errors in this field instead of a
|
|
4140
|
+
* string, and those responses reference `Error` directly.
|
|
4141
|
+
*
|
|
4142
|
+
*/
|
|
4143
|
+
error?: string;
|
|
4144
|
+
code?: /**
|
|
4145
|
+
* Machine-readable failure mode of a conditional-pricing operation, allowing clients
|
|
4146
|
+
* to branch on the kind of failure instead of parsing the error message.
|
|
4147
|
+
*
|
|
4148
|
+
* - `NOT_FOUND` (404): the addressed entity, variant or version does not exist
|
|
4149
|
+
* - `AMBIGUOUS_RESOLUTION` (409): several variants match the given context while a single result was requested
|
|
4150
|
+
* - `TUPLE_CONFLICT` (409): the condition tuple is already claimed by another variant
|
|
4151
|
+
* - `VERSION_CONFLICT` (409): a version already exists at the given `valid_from` on that variant
|
|
4152
|
+
* - `SUPERSEDED_VERSION` (409): the addressed version has been superseded
|
|
4153
|
+
* - `CONDITION_UNDEFINED` (400): the context names a condition the entity's schema does not define
|
|
4154
|
+
* - `OPERATOR_UNSUPPORTED` (400): the requested operator is not applicable to the condition's type
|
|
4155
|
+
* - `CONTEXT_FORMAT_INVALID` (400): a context value is malformed for its condition type
|
|
4156
|
+
* - `TOO_MANY_MATCHES` (400): a multi-match resolve exceeded its result cap
|
|
4157
|
+
* - `WRITE_CONFLICT` (409): transient write contention, retryable unlike `TUPLE_CONFLICT`
|
|
4158
|
+
*
|
|
4159
|
+
* Each code is emitted with the HTTP status shown above, and only with that status.
|
|
4160
|
+
*
|
|
4161
|
+
*/
|
|
4162
|
+
ConditionalPricingErrorCode;
|
|
4163
|
+
/**
|
|
4164
|
+
* Structured data about the failure, shaped by the accompanying `code`
|
|
4165
|
+
* (e.g. the candidate variants of an `ambiguous-resolution`). Only present
|
|
4166
|
+
* when the failure has structured data to report, and never without a `code`.
|
|
4167
|
+
*
|
|
4168
|
+
*/
|
|
4169
|
+
details?: {
|
|
4170
|
+
[name: string]: any;
|
|
4171
|
+
};
|
|
4172
|
+
}
|
|
4173
|
+
/**
|
|
4174
|
+
* Machine-readable failure mode of a conditional-pricing operation, allowing clients
|
|
4175
|
+
* to branch on the kind of failure instead of parsing the error message.
|
|
4176
|
+
*
|
|
4177
|
+
* - `NOT_FOUND` (404): the addressed entity, variant or version does not exist
|
|
4178
|
+
* - `AMBIGUOUS_RESOLUTION` (409): several variants match the given context while a single result was requested
|
|
4179
|
+
* - `TUPLE_CONFLICT` (409): the condition tuple is already claimed by another variant
|
|
4180
|
+
* - `VERSION_CONFLICT` (409): a version already exists at the given `valid_from` on that variant
|
|
4181
|
+
* - `SUPERSEDED_VERSION` (409): the addressed version has been superseded
|
|
4182
|
+
* - `CONDITION_UNDEFINED` (400): the context names a condition the entity's schema does not define
|
|
4183
|
+
* - `OPERATOR_UNSUPPORTED` (400): the requested operator is not applicable to the condition's type
|
|
4184
|
+
* - `CONTEXT_FORMAT_INVALID` (400): a context value is malformed for its condition type
|
|
4185
|
+
* - `TOO_MANY_MATCHES` (400): a multi-match resolve exceeded its result cap
|
|
4186
|
+
* - `WRITE_CONFLICT` (409): transient write contention, retryable unlike `TUPLE_CONFLICT`
|
|
4187
|
+
*
|
|
4188
|
+
* Each code is emitted with the HTTP status shown above, and only with that status.
|
|
4189
|
+
*
|
|
4190
|
+
*/
|
|
4191
|
+
export type ConditionalPricingErrorCode = "NOT_FOUND" | "AMBIGUOUS_RESOLUTION" | "TUPLE_CONFLICT" | "VERSION_CONFLICT" | "SUPERSEDED_VERSION" | "CONDITION_UNDEFINED" | "OPERATOR_UNSUPPORTED" | "CONTEXT_FORMAT_INVALID" | "TOO_MANY_MATCHES" | "WRITE_CONFLICT";
|
|
4114
4192
|
export type ConsumptionTypeGetAg = "household" | "heating_pump" | "night_storage_heating" | "night_storage_heating_common_meter";
|
|
4115
4193
|
/**
|
|
4116
4194
|
* The coupon entity
|
|
@@ -9725,7 +9803,23 @@ declare namespace Components {
|
|
|
9725
9803
|
* "_updated_at": "2021-02-09T12:41:43.662Z"
|
|
9726
9804
|
* }
|
|
9727
9805
|
*/
|
|
9728
|
-
Tax
|
|
9806
|
+
Tax | /**
|
|
9807
|
+
* A minimal, ad-hoc tax rate for line items with no backing tax entity
|
|
9808
|
+
* in the catalog (e.g. a fully custom/composite price component built
|
|
9809
|
+
* by a client with no product/price reference to resolve tax from).
|
|
9810
|
+
* Mirrors how PriceItem relates to Price: unlike Tax, this has no
|
|
9811
|
+
* entity identity — it isn't persisted and can't be looked up by _id,
|
|
9812
|
+
* so it can't be shared/reused across price items the way a catalog
|
|
9813
|
+
* Tax can.
|
|
9814
|
+
*
|
|
9815
|
+
* example:
|
|
9816
|
+
* {
|
|
9817
|
+
* "rate": 19,
|
|
9818
|
+
* "type": "VAT",
|
|
9819
|
+
* "description": "Custom 19% VAT"
|
|
9820
|
+
* }
|
|
9821
|
+
*/
|
|
9822
|
+
TaxItem;
|
|
9729
9823
|
}
|
|
9730
9824
|
/**
|
|
9731
9825
|
* A tax amount associated with a specific tax rate.
|
|
@@ -9777,13 +9871,50 @@ declare namespace Components {
|
|
|
9777
9871
|
* "_updated_at": "2021-02-09T12:41:43.662Z"
|
|
9778
9872
|
* }
|
|
9779
9873
|
*/
|
|
9780
|
-
Tax
|
|
9874
|
+
Tax | /**
|
|
9875
|
+
* A minimal, ad-hoc tax rate for line items with no backing tax entity
|
|
9876
|
+
* in the catalog (e.g. a fully custom/composite price component built
|
|
9877
|
+
* by a client with no product/price reference to resolve tax from).
|
|
9878
|
+
* Mirrors how PriceItem relates to Price: unlike Tax, this has no
|
|
9879
|
+
* entity identity — it isn't persisted and can't be looked up by _id,
|
|
9880
|
+
* so it can't be shared/reused across price items the way a catalog
|
|
9881
|
+
* Tax can.
|
|
9882
|
+
*
|
|
9883
|
+
* example:
|
|
9884
|
+
* {
|
|
9885
|
+
* "rate": 19,
|
|
9886
|
+
* "type": "VAT",
|
|
9887
|
+
* "description": "Custom 19% VAT"
|
|
9888
|
+
* }
|
|
9889
|
+
*/
|
|
9890
|
+
TaxItem;
|
|
9781
9891
|
}
|
|
9782
9892
|
export interface TaxBreakdownInfo {
|
|
9783
9893
|
rate?: number | null;
|
|
9784
9894
|
type?: "VAT" | "GST" | "Custom";
|
|
9785
9895
|
_id?: string;
|
|
9786
9896
|
}
|
|
9897
|
+
/**
|
|
9898
|
+
* A minimal, ad-hoc tax rate for line items with no backing tax entity
|
|
9899
|
+
* in the catalog (e.g. a fully custom/composite price component built
|
|
9900
|
+
* by a client with no product/price reference to resolve tax from).
|
|
9901
|
+
* Mirrors how PriceItem relates to Price: unlike Tax, this has no
|
|
9902
|
+
* entity identity — it isn't persisted and can't be looked up by _id,
|
|
9903
|
+
* so it can't be shared/reused across price items the way a catalog
|
|
9904
|
+
* Tax can.
|
|
9905
|
+
*
|
|
9906
|
+
* example:
|
|
9907
|
+
* {
|
|
9908
|
+
* "rate": 19,
|
|
9909
|
+
* "type": "VAT",
|
|
9910
|
+
* "description": "Custom 19% VAT"
|
|
9911
|
+
* }
|
|
9912
|
+
*/
|
|
9913
|
+
export interface TaxItem {
|
|
9914
|
+
type: "VAT" | "GST" | "Custom";
|
|
9915
|
+
rate: number | null;
|
|
9916
|
+
description?: string;
|
|
9917
|
+
}
|
|
9787
9918
|
export interface TierDetails {
|
|
9788
9919
|
quantity: number;
|
|
9789
9920
|
unit_amount: number;
|
|
@@ -12034,6 +12165,8 @@ type ComputePriceResult = Components.Schemas.ComputePriceResult;
|
|
|
12034
12165
|
type ComputedBasePrice = Components.Schemas.ComputedBasePrice;
|
|
12035
12166
|
type ComputedPriceBreakdown = Components.Schemas.ComputedPriceBreakdown;
|
|
12036
12167
|
type ComputedPriceComponents = Components.Schemas.ComputedPriceComponents;
|
|
12168
|
+
type ConditionalPricingError = Components.Schemas.ConditionalPricingError;
|
|
12169
|
+
type ConditionalPricingErrorCode = Components.Schemas.ConditionalPricingErrorCode;
|
|
12037
12170
|
type ConsumptionTypeGetAg = Components.Schemas.ConsumptionTypeGetAg;
|
|
12038
12171
|
type Coupon = Components.Schemas.Coupon;
|
|
12039
12172
|
type CouponItem = Components.Schemas.CouponItem;
|
|
@@ -12138,10 +12271,11 @@ type TaxAmount = Components.Schemas.TaxAmount;
|
|
|
12138
12271
|
type TaxAmountBreakdown = Components.Schemas.TaxAmountBreakdown;
|
|
12139
12272
|
type TaxAmountDto = Components.Schemas.TaxAmountDto;
|
|
12140
12273
|
type TaxBreakdownInfo = Components.Schemas.TaxBreakdownInfo;
|
|
12274
|
+
type TaxItem = Components.Schemas.TaxItem;
|
|
12141
12275
|
type TierDetails = Components.Schemas.TierDetails;
|
|
12142
12276
|
type TotalDetails = Components.Schemas.TotalDetails;
|
|
12143
12277
|
type TypeGetAg = Components.Schemas.TypeGetAg;
|
|
12144
12278
|
type ValidateAvailabilityFileError = Components.Schemas.ValidateAvailabilityFileError;
|
|
12145
12279
|
type ValidateAvailabilityFileResult = Components.Schemas.ValidateAvailabilityFileResult;
|
|
12146
12280
|
|
|
12147
|
-
export { type
|
|
12281
|
+
export { type DiscountAmounts as $, type AdditionalProviderData as A, type BaseCompositePrice as B, type Client as C, type CheckoutCartResult as D, type CheckoutMode as E, type CompositePrice as F, type CompositePriceItem as G, type CompositePriceItemDto as H, type ComputePriceParams as I, type ComputePriceParamsBase as J, type ComputePriceParamsGas as K, type ComputePriceParamsPower as L, type ComputePriceResult as M, type ComputedBasePrice as N, type OperationMethods as O, Paths as P, type ComputedPriceBreakdown as Q, type ComputedPriceComponents as R, type ConditionalPricingError as S, type ConditionalPricingErrorCode as T, type ConsumptionTypeGetAg as U, type Coupon as V, type CouponItem as W, type CouponWithoutPromoCodes as X, type Currency as Y, type CustomContext as Z, type Customer as _, Components as a, type PricingModel as a$, type DynamicTariffInterval as a0, type DynamicTariffMode as a1, type EntityId as a2, type EntityItem as a3, type EntityRelation as a4, type Error as a5, type ExternalCatalogConfigurationRequest as a6, type ExternalCatalogCustomRequest as a7, type ExternalCatalogItem as a8, type ExternalCatalogJourneyRequest as a9, type OpportunitySource as aA, type Order as aB, type OrderPayload as aC, type OrderRelation as aD, type OrderSource as aE, type OrderStatus as aF, type PaymentMethod as aG, type PortalContext as aH, type PowerMarketAreaDetails as aI, type PowerMeterType as aJ, type Price as aK, type PriceAmounts as aL, type PriceComponentRelation as aM, type PriceConditions as aN, type PriceDynamicTariff as aO, type PriceGetAg as aP, type PriceInputMapping as aQ, type PriceInputMappings as aR, type PriceItem as aS, type PriceItemDto as aT, type PriceItemDtoUnion as aU, type PriceItems as aV, type PriceItemsDto as aW, type PriceTier as aX, type PriceTierDisplayMode as aY, type PricingDetails as aZ, type PricingDetailsResponse as a_, type ExternalCatalogPortalRequest as aa, type ExternalCatalogRequest as ab, type ExternalFeeMapping as ac, type ExternalFeeMappings as ad, type ExternalFeeMetadata as ae, type ExternalLocationMetadata as af, type ExternalPriceMetadata as ag, type File as ah, type GasConcessionType as ai, type GasMarketAreaDetails as aj, type HistoricMarketPriceRecord as ak, type HistoricMarketPricesResult as al, type HydratedCompositePrice as am, type IntegrationAuthCredentials as an, type IntegrationCredentialsResult as ao, type IntegrationId as ap, type JourneyContext as aq, type MarketParticipant as ar, type MarkupPricingModel as as, type MetaData as at, type NonHydratedCompositePrice as au, type OAuthCredentials as av, type OAuthIntegration as aw, type Offer as ax, type OfferHighlightConfig as ay, type Opportunity as az, type PathsDictionary as b, type Product as b0, type ProductCategory as b1, type ProductRecommendation as b2, type ProductRecommendationResponse as b3, type ProductRecommendationSearch as b4, type PromoCode as b5, type PromoCodeValidationResponse as b6, type Provider as b7, type RecurrenceAmount as b8, type RecurrenceAmountDto as b9, type ValidateAvailabilityFileError as bA, type ValidateAvailabilityFileResult as bB, type RecurrenceAmountWithTax as ba, type RedeemedPromo as bb, type SalesTax as bc, type SaveIntegrationCredentialsParams as bd, type SearchExternalCatalogParams as be, type SearchExternalCatalogRecommendationsResult as bf, type SearchExternalCatalogResult as bg, type SearchProvidersParams as bh, type SearchProvidersResult as bi, type SearchStreetsParams as bj, type SearchStreetsResult as bk, type SignatureMeta as bl, type SpotMarketBiddingZone as bm, type SpotMarketDataFrequency as bn, type SpotMarketType as bo, type Street as bp, type TariffTypeGetAg as bq, type Tax as br, type TaxAmount as bs, type TaxAmountBreakdown as bt, type TaxAmountDto as bu, type TaxBreakdownInfo as bv, type TaxItem as bw, type TierDetails as bx, type TotalDetails as by, type TypeGetAg as bz, type Address as c, type Amounts as d, type AvailabilityCheckParams as e, type AvailabilityFilters as f, type AvailabilityLocation as g, type AvailabilityResult as h, type AverageMarketPriceRecord as i, type AverageMarketPriceResult as j, type BaseCouponCommon as k, type BaseMarketPriceRecord as l, type BasePriceItem as m, type BasePriceItemCommon as n, type BasePriceItemDto as o, type BasicAuthCredentials as p, type BasicAuthIntegration as q, type BillingPeriod as r, type CartDto as s, type CashbackAmount as t, type CashbackAmounts as u, type CashbackPeriod as v, type CatalogFieldsParam as w, type CatalogSearch as x, type CatalogSearchResult as y, type CheckoutCart as z };
|
package/docs/pricing.md
CHANGED
|
@@ -66,7 +66,9 @@ const { data } = await pricingClient.$calculatePricingDetails(...)
|
|
|
66
66
|
|
|
67
67
|
**Schemas**
|
|
68
68
|
- [`IntegrationId`](#integrationid)
|
|
69
|
+
- [`ConditionalPricingErrorCode`](#conditionalpricingerrorcode)
|
|
69
70
|
- [`Error`](#error)
|
|
71
|
+
- [`ConditionalPricingError`](#conditionalpricingerror)
|
|
70
72
|
- [`Product`](#product)
|
|
71
73
|
- [`Opportunity`](#opportunity)
|
|
72
74
|
- [`Order`](#order)
|
|
@@ -178,6 +180,7 @@ const { data } = await pricingClient.$calculatePricingDetails(...)
|
|
|
178
180
|
- [`EntityItem`](#entityitem)
|
|
179
181
|
- [`EntityRelation`](#entityrelation)
|
|
180
182
|
- [`Tax`](#tax)
|
|
183
|
+
- [`TaxItem`](#taxitem)
|
|
181
184
|
- [`TaxBreakdownInfo`](#taxbreakdowninfo)
|
|
182
185
|
- [`BaseCouponCommon`](#basecouponcommon)
|
|
183
186
|
- [`CouponWithoutPromoCodes`](#couponwithoutpromocodes)
|
|
@@ -1782,6 +1785,18 @@ const { data } = await client.$productRecommendations(
|
|
|
1782
1785
|
type IntegrationId = "getag" | "external-catalog"
|
|
1783
1786
|
```
|
|
1784
1787
|
|
|
1788
|
+
### `ConditionalPricingErrorCode`
|
|
1789
|
+
|
|
1790
|
+
Machine-readable failure mode of a conditional-pricing operation, allowing clients
|
|
1791
|
+
to branch on the kind of failure instead of parsing the error message.
|
|
1792
|
+
|
|
1793
|
+
- `NOT_FOUND` (404): the addressed entity, variant or version does not exist
|
|
1794
|
+
- `AMBIGUOUS_RESOLUTION` (409): several variants match the given con
|
|
1795
|
+
|
|
1796
|
+
```ts
|
|
1797
|
+
type ConditionalPricingErrorCode = "NOT_FOUND" | "AMBIGUOUS_RESOLUTION" | "TUPLE_CONFLICT" | "VERSION_CONFLICT" | "SUPERSEDED_VERSION" | "CONDITION_UNDEFINED" | "OPERATOR_UNSUPPORTED" | "CONTEXT_FORMAT_INVALID" | "TOO_MANY_MATCHES" | "WRITE_CONFLICT"
|
|
1798
|
+
```
|
|
1799
|
+
|
|
1785
1800
|
### `Error`
|
|
1786
1801
|
|
|
1787
1802
|
```ts
|
|
@@ -1792,6 +1807,24 @@ type Error = {
|
|
|
1792
1807
|
}
|
|
1793
1808
|
```
|
|
1794
1809
|
|
|
1810
|
+
### `ConditionalPricingError`
|
|
1811
|
+
|
|
1812
|
+
An error from a conditional-pricing operation, carrying a machine-readable `code`
|
|
1813
|
+
from the conditional-pricing vocabulary plus any structured data about the failure,
|
|
1814
|
+
so a client can branch on the kind of failure rather than parse the message.
|
|
1815
|
+
Referenced only by the operations that emit these codes;
|
|
1816
|
+
|
|
1817
|
+
```ts
|
|
1818
|
+
type ConditionalPricingError = {
|
|
1819
|
+
message: string
|
|
1820
|
+
status?: number
|
|
1821
|
+
cause?: string
|
|
1822
|
+
error?: string
|
|
1823
|
+
code?: "NOT_FOUND" | "AMBIGUOUS_RESOLUTION" | "TUPLE_CONFLICT" | "VERSION_CONFLICT" | "SUPERSEDED_VERSION" | "CONDITION_UNDEFINED" | "OPERATOR_UNSUPPORTED" | "CONTEXT_FORMAT_INVALID" | "TOO_MANY_MATCHES" | "WRITE_CONFLICT"
|
|
1824
|
+
details?: Record<string, unknown>
|
|
1825
|
+
}
|
|
1826
|
+
```
|
|
1827
|
+
|
|
1795
1828
|
### `Product`
|
|
1796
1829
|
|
|
1797
1830
|
The product entity
|
|
@@ -4175,6 +4208,10 @@ type TaxAmountDto = {
|
|
|
4175
4208
|
active?: boolean
|
|
4176
4209
|
region?: string
|
|
4177
4210
|
region_label?: string
|
|
4211
|
+
} | {
|
|
4212
|
+
type: "VAT" | "GST" | "Custom"
|
|
4213
|
+
rate: number
|
|
4214
|
+
description?: string
|
|
4178
4215
|
}
|
|
4179
4216
|
}
|
|
4180
4217
|
```
|
|
@@ -4815,6 +4852,10 @@ type TaxAmount = {
|
|
|
4815
4852
|
active?: boolean
|
|
4816
4853
|
region?: string
|
|
4817
4854
|
region_label?: string
|
|
4855
|
+
} | {
|
|
4856
|
+
type: "VAT" | "GST" | "Custom"
|
|
4857
|
+
rate: number
|
|
4858
|
+
description?: string
|
|
4818
4859
|
}
|
|
4819
4860
|
}
|
|
4820
4861
|
```
|
|
@@ -5363,6 +5404,22 @@ type Tax = {
|
|
|
5363
5404
|
}
|
|
5364
5405
|
```
|
|
5365
5406
|
|
|
5407
|
+
### `TaxItem`
|
|
5408
|
+
|
|
5409
|
+
A minimal, ad-hoc tax rate for line items with no backing tax entity
|
|
5410
|
+
in the catalog (e.g. a fully custom/composite price component built
|
|
5411
|
+
by a client with no product/price reference to resolve tax from).
|
|
5412
|
+
Mirrors how PriceItem relates to Price: unlike Tax, this has no
|
|
5413
|
+
entity identity — it isn't persis
|
|
5414
|
+
|
|
5415
|
+
```ts
|
|
5416
|
+
type TaxItem = {
|
|
5417
|
+
type: "VAT" | "GST" | "Custom"
|
|
5418
|
+
rate: number
|
|
5419
|
+
description?: string
|
|
5420
|
+
}
|
|
5421
|
+
```
|
|
5422
|
+
|
|
5366
5423
|
### `TaxBreakdownInfo`
|
|
5367
5424
|
|
|
5368
5425
|
```ts
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@epilot/sdk",
|
|
3
|
-
"version": "2.15.
|
|
3
|
+
"version": "2.15.10",
|
|
4
4
|
"description": "JavaScript/TypeScript SDK for epilot APIs",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -322,6 +322,16 @@
|
|
|
322
322
|
},
|
|
323
323
|
"./workflow-definition/openapi.json": "./definitions/workflow-definition.json"
|
|
324
324
|
},
|
|
325
|
+
"scripts": {
|
|
326
|
+
"generate": "tsx ../../scripts/generate-sdk-v2.ts && pnpm lint:fix",
|
|
327
|
+
"build": "tsup",
|
|
328
|
+
"build:watch": "tsup --watch",
|
|
329
|
+
"test": "vitest run",
|
|
330
|
+
"test:watch": "vitest",
|
|
331
|
+
"lint": "biome check src",
|
|
332
|
+
"lint:fix": "biome check src --fix",
|
|
333
|
+
"prepublishOnly": "npm run build"
|
|
334
|
+
},
|
|
325
335
|
"keywords": [
|
|
326
336
|
"epilot",
|
|
327
337
|
"sdk",
|
|
@@ -515,14 +525,5 @@
|
|
|
515
525
|
"./dist/apis/workflow-definition.d.ts"
|
|
516
526
|
]
|
|
517
527
|
}
|
|
518
|
-
},
|
|
519
|
-
"scripts": {
|
|
520
|
-
"generate": "tsx ../../scripts/generate-sdk-v2.ts && pnpm lint:fix",
|
|
521
|
-
"build": "tsup",
|
|
522
|
-
"build:watch": "tsup --watch",
|
|
523
|
-
"test": "vitest run",
|
|
524
|
-
"test:watch": "vitest",
|
|
525
|
-
"lint": "biome check src",
|
|
526
|
-
"lint:fix": "biome check src --fix"
|
|
527
528
|
}
|
|
528
|
-
}
|
|
529
|
+
}
|