@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.
@@ -1,4 +1,4 @@
1
- import { Logger, BaseRequestOptions, TokenBucketRateLimiter, CursorPaginationParams, CursorPage, OffsetPaginationParams } from '@lonca/core';
1
+ import { Logger, BaseRequestOptions, TokenBucketRateLimiter, CursorPaginationParams, CursorPage, MutationResult, OffsetPaginationParams } from '@lonca/core';
2
2
 
3
3
  declare const BASE_URLS: {
4
4
  readonly prod: "https://apigw.trendyol.com";
@@ -349,7 +349,7 @@ declare class ClaimsResource {
349
349
  *
350
350
  * @throws {ValidationError} when `claimItems` is empty.
351
351
  */
352
- create(input: CreateClaimInput): Promise<unknown>;
352
+ create(input: CreateClaimInput): Promise<MutationResult>;
353
353
  /**
354
354
  * File a seller-side rejection ("ret talebi") against a customer claim.
355
355
  *
@@ -358,14 +358,14 @@ declare class ClaimsResource {
358
358
  * commas (Trendyol expects a single comma-separated string field).
359
359
  * Attach supporting docs (PDF / JPEG) via `files: [Blob, ...]`.
360
360
  */
361
- createIssue(claimId: string, input: CreateClaimIssueInput): Promise<unknown>;
361
+ createIssue(claimId: string, input: CreateClaimIssueInput): Promise<MutationResult>;
362
362
  /**
363
363
  * Approve specific claim line items. After approval, Trendyol moves
364
364
  * those line items into the post-approval refund / return-shipping flow.
365
365
  *
366
366
  * @throws {ValidationError} when `claimLineItemIdList` is empty.
367
367
  */
368
- approveLineItems(claimId: string, input: ApproveClaimLineItemsInput): Promise<unknown>;
368
+ approveLineItems(claimId: string, input: ApproveClaimLineItemsInput): Promise<MutationResult>;
369
369
  /**
370
370
  * List claims (page-based; SDK exposes opaque cursor convention).
371
371
  *
@@ -855,13 +855,16 @@ interface ProductVariant {
855
855
  raw: Record<string, unknown>;
856
856
  }
857
857
  /**
858
- * A Trendyol marketplace product (approved variant).
858
+ * The content fields shared by an approved {@link Product} and an unapproved
859
+ * (draft) {@link UnapprovedProduct} — so callers can read title / brand /
860
+ * category / images from either shape without branching.
859
861
  *
860
- * Lonca surfaces the stable fields we have verified against live Trendyol
861
- * responses. Everything else stays accessible via `raw`.
862
+ * Intentionally just the common surface: the two diverge structurally beyond
863
+ * this (`Product` carries `variants[]`; `UnapprovedProduct` is flat with a root
864
+ * `barcode`), and their timestamp fields differ in optionality, so those stay on
865
+ * the concrete types.
862
866
  */
863
- interface Product {
864
- contentId: string;
867
+ interface ProductContentBase {
865
868
  productMainId: string;
866
869
  title: string;
867
870
  description?: string;
@@ -870,6 +873,15 @@ interface Product {
870
873
  /** Image URLs in display order. */
871
874
  images: string[];
872
875
  attributes: ProductAttribute[];
876
+ }
877
+ /**
878
+ * A Trendyol marketplace product (approved variant).
879
+ *
880
+ * Lonca surfaces the stable fields we have verified against live Trendyol
881
+ * responses. Everything else stays accessible via `raw`.
882
+ */
883
+ interface Product extends ProductContentBase {
884
+ contentId: string;
873
885
  variants: ProductVariant[];
874
886
  /** ISO 8601 UTC string (converted from Trendyol's ms-epoch). */
875
887
  createdAt: string;
@@ -907,17 +919,12 @@ interface UnapprovedProductRejectReason {
907
919
  * calls the image-list field `media`, but the live API returns it as
908
920
  * `images`. SDK normalizes to `images`.
909
921
  */
910
- interface UnapprovedProduct {
922
+ interface UnapprovedProduct extends ProductContentBase {
911
923
  /** Seller (supplier) ID echoed back by Trendyol. */
912
924
  supplierId?: string;
913
- productMainId: string;
914
925
  /** Lifecycle status — see `UnapprovedProductStatus`. */
915
926
  status?: UnapprovedProductStatus;
916
- brand: NamedRef;
917
- category: NamedRef;
918
927
  barcode: string;
919
- title: string;
920
- description?: string;
921
928
  /** Stock quantity at the moment of the query. */
922
929
  quantity?: number;
923
930
  listPrice?: number;
@@ -926,9 +933,6 @@ interface UnapprovedProduct {
926
933
  vatRate?: number;
927
934
  dimensionalWeight?: number;
928
935
  stockCode?: string;
929
- /** Image URLs in display order (Trendyol's `images` field, spec says `media`). */
930
- images: string[];
931
- attributes: ProductAttribute[];
932
936
  /** Populated when `status === 'rejected'`. */
933
937
  rejectReasonDetails: UnapprovedProductRejectReason[];
934
938
  /** Returned by Trendyol; null when the seller has not configured this. */
@@ -1165,11 +1169,11 @@ declare class InvoicesResource {
1165
1169
  *
1166
1170
  * Max 10 MB. Accepted formats: PDF, JPEG, PNG.
1167
1171
  */
1168
- uploadFile(input: UploadInvoiceFileInput): Promise<unknown>;
1172
+ uploadFile(input: UploadInvoiceFileInput): Promise<MutationResult>;
1169
1173
  /** Register an invoice URL with Trendyol (alternative to uploading the file). */
1170
- sendLink(input: SendInvoiceLinkInput): Promise<unknown>;
1174
+ sendLink(input: SendInvoiceLinkInput): Promise<MutationResult>;
1171
1175
  /** Remove a previously-registered invoice link. */
1172
- deleteLink(input: DeleteInvoiceLinkInput): Promise<unknown>;
1176
+ deleteLink(input: DeleteInvoiceLinkInput): Promise<MutationResult>;
1173
1177
  }
1174
1178
 
1175
1179
  /**
@@ -2046,6 +2050,11 @@ declare class ProductsResource {
2046
2050
  * List approved products. Use `paginate()` from `@lonca/core` to iterate
2047
2051
  * lazily across pages.
2048
2052
  *
2053
+ * **Approved only:** this endpoint silently excludes products still in review
2054
+ * or rejected — use {@link listUnapproved} for those. Date fields on the
2055
+ * returned {@link Product} (`createdAt` / `updatedAt`) are ISO 8601 UTC
2056
+ * **strings**, not `Date` objects.
2057
+ *
2049
2058
  * Trendyol exposes both page-based and `nextPageToken`-based pagination
2050
2059
  * (the latter required when the dataset exceeds 10,000 items). The SDK
2051
2060
  * picks the right strategy automatically — pass our opaque `cursor` from
@@ -2654,4 +2663,4 @@ interface TrendyolClient {
2654
2663
  */
2655
2664
  declare function createTrendyolClient(opts: CreateClientOptions): TrendyolClient;
2656
2665
 
2657
- export { type FinancialTransaction as $, type ApproveClaimLineItemsInput as A, type BarcodeCategoryLookup as B, type CancelPackageItemInput as C, type Country as D, type CreateClaimInput as E, type CreateClaimIssueInput as F, type CreateClaimItemInput as G, type CreateClientOptions as H, type CreateCommonLabelInput as I, type CreateProductV2Input as J, type CreateTestOrderInput as K, type CreateVideoInput as L, type DeleteInvoiceLinkInput as M, type DeliveryOptionInput as N, type District as O, type ExportBatchAcceptedResponse as P, type ExportBatchStatus as Q, type ExportCategoryAttribute as R, ExportCenterResource as S, type ExportPackage as T, type ExportPackageItem as U, type ExportPackageStatus as V, type ExportPriceUpdateInput as W, type ExportProduct as X, type ExportProductInput as Y, type ExportStockUpdateInput as Z, FinanceResource as _, type ApprovedProductStatus as a, type TestOrderStatus as a$, type GetExportPackageItemsParams as a0, InventoryResource as a1, InvoicesResource as a2, type KnownShipmentPackageStatus as a3, LabelsResource as a4, type LaborCostInput as a5, type ListCategoryAttributeValuesParams as a6, type ListClaimsParams as a7, type ListCompensationTicketsParams as a8, type ListExportPackagesV2Params as a9, type ProductAttribute as aA, type ProductAttributeV2Input as aB, type ProductBase as aC, type ProductComposition as aD, type ProductImageInput as aE, type ProductOrigin as aF, type ProductStockPrice as aG, type ProductStockPriceVariant as aH, type ProductVariant as aI, ProductsResource as aJ, type QuantitySplit as aK, type Question as aL, type QuestionAnswer as aM, type QuestionStatus as aN, QuestionsResource as aO, type SellerIntegrationStatus as aP, type SellerVideo as aQ, type SendInvoiceLinkInput as aR, type SettlementRow as aS, type ShipmentPackage as aT, type ShipmentPackageStatus as aU, type SplitGroup as aV, type SplitPackagePlan as aW, type SupplierAddress as aX, type SupplierAddressType as aY, SuppliersResource as aZ, type SuppliersResourceOptions as a_, type ListExportPackagesV3Params as aa, type ListExportProductsParams as ab, type ListFinanceParams as ac, type ListInventoryAndPriceParams as ad, type ListOrdersParams as ae, type ListOrdersStreamParams as af, type ListProductsParams as ag, type ListQuestionsParams as ah, type ListUnapprovedProductsParams as ai, type ListVideosParams as aj, LocationsResource as ak, type NamedRef as al, type Neighborhood as am, type OrderAddress as an, type OrderAddressLines as ao, type OrderCustomer as ap, type OrderLine as aq, type OrderLineDiscountDetail as ar, OrdersResource as as, type OtherFinancialRow as at, type PackageDetail as au, type PackageHistoryEntry as av, type PackageLineUpdate as aw, type PriceInventoryUpdate as ax, type ProcessAlternativeDeliveryInput as ay, type Product as az, type BatchAcceptedResponse as b, TestOrdersResource as b0, type TrendyolCapabilities as b1, type TrendyolCargoProvider as b2, type TrendyolClient as b3, type TrendyolEnvironment as b4, type UnapprovedDateQueryType as b5, type UnapprovedProduct as b6, type UnapprovedProductRejectReason as b7, type UnapprovedProductStatus as b8, type UpdateBoxInfoInput as b9, type UpdateContentInput as ba, type UpdateDeliveryInfoInput as bb, type UpdatePackageStatusInput as bc, type UpdatePriceInventoryResponse as bd, type UpdateUnapprovedInput as be, type UpdateVariantInput as bf, type UploadInvoiceFileInput as bg, VideosResource as bh, type Webhook as bi, type WebhookAuthenticationType as bj, type WebhookInput as bk, WebhooksResource as bl, createTrendyolClient as bm, normalizeShipmentPackage as bn, pollBatchStatus as bo, trendyolCapabilities as bp, type BatchPollOptions as c, type BatchRequestItemResult as d, type BatchRequestResult as e, type BatchRequestStatus as f, type Brand as g, BrandsResource as h, type BuyboxInfo as i, type CareInstruction as j, type CargoInvoiceItem as k, CategoriesResource as l, type Category as m, type CategoryAttribute as n, type CategoryAttributeValue as o, type City as p, type Claim as q, type ClaimIssueReason as r, type ClaimItemAudit as s, type ClaimItemStatus as t, ClaimsResource as u, type CommonLabel as v, type CommonLabelEntry as w, type CompensationItemDetail as x, type CompensationTicket as y, type CompensationTicketState as z };
2666
+ export { type FinancialTransaction as $, type ApproveClaimLineItemsInput as A, type BarcodeCategoryLookup as B, type CancelPackageItemInput as C, type Country as D, type CreateClaimInput as E, type CreateClaimIssueInput as F, type CreateClaimItemInput as G, type CreateClientOptions as H, type CreateCommonLabelInput as I, type CreateProductV2Input as J, type CreateTestOrderInput as K, type CreateVideoInput as L, type DeleteInvoiceLinkInput as M, type DeliveryOptionInput as N, type District as O, type ExportBatchAcceptedResponse as P, type ExportBatchStatus as Q, type ExportCategoryAttribute as R, ExportCenterResource as S, type ExportPackage as T, type ExportPackageItem as U, type ExportPackageStatus as V, type ExportPriceUpdateInput as W, type ExportProduct as X, type ExportProductInput as Y, type ExportStockUpdateInput as Z, FinanceResource as _, type ApprovedProductStatus as a, type SuppliersResourceOptions as a$, type GetExportPackageItemsParams as a0, InventoryResource as a1, InvoicesResource as a2, type KnownShipmentPackageStatus as a3, LabelsResource as a4, type LaborCostInput as a5, type ListCategoryAttributeValuesParams as a6, type ListClaimsParams as a7, type ListCompensationTicketsParams as a8, type ListExportPackagesV2Params as a9, type ProductAttribute as aA, type ProductAttributeV2Input as aB, type ProductBase as aC, type ProductComposition as aD, type ProductContentBase as aE, type ProductImageInput as aF, type ProductOrigin as aG, type ProductStockPrice as aH, type ProductStockPriceVariant as aI, type ProductVariant as aJ, ProductsResource as aK, type QuantitySplit as aL, type Question as aM, type QuestionAnswer as aN, type QuestionStatus as aO, QuestionsResource as aP, type SellerIntegrationStatus as aQ, type SellerVideo as aR, type SendInvoiceLinkInput as aS, type SettlementRow as aT, type ShipmentPackage as aU, type ShipmentPackageStatus as aV, type SplitGroup as aW, type SplitPackagePlan as aX, type SupplierAddress as aY, type SupplierAddressType as aZ, SuppliersResource as a_, type ListExportPackagesV3Params as aa, type ListExportProductsParams as ab, type ListFinanceParams as ac, type ListInventoryAndPriceParams as ad, type ListOrdersParams as ae, type ListOrdersStreamParams as af, type ListProductsParams as ag, type ListQuestionsParams as ah, type ListUnapprovedProductsParams as ai, type ListVideosParams as aj, LocationsResource as ak, type NamedRef as al, type Neighborhood as am, type OrderAddress as an, type OrderAddressLines as ao, type OrderCustomer as ap, type OrderLine as aq, type OrderLineDiscountDetail as ar, OrdersResource as as, type OtherFinancialRow as at, type PackageDetail as au, type PackageHistoryEntry as av, type PackageLineUpdate as aw, type PriceInventoryUpdate as ax, type ProcessAlternativeDeliveryInput as ay, type Product as az, type BatchAcceptedResponse as b, type TestOrderStatus as b0, TestOrdersResource as b1, type TrendyolCapabilities as b2, type TrendyolCargoProvider as b3, type TrendyolClient as b4, type TrendyolEnvironment as b5, type UnapprovedDateQueryType as b6, type UnapprovedProduct as b7, type UnapprovedProductRejectReason as b8, type UnapprovedProductStatus as b9, type UpdateBoxInfoInput as ba, type UpdateContentInput as bb, type UpdateDeliveryInfoInput as bc, type UpdatePackageStatusInput as bd, type UpdatePriceInventoryResponse as be, type UpdateUnapprovedInput as bf, type UpdateVariantInput as bg, type UploadInvoiceFileInput as bh, VideosResource as bi, type Webhook as bj, type WebhookAuthenticationType as bk, type WebhookInput as bl, WebhooksResource as bm, createTrendyolClient as bn, normalizeShipmentPackage as bo, pollBatchStatus as bp, trendyolCapabilities as bq, type BatchPollOptions as c, type BatchRequestItemResult as d, type BatchRequestResult as e, type BatchRequestStatus as f, type Brand as g, BrandsResource as h, type BuyboxInfo as i, type CareInstruction as j, type CargoInvoiceItem as k, CategoriesResource as l, type Category as m, type CategoryAttribute as n, type CategoryAttributeValue as o, type City as p, type Claim as q, type ClaimIssueReason as r, type ClaimItemAudit as s, type ClaimItemStatus as t, ClaimsResource as u, type CommonLabel as v, type CommonLabelEntry as w, type CompensationItemDetail as x, type CompensationTicket as y, type CompensationTicketState as z };
@@ -1,4 +1,4 @@
1
- import { Logger, BaseRequestOptions, TokenBucketRateLimiter, CursorPaginationParams, CursorPage, OffsetPaginationParams } from '@lonca/core';
1
+ import { Logger, BaseRequestOptions, TokenBucketRateLimiter, CursorPaginationParams, CursorPage, MutationResult, OffsetPaginationParams } from '@lonca/core';
2
2
 
3
3
  declare const BASE_URLS: {
4
4
  readonly prod: "https://apigw.trendyol.com";
@@ -349,7 +349,7 @@ declare class ClaimsResource {
349
349
  *
350
350
  * @throws {ValidationError} when `claimItems` is empty.
351
351
  */
352
- create(input: CreateClaimInput): Promise<unknown>;
352
+ create(input: CreateClaimInput): Promise<MutationResult>;
353
353
  /**
354
354
  * File a seller-side rejection ("ret talebi") against a customer claim.
355
355
  *
@@ -358,14 +358,14 @@ declare class ClaimsResource {
358
358
  * commas (Trendyol expects a single comma-separated string field).
359
359
  * Attach supporting docs (PDF / JPEG) via `files: [Blob, ...]`.
360
360
  */
361
- createIssue(claimId: string, input: CreateClaimIssueInput): Promise<unknown>;
361
+ createIssue(claimId: string, input: CreateClaimIssueInput): Promise<MutationResult>;
362
362
  /**
363
363
  * Approve specific claim line items. After approval, Trendyol moves
364
364
  * those line items into the post-approval refund / return-shipping flow.
365
365
  *
366
366
  * @throws {ValidationError} when `claimLineItemIdList` is empty.
367
367
  */
368
- approveLineItems(claimId: string, input: ApproveClaimLineItemsInput): Promise<unknown>;
368
+ approveLineItems(claimId: string, input: ApproveClaimLineItemsInput): Promise<MutationResult>;
369
369
  /**
370
370
  * List claims (page-based; SDK exposes opaque cursor convention).
371
371
  *
@@ -855,13 +855,16 @@ interface ProductVariant {
855
855
  raw: Record<string, unknown>;
856
856
  }
857
857
  /**
858
- * A Trendyol marketplace product (approved variant).
858
+ * The content fields shared by an approved {@link Product} and an unapproved
859
+ * (draft) {@link UnapprovedProduct} — so callers can read title / brand /
860
+ * category / images from either shape without branching.
859
861
  *
860
- * Lonca surfaces the stable fields we have verified against live Trendyol
861
- * responses. Everything else stays accessible via `raw`.
862
+ * Intentionally just the common surface: the two diverge structurally beyond
863
+ * this (`Product` carries `variants[]`; `UnapprovedProduct` is flat with a root
864
+ * `barcode`), and their timestamp fields differ in optionality, so those stay on
865
+ * the concrete types.
862
866
  */
863
- interface Product {
864
- contentId: string;
867
+ interface ProductContentBase {
865
868
  productMainId: string;
866
869
  title: string;
867
870
  description?: string;
@@ -870,6 +873,15 @@ interface Product {
870
873
  /** Image URLs in display order. */
871
874
  images: string[];
872
875
  attributes: ProductAttribute[];
876
+ }
877
+ /**
878
+ * A Trendyol marketplace product (approved variant).
879
+ *
880
+ * Lonca surfaces the stable fields we have verified against live Trendyol
881
+ * responses. Everything else stays accessible via `raw`.
882
+ */
883
+ interface Product extends ProductContentBase {
884
+ contentId: string;
873
885
  variants: ProductVariant[];
874
886
  /** ISO 8601 UTC string (converted from Trendyol's ms-epoch). */
875
887
  createdAt: string;
@@ -907,17 +919,12 @@ interface UnapprovedProductRejectReason {
907
919
  * calls the image-list field `media`, but the live API returns it as
908
920
  * `images`. SDK normalizes to `images`.
909
921
  */
910
- interface UnapprovedProduct {
922
+ interface UnapprovedProduct extends ProductContentBase {
911
923
  /** Seller (supplier) ID echoed back by Trendyol. */
912
924
  supplierId?: string;
913
- productMainId: string;
914
925
  /** Lifecycle status — see `UnapprovedProductStatus`. */
915
926
  status?: UnapprovedProductStatus;
916
- brand: NamedRef;
917
- category: NamedRef;
918
927
  barcode: string;
919
- title: string;
920
- description?: string;
921
928
  /** Stock quantity at the moment of the query. */
922
929
  quantity?: number;
923
930
  listPrice?: number;
@@ -926,9 +933,6 @@ interface UnapprovedProduct {
926
933
  vatRate?: number;
927
934
  dimensionalWeight?: number;
928
935
  stockCode?: string;
929
- /** Image URLs in display order (Trendyol's `images` field, spec says `media`). */
930
- images: string[];
931
- attributes: ProductAttribute[];
932
936
  /** Populated when `status === 'rejected'`. */
933
937
  rejectReasonDetails: UnapprovedProductRejectReason[];
934
938
  /** Returned by Trendyol; null when the seller has not configured this. */
@@ -1165,11 +1169,11 @@ declare class InvoicesResource {
1165
1169
  *
1166
1170
  * Max 10 MB. Accepted formats: PDF, JPEG, PNG.
1167
1171
  */
1168
- uploadFile(input: UploadInvoiceFileInput): Promise<unknown>;
1172
+ uploadFile(input: UploadInvoiceFileInput): Promise<MutationResult>;
1169
1173
  /** Register an invoice URL with Trendyol (alternative to uploading the file). */
1170
- sendLink(input: SendInvoiceLinkInput): Promise<unknown>;
1174
+ sendLink(input: SendInvoiceLinkInput): Promise<MutationResult>;
1171
1175
  /** Remove a previously-registered invoice link. */
1172
- deleteLink(input: DeleteInvoiceLinkInput): Promise<unknown>;
1176
+ deleteLink(input: DeleteInvoiceLinkInput): Promise<MutationResult>;
1173
1177
  }
1174
1178
 
1175
1179
  /**
@@ -2046,6 +2050,11 @@ declare class ProductsResource {
2046
2050
  * List approved products. Use `paginate()` from `@lonca/core` to iterate
2047
2051
  * lazily across pages.
2048
2052
  *
2053
+ * **Approved only:** this endpoint silently excludes products still in review
2054
+ * or rejected — use {@link listUnapproved} for those. Date fields on the
2055
+ * returned {@link Product} (`createdAt` / `updatedAt`) are ISO 8601 UTC
2056
+ * **strings**, not `Date` objects.
2057
+ *
2049
2058
  * Trendyol exposes both page-based and `nextPageToken`-based pagination
2050
2059
  * (the latter required when the dataset exceeds 10,000 items). The SDK
2051
2060
  * picks the right strategy automatically — pass our opaque `cursor` from
@@ -2654,4 +2663,4 @@ interface TrendyolClient {
2654
2663
  */
2655
2664
  declare function createTrendyolClient(opts: CreateClientOptions): TrendyolClient;
2656
2665
 
2657
- export { type FinancialTransaction as $, type ApproveClaimLineItemsInput as A, type BarcodeCategoryLookup as B, type CancelPackageItemInput as C, type Country as D, type CreateClaimInput as E, type CreateClaimIssueInput as F, type CreateClaimItemInput as G, type CreateClientOptions as H, type CreateCommonLabelInput as I, type CreateProductV2Input as J, type CreateTestOrderInput as K, type CreateVideoInput as L, type DeleteInvoiceLinkInput as M, type DeliveryOptionInput as N, type District as O, type ExportBatchAcceptedResponse as P, type ExportBatchStatus as Q, type ExportCategoryAttribute as R, ExportCenterResource as S, type ExportPackage as T, type ExportPackageItem as U, type ExportPackageStatus as V, type ExportPriceUpdateInput as W, type ExportProduct as X, type ExportProductInput as Y, type ExportStockUpdateInput as Z, FinanceResource as _, type ApprovedProductStatus as a, type TestOrderStatus as a$, type GetExportPackageItemsParams as a0, InventoryResource as a1, InvoicesResource as a2, type KnownShipmentPackageStatus as a3, LabelsResource as a4, type LaborCostInput as a5, type ListCategoryAttributeValuesParams as a6, type ListClaimsParams as a7, type ListCompensationTicketsParams as a8, type ListExportPackagesV2Params as a9, type ProductAttribute as aA, type ProductAttributeV2Input as aB, type ProductBase as aC, type ProductComposition as aD, type ProductImageInput as aE, type ProductOrigin as aF, type ProductStockPrice as aG, type ProductStockPriceVariant as aH, type ProductVariant as aI, ProductsResource as aJ, type QuantitySplit as aK, type Question as aL, type QuestionAnswer as aM, type QuestionStatus as aN, QuestionsResource as aO, type SellerIntegrationStatus as aP, type SellerVideo as aQ, type SendInvoiceLinkInput as aR, type SettlementRow as aS, type ShipmentPackage as aT, type ShipmentPackageStatus as aU, type SplitGroup as aV, type SplitPackagePlan as aW, type SupplierAddress as aX, type SupplierAddressType as aY, SuppliersResource as aZ, type SuppliersResourceOptions as a_, type ListExportPackagesV3Params as aa, type ListExportProductsParams as ab, type ListFinanceParams as ac, type ListInventoryAndPriceParams as ad, type ListOrdersParams as ae, type ListOrdersStreamParams as af, type ListProductsParams as ag, type ListQuestionsParams as ah, type ListUnapprovedProductsParams as ai, type ListVideosParams as aj, LocationsResource as ak, type NamedRef as al, type Neighborhood as am, type OrderAddress as an, type OrderAddressLines as ao, type OrderCustomer as ap, type OrderLine as aq, type OrderLineDiscountDetail as ar, OrdersResource as as, type OtherFinancialRow as at, type PackageDetail as au, type PackageHistoryEntry as av, type PackageLineUpdate as aw, type PriceInventoryUpdate as ax, type ProcessAlternativeDeliveryInput as ay, type Product as az, type BatchAcceptedResponse as b, TestOrdersResource as b0, type TrendyolCapabilities as b1, type TrendyolCargoProvider as b2, type TrendyolClient as b3, type TrendyolEnvironment as b4, type UnapprovedDateQueryType as b5, type UnapprovedProduct as b6, type UnapprovedProductRejectReason as b7, type UnapprovedProductStatus as b8, type UpdateBoxInfoInput as b9, type UpdateContentInput as ba, type UpdateDeliveryInfoInput as bb, type UpdatePackageStatusInput as bc, type UpdatePriceInventoryResponse as bd, type UpdateUnapprovedInput as be, type UpdateVariantInput as bf, type UploadInvoiceFileInput as bg, VideosResource as bh, type Webhook as bi, type WebhookAuthenticationType as bj, type WebhookInput as bk, WebhooksResource as bl, createTrendyolClient as bm, normalizeShipmentPackage as bn, pollBatchStatus as bo, trendyolCapabilities as bp, type BatchPollOptions as c, type BatchRequestItemResult as d, type BatchRequestResult as e, type BatchRequestStatus as f, type Brand as g, BrandsResource as h, type BuyboxInfo as i, type CareInstruction as j, type CargoInvoiceItem as k, CategoriesResource as l, type Category as m, type CategoryAttribute as n, type CategoryAttributeValue as o, type City as p, type Claim as q, type ClaimIssueReason as r, type ClaimItemAudit as s, type ClaimItemStatus as t, ClaimsResource as u, type CommonLabel as v, type CommonLabelEntry as w, type CompensationItemDetail as x, type CompensationTicket as y, type CompensationTicketState as z };
2666
+ export { type FinancialTransaction as $, type ApproveClaimLineItemsInput as A, type BarcodeCategoryLookup as B, type CancelPackageItemInput as C, type Country as D, type CreateClaimInput as E, type CreateClaimIssueInput as F, type CreateClaimItemInput as G, type CreateClientOptions as H, type CreateCommonLabelInput as I, type CreateProductV2Input as J, type CreateTestOrderInput as K, type CreateVideoInput as L, type DeleteInvoiceLinkInput as M, type DeliveryOptionInput as N, type District as O, type ExportBatchAcceptedResponse as P, type ExportBatchStatus as Q, type ExportCategoryAttribute as R, ExportCenterResource as S, type ExportPackage as T, type ExportPackageItem as U, type ExportPackageStatus as V, type ExportPriceUpdateInput as W, type ExportProduct as X, type ExportProductInput as Y, type ExportStockUpdateInput as Z, FinanceResource as _, type ApprovedProductStatus as a, type SuppliersResourceOptions as a$, type GetExportPackageItemsParams as a0, InventoryResource as a1, InvoicesResource as a2, type KnownShipmentPackageStatus as a3, LabelsResource as a4, type LaborCostInput as a5, type ListCategoryAttributeValuesParams as a6, type ListClaimsParams as a7, type ListCompensationTicketsParams as a8, type ListExportPackagesV2Params as a9, type ProductAttribute as aA, type ProductAttributeV2Input as aB, type ProductBase as aC, type ProductComposition as aD, type ProductContentBase as aE, type ProductImageInput as aF, type ProductOrigin as aG, type ProductStockPrice as aH, type ProductStockPriceVariant as aI, type ProductVariant as aJ, ProductsResource as aK, type QuantitySplit as aL, type Question as aM, type QuestionAnswer as aN, type QuestionStatus as aO, QuestionsResource as aP, type SellerIntegrationStatus as aQ, type SellerVideo as aR, type SendInvoiceLinkInput as aS, type SettlementRow as aT, type ShipmentPackage as aU, type ShipmentPackageStatus as aV, type SplitGroup as aW, type SplitPackagePlan as aX, type SupplierAddress as aY, type SupplierAddressType as aZ, SuppliersResource as a_, type ListExportPackagesV3Params as aa, type ListExportProductsParams as ab, type ListFinanceParams as ac, type ListInventoryAndPriceParams as ad, type ListOrdersParams as ae, type ListOrdersStreamParams as af, type ListProductsParams as ag, type ListQuestionsParams as ah, type ListUnapprovedProductsParams as ai, type ListVideosParams as aj, LocationsResource as ak, type NamedRef as al, type Neighborhood as am, type OrderAddress as an, type OrderAddressLines as ao, type OrderCustomer as ap, type OrderLine as aq, type OrderLineDiscountDetail as ar, OrdersResource as as, type OtherFinancialRow as at, type PackageDetail as au, type PackageHistoryEntry as av, type PackageLineUpdate as aw, type PriceInventoryUpdate as ax, type ProcessAlternativeDeliveryInput as ay, type Product as az, type BatchAcceptedResponse as b, type TestOrderStatus as b0, TestOrdersResource as b1, type TrendyolCapabilities as b2, type TrendyolCargoProvider as b3, type TrendyolClient as b4, type TrendyolEnvironment as b5, type UnapprovedDateQueryType as b6, type UnapprovedProduct as b7, type UnapprovedProductRejectReason as b8, type UnapprovedProductStatus as b9, type UpdateBoxInfoInput as ba, type UpdateContentInput as bb, type UpdateDeliveryInfoInput as bc, type UpdatePackageStatusInput as bd, type UpdatePriceInventoryResponse as be, type UpdateUnapprovedInput as bf, type UpdateVariantInput as bg, type UploadInvoiceFileInput as bh, VideosResource as bi, type Webhook as bj, type WebhookAuthenticationType as bk, type WebhookInput as bl, WebhooksResource as bm, createTrendyolClient as bn, normalizeShipmentPackage as bo, pollBatchStatus as bp, trendyolCapabilities as bq, type BatchPollOptions as c, type BatchRequestItemResult as d, type BatchRequestResult as e, type BatchRequestStatus as f, type Brand as g, BrandsResource as h, type BuyboxInfo as i, type CareInstruction as j, type CargoInvoiceItem as k, CategoriesResource as l, type Category as m, type CategoryAttribute as n, type CategoryAttributeValue as o, type City as p, type Claim as q, type ClaimIssueReason as r, type ClaimItemAudit as s, type ClaimItemStatus as t, ClaimsResource as u, type CommonLabel as v, type CommonLabelEntry as w, type CompensationItemDetail as x, type CompensationTicket as y, type CompensationTicketState as z };
package/dist/index.cjs CHANGED
@@ -265,12 +265,14 @@ var ClaimsResource = class {
265
265
  if (!Array.isArray(input?.claimItems) || input.claimItems.length === 0) {
266
266
  throw new core.ValidationError({ message: "claims.create: claimItems must not be empty" });
267
267
  }
268
- return this.transport.request({
269
- method: "POST",
270
- path: `/integration/order/sellers/${this.transport.sellerId}/claims/create`,
271
- body: input,
272
- rateLimiter: this.limiter
273
- });
268
+ return {
269
+ raw: await this.transport.request({
270
+ method: "POST",
271
+ path: `/integration/order/sellers/${this.transport.sellerId}/claims/create`,
272
+ body: input,
273
+ rateLimiter: this.limiter
274
+ })
275
+ };
274
276
  }
275
277
  /**
276
278
  * File a seller-side rejection ("ret talebi") against a customer claim.
@@ -303,12 +305,14 @@ var ClaimsResource = class {
303
305
  form.append("files", file);
304
306
  }
305
307
  }
306
- return this.transport.request({
307
- method: "POST",
308
- path: `/integration/order/sellers/${this.transport.sellerId}/claims/${encodeURIComponent(claimId)}/issue`,
309
- body: form,
310
- rateLimiter: this.limiter
311
- });
308
+ return {
309
+ raw: await this.transport.request({
310
+ method: "POST",
311
+ path: `/integration/order/sellers/${this.transport.sellerId}/claims/${encodeURIComponent(claimId)}/issue`,
312
+ body: form,
313
+ rateLimiter: this.limiter
314
+ })
315
+ };
312
316
  }
313
317
  /**
314
318
  * Approve specific claim line items. After approval, Trendyol moves
@@ -322,12 +326,14 @@ var ClaimsResource = class {
322
326
  message: "claims.approveLineItems: claimLineItemIdList must not be empty"
323
327
  });
324
328
  }
325
- return this.transport.request({
326
- method: "PUT",
327
- path: `/integration/order/sellers/${this.transport.sellerId}/claims/${encodeURIComponent(claimId)}/items/approve`,
328
- body: input,
329
- rateLimiter: this.limiter
330
- });
329
+ return {
330
+ raw: await this.transport.request({
331
+ method: "PUT",
332
+ path: `/integration/order/sellers/${this.transport.sellerId}/claims/${encodeURIComponent(claimId)}/items/approve`,
333
+ body: input,
334
+ rateLimiter: this.limiter
335
+ })
336
+ };
331
337
  }
332
338
  /**
333
339
  * List claims (page-based; SDK exposes opaque cursor convention).
@@ -901,33 +907,39 @@ var InvoicesResource = class {
901
907
  if (input.invoiceNumber !== void 0) {
902
908
  form.append("invoiceNumber", input.invoiceNumber);
903
909
  }
904
- return this.transport.request({
905
- method: "POST",
906
- path: `/integration/sellers/${this.transport.sellerId}/seller-invoice-file`,
907
- body: form,
908
- rateLimiter: this.limiter
909
- });
910
+ return {
911
+ raw: await this.transport.request({
912
+ method: "POST",
913
+ path: `/integration/sellers/${this.transport.sellerId}/seller-invoice-file`,
914
+ body: form,
915
+ rateLimiter: this.limiter
916
+ })
917
+ };
910
918
  }
911
919
  /** Register an invoice URL with Trendyol (alternative to uploading the file). */
912
920
  async sendLink(input) {
913
921
  if (!input?.invoiceLink) {
914
922
  throw new core.ValidationError({ message: "invoices.sendLink: invoiceLink is required" });
915
923
  }
916
- return this.transport.request({
917
- method: "POST",
918
- path: `/integration/sellers/${this.transport.sellerId}/seller-invoice-links`,
919
- body: input,
920
- rateLimiter: this.limiter
921
- });
924
+ return {
925
+ raw: await this.transport.request({
926
+ method: "POST",
927
+ path: `/integration/sellers/${this.transport.sellerId}/seller-invoice-links`,
928
+ body: input,
929
+ rateLimiter: this.limiter
930
+ })
931
+ };
922
932
  }
923
933
  /** Remove a previously-registered invoice link. */
924
934
  async deleteLink(input) {
925
- return this.transport.request({
926
- method: "POST",
927
- path: `/integration/sellers/${this.transport.sellerId}/seller-invoice-links/delete`,
928
- body: input,
929
- rateLimiter: this.limiter
930
- });
935
+ return {
936
+ raw: await this.transport.request({
937
+ method: "POST",
938
+ path: `/integration/sellers/${this.transport.sellerId}/seller-invoice-links/delete`,
939
+ body: input,
940
+ rateLimiter: this.limiter
941
+ })
942
+ };
931
943
  }
932
944
  };
933
945
  var LabelsResource = class {
@@ -1963,6 +1975,11 @@ var ProductsResource = class {
1963
1975
  * List approved products. Use `paginate()` from `@lonca/core` to iterate
1964
1976
  * lazily across pages.
1965
1977
  *
1978
+ * **Approved only:** this endpoint silently excludes products still in review
1979
+ * or rejected — use {@link listUnapproved} for those. Date fields on the
1980
+ * returned {@link Product} (`createdAt` / `updatedAt`) are ISO 8601 UTC
1981
+ * **strings**, not `Date` objects.
1982
+ *
1966
1983
  * Trendyol exposes both page-based and `nextPageToken`-based pagination
1967
1984
  * (the latter required when the dataset exceeds 10,000 items). The SDK
1968
1985
  * picks the right strategy automatically — pass our opaque `cursor` from