@viu/emporix-sdk 2.34.0 → 2.35.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 +28 -0
- package/dist/index.cjs +57 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +169 -1
- package/dist/index.d.ts +169 -1
- package/dist/index.js +57 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -10287,6 +10287,115 @@ type CustomerSignupBySellerDto = CustomerCreateDto & {
|
|
|
10287
10287
|
*/
|
|
10288
10288
|
password?: string;
|
|
10289
10289
|
};
|
|
10290
|
+
type CustomerImportDto = CustomerCreateDto & {
|
|
10291
|
+
/**
|
|
10292
|
+
* Custom customer identifier. If not provided, it is automatically generated.
|
|
10293
|
+
*/
|
|
10294
|
+
id?: string;
|
|
10295
|
+
/**
|
|
10296
|
+
* Optional contact email. When provided, it must match `account.email` (case-insensitive).
|
|
10297
|
+
* If omitted, `account.email` is used as the contact email.
|
|
10298
|
+
*
|
|
10299
|
+
*/
|
|
10300
|
+
contactEmail?: string;
|
|
10301
|
+
account: CustomerImportAccountDto;
|
|
10302
|
+
};
|
|
10303
|
+
type CustomerImportAccountDto = {
|
|
10304
|
+
/**
|
|
10305
|
+
* Customer account email address. Used as the account identifier.
|
|
10306
|
+
*/
|
|
10307
|
+
email: string;
|
|
10308
|
+
/**
|
|
10309
|
+
* Precomputed Emporix native password hash.
|
|
10310
|
+
*
|
|
10311
|
+
* Provide exactly one of `passwordHash` or `legacyAuth`.
|
|
10312
|
+
* Please, contact Emporix support to determine if your existing password hashing strategy is compatible with the Emporix native password hashing strategy.
|
|
10313
|
+
*
|
|
10314
|
+
*/
|
|
10315
|
+
passwordHash?: string;
|
|
10316
|
+
legacyAuth?: LegacyAuth;
|
|
10317
|
+
};
|
|
10318
|
+
type LegacyAuth = {
|
|
10319
|
+
/**
|
|
10320
|
+
* Identifier of the legacy password verifier to use during login. Please, contact Emporix support to determine the correct value for your case.
|
|
10321
|
+
*/
|
|
10322
|
+
algorithm: 'hybris-sha512-uid-salt';
|
|
10323
|
+
/**
|
|
10324
|
+
* Raw password hash exported from the source system. Stored only in `legacyAuth`, never in the native password field.
|
|
10325
|
+
*/
|
|
10326
|
+
hash: string;
|
|
10327
|
+
/**
|
|
10328
|
+
* Algorithm-specific metadata required for verification.
|
|
10329
|
+
* Please, contact Emporix support to determine the correct values for your case.
|
|
10330
|
+
*
|
|
10331
|
+
*/
|
|
10332
|
+
context?: {
|
|
10333
|
+
[key: string]: string;
|
|
10334
|
+
};
|
|
10335
|
+
};
|
|
10336
|
+
type PasswordMigrationRetentionConfigRequest = {
|
|
10337
|
+
/**
|
|
10338
|
+
* Future date when the password migration retention window ends.
|
|
10339
|
+
*/
|
|
10340
|
+
retentionEndDate: string;
|
|
10341
|
+
/**
|
|
10342
|
+
* Optional date on or after today and before `retentionEndDate` when reminder emails are sent to unmigrated customers.
|
|
10343
|
+
* When omitted, defaults to 7 days before `retentionEndDate`, or to tomorrow when that default would fall on or before today.
|
|
10344
|
+
*
|
|
10345
|
+
*/
|
|
10346
|
+
emailReminderDate?: string;
|
|
10347
|
+
/**
|
|
10348
|
+
* Optional flag indicating whether customers receive email notifications about the migration process.
|
|
10349
|
+
* When `true`, customers receive reminder and password reset emails. When `false`, customers do not receive any emails regarding the migration.
|
|
10350
|
+
* When omitted, defaults to `true`.
|
|
10351
|
+
*
|
|
10352
|
+
*/
|
|
10353
|
+
emailNotificationsEnabled?: boolean;
|
|
10354
|
+
};
|
|
10355
|
+
type PasswordMigrationRetentionConfigResponse = {
|
|
10356
|
+
/**
|
|
10357
|
+
* Date when the password migration retention window ends.
|
|
10358
|
+
*/
|
|
10359
|
+
retentionEndDate?: string;
|
|
10360
|
+
/**
|
|
10361
|
+
* Date when reminder emails are sent to unmigrated customers.
|
|
10362
|
+
*/
|
|
10363
|
+
emailReminderDate?: string;
|
|
10364
|
+
/**
|
|
10365
|
+
* Flag indicating whether customers receive email notifications about the migration process.
|
|
10366
|
+
* When `true`, customers receive reminder and password reset emails. When `false`, customers do not receive any emails regarding the migration.
|
|
10367
|
+
*
|
|
10368
|
+
*/
|
|
10369
|
+
emailNotificationsEnabled?: boolean;
|
|
10370
|
+
};
|
|
10371
|
+
type CustomerBulkItemResponse = {
|
|
10372
|
+
/**
|
|
10373
|
+
* Index of the processed item, matching the item position in the request body.
|
|
10374
|
+
*/
|
|
10375
|
+
index?: number;
|
|
10376
|
+
/**
|
|
10377
|
+
* Customer number generated for a successfully imported customer.
|
|
10378
|
+
*/
|
|
10379
|
+
id?: string;
|
|
10380
|
+
/**
|
|
10381
|
+
* HTTP status code for the processed item.
|
|
10382
|
+
*/
|
|
10383
|
+
code?: number;
|
|
10384
|
+
/**
|
|
10385
|
+
* HTTP status description for the processed item.
|
|
10386
|
+
*/
|
|
10387
|
+
status?: string;
|
|
10388
|
+
/**
|
|
10389
|
+
* Error message when the item failed.
|
|
10390
|
+
*/
|
|
10391
|
+
message?: string;
|
|
10392
|
+
/**
|
|
10393
|
+
* List of problems causing the error.
|
|
10394
|
+
*/
|
|
10395
|
+
details?: Array<{
|
|
10396
|
+
message?: string;
|
|
10397
|
+
}>;
|
|
10398
|
+
};
|
|
10290
10399
|
type CustomerUpdateBySellerDto = CustomerCommonDto & {
|
|
10291
10400
|
contactEmail?: string;
|
|
10292
10401
|
active?: boolean;
|
|
@@ -10388,6 +10497,35 @@ type AdminCustomerAddressList = AdminCustomerAddress[];
|
|
|
10388
10497
|
type AdminCustomerAddressInput = Address2;
|
|
10389
10498
|
/** Upsert/patch address body (`PUT`/`PATCH …/addresses/{id}`). */
|
|
10390
10499
|
type AdminCustomerAddressUpdate = AddressUpdateDto;
|
|
10500
|
+
/**
|
|
10501
|
+
* The tenant's password-migration retention window (read shape). Every field is
|
|
10502
|
+
* optional upstream — an unconfigured tenant answers with an empty object.
|
|
10503
|
+
*/
|
|
10504
|
+
type AdminPasswordMigrationRetention = PasswordMigrationRetentionConfigResponse;
|
|
10505
|
+
/**
|
|
10506
|
+
* Body for `configurePasswordMigrationRetention`. `retentionEndDate` is required.
|
|
10507
|
+
* `emailReminderDate` defaults to 7 days before it (or tomorrow, when that would
|
|
10508
|
+
* already be past); `emailNotificationsEnabled` defaults to `true`.
|
|
10509
|
+
*/
|
|
10510
|
+
type AdminPasswordMigrationRetentionInput = PasswordMigrationRetentionConfigRequest;
|
|
10511
|
+
/**
|
|
10512
|
+
* One customer of the bulk-import body. Extends the create shape with an `account`
|
|
10513
|
+
* block; every inherited profile field is optional, so `account.email` is the only
|
|
10514
|
+
* hard requirement.
|
|
10515
|
+
*/
|
|
10516
|
+
type AdminCustomerImport = CustomerImportDto;
|
|
10517
|
+
/**
|
|
10518
|
+
* The `account` block of an import item. Provide **exactly one** of `passwordHash`
|
|
10519
|
+
* or `legacyAuth` — the type permits both, the service does not.
|
|
10520
|
+
*/
|
|
10521
|
+
type AdminCustomerImportAccount = CustomerImportAccountDto;
|
|
10522
|
+
/** A legacy password hash carried by an import item. */
|
|
10523
|
+
type AdminCustomerLegacyAuth = LegacyAuth;
|
|
10524
|
+
/**
|
|
10525
|
+
* One entry of the `207` import result. `code` is the per-item HTTP status, so a
|
|
10526
|
+
* `409` here is a rejected customer inside an otherwise successful call.
|
|
10527
|
+
*/
|
|
10528
|
+
type AdminCustomerImportResult = CustomerBulkItemResponse;
|
|
10391
10529
|
|
|
10392
10530
|
/**
|
|
10393
10531
|
* Emporix Customer Service — tenant/seller-managed customer profiles and
|
|
@@ -10400,6 +10538,7 @@ declare class CustomerAdminService {
|
|
|
10400
10538
|
constructor(ctx: ClientContext);
|
|
10401
10539
|
private base;
|
|
10402
10540
|
private customerPath;
|
|
10541
|
+
private configPath;
|
|
10403
10542
|
private addressPath;
|
|
10404
10543
|
/** List customers. */
|
|
10405
10544
|
listCustomers(query?: Record<string, string | number>, auth?: AuthContext): Promise<AdminCustomerList>;
|
|
@@ -10431,6 +10570,35 @@ declare class CustomerAdminService {
|
|
|
10431
10570
|
addAddressTags(customerNumber: string, addressId: string, tags: string[], auth?: AuthContext): Promise<void>;
|
|
10432
10571
|
/** Remove tags from an address (`?tags=` query). */
|
|
10433
10572
|
removeAddressTags(customerNumber: string, addressId: string, tags: string[], auth?: AuthContext): Promise<void>;
|
|
10573
|
+
/**
|
|
10574
|
+
* Retrieves the tenant's password-migration retention config. Requires the
|
|
10575
|
+
* `customer.import_read` scope. An unconfigured tenant answers with an empty
|
|
10576
|
+
* object rather than a 404.
|
|
10577
|
+
*/
|
|
10578
|
+
getPasswordMigrationRetention(auth?: AuthContext): Promise<AdminPasswordMigrationRetention>;
|
|
10579
|
+
/**
|
|
10580
|
+
* Creates or updates the retention config (`POST`). Requires the
|
|
10581
|
+
* `customer.import_manage` scope. **Call this before importing customers with
|
|
10582
|
+
* `legacyAuth`** — that import is rejected without an active config. Re-POST with
|
|
10583
|
+
* an earlier `retentionEndDate` to shorten a running window.
|
|
10584
|
+
*/
|
|
10585
|
+
configurePasswordMigrationRetention(input: AdminPasswordMigrationRetentionInput, auth?: AuthContext): Promise<AdminPasswordMigrationRetention>;
|
|
10586
|
+
/**
|
|
10587
|
+
* Removes the retention config. Requires the `customer.import_manage` scope.
|
|
10588
|
+
* Intended for after the migration window: when the window ends, unmigrated
|
|
10589
|
+
* accounts need a password reset and their legacy credentials are cleared.
|
|
10590
|
+
*/
|
|
10591
|
+
deletePasswordMigrationRetention(auth?: AuthContext): Promise<void>;
|
|
10592
|
+
/**
|
|
10593
|
+
* Bulk-imports customers (`POST /customers/import`). Requires the
|
|
10594
|
+
* `customer.import_manage` scope.
|
|
10595
|
+
*
|
|
10596
|
+
* Responds **207 Multi-Status**: per-item failures do **not** throw — inspect each
|
|
10597
|
+
* entry's `code`. Each item must carry exactly one of `account.passwordHash` or
|
|
10598
|
+
* `account.legacyAuth`, and importing `legacyAuth` requires an active retention
|
|
10599
|
+
* config (see `configurePasswordMigrationRetention`).
|
|
10600
|
+
*/
|
|
10601
|
+
importCustomers(input: AdminCustomerImport[], auth?: AuthContext): Promise<AdminCustomerImportResult[]>;
|
|
10434
10602
|
}
|
|
10435
10603
|
|
|
10436
10604
|
/**
|
|
@@ -11120,4 +11288,4 @@ declare function productIdFromYrn(yrn: string | undefined): string;
|
|
|
11120
11288
|
*/
|
|
11121
11289
|
declare function productYrn(tenant: string, productId: string): string;
|
|
11122
11290
|
|
|
11123
|
-
export { type AddedPoints, type AdminCustomer, type AdminCustomerAddress, type AdminCustomerAddressInput, type AdminCustomerAddressList, type AdminCustomerAddressUpdate, type AdminCustomerCreated, type AdminCustomerInput, type AdminCustomerList, type AdminCustomerPatch, type AdminCustomerSearchQuery, type AdminCustomerUpdate, type Agent, type AgentAnalytics, type AgentExecutions, type AgentFromTemplate, type AgentInput, type AgentPatchOp, type AgentRequestLog, type AgentSearchQuery, type AgentSessionLog, type AgentTemplate, type AgenticPatchOp, type AgentsExport, type AgentsExportRequest, type AgentsImport, type AgentsImportRequest, AiService, type AnalyticsQuery, type Approval, type ApprovalCreated, type ApprovalDecision, type ApprovalInput, type ApprovalList, type ApprovalPatch, type ApprovalPermittedInput, type ApprovalPermittedResult, ApprovalService, type ApprovalUsersQuery, type ApprovalUsersResult, type Assignee, type Attachment, type AttachmentOptions, AuthContext, AvailabilityService, type BatchNextIdEntry, type Brand, type BrandInput, type BrandList, BrandService, type BrandUpdate, type BulkInstanceResult, type BulkPatchInstanceItem, CartService, type Catalog, type CatalogCreated, type CatalogInput, type CatalogList, type CatalogPatch, CatalogService, type CatalogUpdate, CategoryService, type CgRelation, type CgRelationList, type ChatRequest, type ChatResponse, type ChatStreamOptions, CheckoutService, ClientConfigService, type ClientConfiguration, ClientContext, CloudFunctionsService, type CommerceEvents, CompaniesService, type CompletionMessage, type CompletionRequest, type CompletionResponse, type Configuration$1 as Configuration, type ConfigurationDraft, ContactsService, type Conversation, type ConversationSearchQuery, type ConversionFactorInput, type ConversionFactorResult, type ConvertUnitInput, type ConvertUnitResult, type CookieIo, type Country, type CountryList, CountryService, type CountryUpdate, type Coupon$1 as Coupon, type CouponCreated, type CouponInput, type CouponList, CouponService, type CouponUpdate, type Created, type Currency, type CurrencyCreated, type CurrencyInput, type CurrencyList, CurrencyService, type CurrencyUpdate, type CustomEntity, type CustomEntityDraft, type CustomInstance, type CustomInstanceDraft, CustomerAdminService, CustomerGroupsService, CustomerService, type CustomerSummaryBatch, CustomerTokenRefresher, type DeleteAgentOptions, type DeleteConfigOptions, type DeliveryCreated, type DeliveryCycleInput, type DeliverySlot, type DeliverySlotList, type DeliveryTime$1 as DeliveryTime, type DeliveryTimeInput, type DeliveryTimeList, type DeliveryTimeUpdate, type DeliveryWindow$2 as DeliveryWindow, type DeliveryWindowList, type DeliveryWindowValidation, EmporixAuthError, EmporixClient, EmporixConfig, type EmporixCore, EmporixError, EmporixForbiddenError, EmporixInsufficientScopeError, EmporixNetworkError, EmporixNotFoundError, EmporixServerError, type EmporixStorage, type EmporixStorageKey, EmporixTimeoutError, EmporixValidationError, type ExchangeRate, type ExchangeRateCreated, type ExchangeRateInput, type ExchangeRateList, type ExchangeRateUpdate, type ExecutionsQuery, type Fee$1 as Fee, type FeeDraft, FeeService, type FindSiteInput, type GetOptions, type IamAccessControl, type IamAccessControlCreated, type IamAccessControlUpsert, type IamGroup, type IamGroupCreate, type IamGroupCreated, AssignmentCreateRequest as IamGroupMemberAssignment, type IamGroupMemberCreated, type IamGroupMemberInput, type IamGroupUpdate, type IamScope, type IamScopeCreated, type IamScopeUpsert, IamService, type IamUser, type IamUserCreate, type IamUserCreated, type IamUserDetail, type IamUserScopes, type IamUserUpdate, type ImportCancelResult, type ImportConfig, type ImportErrorRecord, type ImportPage, type ImportPageOptions, type ImportRecordOutcome, type ImportRun, type ImportRunDetail, type ImportRunEvent, type ImportRunInput, type ImportRunMode, type ImportRunStatus, type ImportRunStream, type ImportSchedule, ImportService, type ImportStream, type ImportedRecord, type IndexConfig, type IndexConfigCreated, type IndexPublicConfig, IndexingService, type InstanceSearchBody, type InvoiceJob, type InvoiceJobCreated, type InvoiceJobDraft, InvoiceService, type InvokeCloudFunctionOptions, type ItemFee, type ItemFeeDraft, type ItemFeeSearch, type ItemFeeSearchByProductId, type ItemFeeSearchByProductIds, type Job, type JobIdResponse, type Label, type LabelInput, type LabelList, LabelService, type LabelUpdate, type ListConfigOptions, type ListCustomEntitiesOptions, type ListFeesQuery, type ListInstancesQuery, type ListQuery, type ListQuoteReasonsQuery, type ListQuotesQuery, type ListReindexJobsOptions, type ListSchemaReferencesQuery, type ListSchemasQuery, LocationsService, LogLevel, type McpServer, type McpServerInput, MediaService, type MetadataFilter, type MinimumFee, type MutateOptions, type NewPointsEntry, type NextIdCommandRequest, type NextIdOptions, type NextIdResponse, type NextIdsBatchRequest, type NextIdsBatchResponse, type OAuthConfig, type OAuthInput, type OrderCycleList, type OrderEntryEventCreate, type OrderStatusChange, OrdersService, type PackagingProductsChange, type PackingEvent, type PackingEventList, PaginatedItems, PaymentGatewayService, type PersistedAnonymousSession, type PickOrder, type PickOrderList, type PickPackAck, PickPackService, type PointsSummary, PriceService, ProductService, type ProviderModels, QueryFor, type Quote, type QuoteCreated, type QuoteDraft, type QuoteHistory, type QuoteInput, type QuoteReason, type QuoteReasonCreated, type QuoteReasonDraft, type QuoteReasonUpdate, type QuoteResult, QuoteService, type QuoteSlotInput, type QuoteUpdate, RagIndexerService, type RagType, type RecalculationJob, type RecalculationJobCreated, type RecalculationJobInput, type RedeemCouponResult, type RedeemMyPointsInput, type RedeemOption, type RedeemOptionList, type RedeemedPoints, type Redemption, type RedemptionCreated, type RedemptionInput, type ReferralCoupon, type Region, type RegionList, type ReindexEntityType, type ReindexInput, type ReindexJob, type ReindexJobInput, type ReindexJobStatus, ResolvedConfig, type ResourceCreated, type Return, type ReturnCreated, type ReturnInput, type ReturnList, type ReturnPatch, type ReturnUpdate, ReturnsService, RewardPointsService, STORAGE_KEYS, SalesOrdersService, type Schema, type SchemaAttribute, type SchemaDraft, type SchemaExport, type SchemaImportInput, type SchemaInstanceBulkCreateItem, type SchemaInstanceBulkUpsertItem, type SchemaReference, type SchemaReferenceCreated, type SchemaReferenceInput, type SchemaReferenceUpdateInput, SchemaService, type SchemaTypeName, type SchemaUpdate, type SearchImportedRecordsOptions, type SearchInstancesQuery, type SearchQuery, type SearchStreamRecordsOptions, SegmentService, SepaExportService, type SepaJob, type SepaJobCreated, type SepaJobInput, type SequenceSchema, type SequenceSchemaCreate, SequentialIdService, type ServerCookieJar, type ServiceClass, ServiceName, type SessionAttributeInput, type SessionContext, type SessionContextPatch, SessionContextService, type SetItemFeesOptions, type ShippingFee, type ShippingGroup, type ShippingGroupList, type ShippingMethod, type ShippingMethodList, type ShippingPatch, ShippingService, type ShoppingList, type ShoppingListDraft, type ShoppingListItem, ShoppingListService, type Site$1 as Site, type SiteCreated, type SiteInput, type SiteList, type SiteMixin, type SiteMixinCreated, type SiteMixins, SiteService, StoredAnonymousSession, type TaxCalculationInput, type TaxCalculationRequest, type TaxCalculationResult, type TaxClass, type TaxConfig, type TaxConfigCreated, type TaxCreation as TaxConfigInput, type TaxUpdate as TaxConfigUpdate, type TaxLocation, TaxService, TenantConfigService, type TextRequest, type TextResponse, type Token, type TokenInput, TokenProvider, type TokenStorage, type Tool, type ToolInput, type Unit, type UnitCreated, UnitHandlingService, type UnitInput, type UnitUpdate, type Vendor, type VendorCreated, type VendorInput, type VendorList, type VendorLocation, type VendorLocationInput, type VendorLocationList, type VendorLocationUpdate, type VendorSearchQuery, VendorService, type VendorUpdate, type WebhookConfig, type WebhookConfigCreated, type WebhookConfigDraft, type WebhookConfigPatch, type WebhookDashboardAccess, WebhookService, type WebhookStatistics, type WebhookStatisticsQuery, type WebhookSubscription, type WebhookSubscriptionUpdateItem, type WebhookSubscriptionUpdateResultItem, type Zone, type ZoneList, approvalStatusPatch, createCookieBackedStorage, createCore, createEmporixClient, createServerStorage, errorFromResponse, parseAnonymousSession, pickFee, productIdFromYrn, productYrn, resolveZone, serverAuth };
|
|
11291
|
+
export { type AddedPoints, type AdminCustomer, type AdminCustomerAddress, type AdminCustomerAddressInput, type AdminCustomerAddressList, type AdminCustomerAddressUpdate, type AdminCustomerCreated, type AdminCustomerImport, type AdminCustomerImportAccount, type AdminCustomerImportResult, type AdminCustomerInput, type AdminCustomerLegacyAuth, type AdminCustomerList, type AdminCustomerPatch, type AdminCustomerSearchQuery, type AdminCustomerUpdate, type AdminPasswordMigrationRetention, type AdminPasswordMigrationRetentionInput, type Agent, type AgentAnalytics, type AgentExecutions, type AgentFromTemplate, type AgentInput, type AgentPatchOp, type AgentRequestLog, type AgentSearchQuery, type AgentSessionLog, type AgentTemplate, type AgenticPatchOp, type AgentsExport, type AgentsExportRequest, type AgentsImport, type AgentsImportRequest, AiService, type AnalyticsQuery, type Approval, type ApprovalCreated, type ApprovalDecision, type ApprovalInput, type ApprovalList, type ApprovalPatch, type ApprovalPermittedInput, type ApprovalPermittedResult, ApprovalService, type ApprovalUsersQuery, type ApprovalUsersResult, type Assignee, type Attachment, type AttachmentOptions, AuthContext, AvailabilityService, type BatchNextIdEntry, type Brand, type BrandInput, type BrandList, BrandService, type BrandUpdate, type BulkInstanceResult, type BulkPatchInstanceItem, CartService, type Catalog, type CatalogCreated, type CatalogInput, type CatalogList, type CatalogPatch, CatalogService, type CatalogUpdate, CategoryService, type CgRelation, type CgRelationList, type ChatRequest, type ChatResponse, type ChatStreamOptions, CheckoutService, ClientConfigService, type ClientConfiguration, ClientContext, CloudFunctionsService, type CommerceEvents, CompaniesService, type CompletionMessage, type CompletionRequest, type CompletionResponse, type Configuration$1 as Configuration, type ConfigurationDraft, ContactsService, type Conversation, type ConversationSearchQuery, type ConversionFactorInput, type ConversionFactorResult, type ConvertUnitInput, type ConvertUnitResult, type CookieIo, type Country, type CountryList, CountryService, type CountryUpdate, type Coupon$1 as Coupon, type CouponCreated, type CouponInput, type CouponList, CouponService, type CouponUpdate, type Created, type Currency, type CurrencyCreated, type CurrencyInput, type CurrencyList, CurrencyService, type CurrencyUpdate, type CustomEntity, type CustomEntityDraft, type CustomInstance, type CustomInstanceDraft, CustomerAdminService, CustomerGroupsService, CustomerService, type CustomerSummaryBatch, CustomerTokenRefresher, type DeleteAgentOptions, type DeleteConfigOptions, type DeliveryCreated, type DeliveryCycleInput, type DeliverySlot, type DeliverySlotList, type DeliveryTime$1 as DeliveryTime, type DeliveryTimeInput, type DeliveryTimeList, type DeliveryTimeUpdate, type DeliveryWindow$2 as DeliveryWindow, type DeliveryWindowList, type DeliveryWindowValidation, EmporixAuthError, EmporixClient, EmporixConfig, type EmporixCore, EmporixError, EmporixForbiddenError, EmporixInsufficientScopeError, EmporixNetworkError, EmporixNotFoundError, EmporixServerError, type EmporixStorage, type EmporixStorageKey, EmporixTimeoutError, EmporixValidationError, type ExchangeRate, type ExchangeRateCreated, type ExchangeRateInput, type ExchangeRateList, type ExchangeRateUpdate, type ExecutionsQuery, type Fee$1 as Fee, type FeeDraft, FeeService, type FindSiteInput, type GetOptions, type IamAccessControl, type IamAccessControlCreated, type IamAccessControlUpsert, type IamGroup, type IamGroupCreate, type IamGroupCreated, AssignmentCreateRequest as IamGroupMemberAssignment, type IamGroupMemberCreated, type IamGroupMemberInput, type IamGroupUpdate, type IamScope, type IamScopeCreated, type IamScopeUpsert, IamService, type IamUser, type IamUserCreate, type IamUserCreated, type IamUserDetail, type IamUserScopes, type IamUserUpdate, type ImportCancelResult, type ImportConfig, type ImportErrorRecord, type ImportPage, type ImportPageOptions, type ImportRecordOutcome, type ImportRun, type ImportRunDetail, type ImportRunEvent, type ImportRunInput, type ImportRunMode, type ImportRunStatus, type ImportRunStream, type ImportSchedule, ImportService, type ImportStream, type ImportedRecord, type IndexConfig, type IndexConfigCreated, type IndexPublicConfig, IndexingService, type InstanceSearchBody, type InvoiceJob, type InvoiceJobCreated, type InvoiceJobDraft, InvoiceService, type InvokeCloudFunctionOptions, type ItemFee, type ItemFeeDraft, type ItemFeeSearch, type ItemFeeSearchByProductId, type ItemFeeSearchByProductIds, type Job, type JobIdResponse, type Label, type LabelInput, type LabelList, LabelService, type LabelUpdate, type ListConfigOptions, type ListCustomEntitiesOptions, type ListFeesQuery, type ListInstancesQuery, type ListQuery, type ListQuoteReasonsQuery, type ListQuotesQuery, type ListReindexJobsOptions, type ListSchemaReferencesQuery, type ListSchemasQuery, LocationsService, LogLevel, type McpServer, type McpServerInput, MediaService, type MetadataFilter, type MinimumFee, type MutateOptions, type NewPointsEntry, type NextIdCommandRequest, type NextIdOptions, type NextIdResponse, type NextIdsBatchRequest, type NextIdsBatchResponse, type OAuthConfig, type OAuthInput, type OrderCycleList, type OrderEntryEventCreate, type OrderStatusChange, OrdersService, type PackagingProductsChange, type PackingEvent, type PackingEventList, PaginatedItems, PaymentGatewayService, type PersistedAnonymousSession, type PickOrder, type PickOrderList, type PickPackAck, PickPackService, type PointsSummary, PriceService, ProductService, type ProviderModels, QueryFor, type Quote, type QuoteCreated, type QuoteDraft, type QuoteHistory, type QuoteInput, type QuoteReason, type QuoteReasonCreated, type QuoteReasonDraft, type QuoteReasonUpdate, type QuoteResult, QuoteService, type QuoteSlotInput, type QuoteUpdate, RagIndexerService, type RagType, type RecalculationJob, type RecalculationJobCreated, type RecalculationJobInput, type RedeemCouponResult, type RedeemMyPointsInput, type RedeemOption, type RedeemOptionList, type RedeemedPoints, type Redemption, type RedemptionCreated, type RedemptionInput, type ReferralCoupon, type Region, type RegionList, type ReindexEntityType, type ReindexInput, type ReindexJob, type ReindexJobInput, type ReindexJobStatus, ResolvedConfig, type ResourceCreated, type Return, type ReturnCreated, type ReturnInput, type ReturnList, type ReturnPatch, type ReturnUpdate, ReturnsService, RewardPointsService, STORAGE_KEYS, SalesOrdersService, type Schema, type SchemaAttribute, type SchemaDraft, type SchemaExport, type SchemaImportInput, type SchemaInstanceBulkCreateItem, type SchemaInstanceBulkUpsertItem, type SchemaReference, type SchemaReferenceCreated, type SchemaReferenceInput, type SchemaReferenceUpdateInput, SchemaService, type SchemaTypeName, type SchemaUpdate, type SearchImportedRecordsOptions, type SearchInstancesQuery, type SearchQuery, type SearchStreamRecordsOptions, SegmentService, SepaExportService, type SepaJob, type SepaJobCreated, type SepaJobInput, type SequenceSchema, type SequenceSchemaCreate, SequentialIdService, type ServerCookieJar, type ServiceClass, ServiceName, type SessionAttributeInput, type SessionContext, type SessionContextPatch, SessionContextService, type SetItemFeesOptions, type ShippingFee, type ShippingGroup, type ShippingGroupList, type ShippingMethod, type ShippingMethodList, type ShippingPatch, ShippingService, type ShoppingList, type ShoppingListDraft, type ShoppingListItem, ShoppingListService, type Site$1 as Site, type SiteCreated, type SiteInput, type SiteList, type SiteMixin, type SiteMixinCreated, type SiteMixins, SiteService, StoredAnonymousSession, type TaxCalculationInput, type TaxCalculationRequest, type TaxCalculationResult, type TaxClass, type TaxConfig, type TaxConfigCreated, type TaxCreation as TaxConfigInput, type TaxUpdate as TaxConfigUpdate, type TaxLocation, TaxService, TenantConfigService, type TextRequest, type TextResponse, type Token, type TokenInput, TokenProvider, type TokenStorage, type Tool, type ToolInput, type Unit, type UnitCreated, UnitHandlingService, type UnitInput, type UnitUpdate, type Vendor, type VendorCreated, type VendorInput, type VendorList, type VendorLocation, type VendorLocationInput, type VendorLocationList, type VendorLocationUpdate, type VendorSearchQuery, VendorService, type VendorUpdate, type WebhookConfig, type WebhookConfigCreated, type WebhookConfigDraft, type WebhookConfigPatch, type WebhookDashboardAccess, WebhookService, type WebhookStatistics, type WebhookStatisticsQuery, type WebhookSubscription, type WebhookSubscriptionUpdateItem, type WebhookSubscriptionUpdateResultItem, type Zone, type ZoneList, approvalStatusPatch, createCookieBackedStorage, createCore, createEmporixClient, createServerStorage, errorFromResponse, parseAnonymousSession, pickFee, productIdFromYrn, productYrn, resolveZone, serverAuth };
|
package/dist/index.d.ts
CHANGED
|
@@ -10287,6 +10287,115 @@ type CustomerSignupBySellerDto = CustomerCreateDto & {
|
|
|
10287
10287
|
*/
|
|
10288
10288
|
password?: string;
|
|
10289
10289
|
};
|
|
10290
|
+
type CustomerImportDto = CustomerCreateDto & {
|
|
10291
|
+
/**
|
|
10292
|
+
* Custom customer identifier. If not provided, it is automatically generated.
|
|
10293
|
+
*/
|
|
10294
|
+
id?: string;
|
|
10295
|
+
/**
|
|
10296
|
+
* Optional contact email. When provided, it must match `account.email` (case-insensitive).
|
|
10297
|
+
* If omitted, `account.email` is used as the contact email.
|
|
10298
|
+
*
|
|
10299
|
+
*/
|
|
10300
|
+
contactEmail?: string;
|
|
10301
|
+
account: CustomerImportAccountDto;
|
|
10302
|
+
};
|
|
10303
|
+
type CustomerImportAccountDto = {
|
|
10304
|
+
/**
|
|
10305
|
+
* Customer account email address. Used as the account identifier.
|
|
10306
|
+
*/
|
|
10307
|
+
email: string;
|
|
10308
|
+
/**
|
|
10309
|
+
* Precomputed Emporix native password hash.
|
|
10310
|
+
*
|
|
10311
|
+
* Provide exactly one of `passwordHash` or `legacyAuth`.
|
|
10312
|
+
* Please, contact Emporix support to determine if your existing password hashing strategy is compatible with the Emporix native password hashing strategy.
|
|
10313
|
+
*
|
|
10314
|
+
*/
|
|
10315
|
+
passwordHash?: string;
|
|
10316
|
+
legacyAuth?: LegacyAuth;
|
|
10317
|
+
};
|
|
10318
|
+
type LegacyAuth = {
|
|
10319
|
+
/**
|
|
10320
|
+
* Identifier of the legacy password verifier to use during login. Please, contact Emporix support to determine the correct value for your case.
|
|
10321
|
+
*/
|
|
10322
|
+
algorithm: 'hybris-sha512-uid-salt';
|
|
10323
|
+
/**
|
|
10324
|
+
* Raw password hash exported from the source system. Stored only in `legacyAuth`, never in the native password field.
|
|
10325
|
+
*/
|
|
10326
|
+
hash: string;
|
|
10327
|
+
/**
|
|
10328
|
+
* Algorithm-specific metadata required for verification.
|
|
10329
|
+
* Please, contact Emporix support to determine the correct values for your case.
|
|
10330
|
+
*
|
|
10331
|
+
*/
|
|
10332
|
+
context?: {
|
|
10333
|
+
[key: string]: string;
|
|
10334
|
+
};
|
|
10335
|
+
};
|
|
10336
|
+
type PasswordMigrationRetentionConfigRequest = {
|
|
10337
|
+
/**
|
|
10338
|
+
* Future date when the password migration retention window ends.
|
|
10339
|
+
*/
|
|
10340
|
+
retentionEndDate: string;
|
|
10341
|
+
/**
|
|
10342
|
+
* Optional date on or after today and before `retentionEndDate` when reminder emails are sent to unmigrated customers.
|
|
10343
|
+
* When omitted, defaults to 7 days before `retentionEndDate`, or to tomorrow when that default would fall on or before today.
|
|
10344
|
+
*
|
|
10345
|
+
*/
|
|
10346
|
+
emailReminderDate?: string;
|
|
10347
|
+
/**
|
|
10348
|
+
* Optional flag indicating whether customers receive email notifications about the migration process.
|
|
10349
|
+
* When `true`, customers receive reminder and password reset emails. When `false`, customers do not receive any emails regarding the migration.
|
|
10350
|
+
* When omitted, defaults to `true`.
|
|
10351
|
+
*
|
|
10352
|
+
*/
|
|
10353
|
+
emailNotificationsEnabled?: boolean;
|
|
10354
|
+
};
|
|
10355
|
+
type PasswordMigrationRetentionConfigResponse = {
|
|
10356
|
+
/**
|
|
10357
|
+
* Date when the password migration retention window ends.
|
|
10358
|
+
*/
|
|
10359
|
+
retentionEndDate?: string;
|
|
10360
|
+
/**
|
|
10361
|
+
* Date when reminder emails are sent to unmigrated customers.
|
|
10362
|
+
*/
|
|
10363
|
+
emailReminderDate?: string;
|
|
10364
|
+
/**
|
|
10365
|
+
* Flag indicating whether customers receive email notifications about the migration process.
|
|
10366
|
+
* When `true`, customers receive reminder and password reset emails. When `false`, customers do not receive any emails regarding the migration.
|
|
10367
|
+
*
|
|
10368
|
+
*/
|
|
10369
|
+
emailNotificationsEnabled?: boolean;
|
|
10370
|
+
};
|
|
10371
|
+
type CustomerBulkItemResponse = {
|
|
10372
|
+
/**
|
|
10373
|
+
* Index of the processed item, matching the item position in the request body.
|
|
10374
|
+
*/
|
|
10375
|
+
index?: number;
|
|
10376
|
+
/**
|
|
10377
|
+
* Customer number generated for a successfully imported customer.
|
|
10378
|
+
*/
|
|
10379
|
+
id?: string;
|
|
10380
|
+
/**
|
|
10381
|
+
* HTTP status code for the processed item.
|
|
10382
|
+
*/
|
|
10383
|
+
code?: number;
|
|
10384
|
+
/**
|
|
10385
|
+
* HTTP status description for the processed item.
|
|
10386
|
+
*/
|
|
10387
|
+
status?: string;
|
|
10388
|
+
/**
|
|
10389
|
+
* Error message when the item failed.
|
|
10390
|
+
*/
|
|
10391
|
+
message?: string;
|
|
10392
|
+
/**
|
|
10393
|
+
* List of problems causing the error.
|
|
10394
|
+
*/
|
|
10395
|
+
details?: Array<{
|
|
10396
|
+
message?: string;
|
|
10397
|
+
}>;
|
|
10398
|
+
};
|
|
10290
10399
|
type CustomerUpdateBySellerDto = CustomerCommonDto & {
|
|
10291
10400
|
contactEmail?: string;
|
|
10292
10401
|
active?: boolean;
|
|
@@ -10388,6 +10497,35 @@ type AdminCustomerAddressList = AdminCustomerAddress[];
|
|
|
10388
10497
|
type AdminCustomerAddressInput = Address2;
|
|
10389
10498
|
/** Upsert/patch address body (`PUT`/`PATCH …/addresses/{id}`). */
|
|
10390
10499
|
type AdminCustomerAddressUpdate = AddressUpdateDto;
|
|
10500
|
+
/**
|
|
10501
|
+
* The tenant's password-migration retention window (read shape). Every field is
|
|
10502
|
+
* optional upstream — an unconfigured tenant answers with an empty object.
|
|
10503
|
+
*/
|
|
10504
|
+
type AdminPasswordMigrationRetention = PasswordMigrationRetentionConfigResponse;
|
|
10505
|
+
/**
|
|
10506
|
+
* Body for `configurePasswordMigrationRetention`. `retentionEndDate` is required.
|
|
10507
|
+
* `emailReminderDate` defaults to 7 days before it (or tomorrow, when that would
|
|
10508
|
+
* already be past); `emailNotificationsEnabled` defaults to `true`.
|
|
10509
|
+
*/
|
|
10510
|
+
type AdminPasswordMigrationRetentionInput = PasswordMigrationRetentionConfigRequest;
|
|
10511
|
+
/**
|
|
10512
|
+
* One customer of the bulk-import body. Extends the create shape with an `account`
|
|
10513
|
+
* block; every inherited profile field is optional, so `account.email` is the only
|
|
10514
|
+
* hard requirement.
|
|
10515
|
+
*/
|
|
10516
|
+
type AdminCustomerImport = CustomerImportDto;
|
|
10517
|
+
/**
|
|
10518
|
+
* The `account` block of an import item. Provide **exactly one** of `passwordHash`
|
|
10519
|
+
* or `legacyAuth` — the type permits both, the service does not.
|
|
10520
|
+
*/
|
|
10521
|
+
type AdminCustomerImportAccount = CustomerImportAccountDto;
|
|
10522
|
+
/** A legacy password hash carried by an import item. */
|
|
10523
|
+
type AdminCustomerLegacyAuth = LegacyAuth;
|
|
10524
|
+
/**
|
|
10525
|
+
* One entry of the `207` import result. `code` is the per-item HTTP status, so a
|
|
10526
|
+
* `409` here is a rejected customer inside an otherwise successful call.
|
|
10527
|
+
*/
|
|
10528
|
+
type AdminCustomerImportResult = CustomerBulkItemResponse;
|
|
10391
10529
|
|
|
10392
10530
|
/**
|
|
10393
10531
|
* Emporix Customer Service — tenant/seller-managed customer profiles and
|
|
@@ -10400,6 +10538,7 @@ declare class CustomerAdminService {
|
|
|
10400
10538
|
constructor(ctx: ClientContext);
|
|
10401
10539
|
private base;
|
|
10402
10540
|
private customerPath;
|
|
10541
|
+
private configPath;
|
|
10403
10542
|
private addressPath;
|
|
10404
10543
|
/** List customers. */
|
|
10405
10544
|
listCustomers(query?: Record<string, string | number>, auth?: AuthContext): Promise<AdminCustomerList>;
|
|
@@ -10431,6 +10570,35 @@ declare class CustomerAdminService {
|
|
|
10431
10570
|
addAddressTags(customerNumber: string, addressId: string, tags: string[], auth?: AuthContext): Promise<void>;
|
|
10432
10571
|
/** Remove tags from an address (`?tags=` query). */
|
|
10433
10572
|
removeAddressTags(customerNumber: string, addressId: string, tags: string[], auth?: AuthContext): Promise<void>;
|
|
10573
|
+
/**
|
|
10574
|
+
* Retrieves the tenant's password-migration retention config. Requires the
|
|
10575
|
+
* `customer.import_read` scope. An unconfigured tenant answers with an empty
|
|
10576
|
+
* object rather than a 404.
|
|
10577
|
+
*/
|
|
10578
|
+
getPasswordMigrationRetention(auth?: AuthContext): Promise<AdminPasswordMigrationRetention>;
|
|
10579
|
+
/**
|
|
10580
|
+
* Creates or updates the retention config (`POST`). Requires the
|
|
10581
|
+
* `customer.import_manage` scope. **Call this before importing customers with
|
|
10582
|
+
* `legacyAuth`** — that import is rejected without an active config. Re-POST with
|
|
10583
|
+
* an earlier `retentionEndDate` to shorten a running window.
|
|
10584
|
+
*/
|
|
10585
|
+
configurePasswordMigrationRetention(input: AdminPasswordMigrationRetentionInput, auth?: AuthContext): Promise<AdminPasswordMigrationRetention>;
|
|
10586
|
+
/**
|
|
10587
|
+
* Removes the retention config. Requires the `customer.import_manage` scope.
|
|
10588
|
+
* Intended for after the migration window: when the window ends, unmigrated
|
|
10589
|
+
* accounts need a password reset and their legacy credentials are cleared.
|
|
10590
|
+
*/
|
|
10591
|
+
deletePasswordMigrationRetention(auth?: AuthContext): Promise<void>;
|
|
10592
|
+
/**
|
|
10593
|
+
* Bulk-imports customers (`POST /customers/import`). Requires the
|
|
10594
|
+
* `customer.import_manage` scope.
|
|
10595
|
+
*
|
|
10596
|
+
* Responds **207 Multi-Status**: per-item failures do **not** throw — inspect each
|
|
10597
|
+
* entry's `code`. Each item must carry exactly one of `account.passwordHash` or
|
|
10598
|
+
* `account.legacyAuth`, and importing `legacyAuth` requires an active retention
|
|
10599
|
+
* config (see `configurePasswordMigrationRetention`).
|
|
10600
|
+
*/
|
|
10601
|
+
importCustomers(input: AdminCustomerImport[], auth?: AuthContext): Promise<AdminCustomerImportResult[]>;
|
|
10434
10602
|
}
|
|
10435
10603
|
|
|
10436
10604
|
/**
|
|
@@ -11120,4 +11288,4 @@ declare function productIdFromYrn(yrn: string | undefined): string;
|
|
|
11120
11288
|
*/
|
|
11121
11289
|
declare function productYrn(tenant: string, productId: string): string;
|
|
11122
11290
|
|
|
11123
|
-
export { type AddedPoints, type AdminCustomer, type AdminCustomerAddress, type AdminCustomerAddressInput, type AdminCustomerAddressList, type AdminCustomerAddressUpdate, type AdminCustomerCreated, type AdminCustomerInput, type AdminCustomerList, type AdminCustomerPatch, type AdminCustomerSearchQuery, type AdminCustomerUpdate, type Agent, type AgentAnalytics, type AgentExecutions, type AgentFromTemplate, type AgentInput, type AgentPatchOp, type AgentRequestLog, type AgentSearchQuery, type AgentSessionLog, type AgentTemplate, type AgenticPatchOp, type AgentsExport, type AgentsExportRequest, type AgentsImport, type AgentsImportRequest, AiService, type AnalyticsQuery, type Approval, type ApprovalCreated, type ApprovalDecision, type ApprovalInput, type ApprovalList, type ApprovalPatch, type ApprovalPermittedInput, type ApprovalPermittedResult, ApprovalService, type ApprovalUsersQuery, type ApprovalUsersResult, type Assignee, type Attachment, type AttachmentOptions, AuthContext, AvailabilityService, type BatchNextIdEntry, type Brand, type BrandInput, type BrandList, BrandService, type BrandUpdate, type BulkInstanceResult, type BulkPatchInstanceItem, CartService, type Catalog, type CatalogCreated, type CatalogInput, type CatalogList, type CatalogPatch, CatalogService, type CatalogUpdate, CategoryService, type CgRelation, type CgRelationList, type ChatRequest, type ChatResponse, type ChatStreamOptions, CheckoutService, ClientConfigService, type ClientConfiguration, ClientContext, CloudFunctionsService, type CommerceEvents, CompaniesService, type CompletionMessage, type CompletionRequest, type CompletionResponse, type Configuration$1 as Configuration, type ConfigurationDraft, ContactsService, type Conversation, type ConversationSearchQuery, type ConversionFactorInput, type ConversionFactorResult, type ConvertUnitInput, type ConvertUnitResult, type CookieIo, type Country, type CountryList, CountryService, type CountryUpdate, type Coupon$1 as Coupon, type CouponCreated, type CouponInput, type CouponList, CouponService, type CouponUpdate, type Created, type Currency, type CurrencyCreated, type CurrencyInput, type CurrencyList, CurrencyService, type CurrencyUpdate, type CustomEntity, type CustomEntityDraft, type CustomInstance, type CustomInstanceDraft, CustomerAdminService, CustomerGroupsService, CustomerService, type CustomerSummaryBatch, CustomerTokenRefresher, type DeleteAgentOptions, type DeleteConfigOptions, type DeliveryCreated, type DeliveryCycleInput, type DeliverySlot, type DeliverySlotList, type DeliveryTime$1 as DeliveryTime, type DeliveryTimeInput, type DeliveryTimeList, type DeliveryTimeUpdate, type DeliveryWindow$2 as DeliveryWindow, type DeliveryWindowList, type DeliveryWindowValidation, EmporixAuthError, EmporixClient, EmporixConfig, type EmporixCore, EmporixError, EmporixForbiddenError, EmporixInsufficientScopeError, EmporixNetworkError, EmporixNotFoundError, EmporixServerError, type EmporixStorage, type EmporixStorageKey, EmporixTimeoutError, EmporixValidationError, type ExchangeRate, type ExchangeRateCreated, type ExchangeRateInput, type ExchangeRateList, type ExchangeRateUpdate, type ExecutionsQuery, type Fee$1 as Fee, type FeeDraft, FeeService, type FindSiteInput, type GetOptions, type IamAccessControl, type IamAccessControlCreated, type IamAccessControlUpsert, type IamGroup, type IamGroupCreate, type IamGroupCreated, AssignmentCreateRequest as IamGroupMemberAssignment, type IamGroupMemberCreated, type IamGroupMemberInput, type IamGroupUpdate, type IamScope, type IamScopeCreated, type IamScopeUpsert, IamService, type IamUser, type IamUserCreate, type IamUserCreated, type IamUserDetail, type IamUserScopes, type IamUserUpdate, type ImportCancelResult, type ImportConfig, type ImportErrorRecord, type ImportPage, type ImportPageOptions, type ImportRecordOutcome, type ImportRun, type ImportRunDetail, type ImportRunEvent, type ImportRunInput, type ImportRunMode, type ImportRunStatus, type ImportRunStream, type ImportSchedule, ImportService, type ImportStream, type ImportedRecord, type IndexConfig, type IndexConfigCreated, type IndexPublicConfig, IndexingService, type InstanceSearchBody, type InvoiceJob, type InvoiceJobCreated, type InvoiceJobDraft, InvoiceService, type InvokeCloudFunctionOptions, type ItemFee, type ItemFeeDraft, type ItemFeeSearch, type ItemFeeSearchByProductId, type ItemFeeSearchByProductIds, type Job, type JobIdResponse, type Label, type LabelInput, type LabelList, LabelService, type LabelUpdate, type ListConfigOptions, type ListCustomEntitiesOptions, type ListFeesQuery, type ListInstancesQuery, type ListQuery, type ListQuoteReasonsQuery, type ListQuotesQuery, type ListReindexJobsOptions, type ListSchemaReferencesQuery, type ListSchemasQuery, LocationsService, LogLevel, type McpServer, type McpServerInput, MediaService, type MetadataFilter, type MinimumFee, type MutateOptions, type NewPointsEntry, type NextIdCommandRequest, type NextIdOptions, type NextIdResponse, type NextIdsBatchRequest, type NextIdsBatchResponse, type OAuthConfig, type OAuthInput, type OrderCycleList, type OrderEntryEventCreate, type OrderStatusChange, OrdersService, type PackagingProductsChange, type PackingEvent, type PackingEventList, PaginatedItems, PaymentGatewayService, type PersistedAnonymousSession, type PickOrder, type PickOrderList, type PickPackAck, PickPackService, type PointsSummary, PriceService, ProductService, type ProviderModels, QueryFor, type Quote, type QuoteCreated, type QuoteDraft, type QuoteHistory, type QuoteInput, type QuoteReason, type QuoteReasonCreated, type QuoteReasonDraft, type QuoteReasonUpdate, type QuoteResult, QuoteService, type QuoteSlotInput, type QuoteUpdate, RagIndexerService, type RagType, type RecalculationJob, type RecalculationJobCreated, type RecalculationJobInput, type RedeemCouponResult, type RedeemMyPointsInput, type RedeemOption, type RedeemOptionList, type RedeemedPoints, type Redemption, type RedemptionCreated, type RedemptionInput, type ReferralCoupon, type Region, type RegionList, type ReindexEntityType, type ReindexInput, type ReindexJob, type ReindexJobInput, type ReindexJobStatus, ResolvedConfig, type ResourceCreated, type Return, type ReturnCreated, type ReturnInput, type ReturnList, type ReturnPatch, type ReturnUpdate, ReturnsService, RewardPointsService, STORAGE_KEYS, SalesOrdersService, type Schema, type SchemaAttribute, type SchemaDraft, type SchemaExport, type SchemaImportInput, type SchemaInstanceBulkCreateItem, type SchemaInstanceBulkUpsertItem, type SchemaReference, type SchemaReferenceCreated, type SchemaReferenceInput, type SchemaReferenceUpdateInput, SchemaService, type SchemaTypeName, type SchemaUpdate, type SearchImportedRecordsOptions, type SearchInstancesQuery, type SearchQuery, type SearchStreamRecordsOptions, SegmentService, SepaExportService, type SepaJob, type SepaJobCreated, type SepaJobInput, type SequenceSchema, type SequenceSchemaCreate, SequentialIdService, type ServerCookieJar, type ServiceClass, ServiceName, type SessionAttributeInput, type SessionContext, type SessionContextPatch, SessionContextService, type SetItemFeesOptions, type ShippingFee, type ShippingGroup, type ShippingGroupList, type ShippingMethod, type ShippingMethodList, type ShippingPatch, ShippingService, type ShoppingList, type ShoppingListDraft, type ShoppingListItem, ShoppingListService, type Site$1 as Site, type SiteCreated, type SiteInput, type SiteList, type SiteMixin, type SiteMixinCreated, type SiteMixins, SiteService, StoredAnonymousSession, type TaxCalculationInput, type TaxCalculationRequest, type TaxCalculationResult, type TaxClass, type TaxConfig, type TaxConfigCreated, type TaxCreation as TaxConfigInput, type TaxUpdate as TaxConfigUpdate, type TaxLocation, TaxService, TenantConfigService, type TextRequest, type TextResponse, type Token, type TokenInput, TokenProvider, type TokenStorage, type Tool, type ToolInput, type Unit, type UnitCreated, UnitHandlingService, type UnitInput, type UnitUpdate, type Vendor, type VendorCreated, type VendorInput, type VendorList, type VendorLocation, type VendorLocationInput, type VendorLocationList, type VendorLocationUpdate, type VendorSearchQuery, VendorService, type VendorUpdate, type WebhookConfig, type WebhookConfigCreated, type WebhookConfigDraft, type WebhookConfigPatch, type WebhookDashboardAccess, WebhookService, type WebhookStatistics, type WebhookStatisticsQuery, type WebhookSubscription, type WebhookSubscriptionUpdateItem, type WebhookSubscriptionUpdateResultItem, type Zone, type ZoneList, approvalStatusPatch, createCookieBackedStorage, createCore, createEmporixClient, createServerStorage, errorFromResponse, parseAnonymousSession, pickFee, productIdFromYrn, productYrn, resolveZone, serverAuth };
|
|
11291
|
+
export { type AddedPoints, type AdminCustomer, type AdminCustomerAddress, type AdminCustomerAddressInput, type AdminCustomerAddressList, type AdminCustomerAddressUpdate, type AdminCustomerCreated, type AdminCustomerImport, type AdminCustomerImportAccount, type AdminCustomerImportResult, type AdminCustomerInput, type AdminCustomerLegacyAuth, type AdminCustomerList, type AdminCustomerPatch, type AdminCustomerSearchQuery, type AdminCustomerUpdate, type AdminPasswordMigrationRetention, type AdminPasswordMigrationRetentionInput, type Agent, type AgentAnalytics, type AgentExecutions, type AgentFromTemplate, type AgentInput, type AgentPatchOp, type AgentRequestLog, type AgentSearchQuery, type AgentSessionLog, type AgentTemplate, type AgenticPatchOp, type AgentsExport, type AgentsExportRequest, type AgentsImport, type AgentsImportRequest, AiService, type AnalyticsQuery, type Approval, type ApprovalCreated, type ApprovalDecision, type ApprovalInput, type ApprovalList, type ApprovalPatch, type ApprovalPermittedInput, type ApprovalPermittedResult, ApprovalService, type ApprovalUsersQuery, type ApprovalUsersResult, type Assignee, type Attachment, type AttachmentOptions, AuthContext, AvailabilityService, type BatchNextIdEntry, type Brand, type BrandInput, type BrandList, BrandService, type BrandUpdate, type BulkInstanceResult, type BulkPatchInstanceItem, CartService, type Catalog, type CatalogCreated, type CatalogInput, type CatalogList, type CatalogPatch, CatalogService, type CatalogUpdate, CategoryService, type CgRelation, type CgRelationList, type ChatRequest, type ChatResponse, type ChatStreamOptions, CheckoutService, ClientConfigService, type ClientConfiguration, ClientContext, CloudFunctionsService, type CommerceEvents, CompaniesService, type CompletionMessage, type CompletionRequest, type CompletionResponse, type Configuration$1 as Configuration, type ConfigurationDraft, ContactsService, type Conversation, type ConversationSearchQuery, type ConversionFactorInput, type ConversionFactorResult, type ConvertUnitInput, type ConvertUnitResult, type CookieIo, type Country, type CountryList, CountryService, type CountryUpdate, type Coupon$1 as Coupon, type CouponCreated, type CouponInput, type CouponList, CouponService, type CouponUpdate, type Created, type Currency, type CurrencyCreated, type CurrencyInput, type CurrencyList, CurrencyService, type CurrencyUpdate, type CustomEntity, type CustomEntityDraft, type CustomInstance, type CustomInstanceDraft, CustomerAdminService, CustomerGroupsService, CustomerService, type CustomerSummaryBatch, CustomerTokenRefresher, type DeleteAgentOptions, type DeleteConfigOptions, type DeliveryCreated, type DeliveryCycleInput, type DeliverySlot, type DeliverySlotList, type DeliveryTime$1 as DeliveryTime, type DeliveryTimeInput, type DeliveryTimeList, type DeliveryTimeUpdate, type DeliveryWindow$2 as DeliveryWindow, type DeliveryWindowList, type DeliveryWindowValidation, EmporixAuthError, EmporixClient, EmporixConfig, type EmporixCore, EmporixError, EmporixForbiddenError, EmporixInsufficientScopeError, EmporixNetworkError, EmporixNotFoundError, EmporixServerError, type EmporixStorage, type EmporixStorageKey, EmporixTimeoutError, EmporixValidationError, type ExchangeRate, type ExchangeRateCreated, type ExchangeRateInput, type ExchangeRateList, type ExchangeRateUpdate, type ExecutionsQuery, type Fee$1 as Fee, type FeeDraft, FeeService, type FindSiteInput, type GetOptions, type IamAccessControl, type IamAccessControlCreated, type IamAccessControlUpsert, type IamGroup, type IamGroupCreate, type IamGroupCreated, AssignmentCreateRequest as IamGroupMemberAssignment, type IamGroupMemberCreated, type IamGroupMemberInput, type IamGroupUpdate, type IamScope, type IamScopeCreated, type IamScopeUpsert, IamService, type IamUser, type IamUserCreate, type IamUserCreated, type IamUserDetail, type IamUserScopes, type IamUserUpdate, type ImportCancelResult, type ImportConfig, type ImportErrorRecord, type ImportPage, type ImportPageOptions, type ImportRecordOutcome, type ImportRun, type ImportRunDetail, type ImportRunEvent, type ImportRunInput, type ImportRunMode, type ImportRunStatus, type ImportRunStream, type ImportSchedule, ImportService, type ImportStream, type ImportedRecord, type IndexConfig, type IndexConfigCreated, type IndexPublicConfig, IndexingService, type InstanceSearchBody, type InvoiceJob, type InvoiceJobCreated, type InvoiceJobDraft, InvoiceService, type InvokeCloudFunctionOptions, type ItemFee, type ItemFeeDraft, type ItemFeeSearch, type ItemFeeSearchByProductId, type ItemFeeSearchByProductIds, type Job, type JobIdResponse, type Label, type LabelInput, type LabelList, LabelService, type LabelUpdate, type ListConfigOptions, type ListCustomEntitiesOptions, type ListFeesQuery, type ListInstancesQuery, type ListQuery, type ListQuoteReasonsQuery, type ListQuotesQuery, type ListReindexJobsOptions, type ListSchemaReferencesQuery, type ListSchemasQuery, LocationsService, LogLevel, type McpServer, type McpServerInput, MediaService, type MetadataFilter, type MinimumFee, type MutateOptions, type NewPointsEntry, type NextIdCommandRequest, type NextIdOptions, type NextIdResponse, type NextIdsBatchRequest, type NextIdsBatchResponse, type OAuthConfig, type OAuthInput, type OrderCycleList, type OrderEntryEventCreate, type OrderStatusChange, OrdersService, type PackagingProductsChange, type PackingEvent, type PackingEventList, PaginatedItems, PaymentGatewayService, type PersistedAnonymousSession, type PickOrder, type PickOrderList, type PickPackAck, PickPackService, type PointsSummary, PriceService, ProductService, type ProviderModels, QueryFor, type Quote, type QuoteCreated, type QuoteDraft, type QuoteHistory, type QuoteInput, type QuoteReason, type QuoteReasonCreated, type QuoteReasonDraft, type QuoteReasonUpdate, type QuoteResult, QuoteService, type QuoteSlotInput, type QuoteUpdate, RagIndexerService, type RagType, type RecalculationJob, type RecalculationJobCreated, type RecalculationJobInput, type RedeemCouponResult, type RedeemMyPointsInput, type RedeemOption, type RedeemOptionList, type RedeemedPoints, type Redemption, type RedemptionCreated, type RedemptionInput, type ReferralCoupon, type Region, type RegionList, type ReindexEntityType, type ReindexInput, type ReindexJob, type ReindexJobInput, type ReindexJobStatus, ResolvedConfig, type ResourceCreated, type Return, type ReturnCreated, type ReturnInput, type ReturnList, type ReturnPatch, type ReturnUpdate, ReturnsService, RewardPointsService, STORAGE_KEYS, SalesOrdersService, type Schema, type SchemaAttribute, type SchemaDraft, type SchemaExport, type SchemaImportInput, type SchemaInstanceBulkCreateItem, type SchemaInstanceBulkUpsertItem, type SchemaReference, type SchemaReferenceCreated, type SchemaReferenceInput, type SchemaReferenceUpdateInput, SchemaService, type SchemaTypeName, type SchemaUpdate, type SearchImportedRecordsOptions, type SearchInstancesQuery, type SearchQuery, type SearchStreamRecordsOptions, SegmentService, SepaExportService, type SepaJob, type SepaJobCreated, type SepaJobInput, type SequenceSchema, type SequenceSchemaCreate, SequentialIdService, type ServerCookieJar, type ServiceClass, ServiceName, type SessionAttributeInput, type SessionContext, type SessionContextPatch, SessionContextService, type SetItemFeesOptions, type ShippingFee, type ShippingGroup, type ShippingGroupList, type ShippingMethod, type ShippingMethodList, type ShippingPatch, ShippingService, type ShoppingList, type ShoppingListDraft, type ShoppingListItem, ShoppingListService, type Site$1 as Site, type SiteCreated, type SiteInput, type SiteList, type SiteMixin, type SiteMixinCreated, type SiteMixins, SiteService, StoredAnonymousSession, type TaxCalculationInput, type TaxCalculationRequest, type TaxCalculationResult, type TaxClass, type TaxConfig, type TaxConfigCreated, type TaxCreation as TaxConfigInput, type TaxUpdate as TaxConfigUpdate, type TaxLocation, TaxService, TenantConfigService, type TextRequest, type TextResponse, type Token, type TokenInput, TokenProvider, type TokenStorage, type Tool, type ToolInput, type Unit, type UnitCreated, UnitHandlingService, type UnitInput, type UnitUpdate, type Vendor, type VendorCreated, type VendorInput, type VendorList, type VendorLocation, type VendorLocationInput, type VendorLocationList, type VendorLocationUpdate, type VendorSearchQuery, VendorService, type VendorUpdate, type WebhookConfig, type WebhookConfigCreated, type WebhookConfigDraft, type WebhookConfigPatch, type WebhookDashboardAccess, WebhookService, type WebhookStatistics, type WebhookStatisticsQuery, type WebhookSubscription, type WebhookSubscriptionUpdateItem, type WebhookSubscriptionUpdateResultItem, type Zone, type ZoneList, approvalStatusPatch, createCookieBackedStorage, createCore, createEmporixClient, createServerStorage, errorFromResponse, parseAnonymousSession, pickFee, productIdFromYrn, productYrn, resolveZone, serverAuth };
|
package/dist/index.js
CHANGED
|
@@ -698,7 +698,7 @@ var HttpClient = class {
|
|
|
698
698
|
};
|
|
699
699
|
|
|
700
700
|
// package.json
|
|
701
|
-
var version = "2.
|
|
701
|
+
var version = "2.35.0";
|
|
702
702
|
|
|
703
703
|
// src/version.ts
|
|
704
704
|
var SDK_VERSION = version;
|
|
@@ -4616,6 +4616,9 @@ var CustomerAdminService = class {
|
|
|
4616
4616
|
customerPath(customerNumber) {
|
|
4617
4617
|
return `${this.base()}/${encodeURIComponent(customerNumber)}`;
|
|
4618
4618
|
}
|
|
4619
|
+
configPath() {
|
|
4620
|
+
return `/customer/${this.ctx.tenant}/config/password-migration-retention`;
|
|
4621
|
+
}
|
|
4619
4622
|
addressPath(customerNumber, addressId) {
|
|
4620
4623
|
return `${this.customerPath(customerNumber)}/addresses/${encodeURIComponent(addressId)}`;
|
|
4621
4624
|
}
|
|
@@ -4706,6 +4709,59 @@ var CustomerAdminService = class {
|
|
|
4706
4709
|
query: { tags: tags.join(",") }
|
|
4707
4710
|
});
|
|
4708
4711
|
}
|
|
4712
|
+
// --- Password-migration retention ---
|
|
4713
|
+
/**
|
|
4714
|
+
* Retrieves the tenant's password-migration retention config. Requires the
|
|
4715
|
+
* `customer.import_read` scope. An unconfigured tenant answers with an empty
|
|
4716
|
+
* object rather than a 404.
|
|
4717
|
+
*/
|
|
4718
|
+
async getPasswordMigrationRetention(auth2 = SERVICE28) {
|
|
4719
|
+
return this.ctx.http.request({
|
|
4720
|
+
method: "GET",
|
|
4721
|
+
path: this.configPath(),
|
|
4722
|
+
auth: auth2
|
|
4723
|
+
});
|
|
4724
|
+
}
|
|
4725
|
+
/**
|
|
4726
|
+
* Creates or updates the retention config (`POST`). Requires the
|
|
4727
|
+
* `customer.import_manage` scope. **Call this before importing customers with
|
|
4728
|
+
* `legacyAuth`** — that import is rejected without an active config. Re-POST with
|
|
4729
|
+
* an earlier `retentionEndDate` to shorten a running window.
|
|
4730
|
+
*/
|
|
4731
|
+
async configurePasswordMigrationRetention(input, auth2 = SERVICE28) {
|
|
4732
|
+
return this.ctx.http.request({
|
|
4733
|
+
method: "POST",
|
|
4734
|
+
path: this.configPath(),
|
|
4735
|
+
auth: auth2,
|
|
4736
|
+
body: input
|
|
4737
|
+
});
|
|
4738
|
+
}
|
|
4739
|
+
/**
|
|
4740
|
+
* Removes the retention config. Requires the `customer.import_manage` scope.
|
|
4741
|
+
* Intended for after the migration window: when the window ends, unmigrated
|
|
4742
|
+
* accounts need a password reset and their legacy credentials are cleared.
|
|
4743
|
+
*/
|
|
4744
|
+
async deletePasswordMigrationRetention(auth2 = SERVICE28) {
|
|
4745
|
+
await this.ctx.http.request({ method: "DELETE", path: this.configPath(), auth: auth2 });
|
|
4746
|
+
}
|
|
4747
|
+
// --- Bulk import ---
|
|
4748
|
+
/**
|
|
4749
|
+
* Bulk-imports customers (`POST /customers/import`). Requires the
|
|
4750
|
+
* `customer.import_manage` scope.
|
|
4751
|
+
*
|
|
4752
|
+
* Responds **207 Multi-Status**: per-item failures do **not** throw — inspect each
|
|
4753
|
+
* entry's `code`. Each item must carry exactly one of `account.passwordHash` or
|
|
4754
|
+
* `account.legacyAuth`, and importing `legacyAuth` requires an active retention
|
|
4755
|
+
* config (see `configurePasswordMigrationRetention`).
|
|
4756
|
+
*/
|
|
4757
|
+
async importCustomers(input, auth2 = SERVICE28) {
|
|
4758
|
+
return this.ctx.http.request({
|
|
4759
|
+
method: "POST",
|
|
4760
|
+
path: `${this.base()}/import`,
|
|
4761
|
+
auth: auth2,
|
|
4762
|
+
body: input
|
|
4763
|
+
});
|
|
4764
|
+
}
|
|
4709
4765
|
};
|
|
4710
4766
|
|
|
4711
4767
|
// src/services/approval.ts
|