@ecomweb/sdk 0.13.0 → 0.13.1
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 +38 -10
- package/dist/index.js +13 -6
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -2440,7 +2440,8 @@ interface BlogComment {
|
|
|
2440
2440
|
blog_post_id: Id | null;
|
|
2441
2441
|
parent_comment_id: Id | null;
|
|
2442
2442
|
author_name: string;
|
|
2443
|
-
|
|
2443
|
+
/** Never on public reads (the API hides commenter emails); admin reads only. */
|
|
2444
|
+
author_email?: string;
|
|
2444
2445
|
author_website: string | null;
|
|
2445
2446
|
content: string;
|
|
2446
2447
|
is_approved: boolean;
|
|
@@ -2517,7 +2518,7 @@ declare const blogCommentSchema: z.ZodObject<{
|
|
|
2517
2518
|
blog_post_id: z.ZodNullable<z.ZodOptional<z.ZodInt32>>;
|
|
2518
2519
|
parent_comment_id: z.ZodNullable<z.ZodOptional<z.ZodInt32>>;
|
|
2519
2520
|
author_name: z.ZodString;
|
|
2520
|
-
author_email: z.ZodEmail
|
|
2521
|
+
author_email: z.ZodOptional<z.ZodEmail>;
|
|
2521
2522
|
author_website: z.ZodNullable<z.ZodOptional<z.ZodURL>>;
|
|
2522
2523
|
content: z.ZodString;
|
|
2523
2524
|
is_approved: z.ZodDefault<z.ZodBoolean>;
|
|
@@ -2584,11 +2585,11 @@ declare const createBlogPostSchema: z.ZodObject<{
|
|
|
2584
2585
|
declare const createBlogCommentSchema: z.ZodObject<{
|
|
2585
2586
|
content: z.ZodString;
|
|
2586
2587
|
author_name: z.ZodString;
|
|
2587
|
-
author_email: z.ZodEmail;
|
|
2588
2588
|
blog_post_id: z.ZodNullable<z.ZodOptional<z.ZodInt32>>;
|
|
2589
2589
|
parent_comment_id: z.ZodNullable<z.ZodOptional<z.ZodInt32>>;
|
|
2590
2590
|
author_website: z.ZodNullable<z.ZodOptional<z.ZodURL>>;
|
|
2591
2591
|
is_approved: z.ZodDefault<z.ZodBoolean>;
|
|
2592
|
+
author_email: z.ZodEmail;
|
|
2592
2593
|
}, z.core.$strip>;
|
|
2593
2594
|
declare const createBlogSettingsSchema: z.ZodObject<{
|
|
2594
2595
|
blog_title: z.ZodDefault<z.ZodString>;
|
|
@@ -2640,8 +2641,8 @@ declare const updateBlogPostSchema: z.ZodObject<{
|
|
|
2640
2641
|
declare const updateBlogCommentSchema: z.ZodObject<{
|
|
2641
2642
|
content: z.ZodOptional<z.ZodString>;
|
|
2642
2643
|
author_name: z.ZodOptional<z.ZodString>;
|
|
2643
|
-
author_email: z.ZodOptional<z.ZodEmail>;
|
|
2644
2644
|
parent_comment_id: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodInt32>>>;
|
|
2645
|
+
author_email: z.ZodOptional<z.ZodEmail>;
|
|
2645
2646
|
author_website: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodURL>>>;
|
|
2646
2647
|
is_approved: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
2647
2648
|
}, z.core.$strip>;
|
|
@@ -2670,7 +2671,9 @@ declare const blogCommentWithRepliesSchema: z.ZodType<BlogCommentWithReplies, un
|
|
|
2670
2671
|
type CreateBlogCategory = Omit<BlogCategory, "id" | keyof OptionalTimestamp>;
|
|
2671
2672
|
type CreateBlogTag = Omit<BlogTag, "id" | keyof OptionalTimestamp>;
|
|
2672
2673
|
type CreateBlogPost = Omit<BlogPost$1, "id" | "view_count" | keyof OptionalTimestamp>;
|
|
2673
|
-
type CreateBlogComment = Omit<BlogComment, "id" | "created_at"
|
|
2674
|
+
type CreateBlogComment = Omit<BlogComment, "id" | "created_at" | "author_email"> & {
|
|
2675
|
+
author_email: string;
|
|
2676
|
+
};
|
|
2674
2677
|
type CreateBlogSettings = Omit<BlogSettings, "id" | keyof OptionalTimestamp>;
|
|
2675
2678
|
type UpdateBlogCategory = Partial<CreateBlogCategory>;
|
|
2676
2679
|
type UpdateBlogTag = Partial<CreateBlogTag>;
|
|
@@ -4203,6 +4206,8 @@ interface CreateOrderRequest {
|
|
|
4203
4206
|
notes?: string;
|
|
4204
4207
|
customer_address_id?: number;
|
|
4205
4208
|
promotion_id?: number;
|
|
4209
|
+
/** The code the shopper entered for `promotion_id`; storefront checkout must send it for a discount-code promotion. */
|
|
4210
|
+
promotion_code?: string;
|
|
4206
4211
|
/** Omit to default to 'online'. Staff keying in a walk-in order must send 'pos', 'phone', or 'admin'. */
|
|
4207
4212
|
source?: AdminOrderSource;
|
|
4208
4213
|
items: CreateOrderItemRequest[];
|
|
@@ -5123,6 +5128,15 @@ interface AuthResult {
|
|
|
5123
5128
|
expires_in: number;
|
|
5124
5129
|
identity: AuthIdentity | null;
|
|
5125
5130
|
}
|
|
5131
|
+
/**
|
|
5132
|
+
* What register answers. `verification_binding` ties the mailed verification
|
|
5133
|
+
* link to this client: keep it (never show or mail it) and present it on
|
|
5134
|
+
* verify-email, or the click verifies the address but drops the password set
|
|
5135
|
+
* at registration. Absent on APIs that predate the binding.
|
|
5136
|
+
*/
|
|
5137
|
+
interface RegisterResult extends AuthResult {
|
|
5138
|
+
verification_binding?: string;
|
|
5139
|
+
}
|
|
5126
5140
|
interface AuthIdentity {
|
|
5127
5141
|
id: string;
|
|
5128
5142
|
email: string | null;
|
|
@@ -5195,6 +5209,14 @@ interface VerifyOtpPayload {
|
|
|
5195
5209
|
interface SentResult {
|
|
5196
5210
|
sent: boolean;
|
|
5197
5211
|
}
|
|
5212
|
+
/**
|
|
5213
|
+
* What change-email answers. `confirmation_binding` must accompany the
|
|
5214
|
+
* emailed confirm token (see confirmEmailChange); newer APIs refuse a confirm
|
|
5215
|
+
* without it. Absent on APIs that predate the binding.
|
|
5216
|
+
*/
|
|
5217
|
+
interface ChangeEmailResult extends SentResult {
|
|
5218
|
+
confirmation_binding?: string;
|
|
5219
|
+
}
|
|
5198
5220
|
interface VerifiedResult {
|
|
5199
5221
|
verified: boolean;
|
|
5200
5222
|
}
|
|
@@ -5228,14 +5250,20 @@ declare class AuthApi {
|
|
|
5228
5250
|
private tenantPath;
|
|
5229
5251
|
private auth;
|
|
5230
5252
|
/** Never returns tokens: a new email and an existing one respond identically. */
|
|
5231
|
-
register(payload: RegisterPayload): Promise<ApiResponse<
|
|
5253
|
+
register(payload: RegisterPayload): Promise<ApiResponse<RegisterResult>>;
|
|
5232
5254
|
login(payload: LoginPayload): Promise<ApiResponse<AuthResult>>;
|
|
5233
5255
|
refresh(refresh_token: string): Promise<ApiResponse<AuthResult>>;
|
|
5234
|
-
|
|
5256
|
+
/**
|
|
5257
|
+
* `binding` is the register response's `verification_binding`, when this
|
|
5258
|
+
* client still has it. Omitted, the address is verified but the password
|
|
5259
|
+
* set at registration is dropped.
|
|
5260
|
+
*/
|
|
5261
|
+
verifyEmail(token: string, binding?: string): Promise<ApiResponse<VerifiedResult>>;
|
|
5235
5262
|
resendVerification(email: string): Promise<ApiResponse<SentResult>>;
|
|
5236
5263
|
forgotPassword(email: string): Promise<ApiResponse<SentResult>>;
|
|
5237
5264
|
resetPassword(payload: ResetPasswordPayload): Promise<ApiResponse<ResetResult>>;
|
|
5238
|
-
|
|
5265
|
+
/** `binding` is the change-email response's `confirmation_binding`. */
|
|
5266
|
+
confirmEmailChange(token: string, binding?: string): Promise<ApiResponse<ChangedResult>>;
|
|
5239
5267
|
requestOtp(email: string): Promise<ApiResponse<SentResult>>;
|
|
5240
5268
|
verifyOtp(payload: VerifyOtpPayload): Promise<ApiResponse<AuthResult>>;
|
|
5241
5269
|
anonymous(): Promise<ApiResponse<AuthResult>>;
|
|
@@ -5247,7 +5275,7 @@ declare class AuthApi {
|
|
|
5247
5275
|
logout(access_token: string, refresh_token: string): Promise<ApiResponse<unknown>>;
|
|
5248
5276
|
logoutAll(access_token: string): Promise<ApiResponse<unknown>>;
|
|
5249
5277
|
changePassword(access_token: string, payload: ChangePasswordPayload): Promise<ApiResponse<unknown>>;
|
|
5250
|
-
changeEmail(access_token: string, payload: ChangeEmailPayload): Promise<ApiResponse<
|
|
5278
|
+
changeEmail(access_token: string, payload: ChangeEmailPayload): Promise<ApiResponse<ChangeEmailResult>>;
|
|
5251
5279
|
}
|
|
5252
5280
|
|
|
5253
5281
|
/**
|
|
@@ -5313,4 +5341,4 @@ declare function createEcomwebSdk(options: EcomwebSdkOptions): {
|
|
|
5313
5341
|
};
|
|
5314
5342
|
type EcomwebSdk = ReturnType<typeof createEcomwebSdk>;
|
|
5315
5343
|
|
|
5316
|
-
export { ADJUSTABLE_STATES, ADMIN_ORDER_SOURCES, type AddToCartRequest, type Address, AddressesApi, type AdjustQuantitiesRequest, type AdjustableState, type AdminOrderSource, ApiClientError, type ApiError, type ApiResponse, type AppliedPromotion, type AttributeLink, AuthApi, type AuthErrorCode, type AuthIdentity, type AuthResult, type AuthTokens, type AutocompleteParams, type BankAccount, type BaseDeleteOptions, type BaseDeleteResult, type BaseQueryParams, type BatchOrderReviewInvitationsResult, BlogApi, type BlogCategory, type BlogCategoryQueryParams, type BlogComment, type BlogCommentWithReplies, type BlogPost, type BlogPostCategory, type BlogPostQueryParams, type BlogPostStatus, type BlogPostTag, type BlogPostWithRelations, type BlogSearchParams, type BlogSearchResponse, type BlogSettings, type BlogTag, type BlogTagQueryParams, COLLECTION_RULE_MATRIX, CONDITION_TYPE_LABELS, CartApi, type CartApiItem, type CartApiResponse, CategoriesApi, type Category, type CategoryQueryParams, type CategorySearchResponse, type CategoryTree, type CategoryWithChildren, type ChangeEmailPayload, type ChangePasswordPayload, type ChangedResult, type Collection, type CollectionQueryParams, type CollectionRule, type CollectionRuleSet, type CollectionRuleSetCriteria, type CollectionSearchCriteria, CollectionsApi, ConditionType, ConditionTypeSchema, type ConditionTypeType, type ContentPage, ContentPagesApi, type CreateAddressDto, type CreateBlogCategory, type CreateBlogComment, type CreateBlogPost, type CreateBlogSettings, type CreateBlogTag, type CreateCategory, type CreateContentPage, type CreateEmbeddedScript, type CreateOrder, type CreateOrderItem, type CreateOrderItemRequest, type CreateOrderRequest, type CreateProduct, type CreateProductReview, type CreateProductReviewReply, type CreateProductVariant, type CreatePromotion, CreatePromotionSchema, type CreateStore, type CreateStoreConfig, type CreateStoreSettings, type CreateVariantOption, type CreateVariantOptionValue, type CurrentIdentity, type Customer, type CustomerAccess, type CustomerOrderFilter, type CustomerOrderSummary, CustomersApi, DEFAULT_BUCKET, DISCOUNT_METHOD_LABELS, type DeleteApiFunction, type DeletedAt, DiscountMethod, DiscountMethodSchema, type DiscountMethodType, EMAIL_COLOR_PATTERN, EMAIL_PALETTE_DEFAULTS, ENTRY_HANDLE_PATTERN, type EcomwebSdk, type EcomwebSdkOptions, type EmbeddedScript, type EmbeddedScriptPlacement, type EngineResult, FILTERABLE_TYPES, type FileKind, type FulfillmentStatus, type GoogleAuthUrl, type GuestOrderLookupParams, type IHttpClient, INVENTORY_ADJUSTMENT_REASONS, INVENTORY_ERROR_CODES, INVENTORY_POLICIES, INVENTORY_STATES, INVENTORY_STATUS_LABELS, type Id, type ImageFormat, type ImageTransformOptions, type InitiatePaymentResult, type InsufficientInventoryItem, type IntegrationStatus, type InventoryActor, type InventoryAdjustmentReason, type InventoryErrorCode, type InventoryHistoryEntry, type InventoryImportResponse, type InventoryLevelRow, type InventoryLocation, type InventoryPolicy, type InventoryQuantities, type InventoryState, InventoryStatus, KNOWN_PAYMENT_METHODS, LEGACY_STATUS_MIGRATION_MAP, LEVEL_PROVINCE, LEVEL_WARD, type LegacyOrderStatus, type LegacyProductStatus, type LinkValue, type LocationArea, type LocationAreaQuery, type LocationAreasResponse, type LoginPayload, MAX_RULES_PER_SET, MAX_RULE_VALUE_ENTRIES, MEASUREMENT_UNITS, MEDIA_TYPES, MERCHANT_ADJUSTMENT_REASONS, METAFIELD_BASE_TYPES, METAFIELD_KEY_PATTERN, METAFIELD_LIMITS, METAFIELD_OWNER_TYPES, METAFIELD_TYPE_GROUPS, METAOBJECT_REFERENCE_TYPES, METAOBJECT_TYPE_PATTERN, type MeasurementType, type MeasurementValue, MemoryTokenStorage, MenusApi, type MerchantAdjustmentReason, type MessageOutboxStatus, type MetafieldBaseType, type MetafieldBound, type MetafieldContext, type MetafieldDefinitionShape, type MetafieldIssue, type MetafieldIssueCode, type MetafieldListType, type MetafieldOwnerType, type MetafieldType, type MetafieldTypeGroup, type MetafieldValidationKey, type MetafieldValidations, type MetafieldWrite, type MetaobjectDefinitionShape, type MetaobjectFieldShape, type MetaobjectListParams, type MetaobjectListResult, MetaobjectsApi, type MoneyValue, type MoveQuantitiesRequest, type MutationApiFunction, OBJECT_PREFIX, ORDER_ACTOR_TYPES, ORDER_EVENT_TYPES, ORDER_SHIPMENT_ERROR_CODES, ORDER_SOURCES, type OptionalTimestamp, type Order, type OrderActorType, type OrderCommentMutationResult, type OrderCreatedBy, type OrderEventType, type OrderItem, type PaymentMethod$1 as OrderPaymentMethod, type OrderReviewInvitationSummary, type OrderShipmentEvent, type OrderShipmentSummary, type OrderSource, type OrderStatus, type OrderTimelineActor, type OrderTimelineComment, type OrderTimelineCommentAuthor, type OrderTimelineEntry, type OrderTimelineEvent, type OrderTimelineResponse, type OrderWithItems, OrdersApi, PAGINATION_DEFAULTS, PRIVATE_REFERENCE_TYPES, PRODUCT_STATUS_LABELS, PROMOTION_MODE_COLORS, PROMOTION_MODE_LABELS, PROMOTION_STATUS_COLORS, PROMOTION_STATUS_LABELS, PROMOTION_TYPE_COLORS, PROMOTION_TYPE_LABELS, type PaginatedApiFunction, type PaginatedPromotionsResponse, PaginatedPromotionsResponseSchema, type PaginatedResponse, type PaginatedReviewsResponse, type PaginationMeta, type PasswordPolicy, type PaymentCredentialStatus, type PaymentMethod$1 as PaymentMethod, PaymentMethodsApi, type PaymentStateResult, type PaymentStatus, PaymentsApi, type Product, type ProductDetail, type ProductImage, type ProductQueryParams, type ProductReview, type ProductReviewFilters, type ProductReviewReply, type ProductReviewReplyFilters, type ProductReviewStats, type ProductReviewWithReplies, type ProductSearchParams, type ProductSearchResponse, type ProductService, ProductStatus, type ProductVariant, type ProductVariantCombination, type ProductVariantCombinationEntry, type ProductVariantWithCombinations, type ProductVideo, type ProductWithReviewStats, type ProductWithVariants, ProductsApi, type Promotion, type PromotionData, PromotionMode, PromotionModeSchema, type PromotionModeType, type PromotionQueryParams, PromotionQueryParamsSchema, PromotionSchema, type PromotionStatistics, PromotionStatisticsSchema, PromotionStatus, PromotionStatusSchema, type PromotionStatusType, type PromotionSuggestion, type PromotionSuggestionsResponse, PromotionType, PromotionTypeSchema, type PromotionTypeType, type PromotionWithDiscount, PromotionWithDiscountSchema, PromotionsApi, type PublicAuthConfig, type PublishedStoreTheme, type QuantitiesResponse, RENDER_PREFIX, RESOURCE_REFERENCE_TYPES, RULE_FIELDS, type RatingValue, RedirectsApi, type RegisterPayload, type RequestOptions, type ResetPasswordPayload, type ResetResult, type ResizeMode, type ResolvedAsset, type ResolvedBlogPostRef, type ResolvedCollectionRef, type ResolvedImage, type ResolvedMetaobjectRef, type ResolvedMetaobjectStub, type ResolvedPageRef, type ResolvedProductRef, type ResolvedVariantRef, type ReviewInvitationPublicData, type ReviewStatus, ReviewsApi, type RichTextBlock, type RichTextHeading, type RichTextInline, type RichTextLink, type RichTextList, type RichTextListItem, type RichTextNode, type RichTextParagraph, type RichTextRoot, type RichTextText, type RuleField, type RuleFieldSpec, type RuleOperator, type RuleOperatorSpec, type RuleValueKind, SHIPMENT_STATUSES, SHIPPING_CONDITION_TYPES, SHIPPING_DELIVERY_TYPES, SHIPPING_ERROR_CODES, SHIPPING_RATE_TYPES, SearchApi, type SearchCategory, type SearchProduct, type SentResult, type SeoMetadata$3 as SeoMetadata, type ServerComputedOrderAmounts, type SetQuantitiesRequest, type SetQuantitiesResponse, type ShipmentStatus, ShippingApi, type ShippingCalculationRequest, type ShippingConditionType, type ShippingDeliveryType, type ShippingOption, type ShippingQuoteChangedDetails, type ShippingRate, type ShippingRateType, type ShippingStatus, type ShippingZone, type SingleEntityApiFunction, type StaleQuantity, type Store, type StoreByDomainInfo, type StoreConfig, type StoreConfigurationInfo, type StoreEmailBrandingSettings, type StoreMenu, type StoreMenuItem, type PaymentMethod as StorePaymentMethod, type StoreSettings, type StoreStatus, type StoreWithRelations, type StorefrontMetafield, type StorefrontMetafields, type StorefrontMetaobjectEntry, StoresApi, type SubmitReviewInvitationPayload, THEME_HEX_COLOR, type ThemeDisplayItem, type ThemeMigration, type ThemeMigrationReport, type ThemeMigrationStep, type ThemeSchema, type ThemeSchemaGroup, type ThemeSchemaItem, type ThemeSetting, type ThemeSettingType, type ThemeSettingsOf, type ThemeValue, type ThemeValueError, type ThemeValues, type ThemeVisibleIf, ThemesApi, type Timestamp, type TocItem, type TokenStorage, UNAVAILABLE_STATES, type UnavailableState, type UpdateAddressDto, type UpdateBlogCategory, type UpdateBlogComment, type UpdateBlogPost, type UpdateBlogSettings, type UpdateBlogTag, type UpdateCartItemRequest, type UpdateCategory, type UpdateContentPage, type UpdateEmbeddedScript, type UpdateOrder, type UpdateOrderItem, type UpdateProduct, type UpdateProductReview, type UpdateProductReviewReply, type UpdateProductVariant, type UpdatePromotion, UpdatePromotionSchema, type UpdateStore, type UpdateStoreConfig, type UpdateStoreSettings, type UpdateVariantOption, type UpdateVariantOptionValue, type UpsertCustomerForAuthPayload, type UrlRedirect, VALIDATION_KEYS, type ValidatePromotionCodeRequest, type ValidatePromotionCodeResponse, type VariantOption, type VariantOptionValue, type VariantStatus, type VerifiedResult, type VerifyOtpPayload, type WithMetafields, type WithSeoMetadata$3 as WithSeoMetadata, allowedCustomerAccess, allowedFileKinds, allowedValuesFor, appliedPromotionSchema, applyThemeMigration, assetBaseUrl, attributeLinkSchema, attributeLinkValueSchema, baseDeleteOptionsSchema, baseDeleteResultSchema, baseQueryParamsSchema, baseTypeOf, blogCategorySchema, blogCommentSchema, blogCommentWithRepliesSchema, blogPostCategorySchema, blogPostSchema, blogPostStatusSchema, blogPostTagSchema, blogPostWithRelationsSchema, blogSettingsSchema, blogTagSchema, buildTransformQuery, categorySchema, categoryTreeSchema, categoryWithChildrenSchema, checkMetaobjectFieldChanges, colorSchema, compareDecimal, contentPageSchema, createAuthAwareHttpClient, createBlogCategorySchema, createBlogCommentSchema, createBlogPostSchema, createBlogSettingsSchema, createBlogTagSchema, createCategorySchema, createContentPageSchema, createEcomwebSdk, createEmbeddedScriptSchema, createOrderItemSchema, createOrderSchema, createProductReviewReplySchema, createProductReviewSchema, createProductSchema, createProductVariantSchema, createStoreConfigSchema, createStoreSchema, createStoreSettingsSchema, createVariantOptionSchema, createVariantOptionValueSchema, customerOrderSummarySchema, decimalSchema, deletedAtSchema, dimensionsSchema, emailBrandingSchema, emailBrandingShape, emailSchema, embeddedScriptPlacementSchema, embeddedScriptSchema, ensureSuccess, entryDisplayName, fromObjectPublicUrlToRender, fulfillmentStatusSchema, idSchema, integrationStatusSchema, inventoryStatusSchema, isBlankValue, isBlankValueFor, isEditableStatus, isListType, isMetafieldType, isPublishableStatus, isRuleField, isSafeRegex, isSettingVisible, isUnpublishedStatus, isValidEntryHandle, jsonSchema, legacyOrderStatusSchema, legacyProductStatusSchema, legalLinksSchema, measurementInBaseUnit, messageOutboxStatusSchema, metafieldIdentifier, moneySchema, normalizeDate, normalizeDateTime, normalizeDecimal, normalizeId, onHand, operatorsForField, optionalTimestampSchema, optionalUrlSchema, orderItemSchema, orderSchema, orderStatusSchema, orderWithItemsSchema, paginatedResponseSchema, paginationMetaSchema, paginationSchema, parseMetafieldIdentifier, parseStorageUrl, parseThemeMigration, parseThemeSchema, paymentMethodSchema, paymentStatusSchema, phoneSchema, positionOrderSchema, productReviewFiltersSchema, productReviewReplyFiltersSchema, productReviewReplySchema, productReviewSchema, productReviewStatsSchema, productReviewWithRepliesSchema, productSchema, productStatusSchema, productVariantCombinationEntrySchema, productVariantCombinationSchema, productVariantSchema, productVariantWithCombinationsSchema, productWithReviewStatsSchema, productWithVariantsAndReviewStatsSchema, productWithVariantsSchema, resolveAssetUrl, resolveThemeSettings, reviewStatusSchema, rewriteSupabaseUrl, richTextLength, safeParseBaseQueryParams, safeParsePaginationMeta, shippingStatusSchema, slugSchema, sortOrderSchema, storeConfigSchema, storeIdSchema, storeSchema, storeSettingsSchema, storeStatusSchema, storeWithRelationsSchema, storefrontAccessAllowed, strictUrlSchema, themeDefaults, themeMajor, themeMigrationSchema, themeSchemaSchema, themeSettings, timestampSchema, toEntryHandle, toMetafieldKey, toObjectUrl, toRenderUrl, tocItemSchema, transformationsEnabled, unavailable, unwrap, unwrapOrNull, updateBlogCategorySchema, updateBlogCommentSchema, updateBlogPostSchema, updateBlogSettingsSchema, updateBlogTagSchema, updateCategorySchema, updateContentPageSchema, updateEmbeddedScriptSchema, updateOrderItemSchema, updateOrderSchema, updateProductReviewReplySchema, updateProductReviewSchema, updateProductSchema, updateProductVariantSchema, updateStoreConfigSchema, updateStoreSchema, updateStoreSettingsSchema, updateVariantOptionSchema, updateVariantOptionValueSchema, urlSchema, uuidSchema, validateMetafieldDefinition, validateMetafieldValue, validateMetaobjectDefinition, validateMetaobjectEntry, validatePaginationMeta, validateRichText, validateThemeValues, validateValidations, valueKindFor, variantOptionSchema, variantOptionValueSchema, variantStatusSchema };
|
|
5344
|
+
export { ADJUSTABLE_STATES, ADMIN_ORDER_SOURCES, type AddToCartRequest, type Address, AddressesApi, type AdjustQuantitiesRequest, type AdjustableState, type AdminOrderSource, ApiClientError, type ApiError, type ApiResponse, type AppliedPromotion, type AttributeLink, AuthApi, type AuthErrorCode, type AuthIdentity, type AuthResult, type AuthTokens, type AutocompleteParams, type BankAccount, type BaseDeleteOptions, type BaseDeleteResult, type BaseQueryParams, type BatchOrderReviewInvitationsResult, BlogApi, type BlogCategory, type BlogCategoryQueryParams, type BlogComment, type BlogCommentWithReplies, type BlogPost, type BlogPostCategory, type BlogPostQueryParams, type BlogPostStatus, type BlogPostTag, type BlogPostWithRelations, type BlogSearchParams, type BlogSearchResponse, type BlogSettings, type BlogTag, type BlogTagQueryParams, COLLECTION_RULE_MATRIX, CONDITION_TYPE_LABELS, CartApi, type CartApiItem, type CartApiResponse, CategoriesApi, type Category, type CategoryQueryParams, type CategorySearchResponse, type CategoryTree, type CategoryWithChildren, type ChangeEmailPayload, type ChangeEmailResult, type ChangePasswordPayload, type ChangedResult, type Collection, type CollectionQueryParams, type CollectionRule, type CollectionRuleSet, type CollectionRuleSetCriteria, type CollectionSearchCriteria, CollectionsApi, ConditionType, ConditionTypeSchema, type ConditionTypeType, type ContentPage, ContentPagesApi, type CreateAddressDto, type CreateBlogCategory, type CreateBlogComment, type CreateBlogPost, type CreateBlogSettings, type CreateBlogTag, type CreateCategory, type CreateContentPage, type CreateEmbeddedScript, type CreateOrder, type CreateOrderItem, type CreateOrderItemRequest, type CreateOrderRequest, type CreateProduct, type CreateProductReview, type CreateProductReviewReply, type CreateProductVariant, type CreatePromotion, CreatePromotionSchema, type CreateStore, type CreateStoreConfig, type CreateStoreSettings, type CreateVariantOption, type CreateVariantOptionValue, type CurrentIdentity, type Customer, type CustomerAccess, type CustomerOrderFilter, type CustomerOrderSummary, CustomersApi, DEFAULT_BUCKET, DISCOUNT_METHOD_LABELS, type DeleteApiFunction, type DeletedAt, DiscountMethod, DiscountMethodSchema, type DiscountMethodType, EMAIL_COLOR_PATTERN, EMAIL_PALETTE_DEFAULTS, ENTRY_HANDLE_PATTERN, type EcomwebSdk, type EcomwebSdkOptions, type EmbeddedScript, type EmbeddedScriptPlacement, type EngineResult, FILTERABLE_TYPES, type FileKind, type FulfillmentStatus, type GoogleAuthUrl, type GuestOrderLookupParams, type IHttpClient, INVENTORY_ADJUSTMENT_REASONS, INVENTORY_ERROR_CODES, INVENTORY_POLICIES, INVENTORY_STATES, INVENTORY_STATUS_LABELS, type Id, type ImageFormat, type ImageTransformOptions, type InitiatePaymentResult, type InsufficientInventoryItem, type IntegrationStatus, type InventoryActor, type InventoryAdjustmentReason, type InventoryErrorCode, type InventoryHistoryEntry, type InventoryImportResponse, type InventoryLevelRow, type InventoryLocation, type InventoryPolicy, type InventoryQuantities, type InventoryState, InventoryStatus, KNOWN_PAYMENT_METHODS, LEGACY_STATUS_MIGRATION_MAP, LEVEL_PROVINCE, LEVEL_WARD, type LegacyOrderStatus, type LegacyProductStatus, type LinkValue, type LocationArea, type LocationAreaQuery, type LocationAreasResponse, type LoginPayload, MAX_RULES_PER_SET, MAX_RULE_VALUE_ENTRIES, MEASUREMENT_UNITS, MEDIA_TYPES, MERCHANT_ADJUSTMENT_REASONS, METAFIELD_BASE_TYPES, METAFIELD_KEY_PATTERN, METAFIELD_LIMITS, METAFIELD_OWNER_TYPES, METAFIELD_TYPE_GROUPS, METAOBJECT_REFERENCE_TYPES, METAOBJECT_TYPE_PATTERN, type MeasurementType, type MeasurementValue, MemoryTokenStorage, MenusApi, type MerchantAdjustmentReason, type MessageOutboxStatus, type MetafieldBaseType, type MetafieldBound, type MetafieldContext, type MetafieldDefinitionShape, type MetafieldIssue, type MetafieldIssueCode, type MetafieldListType, type MetafieldOwnerType, type MetafieldType, type MetafieldTypeGroup, type MetafieldValidationKey, type MetafieldValidations, type MetafieldWrite, type MetaobjectDefinitionShape, type MetaobjectFieldShape, type MetaobjectListParams, type MetaobjectListResult, MetaobjectsApi, type MoneyValue, type MoveQuantitiesRequest, type MutationApiFunction, OBJECT_PREFIX, ORDER_ACTOR_TYPES, ORDER_EVENT_TYPES, ORDER_SHIPMENT_ERROR_CODES, ORDER_SOURCES, type OptionalTimestamp, type Order, type OrderActorType, type OrderCommentMutationResult, type OrderCreatedBy, type OrderEventType, type OrderItem, type PaymentMethod$1 as OrderPaymentMethod, type OrderReviewInvitationSummary, type OrderShipmentEvent, type OrderShipmentSummary, type OrderSource, type OrderStatus, type OrderTimelineActor, type OrderTimelineComment, type OrderTimelineCommentAuthor, type OrderTimelineEntry, type OrderTimelineEvent, type OrderTimelineResponse, type OrderWithItems, OrdersApi, PAGINATION_DEFAULTS, PRIVATE_REFERENCE_TYPES, PRODUCT_STATUS_LABELS, PROMOTION_MODE_COLORS, PROMOTION_MODE_LABELS, PROMOTION_STATUS_COLORS, PROMOTION_STATUS_LABELS, PROMOTION_TYPE_COLORS, PROMOTION_TYPE_LABELS, type PaginatedApiFunction, type PaginatedPromotionsResponse, PaginatedPromotionsResponseSchema, type PaginatedResponse, type PaginatedReviewsResponse, type PaginationMeta, type PasswordPolicy, type PaymentCredentialStatus, type PaymentMethod$1 as PaymentMethod, PaymentMethodsApi, type PaymentStateResult, type PaymentStatus, PaymentsApi, type Product, type ProductDetail, type ProductImage, type ProductQueryParams, type ProductReview, type ProductReviewFilters, type ProductReviewReply, type ProductReviewReplyFilters, type ProductReviewStats, type ProductReviewWithReplies, type ProductSearchParams, type ProductSearchResponse, type ProductService, ProductStatus, type ProductVariant, type ProductVariantCombination, type ProductVariantCombinationEntry, type ProductVariantWithCombinations, type ProductVideo, type ProductWithReviewStats, type ProductWithVariants, ProductsApi, type Promotion, type PromotionData, PromotionMode, PromotionModeSchema, type PromotionModeType, type PromotionQueryParams, PromotionQueryParamsSchema, PromotionSchema, type PromotionStatistics, PromotionStatisticsSchema, PromotionStatus, PromotionStatusSchema, type PromotionStatusType, type PromotionSuggestion, type PromotionSuggestionsResponse, PromotionType, PromotionTypeSchema, type PromotionTypeType, type PromotionWithDiscount, PromotionWithDiscountSchema, PromotionsApi, type PublicAuthConfig, type PublishedStoreTheme, type QuantitiesResponse, RENDER_PREFIX, RESOURCE_REFERENCE_TYPES, RULE_FIELDS, type RatingValue, RedirectsApi, type RegisterPayload, type RegisterResult, type RequestOptions, type ResetPasswordPayload, type ResetResult, type ResizeMode, type ResolvedAsset, type ResolvedBlogPostRef, type ResolvedCollectionRef, type ResolvedImage, type ResolvedMetaobjectRef, type ResolvedMetaobjectStub, type ResolvedPageRef, type ResolvedProductRef, type ResolvedVariantRef, type ReviewInvitationPublicData, type ReviewStatus, ReviewsApi, type RichTextBlock, type RichTextHeading, type RichTextInline, type RichTextLink, type RichTextList, type RichTextListItem, type RichTextNode, type RichTextParagraph, type RichTextRoot, type RichTextText, type RuleField, type RuleFieldSpec, type RuleOperator, type RuleOperatorSpec, type RuleValueKind, SHIPMENT_STATUSES, SHIPPING_CONDITION_TYPES, SHIPPING_DELIVERY_TYPES, SHIPPING_ERROR_CODES, SHIPPING_RATE_TYPES, SearchApi, type SearchCategory, type SearchProduct, type SentResult, type SeoMetadata$3 as SeoMetadata, type ServerComputedOrderAmounts, type SetQuantitiesRequest, type SetQuantitiesResponse, type ShipmentStatus, ShippingApi, type ShippingCalculationRequest, type ShippingConditionType, type ShippingDeliveryType, type ShippingOption, type ShippingQuoteChangedDetails, type ShippingRate, type ShippingRateType, type ShippingStatus, type ShippingZone, type SingleEntityApiFunction, type StaleQuantity, type Store, type StoreByDomainInfo, type StoreConfig, type StoreConfigurationInfo, type StoreEmailBrandingSettings, type StoreMenu, type StoreMenuItem, type PaymentMethod as StorePaymentMethod, type StoreSettings, type StoreStatus, type StoreWithRelations, type StorefrontMetafield, type StorefrontMetafields, type StorefrontMetaobjectEntry, StoresApi, type SubmitReviewInvitationPayload, THEME_HEX_COLOR, type ThemeDisplayItem, type ThemeMigration, type ThemeMigrationReport, type ThemeMigrationStep, type ThemeSchema, type ThemeSchemaGroup, type ThemeSchemaItem, type ThemeSetting, type ThemeSettingType, type ThemeSettingsOf, type ThemeValue, type ThemeValueError, type ThemeValues, type ThemeVisibleIf, ThemesApi, type Timestamp, type TocItem, type TokenStorage, UNAVAILABLE_STATES, type UnavailableState, type UpdateAddressDto, type UpdateBlogCategory, type UpdateBlogComment, type UpdateBlogPost, type UpdateBlogSettings, type UpdateBlogTag, type UpdateCartItemRequest, type UpdateCategory, type UpdateContentPage, type UpdateEmbeddedScript, type UpdateOrder, type UpdateOrderItem, type UpdateProduct, type UpdateProductReview, type UpdateProductReviewReply, type UpdateProductVariant, type UpdatePromotion, UpdatePromotionSchema, type UpdateStore, type UpdateStoreConfig, type UpdateStoreSettings, type UpdateVariantOption, type UpdateVariantOptionValue, type UpsertCustomerForAuthPayload, type UrlRedirect, VALIDATION_KEYS, type ValidatePromotionCodeRequest, type ValidatePromotionCodeResponse, type VariantOption, type VariantOptionValue, type VariantStatus, type VerifiedResult, type VerifyOtpPayload, type WithMetafields, type WithSeoMetadata$3 as WithSeoMetadata, allowedCustomerAccess, allowedFileKinds, allowedValuesFor, appliedPromotionSchema, applyThemeMigration, assetBaseUrl, attributeLinkSchema, attributeLinkValueSchema, baseDeleteOptionsSchema, baseDeleteResultSchema, baseQueryParamsSchema, baseTypeOf, blogCategorySchema, blogCommentSchema, blogCommentWithRepliesSchema, blogPostCategorySchema, blogPostSchema, blogPostStatusSchema, blogPostTagSchema, blogPostWithRelationsSchema, blogSettingsSchema, blogTagSchema, buildTransformQuery, categorySchema, categoryTreeSchema, categoryWithChildrenSchema, checkMetaobjectFieldChanges, colorSchema, compareDecimal, contentPageSchema, createAuthAwareHttpClient, createBlogCategorySchema, createBlogCommentSchema, createBlogPostSchema, createBlogSettingsSchema, createBlogTagSchema, createCategorySchema, createContentPageSchema, createEcomwebSdk, createEmbeddedScriptSchema, createOrderItemSchema, createOrderSchema, createProductReviewReplySchema, createProductReviewSchema, createProductSchema, createProductVariantSchema, createStoreConfigSchema, createStoreSchema, createStoreSettingsSchema, createVariantOptionSchema, createVariantOptionValueSchema, customerOrderSummarySchema, decimalSchema, deletedAtSchema, dimensionsSchema, emailBrandingSchema, emailBrandingShape, emailSchema, embeddedScriptPlacementSchema, embeddedScriptSchema, ensureSuccess, entryDisplayName, fromObjectPublicUrlToRender, fulfillmentStatusSchema, idSchema, integrationStatusSchema, inventoryStatusSchema, isBlankValue, isBlankValueFor, isEditableStatus, isListType, isMetafieldType, isPublishableStatus, isRuleField, isSafeRegex, isSettingVisible, isUnpublishedStatus, isValidEntryHandle, jsonSchema, legacyOrderStatusSchema, legacyProductStatusSchema, legalLinksSchema, measurementInBaseUnit, messageOutboxStatusSchema, metafieldIdentifier, moneySchema, normalizeDate, normalizeDateTime, normalizeDecimal, normalizeId, onHand, operatorsForField, optionalTimestampSchema, optionalUrlSchema, orderItemSchema, orderSchema, orderStatusSchema, orderWithItemsSchema, paginatedResponseSchema, paginationMetaSchema, paginationSchema, parseMetafieldIdentifier, parseStorageUrl, parseThemeMigration, parseThemeSchema, paymentMethodSchema, paymentStatusSchema, phoneSchema, positionOrderSchema, productReviewFiltersSchema, productReviewReplyFiltersSchema, productReviewReplySchema, productReviewSchema, productReviewStatsSchema, productReviewWithRepliesSchema, productSchema, productStatusSchema, productVariantCombinationEntrySchema, productVariantCombinationSchema, productVariantSchema, productVariantWithCombinationsSchema, productWithReviewStatsSchema, productWithVariantsAndReviewStatsSchema, productWithVariantsSchema, resolveAssetUrl, resolveThemeSettings, reviewStatusSchema, rewriteSupabaseUrl, richTextLength, safeParseBaseQueryParams, safeParsePaginationMeta, shippingStatusSchema, slugSchema, sortOrderSchema, storeConfigSchema, storeIdSchema, storeSchema, storeSettingsSchema, storeStatusSchema, storeWithRelationsSchema, storefrontAccessAllowed, strictUrlSchema, themeDefaults, themeMajor, themeMigrationSchema, themeSchemaSchema, themeSettings, timestampSchema, toEntryHandle, toMetafieldKey, toObjectUrl, toRenderUrl, tocItemSchema, transformationsEnabled, unavailable, unwrap, unwrapOrNull, updateBlogCategorySchema, updateBlogCommentSchema, updateBlogPostSchema, updateBlogSettingsSchema, updateBlogTagSchema, updateCategorySchema, updateContentPageSchema, updateEmbeddedScriptSchema, updateOrderItemSchema, updateOrderSchema, updateProductReviewReplySchema, updateProductReviewSchema, updateProductSchema, updateProductVariantSchema, updateStoreConfigSchema, updateStoreSchema, updateStoreSettingsSchema, updateVariantOptionSchema, updateVariantOptionValueSchema, urlSchema, uuidSchema, validateMetafieldDefinition, validateMetafieldValue, validateMetaobjectDefinition, validateMetaobjectEntry, validatePaginationMeta, validateRichText, validateThemeValues, validateValidations, valueKindFor, variantOptionSchema, variantOptionValueSchema, variantStatusSchema };
|
package/dist/index.js
CHANGED
|
@@ -1159,7 +1159,8 @@ var blogCommentSchema = z12.object({
|
|
|
1159
1159
|
blog_post_id: idSchema.optional().nullable(),
|
|
1160
1160
|
parent_comment_id: idSchema.optional().nullable(),
|
|
1161
1161
|
author_name: z12.string().min(1).max(100),
|
|
1162
|
-
|
|
1162
|
+
// Optional on reads: the public comment list no longer returns it.
|
|
1163
|
+
author_email: emailSchema.optional(),
|
|
1163
1164
|
author_website: z12.url().max(255).optional().nullable(),
|
|
1164
1165
|
content: z12.string().min(1),
|
|
1165
1166
|
is_approved: z12.boolean().default(false),
|
|
@@ -1205,7 +1206,7 @@ var createBlogPostSchema = blogPostSchema.omit({
|
|
|
1205
1206
|
var createBlogCommentSchema = blogCommentSchema.omit({
|
|
1206
1207
|
id: true,
|
|
1207
1208
|
created_at: true
|
|
1208
|
-
});
|
|
1209
|
+
}).extend({ author_email: emailSchema });
|
|
1209
1210
|
var createBlogSettingsSchema = blogSettingsSchema.omit({
|
|
1210
1211
|
id: true,
|
|
1211
1212
|
created_at: true,
|
|
@@ -3610,10 +3611,15 @@ var AuthApi = class {
|
|
|
3610
3611
|
void 0
|
|
3611
3612
|
);
|
|
3612
3613
|
}
|
|
3613
|
-
|
|
3614
|
+
/**
|
|
3615
|
+
* `binding` is the register response's `verification_binding`, when this
|
|
3616
|
+
* client still has it. Omitted, the address is verified but the password
|
|
3617
|
+
* set at registration is dropped.
|
|
3618
|
+
*/
|
|
3619
|
+
async verifyEmail(token, binding) {
|
|
3614
3620
|
return this.http.post(
|
|
3615
3621
|
this.publicPath("verify-email"),
|
|
3616
|
-
{ token },
|
|
3622
|
+
binding ? { token, binding } : { token },
|
|
3617
3623
|
void 0
|
|
3618
3624
|
);
|
|
3619
3625
|
}
|
|
@@ -3638,10 +3644,11 @@ var AuthApi = class {
|
|
|
3638
3644
|
void 0
|
|
3639
3645
|
);
|
|
3640
3646
|
}
|
|
3641
|
-
|
|
3647
|
+
/** `binding` is the change-email response's `confirmation_binding`. */
|
|
3648
|
+
async confirmEmailChange(token, binding) {
|
|
3642
3649
|
return this.http.post(
|
|
3643
3650
|
this.publicPath("change-email/confirm"),
|
|
3644
|
-
{ token },
|
|
3651
|
+
binding ? { token, binding } : { token },
|
|
3645
3652
|
void 0
|
|
3646
3653
|
);
|
|
3647
3654
|
}
|