@viu/emporix-sdk 4.5.0 → 4.6.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 +8 -0
- package/dist/index.cjs +39 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +86 -4
- package/dist/index.d.ts +86 -4
- package/dist/index.js +39 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -9140,7 +9140,9 @@ type IndexField = {
|
|
|
9140
9140
|
exact?: boolean;
|
|
9141
9141
|
};
|
|
9142
9142
|
/**
|
|
9143
|
-
* Optimistic lock for an index update.
|
|
9143
|
+
* Optimistic lock for an index update. The object can be omitted on create and on update. A missing object still updates an existing index.
|
|
9144
|
+
*
|
|
9145
|
+
* When the object is sent, `version` is required. A value that does not match the stored index returns `409 Conflict`.
|
|
9144
9146
|
*/
|
|
9145
9147
|
type IndexMetadataRequest = {
|
|
9146
9148
|
/**
|
|
@@ -9148,6 +9150,57 @@ type IndexMetadataRequest = {
|
|
|
9148
9150
|
*/
|
|
9149
9151
|
version: number;
|
|
9150
9152
|
};
|
|
9153
|
+
/**
|
|
9154
|
+
* One index to export. Unknown properties are ignored.
|
|
9155
|
+
*/
|
|
9156
|
+
type IndexSelection = {
|
|
9157
|
+
/**
|
|
9158
|
+
* Custom schema type this index belongs to.
|
|
9159
|
+
*/
|
|
9160
|
+
type: string;
|
|
9161
|
+
/**
|
|
9162
|
+
* Index id. Use 1 to 66 characters. Allowed characters are letters, digits, underscore, and hyphen.
|
|
9163
|
+
*/
|
|
9164
|
+
id: string;
|
|
9165
|
+
};
|
|
9166
|
+
/**
|
|
9167
|
+
* Package of search index configuration. `data` is the base64 encoding of a JSON array.
|
|
9168
|
+
*
|
|
9169
|
+
* Each decoded item has `id`, `type`, and `fields`. `name` and `description` are optional localized maps. Export omits `status` and `metadata`. Import accepts `metadata.version` when the caller sends it.
|
|
9170
|
+
*/
|
|
9171
|
+
type IndexExportPackage = {
|
|
9172
|
+
/**
|
|
9173
|
+
* Date and time when the package was exported.
|
|
9174
|
+
*/
|
|
9175
|
+
exportedAt: string;
|
|
9176
|
+
/**
|
|
9177
|
+
* Base64-encoded JSON array of index configurations.
|
|
9178
|
+
*/
|
|
9179
|
+
data: string;
|
|
9180
|
+
};
|
|
9181
|
+
/**
|
|
9182
|
+
* Result of importing one index. `jobId` and `jobType` are omitted when the ready index is unchanged.
|
|
9183
|
+
*/
|
|
9184
|
+
type IndexImportResult = {
|
|
9185
|
+
/**
|
|
9186
|
+
* Index id.
|
|
9187
|
+
*/
|
|
9188
|
+
id: string;
|
|
9189
|
+
/**
|
|
9190
|
+
* Custom schema type this index belongs to.
|
|
9191
|
+
*/
|
|
9192
|
+
type: string;
|
|
9193
|
+
/**
|
|
9194
|
+
* Identifier of the job that builds the index. Present when a job starts.
|
|
9195
|
+
*/
|
|
9196
|
+
jobId?: string;
|
|
9197
|
+
/**
|
|
9198
|
+
* Kind of index change. Present when a job starts.
|
|
9199
|
+
* * `create_index` – the index was created.
|
|
9200
|
+
* * `update_index` – an existing index's field definition changed.
|
|
9201
|
+
*/
|
|
9202
|
+
jobType?: 'create_index' | 'update_index';
|
|
9203
|
+
};
|
|
9151
9204
|
/**
|
|
9152
9205
|
* A search index.
|
|
9153
9206
|
*/
|
|
@@ -9478,6 +9531,15 @@ type SearchIndexField = IndexField;
|
|
|
9478
9531
|
type SearchIndexJob = IndexJob;
|
|
9479
9532
|
/** The id of the job an index write started. */
|
|
9480
9533
|
type SearchIndexJobRef = JobId;
|
|
9534
|
+
/** One index to export: `{ type, id }`. */
|
|
9535
|
+
type SearchIndexSelection = IndexSelection;
|
|
9536
|
+
/**
|
|
9537
|
+
* Exported index configuration: `exportedAt` plus `data`, a base64-encoded JSON
|
|
9538
|
+
* array. {@link SearchService.importIndexes} takes it back unchanged.
|
|
9539
|
+
*/
|
|
9540
|
+
type SearchIndexExport = IndexExportPackage;
|
|
9541
|
+
/** Result for one imported index. `jobId` and `jobType` are present when a build job started. */
|
|
9542
|
+
type SearchIndexImportResult = IndexImportResult;
|
|
9481
9543
|
/** Paging, sort, filter and projection for the list reads. */
|
|
9482
9544
|
interface SearchListOptions {
|
|
9483
9545
|
pageNumber?: number;
|
|
@@ -9565,8 +9627,9 @@ declare class SearchService {
|
|
|
9565
9627
|
* index is `ready` and its fields are unchanged; `name` and `description`
|
|
9566
9628
|
* still change then. Track the job with {@link getJob}.
|
|
9567
9629
|
*
|
|
9568
|
-
*
|
|
9569
|
-
*
|
|
9630
|
+
* `metadata.version` is optional on an update too. When sent, it is an
|
|
9631
|
+
* optimistic lock: a stale one answers `409`, as does a job that is already
|
|
9632
|
+
* running for this index.
|
|
9570
9633
|
*/
|
|
9571
9634
|
upsertIndex(type: string, id: string, input: SearchIndexInput, auth?: AuthContext): Promise<SearchIndexJobRef | undefined>;
|
|
9572
9635
|
/**
|
|
@@ -9574,6 +9637,25 @@ declare class SearchService {
|
|
|
9574
9637
|
* it (`202`); `409` means a job for this index is already running.
|
|
9575
9638
|
*/
|
|
9576
9639
|
deleteIndex(type: string, id: string, auth?: AuthContext): Promise<SearchIndexJobRef>;
|
|
9640
|
+
/**
|
|
9641
|
+
* Export the configuration of the selected indexes as one package, to be
|
|
9642
|
+
* imported on another tenant with {@link importIndexes}. The decoded `data`
|
|
9643
|
+
* holds `id`, `type`, `fields` and the optional `name` and `description` of
|
|
9644
|
+
* each index, not its `status` or `metadata`. `404` when a selected index does
|
|
9645
|
+
* not exist, `400` for an empty selection.
|
|
9646
|
+
*/
|
|
9647
|
+
exportIndexes(selections: SearchIndexSelection[], auth?: AuthContext): Promise<SearchIndexExport>;
|
|
9648
|
+
/**
|
|
9649
|
+
* Create or update every index in a package from {@link exportIndexes}, with
|
|
9650
|
+
* the same checks as {@link upsertIndex}. Resolves to one result per index,
|
|
9651
|
+
* in package order; `jobId` and `jobType` are absent for a ready index whose
|
|
9652
|
+
* fields did not change.
|
|
9653
|
+
*
|
|
9654
|
+
* Not atomic: when an index fails, the ones before it stay created or updated
|
|
9655
|
+
* and the call throws that index's error — `400` for an unreadable package or
|
|
9656
|
+
* an invalid field, `409` for a running job or a stale `metadata.version`.
|
|
9657
|
+
*/
|
|
9658
|
+
importIndexes(pkg: SearchIndexExport, auth?: AuthContext): Promise<SearchIndexImportResult[]>;
|
|
9577
9659
|
/** List index jobs of the tenant. */
|
|
9578
9660
|
listJobs(opts?: SearchListOptions, auth?: AuthContext): Promise<PaginatedItems<SearchIndexJob>>;
|
|
9579
9661
|
/** Fetch one index job. */
|
|
@@ -13375,4 +13457,4 @@ declare function productIdFromYrn(yrn: string | undefined): string;
|
|
|
13375
13457
|
*/
|
|
13376
13458
|
declare function productYrn(tenant: string, productId: string): string;
|
|
13377
13459
|
|
|
13378
|
-
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 CustomEntityDraft, type CustomInstance, type CustomInstanceDraft, 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, 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 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 SchemaDraft, type SchemaExport, type SchemaImportInput, type SchemaInstanceBulkCreateItem, type SchemaInstanceBulkUpsertItem, type SchemaReference, type SchemaReferenceCreated, type SchemaReferenceInput, type SchemaReferenceUpdateInput, SchemaService, type SchemaTypeName, type SchemaUpdate, type SearchFilterNode, type SearchHit, type SearchImportedRecordsOptions, type SearchIndex, type SearchIndexField, type SearchIndexInput, type SearchIndexJob, type SearchIndexJobRef, 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 };
|
|
13460
|
+
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 CustomEntityDraft, type CustomInstance, type CustomInstanceDraft, 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, 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 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 SchemaDraft, type SchemaExport, type SchemaImportInput, type SchemaInstanceBulkCreateItem, type SchemaInstanceBulkUpsertItem, type SchemaReference, type SchemaReferenceCreated, type SchemaReferenceInput, type SchemaReferenceUpdateInput, SchemaService, 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 };
|
package/dist/index.d.ts
CHANGED
|
@@ -9140,7 +9140,9 @@ type IndexField = {
|
|
|
9140
9140
|
exact?: boolean;
|
|
9141
9141
|
};
|
|
9142
9142
|
/**
|
|
9143
|
-
* Optimistic lock for an index update.
|
|
9143
|
+
* Optimistic lock for an index update. The object can be omitted on create and on update. A missing object still updates an existing index.
|
|
9144
|
+
*
|
|
9145
|
+
* When the object is sent, `version` is required. A value that does not match the stored index returns `409 Conflict`.
|
|
9144
9146
|
*/
|
|
9145
9147
|
type IndexMetadataRequest = {
|
|
9146
9148
|
/**
|
|
@@ -9148,6 +9150,57 @@ type IndexMetadataRequest = {
|
|
|
9148
9150
|
*/
|
|
9149
9151
|
version: number;
|
|
9150
9152
|
};
|
|
9153
|
+
/**
|
|
9154
|
+
* One index to export. Unknown properties are ignored.
|
|
9155
|
+
*/
|
|
9156
|
+
type IndexSelection = {
|
|
9157
|
+
/**
|
|
9158
|
+
* Custom schema type this index belongs to.
|
|
9159
|
+
*/
|
|
9160
|
+
type: string;
|
|
9161
|
+
/**
|
|
9162
|
+
* Index id. Use 1 to 66 characters. Allowed characters are letters, digits, underscore, and hyphen.
|
|
9163
|
+
*/
|
|
9164
|
+
id: string;
|
|
9165
|
+
};
|
|
9166
|
+
/**
|
|
9167
|
+
* Package of search index configuration. `data` is the base64 encoding of a JSON array.
|
|
9168
|
+
*
|
|
9169
|
+
* Each decoded item has `id`, `type`, and `fields`. `name` and `description` are optional localized maps. Export omits `status` and `metadata`. Import accepts `metadata.version` when the caller sends it.
|
|
9170
|
+
*/
|
|
9171
|
+
type IndexExportPackage = {
|
|
9172
|
+
/**
|
|
9173
|
+
* Date and time when the package was exported.
|
|
9174
|
+
*/
|
|
9175
|
+
exportedAt: string;
|
|
9176
|
+
/**
|
|
9177
|
+
* Base64-encoded JSON array of index configurations.
|
|
9178
|
+
*/
|
|
9179
|
+
data: string;
|
|
9180
|
+
};
|
|
9181
|
+
/**
|
|
9182
|
+
* Result of importing one index. `jobId` and `jobType` are omitted when the ready index is unchanged.
|
|
9183
|
+
*/
|
|
9184
|
+
type IndexImportResult = {
|
|
9185
|
+
/**
|
|
9186
|
+
* Index id.
|
|
9187
|
+
*/
|
|
9188
|
+
id: string;
|
|
9189
|
+
/**
|
|
9190
|
+
* Custom schema type this index belongs to.
|
|
9191
|
+
*/
|
|
9192
|
+
type: string;
|
|
9193
|
+
/**
|
|
9194
|
+
* Identifier of the job that builds the index. Present when a job starts.
|
|
9195
|
+
*/
|
|
9196
|
+
jobId?: string;
|
|
9197
|
+
/**
|
|
9198
|
+
* Kind of index change. Present when a job starts.
|
|
9199
|
+
* * `create_index` – the index was created.
|
|
9200
|
+
* * `update_index` – an existing index's field definition changed.
|
|
9201
|
+
*/
|
|
9202
|
+
jobType?: 'create_index' | 'update_index';
|
|
9203
|
+
};
|
|
9151
9204
|
/**
|
|
9152
9205
|
* A search index.
|
|
9153
9206
|
*/
|
|
@@ -9478,6 +9531,15 @@ type SearchIndexField = IndexField;
|
|
|
9478
9531
|
type SearchIndexJob = IndexJob;
|
|
9479
9532
|
/** The id of the job an index write started. */
|
|
9480
9533
|
type SearchIndexJobRef = JobId;
|
|
9534
|
+
/** One index to export: `{ type, id }`. */
|
|
9535
|
+
type SearchIndexSelection = IndexSelection;
|
|
9536
|
+
/**
|
|
9537
|
+
* Exported index configuration: `exportedAt` plus `data`, a base64-encoded JSON
|
|
9538
|
+
* array. {@link SearchService.importIndexes} takes it back unchanged.
|
|
9539
|
+
*/
|
|
9540
|
+
type SearchIndexExport = IndexExportPackage;
|
|
9541
|
+
/** Result for one imported index. `jobId` and `jobType` are present when a build job started. */
|
|
9542
|
+
type SearchIndexImportResult = IndexImportResult;
|
|
9481
9543
|
/** Paging, sort, filter and projection for the list reads. */
|
|
9482
9544
|
interface SearchListOptions {
|
|
9483
9545
|
pageNumber?: number;
|
|
@@ -9565,8 +9627,9 @@ declare class SearchService {
|
|
|
9565
9627
|
* index is `ready` and its fields are unchanged; `name` and `description`
|
|
9566
9628
|
* still change then. Track the job with {@link getJob}.
|
|
9567
9629
|
*
|
|
9568
|
-
*
|
|
9569
|
-
*
|
|
9630
|
+
* `metadata.version` is optional on an update too. When sent, it is an
|
|
9631
|
+
* optimistic lock: a stale one answers `409`, as does a job that is already
|
|
9632
|
+
* running for this index.
|
|
9570
9633
|
*/
|
|
9571
9634
|
upsertIndex(type: string, id: string, input: SearchIndexInput, auth?: AuthContext): Promise<SearchIndexJobRef | undefined>;
|
|
9572
9635
|
/**
|
|
@@ -9574,6 +9637,25 @@ declare class SearchService {
|
|
|
9574
9637
|
* it (`202`); `409` means a job for this index is already running.
|
|
9575
9638
|
*/
|
|
9576
9639
|
deleteIndex(type: string, id: string, auth?: AuthContext): Promise<SearchIndexJobRef>;
|
|
9640
|
+
/**
|
|
9641
|
+
* Export the configuration of the selected indexes as one package, to be
|
|
9642
|
+
* imported on another tenant with {@link importIndexes}. The decoded `data`
|
|
9643
|
+
* holds `id`, `type`, `fields` and the optional `name` and `description` of
|
|
9644
|
+
* each index, not its `status` or `metadata`. `404` when a selected index does
|
|
9645
|
+
* not exist, `400` for an empty selection.
|
|
9646
|
+
*/
|
|
9647
|
+
exportIndexes(selections: SearchIndexSelection[], auth?: AuthContext): Promise<SearchIndexExport>;
|
|
9648
|
+
/**
|
|
9649
|
+
* Create or update every index in a package from {@link exportIndexes}, with
|
|
9650
|
+
* the same checks as {@link upsertIndex}. Resolves to one result per index,
|
|
9651
|
+
* in package order; `jobId` and `jobType` are absent for a ready index whose
|
|
9652
|
+
* fields did not change.
|
|
9653
|
+
*
|
|
9654
|
+
* Not atomic: when an index fails, the ones before it stay created or updated
|
|
9655
|
+
* and the call throws that index's error — `400` for an unreadable package or
|
|
9656
|
+
* an invalid field, `409` for a running job or a stale `metadata.version`.
|
|
9657
|
+
*/
|
|
9658
|
+
importIndexes(pkg: SearchIndexExport, auth?: AuthContext): Promise<SearchIndexImportResult[]>;
|
|
9577
9659
|
/** List index jobs of the tenant. */
|
|
9578
9660
|
listJobs(opts?: SearchListOptions, auth?: AuthContext): Promise<PaginatedItems<SearchIndexJob>>;
|
|
9579
9661
|
/** Fetch one index job. */
|
|
@@ -13375,4 +13457,4 @@ declare function productIdFromYrn(yrn: string | undefined): string;
|
|
|
13375
13457
|
*/
|
|
13376
13458
|
declare function productYrn(tenant: string, productId: string): string;
|
|
13377
13459
|
|
|
13378
|
-
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 CustomEntityDraft, type CustomInstance, type CustomInstanceDraft, 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, 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 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 SchemaDraft, type SchemaExport, type SchemaImportInput, type SchemaInstanceBulkCreateItem, type SchemaInstanceBulkUpsertItem, type SchemaReference, type SchemaReferenceCreated, type SchemaReferenceInput, type SchemaReferenceUpdateInput, SchemaService, type SchemaTypeName, type SchemaUpdate, type SearchFilterNode, type SearchHit, type SearchImportedRecordsOptions, type SearchIndex, type SearchIndexField, type SearchIndexInput, type SearchIndexJob, type SearchIndexJobRef, 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 };
|
|
13460
|
+
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 CustomEntityDraft, type CustomInstance, type CustomInstanceDraft, 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, 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 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 SchemaDraft, type SchemaExport, type SchemaImportInput, type SchemaInstanceBulkCreateItem, type SchemaInstanceBulkUpsertItem, type SchemaReference, type SchemaReferenceCreated, type SchemaReferenceInput, type SchemaReferenceUpdateInput, SchemaService, 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 };
|
package/dist/index.js
CHANGED
|
@@ -948,7 +948,7 @@ var HttpClient = class {
|
|
|
948
948
|
};
|
|
949
949
|
|
|
950
950
|
// package.json
|
|
951
|
-
var version = "4.
|
|
951
|
+
var version = "4.6.0";
|
|
952
952
|
|
|
953
953
|
// src/version.ts
|
|
954
954
|
var SDK_VERSION = version;
|
|
@@ -4460,8 +4460,9 @@ var SearchService = class {
|
|
|
4460
4460
|
* index is `ready` and its fields are unchanged; `name` and `description`
|
|
4461
4461
|
* still change then. Track the job with {@link getJob}.
|
|
4462
4462
|
*
|
|
4463
|
-
*
|
|
4464
|
-
*
|
|
4463
|
+
* `metadata.version` is optional on an update too. When sent, it is an
|
|
4464
|
+
* optimistic lock: a stale one answers `409`, as does a job that is already
|
|
4465
|
+
* running for this index.
|
|
4465
4466
|
*/
|
|
4466
4467
|
async upsertIndex(type, id, input, auth2 = SERVICE22) {
|
|
4467
4468
|
return this.ctx.http.request({
|
|
@@ -4482,6 +4483,41 @@ var SearchService = class {
|
|
|
4482
4483
|
auth: auth2
|
|
4483
4484
|
});
|
|
4484
4485
|
}
|
|
4486
|
+
/**
|
|
4487
|
+
* Export the configuration of the selected indexes as one package, to be
|
|
4488
|
+
* imported on another tenant with {@link importIndexes}. The decoded `data`
|
|
4489
|
+
* holds `id`, `type`, `fields` and the optional `name` and `description` of
|
|
4490
|
+
* each index, not its `status` or `metadata`. `404` when a selected index does
|
|
4491
|
+
* not exist, `400` for an empty selection.
|
|
4492
|
+
*/
|
|
4493
|
+
async exportIndexes(selections, auth2 = SERVICE22) {
|
|
4494
|
+
return this.ctx.http.request({
|
|
4495
|
+
method: "POST",
|
|
4496
|
+
path: `${this.base()}/search/indexes/export`,
|
|
4497
|
+
auth: auth2,
|
|
4498
|
+
body: selections,
|
|
4499
|
+
idempotent: true
|
|
4500
|
+
// pure read over POST — safe to replay on 5xx/429
|
|
4501
|
+
});
|
|
4502
|
+
}
|
|
4503
|
+
/**
|
|
4504
|
+
* Create or update every index in a package from {@link exportIndexes}, with
|
|
4505
|
+
* the same checks as {@link upsertIndex}. Resolves to one result per index,
|
|
4506
|
+
* in package order; `jobId` and `jobType` are absent for a ready index whose
|
|
4507
|
+
* fields did not change.
|
|
4508
|
+
*
|
|
4509
|
+
* Not atomic: when an index fails, the ones before it stay created or updated
|
|
4510
|
+
* and the call throws that index's error — `400` for an unreadable package or
|
|
4511
|
+
* an invalid field, `409` for a running job or a stale `metadata.version`.
|
|
4512
|
+
*/
|
|
4513
|
+
async importIndexes(pkg, auth2 = SERVICE22) {
|
|
4514
|
+
return this.ctx.http.request({
|
|
4515
|
+
method: "POST",
|
|
4516
|
+
path: `${this.base()}/search/indexes/import`,
|
|
4517
|
+
auth: auth2,
|
|
4518
|
+
body: pkg
|
|
4519
|
+
});
|
|
4520
|
+
}
|
|
4485
4521
|
/** List index jobs of the tenant. */
|
|
4486
4522
|
async listJobs(opts = {}, auth2 = SERVICE22) {
|
|
4487
4523
|
const { query, page } = pageQuery(opts);
|