@viu/emporix-sdk 2.3.0 → 2.4.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.
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { C as ClientContext, b as AuthContext, P as PaginatedItems, T as TokenProvider, l as ResolvedConfig, E as EmporixConfig, h as LogLevel, m as ServiceName } from './context-CQFcPZnt.js';
2
- export { A as AnonymousSession, a as AnonymousSessionStore, c as AuthKind, D as DEFAULT_HOST, d as DefaultTokenProvider, H as HttpClient, e as HttpClientOptions, L as LEVEL, f as LevelResolver, g as LogFields, i as Logger, j as LoggerConfig, k as LoggerObjectConfig, R as RequestOptions, S as ServiceCredentials, n as StorefrontCredentials, o as auth, p as createConsoleLogger, q as createNoopLogger, r as iterateAll, s as redact, t as resolveToken, v as validateConfig } from './context-CQFcPZnt.js';
1
+ import { C as ClientContext, b as AuthContext, P as PaginatedItems, T as TokenProvider, l as ResolvedConfig, E as EmporixConfig, h as LogLevel, m as ServiceName } from './context-hksRbb95.js';
2
+ export { A as AnonymousSession, a as AnonymousSessionStore, c as AuthKind, D as DEFAULT_HOST, d as DefaultTokenProvider, H as HttpClient, e as HttpClientOptions, L as LEVEL, f as LevelResolver, g as LogFields, i as Logger, j as LoggerConfig, k as LoggerObjectConfig, R as RequestOptions, S as ServiceCredentials, n as StorefrontCredentials, o as auth, p as createConsoleLogger, q as createNoopLogger, r as iterateAll, s as redact, t as resolveToken, v as validateConfig } from './context-hksRbb95.js';
3
3
  import { CustomerService } from './customer.js';
4
4
  export { Address, AddressCreateInput, AddressUpdateInput, Customer, CustomerSession, CustomerSignupInput, CustomerUpdateInput, PasswordChangeInput, PasswordResetConfirmInput, PasswordResetRequestInput } from './customer.js';
5
5
  import { ProductService } from './product.js';
@@ -67,7 +67,7 @@ declare function errorFromResponse(status: number, message: string, body: unknow
67
67
  * One site as returned by the Site Settings Service. Mirrors the public
68
68
  * SiteDto schema with the fields a storefront actually consumes.
69
69
  */
70
- interface Site {
70
+ interface Site$1 {
71
71
  code: string;
72
72
  name: string;
73
73
  active: boolean;
@@ -102,14 +102,14 @@ declare class SiteService {
102
102
  private readonly ctx;
103
103
  constructor(ctx: ClientContext);
104
104
  /** Lists active sites. */
105
- list(authCtx?: AuthContext): Promise<Site[]>;
105
+ list(authCtx?: AuthContext): Promise<Site$1[]>;
106
106
  /** Retrieves one site by code. */
107
- get(code: string, authCtx?: AuthContext): Promise<Site>;
107
+ get(code: string, authCtx?: AuthContext): Promise<Site$1>;
108
108
  /**
109
109
  * Returns the tenant's default site (the one with `default: true`).
110
110
  * Throws if no default is configured — a tenant should always have one.
111
111
  */
112
- current(authCtx?: AuthContext): Promise<Site>;
112
+ current(authCtx?: AuthContext): Promise<Site$1>;
113
113
  }
114
114
 
115
115
  /**
@@ -601,7 +601,7 @@ declare class SequentialIdService {
601
601
  type Localized$1 = string | {
602
602
  [key: string]: string;
603
603
  };
604
- type Fee$1 = {
604
+ type Fee$2 = {
605
605
  /**
606
606
  * Unique identifier of the fee.
607
607
  */
@@ -620,7 +620,7 @@ type Fee$1 = {
620
620
  * The fee rate in percentage. Required if feeType is 'PERCENT'.
621
621
  */
622
622
  feePercentage?: number;
623
- feeAbsolute?: MonetaryAmount;
623
+ feeAbsolute?: MonetaryAmount$1;
624
624
  /**
625
625
  * The itemtype the fee can belong to. It could be a product or
626
626
  * paymenttype.
@@ -648,7 +648,7 @@ type Fee$1 = {
648
648
  /**
649
649
  * Schema defining monetary amount in given currency.
650
650
  */
651
- type MonetaryAmount = {
651
+ type MonetaryAmount$1 = {
652
652
  /**
653
653
  * The amount in the specified currency
654
654
  */
@@ -690,7 +690,7 @@ type ItemFee$1 = {
690
690
  type Yrn = string;
691
691
 
692
692
  /** A fee definition as returned by the API (`id`/`yrn` server-assigned). */
693
- type Fee = Fee$1;
693
+ type Fee$1 = Fee$2;
694
694
  /** An item-fee (or product-fee) mapping as returned by the API. */
695
695
  type ItemFee = ItemFee$1;
696
696
  /**
@@ -698,7 +698,7 @@ type ItemFee = ItemFee$1;
698
698
  * server-assigned `id`/`yrn`. (The upstream spec reuses the `Fee` schema as the
699
699
  * request body; the SDK exposes this narrower draft type.)
700
700
  */
701
- type FeeDraft = Omit<Fee, "id" | "yrn">;
701
+ type FeeDraft = Omit<Fee$1, "id" | "yrn">;
702
702
  /** Body for `POST /itemFees` — {@link ItemFee} minus the server `id`. */
703
703
  type ItemFeeDraft = Omit<ItemFee, "id">;
704
704
  /** Body of `POST /itemFees/search`. */
@@ -750,13 +750,13 @@ declare class FeeService {
750
750
  * returned page is full). Defaults match Emporix server defaults
751
751
  * (`pageNumber: 1`, `pageSize: 60`).
752
752
  */
753
- list(query?: ListFeesQuery, auth?: AuthContext): Promise<PaginatedItems<Fee>>;
753
+ list(query?: ListFeesQuery, auth?: AuthContext): Promise<PaginatedItems<Fee$1>>;
754
754
  /** Retrieve one fee definition by id. */
755
- get(id: string, auth?: AuthContext): Promise<Fee>;
755
+ get(id: string, auth?: AuthContext): Promise<Fee$1>;
756
756
  /** Create a fee definition. */
757
- create(draft: FeeDraft, auth?: AuthContext): Promise<Fee>;
757
+ create(draft: FeeDraft, auth?: AuthContext): Promise<Fee$1>;
758
758
  /** Update a fee definition by id. */
759
- update(id: string, draft: FeeDraft, auth?: AuthContext): Promise<Fee>;
759
+ update(id: string, draft: FeeDraft, auth?: AuthContext): Promise<Fee$1>;
760
760
  /** Delete a fee definition by id. */
761
761
  delete(id: string, auth?: AuthContext): Promise<void>;
762
762
  /** List all item-fee mappings. */
@@ -946,7 +946,7 @@ type WebhookEvent = {
946
946
  */
947
947
  type WebhookSubscription$1 = {
948
948
  event?: WebhookEvent;
949
- metadata?: Metadata;
949
+ metadata?: Metadata$4;
950
950
  /**
951
951
  * Status of the subscription.
952
952
  */
@@ -981,7 +981,7 @@ type WebhookSubscriptionUpdateItem$1 = {
981
981
  /**
982
982
  * Auditing details.
983
983
  */
984
- type Metadata = {
984
+ type Metadata$4 = {
985
985
  /**
986
986
  * Date and time when the document was created.
987
987
  */
@@ -1552,7 +1552,7 @@ type ExpandedTokenResponse = InnerTokenResponse & {
1552
1552
  * Name of the token.
1553
1553
  */
1554
1554
  name?: string;
1555
- metadata?: MetadataResponse;
1555
+ metadata?: MetadataResponse$1;
1556
1556
  };
1557
1557
  /**
1558
1558
  * The full response representing token. If the `expand=token` is **not** used, then only `id` field is returned, otherwise all fields are returned.
@@ -1723,7 +1723,7 @@ type SlackNativeToolResponse = BaseNativeTool & {
1723
1723
  */
1724
1724
  type?: unknown;
1725
1725
  config?: SlackNativeToolConfigResponse;
1726
- metadata?: MetadataResponse;
1726
+ metadata?: MetadataResponse$1;
1727
1727
  };
1728
1728
  type RagCustomNativeToolResponse = BaseNativeTool & {
1729
1729
  /**
@@ -1735,7 +1735,7 @@ type RagCustomNativeToolResponse = BaseNativeTool & {
1735
1735
  */
1736
1736
  type?: unknown;
1737
1737
  config?: RagCustomNativeToolConfigResponse;
1738
- metadata?: MetadataResponse;
1738
+ metadata?: MetadataResponse$1;
1739
1739
  };
1740
1740
  type RagEmporixNativeToolResponse = BaseNativeTool & {
1741
1741
  /**
@@ -1747,7 +1747,7 @@ type RagEmporixNativeToolResponse = BaseNativeTool & {
1747
1747
  */
1748
1748
  type?: unknown;
1749
1749
  config?: RagEmporixNativeToolConfigResponse;
1750
- metadata?: MetadataResponse;
1750
+ metadata?: MetadataResponse$1;
1751
1751
  };
1752
1752
  /**
1753
1753
  * List of native tools which agents should have access to.
@@ -1782,7 +1782,7 @@ type BaseMcpServer = {
1782
1782
  };
1783
1783
  type McpServerResponse = BaseMcpServer & {
1784
1784
  config?: McpServerConfigResponse;
1785
- metadata?: MetadataResponse;
1785
+ metadata?: MetadataResponse$1;
1786
1786
  };
1787
1787
  /**
1788
1788
  * Type of the MCP server. The `custom` type allows you to integrate with your own MCP server instance, while the `predefined` type allows you to integrate with one of the instances provided by Emporix.
@@ -2014,7 +2014,7 @@ type AgentResponse = BaseForAgentRequestAndResponse & {
2014
2014
  * Prompt which is inherited from the template (if agent is created based on the template). The prompt provided by the user is then concatenated with this prompt.
2015
2015
  */
2016
2016
  templatePrompt?: string;
2017
- metadata?: MetadataResponse;
2017
+ metadata?: MetadataResponse$1;
2018
2018
  };
2019
2019
  type MetadataRequest = {
2020
2020
  /**
@@ -2022,7 +2022,7 @@ type MetadataRequest = {
2022
2022
  */
2023
2023
  version: number;
2024
2024
  };
2025
- type MetadataResponse = MetadataRequest & {
2025
+ type MetadataResponse$1 = MetadataRequest & {
2026
2026
  /**
2027
2027
  * Date and time when the object was created. The value is approved as an ISO-8601 representation of an Instant. For example: `2022-04-31T13:18:02.379Z`
2028
2028
  */
@@ -2174,6 +2174,3074 @@ declare class AiService {
2174
2174
  chatAsync(input: ChatRequest, auth?: AuthContext): Promise<JobIdResponse[]>;
2175
2175
  }
2176
2176
 
2177
+ type Metadata$3 = {
2178
+ /**
2179
+ * Date and time when the object was created.
2180
+ */
2181
+ createdAt?: string;
2182
+ /**
2183
+ * Date and time when the object was last modified.
2184
+ */
2185
+ modifiedAt?: string;
2186
+ /**
2187
+ * Version of the object.
2188
+ */
2189
+ version?: number;
2190
+ };
2191
+ /**
2192
+ * Tax configuration for a specified location. It consists of a country code and a list of tax classes applicable in that country.
2193
+ */
2194
+ type TaxCreation = {
2195
+ location: Location;
2196
+ /**
2197
+ * List of tax classes applicable in the specified country.
2198
+ */
2199
+ taxClasses: Array<TaxClass>;
2200
+ };
2201
+ /**
2202
+ * Tax configuration for a specified location. It consists of a country code and a list of tax classes applicable in that country.
2203
+ */
2204
+ type TaxRetrieval = {
2205
+ locationCode?: string;
2206
+ location?: Location;
2207
+ /**
2208
+ * List of tax classes applicable in the specified country.
2209
+ */
2210
+ taxClasses?: Array<TaxClass>;
2211
+ metadata?: Metadata$3;
2212
+ };
2213
+ /**
2214
+ * Single tax class.
2215
+ */
2216
+ type TaxClass = {
2217
+ /**
2218
+ * Unique tax class code.
2219
+ */
2220
+ code: string;
2221
+ /**
2222
+ * Tax class name.
2223
+ *
2224
+ * * If the `Content-Language` header is set to `*`, then the name should be provided as a map of translations, where each key is a language code and the value is the name in its respective language.
2225
+ * * If the `Content-Language` header is set to a specific language, the name should be provided as a string.
2226
+ * * If the `Content-Language` header is empty, the endpoint will asume that the name is provided in the default language defined in the Configuration Service.
2227
+ *
2228
+ * **Note**: You can provide the names only in languages defined in the Configuration Service. In case the name is provided in a language that is not defined in the Configuration Service, the request will be rejected.
2229
+ */
2230
+ name: {
2231
+ [key: string]: string;
2232
+ } | string;
2233
+ /**
2234
+ * Tax class description.
2235
+ *
2236
+ * * If the `Content-Language` header is set to `*`, then the description should be provided as a map of translations, where each key is a language code and the value is the description in its respective language.
2237
+ * * If the `Content-Language` header is set to a specific language, the description should be provided as a string.
2238
+ * * If the `Content-Language` header is empty, the endpoint will asume that the description is provided in the default language defined in the Configuration Service.
2239
+ *
2240
+ * **Note**: You can provide the descriptions only in languages defined in the Configuration Service. In case the description is provided in a language that is not defined in the Configuration Service, the request will be rejected.
2241
+ */
2242
+ description?: {
2243
+ [key: string]: string;
2244
+ } | string;
2245
+ /**
2246
+ * Number indicating the position on the tax class list. Tax classes in a configuration are sorted based on their `order` values in ascending order.
2247
+ */
2248
+ order?: number;
2249
+ /**
2250
+ * Tax rate, expressed as a number.
2251
+ *
2252
+ * For example, if the tax rate is 23%, this field should be set to `23`.
2253
+ */
2254
+ rate: number;
2255
+ /**
2256
+ * Indicates that the tax class is a default tax class for the tax configuration. Only one tax class can be marked as a default for a particular tax configuration.
2257
+ */
2258
+ isDefault?: boolean;
2259
+ };
2260
+ type TaxCreationResponse = {
2261
+ /**
2262
+ * Code of country for which the tax configuration has been created.
2263
+ */
2264
+ locationCode?: string;
2265
+ };
2266
+ type TaxCalculationRequest = {
2267
+ /**
2268
+ * Calculation command's unique identifier.
2269
+ *
2270
+ * **Note**: This field is optional. If not specified, the `commandUuid` will be generated by the server.
2271
+ */
2272
+ commandUuid?: string;
2273
+ /**
2274
+ * Information based on which the price will be calculated.
2275
+ */
2276
+ input: {
2277
+ /**
2278
+ * Country for which the provided price is originally defined.
2279
+ *
2280
+ * **Note**: This field is only mandatory if the `includesTax` field is set to `true`.
2281
+ */
2282
+ sourceLocation?: Location;
2283
+ /**
2284
+ * Tax class originally applied to the provided price.
2285
+ *
2286
+ * **Note**: This field is only mandatory if the `includesTax` field is set to `true`.
2287
+ */
2288
+ sourceTaxClass?: string;
2289
+ /**
2290
+ * Country for which the price should be calculated.
2291
+ */
2292
+ targetLocation: Location;
2293
+ /**
2294
+ * Tax class that should be applied when calculating the price.
2295
+ */
2296
+ targetTaxClass: string;
2297
+ /**
2298
+ * Flag indicating whether the value provided in the `price` field is expressed as net or gross.
2299
+ *
2300
+ * | Value | Description |
2301
+ * | --- | --- |
2302
+ * | `true` | Prices are expressed as gross values. |
2303
+ * | `false` | Prices are expressed as net values. |
2304
+ */
2305
+ includesTax?: boolean;
2306
+ /**
2307
+ * Original price value.
2308
+ *
2309
+ * This field should contain by a number where the cent part is separated by a dot sign - such as `12.99`.
2310
+ *
2311
+ * **Note**: The cent part of the price is not limited to two digits. You can specify the price with any precision.
2312
+ */
2313
+ price: number;
2314
+ };
2315
+ };
2316
+ type TaxCalculationResponse = {
2317
+ /**
2318
+ * Calculation command's unique identifier.
2319
+ */
2320
+ commandUuid?: string;
2321
+ /**
2322
+ * Information based on which the price was calculated.
2323
+ */
2324
+ input?: {
2325
+ /**
2326
+ * Country for which the provided price was originally defined.
2327
+ */
2328
+ sourceLocation?: Location;
2329
+ /**
2330
+ * Tax class originally applied to the provided price.
2331
+ */
2332
+ sourceTaxClass?: string;
2333
+ /**
2334
+ * Country for which the price was calculated.
2335
+ */
2336
+ targetLocation?: Location;
2337
+ /**
2338
+ * Tax class that was applied when calculating the price.
2339
+ */
2340
+ targetTaxClass?: string;
2341
+ /**
2342
+ * Flag indicating whether the price provided in the request was expressed as net or gross.
2343
+ *
2344
+ * | Value | Description |
2345
+ * | --- | --- |
2346
+ * | `true` | Prices will be expressed as gross values. |
2347
+ * | `false` | Prices will be expressed as net values. |
2348
+ */
2349
+ includesTax?: boolean;
2350
+ /**
2351
+ * Original price value.
2352
+ */
2353
+ price?: number;
2354
+ };
2355
+ /**
2356
+ * Calculation results.
2357
+ */
2358
+ output?: {
2359
+ /**
2360
+ * Calculated net price.
2361
+ */
2362
+ netPrice?: number;
2363
+ /**
2364
+ * Calculated gross price.
2365
+ */
2366
+ grossPrice?: number;
2367
+ /**
2368
+ * Tax rate originally applied to the provided price.
2369
+ */
2370
+ sourceTaxRate?: number;
2371
+ /**
2372
+ * Tax rate that was applied when calculating the price.
2373
+ */
2374
+ targetTaxRate?: number;
2375
+ };
2376
+ };
2377
+ type Location = {
2378
+ /**
2379
+ * Code of the country for which the tax classes are specified, as defined in the Country Service.
2380
+ */
2381
+ countryCode: string;
2382
+ };
2383
+ type TaxUpdate = TaxCreation & {
2384
+ metadata: Metadata$3;
2385
+ };
2386
+
2387
+ /**
2388
+ * Public types for the Tax Service — stable names re-exported over the
2389
+ * generated `tax-service` types. The only refinements are narrowing the
2390
+ * always-present read fields (`locationCode`, `taxClasses`) from the loosely
2391
+ * optional generated shape; everything else aliases the generated types so the
2392
+ * codegen stays the single source of truth.
2393
+ */
2394
+
2395
+ /** A country/location reference (`{ countryCode }`). */
2396
+ type TaxLocation = Location;
2397
+ /**
2398
+ * A per-location tax configuration (read shape — `GET /taxes` /
2399
+ * `/taxes/{locationCode}`). Built on the generated `TaxRetrieval`, with
2400
+ * `locationCode` and `taxClasses` narrowed to required (a persisted
2401
+ * configuration always carries both).
2402
+ */
2403
+ type TaxConfig = Omit<TaxRetrieval, "locationCode" | "taxClasses"> & {
2404
+ locationCode: string;
2405
+ taxClasses: TaxClass[];
2406
+ };
2407
+ /** `POST /taxes` response — only the created `{ locationCode }`. */
2408
+ type TaxConfigCreated = Required<TaxCreationResponse>;
2409
+ /** Calculation command input (the `input` member of the request). */
2410
+ type TaxCalculationInput = TaxCalculationRequest["input"];
2411
+ /** Result of `calculateTax` — `output` carries `netPrice` / `grossPrice` / `*TaxRate`. */
2412
+ type TaxCalculationResult = TaxCalculationResponse;
2413
+
2414
+ /**
2415
+ * Emporix Tax Service (`/tax/{tenant}/…`): CRUD over per-location tax
2416
+ * configurations and the net/gross tax-calculation command. Every endpoint
2417
+ * requires a backend `tax.tax_read` / `tax.tax_manage` scope and the
2418
+ * **service (clientCredentials) token** — default auth: service.
2419
+ *
2420
+ * Server-side use only; the service token must never reach a browser.
2421
+ */
2422
+ declare class TaxService {
2423
+ private readonly ctx;
2424
+ constructor(ctx: ClientContext);
2425
+ private base;
2426
+ /** List all per-location tax configurations. */
2427
+ listTaxConfigs(auth?: AuthContext): Promise<TaxConfig[]>;
2428
+ /** Retrieve one tax configuration by its location (country) code. */
2429
+ getTaxConfig(locationCode: string, auth?: AuthContext): Promise<TaxConfig>;
2430
+ /** Create a tax configuration (`POST`). Returns the created `{ locationCode }`. */
2431
+ createTaxConfig(input: TaxCreation, auth?: AuthContext): Promise<TaxConfigCreated>;
2432
+ /**
2433
+ * Update a tax configuration by location code (`PUT`). `metadata.version` is
2434
+ * required (optimistic locking — a stale version yields 409).
2435
+ */
2436
+ updateTaxConfig(locationCode: string, input: TaxUpdate, auth?: AuthContext): Promise<TaxConfig>;
2437
+ /** Delete a tax configuration by location code. */
2438
+ deleteTaxConfig(locationCode: string, auth?: AuthContext): Promise<void>;
2439
+ /**
2440
+ * Calculate net/gross values for a price (`PUT /taxes/calculation-commands`).
2441
+ * Single command in, single result out.
2442
+ */
2443
+ calculateTax(request: TaxCalculationRequest, auth?: AuthContext): Promise<TaxCalculationResult>;
2444
+ }
2445
+
2446
+ type Coupons = Array<CouponWithIdAndStatus>;
2447
+ /**
2448
+ * Coupons describe voucher alike commerce capabilities, e.g. 10% off winter accessories.
2449
+ */
2450
+ type BaseCoupon = {
2451
+ /**
2452
+ * Coupon name.
2453
+ */
2454
+ name?: string;
2455
+ /**
2456
+ * Coupon description.
2457
+ */
2458
+ description?: string;
2459
+ /**
2460
+ * 'PERCENT' for relative values, 'ABSOLUTE' for float values, referring to a specific currency, 'FREE_SHIPPING' for reducing the shipping cost to 0.
2461
+ */
2462
+ discountType?: 'PERCENT' | 'ABSOLUTE' | 'FREE_SHIPPING';
2463
+ /**
2464
+ * A discount percentage within the range [0.00, 100.00]. Must be specified only if type is 'PERCENT'.
2465
+ */
2466
+ discountPercentage?: number;
2467
+ /**
2468
+ * Must be specified only if type is 'ABSOLUTE'. Defines the amount that should be substracted from the cart subtotal.
2469
+ */
2470
+ discountAbsolute?: {
2471
+ /**
2472
+ * Total amount in the specified currency.
2473
+ */
2474
+ amount?: number;
2475
+ /**
2476
+ * ISO 4217 currency code, e.g.: USD, EUR, CHF.
2477
+ */
2478
+ currency?: string;
2479
+ };
2480
+ /**
2481
+ * Specifies if the coupon can be redeemed by anonymous user. If set to false, only logged-in customers can redeem it.
2482
+ */
2483
+ allowAnonymous?: boolean;
2484
+ /**
2485
+ * Maximum number of redemptions; -1 designates 'unlimited' (seller-only).
2486
+ */
2487
+ maxRedemptions?: number;
2488
+ /**
2489
+ * Maximum number of redemptions per customer; -1 designates 'unlimited'. Cannot be specified for coupons which can be redeemed by anonymous users.
2490
+ */
2491
+ maxRedemptionsPerCustomer?: number;
2492
+ /**
2493
+ * Determines whether the coupon is applied to the total or subtotal value of the order.
2494
+ */
2495
+ discountCalculationType?: 'TOTAL' | 'SUBTOTAL';
2496
+ categoryRestricted?: CategoryRestricted;
2497
+ segmentRestricted?: SegmentRestricted;
2498
+ restrictions?: Restrictions$1;
2499
+ /**
2500
+ * The Id of the customer who originally received the coupon (seller-only).
2501
+ */
2502
+ issuedTo?: string;
2503
+ /**
2504
+ * The field contains mixins values.
2505
+ */
2506
+ mixins?: {
2507
+ [key: string]: unknown;
2508
+ };
2509
+ metadata?: {
2510
+ /**
2511
+ * Version of the document. Set to 0 after creating a document. Increments by 1 after every update.
2512
+ */
2513
+ version?: number;
2514
+ /**
2515
+ * Links to the mixin schemas.
2516
+ */
2517
+ mixins?: {
2518
+ [key: string]: string;
2519
+ };
2520
+ };
2521
+ };
2522
+ type Coupon$2 = BaseCoupon & {
2523
+ legalEntityRedemptions?: Array<{
2524
+ /**
2525
+ * The id of the legal entity to which customer is assigned.
2526
+ */
2527
+ legalEntityId?: string;
2528
+ /**
2529
+ * The number of times a specific coupon has been redeemed in the context of the given legal entity.
2530
+ */
2531
+ count?: number;
2532
+ }>;
2533
+ /**
2534
+ * The number of times a specific coupon has been redeemed. Read-only, set through server. (seller-only).
2535
+ */
2536
+ redemptionCount?: number;
2537
+ referralCoupon?: ReferralCouponProperty;
2538
+ /**
2539
+ * Flag to mark a coupon as deleted (a.k.a. Soft delete). It is a read-only and seller-only attribute.
2540
+ */
2541
+ deleted?: boolean;
2542
+ };
2543
+ /**
2544
+ * Coupon creation schema.
2545
+ */
2546
+ type CouponCreation = {
2547
+ /**
2548
+ * e.g.: WINTER-SALE, 10OFF. If not provided, a code will be auto generated.
2549
+ */
2550
+ code?: string;
2551
+ /**
2552
+ * Coupon name.
2553
+ */
2554
+ name: string;
2555
+ /**
2556
+ * Coupon description.
2557
+ */
2558
+ description?: string;
2559
+ /**
2560
+ * 'PERCENT' for relative values, 'ABSOLUTE' for float values, referring to a specific currency, 'FREE_SHIPPING' for reducing the shipping cost to 0.
2561
+ */
2562
+ discountType?: 'PERCENT' | 'ABSOLUTE' | 'FREE_SHIPPING';
2563
+ /**
2564
+ * A discount percentage within the range [0.00, 100.00]. Must be specified only if type is 'PERCENT'.
2565
+ */
2566
+ discountPercentage?: number;
2567
+ discountAbsolute?: CurrencyAmount & unknown;
2568
+ /**
2569
+ * Specifies if the coupon can be redeemed by anonymous user. If set to false, only logged-in customers can redeem it.
2570
+ */
2571
+ allowAnonymous?: boolean;
2572
+ /**
2573
+ * Maximum number of redemptions; -1 designates 'unlimited' (seller-only).
2574
+ */
2575
+ maxRedemptions?: number;
2576
+ /**
2577
+ * Maximum number of redemptions per customer; -1 designates 'unlimited'. Cannot be specified for coupons which can be redeemed by anonymous users.
2578
+ */
2579
+ maxRedemptionsPerCustomer?: number;
2580
+ /**
2581
+ * Determines whether the coupon is applied to the total or subtotal value of the order.
2582
+ */
2583
+ discountCalculationType?: 'TOTAL' | 'SUBTOTAL';
2584
+ categoryRestricted?: CategoryRestricted;
2585
+ segmentRestricted?: SegmentRestricted;
2586
+ restrictions?: Restrictions$1;
2587
+ /**
2588
+ * The Id of the customer who originally received the coupon (seller-only).
2589
+ */
2590
+ issuedTo?: string;
2591
+ /**
2592
+ * The field contains mixins values.
2593
+ */
2594
+ mixins?: {
2595
+ [key: string]: unknown;
2596
+ };
2597
+ metadata?: {
2598
+ /**
2599
+ * Version of the document. Set to 0 after creating a document. Increments by 1 after every update.
2600
+ */
2601
+ version?: number;
2602
+ /**
2603
+ * Links to the mixin schemas.
2604
+ */
2605
+ mixins?: {
2606
+ [key: string]: string;
2607
+ };
2608
+ };
2609
+ };
2610
+ /**
2611
+ * Defines if the coupon has segment restrictions. If the value is set to `true`, the `restrictions.segments` must be provided.
2612
+ * ***
2613
+ * Info: Cannot be combined neither with the category restrictions nor with customers restrictions.
2614
+ *
2615
+ */
2616
+ type SegmentRestricted = boolean;
2617
+ /**
2618
+ * Defines if the coupon has category restrictions.
2619
+ * ***
2620
+ * Info: Cannot be combined together with the segment restrictions.
2621
+ *
2622
+ */
2623
+ type CategoryRestricted = boolean;
2624
+ /**
2625
+ * Defines an amount in a specific currency.
2626
+ */
2627
+ type CurrencyAmount = {
2628
+ /**
2629
+ * Total amount in the specified currency.
2630
+ */
2631
+ amount?: number;
2632
+ /**
2633
+ * ISO 4217 currency code, e.g.: USD, EUR, CHF.
2634
+ */
2635
+ currency?: string;
2636
+ };
2637
+ /**
2638
+ * Defines a coupon redemption response.
2639
+ */
2640
+ type Redemption = RedemptionCreation & {
2641
+ /**
2642
+ * Unique identifier of the redemption.
2643
+ */
2644
+ id?: string;
2645
+ /**
2646
+ * Timestamp of the redemption.
2647
+ */
2648
+ redeemedAt?: string;
2649
+ };
2650
+ /**
2651
+ * Defines a coupon redemption request payload that affects a coupon instance.
2652
+ */
2653
+ type RedemptionCreation = {
2654
+ /**
2655
+ * Code of the associated order.
2656
+ */
2657
+ orderCode?: string;
2658
+ /**
2659
+ * The customer Id of the user, e.g. C0123456789. Can be specified only if coupon.coupon_redeem_on_behalf scope is present.
2660
+ */
2661
+ customerNumber?: string;
2662
+ /**
2663
+ * The id of the legal entity to which customer is assigned. When customer is assigned to many legal entities then he can redeem the same coupon separately for each legal entity.
2664
+ */
2665
+ legalEntityId?: string;
2666
+ orderTotal: CurrencyAmount & unknown;
2667
+ discount: CurrencyAmount & unknown;
2668
+ };
2669
+ /**
2670
+ * Restrictions of the coupon.
2671
+ */
2672
+ type Restrictions$1 = {
2673
+ /**
2674
+ * A list of customer identifiers for whom the coupon can be redeemed. Cannot be specified for coupons which can be redeemed by anonymous users.
2675
+ */
2676
+ validFor?: Array<string>;
2677
+ /**
2678
+ * Must be provided in ISO 8601 format (http://www.iso.org/iso/home/standards/iso8601.htm), e.g. '2015-01-31T23:59:59.999Z'.
2679
+ */
2680
+ validFrom?: string;
2681
+ /**
2682
+ * Must be provided in ISO 8601 format (http://www.iso.org/iso/home/standards/iso8601.htm), e.g. '2015-01-31T23:59:59.999Z'.
2683
+ */
2684
+ validUntil?: string;
2685
+ minOrderValue?: CurrencyAmount;
2686
+ /**
2687
+ * The list of product's categories to which this coupon applies to. Must be defined only if the `categoryRestricted` flag is set to true. Must be disjoint with excludedCategories list.
2688
+ */
2689
+ includedCategories?: Array<string>;
2690
+ /**
2691
+ * The list of product's categories to which this coupon does not apply to. Can be defined only if the `categoryRestricted` flag is set to true. Must be disjoint with includedCategories list.
2692
+ */
2693
+ excludedCategories?: Array<string>;
2694
+ /**
2695
+ * The list of segments to which this coupon applies to. Can be defined only if the `segmentRestricted` flag is set to true.
2696
+ */
2697
+ segments?: Array<string>;
2698
+ };
2699
+ type ResourceLocation = {
2700
+ /**
2701
+ * Identifier of the link.
2702
+ */
2703
+ id?: string;
2704
+ /**
2705
+ * Identifier of the link in the system's notation.
2706
+ */
2707
+ yrn?: string;
2708
+ };
2709
+ type CouponWithIdAndStatus = Coupon$2 & {
2710
+ /**
2711
+ * e.g.: WINTER-SALE, 10OFF (read-only).
2712
+ */
2713
+ code?: string;
2714
+ referralCoupon?: ReferralCouponProperty;
2715
+ /**
2716
+ * Current status of the coupon (read-only). 'INACTIVE': the coupon is only valid in the future; 'VALID': can be used; 'EXPIRED': the coupon validity period has expired; 'USED': the maximum number of redemptions for the coupon has been reached.
2717
+ */
2718
+ status?: 'VALID' | 'INACTIVE' | 'EXPIRED' | 'USED';
2719
+ };
2720
+ /**
2721
+ * Coupons describe voucher alike commerce capabilities.
2722
+ */
2723
+ type ReferralCoupon = {
2724
+ /**
2725
+ * e.g.: WINTER-SALE, 10OFF (read-only)
2726
+ */
2727
+ code?: string;
2728
+ /**
2729
+ * Coupon name.
2730
+ */
2731
+ name: string;
2732
+ /**
2733
+ * Coupon description.
2734
+ */
2735
+ description?: string;
2736
+ /**
2737
+ * `PERCENT` for relative values, `ABSOLUTE` for float values, referring to a specific currency, `FREE_SHIPPING` for reducing the shipping cost to 0.
2738
+ *
2739
+ */
2740
+ discountType: 'PERCENT' | 'ABSOLUTE' | 'FREE_SHIPPING';
2741
+ /**
2742
+ * A discount percentage within the range [0.00, 100.00]. Must be specified only if type is `PERCENT`.
2743
+ */
2744
+ discountPercentage?: number;
2745
+ discountAbsolute?: CurrencyAmount;
2746
+ /**
2747
+ * Specifies if the coupon can be redeemed by anonymous users.
2748
+ */
2749
+ allowAnonymous?: boolean;
2750
+ /**
2751
+ * Maximum number of redemptions; -1 designates 'unlimited' (seller-only).
2752
+ */
2753
+ maxRedemptions?: number;
2754
+ /**
2755
+ * Maximum number of redemptions per customer; -1 designates 'unlimited'. Cannot be specified for coupons which can be redeemed by anonymous users.
2756
+ */
2757
+ maxRedemptionsPerCustomer?: number;
2758
+ restrictions?: {
2759
+ /**
2760
+ * A list of customer identifiers for whom the coupon can be redeemed. Cannot be specified for coupons which can be redeemed by anonymous users.
2761
+ */
2762
+ validFor?: Array<string>;
2763
+ /**
2764
+ * Must be provided in ISO 8601 format (http://www.iso.org/iso/home/standards/iso8601.htm), e.g. '2015-01-31T23:59:59.999Z'
2765
+ */
2766
+ validFrom?: string;
2767
+ /**
2768
+ * Must be provided in ISO 8601 format (http://www.iso.org/iso/home/standards/iso8601.htm), e.g. '2015-01-31T23:59:59.999Z'
2769
+ */
2770
+ validUntil?: string;
2771
+ minOrderValue?: CurrencyAmount;
2772
+ };
2773
+ /**
2774
+ * The Id of the customer who originally received the coupon (seller-only).
2775
+ */
2776
+ issuedTo: string;
2777
+ referralCoupon?: ReferralCouponProperty;
2778
+ /**
2779
+ * The number of times a specific coupon has been redeemed. Read-only, set through server (seller-only).
2780
+ */
2781
+ redemptionCount?: number;
2782
+ /**
2783
+ * Current status of the coupon (read-only). `INACTIVE`: the coupon is only valid in the future; `VALID`: can be used; `EXPIRED`: the coupon validity period has expired; `USED`: the maximum number of redemptions for the coupon has been reached.
2784
+ */
2785
+ status: 'INACTIVE' | 'VALID' | 'EXPIRED' | 'USED';
2786
+ /**
2787
+ * Flag to mark a coupon as deleted (a.k.a. Soft delete). It is a read-only and seller-only attribute
2788
+ */
2789
+ deleted?: boolean;
2790
+ /**
2791
+ * The field contains mixins values.
2792
+ */
2793
+ mixins?: {
2794
+ [key: string]: unknown;
2795
+ };
2796
+ metadata?: {
2797
+ /**
2798
+ * Version of the document. Set to 0 after creating a document. Increments by 1 after every update.
2799
+ */
2800
+ version?: number;
2801
+ /**
2802
+ * Links to the mixin schemas.
2803
+ */
2804
+ mixins?: {
2805
+ [key: string]: string;
2806
+ };
2807
+ };
2808
+ };
2809
+ /**
2810
+ * Indicates if the coupon is type of referral coupon. This property is read only.
2811
+ */
2812
+ type ReferralCouponProperty = boolean;
2813
+
2814
+ /**
2815
+ * Public types for the Coupon Service — stable names aliased over the generated
2816
+ * `coupon` types (single source of truth; faithful required/optional flags).
2817
+ */
2818
+
2819
+ /** A coupon (read shape — includes the read-only `code` and `status`). */
2820
+ type Coupon$1 = CouponWithIdAndStatus;
2821
+ /** Response of `listCoupons` — a plain array of coupons. */
2822
+ type CouponList = Coupons;
2823
+ /** Create body (`POST /coupons`). `name` is required; `code` is auto-generated when omitted. */
2824
+ type CouponInput = CouponCreation;
2825
+ /** Update / patch body (`PUT` / `PATCH /coupons/{code}`). */
2826
+ type CouponUpdate = BaseCoupon;
2827
+ /**
2828
+ * Redemption request body (`validation` / `redemptions`). Requires `orderTotal`
2829
+ * and `discount`; `customerNumber` is honored only with the
2830
+ * `coupon.coupon_redeem_on_behalf` scope.
2831
+ */
2832
+ type RedemptionInput = RedemptionCreation;
2833
+ /** `POST /redemptions` 201 response — the created redemption's `{ id?, yrn? }`. */
2834
+ type RedemptionCreated = ResourceLocation;
2835
+ /** `POST /coupons` 201 response — the created coupon's `{ id?, yrn? }`. */
2836
+ type CouponCreated = ResourceLocation;
2837
+
2838
+ /**
2839
+ * Emporix Coupon Service (`/coupon/{tenant}/…`): coupon CRUD, validation,
2840
+ * redemptions, and referral coupons.
2841
+ *
2842
+ * Every method defaults to the **service (clientCredentials) token**. For
2843
+ * customer-driven validation/redemption, pass `auth.customer(token)` as the
2844
+ * trailing argument (the React hooks do this with the browser context). The
2845
+ * service token must never reach a browser.
2846
+ */
2847
+ declare class CouponService {
2848
+ private readonly ctx;
2849
+ constructor(ctx: ClientContext);
2850
+ private base;
2851
+ /** List coupons by criteria. Returns a plain array. */
2852
+ listCoupons(query?: Record<string, string | number>, auth?: AuthContext): Promise<CouponList>;
2853
+ /** Retrieve one coupon by code. */
2854
+ getCoupon(code: string, auth?: AuthContext): Promise<Coupon$1>;
2855
+ /** Create a coupon (`POST`, HTTP 201). Returns the created resource's `{ id?, yrn? }`. */
2856
+ createCoupon(input: CouponInput, auth?: AuthContext): Promise<CouponCreated>;
2857
+ /** Replace a coupon by code (`PUT`). Resolves once the update is accepted. */
2858
+ updateCoupon(code: string, input: CouponUpdate, auth?: AuthContext): Promise<void>;
2859
+ /** Partially update a coupon by code (`PATCH` merge body). */
2860
+ patchCoupon(code: string, patch: CouponUpdate, auth?: AuthContext): Promise<void>;
2861
+ /** Delete a coupon by code. */
2862
+ deleteCoupon(code: string, auth?: AuthContext): Promise<void>;
2863
+ /**
2864
+ * Check whether a coupon can be redeemed (`POST /validation`). Resolves when
2865
+ * redeemable; throws an `EmporixError` otherwise (no response body).
2866
+ */
2867
+ validateCoupon(code: string, redemption: RedemptionInput, auth?: AuthContext): Promise<void>;
2868
+ /** List a coupon's redemptions by criteria. */
2869
+ listRedemptions(code: string, query?: Record<string, string | number>, auth?: AuthContext): Promise<Redemption[]>;
2870
+ /** Redeem a coupon by creating a redemption (`POST`, HTTP 201). Returns the resource location. */
2871
+ redeemCoupon(code: string, redemption: RedemptionInput, auth?: AuthContext): Promise<RedemptionCreated>;
2872
+ /** Retrieve one redemption by id. */
2873
+ getRedemption(code: string, id: string, auth?: AuthContext): Promise<Redemption>;
2874
+ /** Delete a redemption by id. */
2875
+ deleteRedemption(code: string, id: string, auth?: AuthContext): Promise<void>;
2876
+ /** Retrieve a customer's referral coupon (resolves to an empty body when none exists). */
2877
+ getReferralCoupon(customerNumber: string, auth?: AuthContext): Promise<ReferralCoupon>;
2878
+ /** Create a referral coupon code for a customer (no request body). */
2879
+ createReferralCoupon(customerNumber: string, auth?: AuthContext): Promise<ReferralCoupon>;
2880
+ }
2881
+
2882
+ type CustomerSummaryBatchOut = Array<PointsSummaryOut>;
2883
+ type PointsSummaryOut = {
2884
+ /**
2885
+ * Id of the customer to whom the points are assigned
2886
+ */
2887
+ customerId?: string;
2888
+ /**
2889
+ * Active points that can be redeemed
2890
+ */
2891
+ activePoints?: number;
2892
+ summary?: CustomerSummary;
2893
+ };
2894
+ type AddedPoints = {
2895
+ id?: string;
2896
+ /**
2897
+ * Order Id for which the points were created
2898
+ */
2899
+ 'reference-id'?: string | null;
2900
+ /**
2901
+ * Auto-generated description
2902
+ */
2903
+ description?: string;
2904
+ /**
2905
+ * Number of points added in the operation
2906
+ */
2907
+ points: number;
2908
+ createdAt?: string;
2909
+ /**
2910
+ * The date until when the points can be redeemed
2911
+ */
2912
+ validUntil?: string;
2913
+ /**
2914
+ * Number of points after creation
2915
+ */
2916
+ allPointsAfterCreation?: number;
2917
+ /**
2918
+ * Number of points already used
2919
+ */
2920
+ usedPoints?: number;
2921
+ usedWith?: Array<string>;
2922
+ };
2923
+ type RedeemedPoints = {
2924
+ /**
2925
+ * Identifier of the redeemed points
2926
+ */
2927
+ id?: string;
2928
+ /**
2929
+ * A comment for the redeem operation
2930
+ */
2931
+ description?: string;
2932
+ /**
2933
+ * The amount of the redeemed points
2934
+ */
2935
+ points: number;
2936
+ /**
2937
+ * Timestamp when the points were redeemed
2938
+ */
2939
+ createdAt?: string;
2940
+ /**
2941
+ * Number of points after creation
2942
+ */
2943
+ allPointsAfterCreation?: number;
2944
+ };
2945
+ type CustomerSummary = {
2946
+ addedPointsList: Array<AddedPoints>;
2947
+ redeemedPointsList?: Array<RedeemedPoints>;
2948
+ };
2949
+ type RedeemOptions = Array<RedeemOption>;
2950
+ type RedeemOption = {
2951
+ /**
2952
+ * ID of the redemption option to be used at reward points exchange
2953
+ */
2954
+ id?: string;
2955
+ /**
2956
+ * Option type, typically 'coupon'.
2957
+ */
2958
+ type: string;
2959
+ /**
2960
+ * Name of the redeem option that can be presented to customer
2961
+ */
2962
+ name: string;
2963
+ /**
2964
+ * Description of the redeem option that can be presented to customer
2965
+ */
2966
+ description?: string;
2967
+ /**
2968
+ * Points to deduct from customer's account at coupon creation
2969
+ */
2970
+ points: number;
2971
+ coupon?: Coupon;
2972
+ pointsAfterCoupon?: number;
2973
+ metadata?: {
2974
+ /**
2975
+ * Version of the redeem option
2976
+ */
2977
+ version?: number;
2978
+ /**
2979
+ * Timestamp when the redeem option has been created.
2980
+ */
2981
+ createdAt?: string;
2982
+ /**
2983
+ * Timestamp when the redeem option has been modified.
2984
+ */
2985
+ modifiedAt?: string;
2986
+ };
2987
+ };
2988
+ type RedeemCouponOut = {
2989
+ /**
2990
+ * Coupon code received after exchanging points
2991
+ */
2992
+ code?: string;
2993
+ };
2994
+ /**
2995
+ * Coupons describe voucher-like commerce capabilities.
2996
+ */
2997
+ type Coupon = {
2998
+ /**
2999
+ * Coupon code, for example: WINTER-SALE, 10OFF (read-only)
3000
+ */
3001
+ code?: string;
3002
+ /**
3003
+ * Localized coupon name
3004
+ */
3005
+ name: string;
3006
+ /**
3007
+ * Localized coupon description
3008
+ */
3009
+ description?: string;
3010
+ /**
3011
+ * 'PERCENT' for relative values, 'ABSOLUTE' for float values referring to a specific currency, 'FREE_SHIPPING' for reducing the shipping cost to 0.
3012
+ */
3013
+ discountType: 'PERCENT' | 'ABSOLUTE' | 'FREE_SHIPPING';
3014
+ /**
3015
+ * Discount percentage within a range [0.00, 100.00]. Must be specified only if type is 'PERCENT'.
3016
+ */
3017
+ discountPercentage?: number;
3018
+ /**
3019
+ * Must be specified only if type is 'ABSOLUTE'
3020
+ */
3021
+ discountAbsolute?: {
3022
+ /**
3023
+ * Total amount in the specified currency.
3024
+ */
3025
+ amount?: number;
3026
+ /**
3027
+ * ISO 4217 currency code, e.g.: USD, EUR, CHF
3028
+ */
3029
+ currency?: string;
3030
+ };
3031
+ /**
3032
+ * Defines if the coupon can be redeemed by anonymous users
3033
+ */
3034
+ allowAnonymous?: boolean;
3035
+ /**
3036
+ * Maximum number of redemptions; -1 designates 'unlimited' (seller-only)
3037
+ */
3038
+ maxRedemptions?: number;
3039
+ /**
3040
+ * Maximum number of redemptions per customer; -1 designates 'unlimited'. Cannot be specified for coupons which can be redeemed by anonymous users.
3041
+ */
3042
+ maxRedemptionsPerCustomer?: number;
3043
+ restrictions?: Restrictions;
3044
+ /**
3045
+ * Id of the customer who originally received the coupon (seller-only).
3046
+ */
3047
+ issuedTo?: string;
3048
+ /**
3049
+ * The number of times a specific coupon has been redeemed. Read-only, set through server. (seller-only)
3050
+ */
3051
+ redemptionCount?: number;
3052
+ /**
3053
+ * Current status of the coupon (read-only). 'INACTIVE': the coupon is only valid in the future; 'VALID': can be used; 'EXPIRED': the coupon validity period has expired; 'USED': the maximum number of redemptions for the coupon has been reached.
3054
+ */
3055
+ status?: 'INACTIVE' | 'VALID' | 'EXPIRED' | 'USED';
3056
+ /**
3057
+ * Hypermedia reference to coupon actions (read-only, customer-only)
3058
+ */
3059
+ links?: Array<{
3060
+ /**
3061
+ * Link relation type
3062
+ */
3063
+ rel: string;
3064
+ /**
3065
+ * Link title
3066
+ */
3067
+ title: string;
3068
+ /**
3069
+ * Target URI of the link
3070
+ */
3071
+ href: string;
3072
+ /**
3073
+ * Content type of the referenced resource
3074
+ */
3075
+ type: string;
3076
+ }>;
3077
+ /**
3078
+ * Flag to mark a coupon as deleted (a.k.a. Soft delete). It is a read-only and seller-only attribute
3079
+ */
3080
+ deleted?: boolean;
3081
+ };
3082
+ type NewCustomerIn = {
3083
+ customerId?: string;
3084
+ startPoints?: AddedPoints;
3085
+ };
3086
+ type Restrictions = {
3087
+ /**
3088
+ * A list of identifiers of customers that can redeem the coupon. Cannot be specified for coupons which can be redeemed by anonymous users.
3089
+ */
3090
+ validFor?: Array<string>;
3091
+ /**
3092
+ * Must be provided in the ISO 8601 format (http://www.iso.org/iso/home/standards/iso8601.htm), e.g. '2015-01-31T23:59:59.999Z'
3093
+ */
3094
+ validFrom?: string;
3095
+ /**
3096
+ * Must be provided in the ISO 8601 format (http://www.iso.org/iso/home/standards/iso8601.htm), e.g. '2015-01-31T23:59:59.999Z'
3097
+ */
3098
+ validUntil?: string;
3099
+ /**
3100
+ * Minimum order value which entitles the customer to redeem the coupon
3101
+ */
3102
+ minOrderValue?: {
3103
+ /**
3104
+ * Total amount in the specified currency
3105
+ */
3106
+ amount?: number;
3107
+ /**
3108
+ * ISO 4217 currency code, e.g.: USD, EUR, CHF
3109
+ */
3110
+ currency?: string;
3111
+ };
3112
+ };
3113
+
3114
+ /**
3115
+ * Public types for the Reward Points Service — stable names aliased over the
3116
+ * generated `reward-points` types (single source of truth). Structural only for
3117
+ * the inlined public-redeem body.
3118
+ *
3119
+ * Note: point *balances* (`getCustomerPoints` / `getMyPoints`) are returned as a
3120
+ * bare `number` by the upstream API, so they have no dedicated type here.
3121
+ */
3122
+
3123
+ /** Batch summary across all customers (`GET /summaryBatch`) — an array of summaries. */
3124
+ type CustomerSummaryBatch = CustomerSummaryBatchOut;
3125
+ /** Points summary for one customer / the signed-in customer. */
3126
+ type PointsSummary = PointsSummaryOut;
3127
+ /** Create-entry body (`POST /customer/{id}`). */
3128
+ type NewPointsEntry = NewCustomerIn;
3129
+ /** List of redeem options (`GET`/`POST /{tenant}/redeemOptions`). */
3130
+ type RedeemOptionList = RedeemOptions;
3131
+ /** Result of redeeming points — the issued coupon `{ code? }`. */
3132
+ type RedeemCouponResult = RedeemCouponOut;
3133
+ /** Body for `redeemMyPoints` — inlined upstream, so defined structurally. */
3134
+ interface RedeemMyPointsInput {
3135
+ redeemOptionId: string;
3136
+ }
3137
+
3138
+ /**
3139
+ * Emporix Reward Points Service (`/reward-points/…`): admin customer-points
3140
+ * management, the signed-in customer's own points, and redeem options.
3141
+ *
3142
+ * Auth differs per group: admin and redeem-option management default to the
3143
+ * **service token**; the `/public/*` methods require a **customer token** (they
3144
+ * accept only `CustomerAccessToken`). Note the mixed base paths — customer/
3145
+ * public/batch endpoints omit `{tenant}`, redeem options include it. A point
3146
+ * balance (`getCustomerPoints` / `getMyPoints`) is returned as a bare `number`.
3147
+ */
3148
+ declare class RewardPointsService {
3149
+ private readonly ctx;
3150
+ constructor(ctx: ClientContext);
3151
+ /** Base without tenant (customer / public / batch endpoints). */
3152
+ private base;
3153
+ /** Tenant-scoped base (redeem options only). */
3154
+ private tenantBase;
3155
+ /** Batch summary across all customers. */
3156
+ listAllSummaries(query?: Record<string, string | number>, auth?: AuthContext): Promise<CustomerSummaryBatch>;
3157
+ /** Retrieve one customer's reward-points balance. */
3158
+ getCustomerPoints(customerId: string, auth?: AuthContext): Promise<number>;
3159
+ /** Create a reward-points entry for a customer. */
3160
+ createCustomerPoints(customerId: string, input: NewPointsEntry, auth?: AuthContext): Promise<void>;
3161
+ /** Delete a customer's reward points. */
3162
+ deleteCustomerPoints(customerId: string, auth?: AuthContext): Promise<void>;
3163
+ /** Retrieve a reward-points summary for one customer. */
3164
+ getCustomerSummary(customerId: string, auth?: AuthContext): Promise<PointsSummary>;
3165
+ /** Add reward points for a customer. */
3166
+ addPoints(customerId: string, input: AddedPoints, auth?: AuthContext): Promise<void>;
3167
+ /** Redeem a customer's reward points (on behalf). */
3168
+ redeemPoints(customerId: string, input: RedeemedPoints, auth?: AuthContext): Promise<void>;
3169
+ /** The signed-in customer's reward-points balance. Requires a customer `auth`. */
3170
+ getMyPoints(auth: AuthContext): Promise<number>;
3171
+ /** The signed-in customer's reward-points summary. Requires a customer `auth`. */
3172
+ getMySummary(auth: AuthContext): Promise<PointsSummary>;
3173
+ /**
3174
+ * Redeem the signed-in customer's points for a coupon code. Requires a
3175
+ * customer `auth`. Returns the issued coupon `{ code }`.
3176
+ */
3177
+ redeemMyPoints(input: RedeemMyPointsInput, auth: AuthContext): Promise<RedeemCouponResult>;
3178
+ /** List redeem options. Defaults to the service token; pass a customer `auth` for storefront reads. */
3179
+ listRedeemOptions(auth?: AuthContext): Promise<RedeemOptionList>;
3180
+ /** Create a redeem option. Returns the updated options list. */
3181
+ createRedeemOption(input: RedeemOption, auth?: AuthContext): Promise<RedeemOptionList>;
3182
+ /** Update a redeem option by id. Resolves once accepted (no response body). */
3183
+ updateRedeemOption(redeemOptionId: string, input: RedeemOption, auth?: AuthContext): Promise<void>;
3184
+ /** Delete a redeem option by id. */
3185
+ deleteRedeemOption(redeemOptionId: string, auth?: AuthContext): Promise<void>;
3186
+ }
3187
+
3188
+ type Brands = Array<BrandResponse>;
3189
+ type Brand$1 = {
3190
+ /**
3191
+ * Unique identifier of a brand.
3192
+ */
3193
+ id?: string;
3194
+ /**
3195
+ * Brand name.
3196
+ */
3197
+ name?: string;
3198
+ /**
3199
+ * Brand description.
3200
+ */
3201
+ description?: string;
3202
+ /**
3203
+ * Map of key-value pairs containing localized names of the brand.
3204
+ */
3205
+ localizedName?: {
3206
+ [key: string]: string;
3207
+ };
3208
+ /**
3209
+ * Map of key-value pairs containing localized descriptions of the brand.
3210
+ */
3211
+ localizedDescription?: {
3212
+ [key: string]: string;
3213
+ };
3214
+ };
3215
+ type UpdateBrand = {
3216
+ /**
3217
+ * Brand name.
3218
+ */
3219
+ name?: string;
3220
+ /**
3221
+ * Brand description.
3222
+ */
3223
+ description?: string;
3224
+ /**
3225
+ * Map of key-value pairs containing localized names of the brand.
3226
+ */
3227
+ localizedName?: {
3228
+ [key: string]: string;
3229
+ };
3230
+ /**
3231
+ * Map of key-value pairs containing localized descriptions of the brand.
3232
+ */
3233
+ localizedDescription?: {
3234
+ [key: string]: string;
3235
+ };
3236
+ metadata?: UpdateMetaData;
3237
+ };
3238
+ type BrandResponse = {
3239
+ /**
3240
+ * Brand name.
3241
+ */
3242
+ name?: string;
3243
+ /**
3244
+ * Id of the associated media file.
3245
+ */
3246
+ cloudinaryUrl?: string;
3247
+ /**
3248
+ * Brand description.
3249
+ */
3250
+ description?: string;
3251
+ /**
3252
+ * Map of key-value pairs containing localized names of the brand.
3253
+ */
3254
+ localizedName?: {
3255
+ [key: string]: string;
3256
+ };
3257
+ /**
3258
+ * Map of key-value pairs containing localized descriptions of the brand.
3259
+ */
3260
+ localizedDescription?: {
3261
+ [key: string]: string;
3262
+ };
3263
+ /**
3264
+ * Link to the associated media file.
3265
+ */
3266
+ image?: string;
3267
+ /**
3268
+ * Id of the media.
3269
+ */
3270
+ mediaId?: string;
3271
+ /**
3272
+ * Unique identifier of a brand.
3273
+ */
3274
+ id?: string;
3275
+ metadata?: MetaData$1;
3276
+ };
3277
+ type MetaData$1 = {
3278
+ /**
3279
+ * Date and time when the object was created compliant with the ISO 8601 standard.
3280
+ */
3281
+ createdAt?: string;
3282
+ /**
3283
+ * Date and time when the object was last modified compliant with the ISO 8601 standard.
3284
+ */
3285
+ modifiedAt?: string;
3286
+ /**
3287
+ * Object version.
3288
+ */
3289
+ version?: number;
3290
+ };
3291
+ type UpdateMetaData = {
3292
+ /**
3293
+ * Object version.
3294
+ */
3295
+ version?: number;
3296
+ };
3297
+
3298
+ /**
3299
+ * Public types for the Brand Service — stable names aliased over the generated
3300
+ * `brand-service` types.
3301
+ */
3302
+
3303
+ /** A brand (read shape). */
3304
+ type Brand = BrandResponse;
3305
+ /** List of brands (`GET /brand/brands`) — a plain array. */
3306
+ type BrandList = Brands;
3307
+ /** Create body (`POST /brand/brands`). */
3308
+ type BrandInput = Brand$1;
3309
+ /** Update / patch body (`PUT` / `PATCH /brand/brands/{id}`). */
3310
+ type BrandUpdate = UpdateBrand;
3311
+
3312
+ /**
3313
+ * Emporix Brand Service (`/brand/brands`): CRUD over brands. Server-side;
3314
+ * defaults to the service token (reads also work with an anonymous token).
3315
+ * The path carries no `{tenant}` segment — the tenant comes from the token.
3316
+ */
3317
+ declare class BrandService {
3318
+ private readonly ctx;
3319
+ constructor(ctx: ClientContext);
3320
+ private base;
3321
+ /** List all brands. */
3322
+ listBrands(query?: Record<string, string | number>, auth?: AuthContext): Promise<BrandList>;
3323
+ /** Retrieve one brand by id. */
3324
+ getBrand(brandId: string, auth?: AuthContext): Promise<Brand>;
3325
+ /** Create a brand. */
3326
+ createBrand(input: BrandInput, auth?: AuthContext): Promise<Brand>;
3327
+ /** Replace a brand by id. */
3328
+ updateBrand(brandId: string, input: BrandUpdate, auth?: AuthContext): Promise<Brand>;
3329
+ /** Partially update a brand by id. */
3330
+ patchBrand(brandId: string, patch: BrandUpdate, auth?: AuthContext): Promise<Brand>;
3331
+ /** Delete a brand by id. */
3332
+ deleteBrand(brandId: string, auth?: AuthContext): Promise<void>;
3333
+ }
3334
+
3335
+ type LabelUpdate$1 = {
3336
+ /**
3337
+ * Name of the label.
3338
+ */
3339
+ name: string;
3340
+ overlay?: Overlay;
3341
+ /**
3342
+ * Localized resource description in a form of a map of translations.
3343
+ */
3344
+ description: string | {
3345
+ [key: string]: string;
3346
+ };
3347
+ };
3348
+ type LabelCreation = {
3349
+ /**
3350
+ * Unique ID of the label. It will be auto-generated if not provided.
3351
+ */
3352
+ id?: string;
3353
+ } & LabelUpdate$1;
3354
+ type Label$1 = {
3355
+ /**
3356
+ * Unique ID of the label.
3357
+ */
3358
+ id?: string;
3359
+ /**
3360
+ * Name of the label.
3361
+ */
3362
+ name?: string;
3363
+ /**
3364
+ * Id of the media.
3365
+ */
3366
+ mediaId?: string;
3367
+ /**
3368
+ * Image URL.
3369
+ */
3370
+ image?: string;
3371
+ /**
3372
+ * Cludinary path.
3373
+ */
3374
+ cloudinaryUrl?: string;
3375
+ overlay?: Overlay;
3376
+ /**
3377
+ * Localized resource description in a form of a map of translations.
3378
+ */
3379
+ description?: string | {
3380
+ [key: string]: string;
3381
+ };
3382
+ metadata?: Metadata$2;
3383
+ };
3384
+ /**
3385
+ * If present and `isTrue` is actually true the label should be printed on associated products on the described position.
3386
+ */
3387
+ type Overlay = {
3388
+ isTrue?: boolean;
3389
+ position: number;
3390
+ };
3391
+ /**
3392
+ * Metadata
3393
+ */
3394
+ type Metadata$2 = {
3395
+ /**
3396
+ * The creation date.
3397
+ */
3398
+ createdAt?: string;
3399
+ /**
3400
+ * The modification date.
3401
+ */
3402
+ modifiedAt?: string;
3403
+ /**
3404
+ * The document version number.
3405
+ */
3406
+ version?: number;
3407
+ };
3408
+
3409
+ /**
3410
+ * Public types for the Label Service — stable names aliased over the generated
3411
+ * `label-service` types. The list endpoint returns a plain `Label[]` (no named
3412
+ * list schema upstream).
3413
+ */
3414
+
3415
+ /** A label (read shape). */
3416
+ type Label = Label$1;
3417
+ /** List of labels (`GET /label/labels`) — a plain array. */
3418
+ type LabelList = Label[];
3419
+ /** Create body (`POST /label/labels`). */
3420
+ type LabelInput = LabelCreation;
3421
+ /** Update / patch body (`PUT` / `PATCH /label/labels/{id}`). */
3422
+ type LabelUpdate = LabelUpdate$1;
3423
+
3424
+ /**
3425
+ * Emporix Label Service (`/label/labels`): CRUD over product labels (e.g.
3426
+ * "Sale", "New"). Server-side; defaults to the service token. The path carries
3427
+ * no `{tenant}` segment — the tenant comes from the token.
3428
+ */
3429
+ declare class LabelService {
3430
+ private readonly ctx;
3431
+ constructor(ctx: ClientContext);
3432
+ private base;
3433
+ /** List all labels. */
3434
+ listLabels(query?: Record<string, string | number>, auth?: AuthContext): Promise<LabelList>;
3435
+ /** Retrieve one label by id. */
3436
+ getLabel(labelId: string, auth?: AuthContext): Promise<Label>;
3437
+ /** Create a label. */
3438
+ createLabel(input: LabelInput, auth?: AuthContext): Promise<Label>;
3439
+ /** Replace a label by id. */
3440
+ updateLabel(labelId: string, input: LabelUpdate, auth?: AuthContext): Promise<Label>;
3441
+ /** Partially update a label by id. */
3442
+ patchLabel(labelId: string, patch: LabelUpdate, auth?: AuthContext): Promise<Label>;
3443
+ /** Delete a label by id. */
3444
+ deleteLabel(labelId: string, auth?: AuthContext): Promise<void>;
3445
+ }
3446
+
3447
+ type Metadata$1 = {
3448
+ /**
3449
+ * Date and time when the document was created.
3450
+ */
3451
+ createdAt: string;
3452
+ /**
3453
+ * Date and time when the document was last modified.
3454
+ */
3455
+ modifiedAt: string;
3456
+ /**
3457
+ * Version of the document.
3458
+ */
3459
+ version: number;
3460
+ };
3461
+ type Country$1 = {
3462
+ /**
3463
+ * The country code which consists of two capital letters and is compliant with ISO-3166-1 specification.
3464
+ */
3465
+ code?: string;
3466
+ /**
3467
+ * Localized name of the country. The value is returned as a map where the key is a language code and the value is a translation for the given language.
3468
+ */
3469
+ name?: {
3470
+ [key: string]: string;
3471
+ };
3472
+ /**
3473
+ * A list of regions to which the given country belongs to.
3474
+ */
3475
+ regions?: Array<string>;
3476
+ /**
3477
+ * The field indicating whether the given country is active for the tenant or not. Only active countries are visible in the system.
3478
+ */
3479
+ active?: boolean;
3480
+ metadata?: Metadata$1;
3481
+ };
3482
+ type Region$1 = {
3483
+ /**
3484
+ * The region code.
3485
+ */
3486
+ code?: string;
3487
+ /**
3488
+ * The localized name of the region. The value is returned as a map where the key is a language code and the value is a translation for the given language.
3489
+ */
3490
+ name?: {
3491
+ [key: string]: string;
3492
+ };
3493
+ metadata?: Metadata$1;
3494
+ };
3495
+ type CountryUpdate$1 = {
3496
+ /**
3497
+ * The field indicates whether the given country is active for the tenant or not. Only active countries are visible in the system.
3498
+ */
3499
+ active?: boolean;
3500
+ metadata: {
3501
+ /**
3502
+ * Version of the document. The version is used for optimistic locking mechanism during the update request.
3503
+ */
3504
+ version: number;
3505
+ };
3506
+ };
3507
+
3508
+ /**
3509
+ * Public types for the Country Service — stable names aliased over the generated
3510
+ * `country-service` types. The list endpoints return plain arrays upstream.
3511
+ */
3512
+
3513
+ /** A country (read shape). */
3514
+ type Country = Country$1;
3515
+ /** List of countries (`GET /countries`) — a plain array. */
3516
+ type CountryList = Country[];
3517
+ /** PATCH body for a country. */
3518
+ type CountryUpdate = CountryUpdate$1;
3519
+ /** A region (read shape). */
3520
+ type Region = Region$1;
3521
+ /** List of regions (`GET /regions`) — a plain array. */
3522
+ type RegionList = Region[];
3523
+
3524
+ /**
3525
+ * Emporix Country Service (`/country/{tenant}/…`): countries and regions
3526
+ * master data. Server-side; defaults to the service token (reads also work
3527
+ * with an anonymous token). Countries are predefined — list/get/patch only
3528
+ * (no create/delete).
3529
+ */
3530
+ declare class CountryService {
3531
+ private readonly ctx;
3532
+ constructor(ctx: ClientContext);
3533
+ private base;
3534
+ /** List all countries. */
3535
+ listCountries(query?: Record<string, string | number>, auth?: AuthContext): Promise<CountryList>;
3536
+ /** Retrieve one country by code. */
3537
+ getCountry(countryCode: string, auth?: AuthContext): Promise<Country>;
3538
+ /** Partially update a country by code. Resolves once accepted (no response body). */
3539
+ patchCountry(countryCode: string, patch: CountryUpdate, auth?: AuthContext): Promise<void>;
3540
+ /** List all regions. */
3541
+ listRegions(query?: Record<string, string | number>, auth?: AuthContext): Promise<RegionList>;
3542
+ /** Retrieve one region by code. */
3543
+ getRegion(regionCode: string, auth?: AuthContext): Promise<Region>;
3544
+ }
3545
+
3546
+ type Metadata = {
3547
+ /**
3548
+ * Time of document creation.
3549
+ */
3550
+ createdAt?: string;
3551
+ /**
3552
+ * Time of document modification.
3553
+ */
3554
+ modifiedAt?: string;
3555
+ /**
3556
+ * Document version.
3557
+ */
3558
+ version?: number;
3559
+ };
3560
+ type UpdateMetadata = {
3561
+ /**
3562
+ * Current version of the updated document.
3563
+ */
3564
+ version: number;
3565
+ };
3566
+ /**
3567
+ * Represents a single currency creation. The currency consists of a code compliant with the ISO-4217 standard (https://www.iso.org/iso-4217-currency-codes.html) and a currency name. The `name` field is localized.
3568
+ */
3569
+ type CurrencyCreation = {
3570
+ /**
3571
+ * Currency code. The currency symbol must consist of three capital letters and must be a valid ISO-4217 code (https://www.iso.org/iso-4217-currency-codes.html).
3572
+ *
3573
+ */
3574
+ code: string;
3575
+ /**
3576
+ * Currency name. If the `Content-Language` is set to `*`, the field should be provided as a map that contains all translations in the `key:value` pairs format, where `key` is the language code and `value` is the translation. If the `Content-Language` contains a single language, the translation should be passed as a string value. If the `Accept-Language` header is empty, the translation will be returned in the language defined in the `Configuration service` as default.
3577
+ *
3578
+ * **Note:** Only the languages defined in the system are allowed to be used here. If a language code not defined in the system is provided, the request will be rejected.
3579
+ */
3580
+ name: string | {
3581
+ [key: string]: string;
3582
+ };
3583
+ };
3584
+ /**
3585
+ * Represents a single currency update.
3586
+ */
3587
+ type CurrencyUpdate$1 = {
3588
+ /**
3589
+ * The currency name. If the `Content-Language` is set to `*`, the field should be provided as a map that contains all translations in the format of `key:value` pairs, where `key` is the language code and `value` is the translation. If the `Content-Language` contains a single language, the translation should be passed as a string value. If the `Content-Language` header is empty, the default language defined in the `Configuration service` is taken.
3590
+ *
3591
+ * Only the languages defined in the system are allowed to be used here. If a language code not defined in the system is provided, the request will be rejected.
3592
+ */
3593
+ name: string | {
3594
+ [key: string]: string;
3595
+ };
3596
+ metadata: UpdateMetadata;
3597
+ };
3598
+ /**
3599
+ * Represents the response after a successful currency creation.
3600
+ */
3601
+ type CurrencyCreationResponse = {
3602
+ /**
3603
+ * Code of the newly created currency.
3604
+ *
3605
+ */
3606
+ code?: string;
3607
+ };
3608
+ /**
3609
+ * Represents the response after a successful exchange rate creation.
3610
+ */
3611
+ type ExchangeRateResponse = {
3612
+ /**
3613
+ * Code of the newly created exchange rate in the following format: `sourceCurrency_targetCurrency`.
3614
+ *
3615
+ */
3616
+ code?: string;
3617
+ };
3618
+ /**
3619
+ * Represents a single currency. The currency consists of a code compliant with ISO-4217 (https://www.iso.org/iso-4217-currency-codes.html) and a currency name. The name field is localized.
3620
+ */
3621
+ type CurrencyRetrieval = {
3622
+ /**
3623
+ * Currency code. The currency symbol consists of three capital letters and is a valid ISO-4217 code (https://www.iso.org/iso-4217-currency-codes.html).
3624
+ *
3625
+ */
3626
+ code?: string;
3627
+ /**
3628
+ * The currency name.
3629
+ * If the `Accept-Language` is set to `*`, each internationalized field is returned as a map that contains all translations in the format of `key:value` pairs, where `key` is the language code and `value` is the translation.
3630
+ * The `Accept-Language` can contain the priority list of languages which should be returned. Always one language is returned as a single string field. Example: 'fr-CH, fr;q=0.9, en;q=0.8, de;q=0.7'
3631
+ * If the `Accept-Language` header is empty, the translation will be returned in the language defined in the `Configuration service` as default.
3632
+ */
3633
+ name?: string | {
3634
+ [key: string]: string;
3635
+ };
3636
+ metadata?: Metadata;
3637
+ };
3638
+ type ExchangeRateUpdateRequest = {
3639
+ /**
3640
+ * Represents the exchange rate.
3641
+ *
3642
+ * The value of the field is represented by a number where the cent part is separated by a comma. For example, `1.09`. The cent part is not limited just to two digits. A rate with any precision can be returned. For example: `1.09193421`
3643
+ */
3644
+ rate: string;
3645
+ metadata: UpdateMetadata;
3646
+ };
3647
+ type ExchangeRateCreationRequest = {
3648
+ /**
3649
+ * The source currency code. The currency symbol must consist of three capital letters and must be a valid ISO-4217 code (https://www.iso.org/iso-4217-currency-codes.html) defined in the system.
3650
+ */
3651
+ sourceCurrency: string;
3652
+ /**
3653
+ * The target currency code. The currency symbol must consist of three capital letters and must be a valid ISO-4217 code (https://www.iso.org/iso-4217-currency-codes.html) defined in the system.
3654
+ */
3655
+ targetCurrency: string;
3656
+ /**
3657
+ * Represents the exchange rate.
3658
+ *
3659
+ * The value of the field is represented by a number where the cent part is separated by a comma. For example `1.09`. The cent part is not limited just to two digits. A rate with any precision can be returned. For example: `1.091934212`
3660
+ */
3661
+ rate: string;
3662
+ };
3663
+ type ExchangeRateRetrieval = {
3664
+ /**
3665
+ * Identifier of the exchange rate. The identifier consists of the source currency and the target currency separated by an underscore.
3666
+ */
3667
+ code?: string;
3668
+ /**
3669
+ * Source currency code. The currency symbol must consist of three capital letters and must be a valid ISO-4217 code (https://www.iso.org/iso-4217-currency-codes.html) defined in the system.
3670
+ */
3671
+ sourceCurrency?: string;
3672
+ /**
3673
+ * Target currency code. The currency symbol must consist of three capital letters and must be a valid ISO-4217 code (https://www.iso.org/iso-4217-currency-codes.html) defined in the system.
3674
+ */
3675
+ targetCurrency?: string;
3676
+ /**
3677
+ * Represents the exchange rate.
3678
+ *
3679
+ * The value of the field is represented by a number where the cent part is separated by a dot. For example `1.09`. The cent part is not limited just to two digits. A rate with any precision can be returned. For example: `1.091934212`
3680
+ */
3681
+ rate?: string;
3682
+ metadata?: Metadata;
3683
+ };
3684
+
3685
+ /**
3686
+ * Public types for the Currency Service — stable names aliased over the
3687
+ * generated `currency-service` types. The list endpoints return plain arrays.
3688
+ */
3689
+
3690
+ /** A currency (read shape). */
3691
+ type Currency = CurrencyRetrieval;
3692
+ /** List of currencies (`GET /currencies`) — a plain array. */
3693
+ type CurrencyList = CurrencyRetrieval[];
3694
+ /** Create body (`POST /currencies`). */
3695
+ type CurrencyInput = CurrencyCreation;
3696
+ /** Update body (`PUT /currencies/{code}`). */
3697
+ type CurrencyUpdate = CurrencyUpdate$1;
3698
+ /** `POST /currencies` (201) response. */
3699
+ type CurrencyCreated = CurrencyCreationResponse;
3700
+ /** An exchange rate (read shape). */
3701
+ type ExchangeRate = ExchangeRateRetrieval;
3702
+ /** List of exchange rates (`GET /exchanges`) — a plain array. */
3703
+ type ExchangeRateList = ExchangeRateRetrieval[];
3704
+ /** Create body (`POST /exchanges`). */
3705
+ type ExchangeRateInput = ExchangeRateCreationRequest;
3706
+ /** Update body (`PUT /exchanges/{code}`). */
3707
+ type ExchangeRateUpdate = ExchangeRateUpdateRequest;
3708
+ /** `POST /exchanges` (201) response. */
3709
+ type ExchangeRateCreated = ExchangeRateResponse;
3710
+
3711
+ /**
3712
+ * Emporix Currency Service (`/currency/{tenant}/…`): currencies and exchange
3713
+ * rates. Server-side; defaults to the service token.
3714
+ */
3715
+ declare class CurrencyService {
3716
+ private readonly ctx;
3717
+ constructor(ctx: ClientContext);
3718
+ private base;
3719
+ /** List all currencies. */
3720
+ listCurrencies(query?: Record<string, string | number>, auth?: AuthContext): Promise<CurrencyList>;
3721
+ /** Retrieve one currency by code. */
3722
+ getCurrency(code: string, auth?: AuthContext): Promise<Currency>;
3723
+ /** Create a currency. */
3724
+ createCurrency(input: CurrencyInput, auth?: AuthContext): Promise<CurrencyCreated>;
3725
+ /** Update a currency by code. */
3726
+ updateCurrency(code: string, input: CurrencyUpdate, auth?: AuthContext): Promise<Currency>;
3727
+ /** Delete a currency by code. */
3728
+ deleteCurrency(code: string, auth?: AuthContext): Promise<void>;
3729
+ /** List all exchange rates. */
3730
+ listExchangeRates(query?: Record<string, string | number>, auth?: AuthContext): Promise<ExchangeRateList>;
3731
+ /** Retrieve one exchange rate by code. */
3732
+ getExchangeRate(code: string, auth?: AuthContext): Promise<ExchangeRate>;
3733
+ /** Create an exchange rate. */
3734
+ createExchangeRate(input: ExchangeRateInput, auth?: AuthContext): Promise<ExchangeRateCreated>;
3735
+ /** Update an exchange rate by code. */
3736
+ updateExchangeRate(code: string, input: ExchangeRateUpdate, auth?: AuthContext): Promise<ExchangeRate>;
3737
+ /** Delete an exchange rate by code. */
3738
+ deleteExchangeRate(code: string, auth?: AuthContext): Promise<void>;
3739
+ }
3740
+
3741
+ type ActualDeliveryWindows = Array<ActualDeliveryWindow>;
3742
+ type Patch = Array<{
3743
+ /**
3744
+ * Indicates an operation which should be done. Available operations: `add`, `remove` and `replace`
3745
+ */
3746
+ op?: string;
3747
+ /**
3748
+ * Indicates a path for which the value should be applied. For example: `/shippingMethod`, `/cutOffTime/day`
3749
+ */
3750
+ path?: string;
3751
+ /**
3752
+ * Indicates a value that should be changed or added. The value can be of a primitive type, like string, number, boolean or it can be an object or an array.
3753
+ */
3754
+ value?: string | {
3755
+ [key: string]: unknown;
3756
+ };
3757
+ }>;
3758
+ /**
3759
+ * Delivery window is a range of times when the shipment can be delivered to the customers.
3760
+ */
3761
+ type ActualDeliveryWindow = {
3762
+ /**
3763
+ * Delivery window’s unique identifier.
3764
+ */
3765
+ id?: string;
3766
+ /**
3767
+ * Delivery date compliant with the ISO 8601 standard.
3768
+ */
3769
+ deliveryDate: string;
3770
+ deliveryTimeRange?: TimeRange;
3771
+ /**
3772
+ * Delivery cycle.
3773
+ */
3774
+ deliveryCycle?: string;
3775
+ /**
3776
+ * Delivery zone’s unique identifier.
3777
+ */
3778
+ zoneId?: string;
3779
+ /**
3780
+ * Delivery method name.
3781
+ */
3782
+ deliveryMethod?: string;
3783
+ /**
3784
+ * This denotes the latest point in time by which an action (such as an order or request) must be completed for a specific Delivery Time. Date is compliant with the ISO 8601 standard.
3785
+ */
3786
+ cutOffTime?: string;
3787
+ /**
3788
+ * Delivery time slot's unique identifier.
3789
+ */
3790
+ slotId?: string;
3791
+ metadata?: MetaData;
3792
+ };
3793
+ type BasicDeliveryTime = {
3794
+ /**
3795
+ * Delivery Time ID: Autogenerated (if not provided in request) or User-Defined
3796
+ */
3797
+ id?: string;
3798
+ /**
3799
+ * Optional name for Delivery Time
3800
+ */
3801
+ name?: string;
3802
+ /**
3803
+ * Site code for which the Delivery Time is assigned
3804
+ */
3805
+ siteCode: string;
3806
+ /**
3807
+ * `true` indicates that the Delivery Time holds delivery date information, whereas `false` represents that the Delivery Time configuration has disabled delivery for a specific date or time period.
3808
+ */
3809
+ isDeliveryDay: boolean;
3810
+ /**
3811
+ * ID of the delivery zone for which the Delivery Time is valid
3812
+ */
3813
+ zoneId?: string;
3814
+ day: DeliveryDay;
3815
+ /**
3816
+ * This attribute holds information about the established timeslots and cut-off times that are set up for a specific Delivery Time
3817
+ */
3818
+ slots?: Array<SlotCreation>;
3819
+ /**
3820
+ * Flag which indicates if the non-delivery time is defined for the same day, period or weekday for all zones of the site
3821
+ */
3822
+ isForAllZones?: boolean;
3823
+ /**
3824
+ * Id of the time zone for which the Delivery Time should be created (e.g. Europe/Warsaw).
3825
+ */
3826
+ timeZoneId: string;
3827
+ /**
3828
+ * Indicates in how many days the order has been delivered when the order has been completed before cut-off time.
3829
+ */
3830
+ deliveryDayShift?: number;
3831
+ };
3832
+ type DeliveryTime$1 = BasicDeliveryTime & {
3833
+ metadata?: MetaData;
3834
+ };
3835
+ type UpdateDeliveryTime = BasicDeliveryTime & {
3836
+ /**
3837
+ * metadata of the document
3838
+ */
3839
+ metadata?: {
3840
+ /**
3841
+ * version of the document
3842
+ */
3843
+ version: number;
3844
+ };
3845
+ };
3846
+ type SlotCreation = {
3847
+ /**
3848
+ * Delivery Time Slot ID: Autogenerated (if not provided in request) or User-Defined
3849
+ */
3850
+ id?: string;
3851
+ /**
3852
+ * Selected shipping method which is available for the Delivery Time in the given Time Slot
3853
+ */
3854
+ shippingMethod: string;
3855
+ deliveryTimeRange: DeliveryTimeRange;
3856
+ cutOffTime: CutOffTIme;
3857
+ /**
3858
+ * A capacity determines how many orders the given Delivery Time Slot can handle
3859
+ */
3860
+ capacity: number;
3861
+ };
3862
+ /**
3863
+ * Object which encapsulates all the fields needed to generate delivery cycle.
3864
+ */
3865
+ type DeliveryCycle = {
3866
+ /**
3867
+ * A unique identifier for the overall delivery time period or range.
3868
+ */
3869
+ deliveryTimeId: string;
3870
+ /**
3871
+ * A unique identifier that represents a specific delivery slot within the delivery time.
3872
+ */
3873
+ slotId: string;
3874
+ /**
3875
+ * The selected delivery date.
3876
+ */
3877
+ deliveryDate: string;
3878
+ };
3879
+ /**
3880
+ * This attribute holds the time configuration for which the Delivery Time is valid. Only a single attribute can be set at any given moment.
3881
+ */
3882
+ type DeliveryDay = {
3883
+ /**
3884
+ * Enum containing names of weekdays, possible values: `MONDAY`, `TUESDAY`, `WEDNESDAY`, `THURSDAY`, `FRIDAY`, `SATURDAY`, `SUNDAY`
3885
+ */
3886
+ weekday?: string;
3887
+ /**
3888
+ * Date for which the delivery time is valid, compliant with the ISO 8601 standard. Dates should be provided at 12:00:00 local time and send in ISO 8601 standard (e.g. For Europe/Warsaw timezone, the 10:00 should be sent - 2023-06-12T10:00:00.000Z).
3889
+ */
3890
+ singleDate?: string;
3891
+ /**
3892
+ * Date period for which the Delivery Time is valid. Dates should be provided at 12:00:00 local time and send in ISO 8601 standard (e.g. For Europe/Warsaw timezone, the 10:00 should be sent - 2023-06-12T10:00:00.000Z).
3893
+ */
3894
+ datePeriod?: {
3895
+ /**
3896
+ * Date from which the delivery time is valid, compliant with the ISO 8601 standard.
3897
+ */
3898
+ dateFrom: string;
3899
+ /**
3900
+ * Date to which the delivery time is valid, compliant with the ISO 8601 standard.
3901
+ */
3902
+ dateTo: string;
3903
+ };
3904
+ };
3905
+ /**
3906
+ * This denotes the latest point in time by which an action (such as an order or request) must be completed for a specific Delivery Time. This attribute is key in determining the end of a time window for certain operations and helps maintain efficiency in the delivery process.
3907
+ */
3908
+ type CutOffTIme = {
3909
+ /**
3910
+ * The cut-off time refers to the deadline by which an order must be placed to be eligible for same-day processing and shipping. Date is compliant with the ISO 8601 standard, but only time is taking into account.
3911
+ */
3912
+ time: string;
3913
+ /**
3914
+ * Indicates in how many days the order has been delivered when the order has been completed before cut-off time. Property is only available for delivery times of weekday type.
3915
+ */
3916
+ cutOffDayShift?: number;
3917
+ /**
3918
+ * An optional suffix that is added to delivery cycle name
3919
+ */
3920
+ deliveryCycleName?: string;
3921
+ };
3922
+ /**
3923
+ * A `from` to `to` time range for which the object is valid
3924
+ */
3925
+ type TimeRange = {
3926
+ /**
3927
+ * Time from which the object is valid, provided in local time (e.g. 10:00)
3928
+ */
3929
+ startTime: string;
3930
+ /**
3931
+ * Time to which the object is valid, provided in local time (e.g. 10:00).
3932
+ */
3933
+ endTime: string;
3934
+ };
3935
+ /**
3936
+ * A `from` to `to` time range for which the object is valid
3937
+ */
3938
+ type DeliveryTimeRange = {
3939
+ /**
3940
+ * Time from which the object is valid, provided in local time (e.g. 10:00)
3941
+ */
3942
+ timeFrom: string;
3943
+ /**
3944
+ * Time to which the object is valid, provided in local time (e.g. 10:00).
3945
+ */
3946
+ timeTo: string;
3947
+ };
3948
+ type MetaData = {
3949
+ /**
3950
+ * Date and time when the object was created, compliant with the ISO 8601 format.
3951
+ */
3952
+ createdAt?: string;
3953
+ /**
3954
+ * Date and time when the object was last modified, compliant with the ISO 8601 format.
3955
+ */
3956
+ modifiedAt?: string;
3957
+ version?: number;
3958
+ };
3959
+ type Sites = Array<Site>;
3960
+ /**
3961
+ * A site is a specific virtual or real shop.
3962
+ */
3963
+ type Site = {
3964
+ /**
3965
+ * Site unique identifier.
3966
+ */
3967
+ id?: string;
3968
+ /**
3969
+ * Default shippingzone’s unique identifier. A shipping zone is an area where shipments can be delivered.
3970
+ */
3971
+ defaultZoneId?: string;
3972
+ zones?: Array<ZoneWithActualDeliveryWindows>;
3973
+ metadata?: MetaData;
3974
+ };
3975
+ type Zones = Array<Zone$1>;
3976
+ /**
3977
+ * The zone is an area where shipments can be delivered.
3978
+ */
3979
+ type Zone$1 = {
3980
+ /**
3981
+ * Delivery zone's unique identifier.
3982
+ */
3983
+ id: string;
3984
+ /**
3985
+ * Flag indicating whether the zone is the default delivery zone for the site.
3986
+ */
3987
+ default?: boolean;
3988
+ name: LocalizedValue;
3989
+ shipTo: ShipTo;
3990
+ methods?: Methods;
3991
+ };
3992
+ type ZoneWithActualDeliveryWindows = Zone$1 & {
3993
+ actualDeliveryWindows?: ActualDeliveryWindows;
3994
+ };
3995
+ /**
3996
+ * Link to created resource with unique resource identifier.
3997
+ */
3998
+ type ResourceCreatedResponse = {
3999
+ /**
4000
+ * Created resource’s unique identifier.
4001
+ */
4002
+ id?: string;
4003
+ };
4004
+ type Methods = Array<Method>;
4005
+ /**
4006
+ * Shipping methods define the types of deliveries and properties such as delivery fees.
4007
+ */
4008
+ type Method = {
4009
+ id: string;
4010
+ name: LocalizedValue;
4011
+ maxOrderValue?: MonetaryAmount;
4012
+ /**
4013
+ * Flag indicating whether the shipping method is active.
4014
+ */
4015
+ active?: boolean;
4016
+ fees: Fees;
4017
+ /**
4018
+ * Shipping method's tax code.
4019
+ */
4020
+ shippingTaxCode?: string;
4021
+ /**
4022
+ * Shipping groups unique identifier.
4023
+ */
4024
+ shippingGroupId?: string;
4025
+ };
4026
+ type Fees = Array<Fee>;
4027
+ /**
4028
+ * Fee is a shipping cost for a given shipping method and parameters.
4029
+ */
4030
+ type Fee = {
4031
+ cost: MonetaryAmount;
4032
+ minOrderValue: MonetaryAmount;
4033
+ /**
4034
+ * Shipping group unique identifier.
4035
+ */
4036
+ shippingGroupId?: string;
4037
+ };
4038
+ /**
4039
+ * Amount of money in a given currency.
4040
+ */
4041
+ type MonetaryAmount = {
4042
+ /**
4043
+ * Three-letter currency code, compliant with the ISO 4217 standard.
4044
+ */
4045
+ currency: string;
4046
+ /**
4047
+ * Amount in specified currency.
4048
+ */
4049
+ amount: number;
4050
+ };
4051
+ /**
4052
+ * Payload with parameters for price finding.
4053
+ */
4054
+ type FindSiteRequest = {
4055
+ /**
4056
+ * Postal code containing numbers and/or letters.
4057
+ */
4058
+ postalCode: string;
4059
+ /**
4060
+ * ISO2 or ISO3 formatted country code.
4061
+ */
4062
+ country?: string;
4063
+ };
4064
+ /**
4065
+ * Collection of shipping destinations
4066
+ */
4067
+ type ShipTo = Array<ShipToItem>;
4068
+ /**
4069
+ * Shipping destination containing country and postal code.
4070
+ */
4071
+ type ShipToItem = {
4072
+ /**
4073
+ * ISO2 or ISO3 formatted country code.
4074
+ */
4075
+ country: string;
4076
+ /**
4077
+ * PostalCode containing numbers and/or letters. Can be incomplete and followed by single '*' to match all the postalCodes starting with the same numbers/letters.
4078
+ */
4079
+ postalCode?: string;
4080
+ };
4081
+ /**
4082
+ * Example of payload for shipping cost calculation.
4083
+ */
4084
+ type QuotePayload = {
4085
+ /**
4086
+ * Customer unique identifier.
4087
+ */
4088
+ customerId?: string;
4089
+ /**
4090
+ * Total amount for the given cart.
4091
+ */
4092
+ cartTotal: {
4093
+ /**
4094
+ * Amount in specified currency.
4095
+ */
4096
+ amount: number;
4097
+ /**
4098
+ * Three-letter currency code, compliant with the ISO 4217 standard.
4099
+ */
4100
+ currency: string;
4101
+ };
4102
+ shipFromAddress?: Address;
4103
+ shipToAddress: Address;
4104
+ };
4105
+ /**
4106
+ * Example of payload for shipping cost calculation.
4107
+ */
4108
+ type QuoteSlot = {
4109
+ /**
4110
+ * Customer unique identifier.
4111
+ */
4112
+ customerId?: string;
4113
+ /**
4114
+ * Total amount for the given cart.
4115
+ */
4116
+ cartTotal: {
4117
+ /**
4118
+ * Amount in specified currency.
4119
+ */
4120
+ amount: number;
4121
+ /**
4122
+ * Three-letter currency code, compliant with the ISO 4217 standard.
4123
+ */
4124
+ currency: string;
4125
+ };
4126
+ shipFromAddress?: Address;
4127
+ shipToAddress?: Address;
4128
+ /**
4129
+ * The `slotId`` which the quote should be calculated for.
4130
+ */
4131
+ slotId: string;
4132
+ /**
4133
+ * The delivery window id which the slot with selected shipping method exists for.
4134
+ */
4135
+ deliveryWindowId: string;
4136
+ };
4137
+ /**
4138
+ * Address of billing or delivery that contains customer or company name and location including street, street number, zipcode, and country.
4139
+ */
4140
+ type Address = {
4141
+ /**
4142
+ * Name of the street.
4143
+ */
4144
+ street?: string;
4145
+ streetNumber?: string;
4146
+ extraLine1?: string;
4147
+ extraLine2?: string;
4148
+ extraLine3?: string;
4149
+ extraLine4?: string;
4150
+ zipCode: string;
4151
+ city?: string;
4152
+ state?: string;
4153
+ country: string;
4154
+ };
4155
+ /**
4156
+ * Example quote response which contains a list of fees for various methods and delivery zone.
4157
+ */
4158
+ type QuoteResponse = Array<QuoteResponseItem>;
4159
+ /**
4160
+ * Example quote response which contains fee for specific method and zone.
4161
+ */
4162
+ type QuoteResponseItem = {
4163
+ zone?: {
4164
+ /**
4165
+ * Delivery zone's unique identifier.
4166
+ */
4167
+ id?: string;
4168
+ name?: LocalizedValue;
4169
+ };
4170
+ methods?: Array<QuoteResponseMethods>;
4171
+ };
4172
+ /**
4173
+ * Example quote response which contains fee for specific method.
4174
+ */
4175
+ type QuoteResponseMethods = {
4176
+ id?: string;
4177
+ name?: LocalizedValue;
4178
+ fee?: MonetaryAmount;
4179
+ shippingTaxCode?: string;
4180
+ };
4181
+ type LocalizedValue = string | {
4182
+ [key: string]: string;
4183
+ };
4184
+ /**
4185
+ * Minimum available delivery fee for given parameters.
4186
+ */
4187
+ type MinimumFee$1 = {
4188
+ fee?: MonetaryAmount;
4189
+ };
4190
+ /**
4191
+ * Shipping groups can be used for customer grouping with use customer group relations.
4192
+ */
4193
+ type Group = {
4194
+ /**
4195
+ * Delivery group unique identifier.
4196
+ */
4197
+ id: string;
4198
+ description?: LocalizedValue;
4199
+ };
4200
+ /**
4201
+ * Collection of shipping groups.
4202
+ */
4203
+ type GroupList = Array<Group>;
4204
+ /**
4205
+ * Customer-group relation allows to assign user for specific group.
4206
+ */
4207
+ type CgRelation$1 = {
4208
+ /**
4209
+ * Customer unique identifier.
4210
+ */
4211
+ customerId?: string;
4212
+ /**
4213
+ * Group's unique identifier.
4214
+ */
4215
+ groupId?: string;
4216
+ };
4217
+ type CgRelationList$1 = Array<CgRelation$1>;
4218
+ type DeliveryWindowValidationDto = {
4219
+ /**
4220
+ * The selected delivery window
4221
+ */
4222
+ deliveryWindowId: string;
4223
+ /**
4224
+ * The selected delivery date
4225
+ */
4226
+ deliveryDate: string;
4227
+ /**
4228
+ * The slot that was selected for the delivery.
4229
+ */
4230
+ slotId?: string;
4231
+ };
4232
+
4233
+ /**
4234
+ * Public types for the Shipping Service (Phase 1 — config). Stable names aliased
4235
+ * over the generated `shipping` types. Zone/Method/Group/CgRelation use the same
4236
+ * schema for read and write bodies; creates return `ResourceCreated`.
4237
+ */
4238
+
4239
+ /** `findSites` response (array of sites). */
4240
+ type SiteList = Sites;
4241
+ /** `findSites` request body. */
4242
+ type FindSiteInput = FindSiteRequest;
4243
+ /** A shipping zone (read + write body). */
4244
+ type Zone = Zone$1;
4245
+ /** List of shipping zones. */
4246
+ type ZoneList = Zones;
4247
+ /** A shipping method (read + write body). */
4248
+ type ShippingMethod = Method;
4249
+ /** List of shipping methods. */
4250
+ type ShippingMethodList = Methods;
4251
+ /** A shipping group (read + write body). */
4252
+ type ShippingGroup = Group;
4253
+ /** List of shipping groups. */
4254
+ type ShippingGroupList = GroupList;
4255
+ /** A customer-group relation (read + write body). */
4256
+ type CgRelation = CgRelation$1;
4257
+ /** List of customer-group relations. */
4258
+ type CgRelationList = CgRelationList$1;
4259
+ /** Body for `quote` / `quoteMinimum`. */
4260
+ type QuoteInput = QuotePayload;
4261
+ /** `quote` result. */
4262
+ type QuoteResult = QuoteResponse;
4263
+ /** Body for `quoteSlot`. */
4264
+ type QuoteSlotInput = QuoteSlot;
4265
+ /** `quoteMinimum` / `quoteSlot` result. */
4266
+ type MinimumFee = MinimumFee$1;
4267
+ /** Shared create response (resource location). */
4268
+ type ResourceCreated = ResourceCreatedResponse;
4269
+ /** A delivery window for a cart/area. */
4270
+ type DeliveryWindow = ActualDeliveryWindow;
4271
+ /** List of delivery windows. */
4272
+ type DeliveryWindowList = ActualDeliveryWindows;
4273
+ /** Body for delivery-window validation / counter increment. */
4274
+ type DeliveryWindowValidation = DeliveryWindowValidationDto;
4275
+ /** A delivery time (read shape). */
4276
+ type DeliveryTime = DeliveryTime$1;
4277
+ /** List of delivery times (`GET /delivery-times`). */
4278
+ type DeliveryTimeList = DeliveryTime[];
4279
+ /** Create body (`POST /delivery-times`). */
4280
+ type DeliveryTimeInput = BasicDeliveryTime;
4281
+ /** Update body (`PUT /delivery-times/{id}`). */
4282
+ type DeliveryTimeUpdate = UpdateDeliveryTime;
4283
+ /** A delivery time slot (read + write body). */
4284
+ type DeliverySlot = SlotCreation;
4285
+ /** List of delivery time slots. */
4286
+ type DeliverySlotList = DeliverySlot[];
4287
+ /** Body for `generateDeliveryCycle`. */
4288
+ type DeliveryCycleInput = DeliveryCycle;
4289
+ /** JSON-Patch op-array (used by `patchDeliveryTime` / `patchSlot`). */
4290
+ type ShippingPatch = Patch;
4291
+ /** Inline create response — the created resource's `{ id }`. */
4292
+ interface DeliveryCreated {
4293
+ id?: string;
4294
+ }
4295
+
4296
+ /**
4297
+ * Emporix Shipping Service (`/shipping/{tenant}/…`), Phase 1 — config: sites,
4298
+ * zones, methods, cost/quote, groups, customer-group relations. Server-side;
4299
+ * defaults to the service token. Most methods are site-scoped and take `site`
4300
+ * first; `findSites` is tenant-level. Delivery scheduling is Phase 2.
4301
+ */
4302
+ declare class ShippingService {
4303
+ private readonly ctx;
4304
+ constructor(ctx: ClientContext);
4305
+ private base;
4306
+ private siteBase;
4307
+ /** Find shipping-related sites by postal code (`POST /findSite`). */
4308
+ findSites(input: FindSiteInput, auth?: AuthContext): Promise<SiteList>;
4309
+ /** List shipping zones for a site. */
4310
+ listZones(site: string, query?: Record<string, string | number>, auth?: AuthContext): Promise<ZoneList>;
4311
+ /** Retrieve one shipping zone. */
4312
+ getZone(site: string, zoneId: string, auth?: AuthContext): Promise<Zone>;
4313
+ /** Create a shipping zone. */
4314
+ createZone(site: string, zone: Zone, auth?: AuthContext): Promise<ResourceCreated>;
4315
+ /** Replace a shipping zone. */
4316
+ updateZone(site: string, zoneId: string, zone: Zone, auth?: AuthContext): Promise<void>;
4317
+ /** Partially update a shipping zone. */
4318
+ patchZone(site: string, zoneId: string, patch: Zone, auth?: AuthContext): Promise<void>;
4319
+ /** Delete a shipping zone. */
4320
+ deleteZone(site: string, zoneId: string, auth?: AuthContext): Promise<void>;
4321
+ /** List shipping methods of a zone. */
4322
+ listMethods(site: string, zoneId: string, query?: Record<string, string | number>, auth?: AuthContext): Promise<ShippingMethodList>;
4323
+ /** Retrieve one shipping method. */
4324
+ getMethod(site: string, zoneId: string, methodId: string, auth?: AuthContext): Promise<ShippingMethod>;
4325
+ /** Create a shipping method in a zone. */
4326
+ createMethod(site: string, zoneId: string, method: ShippingMethod, auth?: AuthContext): Promise<ResourceCreated>;
4327
+ /** Replace a shipping method. */
4328
+ updateMethod(site: string, zoneId: string, methodId: string, method: ShippingMethod, auth?: AuthContext): Promise<void>;
4329
+ /** Partially update a shipping method. */
4330
+ patchMethod(site: string, zoneId: string, methodId: string, patch: ShippingMethod, auth?: AuthContext): Promise<void>;
4331
+ /** Delete a shipping method. */
4332
+ deleteMethod(site: string, zoneId: string, methodId: string, auth?: AuthContext): Promise<void>;
4333
+ /** Calculate the final shipping cost (`POST /quote`). */
4334
+ quote(site: string, input: QuoteInput, auth?: AuthContext): Promise<QuoteResult>;
4335
+ /** Calculate the minimum shipping cost (`POST /quote/minimum`). */
4336
+ quoteMinimum(site: string, input: QuoteInput, auth?: AuthContext): Promise<MinimumFee>;
4337
+ /** Calculate the shipping cost for a given slot (`POST /quote/slot`). */
4338
+ quoteSlot(site: string, input: QuoteSlotInput, auth?: AuthContext): Promise<MinimumFee>;
4339
+ /** List shipping groups for a site. */
4340
+ listGroups(site: string, query?: Record<string, string | number>, auth?: AuthContext): Promise<ShippingGroupList>;
4341
+ /** Retrieve one shipping group. */
4342
+ getGroup(site: string, groupId: string, auth?: AuthContext): Promise<ShippingGroup>;
4343
+ /** Create a shipping group. */
4344
+ createGroup(site: string, group: ShippingGroup, auth?: AuthContext): Promise<ResourceCreated>;
4345
+ /** Replace a shipping group. */
4346
+ updateGroup(site: string, groupId: string, group: ShippingGroup, auth?: AuthContext): Promise<void>;
4347
+ /** Delete a shipping group. */
4348
+ deleteGroup(site: string, groupId: string, auth?: AuthContext): Promise<void>;
4349
+ /** List customer-group relations for a site. */
4350
+ listCgRelations(site: string, query?: Record<string, string | number>, auth?: AuthContext): Promise<CgRelationList>;
4351
+ /** Retrieve a customer's customer-group relations. */
4352
+ getCgRelations(site: string, customerId: string, auth?: AuthContext): Promise<CgRelation>;
4353
+ /** Create a customer-group relation. */
4354
+ createCgRelation(site: string, relation: CgRelation, auth?: AuthContext): Promise<ResourceCreated>;
4355
+ /** Update a customer's customer-group relations. */
4356
+ updateCgRelations(site: string, customerId: string, relation: CgRelation, auth?: AuthContext): Promise<void>;
4357
+ /** Delete a customer's customer-group relation. */
4358
+ deleteCgRelation(site: string, customerId: string, auth?: AuthContext): Promise<void>;
4359
+ /** Retrieve delivery windows for a delivery area + cart. */
4360
+ getAreaDeliveryWindows(deliveryAreaId: string, cartId: string, auth?: AuthContext): Promise<DeliveryWindowList>;
4361
+ /** Retrieve delivery windows for a cart. */
4362
+ getCartDeliveryWindows(cartId: string, auth?: AuthContext): Promise<DeliveryWindowList>;
4363
+ /** Increment the delivery-window counter. */
4364
+ incrementDeliveryWindowCounter(input: DeliveryWindowValidation, auth?: AuthContext): Promise<void>;
4365
+ /** Validate a delivery window. Resolves when valid; throws otherwise. */
4366
+ validateDeliveryWindow(input: DeliveryWindowValidation, auth?: AuthContext): Promise<void>;
4367
+ /** List all delivery times. */
4368
+ listDeliveryTimes(query?: Record<string, string | number>, auth?: AuthContext): Promise<DeliveryTimeList>;
4369
+ /** Retrieve one delivery time. */
4370
+ getDeliveryTime(deliveryTimeId: string, auth?: AuthContext): Promise<DeliveryTime>;
4371
+ /** Create a delivery time. */
4372
+ createDeliveryTime(input: DeliveryTimeInput, auth?: AuthContext): Promise<DeliveryCreated>;
4373
+ /** Create multiple delivery times (`POST /delivery-times/bulk`). */
4374
+ createDeliveryTimesBulk(inputs: DeliveryTimeInput[], auth?: AuthContext): Promise<DeliveryCreated[]>;
4375
+ /** Replace a delivery time. */
4376
+ updateDeliveryTime(deliveryTimeId: string, input: DeliveryTimeUpdate, auth?: AuthContext): Promise<void>;
4377
+ /** Partially update a delivery time (JSON-Patch op array). */
4378
+ patchDeliveryTime(deliveryTimeId: string, ops: ShippingPatch, auth?: AuthContext): Promise<void>;
4379
+ /** Delete a delivery time. */
4380
+ deleteDeliveryTime(deliveryTimeId: string, auth?: AuthContext): Promise<void>;
4381
+ /** List slots of a delivery time. */
4382
+ listSlots(deliveryTimeId: string, auth?: AuthContext): Promise<DeliverySlotList>;
4383
+ /** Retrieve one slot. */
4384
+ getSlot(deliveryTimeId: string, slotId: string, auth?: AuthContext): Promise<DeliverySlot>;
4385
+ /** Create a slot in a delivery time. */
4386
+ createSlot(deliveryTimeId: string, input: DeliverySlot, auth?: AuthContext): Promise<DeliveryCreated>;
4387
+ /** Replace a slot. */
4388
+ updateSlot(deliveryTimeId: string, slotId: string, input: DeliverySlot, auth?: AuthContext): Promise<void>;
4389
+ /** Partially update a slot (JSON-Patch op array). */
4390
+ patchSlot(deliveryTimeId: string, slotId: string, ops: ShippingPatch, auth?: AuthContext): Promise<void>;
4391
+ /** Delete a slot. */
4392
+ deleteSlot(deliveryTimeId: string, slotId: string, auth?: AuthContext): Promise<void>;
4393
+ /** Delete all slots of a delivery time. */
4394
+ deleteAllSlots(deliveryTimeId: string, auth?: AuthContext): Promise<void>;
4395
+ /** Generate a delivery cycle (`POST /delivery-cycles/generate`). Returns the cycle id. */
4396
+ generateDeliveryCycle(input: DeliveryCycleInput, auth?: AuthContext): Promise<string>;
4397
+ }
4398
+
4399
+ /**
4400
+ * Price calculation derived from the order entry `calculatedPrice.finalPrice`. The `finalPrice` reflects already applied discounts and fees.
4401
+ */
4402
+ type CalculatedPrice = {
4403
+ /**
4404
+ * Net value of the price.
4405
+ */
4406
+ netValue?: number;
4407
+ /**
4408
+ * Gross value of the price.
4409
+ */
4410
+ grossValue?: number;
4411
+ /**
4412
+ * Tax value of the price.
4413
+ */
4414
+ taxValue?: number;
4415
+ /**
4416
+ * Tax code applied to the price. Set to `null` when items with different tax codes are aggregated.
4417
+ */
4418
+ taxCode?: string;
4419
+ /**
4420
+ * Tax rate applied to the price. Set to `null` when items with different tax rates are aggregated.
4421
+ */
4422
+ taxRate?: number;
4423
+ };
4424
+ /**
4425
+ * Wrapper for the calculated price containing the final price after discounts and fees.
4426
+ */
4427
+ type CalculatedFinalPrice = {
4428
+ finalPrice?: CalculatedPrice;
4429
+ };
4430
+ /**
4431
+ * Core metadata fields shared across multiple objects.
4432
+ */
4433
+ type MetadataCore = {
4434
+ /**
4435
+ * Links to the mixin schemas.
4436
+ */
4437
+ mixins?: {
4438
+ [key: string]: string;
4439
+ };
4440
+ };
4441
+ /**
4442
+ * Metadata fields required when updating an existing object.
4443
+ */
4444
+ type MetadataUpdate = MetadataCore & {
4445
+ /**
4446
+ * Version of the object. The version is required during the update operation because of the optimistic locking mechanism.
4447
+ */
4448
+ version: number;
4449
+ };
4450
+ /**
4451
+ * Metadata fields returned by the API.
4452
+ * Extends `metadataUpdate` with timestamps indicating when the object
4453
+ * was created and last modified.
4454
+ *
4455
+ */
4456
+ type MetadataResponse = MetadataUpdate & {
4457
+ /**
4458
+ * Date and time when the object was created. The value is returned as an ISO-8601 representation of an Instant. For example: `2022-04-31T13:18:02.379Z`
4459
+ */
4460
+ createdAt?: string;
4461
+ /**
4462
+ * Date and time when the object was last modified. The value is returned as an ISO-8601 representation of an Instant. For example: `2022-04-31T13:18:02.379Z`
4463
+ */
4464
+ modifiedAt?: string;
4465
+ };
4466
+ /**
4467
+ * Base schema for a return.
4468
+ */
4469
+ type BasicReturn = {
4470
+ /**
4471
+ * A list of orders that contain items to be returned. All the orders must have the same currency.
4472
+ */
4473
+ orders: Array<Order>;
4474
+ /**
4475
+ * A reason why the return is created. One of the values needs to be provided: `code` or `details`.
4476
+ */
4477
+ reason: {
4478
+ /**
4479
+ * Code of a particular reason for return. A number which represents a reason why an order has been (fully or partially) returned.
4480
+ */
4481
+ code?: string;
4482
+ /**
4483
+ * Details why an order has been (fully or partially) returned.
4484
+ */
4485
+ details?: string;
4486
+ };
4487
+ /**
4488
+ * The field contains mixins values.
4489
+ */
4490
+ mixins?: {
4491
+ [key: string]: unknown;
4492
+ };
4493
+ metadata?: MetadataCore;
4494
+ };
4495
+ type BasicCustomerReturn = BasicReturn;
4496
+ /**
4497
+ * Base schema for returns created by an employee FOR A REGISTERED CUSTOMER.
4498
+ */
4499
+ type BasicEmployeeReturn = BasicEmployeeReturnBase & {
4500
+ /**
4501
+ * Indicates who requested the return. The field can be set and updated only by an employee, that is a person who has a `returns.returns_manage` scope granted. For a customer, who has the `returns.returns_manage_own` scope granted, the value is populated automatically based on an auth token.
4502
+ */
4503
+ requestor?: {
4504
+ /**
4505
+ * Identifier of a customer to whom the order and return belong.
4506
+ */
4507
+ customerId: string;
4508
+ };
4509
+ };
4510
+ /**
4511
+ * Base schema for returns created by an employee for an ANONYMOUS ORDER.
4512
+ */
4513
+ type EmployeeReturnForAnonymousOrder = BasicEmployeeReturnBase & {
4514
+ /**
4515
+ * Indicates who requested the return. The field can be set and updated only by an employee, that is a person who has a `returns.returns_manage` scope granted. For a customer, who has the `returns.returns_manage_own` scope granted, the value is populated automatically based on an auth token.
4516
+ */
4517
+ requestor?: {
4518
+ /**
4519
+ * Indicates that the request is related with anonymous orders
4520
+ */
4521
+ anonymous: boolean;
4522
+ /**
4523
+ * Email which has been used for anonymous order
4524
+ */
4525
+ email: string;
4526
+ /**
4527
+ * Identifier of a customer to whom the order and return belong.
4528
+ */
4529
+ customerId?: string;
4530
+ };
4531
+ };
4532
+ /**
4533
+ * Common structure for returns created by an employee on behalf of a customer.
4534
+ */
4535
+ type BasicEmployeeReturnBase = BasicReturn & {
4536
+ /**
4537
+ * Indicates who requested the return. The field can be set and updated only by an employee,
4538
+ * that is a person who has the `returns.returns_manage` scope granted.
4539
+ * For a customer with the `returns.returns_manage_own` scope, the value is populated
4540
+ * automatically based on an auth token.
4541
+ *
4542
+ */
4543
+ requestor: {
4544
+ [key: string]: unknown;
4545
+ };
4546
+ /**
4547
+ * Indicates who submitted the return. The return can be submitted by an employee
4548
+ * on behalf of a customer. In that case, the submitter and requestor are different entities.
4549
+ * This field can be set and updated only by an employee with the
4550
+ * `returns.returns_manage` scope granted.
4551
+ *
4552
+ */
4553
+ submitter: {
4554
+ /**
4555
+ * Requestor first name.
4556
+ */
4557
+ firstName: string;
4558
+ /**
4559
+ * Requestor last name.
4560
+ */
4561
+ lastName: string;
4562
+ /**
4563
+ * Requestor email address.
4564
+ */
4565
+ email: string;
4566
+ };
4567
+ /**
4568
+ * Information about the approver of the return. The return can be approved
4569
+ * by a particular user or a group of users. The field can be set and updated
4570
+ * only by an employee with the `returns.returns_manage` scope granted.
4571
+ *
4572
+ * The provided value is validated against the `iam-service`:
4573
+ * * If `type` is equal to `USER`, then the provided `id` must be a valid employee identifier
4574
+ * * If `type` is equal to `GROUP`, then the provided `id` must be a valid employee group identifier
4575
+ *
4576
+ */
4577
+ approver?: {
4578
+ /**
4579
+ * Indicates whether the return must be approved by a user or a group. Possible values: `USER` or `GROUP`.
4580
+ */
4581
+ type?: 'USER' | 'GROUP';
4582
+ /**
4583
+ * Identifier of a user or a user group depending on the `type` value.
4584
+ */
4585
+ id?: string;
4586
+ };
4587
+ /**
4588
+ * 'The date when a return expires. The field can be set and updated only by an employee
4589
+ * with the `returns.returns_manage` scope granted.
4590
+ *
4591
+ * If the value is not provided, the default value is fetched from the
4592
+ * `configuration-service` under the `return.defaultExpiryDate` key.
4593
+ *
4594
+ * If the configuration does not exist, a fallback of 30 days is applied.
4595
+ *
4596
+ */
4597
+ expiryDate?: string;
4598
+ };
4599
+ /**
4600
+ * Base schema for a return requested by a customer.
4601
+ */
4602
+ type UpdateCustomerReturn = {
4603
+ /**
4604
+ * Unique identifier of a return.
4605
+ */
4606
+ id?: string;
4607
+ } & BasicReturn & {
4608
+ metadata: MetadataUpdate;
4609
+ };
4610
+ /**
4611
+ * Base schema for a return requested by an employee.
4612
+ */
4613
+ type UpdateEmployeeReturn = UpdateCustomerReturn & {
4614
+ /**
4615
+ * Indicates the current status of the order. When an order is being created, its status is automatically set to PENDING. An approver can change the status to `APPROVED` or `REJECTED`. A customer can change the status to `CLOSED`.
4616
+ */
4617
+ approvalStatus: 'PENDING' | 'APPROVED' | 'REJECTED' | 'CLOSED';
4618
+ /**
4619
+ * Indicates whether the items from the return have been received.
4620
+ */
4621
+ received?: boolean;
4622
+ /**
4623
+ * Indicates who requested the return. The field can be updated only by an employee, that is a person who has the `returns.returns_manage` scope granted.
4624
+ */
4625
+ requestor: {
4626
+ /**
4627
+ * Identifier of a customer to whom the order and return belong.
4628
+ */
4629
+ customerId: string;
4630
+ };
4631
+ /**
4632
+ * Indicates who submitted the return. The return can be submitted by an employee on behalf of a customer. In that case, the submitter and requestor data is different. The field can be set and updated only by an employee, that is a person who has the `returns.returns_manage` scope granted. For a customer, who has the `returns.returns_manage_own` scope granted, the value is populated automatically based on an auth token.
4633
+ */
4634
+ submitter: {
4635
+ /**
4636
+ * Requestor first name.
4637
+ */
4638
+ firstName: string;
4639
+ /**
4640
+ * Requestor last name.
4641
+ */
4642
+ lastName: string;
4643
+ /**
4644
+ * Requestor email address.
4645
+ */
4646
+ email: string;
4647
+ };
4648
+ /**
4649
+ * Information about the approver of the return. The return can be approved by a particular user or a group of users. The field can be set and updated only by an employee, that is a person who has the `returns.returns_manage` scope granted. The provided value is validated agains the `iam-service`:
4650
+ * * If `type` is equal to `USER`, then the provided `id` must be a valid employee identifier
4651
+ * * If `type` is equal to `GROUP`, then the provided `id` must be a valid employee group identifier
4652
+ */
4653
+ approver?: {
4654
+ /**
4655
+ * Indicates whether the return needs to be approved by a particular user or a user group. Possible values: `USER` or `GROUP`.
4656
+ */
4657
+ type?: 'USER' | 'GROUP';
4658
+ /**
4659
+ * Identifier of a user or a user group, depending on the `type` value.
4660
+ */
4661
+ id?: string;
4662
+ };
4663
+ /**
4664
+ * The date when the return expires. The field can be set and updated only by an employee, that is a person who has the `returns.returns_manage` scope granted. If the value is not provided, then the default value is fetched from the `configuration-service` under the `return.defaultExpiryDate` key. The value should be provided in the number format. The value specifies for how many days the return will be valid. If the configuration does not exist, then a `30` days offset is taken as a fallback.
4665
+ */
4666
+ expiryDate?: string;
4667
+ };
4668
+ /**
4669
+ * Schema for retrieving returns by a customer.
4670
+ */
4671
+ type FullCustomerReturn = BasicCustomerReturn & AssistedBuying & {
4672
+ /**
4673
+ * Unique identifier of a return, represented as a UUID string.
4674
+ */
4675
+ id?: string;
4676
+ metadata?: MetadataResponse;
4677
+ /**
4678
+ * Indicates whether the items from the return have been received.
4679
+ */
4680
+ received?: boolean;
4681
+ approvalStatus?: 'APPROVED' | 'PENDING' | 'REJECTED' | 'CLOSED';
4682
+ /**
4683
+ * A date when the return will expire. The value is returned as an ISO-8601 representation of an Instant. For example: `2022-04-31T13:18:02.379Z`
4684
+ */
4685
+ expiryDate?: string;
4686
+ orders?: Array<FullReturnOrder>;
4687
+ total?: {
4688
+ value?: number;
4689
+ currency?: string;
4690
+ };
4691
+ calculatedPrice?: CalculatedFinalPrice;
4692
+ };
4693
+ /**
4694
+ * Schema for retrieving returns by an employee.
4695
+ */
4696
+ type FullEmployeeReturn = FullCustomerReturn & {
4697
+ /**
4698
+ * Indicates who requested the return. The field is visible only to an employee, that is a person who has the returns.returns_read scope.
4699
+ */
4700
+ requestor?: {
4701
+ /**
4702
+ * Identifier of a customer to whom the order and return belong.
4703
+ */
4704
+ customerId?: string;
4705
+ /**
4706
+ * Requestor first name.
4707
+ */
4708
+ firstName?: string;
4709
+ /**
4710
+ * Requestor's last name.
4711
+ *
4712
+ */
4713
+ lastName?: string;
4714
+ /**
4715
+ * Requestor email.
4716
+ */
4717
+ email?: string;
4718
+ };
4719
+ /**
4720
+ * Indicates who submitted the return. The return can be submitted by an employee on behalf of a customer. In that case, the submitter and requestor data is different. The field can be retrieved only by an employee, that is a person who has the `returns.returns_manage scope` granted.
4721
+ */
4722
+ submitter?: {
4723
+ /**
4724
+ * Indicates who sent the return request. Information whether the request has been sent by a customer or by someone else on behalf of a customer.
4725
+ */
4726
+ userType?: string;
4727
+ /**
4728
+ * Submitter first name.
4729
+ */
4730
+ firstName?: string;
4731
+ /**
4732
+ * Submitter last name.
4733
+ */
4734
+ lastName?: string;
4735
+ /**
4736
+ * Submitter email name.
4737
+ */
4738
+ email?: string;
4739
+ };
4740
+ /**
4741
+ * Information about the approver of the return. The return can be approved by a particular user or a group of users. The field can be retrieved only by an employee, that is a person who has the `returns.returns_read` scope granted.
4742
+ */
4743
+ approver?: {
4744
+ /**
4745
+ * Indicates whether the return needs to be approved by a particular user or user group.
4746
+ */
4747
+ type?: 'USER' | 'GROUP';
4748
+ /**
4749
+ * Identifier of a user or a user group, depending on the `type` value.
4750
+ */
4751
+ id?: string;
4752
+ };
4753
+ };
4754
+ type FullReturnOrder = Order & {
4755
+ items?: Array<FullReturnItem>;
4756
+ };
4757
+ type FullReturnItem = OrderItem & {
4758
+ /**
4759
+ * Name of a product.
4760
+ */
4761
+ name?: string;
4762
+ /**
4763
+ * The value represents a price (value and currency) of a single unit of the product.
4764
+ */
4765
+ unitPrice?: {
4766
+ /**
4767
+ * The value represents a price value of a single unit of the product.
4768
+ */
4769
+ value?: number;
4770
+ /**
4771
+ * The value represents the currency associated with the price. The currency is compliant with the ISO-4217 standard.
4772
+ */
4773
+ currency?: string;
4774
+ };
4775
+ /**
4776
+ * The value represents the total price (value and currency) of all returned products related to the order.
4777
+ */
4778
+ total?: {
4779
+ /**
4780
+ * The value represents the total price value of all returned products.
4781
+ */
4782
+ value?: number;
4783
+ /**
4784
+ * The value represents the currency associated with the price. The currency is compliant with the ISO-4217 standard.
4785
+ */
4786
+ currency?: string;
4787
+ };
4788
+ /**
4789
+ * Unit price derived from the order entry `calculatedPrice.finalPrice` divided by the order entry amount. Includes discounts and fees. Present only if the order entry has a valid `calculatedPrice.finalPrice`.
4790
+ */
4791
+ calculatedUnitPrice?: CalculatedPrice;
4792
+ /**
4793
+ * Total calculated price for the returned quantity of this item. Computed as `calculatedUnitPrice` multiplied by the returned quantity. Present only if the order entry has a valid `calculatedPrice.finalPrice`.
4794
+ */
4795
+ calculatedPrice?: CalculatedFinalPrice;
4796
+ };
4797
+ /**
4798
+ * Represents the order which is being (fully or partially) returned.
4799
+ */
4800
+ type Order = {
4801
+ /**
4802
+ * Unique identifier of an order.
4803
+ */
4804
+ id: string;
4805
+ /**
4806
+ * Represents a list of items included in the order. In the `order` entity, the field is called `entries`.
4807
+ */
4808
+ items: Array<OrderItem>;
4809
+ };
4810
+ /**
4811
+ * Represents an item included in the order.
4812
+ */
4813
+ type OrderItem = {
4814
+ /**
4815
+ * Unique identifier of an item. In the order entity, the field is called `order.entries[].id`.
4816
+ */
4817
+ id: string;
4818
+ /**
4819
+ * Quantity of the items in the order. In the order entity, the field is called `order.entries[].amount`.
4820
+ */
4821
+ quantity: number;
4822
+ /**
4823
+ * A reason why the item needs to be returned.
4824
+ */
4825
+ reason?: {
4826
+ /**
4827
+ * Code representing the reason for return.
4828
+ */
4829
+ code?: string;
4830
+ /**
4831
+ * Details why the item is being returned.
4832
+ */
4833
+ details?: string;
4834
+ };
4835
+ };
4836
+ type ReturnId = {
4837
+ /**
4838
+ * Unique identifier of the created return.
4839
+ */
4840
+ id?: string;
4841
+ };
4842
+ type PatchOperation = {
4843
+ /**
4844
+ * Indicates an operation which should be done on a return. Available operations: `add` `remove` and `replace`
4845
+ */
4846
+ op: 'add' | 'remove' | 'replace';
4847
+ /**
4848
+ * Indicates a path for which the value should be applied. For example: `/mixins/additionalAttributes/externalId`, `/approvalStatus`, `/requestor/customerId`
4849
+ */
4850
+ path: string;
4851
+ /**
4852
+ * Indicates a value that should be changed or added. The value can be of a primitive type, like string, number, boolean or it can be an object or an array.
4853
+ */
4854
+ value?: {
4855
+ [key: string]: unknown;
4856
+ } | string;
4857
+ };
4858
+ type AssistedBuyingEntry = {
4859
+ /**
4860
+ * Identifier of an employee who performed an action on behalf of a customer.
4861
+ */
4862
+ employeeId?: string;
4863
+ /**
4864
+ * Indicates an operation type done by an employee on behalf of a customer. Available options: `CREATE` and `UPDATE_STATUS`.
4865
+ */
4866
+ operation?: 'CREATE' | 'UPDATE_STATUS';
4867
+ /**
4868
+ * Indicates a timestamp when an operation was performed.
4869
+ */
4870
+ timestamp?: string;
4871
+ };
4872
+ /**
4873
+ * The field is populated only if an assisted buying operation was performed. The field is read-only. There is no possibility to update it by PUT/PATCH operation.
4874
+ */
4875
+ type AssistedBuying = {
4876
+ /**
4877
+ * List of operations done by an employee on behalf of a customer.
4878
+ */
4879
+ entries?: Array<AssistedBuyingEntry>;
4880
+ };
4881
+ type ReturnCreateBody = BasicCustomerReturn | BasicEmployeeReturn | EmployeeReturnForAnonymousOrder;
4882
+ type ReturnUpdateBody = UpdateCustomerReturn | UpdateEmployeeReturn;
4883
+
4884
+ /**
4885
+ * Public types for the Returns Service — stable names aliased over the generated
4886
+ * `returns` types. `Return` is the read shape (customer/employee variant union).
4887
+ * The list endpoint is typed as a single return upstream (spec inaccuracy); it
4888
+ * actually returns an array, so `ReturnList` overrides to `Return[]`.
4889
+ */
4890
+
4891
+ /** A return (read shape) — customer or employee variant. */
4892
+ type Return = FullCustomerReturn | FullEmployeeReturn;
4893
+ /** List of returns (`GET /returns`, paged). */
4894
+ type ReturnList = Return[];
4895
+ /** Create body (`POST /returns`). */
4896
+ type ReturnInput = ReturnCreateBody;
4897
+ /** Replace body (`PUT /returns/{id}`). */
4898
+ type ReturnUpdate = ReturnUpdateBody;
4899
+ /** Partial-update body (`PATCH /returns/{id}`) — a JSON-Patch op-array. */
4900
+ type ReturnPatch = PatchOperation[];
4901
+ /** `POST /returns` response — the created return's `{ id }`. */
4902
+ type ReturnCreated = ReturnId;
4903
+
4904
+ /**
4905
+ * Emporix Returns Service (`/return/{tenant}/returns`): CRUD over returns
4906
+ * (RMA). Defaults to the service token; for customer self-service (own returns)
4907
+ * pass `auth.customer(token)` (the React hooks do this).
4908
+ */
4909
+ declare class ReturnsService {
4910
+ private readonly ctx;
4911
+ constructor(ctx: ClientContext);
4912
+ private base;
4913
+ /** List returns (paged; supports `pageSize`/`pageNumber`/`sort`/`q`). */
4914
+ listReturns(query?: Record<string, string | number>, auth?: AuthContext): Promise<ReturnList>;
4915
+ /** Retrieve one return by id. */
4916
+ getReturn(returnId: string, auth?: AuthContext): Promise<Return>;
4917
+ /** Create a return. Returns the created `{ id }`. */
4918
+ createReturn(input: ReturnInput, auth?: AuthContext): Promise<ReturnCreated>;
4919
+ /** Replace a return by id (`PUT`). */
4920
+ updateReturn(returnId: string, input: ReturnUpdate, auth?: AuthContext): Promise<void>;
4921
+ /** Partially update a return by id (`PATCH`, JSON-Patch op-array). */
4922
+ patchReturn(returnId: string, ops: ReturnPatch, auth?: AuthContext): Promise<void>;
4923
+ /** Delete a return by id. */
4924
+ deleteReturn(returnId: string, auth?: AuthContext): Promise<void>;
4925
+ }
4926
+
4927
+ type CreateJob = {
4928
+ siteCode: string;
4929
+ };
4930
+ type JobDetails = {
4931
+ jobId?: string;
4932
+ status?: string;
4933
+ siteCode?: string;
4934
+ fileId?: string;
4935
+ active?: boolean;
4936
+ ordersExportedCount?: number;
4937
+ createdAt?: string;
4938
+ completedAt?: string;
4939
+ };
4940
+ type JobId = {
4941
+ id: string;
4942
+ };
4943
+
4944
+ /**
4945
+ * Public types for the SEPA Export Service — stable names aliased over the
4946
+ * generated `sepa-export` types.
4947
+ */
4948
+
4949
+ /** A SEPA export job (read / list item). */
4950
+ type SepaJob = JobDetails;
4951
+ /** Create-job body (`POST /jobs`). */
4952
+ type SepaJobInput = CreateJob;
4953
+ /** `POST /jobs` response — the created job's id. */
4954
+ type SepaJobCreated = JobId;
4955
+
4956
+ /**
4957
+ * Emporix SEPA Export Service (`/sepa-export/{tenant}/…`): export jobs and file
4958
+ * retrieval. Server-side; defaults to the service token.
4959
+ */
4960
+ declare class SepaExportService {
4961
+ private readonly ctx;
4962
+ constructor(ctx: ClientContext);
4963
+ private base;
4964
+ /** Retrieve a SEPA export file by id. Returns the raw file content (text). */
4965
+ getFile(fileId: string, auth?: AuthContext): Promise<string>;
4966
+ /** List export jobs. */
4967
+ listJobs(query?: Record<string, string | number>, auth?: AuthContext): Promise<SepaJob[]>;
4968
+ /** Create an export job. */
4969
+ createJob(input: SepaJobInput, auth?: AuthContext): Promise<SepaJobCreated>;
4970
+ }
4971
+
4972
+ type IndexPublicConfiguration = {
4973
+ /**
4974
+ * API Key used for search purposes.
4975
+ */
4976
+ searchKey?: string;
4977
+ /**
4978
+ * Application id of an indexer provider.
4979
+ */
4980
+ applicationId?: string;
4981
+ /**
4982
+ * Identifier of an index.
4983
+ */
4984
+ indexName?: string;
4985
+ /**
4986
+ * Index provider name. Supported providers: `ALGOLIA` (https://www.algolia.com), `BATTERY_INCLUDED` (https://www.batteryincluded.io). Only one provider can be active per tenant at a time.
4987
+ */
4988
+ provider?: 'ALGOLIA' | 'BATTERY_INCLUDED';
4989
+ /**
4990
+ * Indicates if the configuration is active or not.
4991
+ */
4992
+ active?: boolean;
4993
+ };
4994
+ type IndexConfiguration = IndexPublicConfiguration & {
4995
+ /**
4996
+ * API key used for write purposes.
4997
+ */
4998
+ writeKey?: string;
4999
+ /**
5000
+ * Optional list of root product mixin keys to exclude from indexing. When set, the specified mixin keys are omitted from both the non-localized and localized portions of the indexed document. Applies only to the `BATTERY_INCLUDED` provider; ignored for `ALGOLIA`.
5001
+ */
5002
+ excludedMixinKeys?: Array<string>;
5003
+ };
5004
+ type IndexCreationResponse = {
5005
+ /**
5006
+ * Identifier of a newly created configuration.
5007
+ */
5008
+ id?: string;
5009
+ };
5010
+ type Reindex = {
5011
+ /**
5012
+ * Indicates reindex mode. Supported modes: `FULL`.
5013
+ */
5014
+ mode?: 'FULL';
5015
+ };
5016
+
5017
+ /**
5018
+ * Public types for the Indexing Service — stable names aliased over the
5019
+ * generated `indexing-service` types.
5020
+ */
5021
+
5022
+ /** An indexing configuration (read + write body). */
5023
+ type IndexConfig = IndexConfiguration;
5024
+ /** `POST /configurations` response. */
5025
+ type IndexConfigCreated = IndexCreationResponse;
5026
+ /** A public indexing configuration. */
5027
+ type IndexPublicConfig = IndexPublicConfiguration;
5028
+ /** Body for `reindex`. */
5029
+ type ReindexInput = Reindex;
5030
+
5031
+ /**
5032
+ * Emporix Indexing Service (`/indexing/{tenant}/…`): search-index provider
5033
+ * configurations and reindex. Server-side; defaults to the service token.
5034
+ */
5035
+ declare class IndexingService {
5036
+ private readonly ctx;
5037
+ constructor(ctx: ClientContext);
5038
+ private base;
5039
+ /** List indexing configurations. */
5040
+ listConfigurations(auth?: AuthContext): Promise<IndexConfig[]>;
5041
+ /** Get a configuration by provider name. */
5042
+ getConfiguration(provider: string, auth?: AuthContext): Promise<IndexConfig>;
5043
+ /** Create a configuration. */
5044
+ createConfiguration(input: IndexConfig, auth?: AuthContext): Promise<IndexConfigCreated>;
5045
+ /** Update a configuration by provider name. */
5046
+ updateConfiguration(provider: string, input: IndexConfig, auth?: AuthContext): Promise<void>;
5047
+ /** Delete a configuration by provider name. */
5048
+ deleteConfiguration(provider: string, auth?: AuthContext): Promise<void>;
5049
+ /** List public indexing configurations. */
5050
+ listPublicConfigurations(auth?: AuthContext): Promise<IndexPublicConfig[]>;
5051
+ /** Get a public configuration by provider name. */
5052
+ getPublicConfiguration(provider: string, auth?: AuthContext): Promise<IndexPublicConfig>;
5053
+ /** Trigger a reindex. */
5054
+ reindex(input: ReindexInput, auth?: AuthContext): Promise<void>;
5055
+ }
5056
+
5057
+ type BaseUnit = {
5058
+ /**
5059
+ * The unit code.
5060
+ */
5061
+ code: string;
5062
+ /**
5063
+ * The name of the unit in the form of a map (language, value) or string.
5064
+ */
5065
+ name: string | {
5066
+ [key: string]: string;
5067
+ };
5068
+ /**
5069
+ * The type of a unit.
5070
+ */
5071
+ type: string;
5072
+ /**
5073
+ * The symbol of a unit.
5074
+ */
5075
+ symbol?: string;
5076
+ /**
5077
+ * The base unit flag.
5078
+ */
5079
+ baseUnit: boolean;
5080
+ /**
5081
+ * The conversion factor. The factor value must be greater than zero.
5082
+ */
5083
+ factor: number;
5084
+ };
5085
+ type Unit$1 = BaseUnit & {
5086
+ metadata?: UnitMetadata;
5087
+ };
5088
+ type UpdateUnit = BaseUnit & {
5089
+ metadata?: UpdateUnitMetadata;
5090
+ };
5091
+ /**
5092
+ * The metadata of the unit.
5093
+ */
5094
+ type UnitMetadata = {
5095
+ /**
5096
+ * The version of the document.
5097
+ */
5098
+ version?: number;
5099
+ /**
5100
+ * Timestamp of the unit creation compliant with the ISO 8601 standard.
5101
+ */
5102
+ createdAt?: string;
5103
+ /**
5104
+ * Timestamp of the unit last modification compliant with the ISO 8601 standard.
5105
+ */
5106
+ modifiedAt?: string;
5107
+ };
5108
+ /**
5109
+ * The metadata of the unit.
5110
+ */
5111
+ type UpdateUnitMetadata = {
5112
+ /**
5113
+ * The version of the document.
5114
+ */
5115
+ version?: number;
5116
+ };
5117
+ /**
5118
+ * The input is the conversion parameters object containing the source unit code, target unit code, and the amount to convert (amount required for convert-unit, optional for conversion-factor).
5119
+ */
5120
+ type ConversionFactorInput$1 = {
5121
+ sourceUnitAmount?: number;
5122
+ /**
5123
+ * The source unit code.
5124
+ */
5125
+ sourceUnit: string;
5126
+ /**
5127
+ * The target unit code.
5128
+ */
5129
+ targetUnit: string;
5130
+ };
5131
+ /**
5132
+ * The input payload for conversion. Contains the source unit code, target unit code, and optionally the source unit amount to convert.
5133
+ */
5134
+ type ConversionInput = {
5135
+ /**
5136
+ * The source unit quantity.
5137
+ */
5138
+ sourceUnitAmount?: number;
5139
+ /**
5140
+ * The source unit code.
5141
+ */
5142
+ sourceUnit: string;
5143
+ /**
5144
+ * The target unit code.
5145
+ */
5146
+ targetUnit: string;
5147
+ };
5148
+ /**
5149
+ * Output payload
5150
+ */
5151
+ type ConversionFactorOutput = {
5152
+ /**
5153
+ * The conversion factor.
5154
+ */
5155
+ conversionFactor?: number;
5156
+ };
5157
+ /**
5158
+ * Output payload. Contains the computed result of a conversion factor - conversionFactor (number) and unit conversion - targetUnitAmount (number) and targetUnit (string).
5159
+ */
5160
+ type ConversionOutput = {
5161
+ /**
5162
+ * The amount in the target unit after conversion from the source unit.
5163
+ */
5164
+ targetUnitAmount?: number;
5165
+ /**
5166
+ * The target unit.
5167
+ */
5168
+ targetUnit?: string;
5169
+ };
5170
+ type ConversionFactorPayload = {
5171
+ /**
5172
+ * Optional client-generated identifier used to correlate a conversion command across request, response, and logs.
5173
+ */
5174
+ commandUuid?: string;
5175
+ input: ConversionFactorInput$1;
5176
+ };
5177
+ type ConversionFactorResponse = {
5178
+ commandUuid?: string;
5179
+ input?: ConversionFactorInput$1;
5180
+ output?: ConversionFactorOutput;
5181
+ };
5182
+ type ConversionPayload = {
5183
+ commandUuid?: string;
5184
+ input: ConversionInput;
5185
+ };
5186
+ type ConversionResponse = {
5187
+ commandUuid?: string;
5188
+ input?: ConversionInput;
5189
+ output?: ConversionOutput;
5190
+ };
5191
+ type CreateUnitResponse = {
5192
+ code?: string;
5193
+ };
5194
+
5195
+ /**
5196
+ * Public types for the Unit Handling Service — stable names aliased over the
5197
+ * generated `unit-handling-service` types.
5198
+ */
5199
+
5200
+ /** A unit (read shape). */
5201
+ type Unit = Unit$1;
5202
+ /** Create body (`POST /units`). */
5203
+ type UnitInput = BaseUnit;
5204
+ /** Update body (`PUT /units/{code}`). */
5205
+ type UnitUpdate = UpdateUnit;
5206
+ /** `POST /units` response. */
5207
+ type UnitCreated = CreateUnitResponse;
5208
+ /** Body for `getConversionFactor`. */
5209
+ type ConversionFactorInput = ConversionFactorPayload;
5210
+ /** Result of `getConversionFactor`. */
5211
+ type ConversionFactorResult = ConversionFactorResponse;
5212
+ /** Body for `convertUnit`. */
5213
+ type ConvertUnitInput = ConversionPayload;
5214
+ /** Result of `convertUnit`. */
5215
+ type ConvertUnitResult = ConversionResponse;
5216
+
5217
+ /**
5218
+ * Emporix Unit Handling Service (`/unit-handling/{tenant}/…`): units CRUD, unit
5219
+ * types, and conversion commands. Server-side; defaults to the service token.
5220
+ */
5221
+ declare class UnitHandlingService {
5222
+ private readonly ctx;
5223
+ constructor(ctx: ClientContext);
5224
+ private base;
5225
+ /** Find units (filter/sort/page). */
5226
+ listUnits(query?: Record<string, string | number>, auth?: AuthContext): Promise<Unit[]>;
5227
+ /** Retrieve a unit by code. */
5228
+ getUnit(unitCode: string, auth?: AuthContext): Promise<Unit>;
5229
+ /** Add a new unit. */
5230
+ createUnit(input: UnitInput, auth?: AuthContext): Promise<UnitCreated>;
5231
+ /** Update a unit by code. */
5232
+ updateUnit(unitCode: string, input: UnitUpdate, auth?: AuthContext): Promise<void>;
5233
+ /** Delete a unit by code. */
5234
+ deleteUnit(unitCode: string, auth?: AuthContext): Promise<void>;
5235
+ /** Delete multiple units by code (bulk). The codes are sent as the request body. */
5236
+ deleteUnits(codes: string[], auth?: AuthContext): Promise<void>;
5237
+ /** Fetch a conversion factor (`PUT /units/conversion-factor-commands`). */
5238
+ getConversionFactor(input: ConversionFactorInput, auth?: AuthContext): Promise<ConversionFactorResult>;
5239
+ /** Convert a value between units (`PUT /units/convert-unit-commands`). */
5240
+ convertUnit(input: ConvertUnitInput, auth?: AuthContext): Promise<ConvertUnitResult>;
5241
+ /** List all unit types. */
5242
+ listUnitTypes(auth?: AuthContext): Promise<string[]>;
5243
+ }
5244
+
2177
5245
  /** The Emporix SDK entry point. One instance safely serves many concurrent shoppers. */
2178
5246
  declare class EmporixClient {
2179
5247
  readonly customers: CustomerService;
@@ -2203,6 +5271,18 @@ declare class EmporixClient {
2203
5271
  readonly webhooks: WebhookService;
2204
5272
  readonly schemas: SchemaService;
2205
5273
  readonly ai: AiService;
5274
+ readonly taxes: TaxService;
5275
+ readonly coupons: CouponService;
5276
+ readonly rewardPoints: RewardPointsService;
5277
+ readonly brands: BrandService;
5278
+ readonly labels: LabelService;
5279
+ readonly countries: CountryService;
5280
+ readonly currencies: CurrencyService;
5281
+ readonly shipping: ShippingService;
5282
+ readonly returns: ReturnsService;
5283
+ readonly sepaExport: SepaExportService;
5284
+ readonly indexing: IndexingService;
5285
+ readonly units: UnitHandlingService;
2206
5286
  /** The validated tenant this client is bound to. */
2207
5287
  readonly tenant: string;
2208
5288
  /**
@@ -2229,4 +5309,4 @@ declare class EmporixClient {
2229
5309
  getLogLevel(service: ServiceName): LogLevel;
2230
5310
  }
2231
5311
 
2232
- export { type Agent, type AgentInput, type AgentPatchOp, type AgentSearchQuery, AiService, AuthContext, AvailabilityService, type BatchNextIdEntry, CartService, CategoryService, type ChatRequest, type ChatResponse, CheckoutService, ClientConfigService, type ClientConfiguration, ClientContext, CompaniesService, type CompletionMessage, type CompletionRequest, type CompletionResponse, type Configuration$1 as Configuration, type ConfigurationDraft, ContactsService, type CustomEntity, type CustomEntityDraft, type CustomInstance, type CustomInstanceDraft, CustomerGroupsService, CustomerService, type DeleteAgentOptions, type DeleteConfigOptions, EmporixAuthError, EmporixClient, EmporixConfig, EmporixError, EmporixForbiddenError, EmporixInsufficientScopeError, EmporixNotFoundError, EmporixServerError, EmporixValidationError, type Fee, type FeeDraft, FeeService, type InstanceSearchBody, type ItemFee, type ItemFeeDraft, type ItemFeeSearch, type JobIdResponse, type ListConfigOptions, type ListCustomEntitiesOptions, type ListFeesQuery, type ListInstancesQuery, type ListSchemasQuery, LocationsService, LogLevel, MediaService, type MetadataFilter, type NextIdCommandRequest, type NextIdOptions, type NextIdResponse, type NextIdsBatchRequest, type NextIdsBatchResponse, OrdersService, PaginatedItems, PaymentGatewayService, PriceService, ProductService, RagIndexerService, type RagType, ResolvedConfig, SalesOrdersService, type Schema, type SchemaAttribute, type SchemaDraft, SchemaService, type SchemaTypeName, type SchemaUpdate, SegmentService, type SequenceSchema, type SequenceSchemaCreate, SequentialIdService, ServiceName, type SessionContext, type SessionContextPatch, SessionContextService, type SetItemFeesOptions, type ShoppingList, type ShoppingListDraft, type ShoppingListItem, ShoppingListService, type Site, SiteService, TenantConfigService, type TextRequest, type TextResponse, TokenProvider, type WebhookConfig, type WebhookConfigCreated, type WebhookConfigDraft, type WebhookConfigPatch, type WebhookDashboardAccess, WebhookService, type WebhookStatistics, type WebhookStatisticsQuery, type WebhookSubscription, type WebhookSubscriptionUpdateItem, type WebhookSubscriptionUpdateResultItem, errorFromResponse };
5312
+ export { type AddedPoints, type Agent, type AgentInput, type AgentPatchOp, type AgentSearchQuery, AiService, AuthContext, AvailabilityService, type BatchNextIdEntry, type Brand, type BrandInput, type BrandList, BrandService, type BrandUpdate, CartService, CategoryService, type CgRelation, type CgRelationList, type ChatRequest, type ChatResponse, CheckoutService, ClientConfigService, type ClientConfiguration, ClientContext, CompaniesService, type CompletionMessage, type CompletionRequest, type CompletionResponse, type Configuration$1 as Configuration, type ConfigurationDraft, ContactsService, 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 Currency, type CurrencyCreated, type CurrencyInput, type CurrencyList, CurrencyService, type CurrencyUpdate, type CustomEntity, type CustomEntityDraft, type CustomInstance, type CustomInstanceDraft, CustomerGroupsService, CustomerService, type CustomerSummaryBatch, type DeleteAgentOptions, type DeleteConfigOptions, type DeliveryCreated, type DeliveryCycleInput, type DeliverySlot, type DeliverySlotList, type DeliveryTime, type DeliveryTimeInput, type DeliveryTimeList, type DeliveryTimeUpdate, type DeliveryWindow, type DeliveryWindowList, type DeliveryWindowValidation, EmporixAuthError, EmporixClient, EmporixConfig, EmporixError, EmporixForbiddenError, EmporixInsufficientScopeError, EmporixNotFoundError, EmporixServerError, EmporixValidationError, type ExchangeRate, type ExchangeRateCreated, type ExchangeRateInput, type ExchangeRateList, type ExchangeRateUpdate, type Fee$1 as Fee, type FeeDraft, FeeService, type FindSiteInput, type IndexConfig, type IndexConfigCreated, type IndexPublicConfig, IndexingService, type InstanceSearchBody, type ItemFee, type ItemFeeDraft, type ItemFeeSearch, type JobIdResponse, type Label, type LabelInput, type LabelList, LabelService, type LabelUpdate, type ListConfigOptions, type ListCustomEntitiesOptions, type ListFeesQuery, type ListInstancesQuery, type ListSchemasQuery, LocationsService, LogLevel, MediaService, type MetadataFilter, type MinimumFee, type NewPointsEntry, type NextIdCommandRequest, type NextIdOptions, type NextIdResponse, type NextIdsBatchRequest, type NextIdsBatchResponse, OrdersService, PaginatedItems, PaymentGatewayService, type PointsSummary, PriceService, ProductService, type QuoteInput, type QuoteResult, type QuoteSlotInput, RagIndexerService, type RagType, type RedeemCouponResult, type RedeemMyPointsInput, type RedeemOption, type RedeemOptionList, type RedeemedPoints, type Redemption, type RedemptionCreated, type RedemptionInput, type ReferralCoupon, type Region, type RegionList, type ReindexInput, 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, SegmentService, SepaExportService, type SepaJob, type SepaJobCreated, type SepaJobInput, type SequenceSchema, type SequenceSchemaCreate, SequentialIdService, 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, TokenProvider, type Unit, type UnitCreated, UnitHandlingService, type UnitInput, type UnitUpdate, 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, errorFromResponse };