@lonca/trendyol 0.11.2 → 0.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +9 -17
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +3 -18
- package/dist/index.js.map +1 -1
- package/dist/testing.cjs +1 -17
- package/dist/testing.cjs.map +1 -1
- package/dist/testing.js +2 -18
- package/dist/testing.js.map +1 -1
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -2,6 +2,7 @@ import { aT as ShipmentPackage, a3 as KnownShipmentPackageStatus } from './clien
|
|
|
2
2
|
export { A as ApproveClaimLineItemsInput, a as ApprovedProductStatus, B as BarcodeCategoryLookup, b as BatchAcceptedResponse, c as BatchPollOptions, d as BatchRequestItemResult, e as BatchRequestResult, f as BatchRequestStatus, g as Brand, h as BrandsResource, i as BuyboxInfo, C as CancelPackageItemInput, j as CareInstruction, k as CargoInvoiceItem, l as CategoriesResource, m as Category, n as CategoryAttribute, o as CategoryAttributeValue, p as City, q as Claim, r as ClaimIssueReason, s as ClaimItemAudit, t as ClaimItemStatus, u as ClaimsResource, v as CommonLabel, w as CommonLabelEntry, x as CompensationItemDetail, y as CompensationTicket, z as CompensationTicketState, D as Country, E as CreateClaimInput, F as CreateClaimIssueInput, G as CreateClaimItemInput, H as CreateClientOptions, I as CreateCommonLabelInput, J as CreateProductV2Input, K as CreateTestOrderInput, L as CreateVideoInput, M as DeleteInvoiceLinkInput, N as DeliveryOptionInput, O as District, P as ExportBatchAcceptedResponse, Q as ExportBatchStatus, R as ExportCategoryAttribute, S as ExportCenterResource, T as ExportPackage, U as ExportPackageItem, V as ExportPackageStatus, W as ExportPriceUpdateInput, X as ExportProduct, Y as ExportProductInput, Z as ExportStockUpdateInput, _ as FinanceResource, $ as FinancialTransaction, a0 as GetExportPackageItemsParams, a1 as InventoryResource, a2 as InvoicesResource, a4 as LabelsResource, a5 as LaborCostInput, a6 as ListCategoryAttributeValuesParams, a7 as ListClaimsParams, a8 as ListCompensationTicketsParams, a9 as ListExportPackagesV2Params, aa as ListExportPackagesV3Params, ab as ListExportProductsParams, ac as ListFinanceParams, ad as ListInventoryAndPriceParams, ae as ListOrdersParams, af as ListOrdersStreamParams, ag as ListProductsParams, ah as ListQuestionsParams, ai as ListUnapprovedProductsParams, aj as ListVideosParams, ak as LocationsResource, al as NamedRef, am as Neighborhood, an as OrderAddress, ao as OrderAddressLines, ap as OrderCustomer, aq as OrderLine, ar as OrderLineDiscountDetail, as as OrdersResource, at as OtherFinancialRow, au as PackageDetail, av as PackageHistoryEntry, aw as PackageLineUpdate, ax as PriceInventoryUpdate, ay as ProcessAlternativeDeliveryInput, az as Product, aA as ProductAttribute, aB as ProductAttributeV2Input, aC as ProductBase, aD as ProductComposition, aE as ProductImageInput, aF as ProductOrigin, aG as ProductStockPrice, aH as ProductStockPriceVariant, aI as ProductVariant, aJ as ProductsResource, aK as QuantitySplit, aL as Question, aM as QuestionAnswer, aN as QuestionStatus, aO as QuestionsResource, aP as SellerIntegrationStatus, aQ as SellerVideo, aR as SendInvoiceLinkInput, aS as SettlementRow, aU as ShipmentPackageStatus, aV as SplitGroup, aW as SplitPackagePlan, aX as SupplierAddress, aY as SupplierAddressType, aZ as SuppliersResource, a_ as SuppliersResourceOptions, a$ as TestOrderStatus, b0 as TestOrdersResource, b1 as TrendyolCapabilities, b2 as TrendyolCargoProvider, b3 as TrendyolClient, b4 as TrendyolEnvironment, b5 as UnapprovedDateQueryType, b6 as UnapprovedProduct, b7 as UnapprovedProductRejectReason, b8 as UnapprovedProductStatus, b9 as UpdateBoxInfoInput, ba as UpdateContentInput, bb as UpdateDeliveryInfoInput, bc as UpdatePackageStatusInput, bd as UpdatePriceInventoryResponse, be as UpdateUnapprovedInput, bf as UpdateVariantInput, bg as UploadInvoiceFileInput, bh as VideosResource, bi as Webhook, bj as WebhookAuthenticationType, bk as WebhookInput, bl as WebhooksResource, bm as createTrendyolClient, bn as normalizeShipmentPackage, bo as pollBatchStatus, bp as trendyolCapabilities } from './client-BJjLOn4v.cjs';
|
|
3
3
|
import * as _lonca_core from '@lonca/core';
|
|
4
4
|
import { NormalizedOrderStatus } from '@lonca/core';
|
|
5
|
+
export { CursorPage, CursorPaginationParams, OffsetPage, OffsetPaginationParams, paginate, paginateOffset } from '@lonca/core';
|
|
5
6
|
|
|
6
7
|
/**
|
|
7
8
|
* Inbound webhook event payloads — what Trendyol POSTs to YOUR endpoint
|
package/dist/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { aT as ShipmentPackage, a3 as KnownShipmentPackageStatus } from './clien
|
|
|
2
2
|
export { A as ApproveClaimLineItemsInput, a as ApprovedProductStatus, B as BarcodeCategoryLookup, b as BatchAcceptedResponse, c as BatchPollOptions, d as BatchRequestItemResult, e as BatchRequestResult, f as BatchRequestStatus, g as Brand, h as BrandsResource, i as BuyboxInfo, C as CancelPackageItemInput, j as CareInstruction, k as CargoInvoiceItem, l as CategoriesResource, m as Category, n as CategoryAttribute, o as CategoryAttributeValue, p as City, q as Claim, r as ClaimIssueReason, s as ClaimItemAudit, t as ClaimItemStatus, u as ClaimsResource, v as CommonLabel, w as CommonLabelEntry, x as CompensationItemDetail, y as CompensationTicket, z as CompensationTicketState, D as Country, E as CreateClaimInput, F as CreateClaimIssueInput, G as CreateClaimItemInput, H as CreateClientOptions, I as CreateCommonLabelInput, J as CreateProductV2Input, K as CreateTestOrderInput, L as CreateVideoInput, M as DeleteInvoiceLinkInput, N as DeliveryOptionInput, O as District, P as ExportBatchAcceptedResponse, Q as ExportBatchStatus, R as ExportCategoryAttribute, S as ExportCenterResource, T as ExportPackage, U as ExportPackageItem, V as ExportPackageStatus, W as ExportPriceUpdateInput, X as ExportProduct, Y as ExportProductInput, Z as ExportStockUpdateInput, _ as FinanceResource, $ as FinancialTransaction, a0 as GetExportPackageItemsParams, a1 as InventoryResource, a2 as InvoicesResource, a4 as LabelsResource, a5 as LaborCostInput, a6 as ListCategoryAttributeValuesParams, a7 as ListClaimsParams, a8 as ListCompensationTicketsParams, a9 as ListExportPackagesV2Params, aa as ListExportPackagesV3Params, ab as ListExportProductsParams, ac as ListFinanceParams, ad as ListInventoryAndPriceParams, ae as ListOrdersParams, af as ListOrdersStreamParams, ag as ListProductsParams, ah as ListQuestionsParams, ai as ListUnapprovedProductsParams, aj as ListVideosParams, ak as LocationsResource, al as NamedRef, am as Neighborhood, an as OrderAddress, ao as OrderAddressLines, ap as OrderCustomer, aq as OrderLine, ar as OrderLineDiscountDetail, as as OrdersResource, at as OtherFinancialRow, au as PackageDetail, av as PackageHistoryEntry, aw as PackageLineUpdate, ax as PriceInventoryUpdate, ay as ProcessAlternativeDeliveryInput, az as Product, aA as ProductAttribute, aB as ProductAttributeV2Input, aC as ProductBase, aD as ProductComposition, aE as ProductImageInput, aF as ProductOrigin, aG as ProductStockPrice, aH as ProductStockPriceVariant, aI as ProductVariant, aJ as ProductsResource, aK as QuantitySplit, aL as Question, aM as QuestionAnswer, aN as QuestionStatus, aO as QuestionsResource, aP as SellerIntegrationStatus, aQ as SellerVideo, aR as SendInvoiceLinkInput, aS as SettlementRow, aU as ShipmentPackageStatus, aV as SplitGroup, aW as SplitPackagePlan, aX as SupplierAddress, aY as SupplierAddressType, aZ as SuppliersResource, a_ as SuppliersResourceOptions, a$ as TestOrderStatus, b0 as TestOrdersResource, b1 as TrendyolCapabilities, b2 as TrendyolCargoProvider, b3 as TrendyolClient, b4 as TrendyolEnvironment, b5 as UnapprovedDateQueryType, b6 as UnapprovedProduct, b7 as UnapprovedProductRejectReason, b8 as UnapprovedProductStatus, b9 as UpdateBoxInfoInput, ba as UpdateContentInput, bb as UpdateDeliveryInfoInput, bc as UpdatePackageStatusInput, bd as UpdatePriceInventoryResponse, be as UpdateUnapprovedInput, bf as UpdateVariantInput, bg as UploadInvoiceFileInput, bh as VideosResource, bi as Webhook, bj as WebhookAuthenticationType, bk as WebhookInput, bl as WebhooksResource, bm as createTrendyolClient, bn as normalizeShipmentPackage, bo as pollBatchStatus, bp as trendyolCapabilities } from './client-BJjLOn4v.js';
|
|
3
3
|
import * as _lonca_core from '@lonca/core';
|
|
4
4
|
import { NormalizedOrderStatus } from '@lonca/core';
|
|
5
|
+
export { CursorPage, CursorPaginationParams, OffsetPage, OffsetPaginationParams, paginate, paginateOffset } from '@lonca/core';
|
|
5
6
|
|
|
6
7
|
/**
|
|
7
8
|
* Inbound webhook event payloads — what Trendyol POSTs to YOUR endpoint
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { createStatusNormalizer, TokenBucketRateLimiter, ValidationError, TimeoutError, ServerError, createRequester, LoncaError, RateLimitError, NotFoundError, AuthError } from '@lonca/core';
|
|
1
|
+
import { createStatusNormalizer, TokenBucketRateLimiter, ValidationError, TimeoutError, ServerError, createRequester, LoncaError, RateLimitError, NotFoundError, AuthError, normalizeIssueEntries } from '@lonca/core';
|
|
2
|
+
export { paginate, paginateOffset } from '@lonca/core';
|
|
2
3
|
|
|
3
4
|
// src/resources/brands.ts
|
|
4
5
|
var DEFAULT_PAGE_SIZE = 1e3;
|
|
@@ -2753,23 +2754,7 @@ function mapHttpError(status, body, retryAfterMs) {
|
|
|
2753
2754
|
}
|
|
2754
2755
|
function normalizeErrorIssues(body) {
|
|
2755
2756
|
const errors = extractErrorsArray(body);
|
|
2756
|
-
|
|
2757
|
-
const issues = [];
|
|
2758
|
-
for (const entry of errors) {
|
|
2759
|
-
if (typeof entry === "string") {
|
|
2760
|
-
issues.push({ message: entry });
|
|
2761
|
-
continue;
|
|
2762
|
-
}
|
|
2763
|
-
if (entry && typeof entry === "object") {
|
|
2764
|
-
const e = entry;
|
|
2765
|
-
if (typeof e.message !== "string") continue;
|
|
2766
|
-
const issue = { message: e.message };
|
|
2767
|
-
if (typeof e.field === "string") issue.field = e.field;
|
|
2768
|
-
if (typeof e.code === "string") issue.code = e.code;
|
|
2769
|
-
issues.push(issue);
|
|
2770
|
-
}
|
|
2771
|
-
}
|
|
2772
|
-
return issues;
|
|
2757
|
+
return errors ? normalizeIssueEntries(errors) : [];
|
|
2773
2758
|
}
|
|
2774
2759
|
function extractErrorsArray(body) {
|
|
2775
2760
|
if (!body || typeof body !== "object") return void 0;
|