@viu/emporix-sdk 2.21.0 → 2.22.0

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.
Files changed (40) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/dist/cart.cjs +61 -0
  3. package/dist/cart.cjs.map +1 -1
  4. package/dist/cart.d.cts +106 -1
  5. package/dist/cart.d.ts +106 -1
  6. package/dist/cart.js +1 -1
  7. package/dist/category.cjs +28 -0
  8. package/dist/category.cjs.map +1 -1
  9. package/dist/category.d.cts +10 -0
  10. package/dist/category.d.ts +10 -0
  11. package/dist/category.js +1 -1
  12. package/dist/{chunk-HUEMYP2L.js → chunk-5DWCYDQD.js} +63 -2
  13. package/dist/chunk-5DWCYDQD.js.map +1 -0
  14. package/dist/{chunk-ZNLHLFQM.js → chunk-DXOLWAOY.js} +30 -2
  15. package/dist/chunk-DXOLWAOY.js.map +1 -0
  16. package/dist/{chunk-PYLWZZC4.js → chunk-MMX5FGMI.js} +19 -2
  17. package/dist/chunk-MMX5FGMI.js.map +1 -0
  18. package/dist/{chunk-HBEQEIT6.js → chunk-PRN3T6TY.js} +63 -3
  19. package/dist/chunk-PRN3T6TY.js.map +1 -0
  20. package/dist/customer.cjs +61 -1
  21. package/dist/customer.cjs.map +1 -1
  22. package/dist/customer.d.cts +48 -1
  23. package/dist/customer.d.ts +48 -1
  24. package/dist/customer.js +1 -1
  25. package/dist/index.cjs +185 -2
  26. package/dist/index.cjs.map +1 -1
  27. package/dist/index.d.cts +25 -4
  28. package/dist/index.d.ts +25 -4
  29. package/dist/index.js +26 -9
  30. package/dist/index.js.map +1 -1
  31. package/dist/payment.cjs +17 -0
  32. package/dist/payment.cjs.map +1 -1
  33. package/dist/payment.d.cts +37 -1
  34. package/dist/payment.d.ts +37 -1
  35. package/dist/payment.js +1 -1
  36. package/package.json +1 -1
  37. package/dist/chunk-HBEQEIT6.js.map +0 -1
  38. package/dist/chunk-HUEMYP2L.js.map +0 -1
  39. package/dist/chunk-PYLWZZC4.js.map +0 -1
  40. package/dist/chunk-ZNLHLFQM.js.map +0 -1
package/dist/index.d.cts CHANGED
@@ -1,17 +1,17 @@
1
1
  import { C as ClientContext, b as AuthContext, P as PaginatedItems, T as TokenProvider, n as ResolvedConfig, E as EmporixConfig, j as LogLevel, o as ServiceName, e as CustomerTokenRefresher } from './context-CfXJcYKP.cjs';
2
2
  export { A as AnonymousSession, a as AnonymousSessionStore, c as AuthKind, d as CustomerRefreshRegistry, D as DEFAULT_HOST, f as DefaultTokenProvider, H as HttpClient, g as HttpClientOptions, L as LEVEL, h as LevelResolver, i as LogFields, k as Logger, l as LoggerConfig, m as LoggerObjectConfig, R as RequestOptions, S as ServiceCredentials, p as StorefrontCredentials, q as auth, r as createConsoleLogger, s as createNoopLogger, t as iterateAll, u as redact, v as resolveToken, w as validateConfig } from './context-CfXJcYKP.cjs';
3
3
  import { CustomerService } from './customer.cjs';
4
- export { Address, AddressCreateInput, AddressUpdateInput, Customer, CustomerSession, CustomerSignupInput, CustomerUpdateInput, PasswordChangeInput, PasswordResetConfirmInput, PasswordResetRequestInput } from './customer.cjs';
4
+ export { Address, AddressCreateInput, AddressUpdateInput, ChangeEmailInput, ConfirmEmailChangeInput, Customer, CustomerSession, CustomerSignupInput, CustomerUpdateInput, PasswordChangeInput, PasswordResetConfirmInput, PasswordResetRequestInput, ResendActivationInput } from './customer.cjs';
5
5
  import { ProductService } from './product.cjs';
6
6
  export { Media, Product } from './product.cjs';
7
7
  import { CategoryService } from './category.cjs';
8
8
  export { Category, CategoryNode } from './category.cjs';
9
9
  import { CartService } from './cart.cjs';
10
- export { Cart, CartAddress, CartCreated, CartItemInput, CartItemUpdate, CreateCartInput } from './cart.cjs';
10
+ export { Cart, CartAddress, CartCreated, CartItem, CartItemInput, CartItemUpdate, CartItemsBatchUpdateInput, CartItemsBatchUpdateResult, CartValidationResult, CreateCartInput } from './cart.cjs';
11
11
  import { CheckoutService } from './checkout.cjs';
12
12
  export { CheckoutInput, CheckoutOptions, CheckoutResult, QuoteCheckoutInput } from './checkout.cjs';
13
13
  import { PaymentGatewayService } from './payment.cjs';
14
- export { AuthorizePaymentInput, AuthorizePaymentResult, PaymentMode } from './payment.cjs';
14
+ export { AuthorizePaymentInput, AuthorizePaymentResult, InitializePaymentInput, InitializePaymentResult, PaymentMode } from './payment.cjs';
15
15
  import { PriceService } from './price.cjs';
16
16
  export { MatchByContextChunkedOptions, PriceMatch, PriceMatchByContextInput, PriceMatchInput, PriceMatchItemRef } from './price.cjs';
17
17
  import { MediaService } from './media.cjs';
@@ -269,6 +269,21 @@ declare class SiteService {
269
269
  current(authCtx?: AuthContext): Promise<Site$1>;
270
270
  }
271
271
 
272
+ /**
273
+ * Context attribute
274
+ */
275
+ type ContextAttribute = {
276
+ /**
277
+ * Additional context information key
278
+ */
279
+ key: string;
280
+ /**
281
+ * Additional context information value
282
+ */
283
+ value: {
284
+ [key: string]: unknown;
285
+ } | string;
286
+ };
272
287
  type SessionContextGet = SessionContextBase & {
273
288
  context?: Context;
274
289
  } & {
@@ -360,6 +375,8 @@ type Context = {
360
375
  };
361
376
  };
362
377
 
378
+ /** A single session-context attribute (generated). */
379
+ type SessionAttributeInput = ContextAttribute;
363
380
  /**
364
381
  * The current session context (`GET /me/context`). Mirrors the generated
365
382
  * `SessionContextGet` but re-tightens `sessionId` to required — a returned
@@ -401,6 +418,10 @@ declare class SessionContextService {
401
418
  * update). Non-404 errors propagate.
402
419
  */
403
420
  patch(input: SessionContextPatch, authCtx?: AuthContext): Promise<boolean>;
421
+ /** Adds an attribute to the current session context. Default auth: anonymous. */
422
+ addAttribute(attribute: SessionAttributeInput, authCtx?: AuthContext): Promise<void>;
423
+ /** Removes a named attribute from the current session context. Default auth: anonymous. */
424
+ removeAttribute(name: string, authCtx?: AuthContext): Promise<void>;
404
425
  }
405
426
 
406
427
  type BaseConfiguration = {
@@ -9683,4 +9704,4 @@ declare function createEmporixClient<S extends Record<string, ServiceClass<unkno
9683
9704
  */
9684
9705
  declare function productIdFromYrn(yrn: string | undefined): string;
9685
9706
 
9686
- export { type AddedPoints, type AdminCustomer, type AdminCustomerAddress, type AdminCustomerAddressInput, type AdminCustomerAddressList, type AdminCustomerAddressUpdate, type AdminCustomerCreated, type AdminCustomerInput, type AdminCustomerList, type AdminCustomerPatch, type AdminCustomerSearchQuery, type AdminCustomerUpdate, type Agent, type AgentAnalytics, type AgentExecutions, type AgentFromTemplate, type AgentInput, type AgentPatchOp, type AgentRequestLog, type AgentSearchQuery, type AgentSessionLog, type AgentTemplate, type AgenticPatchOp, type AgentsExport, type AgentsExportRequest, type AgentsImport, type AgentsImportRequest, AiService, type AnalyticsQuery, type Approval, type ApprovalCreated, type ApprovalInput, type ApprovalList, type ApprovalPatch, type ApprovalPermittedInput, type ApprovalPermittedResult, ApprovalService, type ApprovalUsersQuery, type ApprovalUsersResult, type Assignee, type Attachment, type AttachmentOptions, AuthContext, AvailabilityService, type BatchNextIdEntry, type Brand, type BrandInput, type BrandList, BrandService, type BrandUpdate, type BulkInstanceResult, type BulkPatchInstanceItem, CartService, type Catalog, type CatalogCreated, type CatalogInput, type CatalogList, type CatalogPatch, CatalogService, type CatalogUpdate, CategoryService, type CgRelation, type CgRelationList, type ChatRequest, type ChatResponse, type ChatStreamOptions, CheckoutService, ClientConfigService, type ClientConfiguration, ClientContext, CloudFunctionsService, type CommerceEvents, CompaniesService, type CompletionMessage, type CompletionRequest, type CompletionResponse, type Configuration$1 as Configuration, type ConfigurationDraft, ContactsService, type Conversation, type ConversationSearchQuery, type ConversionFactorInput, type ConversionFactorResult, type ConvertUnitInput, type ConvertUnitResult, type Country, type CountryList, CountryService, type CountryUpdate, type Coupon$1 as Coupon, type CouponCreated, type CouponInput, type CouponList, CouponService, type CouponUpdate, type Created, type Currency, type CurrencyCreated, type CurrencyInput, type CurrencyList, CurrencyService, type CurrencyUpdate, type CustomEntity, type CustomEntityDraft, type CustomInstance, type CustomInstanceDraft, CustomerAdminService, CustomerGroupsService, CustomerService, type CustomerSummaryBatch, CustomerTokenRefresher, type DeleteAgentOptions, type DeleteConfigOptions, type DeliveryCreated, type DeliveryCycleInput, type DeliverySlot, type DeliverySlotList, type DeliveryTime$1 as DeliveryTime, type DeliveryTimeInput, type DeliveryTimeList, type DeliveryTimeUpdate, type DeliveryWindow$2 as DeliveryWindow, type DeliveryWindowList, type DeliveryWindowValidation, EmporixAuthError, EmporixClient, EmporixConfig, type EmporixCore, EmporixError, EmporixForbiddenError, EmporixInsufficientScopeError, EmporixNetworkError, EmporixNotFoundError, EmporixServerError, EmporixTimeoutError, EmporixValidationError, type ExchangeRate, type ExchangeRateCreated, type ExchangeRateInput, type ExchangeRateList, type ExchangeRateUpdate, type ExecutionsQuery, type Fee$1 as Fee, type FeeDraft, FeeService, type FindSiteInput, type GetOptions, type IndexConfig, type IndexConfigCreated, type IndexPublicConfig, IndexingService, type InstanceSearchBody, type InvoiceJob, type InvoiceJobCreated, type InvoiceJobDraft, InvoiceService, type InvokeCloudFunctionOptions, type ItemFee, type ItemFeeDraft, type ItemFeeSearch, type Job, type JobIdResponse, type Label, type LabelInput, type LabelList, LabelService, type LabelUpdate, type ListConfigOptions, type ListCustomEntitiesOptions, type ListFeesQuery, type ListInstancesQuery, type ListQuery, type ListQuoteReasonsQuery, type ListQuotesQuery, type ListReindexJobsOptions, type ListSchemasQuery, LocationsService, LogLevel, type McpServer, type McpServerInput, MediaService, type MetadataFilter, type MinimumFee, type MutateOptions, type NewPointsEntry, type NextIdCommandRequest, type NextIdOptions, type NextIdResponse, type NextIdsBatchRequest, type NextIdsBatchResponse, type OAuthConfig, type OAuthInput, type OrderCycleList, type OrderEntryEventCreate, type OrderStatusChange, OrdersService, type PackagingProductsChange, type PackingEvent, type PackingEventList, PaginatedItems, PaymentGatewayService, type PickOrder, type PickOrderList, type PickPackAck, PickPackService, type PointsSummary, PriceService, ProductService, type ProviderModels, QueryFor, type Quote, type QuoteCreated, type QuoteDraft, type QuoteHistory, type QuoteInput, type QuoteReason, type QuoteReasonCreated, type QuoteReasonDraft, type QuoteReasonUpdate, type QuoteResult, QuoteService, type QuoteSlotInput, type QuoteUpdate, RagIndexerService, type RagType, type RecalculationJob, type RecalculationJobCreated, type RecalculationJobInput, type RedeemCouponResult, type RedeemMyPointsInput, type RedeemOption, type RedeemOptionList, type RedeemedPoints, type Redemption, type RedemptionCreated, type RedemptionInput, type ReferralCoupon, type Region, type RegionList, type ReindexEntityType, type ReindexInput, type ReindexJob, type ReindexJobInput, type ReindexJobStatus, ResolvedConfig, type ResourceCreated, type Return, type ReturnCreated, type ReturnInput, type ReturnList, type ReturnPatch, type ReturnUpdate, ReturnsService, RewardPointsService, SalesOrdersService, type Schema, type SchemaAttribute, type SchemaDraft, SchemaService, type SchemaTypeName, type SchemaUpdate, type SearchQuery, SegmentService, SepaExportService, type SepaJob, type SepaJobCreated, type SepaJobInput, type SequenceSchema, type SequenceSchemaCreate, SequentialIdService, type ServiceClass, ServiceName, type SessionContext, type SessionContextPatch, SessionContextService, type SetItemFeesOptions, type ShippingGroup, type ShippingGroupList, type ShippingMethod, type ShippingMethodList, type ShippingPatch, ShippingService, type ShoppingList, type ShoppingListDraft, type ShoppingListItem, ShoppingListService, type Site$1 as Site, type SiteList, SiteService, type TaxCalculationInput, type TaxCalculationRequest, type TaxCalculationResult, type TaxClass, type TaxConfig, type TaxConfigCreated, type TaxCreation as TaxConfigInput, type TaxUpdate as TaxConfigUpdate, type TaxLocation, TaxService, TenantConfigService, type TextRequest, type TextResponse, type Token, type TokenInput, TokenProvider, type Tool, type ToolInput, type Unit, type UnitCreated, UnitHandlingService, type UnitInput, type UnitUpdate, type Vendor, type VendorCreated, type VendorInput, type VendorList, type VendorLocation, type VendorLocationInput, type VendorLocationList, type VendorLocationUpdate, type VendorSearchQuery, VendorService, type VendorUpdate, type WebhookConfig, type WebhookConfigCreated, type WebhookConfigDraft, type WebhookConfigPatch, type WebhookDashboardAccess, WebhookService, type WebhookStatistics, type WebhookStatisticsQuery, type WebhookSubscription, type WebhookSubscriptionUpdateItem, type WebhookSubscriptionUpdateResultItem, type Zone, type ZoneList, createCore, createEmporixClient, errorFromResponse, productIdFromYrn };
9707
+ export { type AddedPoints, type AdminCustomer, type AdminCustomerAddress, type AdminCustomerAddressInput, type AdminCustomerAddressList, type AdminCustomerAddressUpdate, type AdminCustomerCreated, type AdminCustomerInput, type AdminCustomerList, type AdminCustomerPatch, type AdminCustomerSearchQuery, type AdminCustomerUpdate, type Agent, type AgentAnalytics, type AgentExecutions, type AgentFromTemplate, type AgentInput, type AgentPatchOp, type AgentRequestLog, type AgentSearchQuery, type AgentSessionLog, type AgentTemplate, type AgenticPatchOp, type AgentsExport, type AgentsExportRequest, type AgentsImport, type AgentsImportRequest, AiService, type AnalyticsQuery, type Approval, type ApprovalCreated, type ApprovalInput, type ApprovalList, type ApprovalPatch, type ApprovalPermittedInput, type ApprovalPermittedResult, ApprovalService, type ApprovalUsersQuery, type ApprovalUsersResult, type Assignee, type Attachment, type AttachmentOptions, AuthContext, AvailabilityService, type BatchNextIdEntry, type Brand, type BrandInput, type BrandList, BrandService, type BrandUpdate, type BulkInstanceResult, type BulkPatchInstanceItem, CartService, type Catalog, type CatalogCreated, type CatalogInput, type CatalogList, type CatalogPatch, CatalogService, type CatalogUpdate, CategoryService, type CgRelation, type CgRelationList, type ChatRequest, type ChatResponse, type ChatStreamOptions, CheckoutService, ClientConfigService, type ClientConfiguration, ClientContext, CloudFunctionsService, type CommerceEvents, CompaniesService, type CompletionMessage, type CompletionRequest, type CompletionResponse, type Configuration$1 as Configuration, type ConfigurationDraft, ContactsService, type Conversation, type ConversationSearchQuery, type ConversionFactorInput, type ConversionFactorResult, type ConvertUnitInput, type ConvertUnitResult, type Country, type CountryList, CountryService, type CountryUpdate, type Coupon$1 as Coupon, type CouponCreated, type CouponInput, type CouponList, CouponService, type CouponUpdate, type Created, type Currency, type CurrencyCreated, type CurrencyInput, type CurrencyList, CurrencyService, type CurrencyUpdate, type CustomEntity, type CustomEntityDraft, type CustomInstance, type CustomInstanceDraft, CustomerAdminService, CustomerGroupsService, CustomerService, type CustomerSummaryBatch, CustomerTokenRefresher, type DeleteAgentOptions, type DeleteConfigOptions, type DeliveryCreated, type DeliveryCycleInput, type DeliverySlot, type DeliverySlotList, type DeliveryTime$1 as DeliveryTime, type DeliveryTimeInput, type DeliveryTimeList, type DeliveryTimeUpdate, type DeliveryWindow$2 as DeliveryWindow, type DeliveryWindowList, type DeliveryWindowValidation, EmporixAuthError, EmporixClient, EmporixConfig, type EmporixCore, EmporixError, EmporixForbiddenError, EmporixInsufficientScopeError, EmporixNetworkError, EmporixNotFoundError, EmporixServerError, EmporixTimeoutError, EmporixValidationError, type ExchangeRate, type ExchangeRateCreated, type ExchangeRateInput, type ExchangeRateList, type ExchangeRateUpdate, type ExecutionsQuery, type Fee$1 as Fee, type FeeDraft, FeeService, type FindSiteInput, type GetOptions, type IndexConfig, type IndexConfigCreated, type IndexPublicConfig, IndexingService, type InstanceSearchBody, type InvoiceJob, type InvoiceJobCreated, type InvoiceJobDraft, InvoiceService, type InvokeCloudFunctionOptions, type ItemFee, type ItemFeeDraft, type ItemFeeSearch, type Job, type JobIdResponse, type Label, type LabelInput, type LabelList, LabelService, type LabelUpdate, type ListConfigOptions, type ListCustomEntitiesOptions, type ListFeesQuery, type ListInstancesQuery, type ListQuery, type ListQuoteReasonsQuery, type ListQuotesQuery, type ListReindexJobsOptions, type ListSchemasQuery, LocationsService, LogLevel, type McpServer, type McpServerInput, MediaService, type MetadataFilter, type MinimumFee, type MutateOptions, type NewPointsEntry, type NextIdCommandRequest, type NextIdOptions, type NextIdResponse, type NextIdsBatchRequest, type NextIdsBatchResponse, type OAuthConfig, type OAuthInput, type OrderCycleList, type OrderEntryEventCreate, type OrderStatusChange, OrdersService, type PackagingProductsChange, type PackingEvent, type PackingEventList, PaginatedItems, PaymentGatewayService, type PickOrder, type PickOrderList, type PickPackAck, PickPackService, type PointsSummary, PriceService, ProductService, type ProviderModels, QueryFor, type Quote, type QuoteCreated, type QuoteDraft, type QuoteHistory, type QuoteInput, type QuoteReason, type QuoteReasonCreated, type QuoteReasonDraft, type QuoteReasonUpdate, type QuoteResult, QuoteService, type QuoteSlotInput, type QuoteUpdate, RagIndexerService, type RagType, type RecalculationJob, type RecalculationJobCreated, type RecalculationJobInput, type RedeemCouponResult, type RedeemMyPointsInput, type RedeemOption, type RedeemOptionList, type RedeemedPoints, type Redemption, type RedemptionCreated, type RedemptionInput, type ReferralCoupon, type Region, type RegionList, type ReindexEntityType, type ReindexInput, type ReindexJob, type ReindexJobInput, type ReindexJobStatus, ResolvedConfig, type ResourceCreated, type Return, type ReturnCreated, type ReturnInput, type ReturnList, type ReturnPatch, type ReturnUpdate, ReturnsService, RewardPointsService, SalesOrdersService, type Schema, type SchemaAttribute, type SchemaDraft, SchemaService, type SchemaTypeName, type SchemaUpdate, type SearchQuery, SegmentService, SepaExportService, type SepaJob, type SepaJobCreated, type SepaJobInput, type SequenceSchema, type SequenceSchemaCreate, SequentialIdService, type ServiceClass, ServiceName, type SessionAttributeInput, type SessionContext, type SessionContextPatch, SessionContextService, type SetItemFeesOptions, type ShippingGroup, type ShippingGroupList, type ShippingMethod, type ShippingMethodList, type ShippingPatch, ShippingService, type ShoppingList, type ShoppingListDraft, type ShoppingListItem, ShoppingListService, type Site$1 as Site, type SiteList, SiteService, type TaxCalculationInput, type TaxCalculationRequest, type TaxCalculationResult, type TaxClass, type TaxConfig, type TaxConfigCreated, type TaxCreation as TaxConfigInput, type TaxUpdate as TaxConfigUpdate, type TaxLocation, TaxService, TenantConfigService, type TextRequest, type TextResponse, type Token, type TokenInput, TokenProvider, type Tool, type ToolInput, type Unit, type UnitCreated, UnitHandlingService, type UnitInput, type UnitUpdate, type Vendor, type VendorCreated, type VendorInput, type VendorList, type VendorLocation, type VendorLocationInput, type VendorLocationList, type VendorLocationUpdate, type VendorSearchQuery, VendorService, type VendorUpdate, type WebhookConfig, type WebhookConfigCreated, type WebhookConfigDraft, type WebhookConfigPatch, type WebhookDashboardAccess, WebhookService, type WebhookStatistics, type WebhookStatisticsQuery, type WebhookSubscription, type WebhookSubscriptionUpdateItem, type WebhookSubscriptionUpdateResultItem, type Zone, type ZoneList, createCore, createEmporixClient, errorFromResponse, productIdFromYrn };
package/dist/index.d.ts CHANGED
@@ -1,17 +1,17 @@
1
1
  import { C as ClientContext, b as AuthContext, P as PaginatedItems, T as TokenProvider, n as ResolvedConfig, E as EmporixConfig, j as LogLevel, o as ServiceName, e as CustomerTokenRefresher } from './context-CfXJcYKP.js';
2
2
  export { A as AnonymousSession, a as AnonymousSessionStore, c as AuthKind, d as CustomerRefreshRegistry, D as DEFAULT_HOST, f as DefaultTokenProvider, H as HttpClient, g as HttpClientOptions, L as LEVEL, h as LevelResolver, i as LogFields, k as Logger, l as LoggerConfig, m as LoggerObjectConfig, R as RequestOptions, S as ServiceCredentials, p as StorefrontCredentials, q as auth, r as createConsoleLogger, s as createNoopLogger, t as iterateAll, u as redact, v as resolveToken, w as validateConfig } from './context-CfXJcYKP.js';
3
3
  import { CustomerService } from './customer.js';
4
- export { Address, AddressCreateInput, AddressUpdateInput, Customer, CustomerSession, CustomerSignupInput, CustomerUpdateInput, PasswordChangeInput, PasswordResetConfirmInput, PasswordResetRequestInput } from './customer.js';
4
+ export { Address, AddressCreateInput, AddressUpdateInput, ChangeEmailInput, ConfirmEmailChangeInput, Customer, CustomerSession, CustomerSignupInput, CustomerUpdateInput, PasswordChangeInput, PasswordResetConfirmInput, PasswordResetRequestInput, ResendActivationInput } from './customer.js';
5
5
  import { ProductService } from './product.js';
6
6
  export { Media, Product } from './product.js';
7
7
  import { CategoryService } from './category.js';
8
8
  export { Category, CategoryNode } from './category.js';
9
9
  import { CartService } from './cart.js';
10
- export { Cart, CartAddress, CartCreated, CartItemInput, CartItemUpdate, CreateCartInput } from './cart.js';
10
+ export { Cart, CartAddress, CartCreated, CartItem, CartItemInput, CartItemUpdate, CartItemsBatchUpdateInput, CartItemsBatchUpdateResult, CartValidationResult, CreateCartInput } from './cart.js';
11
11
  import { CheckoutService } from './checkout.js';
12
12
  export { CheckoutInput, CheckoutOptions, CheckoutResult, QuoteCheckoutInput } from './checkout.js';
13
13
  import { PaymentGatewayService } from './payment.js';
14
- export { AuthorizePaymentInput, AuthorizePaymentResult, PaymentMode } from './payment.js';
14
+ export { AuthorizePaymentInput, AuthorizePaymentResult, InitializePaymentInput, InitializePaymentResult, PaymentMode } from './payment.js';
15
15
  import { PriceService } from './price.js';
16
16
  export { MatchByContextChunkedOptions, PriceMatch, PriceMatchByContextInput, PriceMatchInput, PriceMatchItemRef } from './price.js';
17
17
  import { MediaService } from './media.js';
@@ -269,6 +269,21 @@ declare class SiteService {
269
269
  current(authCtx?: AuthContext): Promise<Site$1>;
270
270
  }
271
271
 
272
+ /**
273
+ * Context attribute
274
+ */
275
+ type ContextAttribute = {
276
+ /**
277
+ * Additional context information key
278
+ */
279
+ key: string;
280
+ /**
281
+ * Additional context information value
282
+ */
283
+ value: {
284
+ [key: string]: unknown;
285
+ } | string;
286
+ };
272
287
  type SessionContextGet = SessionContextBase & {
273
288
  context?: Context;
274
289
  } & {
@@ -360,6 +375,8 @@ type Context = {
360
375
  };
361
376
  };
362
377
 
378
+ /** A single session-context attribute (generated). */
379
+ type SessionAttributeInput = ContextAttribute;
363
380
  /**
364
381
  * The current session context (`GET /me/context`). Mirrors the generated
365
382
  * `SessionContextGet` but re-tightens `sessionId` to required — a returned
@@ -401,6 +418,10 @@ declare class SessionContextService {
401
418
  * update). Non-404 errors propagate.
402
419
  */
403
420
  patch(input: SessionContextPatch, authCtx?: AuthContext): Promise<boolean>;
421
+ /** Adds an attribute to the current session context. Default auth: anonymous. */
422
+ addAttribute(attribute: SessionAttributeInput, authCtx?: AuthContext): Promise<void>;
423
+ /** Removes a named attribute from the current session context. Default auth: anonymous. */
424
+ removeAttribute(name: string, authCtx?: AuthContext): Promise<void>;
404
425
  }
405
426
 
406
427
  type BaseConfiguration = {
@@ -9683,4 +9704,4 @@ declare function createEmporixClient<S extends Record<string, ServiceClass<unkno
9683
9704
  */
9684
9705
  declare function productIdFromYrn(yrn: string | undefined): string;
9685
9706
 
9686
- export { type AddedPoints, type AdminCustomer, type AdminCustomerAddress, type AdminCustomerAddressInput, type AdminCustomerAddressList, type AdminCustomerAddressUpdate, type AdminCustomerCreated, type AdminCustomerInput, type AdminCustomerList, type AdminCustomerPatch, type AdminCustomerSearchQuery, type AdminCustomerUpdate, type Agent, type AgentAnalytics, type AgentExecutions, type AgentFromTemplate, type AgentInput, type AgentPatchOp, type AgentRequestLog, type AgentSearchQuery, type AgentSessionLog, type AgentTemplate, type AgenticPatchOp, type AgentsExport, type AgentsExportRequest, type AgentsImport, type AgentsImportRequest, AiService, type AnalyticsQuery, type Approval, type ApprovalCreated, type ApprovalInput, type ApprovalList, type ApprovalPatch, type ApprovalPermittedInput, type ApprovalPermittedResult, ApprovalService, type ApprovalUsersQuery, type ApprovalUsersResult, type Assignee, type Attachment, type AttachmentOptions, AuthContext, AvailabilityService, type BatchNextIdEntry, type Brand, type BrandInput, type BrandList, BrandService, type BrandUpdate, type BulkInstanceResult, type BulkPatchInstanceItem, CartService, type Catalog, type CatalogCreated, type CatalogInput, type CatalogList, type CatalogPatch, CatalogService, type CatalogUpdate, CategoryService, type CgRelation, type CgRelationList, type ChatRequest, type ChatResponse, type ChatStreamOptions, CheckoutService, ClientConfigService, type ClientConfiguration, ClientContext, CloudFunctionsService, type CommerceEvents, CompaniesService, type CompletionMessage, type CompletionRequest, type CompletionResponse, type Configuration$1 as Configuration, type ConfigurationDraft, ContactsService, type Conversation, type ConversationSearchQuery, type ConversionFactorInput, type ConversionFactorResult, type ConvertUnitInput, type ConvertUnitResult, type Country, type CountryList, CountryService, type CountryUpdate, type Coupon$1 as Coupon, type CouponCreated, type CouponInput, type CouponList, CouponService, type CouponUpdate, type Created, type Currency, type CurrencyCreated, type CurrencyInput, type CurrencyList, CurrencyService, type CurrencyUpdate, type CustomEntity, type CustomEntityDraft, type CustomInstance, type CustomInstanceDraft, CustomerAdminService, CustomerGroupsService, CustomerService, type CustomerSummaryBatch, CustomerTokenRefresher, type DeleteAgentOptions, type DeleteConfigOptions, type DeliveryCreated, type DeliveryCycleInput, type DeliverySlot, type DeliverySlotList, type DeliveryTime$1 as DeliveryTime, type DeliveryTimeInput, type DeliveryTimeList, type DeliveryTimeUpdate, type DeliveryWindow$2 as DeliveryWindow, type DeliveryWindowList, type DeliveryWindowValidation, EmporixAuthError, EmporixClient, EmporixConfig, type EmporixCore, EmporixError, EmporixForbiddenError, EmporixInsufficientScopeError, EmporixNetworkError, EmporixNotFoundError, EmporixServerError, EmporixTimeoutError, EmporixValidationError, type ExchangeRate, type ExchangeRateCreated, type ExchangeRateInput, type ExchangeRateList, type ExchangeRateUpdate, type ExecutionsQuery, type Fee$1 as Fee, type FeeDraft, FeeService, type FindSiteInput, type GetOptions, type IndexConfig, type IndexConfigCreated, type IndexPublicConfig, IndexingService, type InstanceSearchBody, type InvoiceJob, type InvoiceJobCreated, type InvoiceJobDraft, InvoiceService, type InvokeCloudFunctionOptions, type ItemFee, type ItemFeeDraft, type ItemFeeSearch, type Job, type JobIdResponse, type Label, type LabelInput, type LabelList, LabelService, type LabelUpdate, type ListConfigOptions, type ListCustomEntitiesOptions, type ListFeesQuery, type ListInstancesQuery, type ListQuery, type ListQuoteReasonsQuery, type ListQuotesQuery, type ListReindexJobsOptions, type ListSchemasQuery, LocationsService, LogLevel, type McpServer, type McpServerInput, MediaService, type MetadataFilter, type MinimumFee, type MutateOptions, type NewPointsEntry, type NextIdCommandRequest, type NextIdOptions, type NextIdResponse, type NextIdsBatchRequest, type NextIdsBatchResponse, type OAuthConfig, type OAuthInput, type OrderCycleList, type OrderEntryEventCreate, type OrderStatusChange, OrdersService, type PackagingProductsChange, type PackingEvent, type PackingEventList, PaginatedItems, PaymentGatewayService, type PickOrder, type PickOrderList, type PickPackAck, PickPackService, type PointsSummary, PriceService, ProductService, type ProviderModels, QueryFor, type Quote, type QuoteCreated, type QuoteDraft, type QuoteHistory, type QuoteInput, type QuoteReason, type QuoteReasonCreated, type QuoteReasonDraft, type QuoteReasonUpdate, type QuoteResult, QuoteService, type QuoteSlotInput, type QuoteUpdate, RagIndexerService, type RagType, type RecalculationJob, type RecalculationJobCreated, type RecalculationJobInput, type RedeemCouponResult, type RedeemMyPointsInput, type RedeemOption, type RedeemOptionList, type RedeemedPoints, type Redemption, type RedemptionCreated, type RedemptionInput, type ReferralCoupon, type Region, type RegionList, type ReindexEntityType, type ReindexInput, type ReindexJob, type ReindexJobInput, type ReindexJobStatus, ResolvedConfig, type ResourceCreated, type Return, type ReturnCreated, type ReturnInput, type ReturnList, type ReturnPatch, type ReturnUpdate, ReturnsService, RewardPointsService, SalesOrdersService, type Schema, type SchemaAttribute, type SchemaDraft, SchemaService, type SchemaTypeName, type SchemaUpdate, type SearchQuery, SegmentService, SepaExportService, type SepaJob, type SepaJobCreated, type SepaJobInput, type SequenceSchema, type SequenceSchemaCreate, SequentialIdService, type ServiceClass, ServiceName, type SessionContext, type SessionContextPatch, SessionContextService, type SetItemFeesOptions, type ShippingGroup, type ShippingGroupList, type ShippingMethod, type ShippingMethodList, type ShippingPatch, ShippingService, type ShoppingList, type ShoppingListDraft, type ShoppingListItem, ShoppingListService, type Site$1 as Site, type SiteList, SiteService, type TaxCalculationInput, type TaxCalculationRequest, type TaxCalculationResult, type TaxClass, type TaxConfig, type TaxConfigCreated, type TaxCreation as TaxConfigInput, type TaxUpdate as TaxConfigUpdate, type TaxLocation, TaxService, TenantConfigService, type TextRequest, type TextResponse, type Token, type TokenInput, TokenProvider, type Tool, type ToolInput, type Unit, type UnitCreated, UnitHandlingService, type UnitInput, type UnitUpdate, type Vendor, type VendorCreated, type VendorInput, type VendorList, type VendorLocation, type VendorLocationInput, type VendorLocationList, type VendorLocationUpdate, type VendorSearchQuery, VendorService, type VendorUpdate, type WebhookConfig, type WebhookConfigCreated, type WebhookConfigDraft, type WebhookConfigPatch, type WebhookDashboardAccess, WebhookService, type WebhookStatistics, type WebhookStatisticsQuery, type WebhookSubscription, type WebhookSubscriptionUpdateItem, type WebhookSubscriptionUpdateResultItem, type Zone, type ZoneList, createCore, createEmporixClient, errorFromResponse, productIdFromYrn };
9707
+ export { type AddedPoints, type AdminCustomer, type AdminCustomerAddress, type AdminCustomerAddressInput, type AdminCustomerAddressList, type AdminCustomerAddressUpdate, type AdminCustomerCreated, type AdminCustomerInput, type AdminCustomerList, type AdminCustomerPatch, type AdminCustomerSearchQuery, type AdminCustomerUpdate, type Agent, type AgentAnalytics, type AgentExecutions, type AgentFromTemplate, type AgentInput, type AgentPatchOp, type AgentRequestLog, type AgentSearchQuery, type AgentSessionLog, type AgentTemplate, type AgenticPatchOp, type AgentsExport, type AgentsExportRequest, type AgentsImport, type AgentsImportRequest, AiService, type AnalyticsQuery, type Approval, type ApprovalCreated, type ApprovalInput, type ApprovalList, type ApprovalPatch, type ApprovalPermittedInput, type ApprovalPermittedResult, ApprovalService, type ApprovalUsersQuery, type ApprovalUsersResult, type Assignee, type Attachment, type AttachmentOptions, AuthContext, AvailabilityService, type BatchNextIdEntry, type Brand, type BrandInput, type BrandList, BrandService, type BrandUpdate, type BulkInstanceResult, type BulkPatchInstanceItem, CartService, type Catalog, type CatalogCreated, type CatalogInput, type CatalogList, type CatalogPatch, CatalogService, type CatalogUpdate, CategoryService, type CgRelation, type CgRelationList, type ChatRequest, type ChatResponse, type ChatStreamOptions, CheckoutService, ClientConfigService, type ClientConfiguration, ClientContext, CloudFunctionsService, type CommerceEvents, CompaniesService, type CompletionMessage, type CompletionRequest, type CompletionResponse, type Configuration$1 as Configuration, type ConfigurationDraft, ContactsService, type Conversation, type ConversationSearchQuery, type ConversionFactorInput, type ConversionFactorResult, type ConvertUnitInput, type ConvertUnitResult, type Country, type CountryList, CountryService, type CountryUpdate, type Coupon$1 as Coupon, type CouponCreated, type CouponInput, type CouponList, CouponService, type CouponUpdate, type Created, type Currency, type CurrencyCreated, type CurrencyInput, type CurrencyList, CurrencyService, type CurrencyUpdate, type CustomEntity, type CustomEntityDraft, type CustomInstance, type CustomInstanceDraft, CustomerAdminService, CustomerGroupsService, CustomerService, type CustomerSummaryBatch, CustomerTokenRefresher, type DeleteAgentOptions, type DeleteConfigOptions, type DeliveryCreated, type DeliveryCycleInput, type DeliverySlot, type DeliverySlotList, type DeliveryTime$1 as DeliveryTime, type DeliveryTimeInput, type DeliveryTimeList, type DeliveryTimeUpdate, type DeliveryWindow$2 as DeliveryWindow, type DeliveryWindowList, type DeliveryWindowValidation, EmporixAuthError, EmporixClient, EmporixConfig, type EmporixCore, EmporixError, EmporixForbiddenError, EmporixInsufficientScopeError, EmporixNetworkError, EmporixNotFoundError, EmporixServerError, EmporixTimeoutError, EmporixValidationError, type ExchangeRate, type ExchangeRateCreated, type ExchangeRateInput, type ExchangeRateList, type ExchangeRateUpdate, type ExecutionsQuery, type Fee$1 as Fee, type FeeDraft, FeeService, type FindSiteInput, type GetOptions, type IndexConfig, type IndexConfigCreated, type IndexPublicConfig, IndexingService, type InstanceSearchBody, type InvoiceJob, type InvoiceJobCreated, type InvoiceJobDraft, InvoiceService, type InvokeCloudFunctionOptions, type ItemFee, type ItemFeeDraft, type ItemFeeSearch, type Job, type JobIdResponse, type Label, type LabelInput, type LabelList, LabelService, type LabelUpdate, type ListConfigOptions, type ListCustomEntitiesOptions, type ListFeesQuery, type ListInstancesQuery, type ListQuery, type ListQuoteReasonsQuery, type ListQuotesQuery, type ListReindexJobsOptions, type ListSchemasQuery, LocationsService, LogLevel, type McpServer, type McpServerInput, MediaService, type MetadataFilter, type MinimumFee, type MutateOptions, type NewPointsEntry, type NextIdCommandRequest, type NextIdOptions, type NextIdResponse, type NextIdsBatchRequest, type NextIdsBatchResponse, type OAuthConfig, type OAuthInput, type OrderCycleList, type OrderEntryEventCreate, type OrderStatusChange, OrdersService, type PackagingProductsChange, type PackingEvent, type PackingEventList, PaginatedItems, PaymentGatewayService, type PickOrder, type PickOrderList, type PickPackAck, PickPackService, type PointsSummary, PriceService, ProductService, type ProviderModels, QueryFor, type Quote, type QuoteCreated, type QuoteDraft, type QuoteHistory, type QuoteInput, type QuoteReason, type QuoteReasonCreated, type QuoteReasonDraft, type QuoteReasonUpdate, type QuoteResult, QuoteService, type QuoteSlotInput, type QuoteUpdate, RagIndexerService, type RagType, type RecalculationJob, type RecalculationJobCreated, type RecalculationJobInput, type RedeemCouponResult, type RedeemMyPointsInput, type RedeemOption, type RedeemOptionList, type RedeemedPoints, type Redemption, type RedemptionCreated, type RedemptionInput, type ReferralCoupon, type Region, type RegionList, type ReindexEntityType, type ReindexInput, type ReindexJob, type ReindexJobInput, type ReindexJobStatus, ResolvedConfig, type ResourceCreated, type Return, type ReturnCreated, type ReturnInput, type ReturnList, type ReturnPatch, type ReturnUpdate, ReturnsService, RewardPointsService, SalesOrdersService, type Schema, type SchemaAttribute, type SchemaDraft, SchemaService, type SchemaTypeName, type SchemaUpdate, type SearchQuery, SegmentService, SepaExportService, type SepaJob, type SepaJobCreated, type SepaJobInput, type SequenceSchema, type SequenceSchemaCreate, SequentialIdService, type ServiceClass, ServiceName, type SessionAttributeInput, type SessionContext, type SessionContextPatch, SessionContextService, type SetItemFeesOptions, type ShippingGroup, type ShippingGroupList, type ShippingMethod, type ShippingMethodList, type ShippingPatch, ShippingService, type ShoppingList, type ShoppingListDraft, type ShoppingListItem, ShoppingListService, type Site$1 as Site, type SiteList, SiteService, type TaxCalculationInput, type TaxCalculationRequest, type TaxCalculationResult, type TaxClass, type TaxConfig, type TaxConfigCreated, type TaxCreation as TaxConfigInput, type TaxUpdate as TaxConfigUpdate, type TaxLocation, TaxService, TenantConfigService, type TextRequest, type TextResponse, type Token, type TokenInput, TokenProvider, type Tool, type ToolInput, type Unit, type UnitCreated, UnitHandlingService, type UnitInput, type UnitUpdate, type Vendor, type VendorCreated, type VendorInput, type VendorList, type VendorLocation, type VendorLocationInput, type VendorLocationList, type VendorLocationUpdate, type VendorSearchQuery, VendorService, type VendorUpdate, type WebhookConfig, type WebhookConfigCreated, type WebhookConfigDraft, type WebhookConfigPatch, type WebhookDashboardAccess, WebhookService, type WebhookStatistics, type WebhookStatisticsQuery, type WebhookSubscription, type WebhookSubscriptionUpdateItem, type WebhookSubscriptionUpdateResultItem, type Zone, type ZoneList, createCore, createEmporixClient, errorFromResponse, productIdFromYrn };
package/dist/index.js CHANGED
@@ -4,8 +4,8 @@ import { MediaService } from './chunk-OTG2S2L4.js';
4
4
  export { MediaService } from './chunk-OTG2S2L4.js';
5
5
  import { OrdersService, SalesOrdersService } from './chunk-36T4YPQJ.js';
6
6
  export { OrdersService, SalesOrdersService } from './chunk-36T4YPQJ.js';
7
- import { auth, resolveToken, DefaultTokenProvider, CustomerRefreshRegistry, PaymentGatewayService } from './chunk-PYLWZZC4.js';
8
- export { CustomerRefreshRegistry, DefaultTokenProvider, PaymentGatewayService, auth, resolveToken } from './chunk-PYLWZZC4.js';
7
+ import { auth, resolveToken, DefaultTokenProvider, CustomerRefreshRegistry, PaymentGatewayService } from './chunk-MMX5FGMI.js';
8
+ export { CustomerRefreshRegistry, DefaultTokenProvider, PaymentGatewayService, auth, resolveToken } from './chunk-MMX5FGMI.js';
9
9
  import { PriceService } from './chunk-A3LYJUD4.js';
10
10
  export { PriceService } from './chunk-A3LYJUD4.js';
11
11
  import { ProductService } from './chunk-FZMP5NQZ.js';
@@ -14,10 +14,10 @@ import { SegmentService } from './chunk-NE7MIZPR.js';
14
14
  export { SegmentService } from './chunk-NE7MIZPR.js';
15
15
  import { AvailabilityService } from './chunk-IVCCGJN5.js';
16
16
  export { AvailabilityService } from './chunk-IVCCGJN5.js';
17
- import { CartService } from './chunk-HUEMYP2L.js';
18
- export { CartService } from './chunk-HUEMYP2L.js';
19
- import { CategoryService } from './chunk-ZNLHLFQM.js';
20
- export { CategoryService } from './chunk-ZNLHLFQM.js';
17
+ import { CartService } from './chunk-5DWCYDQD.js';
18
+ export { CartService } from './chunk-5DWCYDQD.js';
19
+ import { CategoryService } from './chunk-DXOLWAOY.js';
20
+ export { CategoryService } from './chunk-DXOLWAOY.js';
21
21
  export { iterateAll } from './chunk-GWJ2U2CP.js';
22
22
  import { resolveQuery } from './chunk-S5HEIQDK.js';
23
23
  export { resolveQuery } from './chunk-S5HEIQDK.js';
@@ -29,8 +29,8 @@ import { ContactsService } from './chunk-HD5RBCM6.js';
29
29
  export { ContactsService } from './chunk-HD5RBCM6.js';
30
30
  import { CustomerGroupsService } from './chunk-3BTPX7IJ.js';
31
31
  export { CustomerGroupsService } from './chunk-3BTPX7IJ.js';
32
- import { CustomerService } from './chunk-HBEQEIT6.js';
33
- export { CustomerService } from './chunk-HBEQEIT6.js';
32
+ import { CustomerService } from './chunk-PRN3T6TY.js';
33
+ export { CustomerService } from './chunk-PRN3T6TY.js';
34
34
  import './chunk-3BDDYX3V.js';
35
35
  import { EmporixTimeoutError, EmporixNetworkError, errorFromResponse, EmporixNotFoundError, EmporixError } from './chunk-UWGGF4MC.js';
36
36
  export { EmporixAuthError, EmporixError, EmporixForbiddenError, EmporixInsufficientScopeError, EmporixNetworkError, EmporixNotFoundError, EmporixServerError, EmporixTimeoutError, EmporixValidationError, errorFromResponse } from './chunk-UWGGF4MC.js';
@@ -591,7 +591,7 @@ var HttpClient = class {
591
591
  };
592
592
 
593
593
  // package.json
594
- var version = "2.21.0";
594
+ var version = "2.22.0";
595
595
 
596
596
  // src/version.ts
597
597
  var SDK_VERSION = version;
@@ -754,6 +754,23 @@ var SessionContextService = class {
754
754
  });
755
755
  return true;
756
756
  }
757
+ /** Adds an attribute to the current session context. Default auth: anonymous. */
758
+ async addAttribute(attribute, authCtx = ANON2) {
759
+ await this.ctx.http.request({
760
+ method: "POST",
761
+ path: `/session-context/${this.ctx.tenant}/me/context/attributes`,
762
+ body: attribute,
763
+ auth: authCtx
764
+ });
765
+ }
766
+ /** Removes a named attribute from the current session context. Default auth: anonymous. */
767
+ async removeAttribute(name, authCtx = ANON2) {
768
+ await this.ctx.http.request({
769
+ method: "DELETE",
770
+ path: `/session-context/${this.ctx.tenant}/me/context/attributes/${encodeURIComponent(name)}`,
771
+ auth: authCtx
772
+ });
773
+ }
757
774
  };
758
775
  function isNotFound(err) {
759
776
  if (err && typeof err === "object") {