@viu/emporix-sdk 2.14.0 → 2.15.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/CHANGELOG.md +6 -0
- package/dist/availability.cjs +1 -0
- package/dist/availability.cjs.map +1 -1
- package/dist/availability.d.cts +1 -0
- package/dist/availability.d.ts +1 -0
- package/dist/availability.js +1 -1
- package/dist/cart.cjs +1 -0
- package/dist/cart.cjs.map +1 -1
- package/dist/cart.d.cts +1 -0
- package/dist/cart.d.ts +1 -0
- package/dist/cart.js +1 -1
- package/dist/category.cjs +1 -0
- package/dist/category.cjs.map +1 -1
- package/dist/category.d.cts +1 -0
- package/dist/category.d.ts +1 -0
- package/dist/category.js +1 -1
- package/dist/checkout.cjs +1 -0
- package/dist/checkout.cjs.map +1 -1
- package/dist/checkout.d.cts +1 -0
- package/dist/checkout.d.ts +1 -0
- package/dist/checkout.js +1 -1
- package/dist/{chunk-LGOC5XOI.js → chunk-3BTPX7IJ.js} +3 -2
- package/dist/chunk-3BTPX7IJ.js.map +1 -0
- package/dist/{chunk-MIUVJEGR.js → chunk-5VTBLBXJ.js} +3 -2
- package/dist/chunk-5VTBLBXJ.js.map +1 -0
- package/dist/{chunk-WW3H7VJ5.js → chunk-62PCCHZ2.js} +4 -2
- package/dist/chunk-62PCCHZ2.js.map +1 -0
- package/dist/{chunk-BDFOD7W3.js → chunk-A3LYJUD4.js} +3 -2
- package/dist/chunk-A3LYJUD4.js.map +1 -0
- package/dist/{chunk-MM6JF3Z7.js → chunk-BNX3JULF.js} +3 -2
- package/dist/chunk-BNX3JULF.js.map +1 -0
- package/dist/{chunk-LGLFJL3S.js → chunk-DUVIIWFG.js} +3 -2
- package/dist/chunk-DUVIIWFG.js.map +1 -0
- package/dist/{chunk-HAEVK6IS.js → chunk-EAWGUZHS.js} +3 -2
- package/dist/chunk-EAWGUZHS.js.map +1 -0
- package/dist/{chunk-WWCCB22A.js → chunk-GIZS4BY3.js} +3 -2
- package/dist/chunk-GIZS4BY3.js.map +1 -0
- package/dist/{chunk-BPVMQFO4.js → chunk-K3VQLW3P.js} +3 -2
- package/dist/chunk-K3VQLW3P.js.map +1 -0
- package/dist/{chunk-CR2JRH7T.js → chunk-NE7MIZPR.js} +4 -2
- package/dist/chunk-NE7MIZPR.js.map +1 -0
- package/dist/{chunk-UOBOFCFU.js → chunk-NEXUWPHW.js} +3 -2
- package/dist/chunk-NEXUWPHW.js.map +1 -0
- package/dist/{chunk-FU5WQALW.js → chunk-OTG2S2L4.js} +3 -2
- package/dist/chunk-OTG2S2L4.js.map +1 -0
- package/dist/{chunk-P3UHYMDH.js → chunk-PAT4CS36.js} +3 -2
- package/dist/chunk-PAT4CS36.js.map +1 -0
- package/dist/{chunk-XG2TKFY5.js → chunk-RYQVMR26.js} +3 -2
- package/dist/chunk-RYQVMR26.js.map +1 -0
- package/dist/{chunk-EINAVCV2.js → chunk-XEJPH6UN.js} +3 -2
- package/dist/chunk-XEJPH6UN.js.map +1 -0
- package/dist/companies.cjs +1 -0
- package/dist/companies.cjs.map +1 -1
- package/dist/companies.d.cts +1 -0
- package/dist/companies.d.ts +1 -0
- package/dist/companies.js +1 -1
- package/dist/contacts.cjs +1 -0
- package/dist/contacts.cjs.map +1 -1
- package/dist/contacts.d.cts +1 -0
- package/dist/contacts.d.ts +1 -0
- package/dist/contacts.js +1 -1
- package/dist/customer-groups.cjs +1 -0
- package/dist/customer-groups.cjs.map +1 -1
- package/dist/customer-groups.d.cts +1 -0
- package/dist/customer-groups.d.ts +1 -0
- package/dist/customer-groups.js +1 -1
- package/dist/customer.cjs +1 -0
- package/dist/customer.cjs.map +1 -1
- package/dist/customer.d.cts +1 -0
- package/dist/customer.d.ts +1 -0
- package/dist/customer.js +1 -1
- package/dist/index.cjs +197 -102
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +76 -4
- package/dist/index.d.ts +76 -4
- package/dist/index.js +210 -134
- package/dist/index.js.map +1 -1
- package/dist/locations.cjs +1 -0
- package/dist/locations.cjs.map +1 -1
- package/dist/locations.d.cts +1 -0
- package/dist/locations.d.ts +1 -0
- package/dist/locations.js +1 -1
- package/dist/media.cjs +1 -0
- package/dist/media.cjs.map +1 -1
- package/dist/media.d.cts +1 -0
- package/dist/media.d.ts +1 -0
- package/dist/media.js +1 -1
- package/dist/orders.cjs +2 -0
- package/dist/orders.cjs.map +1 -1
- package/dist/orders.d.cts +2 -0
- package/dist/orders.d.ts +2 -0
- package/dist/orders.js +1 -1
- package/dist/payment.cjs +1 -0
- package/dist/payment.cjs.map +1 -1
- package/dist/payment.d.cts +1 -0
- package/dist/payment.d.ts +1 -0
- package/dist/payment.js +1 -1
- package/dist/price.cjs +1 -0
- package/dist/price.cjs.map +1 -1
- package/dist/price.d.cts +1 -0
- package/dist/price.d.ts +1 -0
- package/dist/price.js +1 -1
- package/dist/product.cjs +1 -0
- package/dist/product.cjs.map +1 -1
- package/dist/product.d.cts +1 -0
- package/dist/product.d.ts +1 -0
- package/dist/product.js +1 -1
- package/dist/segment.cjs +2 -0
- package/dist/segment.cjs.map +1 -1
- package/dist/segment.d.cts +2 -0
- package/dist/segment.d.ts +2 -0
- package/dist/segment.js +1 -1
- package/package.json +2 -1
- package/dist/chunk-BDFOD7W3.js.map +0 -1
- package/dist/chunk-BPVMQFO4.js.map +0 -1
- package/dist/chunk-CR2JRH7T.js.map +0 -1
- package/dist/chunk-EINAVCV2.js.map +0 -1
- package/dist/chunk-FU5WQALW.js.map +0 -1
- package/dist/chunk-HAEVK6IS.js.map +0 -1
- package/dist/chunk-LGLFJL3S.js.map +0 -1
- package/dist/chunk-LGOC5XOI.js.map +0 -1
- package/dist/chunk-MIUVJEGR.js.map +0 -1
- package/dist/chunk-MM6JF3Z7.js.map +0 -1
- package/dist/chunk-P3UHYMDH.js.map +0 -1
- package/dist/chunk-UOBOFCFU.js.map +0 -1
- package/dist/chunk-WW3H7VJ5.js.map +0 -1
- package/dist/chunk-WWCCB22A.js.map +0 -1
- package/dist/chunk-XG2TKFY5.js.map +0 -1
package/dist/index.d.cts
CHANGED
|
@@ -106,6 +106,7 @@ interface Site$1 {
|
|
|
106
106
|
*/
|
|
107
107
|
declare class SiteService {
|
|
108
108
|
private readonly ctx;
|
|
109
|
+
static readonly channel: "site";
|
|
109
110
|
constructor(ctx: ClientContext);
|
|
110
111
|
/** Lists active sites. */
|
|
111
112
|
list(authCtx?: AuthContext): Promise<Site$1[]>;
|
|
@@ -162,6 +163,7 @@ interface SessionContextPatch {
|
|
|
162
163
|
*/
|
|
163
164
|
declare class SessionContextService {
|
|
164
165
|
private readonly ctx;
|
|
166
|
+
static readonly channel: "session-context";
|
|
165
167
|
constructor(ctx: ClientContext);
|
|
166
168
|
/**
|
|
167
169
|
* Retrieves the current session context, or `null` when the server returns
|
|
@@ -257,6 +259,7 @@ interface ListConfigOptions {
|
|
|
257
259
|
*/
|
|
258
260
|
declare class TenantConfigService {
|
|
259
261
|
private readonly ctx;
|
|
262
|
+
static readonly channel: "configuration";
|
|
260
263
|
constructor(ctx: ClientContext);
|
|
261
264
|
private base;
|
|
262
265
|
/** List tenant configurations, optionally filtered by `keys`. */
|
|
@@ -280,6 +283,7 @@ declare class TenantConfigService {
|
|
|
280
283
|
*/
|
|
281
284
|
declare class ClientConfigService {
|
|
282
285
|
private readonly ctx;
|
|
286
|
+
static readonly channel: "configuration";
|
|
283
287
|
constructor(ctx: ClientContext);
|
|
284
288
|
private base;
|
|
285
289
|
/** List a client's configurations, optionally filtered by `keys`. */
|
|
@@ -327,6 +331,7 @@ interface ShoppingListDraft {
|
|
|
327
331
|
*/
|
|
328
332
|
declare class ShoppingListService {
|
|
329
333
|
private readonly ctx;
|
|
334
|
+
static readonly channel: "shopping-list";
|
|
330
335
|
constructor(ctx: ClientContext);
|
|
331
336
|
private base;
|
|
332
337
|
/** The caller's lists (or, with employee scope, all), normalized to an array. */
|
|
@@ -403,6 +408,7 @@ type RagType = "PRODUCT";
|
|
|
403
408
|
*/
|
|
404
409
|
declare class RagIndexerService {
|
|
405
410
|
private readonly ctx;
|
|
411
|
+
static readonly channel: "ai-rag-indexer";
|
|
406
412
|
constructor(ctx: ClientContext);
|
|
407
413
|
private base;
|
|
408
414
|
/** The indexable embedding field names for `type` (default `"PRODUCT"`). */
|
|
@@ -573,6 +579,7 @@ type NextIdsBatchResponse = Record<string, {
|
|
|
573
579
|
*/
|
|
574
580
|
declare class SequentialIdService {
|
|
575
581
|
private readonly ctx;
|
|
582
|
+
static readonly channel: "sequential-id";
|
|
576
583
|
constructor(ctx: ClientContext);
|
|
577
584
|
private base;
|
|
578
585
|
/** List all sequence schemas for the tenant. */
|
|
@@ -746,6 +753,7 @@ interface SetItemFeesOptions {
|
|
|
746
753
|
*/
|
|
747
754
|
declare class FeeService {
|
|
748
755
|
private readonly ctx;
|
|
756
|
+
static readonly channel: "fee";
|
|
749
757
|
constructor(ctx: ClientContext);
|
|
750
758
|
private feesBase;
|
|
751
759
|
private itemFeesBase;
|
|
@@ -814,6 +822,7 @@ interface InvokeCloudFunctionOptions<TReq = unknown> {
|
|
|
814
822
|
*/
|
|
815
823
|
declare class CloudFunctionsService {
|
|
816
824
|
private readonly ctx;
|
|
825
|
+
static readonly channel: "cloud-functions";
|
|
817
826
|
constructor(ctx: ClientContext);
|
|
818
827
|
private base;
|
|
819
828
|
invoke<TRes = unknown, TReq = unknown>(functionId: string, options?: InvokeCloudFunctionOptions<TReq>, authCtx?: AuthContext): Promise<TRes>;
|
|
@@ -1125,6 +1134,7 @@ interface DeleteConfigOptions {
|
|
|
1125
1134
|
*/
|
|
1126
1135
|
declare class WebhookService {
|
|
1127
1136
|
private readonly ctx;
|
|
1137
|
+
static readonly channel: "webhook";
|
|
1128
1138
|
constructor(ctx: ClientContext);
|
|
1129
1139
|
private base;
|
|
1130
1140
|
/** List the event-subscription catalog with each event's on/off state. */
|
|
@@ -1467,6 +1477,7 @@ type InstanceSearchBody = Record<string, unknown>;
|
|
|
1467
1477
|
*/
|
|
1468
1478
|
declare class SchemaService {
|
|
1469
1479
|
private readonly ctx;
|
|
1480
|
+
static readonly channel: "schema";
|
|
1470
1481
|
constructor(ctx: ClientContext);
|
|
1471
1482
|
private schemasBase;
|
|
1472
1483
|
private entitiesBase;
|
|
@@ -2168,6 +2179,7 @@ interface DeleteAgentOptions {
|
|
|
2168
2179
|
*/
|
|
2169
2180
|
declare class AiService {
|
|
2170
2181
|
private readonly ctx;
|
|
2182
|
+
static readonly channel: "ai";
|
|
2171
2183
|
constructor(ctx: ClientContext);
|
|
2172
2184
|
private base;
|
|
2173
2185
|
/** Generate text from a single prompt (`POST /texts`). Honors `maxTokens`. */
|
|
@@ -2452,6 +2464,7 @@ type TaxCalculationResult = TaxCalculationResponse;
|
|
|
2452
2464
|
*/
|
|
2453
2465
|
declare class TaxService {
|
|
2454
2466
|
private readonly ctx;
|
|
2467
|
+
static readonly channel: "tax";
|
|
2455
2468
|
constructor(ctx: ClientContext);
|
|
2456
2469
|
private base;
|
|
2457
2470
|
/** List all per-location tax configurations. */
|
|
@@ -2877,6 +2890,7 @@ type CouponCreated = ResourceLocation$1;
|
|
|
2877
2890
|
*/
|
|
2878
2891
|
declare class CouponService {
|
|
2879
2892
|
private readonly ctx;
|
|
2893
|
+
static readonly channel: "coupon";
|
|
2880
2894
|
constructor(ctx: ClientContext);
|
|
2881
2895
|
private base;
|
|
2882
2896
|
/** List coupons by criteria. Returns a plain array. */
|
|
@@ -3178,6 +3192,7 @@ interface RedeemMyPointsInput {
|
|
|
3178
3192
|
*/
|
|
3179
3193
|
declare class RewardPointsService {
|
|
3180
3194
|
private readonly ctx;
|
|
3195
|
+
static readonly channel: "reward-points";
|
|
3181
3196
|
constructor(ctx: ClientContext);
|
|
3182
3197
|
/** Base without tenant (customer / public / batch endpoints). */
|
|
3183
3198
|
private base;
|
|
@@ -3347,6 +3362,7 @@ type BrandUpdate = UpdateBrand;
|
|
|
3347
3362
|
*/
|
|
3348
3363
|
declare class BrandService {
|
|
3349
3364
|
private readonly ctx;
|
|
3365
|
+
static readonly channel: "brand";
|
|
3350
3366
|
constructor(ctx: ClientContext);
|
|
3351
3367
|
private base;
|
|
3352
3368
|
/** List all brands. */
|
|
@@ -3459,6 +3475,7 @@ type LabelUpdate = LabelUpdate$1;
|
|
|
3459
3475
|
*/
|
|
3460
3476
|
declare class LabelService {
|
|
3461
3477
|
private readonly ctx;
|
|
3478
|
+
static readonly channel: "label";
|
|
3462
3479
|
constructor(ctx: ClientContext);
|
|
3463
3480
|
private base;
|
|
3464
3481
|
/** List all labels. */
|
|
@@ -3560,6 +3577,7 @@ type RegionList = Region[];
|
|
|
3560
3577
|
*/
|
|
3561
3578
|
declare class CountryService {
|
|
3562
3579
|
private readonly ctx;
|
|
3580
|
+
static readonly channel: "country";
|
|
3563
3581
|
constructor(ctx: ClientContext);
|
|
3564
3582
|
private base;
|
|
3565
3583
|
/** List all countries. */
|
|
@@ -3745,6 +3763,7 @@ type ExchangeRateCreated = ExchangeRateResponse;
|
|
|
3745
3763
|
*/
|
|
3746
3764
|
declare class CurrencyService {
|
|
3747
3765
|
private readonly ctx;
|
|
3766
|
+
static readonly channel: "currency";
|
|
3748
3767
|
constructor(ctx: ClientContext);
|
|
3749
3768
|
private base;
|
|
3750
3769
|
/** List all currencies. */
|
|
@@ -4332,6 +4351,7 @@ interface DeliveryCreated {
|
|
|
4332
4351
|
*/
|
|
4333
4352
|
declare class ShippingService {
|
|
4334
4353
|
private readonly ctx;
|
|
4354
|
+
static readonly channel: "shipping";
|
|
4335
4355
|
constructor(ctx: ClientContext);
|
|
4336
4356
|
private base;
|
|
4337
4357
|
private siteBase;
|
|
@@ -4939,6 +4959,7 @@ type ReturnCreated = ReturnId;
|
|
|
4939
4959
|
*/
|
|
4940
4960
|
declare class ReturnsService {
|
|
4941
4961
|
private readonly ctx;
|
|
4962
|
+
static readonly channel: "returns";
|
|
4942
4963
|
constructor(ctx: ClientContext);
|
|
4943
4964
|
private base;
|
|
4944
4965
|
/** List returns (paged; supports `pageSize`/`pageNumber`/`sort`/`q`). */
|
|
@@ -4990,6 +5011,7 @@ type SepaJobCreated = JobId;
|
|
|
4990
5011
|
*/
|
|
4991
5012
|
declare class SepaExportService {
|
|
4992
5013
|
private readonly ctx;
|
|
5014
|
+
static readonly channel: "sepa-export";
|
|
4993
5015
|
constructor(ctx: ClientContext);
|
|
4994
5016
|
private base;
|
|
4995
5017
|
/** Retrieve a SEPA export file by id. Returns the raw file content (text). */
|
|
@@ -5065,6 +5087,7 @@ type ReindexInput = Reindex;
|
|
|
5065
5087
|
*/
|
|
5066
5088
|
declare class IndexingService {
|
|
5067
5089
|
private readonly ctx;
|
|
5090
|
+
static readonly channel: "indexing";
|
|
5068
5091
|
constructor(ctx: ClientContext);
|
|
5069
5092
|
private base;
|
|
5070
5093
|
/** List indexing configurations. */
|
|
@@ -5251,6 +5274,7 @@ type ConvertUnitResult = ConversionResponse;
|
|
|
5251
5274
|
*/
|
|
5252
5275
|
declare class UnitHandlingService {
|
|
5253
5276
|
private readonly ctx;
|
|
5277
|
+
static readonly channel: "unit-handling";
|
|
5254
5278
|
constructor(ctx: ClientContext);
|
|
5255
5279
|
private base;
|
|
5256
5280
|
/** Find units (filter/sort/page). */
|
|
@@ -5427,6 +5451,7 @@ type CatalogCreated = CreateCatalogResponse;
|
|
|
5427
5451
|
*/
|
|
5428
5452
|
declare class CatalogService {
|
|
5429
5453
|
private readonly ctx;
|
|
5454
|
+
static readonly channel: "catalog";
|
|
5430
5455
|
constructor(ctx: ClientContext);
|
|
5431
5456
|
private base;
|
|
5432
5457
|
/** List catalogs (filtered/sorted). */
|
|
@@ -5749,6 +5774,7 @@ type VendorLocationUpdate = LocationUpdate;
|
|
|
5749
5774
|
*/
|
|
5750
5775
|
declare class VendorService {
|
|
5751
5776
|
private readonly ctx;
|
|
5777
|
+
static readonly channel: "vendor";
|
|
5752
5778
|
constructor(ctx: ClientContext);
|
|
5753
5779
|
private base;
|
|
5754
5780
|
/** List all vendors. */
|
|
@@ -6223,6 +6249,7 @@ interface RecalculationJobCreated {
|
|
|
6223
6249
|
*/
|
|
6224
6250
|
declare class PickPackService {
|
|
6225
6251
|
private readonly ctx;
|
|
6252
|
+
static readonly channel: "pick-pack";
|
|
6226
6253
|
constructor(ctx: ClientContext);
|
|
6227
6254
|
private base;
|
|
6228
6255
|
private orderPath;
|
|
@@ -6575,6 +6602,7 @@ type AdminCustomerAddressUpdate = AddressUpdateDto;
|
|
|
6575
6602
|
*/
|
|
6576
6603
|
declare class CustomerAdminService {
|
|
6577
6604
|
private readonly ctx;
|
|
6605
|
+
static readonly channel: "customer-admin";
|
|
6578
6606
|
constructor(ctx: ClientContext);
|
|
6579
6607
|
private base;
|
|
6580
6608
|
private customerPath;
|
|
@@ -7059,6 +7087,7 @@ type ApprovalUsersResult = User[];
|
|
|
7059
7087
|
*/
|
|
7060
7088
|
declare class ApprovalService {
|
|
7061
7089
|
private readonly ctx;
|
|
7090
|
+
static readonly channel: "approval";
|
|
7062
7091
|
constructor(ctx: ClientContext);
|
|
7063
7092
|
private base;
|
|
7064
7093
|
/** List approvals (paged via `pageNumber`/`pageSize`/`sort`/`q`). Returns an array. */
|
|
@@ -7139,9 +7168,7 @@ declare class EmporixClient {
|
|
|
7139
7168
|
* Provider tree. Treat as read-only.
|
|
7140
7169
|
*/
|
|
7141
7170
|
readonly config: ResolvedConfig;
|
|
7142
|
-
private readonly
|
|
7143
|
-
private readonly customerRefresh;
|
|
7144
|
-
private readonly requestContext;
|
|
7171
|
+
private readonly core;
|
|
7145
7172
|
constructor(config: EmporixConfig);
|
|
7146
7173
|
/**
|
|
7147
7174
|
* Re-binds the storefront price context (currency / siteCode / targetLocation)
|
|
@@ -7175,6 +7202,51 @@ declare class EmporixClient {
|
|
|
7175
7202
|
setCustomerTokenRefresher(refresher: CustomerTokenRefresher | null): void;
|
|
7176
7203
|
}
|
|
7177
7204
|
|
|
7205
|
+
/** The service-agnostic core shared by `EmporixClient` and `createEmporixClient`. */
|
|
7206
|
+
interface EmporixCore {
|
|
7207
|
+
readonly tenant: string;
|
|
7208
|
+
readonly config: ResolvedConfig;
|
|
7209
|
+
readonly tokenProvider: TokenProvider;
|
|
7210
|
+
setStorefrontContext(ctx: {
|
|
7211
|
+
currency?: string;
|
|
7212
|
+
siteCode?: string;
|
|
7213
|
+
targetLocation?: string;
|
|
7214
|
+
language?: string;
|
|
7215
|
+
}): void;
|
|
7216
|
+
setLogLevel(level: LogLevel, opts?: {
|
|
7217
|
+
service?: ServiceName;
|
|
7218
|
+
force?: boolean;
|
|
7219
|
+
}): void;
|
|
7220
|
+
getLogLevel(service: ServiceName): LogLevel;
|
|
7221
|
+
setCustomerTokenRefresher(refresher: CustomerTokenRefresher | null): void;
|
|
7222
|
+
/** Internal: builds a per-service ClientContext (logger child + HttpClient). */
|
|
7223
|
+
mk(service: ServiceName): ClientContext;
|
|
7224
|
+
}
|
|
7225
|
+
/** Validates config and assembles the shared infrastructure (no services). */
|
|
7226
|
+
declare function createCore(config: EmporixConfig): EmporixCore;
|
|
7227
|
+
|
|
7228
|
+
/**
|
|
7229
|
+
* A service class the factory can instantiate: carries its channel + optional
|
|
7230
|
+
* deps. The constructor signature is intentionally loose (`...args: any[]`) so
|
|
7231
|
+
* both dep-free services (`new Svc(ctx)`) and dependent ones
|
|
7232
|
+
* (`new Svc(ctx, deps)` — e.g. `SegmentService`) satisfy it.
|
|
7233
|
+
*/
|
|
7234
|
+
interface ServiceClass<I> {
|
|
7235
|
+
readonly channel: ServiceName;
|
|
7236
|
+
readonly deps?: readonly string[];
|
|
7237
|
+
new (...args: any[]): I;
|
|
7238
|
+
}
|
|
7239
|
+
/**
|
|
7240
|
+
* Tree-shakeable client factory. Builds ONLY the service classes you pass —
|
|
7241
|
+
* imports no services itself, so a bundler drops every service you don't use.
|
|
7242
|
+
* `EmporixClient` remains the batteries-included default; reach for this when
|
|
7243
|
+
* bundle size matters. Dependent services (e.g. `segments`) require their deps
|
|
7244
|
+
* to be present in the map under their public names (`products`, `categories`).
|
|
7245
|
+
*/
|
|
7246
|
+
declare function createEmporixClient<S extends Record<string, ServiceClass<unknown>>>(config: EmporixConfig, services: S): Omit<EmporixCore, "mk"> & {
|
|
7247
|
+
[K in keyof S]: InstanceType<S[K]>;
|
|
7248
|
+
};
|
|
7249
|
+
|
|
7178
7250
|
/**
|
|
7179
7251
|
* Extracts the product id from a product `itemYrn`
|
|
7180
7252
|
* (`urn:yaas:hybris:product:product:<tenant>;<productId>`). Cart and order line
|
|
@@ -7183,4 +7255,4 @@ declare class EmporixClient {
|
|
|
7183
7255
|
*/
|
|
7184
7256
|
declare function productIdFromYrn(yrn: string | undefined): string;
|
|
7185
7257
|
|
|
7186
|
-
export { type AddedPoints, type AdminCustomer, type AdminCustomerAddress, type AdminCustomerAddressInput, type AdminCustomerAddressList, type AdminCustomerAddressUpdate, type AdminCustomerCreated, type AdminCustomerInput, type AdminCustomerList, type AdminCustomerPatch, type AdminCustomerSearchQuery, type AdminCustomerUpdate, type Agent, type AgentInput, type AgentPatchOp, type AgentSearchQuery, AiService, type Approval, type ApprovalCreated, type ApprovalInput, type ApprovalList, type ApprovalPatch, type ApprovalPermittedInput, type ApprovalPermittedResult, ApprovalService, type ApprovalUsersQuery, type ApprovalUsersResult, type Assignee, AuthContext, AvailabilityService, type BatchNextIdEntry, type Brand, type BrandInput, type BrandList, BrandService, type BrandUpdate, CartService, type Catalog, type CatalogCreated, type CatalogInput, type CatalogList, type CatalogPatch, CatalogService, type CatalogUpdate, CategoryService, type CgRelation, type CgRelationList, type ChatRequest, type ChatResponse, CheckoutService, ClientConfigService, type ClientConfiguration, ClientContext, CloudFunctionsService, 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, CustomerAdminService, CustomerGroupsService, CustomerService, type CustomerSummaryBatch, CustomerTokenRefresher, type DeleteAgentOptions, type DeleteConfigOptions, type DeliveryCreated, type DeliveryCycleInput, type DeliverySlot, type DeliverySlotList, type DeliveryTime$1 as DeliveryTime, type DeliveryTimeInput, type DeliveryTimeList, type DeliveryTimeUpdate, type DeliveryWindow$2 as DeliveryWindow, type DeliveryWindowList, type DeliveryWindowValidation, EmporixAuthError, EmporixClient, EmporixConfig, EmporixError, EmporixForbiddenError, EmporixInsufficientScopeError, EmporixNetworkError, EmporixNotFoundError, EmporixServerError, EmporixTimeoutError, 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 InvokeCloudFunctionOptions, 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, type OrderCycleList, type OrderEntryEventCreate, type OrderStatusChange, OrdersService, type PackagingProductsChange, type PackingEvent, type PackingEventList, PaginatedItems, PaymentGatewayService, type PickOrder, type PickOrderList, type PickPackAck, PickPackService, type PointsSummary, PriceService, ProductService, type QuoteInput, type QuoteResult, type QuoteSlotInput, RagIndexerService, type RagType, type RecalculationJob, type RecalculationJobCreated, type RecalculationJobInput, type RedeemCouponResult, type RedeemMyPointsInput, type RedeemOption, type RedeemOptionList, type RedeemedPoints, type Redemption, type RedemptionCreated, type RedemptionInput, type ReferralCoupon, type Region, type RegionList, type 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 Vendor, type VendorCreated, type VendorInput, type VendorList, type VendorLocation, type VendorLocationInput, type VendorLocationList, type VendorLocationUpdate, type VendorSearchQuery, VendorService, type VendorUpdate, type WebhookConfig, type WebhookConfigCreated, type WebhookConfigDraft, type WebhookConfigPatch, type WebhookDashboardAccess, WebhookService, type WebhookStatistics, type WebhookStatisticsQuery, type WebhookSubscription, type WebhookSubscriptionUpdateItem, type WebhookSubscriptionUpdateResultItem, type Zone, type ZoneList, errorFromResponse, productIdFromYrn };
|
|
7258
|
+
export { type AddedPoints, type AdminCustomer, type AdminCustomerAddress, type AdminCustomerAddressInput, type AdminCustomerAddressList, type AdminCustomerAddressUpdate, type AdminCustomerCreated, type AdminCustomerInput, type AdminCustomerList, type AdminCustomerPatch, type AdminCustomerSearchQuery, type AdminCustomerUpdate, type Agent, type AgentInput, type AgentPatchOp, type AgentSearchQuery, AiService, type Approval, type ApprovalCreated, type ApprovalInput, type ApprovalList, type ApprovalPatch, type ApprovalPermittedInput, type ApprovalPermittedResult, ApprovalService, type ApprovalUsersQuery, type ApprovalUsersResult, type Assignee, AuthContext, AvailabilityService, type BatchNextIdEntry, type Brand, type BrandInput, type BrandList, BrandService, type BrandUpdate, CartService, type Catalog, type CatalogCreated, type CatalogInput, type CatalogList, type CatalogPatch, CatalogService, type CatalogUpdate, CategoryService, type CgRelation, type CgRelationList, type ChatRequest, type ChatResponse, CheckoutService, ClientConfigService, type ClientConfiguration, ClientContext, CloudFunctionsService, 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, CustomerAdminService, CustomerGroupsService, CustomerService, type CustomerSummaryBatch, CustomerTokenRefresher, type DeleteAgentOptions, type DeleteConfigOptions, type DeliveryCreated, type DeliveryCycleInput, type DeliverySlot, type DeliverySlotList, type DeliveryTime$1 as DeliveryTime, type DeliveryTimeInput, type DeliveryTimeList, type DeliveryTimeUpdate, type DeliveryWindow$2 as DeliveryWindow, type DeliveryWindowList, type DeliveryWindowValidation, EmporixAuthError, EmporixClient, EmporixConfig, type EmporixCore, EmporixError, EmporixForbiddenError, EmporixInsufficientScopeError, EmporixNetworkError, EmporixNotFoundError, EmporixServerError, EmporixTimeoutError, EmporixValidationError, type ExchangeRate, type ExchangeRateCreated, type ExchangeRateInput, type ExchangeRateList, type ExchangeRateUpdate, type Fee$1 as Fee, type FeeDraft, FeeService, type FindSiteInput, type IndexConfig, type IndexConfigCreated, type IndexPublicConfig, IndexingService, type InstanceSearchBody, type InvokeCloudFunctionOptions, 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, type OrderCycleList, type OrderEntryEventCreate, type OrderStatusChange, OrdersService, type PackagingProductsChange, type PackingEvent, type PackingEventList, PaginatedItems, PaymentGatewayService, type PickOrder, type PickOrderList, type PickPackAck, PickPackService, type PointsSummary, PriceService, ProductService, type QuoteInput, type QuoteResult, type QuoteSlotInput, RagIndexerService, type RagType, type RecalculationJob, type RecalculationJobCreated, type RecalculationJobInput, type RedeemCouponResult, type RedeemMyPointsInput, type RedeemOption, type RedeemOptionList, type RedeemedPoints, type Redemption, type RedemptionCreated, type RedemptionInput, type ReferralCoupon, type Region, type RegionList, type 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, type ServiceClass, ServiceName, type SessionContext, type SessionContextPatch, SessionContextService, type SetItemFeesOptions, type ShippingGroup, type ShippingGroupList, type ShippingMethod, type ShippingMethodList, type ShippingPatch, ShippingService, type ShoppingList, type ShoppingListDraft, type ShoppingListItem, ShoppingListService, type Site$1 as Site, type SiteList, SiteService, type TaxCalculationInput, type TaxCalculationRequest, type TaxCalculationResult, type TaxClass, type TaxConfig, type TaxConfigCreated, type TaxCreation as TaxConfigInput, type TaxUpdate as TaxConfigUpdate, type TaxLocation, TaxService, TenantConfigService, type TextRequest, type TextResponse, TokenProvider, type Unit, type UnitCreated, UnitHandlingService, type UnitInput, type UnitUpdate, type Vendor, type VendorCreated, type VendorInput, type VendorList, type VendorLocation, type VendorLocationInput, type VendorLocationList, type VendorLocationUpdate, type VendorSearchQuery, VendorService, type VendorUpdate, type WebhookConfig, type WebhookConfigCreated, type WebhookConfigDraft, type WebhookConfigPatch, type WebhookDashboardAccess, WebhookService, type WebhookStatistics, type WebhookStatisticsQuery, type WebhookSubscription, type WebhookSubscriptionUpdateItem, type WebhookSubscriptionUpdateResultItem, type Zone, type ZoneList, createCore, createEmporixClient, errorFromResponse, productIdFromYrn };
|
package/dist/index.d.ts
CHANGED
|
@@ -106,6 +106,7 @@ interface Site$1 {
|
|
|
106
106
|
*/
|
|
107
107
|
declare class SiteService {
|
|
108
108
|
private readonly ctx;
|
|
109
|
+
static readonly channel: "site";
|
|
109
110
|
constructor(ctx: ClientContext);
|
|
110
111
|
/** Lists active sites. */
|
|
111
112
|
list(authCtx?: AuthContext): Promise<Site$1[]>;
|
|
@@ -162,6 +163,7 @@ interface SessionContextPatch {
|
|
|
162
163
|
*/
|
|
163
164
|
declare class SessionContextService {
|
|
164
165
|
private readonly ctx;
|
|
166
|
+
static readonly channel: "session-context";
|
|
165
167
|
constructor(ctx: ClientContext);
|
|
166
168
|
/**
|
|
167
169
|
* Retrieves the current session context, or `null` when the server returns
|
|
@@ -257,6 +259,7 @@ interface ListConfigOptions {
|
|
|
257
259
|
*/
|
|
258
260
|
declare class TenantConfigService {
|
|
259
261
|
private readonly ctx;
|
|
262
|
+
static readonly channel: "configuration";
|
|
260
263
|
constructor(ctx: ClientContext);
|
|
261
264
|
private base;
|
|
262
265
|
/** List tenant configurations, optionally filtered by `keys`. */
|
|
@@ -280,6 +283,7 @@ declare class TenantConfigService {
|
|
|
280
283
|
*/
|
|
281
284
|
declare class ClientConfigService {
|
|
282
285
|
private readonly ctx;
|
|
286
|
+
static readonly channel: "configuration";
|
|
283
287
|
constructor(ctx: ClientContext);
|
|
284
288
|
private base;
|
|
285
289
|
/** List a client's configurations, optionally filtered by `keys`. */
|
|
@@ -327,6 +331,7 @@ interface ShoppingListDraft {
|
|
|
327
331
|
*/
|
|
328
332
|
declare class ShoppingListService {
|
|
329
333
|
private readonly ctx;
|
|
334
|
+
static readonly channel: "shopping-list";
|
|
330
335
|
constructor(ctx: ClientContext);
|
|
331
336
|
private base;
|
|
332
337
|
/** The caller's lists (or, with employee scope, all), normalized to an array. */
|
|
@@ -403,6 +408,7 @@ type RagType = "PRODUCT";
|
|
|
403
408
|
*/
|
|
404
409
|
declare class RagIndexerService {
|
|
405
410
|
private readonly ctx;
|
|
411
|
+
static readonly channel: "ai-rag-indexer";
|
|
406
412
|
constructor(ctx: ClientContext);
|
|
407
413
|
private base;
|
|
408
414
|
/** The indexable embedding field names for `type` (default `"PRODUCT"`). */
|
|
@@ -573,6 +579,7 @@ type NextIdsBatchResponse = Record<string, {
|
|
|
573
579
|
*/
|
|
574
580
|
declare class SequentialIdService {
|
|
575
581
|
private readonly ctx;
|
|
582
|
+
static readonly channel: "sequential-id";
|
|
576
583
|
constructor(ctx: ClientContext);
|
|
577
584
|
private base;
|
|
578
585
|
/** List all sequence schemas for the tenant. */
|
|
@@ -746,6 +753,7 @@ interface SetItemFeesOptions {
|
|
|
746
753
|
*/
|
|
747
754
|
declare class FeeService {
|
|
748
755
|
private readonly ctx;
|
|
756
|
+
static readonly channel: "fee";
|
|
749
757
|
constructor(ctx: ClientContext);
|
|
750
758
|
private feesBase;
|
|
751
759
|
private itemFeesBase;
|
|
@@ -814,6 +822,7 @@ interface InvokeCloudFunctionOptions<TReq = unknown> {
|
|
|
814
822
|
*/
|
|
815
823
|
declare class CloudFunctionsService {
|
|
816
824
|
private readonly ctx;
|
|
825
|
+
static readonly channel: "cloud-functions";
|
|
817
826
|
constructor(ctx: ClientContext);
|
|
818
827
|
private base;
|
|
819
828
|
invoke<TRes = unknown, TReq = unknown>(functionId: string, options?: InvokeCloudFunctionOptions<TReq>, authCtx?: AuthContext): Promise<TRes>;
|
|
@@ -1125,6 +1134,7 @@ interface DeleteConfigOptions {
|
|
|
1125
1134
|
*/
|
|
1126
1135
|
declare class WebhookService {
|
|
1127
1136
|
private readonly ctx;
|
|
1137
|
+
static readonly channel: "webhook";
|
|
1128
1138
|
constructor(ctx: ClientContext);
|
|
1129
1139
|
private base;
|
|
1130
1140
|
/** List the event-subscription catalog with each event's on/off state. */
|
|
@@ -1467,6 +1477,7 @@ type InstanceSearchBody = Record<string, unknown>;
|
|
|
1467
1477
|
*/
|
|
1468
1478
|
declare class SchemaService {
|
|
1469
1479
|
private readonly ctx;
|
|
1480
|
+
static readonly channel: "schema";
|
|
1470
1481
|
constructor(ctx: ClientContext);
|
|
1471
1482
|
private schemasBase;
|
|
1472
1483
|
private entitiesBase;
|
|
@@ -2168,6 +2179,7 @@ interface DeleteAgentOptions {
|
|
|
2168
2179
|
*/
|
|
2169
2180
|
declare class AiService {
|
|
2170
2181
|
private readonly ctx;
|
|
2182
|
+
static readonly channel: "ai";
|
|
2171
2183
|
constructor(ctx: ClientContext);
|
|
2172
2184
|
private base;
|
|
2173
2185
|
/** Generate text from a single prompt (`POST /texts`). Honors `maxTokens`. */
|
|
@@ -2452,6 +2464,7 @@ type TaxCalculationResult = TaxCalculationResponse;
|
|
|
2452
2464
|
*/
|
|
2453
2465
|
declare class TaxService {
|
|
2454
2466
|
private readonly ctx;
|
|
2467
|
+
static readonly channel: "tax";
|
|
2455
2468
|
constructor(ctx: ClientContext);
|
|
2456
2469
|
private base;
|
|
2457
2470
|
/** List all per-location tax configurations. */
|
|
@@ -2877,6 +2890,7 @@ type CouponCreated = ResourceLocation$1;
|
|
|
2877
2890
|
*/
|
|
2878
2891
|
declare class CouponService {
|
|
2879
2892
|
private readonly ctx;
|
|
2893
|
+
static readonly channel: "coupon";
|
|
2880
2894
|
constructor(ctx: ClientContext);
|
|
2881
2895
|
private base;
|
|
2882
2896
|
/** List coupons by criteria. Returns a plain array. */
|
|
@@ -3178,6 +3192,7 @@ interface RedeemMyPointsInput {
|
|
|
3178
3192
|
*/
|
|
3179
3193
|
declare class RewardPointsService {
|
|
3180
3194
|
private readonly ctx;
|
|
3195
|
+
static readonly channel: "reward-points";
|
|
3181
3196
|
constructor(ctx: ClientContext);
|
|
3182
3197
|
/** Base without tenant (customer / public / batch endpoints). */
|
|
3183
3198
|
private base;
|
|
@@ -3347,6 +3362,7 @@ type BrandUpdate = UpdateBrand;
|
|
|
3347
3362
|
*/
|
|
3348
3363
|
declare class BrandService {
|
|
3349
3364
|
private readonly ctx;
|
|
3365
|
+
static readonly channel: "brand";
|
|
3350
3366
|
constructor(ctx: ClientContext);
|
|
3351
3367
|
private base;
|
|
3352
3368
|
/** List all brands. */
|
|
@@ -3459,6 +3475,7 @@ type LabelUpdate = LabelUpdate$1;
|
|
|
3459
3475
|
*/
|
|
3460
3476
|
declare class LabelService {
|
|
3461
3477
|
private readonly ctx;
|
|
3478
|
+
static readonly channel: "label";
|
|
3462
3479
|
constructor(ctx: ClientContext);
|
|
3463
3480
|
private base;
|
|
3464
3481
|
/** List all labels. */
|
|
@@ -3560,6 +3577,7 @@ type RegionList = Region[];
|
|
|
3560
3577
|
*/
|
|
3561
3578
|
declare class CountryService {
|
|
3562
3579
|
private readonly ctx;
|
|
3580
|
+
static readonly channel: "country";
|
|
3563
3581
|
constructor(ctx: ClientContext);
|
|
3564
3582
|
private base;
|
|
3565
3583
|
/** List all countries. */
|
|
@@ -3745,6 +3763,7 @@ type ExchangeRateCreated = ExchangeRateResponse;
|
|
|
3745
3763
|
*/
|
|
3746
3764
|
declare class CurrencyService {
|
|
3747
3765
|
private readonly ctx;
|
|
3766
|
+
static readonly channel: "currency";
|
|
3748
3767
|
constructor(ctx: ClientContext);
|
|
3749
3768
|
private base;
|
|
3750
3769
|
/** List all currencies. */
|
|
@@ -4332,6 +4351,7 @@ interface DeliveryCreated {
|
|
|
4332
4351
|
*/
|
|
4333
4352
|
declare class ShippingService {
|
|
4334
4353
|
private readonly ctx;
|
|
4354
|
+
static readonly channel: "shipping";
|
|
4335
4355
|
constructor(ctx: ClientContext);
|
|
4336
4356
|
private base;
|
|
4337
4357
|
private siteBase;
|
|
@@ -4939,6 +4959,7 @@ type ReturnCreated = ReturnId;
|
|
|
4939
4959
|
*/
|
|
4940
4960
|
declare class ReturnsService {
|
|
4941
4961
|
private readonly ctx;
|
|
4962
|
+
static readonly channel: "returns";
|
|
4942
4963
|
constructor(ctx: ClientContext);
|
|
4943
4964
|
private base;
|
|
4944
4965
|
/** List returns (paged; supports `pageSize`/`pageNumber`/`sort`/`q`). */
|
|
@@ -4990,6 +5011,7 @@ type SepaJobCreated = JobId;
|
|
|
4990
5011
|
*/
|
|
4991
5012
|
declare class SepaExportService {
|
|
4992
5013
|
private readonly ctx;
|
|
5014
|
+
static readonly channel: "sepa-export";
|
|
4993
5015
|
constructor(ctx: ClientContext);
|
|
4994
5016
|
private base;
|
|
4995
5017
|
/** Retrieve a SEPA export file by id. Returns the raw file content (text). */
|
|
@@ -5065,6 +5087,7 @@ type ReindexInput = Reindex;
|
|
|
5065
5087
|
*/
|
|
5066
5088
|
declare class IndexingService {
|
|
5067
5089
|
private readonly ctx;
|
|
5090
|
+
static readonly channel: "indexing";
|
|
5068
5091
|
constructor(ctx: ClientContext);
|
|
5069
5092
|
private base;
|
|
5070
5093
|
/** List indexing configurations. */
|
|
@@ -5251,6 +5274,7 @@ type ConvertUnitResult = ConversionResponse;
|
|
|
5251
5274
|
*/
|
|
5252
5275
|
declare class UnitHandlingService {
|
|
5253
5276
|
private readonly ctx;
|
|
5277
|
+
static readonly channel: "unit-handling";
|
|
5254
5278
|
constructor(ctx: ClientContext);
|
|
5255
5279
|
private base;
|
|
5256
5280
|
/** Find units (filter/sort/page). */
|
|
@@ -5427,6 +5451,7 @@ type CatalogCreated = CreateCatalogResponse;
|
|
|
5427
5451
|
*/
|
|
5428
5452
|
declare class CatalogService {
|
|
5429
5453
|
private readonly ctx;
|
|
5454
|
+
static readonly channel: "catalog";
|
|
5430
5455
|
constructor(ctx: ClientContext);
|
|
5431
5456
|
private base;
|
|
5432
5457
|
/** List catalogs (filtered/sorted). */
|
|
@@ -5749,6 +5774,7 @@ type VendorLocationUpdate = LocationUpdate;
|
|
|
5749
5774
|
*/
|
|
5750
5775
|
declare class VendorService {
|
|
5751
5776
|
private readonly ctx;
|
|
5777
|
+
static readonly channel: "vendor";
|
|
5752
5778
|
constructor(ctx: ClientContext);
|
|
5753
5779
|
private base;
|
|
5754
5780
|
/** List all vendors. */
|
|
@@ -6223,6 +6249,7 @@ interface RecalculationJobCreated {
|
|
|
6223
6249
|
*/
|
|
6224
6250
|
declare class PickPackService {
|
|
6225
6251
|
private readonly ctx;
|
|
6252
|
+
static readonly channel: "pick-pack";
|
|
6226
6253
|
constructor(ctx: ClientContext);
|
|
6227
6254
|
private base;
|
|
6228
6255
|
private orderPath;
|
|
@@ -6575,6 +6602,7 @@ type AdminCustomerAddressUpdate = AddressUpdateDto;
|
|
|
6575
6602
|
*/
|
|
6576
6603
|
declare class CustomerAdminService {
|
|
6577
6604
|
private readonly ctx;
|
|
6605
|
+
static readonly channel: "customer-admin";
|
|
6578
6606
|
constructor(ctx: ClientContext);
|
|
6579
6607
|
private base;
|
|
6580
6608
|
private customerPath;
|
|
@@ -7059,6 +7087,7 @@ type ApprovalUsersResult = User[];
|
|
|
7059
7087
|
*/
|
|
7060
7088
|
declare class ApprovalService {
|
|
7061
7089
|
private readonly ctx;
|
|
7090
|
+
static readonly channel: "approval";
|
|
7062
7091
|
constructor(ctx: ClientContext);
|
|
7063
7092
|
private base;
|
|
7064
7093
|
/** List approvals (paged via `pageNumber`/`pageSize`/`sort`/`q`). Returns an array. */
|
|
@@ -7139,9 +7168,7 @@ declare class EmporixClient {
|
|
|
7139
7168
|
* Provider tree. Treat as read-only.
|
|
7140
7169
|
*/
|
|
7141
7170
|
readonly config: ResolvedConfig;
|
|
7142
|
-
private readonly
|
|
7143
|
-
private readonly customerRefresh;
|
|
7144
|
-
private readonly requestContext;
|
|
7171
|
+
private readonly core;
|
|
7145
7172
|
constructor(config: EmporixConfig);
|
|
7146
7173
|
/**
|
|
7147
7174
|
* Re-binds the storefront price context (currency / siteCode / targetLocation)
|
|
@@ -7175,6 +7202,51 @@ declare class EmporixClient {
|
|
|
7175
7202
|
setCustomerTokenRefresher(refresher: CustomerTokenRefresher | null): void;
|
|
7176
7203
|
}
|
|
7177
7204
|
|
|
7205
|
+
/** The service-agnostic core shared by `EmporixClient` and `createEmporixClient`. */
|
|
7206
|
+
interface EmporixCore {
|
|
7207
|
+
readonly tenant: string;
|
|
7208
|
+
readonly config: ResolvedConfig;
|
|
7209
|
+
readonly tokenProvider: TokenProvider;
|
|
7210
|
+
setStorefrontContext(ctx: {
|
|
7211
|
+
currency?: string;
|
|
7212
|
+
siteCode?: string;
|
|
7213
|
+
targetLocation?: string;
|
|
7214
|
+
language?: string;
|
|
7215
|
+
}): void;
|
|
7216
|
+
setLogLevel(level: LogLevel, opts?: {
|
|
7217
|
+
service?: ServiceName;
|
|
7218
|
+
force?: boolean;
|
|
7219
|
+
}): void;
|
|
7220
|
+
getLogLevel(service: ServiceName): LogLevel;
|
|
7221
|
+
setCustomerTokenRefresher(refresher: CustomerTokenRefresher | null): void;
|
|
7222
|
+
/** Internal: builds a per-service ClientContext (logger child + HttpClient). */
|
|
7223
|
+
mk(service: ServiceName): ClientContext;
|
|
7224
|
+
}
|
|
7225
|
+
/** Validates config and assembles the shared infrastructure (no services). */
|
|
7226
|
+
declare function createCore(config: EmporixConfig): EmporixCore;
|
|
7227
|
+
|
|
7228
|
+
/**
|
|
7229
|
+
* A service class the factory can instantiate: carries its channel + optional
|
|
7230
|
+
* deps. The constructor signature is intentionally loose (`...args: any[]`) so
|
|
7231
|
+
* both dep-free services (`new Svc(ctx)`) and dependent ones
|
|
7232
|
+
* (`new Svc(ctx, deps)` — e.g. `SegmentService`) satisfy it.
|
|
7233
|
+
*/
|
|
7234
|
+
interface ServiceClass<I> {
|
|
7235
|
+
readonly channel: ServiceName;
|
|
7236
|
+
readonly deps?: readonly string[];
|
|
7237
|
+
new (...args: any[]): I;
|
|
7238
|
+
}
|
|
7239
|
+
/**
|
|
7240
|
+
* Tree-shakeable client factory. Builds ONLY the service classes you pass —
|
|
7241
|
+
* imports no services itself, so a bundler drops every service you don't use.
|
|
7242
|
+
* `EmporixClient` remains the batteries-included default; reach for this when
|
|
7243
|
+
* bundle size matters. Dependent services (e.g. `segments`) require their deps
|
|
7244
|
+
* to be present in the map under their public names (`products`, `categories`).
|
|
7245
|
+
*/
|
|
7246
|
+
declare function createEmporixClient<S extends Record<string, ServiceClass<unknown>>>(config: EmporixConfig, services: S): Omit<EmporixCore, "mk"> & {
|
|
7247
|
+
[K in keyof S]: InstanceType<S[K]>;
|
|
7248
|
+
};
|
|
7249
|
+
|
|
7178
7250
|
/**
|
|
7179
7251
|
* Extracts the product id from a product `itemYrn`
|
|
7180
7252
|
* (`urn:yaas:hybris:product:product:<tenant>;<productId>`). Cart and order line
|
|
@@ -7183,4 +7255,4 @@ declare class EmporixClient {
|
|
|
7183
7255
|
*/
|
|
7184
7256
|
declare function productIdFromYrn(yrn: string | undefined): string;
|
|
7185
7257
|
|
|
7186
|
-
export { type AddedPoints, type AdminCustomer, type AdminCustomerAddress, type AdminCustomerAddressInput, type AdminCustomerAddressList, type AdminCustomerAddressUpdate, type AdminCustomerCreated, type AdminCustomerInput, type AdminCustomerList, type AdminCustomerPatch, type AdminCustomerSearchQuery, type AdminCustomerUpdate, type Agent, type AgentInput, type AgentPatchOp, type AgentSearchQuery, AiService, type Approval, type ApprovalCreated, type ApprovalInput, type ApprovalList, type ApprovalPatch, type ApprovalPermittedInput, type ApprovalPermittedResult, ApprovalService, type ApprovalUsersQuery, type ApprovalUsersResult, type Assignee, AuthContext, AvailabilityService, type BatchNextIdEntry, type Brand, type BrandInput, type BrandList, BrandService, type BrandUpdate, CartService, type Catalog, type CatalogCreated, type CatalogInput, type CatalogList, type CatalogPatch, CatalogService, type CatalogUpdate, CategoryService, type CgRelation, type CgRelationList, type ChatRequest, type ChatResponse, CheckoutService, ClientConfigService, type ClientConfiguration, ClientContext, CloudFunctionsService, 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, CustomerAdminService, CustomerGroupsService, CustomerService, type CustomerSummaryBatch, CustomerTokenRefresher, type DeleteAgentOptions, type DeleteConfigOptions, type DeliveryCreated, type DeliveryCycleInput, type DeliverySlot, type DeliverySlotList, type DeliveryTime$1 as DeliveryTime, type DeliveryTimeInput, type DeliveryTimeList, type DeliveryTimeUpdate, type DeliveryWindow$2 as DeliveryWindow, type DeliveryWindowList, type DeliveryWindowValidation, EmporixAuthError, EmporixClient, EmporixConfig, EmporixError, EmporixForbiddenError, EmporixInsufficientScopeError, EmporixNetworkError, EmporixNotFoundError, EmporixServerError, EmporixTimeoutError, 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 InvokeCloudFunctionOptions, 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, type OrderCycleList, type OrderEntryEventCreate, type OrderStatusChange, OrdersService, type PackagingProductsChange, type PackingEvent, type PackingEventList, PaginatedItems, PaymentGatewayService, type PickOrder, type PickOrderList, type PickPackAck, PickPackService, type PointsSummary, PriceService, ProductService, type QuoteInput, type QuoteResult, type QuoteSlotInput, RagIndexerService, type RagType, type RecalculationJob, type RecalculationJobCreated, type RecalculationJobInput, type RedeemCouponResult, type RedeemMyPointsInput, type RedeemOption, type RedeemOptionList, type RedeemedPoints, type Redemption, type RedemptionCreated, type RedemptionInput, type ReferralCoupon, type Region, type RegionList, type 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 Vendor, type VendorCreated, type VendorInput, type VendorList, type VendorLocation, type VendorLocationInput, type VendorLocationList, type VendorLocationUpdate, type VendorSearchQuery, VendorService, type VendorUpdate, type WebhookConfig, type WebhookConfigCreated, type WebhookConfigDraft, type WebhookConfigPatch, type WebhookDashboardAccess, WebhookService, type WebhookStatistics, type WebhookStatisticsQuery, type WebhookSubscription, type WebhookSubscriptionUpdateItem, type WebhookSubscriptionUpdateResultItem, type Zone, type ZoneList, errorFromResponse, productIdFromYrn };
|
|
7258
|
+
export { type AddedPoints, type AdminCustomer, type AdminCustomerAddress, type AdminCustomerAddressInput, type AdminCustomerAddressList, type AdminCustomerAddressUpdate, type AdminCustomerCreated, type AdminCustomerInput, type AdminCustomerList, type AdminCustomerPatch, type AdminCustomerSearchQuery, type AdminCustomerUpdate, type Agent, type AgentInput, type AgentPatchOp, type AgentSearchQuery, AiService, type Approval, type ApprovalCreated, type ApprovalInput, type ApprovalList, type ApprovalPatch, type ApprovalPermittedInput, type ApprovalPermittedResult, ApprovalService, type ApprovalUsersQuery, type ApprovalUsersResult, type Assignee, AuthContext, AvailabilityService, type BatchNextIdEntry, type Brand, type BrandInput, type BrandList, BrandService, type BrandUpdate, CartService, type Catalog, type CatalogCreated, type CatalogInput, type CatalogList, type CatalogPatch, CatalogService, type CatalogUpdate, CategoryService, type CgRelation, type CgRelationList, type ChatRequest, type ChatResponse, CheckoutService, ClientConfigService, type ClientConfiguration, ClientContext, CloudFunctionsService, 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, CustomerAdminService, CustomerGroupsService, CustomerService, type CustomerSummaryBatch, CustomerTokenRefresher, type DeleteAgentOptions, type DeleteConfigOptions, type DeliveryCreated, type DeliveryCycleInput, type DeliverySlot, type DeliverySlotList, type DeliveryTime$1 as DeliveryTime, type DeliveryTimeInput, type DeliveryTimeList, type DeliveryTimeUpdate, type DeliveryWindow$2 as DeliveryWindow, type DeliveryWindowList, type DeliveryWindowValidation, EmporixAuthError, EmporixClient, EmporixConfig, type EmporixCore, EmporixError, EmporixForbiddenError, EmporixInsufficientScopeError, EmporixNetworkError, EmporixNotFoundError, EmporixServerError, EmporixTimeoutError, EmporixValidationError, type ExchangeRate, type ExchangeRateCreated, type ExchangeRateInput, type ExchangeRateList, type ExchangeRateUpdate, type Fee$1 as Fee, type FeeDraft, FeeService, type FindSiteInput, type IndexConfig, type IndexConfigCreated, type IndexPublicConfig, IndexingService, type InstanceSearchBody, type InvokeCloudFunctionOptions, 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, type OrderCycleList, type OrderEntryEventCreate, type OrderStatusChange, OrdersService, type PackagingProductsChange, type PackingEvent, type PackingEventList, PaginatedItems, PaymentGatewayService, type PickOrder, type PickOrderList, type PickPackAck, PickPackService, type PointsSummary, PriceService, ProductService, type QuoteInput, type QuoteResult, type QuoteSlotInput, RagIndexerService, type RagType, type RecalculationJob, type RecalculationJobCreated, type RecalculationJobInput, type RedeemCouponResult, type RedeemMyPointsInput, type RedeemOption, type RedeemOptionList, type RedeemedPoints, type Redemption, type RedemptionCreated, type RedemptionInput, type ReferralCoupon, type Region, type RegionList, type 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, type ServiceClass, ServiceName, type SessionContext, type SessionContextPatch, SessionContextService, type SetItemFeesOptions, type ShippingGroup, type ShippingGroupList, type ShippingMethod, type ShippingMethodList, type ShippingPatch, ShippingService, type ShoppingList, type ShoppingListDraft, type ShoppingListItem, ShoppingListService, type Site$1 as Site, type SiteList, SiteService, type TaxCalculationInput, type TaxCalculationRequest, type TaxCalculationResult, type TaxClass, type TaxConfig, type TaxConfigCreated, type TaxCreation as TaxConfigInput, type TaxUpdate as TaxConfigUpdate, type TaxLocation, TaxService, TenantConfigService, type TextRequest, type TextResponse, TokenProvider, type Unit, type UnitCreated, UnitHandlingService, type UnitInput, type UnitUpdate, type Vendor, type VendorCreated, type VendorInput, type VendorList, type VendorLocation, type VendorLocationInput, type VendorLocationList, type VendorLocationUpdate, type VendorSearchQuery, VendorService, type VendorUpdate, type WebhookConfig, type WebhookConfigCreated, type WebhookConfigDraft, type WebhookConfigPatch, type WebhookDashboardAccess, WebhookService, type WebhookStatistics, type WebhookStatisticsQuery, type WebhookSubscription, type WebhookSubscriptionUpdateItem, type WebhookSubscriptionUpdateResultItem, type Zone, type ZoneList, createCore, createEmporixClient, errorFromResponse, productIdFromYrn };
|