@lonca/trendyol 0.13.0 → 0.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -1,8 +1,8 @@
1
- import { aT as ShipmentPackage, a3 as KnownShipmentPackageStatus } from './client-DMndJSb0.cjs';
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-DMndJSb0.cjs';
1
+ import { aU as ShipmentPackage, a3 as KnownShipmentPackageStatus } from './client-CtygosAW.cjs';
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 ProductContentBase, aF as ProductImageInput, aG as ProductOrigin, aH as ProductStockPrice, aI as ProductStockPriceVariant, aJ as ProductVariant, aK as ProductsResource, aL as QuantitySplit, aM as Question, aN as QuestionAnswer, aO as QuestionStatus, aP as QuestionsResource, aQ as SellerIntegrationStatus, aR as SellerVideo, aS as SendInvoiceLinkInput, aT as SettlementRow, aV as ShipmentPackageStatus, aW as SplitGroup, aX as SplitPackagePlan, aY as SupplierAddress, aZ as SupplierAddressType, a_ as SuppliersResource, a$ as SuppliersResourceOptions, b0 as TestOrderStatus, b1 as TestOrdersResource, b2 as TrendyolCapabilities, b3 as TrendyolCargoProvider, b4 as TrendyolClient, b5 as TrendyolEnvironment, b6 as UnapprovedDateQueryType, b7 as UnapprovedProduct, b8 as UnapprovedProductRejectReason, b9 as UnapprovedProductStatus, ba as UpdateBoxInfoInput, bb as UpdateContentInput, bc as UpdateDeliveryInfoInput, bd as UpdatePackageStatusInput, be as UpdatePriceInventoryResponse, bf as UpdateUnapprovedInput, bg as UpdateVariantInput, bh as UploadInvoiceFileInput, bi as VideosResource, bj as Webhook, bk as WebhookAuthenticationType, bl as WebhookInput, bm as WebhooksResource, bn as createTrendyolClient, bo as normalizeShipmentPackage, bp as pollBatchStatus, bq as trendyolCapabilities } from './client-CtygosAW.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
+ export { CursorPage, CursorPaginationParams, MutationResult, OffsetPage, OffsetPaginationParams, paginate, paginateOffset } from '@lonca/core';
6
6
 
7
7
  /**
8
8
  * Inbound webhook event payloads — what Trendyol POSTs to YOUR endpoint
package/dist/index.d.ts CHANGED
@@ -1,8 +1,8 @@
1
- import { aT as ShipmentPackage, a3 as KnownShipmentPackageStatus } from './client-DMndJSb0.js';
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-DMndJSb0.js';
1
+ import { aU as ShipmentPackage, a3 as KnownShipmentPackageStatus } from './client-CtygosAW.js';
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 ProductContentBase, aF as ProductImageInput, aG as ProductOrigin, aH as ProductStockPrice, aI as ProductStockPriceVariant, aJ as ProductVariant, aK as ProductsResource, aL as QuantitySplit, aM as Question, aN as QuestionAnswer, aO as QuestionStatus, aP as QuestionsResource, aQ as SellerIntegrationStatus, aR as SellerVideo, aS as SendInvoiceLinkInput, aT as SettlementRow, aV as ShipmentPackageStatus, aW as SplitGroup, aX as SplitPackagePlan, aY as SupplierAddress, aZ as SupplierAddressType, a_ as SuppliersResource, a$ as SuppliersResourceOptions, b0 as TestOrderStatus, b1 as TestOrdersResource, b2 as TrendyolCapabilities, b3 as TrendyolCargoProvider, b4 as TrendyolClient, b5 as TrendyolEnvironment, b6 as UnapprovedDateQueryType, b7 as UnapprovedProduct, b8 as UnapprovedProductRejectReason, b9 as UnapprovedProductStatus, ba as UpdateBoxInfoInput, bb as UpdateContentInput, bc as UpdateDeliveryInfoInput, bd as UpdatePackageStatusInput, be as UpdatePriceInventoryResponse, bf as UpdateUnapprovedInput, bg as UpdateVariantInput, bh as UploadInvoiceFileInput, bi as VideosResource, bj as Webhook, bk as WebhookAuthenticationType, bl as WebhookInput, bm as WebhooksResource, bn as createTrendyolClient, bo as normalizeShipmentPackage, bp as pollBatchStatus, bq as trendyolCapabilities } from './client-CtygosAW.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
+ export { CursorPage, CursorPaginationParams, MutationResult, OffsetPage, OffsetPaginationParams, paginate, paginateOffset } from '@lonca/core';
6
6
 
7
7
  /**
8
8
  * Inbound webhook event payloads — what Trendyol POSTs to YOUR endpoint
package/dist/index.js CHANGED
@@ -264,12 +264,14 @@ var ClaimsResource = class {
264
264
  if (!Array.isArray(input?.claimItems) || input.claimItems.length === 0) {
265
265
  throw new ValidationError({ message: "claims.create: claimItems must not be empty" });
266
266
  }
267
- return this.transport.request({
268
- method: "POST",
269
- path: `/integration/order/sellers/${this.transport.sellerId}/claims/create`,
270
- body: input,
271
- rateLimiter: this.limiter
272
- });
267
+ return {
268
+ raw: await this.transport.request({
269
+ method: "POST",
270
+ path: `/integration/order/sellers/${this.transport.sellerId}/claims/create`,
271
+ body: input,
272
+ rateLimiter: this.limiter
273
+ })
274
+ };
273
275
  }
274
276
  /**
275
277
  * File a seller-side rejection ("ret talebi") against a customer claim.
@@ -302,12 +304,14 @@ var ClaimsResource = class {
302
304
  form.append("files", file);
303
305
  }
304
306
  }
305
- return this.transport.request({
306
- method: "POST",
307
- path: `/integration/order/sellers/${this.transport.sellerId}/claims/${encodeURIComponent(claimId)}/issue`,
308
- body: form,
309
- rateLimiter: this.limiter
310
- });
307
+ return {
308
+ raw: await this.transport.request({
309
+ method: "POST",
310
+ path: `/integration/order/sellers/${this.transport.sellerId}/claims/${encodeURIComponent(claimId)}/issue`,
311
+ body: form,
312
+ rateLimiter: this.limiter
313
+ })
314
+ };
311
315
  }
312
316
  /**
313
317
  * Approve specific claim line items. After approval, Trendyol moves
@@ -321,12 +325,14 @@ var ClaimsResource = class {
321
325
  message: "claims.approveLineItems: claimLineItemIdList must not be empty"
322
326
  });
323
327
  }
324
- return this.transport.request({
325
- method: "PUT",
326
- path: `/integration/order/sellers/${this.transport.sellerId}/claims/${encodeURIComponent(claimId)}/items/approve`,
327
- body: input,
328
- rateLimiter: this.limiter
329
- });
328
+ return {
329
+ raw: await this.transport.request({
330
+ method: "PUT",
331
+ path: `/integration/order/sellers/${this.transport.sellerId}/claims/${encodeURIComponent(claimId)}/items/approve`,
332
+ body: input,
333
+ rateLimiter: this.limiter
334
+ })
335
+ };
330
336
  }
331
337
  /**
332
338
  * List claims (page-based; SDK exposes opaque cursor convention).
@@ -900,33 +906,39 @@ var InvoicesResource = class {
900
906
  if (input.invoiceNumber !== void 0) {
901
907
  form.append("invoiceNumber", input.invoiceNumber);
902
908
  }
903
- return this.transport.request({
904
- method: "POST",
905
- path: `/integration/sellers/${this.transport.sellerId}/seller-invoice-file`,
906
- body: form,
907
- rateLimiter: this.limiter
908
- });
909
+ return {
910
+ raw: await this.transport.request({
911
+ method: "POST",
912
+ path: `/integration/sellers/${this.transport.sellerId}/seller-invoice-file`,
913
+ body: form,
914
+ rateLimiter: this.limiter
915
+ })
916
+ };
909
917
  }
910
918
  /** Register an invoice URL with Trendyol (alternative to uploading the file). */
911
919
  async sendLink(input) {
912
920
  if (!input?.invoiceLink) {
913
921
  throw new ValidationError({ message: "invoices.sendLink: invoiceLink is required" });
914
922
  }
915
- return this.transport.request({
916
- method: "POST",
917
- path: `/integration/sellers/${this.transport.sellerId}/seller-invoice-links`,
918
- body: input,
919
- rateLimiter: this.limiter
920
- });
923
+ return {
924
+ raw: await this.transport.request({
925
+ method: "POST",
926
+ path: `/integration/sellers/${this.transport.sellerId}/seller-invoice-links`,
927
+ body: input,
928
+ rateLimiter: this.limiter
929
+ })
930
+ };
921
931
  }
922
932
  /** Remove a previously-registered invoice link. */
923
933
  async deleteLink(input) {
924
- return this.transport.request({
925
- method: "POST",
926
- path: `/integration/sellers/${this.transport.sellerId}/seller-invoice-links/delete`,
927
- body: input,
928
- rateLimiter: this.limiter
929
- });
934
+ return {
935
+ raw: await this.transport.request({
936
+ method: "POST",
937
+ path: `/integration/sellers/${this.transport.sellerId}/seller-invoice-links/delete`,
938
+ body: input,
939
+ rateLimiter: this.limiter
940
+ })
941
+ };
930
942
  }
931
943
  };
932
944
  var LabelsResource = class {
@@ -1962,6 +1974,11 @@ var ProductsResource = class {
1962
1974
  * List approved products. Use `paginate()` from `@lonca/core` to iterate
1963
1975
  * lazily across pages.
1964
1976
  *
1977
+ * **Approved only:** this endpoint silently excludes products still in review
1978
+ * or rejected — use {@link listUnapproved} for those. Date fields on the
1979
+ * returned {@link Product} (`createdAt` / `updatedAt`) are ISO 8601 UTC
1980
+ * **strings**, not `Date` objects.
1981
+ *
1965
1982
  * Trendyol exposes both page-based and `nextPageToken`-based pagination
1966
1983
  * (the latter required when the dataset exceeds 10,000 items). The SDK
1967
1984
  * picks the right strategy automatically — pass our opaque `cursor` from