@viu/emporix-sdk 4.9.3 → 4.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -2170,7 +2170,10 @@ type SchemaType = 'AVAILABILITY' | 'CART' | 'CART_ITEM' | 'CATEGORY' | 'COMPANY'
2170
2170
  */
2171
2171
  type SchemaAttributeType = 'TEXT' | 'NUMBER' | 'DECIMAL' | 'BOOLEAN' | 'DATE' | 'TIME' | 'DATE_TIME' | 'ENUM' | 'ARRAY' | 'OBJECT' | 'REFERENCE';
2172
2172
  /**
2173
- * Whether the attribute is localized or not. Only attributes of 'TEXT' type can be localized.
2173
+ * Whether the attribute or array item is localized.
2174
+ *
2175
+ * `TEXT` can be localized with either language schema version. `OBJECT` can be localized only when the tenant's `languageSchemaVersion` configuration is `v2`. Its map keys must be BCP 47 language tags. A localized `OBJECT` cannot contain another localized attribute anywhere in its subtree.
2176
+ *
2174
2177
  */
2175
2178
  type Localized = boolean;
2176
2179
  /**
@@ -2187,7 +2190,10 @@ type SchemaAttributeMetadata = {
2187
2190
  */
2188
2191
  required?: boolean;
2189
2192
  /**
2190
- * Whether the attribute could accept null or not.
2193
+ * Whether the attribute accepts `null`.
2194
+ *
2195
+ * For a localized v2 `OBJECT`, both the whole field and each per-language value can be `null`.
2196
+ *
2191
2197
  */
2192
2198
  nullable?: boolean;
2193
2199
  };
@@ -2240,7 +2246,10 @@ type SchemaAttribute$1 = {
2240
2246
  */
2241
2247
  values?: Array<SchemaAttributeValue>;
2242
2248
  /**
2243
- * Object's properties. It can only be provided for attribute of `OBJECT` type.
2249
+ * Object properties. This field can only be provided for an `OBJECT` attribute.
2250
+ *
2251
+ * For a localized `OBJECT`, these properties define each language value. None of the nested properties can be localized.
2252
+ *
2244
2253
  */
2245
2254
  attributes?: Array<SchemaAttribute$1>;
2246
2255
  /**
@@ -2253,6 +2262,17 @@ type SchemaAttribute$1 = {
2253
2262
  */
2254
2263
  values?: Array<SchemaAttributeValue>;
2255
2264
  localized?: Localized;
2265
+ /**
2266
+ * Whether each array item accepts `null`.
2267
+ */
2268
+ nullable?: boolean;
2269
+ /**
2270
+ * Object properties for an array whose `arrayType.type` is `OBJECT`.
2271
+ *
2272
+ * For localized `OBJECT` items, these properties define each language value. None of the nested properties can be localized.
2273
+ *
2274
+ */
2275
+ attributes?: Array<SchemaAttribute$1>;
2256
2276
  };
2257
2277
  };
2258
2278
  type AbstractSchemaRequest = {
@@ -8580,6 +8600,25 @@ type MetadataResponse = MetadataUpdate$1 & {
8580
8600
  */
8581
8601
  modifiedAt?: string;
8582
8602
  };
8603
+ /**
8604
+ * Site copied from the orders
8605
+ *
8606
+ * Site and access boundary copied from the referenced orders. You can send these fields on the create request. The create response returns only the new return id. Retrieved return documents include the fields. Update and patch request bodies do not accept them.
8607
+ *
8608
+ */
8609
+ type ReturnSite = {
8610
+ /**
8611
+ * Site of the orders in the return. On create, the service copies this value from the referenced orders. You can omit it. If you send it, it must match the orders. Every order in the return must use the same site.
8612
+ *
8613
+ */
8614
+ siteCode?: string;
8615
+ /**
8616
+ * Access boundary copied from the referenced orders, together with `siteCode`. You can omit it. If you send it, it must match the orders. Every order in the return must use the same restriction.
8617
+ * An employee scope with a site suffix, such as `returns.returns_read--DE`, can access only returns whose `restriction` is in that list. A scope without a suffix can access every return. A return with no `restriction` is hidden from a site-limited employee.
8618
+ *
8619
+ */
8620
+ restriction?: string;
8621
+ };
8583
8622
  /**
8584
8623
  * basicReturn
8585
8624
  *
@@ -8611,7 +8650,12 @@ type BasicReturn = {
8611
8650
  };
8612
8651
  metadata?: MetadataCore;
8613
8652
  };
8614
- type BasicCustomerReturn = BasicReturn;
8653
+ /**
8654
+ * A return request created by a customer.
8655
+ *
8656
+ * Base schema for a return requested BY A CUSTOMER.
8657
+ */
8658
+ type BasicCustomerReturn = BasicReturn & ReturnSite;
8615
8659
  /**
8616
8660
  * A return request created on behalf of a customer.
8617
8661
  *
@@ -8657,7 +8701,7 @@ type EmployeeReturnForAnonymousOrder = BasicEmployeeReturnBase & {
8657
8701
  *
8658
8702
  * Common structure for returns created by an employee on behalf of a customer.
8659
8703
  */
8660
- type BasicEmployeeReturnBase = BasicReturn & {
8704
+ type BasicEmployeeReturnBase = BasicReturn & ReturnSite & {
8661
8705
  /**
8662
8706
  * Indicates who requested the return. The field can be set and updated only by an employee,
8663
8707
  * that is a person who has the `returns.returns_manage` scope granted.
@@ -9776,12 +9820,22 @@ type SavedSearch = SavedQuery;
9776
9820
  type SavedSearchInput = SavedQueryRequest;
9777
9821
  /** `201` response of {@link SearchService.upsertSavedSearch}. */
9778
9822
  type SavedSearchCreated = SavedQueryId;
9779
- /** A search index on one custom schema type. */
9823
+ /** A search index on one type: a custom schema type, `customer` or `legal-entity`. */
9780
9824
  type SearchIndex = SearchIndex$1;
9781
9825
  /** Body of {@link SearchService.upsertIndex}. */
9782
9826
  type SearchIndexInput = IndexRequest;
9783
- /** One field of a search index. */
9827
+ /**
9828
+ * One field of a search index. A string field with `text: true` can name an
9829
+ * `analyzer` and up to three `additionalAnalyzers`; a list of objects is
9830
+ * indexed through `itemFields` instead of flags on the list itself.
9831
+ */
9784
9832
  type SearchIndexField = IndexField;
9833
+ /**
9834
+ * Named text-comparison rules on an index (`analyzers`, at most ten), starting
9835
+ * from a preset (`basedOn`: `STANDARD`, `FOLDED`, `IDENTIFIER`, `SOUNDS_LIKE`).
9836
+ * Every analyzer must be selected by a field, or the index write answers `400`.
9837
+ */
9838
+ type SearchIndexAnalyzer = IndexAnalyzer;
9785
9839
  /** An index build or deletion job. */
9786
9840
  type SearchIndexJob = IndexJob;
9787
9841
  /** The id of the job an index write started. */
@@ -9811,7 +9865,7 @@ interface SearchListOptions {
9811
9865
  }
9812
9866
  /** Options for {@link SearchService.listSavedSearches} and {@link SearchService.listIndexes}. */
9813
9867
  interface SearchTypeListOptions extends SearchListOptions {
9814
- /** One custom schema type. Omitted, the list spans every custom schema type, and each item carries `type`. */
9868
+ /** One type: a custom schema type, `customer` or `legal-entity`. Omitted, the list spans every type, and each item carries `type`. */
9815
9869
  type?: string;
9816
9870
  }
9817
9871
  /**
@@ -9821,14 +9875,20 @@ interface SearchTypeListOptions extends SearchListOptions {
9821
9875
  type SearchOptions = Omit<SearchListOptions, "q">;
9822
9876
  /**
9823
9877
  * Emporix Search Service (`/search/{tenant}/…`, **preview**): searches the
9824
- * documents of a custom schema type, stores saved searches, and manages the
9825
- * search indexes and the jobs that build them. Only custom schema types are
9826
- * supported so far. Server-side; defaults to the service token.
9878
+ * documents of one type, stores saved searches, and manages the search indexes
9879
+ * and the jobs that build them. A type is a custom schema type, `customer` or
9880
+ * `legal-entity` (the last two since 2026-10-29). Server-side; defaults to the
9881
+ * service token.
9827
9882
  *
9828
9883
  * Scopes: `search.search_read` for every read and for `search`,
9829
9884
  * `search.search_manage` for every write. Searching also needs read access to
9830
- * the documents themselves (`schema.custominstance_read`, `custom.{type}_read`
9831
- * or `custom.{type}_read_own`), or it answers `403`.
9885
+ * the documents themselves, or it answers `403`: `schema.custominstance_read`,
9886
+ * `custom.{type}_read` or `custom.{type}_read_own` for a custom type;
9887
+ * `customer.customer_read` or `customer.customer_read_own` for `customer`;
9888
+ * `customermanagement.legalentity_read` or `…_read_own` for `legal-entity`. A
9889
+ * site-restricted read scope (`customer.customer_read--DE#AT`) returns only the
9890
+ * documents whose `restriction` / `restrictions` match, and an own scope only
9891
+ * the caller's own customer or legal entity.
9832
9892
  */
9833
9893
  declare class SearchService {
9834
9894
  private readonly ctx;
@@ -9836,13 +9896,18 @@ declare class SearchService {
9836
9896
  constructor(ctx: ClientContext);
9837
9897
  private base;
9838
9898
  /**
9839
- * Search the documents of one custom schema type. Paging, `sort` and
9840
- * `fields` travel as query parameters, not in the body.
9899
+ * Search the documents of one type — a custom schema type, `customer` or
9900
+ * `legal-entity`. Paging, `sort` and `fields` travel as query parameters, not
9901
+ * in the body.
9841
9902
  *
9842
9903
  * Filter and sort fields must be indexed on the index the search uses —
9843
- * `exact`, or `text: true` for a `CONTAINS` filter — or the call answers `400`. A saved-search call (`{ searchQueryId, query }`) answers
9844
- * `404` when no saved search has that id for `type`, and `502` means the
9845
- * Schema Service could not confirm that `type` is a custom entity.
9904
+ * `exact`, or `text: true` for a `CONTAINS` filter — or the call answers
9905
+ * `400`. A `TEXT` or `PHRASE` query may pick the field's `analyzer` or one of
9906
+ * its `additionalAnalyzers`. Conditions joined by `and` on fields of one
9907
+ * `itemFields` list must match the same list item. A saved-search call
9908
+ * (`{ searchQueryId, query }`) answers `404` when no saved search has that id
9909
+ * for `type`, and `502` means the Schema Service could not confirm that a
9910
+ * custom `type` is a custom entity.
9846
9911
  *
9847
9912
  * @example
9848
9913
  * const hits = await client.search.search("VEHICLE", {
@@ -9852,7 +9917,7 @@ declare class SearchService {
9852
9917
  * });
9853
9918
  */
9854
9919
  search(type: string, input: SearchInput, opts?: SearchOptions, auth?: AuthContext): Promise<PaginatedItems<SearchHit>>;
9855
- /** List saved searches of one custom schema type (`opts.type`), or of every type. */
9920
+ /** List saved searches of one type (`opts.type`), or of every type. */
9856
9921
  listSavedSearches(opts?: SearchTypeListOptions, auth?: AuthContext): Promise<PaginatedItems<SavedSearch>>;
9857
9922
  /** Fetch one saved search. */
9858
9923
  getSavedSearch(type: string, id: string, opts?: {
@@ -9869,7 +9934,7 @@ declare class SearchService {
9869
9934
  upsertSavedSearch(type: string, id: string, input: SavedSearchInput, auth?: AuthContext): Promise<SavedSearchCreated | undefined>;
9870
9935
  /** Delete a saved search. Does not start an index build. */
9871
9936
  deleteSavedSearch(type: string, id: string, auth?: AuthContext): Promise<void>;
9872
- /** List search indexes of one custom schema type (`opts.type`), or of every type. */
9937
+ /** List search indexes of one type (`opts.type`), or of every type. */
9873
9938
  listIndexes(opts?: SearchTypeListOptions, auth?: AuthContext): Promise<PaginatedItems<SearchIndex>>;
9874
9939
  /** Fetch one search index. */
9875
9940
  getIndex(type: string, id: string, opts?: {
@@ -9998,7 +10063,8 @@ type ImportFile$1 = {
9998
10063
  * fails part-way leaves the file importable.
9999
10064
  * * `FAILED` – the stream that read the file finished `FAILED`. The file could not be read
10000
10065
  * (malformed, truncated, wrong charset), or the import failed for another reason, such as the
10001
- * target being unavailable. Such a file can be sent again. Records that fail individually do not
10066
+ * target being unavailable. Such a file can be queued again with the content the service holds, or
10067
+ * uploaded again. Records that fail individually do not
10002
10068
  * put a file here: a stream that finishes with record failures still marks its file imported.
10003
10069
  */
10004
10070
  status?: 'PENDING' | 'IN_PROGRESS' | 'PROCESSED' | 'FAILED';
@@ -10049,6 +10115,10 @@ type FileQueue = {
10049
10115
  * How many files are waiting in total, however many this response lists.
10050
10116
  */
10051
10117
  pendingTotal?: number;
10118
+ /**
10119
+ * The newest file the stream has imported, or `null` when it has imported none. Returned whatever `historyLimit` is, because a run with no file waiting reads this file again (a snapshot stream).
10120
+ */
10121
+ lastProcessed?: ImportFile$1 | null;
10052
10122
  };
10053
10123
  /**
10054
10124
  * Stream
@@ -10518,6 +10588,12 @@ type ImportRunStream$1 = {
10518
10588
  embedded?: number;
10519
10589
  /**
10520
10590
  * A per-stream status message.
10591
+ *
10592
+ * When a run of a file-based stream finds no file waiting, the message starts with `No file was
10593
+ * waiting, so nothing was imported`. If the latest file in the stream's history failed, the message
10594
+ * names that file and suggests queuing it again. Otherwise, it suggests uploading a file to the
10595
+ * stream's queue first. This message is not set for a dry run, for a retry, or for a stream whose
10596
+ * connection reads its file from a file URL.
10521
10597
  */
10522
10598
  message?: string;
10523
10599
  /**
@@ -11355,7 +11431,10 @@ type ImportRun = ImportRun$1;
11355
11431
  *
11356
11432
  * For a file source, `filesRead` lists the files the stream read, in order,
11357
11433
  * and `fileNames` maps each of those opaque locators to its display name. A
11358
- * retry re-reads exactly these bytes, even if a newer file arrived since.
11434
+ * retry re-reads exactly these bytes, even if a newer file arrived since. When
11435
+ * a run of a file-based stream finds no file waiting, `message` starts with
11436
+ * `No file was waiting, so nothing was imported` and, if the stream's latest
11437
+ * file failed, names it.
11359
11438
  */
11360
11439
  type ImportRunStream = ImportRunStream$1;
11361
11440
  /** A run together with its per-stream progress — what `getRun` resolves to. */
@@ -11383,7 +11462,7 @@ type ImportedRecord = ImportedRecord$1;
11383
11462
  type ImportStreamOrder = GetImporttoolStreamOrderResponse;
11384
11463
  /**
11385
11464
  * One file a file-based stream was given, and what became of it. `id` is what
11386
- * `setStreamFileOrder` and `deleteStreamFile` take. `loadRank` is its place in
11465
+ * `setStreamFileOrder`, `deleteStreamFile` and `requeueStreamFile` take. `loadRank` is its place in
11387
11466
  * the drain order; `runId`, `processedAt` and `recordsRead` are set once a run
11388
11467
  * consumed it.
11389
11468
  */
@@ -11392,13 +11471,17 @@ type ImportFile = ImportFile$1;
11392
11471
  * Where an {@link ImportFile} is in its life: `PENDING`, `IN_PROGRESS`,
11393
11472
  * `PROCESSED` or `FAILED`. A file whose records failed individually still ends
11394
11473
  * `PROCESSED`; `FAILED` means the stream reading it failed, and such a file can
11395
- * be uploaded again.
11474
+ * be queued again with `requeueStreamFile` or uploaded again.
11396
11475
  */
11397
11476
  type ImportFileStatus = NonNullable<ImportFile["status"]>;
11398
11477
  /**
11399
11478
  * A stream's file queue: `pending` in load order, `history` newest first.
11400
11479
  * `pending` is complete up to 2000 files; beyond that `pendingTruncated` is
11401
11480
  * `true`, `pendingTotal` has the real count, and the order cannot be changed.
11481
+ *
11482
+ * `lastProcessed` is the newest file the stream imported, whatever
11483
+ * `historyLimit` is, or `null` when it imported none: on a snapshot stream, a
11484
+ * run with no file waiting reads that file again.
11402
11485
  */
11403
11486
  type ImportFileQueue = FileQueue;
11404
11487
  /**
@@ -11657,6 +11740,11 @@ declare class ImportService {
11657
11740
  * streams. Read it back with {@link getRun}, or follow it with
11658
11741
  * {@link streamRun}, before treating a resolved call as a started import.
11659
11742
  *
11743
+ * A configuration that does not exist answers `404` (since 2026-11-06; it used
11744
+ * to be a `500`). A real run with nothing to import answers `400`: every stream
11745
+ * it starts from reads uploaded files, and none has ever had one. Upload a file
11746
+ * with {@link uploadStreamFile} first. A dry run is not refused for this.
11747
+ *
11660
11748
  * Not retried on a 5xx: a POST that timed out may already have queued a run.
11661
11749
  *
11662
11750
  * @example
@@ -11785,7 +11873,7 @@ declare class ImportService {
11785
11873
  * {@link streamRun} exactly as you would a triggered run. Like one, it comes
11786
11874
  * back `QUEUED`, answers `409` while the configuration has a run `QUEUED`,
11787
11875
  * `RUNNING` or `RESUMABLE`, runs the published mappings and can finish
11788
- * `ABORTED`.
11876
+ * `ABORTED`. A run that does not exist answers `404`.
11789
11877
  *
11790
11878
  * Not retried on a 5xx, for the same reason {@link triggerRun} is not: a POST
11791
11879
  * that timed out may already have queued the retry.
@@ -11854,6 +11942,23 @@ declare class ImportService {
11854
11942
  * same bytes importable again.
11855
11943
  */
11856
11944
  deleteStreamFile(streamId: string, fileId: string, auth?: AuthContext): Promise<void>;
11945
+ /**
11946
+ * Put a `FAILED` file back at the end of the stream's queue, so the next run
11947
+ * reads the content the service already holds — no new upload. Use it after
11948
+ * fixing the cause of the failure, a mapping say. Resolves to the file,
11949
+ * `PENDING` again.
11950
+ *
11951
+ * Only a failed file can be queued again; `409` otherwise. A file imported with
11952
+ * some records failing is `PROCESSED`: retry those records with
11953
+ * {@link retryRun} instead. On a `SNAPSHOT` stream a failed file cannot be
11954
+ * queued again once a newer file arrived, since the older snapshot would be
11955
+ * imported over newer data — upload a corrected current file instead. `409`
11956
+ * also when the stored content is gone, and while the job has a run in flight.
11957
+ *
11958
+ * Not retried on a 5xx: if the first attempt went through, the file is no
11959
+ * longer `FAILED` and a repeat answers `409`.
11960
+ */
11961
+ requeueStreamFile(streamId: string, fileId: string, auth?: AuthContext): Promise<ImportFile>;
11857
11962
  }
11858
11963
 
11859
11964
  /**
@@ -14124,4 +14229,4 @@ declare function productIdFromYrn(yrn: string | undefined): string;
14124
14229
  */
14125
14230
  declare function productYrn(tenant: string, productId: string): string;
14126
14231
 
14127
- 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, AgenticCrudResource, type AgenticPatchOp, type AgentsExport, type AgentsExportRequest, type AgentsImport, type AgentsImportRequest, AiService, type AnalyticsQuery, AnalyticsResource, type Approval, type ApprovalCreated, type ApprovalDecision, type ApprovalInput, type ApprovalList, type ApprovalPatch, type ApprovalPermittedInput, type ApprovalPermittedResult, ApprovalService, type ApprovalUsersQuery, type ApprovalUsersResult, type Attachment, type AttachmentOptions, type AttachmentReuseOptions, type AuditLogChangeType, type AuditLogEntry, type AuditLogPage, type AuditLogPathChange, type AuditLogQuery, type AuditLogRelatedEntity, AuditLogService, 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 ChatOptions, 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 CustomEntityCreated, type CustomEntityDraft, type CustomEntityUpdate, type CustomInstance, type CustomInstanceCreated, type CustomInstanceDraft, type CustomInstancePatch, type CustomInstanceReplace, CustomerAdminService, CustomerGroupsService, CustomerService, type CustomerSessionState, type CustomerSessionStore, type CustomerSummaryBatch, CustomerTokenRefresher, type DeleteAgentOptions, type DeleteConfigOptions, type DeliveryCreated, type DeliveryCycleInput, type DeliverySlot, type DeliverySlotList, type DeliveryTime, type DeliveryTimeInput, type DeliveryTimeList, type DeliveryTimeUpdate, type DeliveryWindow$1 as DeliveryWindow, type DeliveryWindowList, type DeliveryWindowValidation, EmporixAuthError, EmporixClient, EmporixConfig, EmporixConflictError, 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 ImportDiagnosticKind, type ImportDiagnosticRecord, type ImportErrorRecord, type ImportFile, type ImportFileQueue, type ImportFileStatus, type ImportFileUploadLimits, type ImportHealthThresholds, type ImportJobGroup, type ImportLicense, type ImportPage, type ImportPageOptions, type ImportRecordOutcome, type ImportRun, type ImportRunDetail, type ImportRunDiagnostics, type ImportRunDiagnosticsQuery, type ImportRunEvent, type ImportRunInput, type ImportRunMode, type ImportRunStatus, type ImportRunStream, type ImportSchedule, ImportService, type ImportStats, type ImportStatsQuery, type ImportStream, type ImportStreamOrder, 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, JobsResource, 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, LogsResource, 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, OrdersService, PaginatedItems, PaymentGatewayService, type PersistedAnonymousSession, 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, QuoteReasonsResource, type QuoteResult, QuoteService, type QuoteSlotInput, type QuoteUpdate, RagIndexerService, type RagType, type RedeemCouponResult, type RedeemMyPointsInput, type RedeemOption, type RedeemOptionList, type RedeemedPoints, type Redemption, type RedemptionCreated, type RedemptionInput, type ReferralCoupon, type Region, type RegionList, type 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 SavedSearch, type SavedSearchCreated, type SavedSearchInput, type Schema, type SchemaAttribute, type SchemaCreated, type SchemaDraft, type SchemaExport, type SchemaImportInput, type SchemaInstanceBulkCreateItem, type SchemaInstanceBulkUpsertItem, type SchemaReference, type SchemaReferenceCreated, type SchemaReferenceInput, type SchemaReferenceUpdateInput, SchemaService, type SchemaTargetType, type SchemaTypeName, type SchemaUpdate, type SearchFilterNode, type SearchHit, type SearchImportedRecordsOptions, type SearchIndex, type SearchIndexExport, type SearchIndexField, type SearchIndexImportResult, type SearchIndexInput, type SearchIndexJob, type SearchIndexJobRef, type SearchIndexSelection, type SearchInput, type SearchInstancesQuery, type SearchListOptions, type SearchOptions, SearchPaging, type SearchQuery, type SearchQueryNode, SearchService, type SearchStreamRecordsOptions, type SearchTypeListOptions, SegmentService, type SequenceSchema, type SequenceSchemaCreate, SequentialIdService, type ServerCookieJar, type ServiceClass, ServiceName, type SessionAttributeInput, type SessionContext, type SessionContextData, 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 SiteAddress, type SiteCreated, type SiteFields, type SiteHomeBase, 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, TemplatesResource, 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, createCookieStorage, createCore, createEmporixClient, createListenerSet, createLocalStorage, createLocalStorageStorage, createMemoryStorage, createServerStorage, createSessionStorage, emporixKey, errorFromResponse, fromWebStorage, getCustomerSessionStore, parseAnonymousSession, pickFee, productIdFromYrn, productYrn, resolveZone, serverAuth, siteMeta };
14232
+ 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, AgenticCrudResource, type AgenticPatchOp, type AgentsExport, type AgentsExportRequest, type AgentsImport, type AgentsImportRequest, AiService, type AnalyticsQuery, AnalyticsResource, type Approval, type ApprovalCreated, type ApprovalDecision, type ApprovalInput, type ApprovalList, type ApprovalPatch, type ApprovalPermittedInput, type ApprovalPermittedResult, ApprovalService, type ApprovalUsersQuery, type ApprovalUsersResult, type Attachment, type AttachmentOptions, type AttachmentReuseOptions, type AuditLogChangeType, type AuditLogEntry, type AuditLogPage, type AuditLogPathChange, type AuditLogQuery, type AuditLogRelatedEntity, AuditLogService, 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 ChatOptions, 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 CustomEntityCreated, type CustomEntityDraft, type CustomEntityUpdate, type CustomInstance, type CustomInstanceCreated, type CustomInstanceDraft, type CustomInstancePatch, type CustomInstanceReplace, CustomerAdminService, CustomerGroupsService, CustomerService, type CustomerSessionState, type CustomerSessionStore, type CustomerSummaryBatch, CustomerTokenRefresher, type DeleteAgentOptions, type DeleteConfigOptions, type DeliveryCreated, type DeliveryCycleInput, type DeliverySlot, type DeliverySlotList, type DeliveryTime, type DeliveryTimeInput, type DeliveryTimeList, type DeliveryTimeUpdate, type DeliveryWindow$1 as DeliveryWindow, type DeliveryWindowList, type DeliveryWindowValidation, EmporixAuthError, EmporixClient, EmporixConfig, EmporixConflictError, 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 ImportDiagnosticKind, type ImportDiagnosticRecord, type ImportErrorRecord, type ImportFile, type ImportFileQueue, type ImportFileStatus, type ImportFileUploadLimits, type ImportHealthThresholds, type ImportJobGroup, type ImportLicense, type ImportPage, type ImportPageOptions, type ImportRecordOutcome, type ImportRun, type ImportRunDetail, type ImportRunDiagnostics, type ImportRunDiagnosticsQuery, type ImportRunEvent, type ImportRunInput, type ImportRunMode, type ImportRunStatus, type ImportRunStream, type ImportSchedule, ImportService, type ImportStats, type ImportStatsQuery, type ImportStream, type ImportStreamOrder, 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, JobsResource, 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, LogsResource, 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, OrdersService, PaginatedItems, PaymentGatewayService, type PersistedAnonymousSession, 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, QuoteReasonsResource, type QuoteResult, QuoteService, type QuoteSlotInput, type QuoteUpdate, RagIndexerService, type RagType, type RedeemCouponResult, type RedeemMyPointsInput, type RedeemOption, type RedeemOptionList, type RedeemedPoints, type Redemption, type RedemptionCreated, type RedemptionInput, type ReferralCoupon, type Region, type RegionList, type 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 SavedSearch, type SavedSearchCreated, type SavedSearchInput, type Schema, type SchemaAttribute, type SchemaCreated, type SchemaDraft, type SchemaExport, type SchemaImportInput, type SchemaInstanceBulkCreateItem, type SchemaInstanceBulkUpsertItem, type SchemaReference, type SchemaReferenceCreated, type SchemaReferenceInput, type SchemaReferenceUpdateInput, SchemaService, type SchemaTargetType, type SchemaTypeName, type SchemaUpdate, type SearchFilterNode, type SearchHit, type SearchImportedRecordsOptions, type SearchIndex, type SearchIndexAnalyzer, type SearchIndexExport, type SearchIndexField, type SearchIndexImportResult, type SearchIndexInput, type SearchIndexJob, type SearchIndexJobRef, type SearchIndexSelection, type SearchInput, type SearchInstancesQuery, type SearchListOptions, type SearchOptions, SearchPaging, type SearchQuery, type SearchQueryNode, SearchService, type SearchStreamRecordsOptions, type SearchTypeListOptions, SegmentService, type SequenceSchema, type SequenceSchemaCreate, SequentialIdService, type ServerCookieJar, type ServiceClass, ServiceName, type SessionAttributeInput, type SessionContext, type SessionContextData, 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 SiteAddress, type SiteCreated, type SiteFields, type SiteHomeBase, 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, TemplatesResource, 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, createCookieStorage, createCore, createEmporixClient, createListenerSet, createLocalStorage, createLocalStorageStorage, createMemoryStorage, createServerStorage, createSessionStorage, emporixKey, errorFromResponse, fromWebStorage, getCustomerSessionStore, parseAnonymousSession, pickFee, productIdFromYrn, productYrn, resolveZone, serverAuth, siteMeta };
package/dist/index.js CHANGED
@@ -948,7 +948,7 @@ var HttpClient = class {
948
948
  };
949
949
 
950
950
  // package.json
951
- var version = "4.9.3";
951
+ var version = "4.10.0";
952
952
 
953
953
  // src/version.ts
954
954
  var SDK_VERSION = version;
@@ -4364,13 +4364,18 @@ var SearchService = class {
4364
4364
  return `/search/${this.ctx.tenant}`;
4365
4365
  }
4366
4366
  /**
4367
- * Search the documents of one custom schema type. Paging, `sort` and
4368
- * `fields` travel as query parameters, not in the body.
4367
+ * Search the documents of one type — a custom schema type, `customer` or
4368
+ * `legal-entity`. Paging, `sort` and `fields` travel as query parameters, not
4369
+ * in the body.
4369
4370
  *
4370
4371
  * Filter and sort fields must be indexed on the index the search uses —
4371
- * `exact`, or `text: true` for a `CONTAINS` filter — or the call answers `400`. A saved-search call (`{ searchQueryId, query }`) answers
4372
- * `404` when no saved search has that id for `type`, and `502` means the
4373
- * Schema Service could not confirm that `type` is a custom entity.
4372
+ * `exact`, or `text: true` for a `CONTAINS` filter — or the call answers
4373
+ * `400`. A `TEXT` or `PHRASE` query may pick the field's `analyzer` or one of
4374
+ * its `additionalAnalyzers`. Conditions joined by `and` on fields of one
4375
+ * `itemFields` list must match the same list item. A saved-search call
4376
+ * (`{ searchQueryId, query }`) answers `404` when no saved search has that id
4377
+ * for `type`, and `502` means the Schema Service could not confirm that a
4378
+ * custom `type` is a custom entity.
4374
4379
  *
4375
4380
  * @example
4376
4381
  * const hits = await client.search.search("VEHICLE", {
@@ -4395,7 +4400,7 @@ var SearchService = class {
4395
4400
  page
4396
4401
  );
4397
4402
  }
4398
- /** List saved searches of one custom schema type (`opts.type`), or of every type. */
4403
+ /** List saved searches of one type (`opts.type`), or of every type. */
4399
4404
  async listSavedSearches(opts = {}, auth2 = SERVICE22) {
4400
4405
  const { query, page } = pageQuery(opts);
4401
4406
  const t = opts.type;
@@ -4443,7 +4448,7 @@ var SearchService = class {
4443
4448
  auth: auth2
4444
4449
  });
4445
4450
  }
4446
- /** List search indexes of one custom schema type (`opts.type`), or of every type. */
4451
+ /** List search indexes of one type (`opts.type`), or of every type. */
4447
4452
  async listIndexes(opts = {}, auth2 = SERVICE22) {
4448
4453
  const { query, page } = pageQuery(opts);
4449
4454
  const t = opts.type;
@@ -4737,6 +4742,11 @@ var ImportService = class {
4737
4742
  * streams. Read it back with {@link getRun}, or follow it with
4738
4743
  * {@link streamRun}, before treating a resolved call as a started import.
4739
4744
  *
4745
+ * A configuration that does not exist answers `404` (since 2026-11-06; it used
4746
+ * to be a `500`). A real run with nothing to import answers `400`: every stream
4747
+ * it starts from reads uploaded files, and none has ever had one. Upload a file
4748
+ * with {@link uploadStreamFile} first. A dry run is not refused for this.
4749
+ *
4740
4750
  * Not retried on a 5xx: a POST that timed out may already have queued a run.
4741
4751
  *
4742
4752
  * @example
@@ -4987,7 +4997,7 @@ var ImportService = class {
4987
4997
  * {@link streamRun} exactly as you would a triggered run. Like one, it comes
4988
4998
  * back `QUEUED`, answers `409` while the configuration has a run `QUEUED`,
4989
4999
  * `RUNNING` or `RESUMABLE`, runs the published mappings and can finish
4990
- * `ABORTED`.
5000
+ * `ABORTED`. A run that does not exist answers `404`.
4991
5001
  *
4992
5002
  * Not retried on a 5xx, for the same reason {@link triggerRun} is not: a POST
4993
5003
  * that timed out may already have queued the retry.
@@ -5098,6 +5108,29 @@ var ImportService = class {
5098
5108
  auth: auth2
5099
5109
  });
5100
5110
  }
5111
+ /**
5112
+ * Put a `FAILED` file back at the end of the stream's queue, so the next run
5113
+ * reads the content the service already holds — no new upload. Use it after
5114
+ * fixing the cause of the failure, a mapping say. Resolves to the file,
5115
+ * `PENDING` again.
5116
+ *
5117
+ * Only a failed file can be queued again; `409` otherwise. A file imported with
5118
+ * some records failing is `PROCESSED`: retry those records with
5119
+ * {@link retryRun} instead. On a `SNAPSHOT` stream a failed file cannot be
5120
+ * queued again once a newer file arrived, since the older snapshot would be
5121
+ * imported over newer data — upload a corrected current file instead. `409`
5122
+ * also when the stored content is gone, and while the job has a run in flight.
5123
+ *
5124
+ * Not retried on a 5xx: if the first attempt went through, the file is no
5125
+ * longer `FAILED` and a repeat answers `409`.
5126
+ */
5127
+ async requeueStreamFile(streamId, fileId, auth2 = SERVICE23) {
5128
+ return this.ctx.http.request({
5129
+ method: "POST",
5130
+ path: `${this.base()}/streams/${encodeURIComponent(streamId)}/files/${encodeURIComponent(fileId)}/requeue`,
5131
+ auth: auth2
5132
+ });
5133
+ }
5101
5134
  };
5102
5135
 
5103
5136
  // src/services/audit-log.ts