@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 { f as BatchRequestStatus, b3 as TrendyolClient } from './client-DMndJSb0.cjs';
1
+ import { f as BatchRequestStatus, b4 as TrendyolClient } from './client-CtygosAW.cjs';
2
2
  import '@lonca/core';
3
3
 
4
4
  /** A request the fake client received, normalized for matching in a `handler`. */
package/dist/testing.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { f as BatchRequestStatus, b3 as TrendyolClient } from './client-DMndJSb0.js';
1
+ import { f as BatchRequestStatus, b4 as TrendyolClient } from './client-CtygosAW.js';
2
2
  import '@lonca/core';
3
3
 
4
4
  /** A request the fake client received, normalized for matching in a `handler`. */
package/dist/testing.js CHANGED
@@ -263,12 +263,14 @@ var ClaimsResource = class {
263
263
  if (!Array.isArray(input?.claimItems) || input.claimItems.length === 0) {
264
264
  throw new ValidationError({ message: "claims.create: claimItems must not be empty" });
265
265
  }
266
- return this.transport.request({
267
- method: "POST",
268
- path: `/integration/order/sellers/${this.transport.sellerId}/claims/create`,
269
- body: input,
270
- rateLimiter: this.limiter
271
- });
266
+ return {
267
+ raw: await this.transport.request({
268
+ method: "POST",
269
+ path: `/integration/order/sellers/${this.transport.sellerId}/claims/create`,
270
+ body: input,
271
+ rateLimiter: this.limiter
272
+ })
273
+ };
272
274
  }
273
275
  /**
274
276
  * File a seller-side rejection ("ret talebi") against a customer claim.
@@ -301,12 +303,14 @@ var ClaimsResource = class {
301
303
  form.append("files", file);
302
304
  }
303
305
  }
304
- return this.transport.request({
305
- method: "POST",
306
- path: `/integration/order/sellers/${this.transport.sellerId}/claims/${encodeURIComponent(claimId)}/issue`,
307
- body: form,
308
- rateLimiter: this.limiter
309
- });
306
+ return {
307
+ raw: await this.transport.request({
308
+ method: "POST",
309
+ path: `/integration/order/sellers/${this.transport.sellerId}/claims/${encodeURIComponent(claimId)}/issue`,
310
+ body: form,
311
+ rateLimiter: this.limiter
312
+ })
313
+ };
310
314
  }
311
315
  /**
312
316
  * Approve specific claim line items. After approval, Trendyol moves
@@ -320,12 +324,14 @@ var ClaimsResource = class {
320
324
  message: "claims.approveLineItems: claimLineItemIdList must not be empty"
321
325
  });
322
326
  }
323
- return this.transport.request({
324
- method: "PUT",
325
- path: `/integration/order/sellers/${this.transport.sellerId}/claims/${encodeURIComponent(claimId)}/items/approve`,
326
- body: input,
327
- rateLimiter: this.limiter
328
- });
327
+ return {
328
+ raw: await this.transport.request({
329
+ method: "PUT",
330
+ path: `/integration/order/sellers/${this.transport.sellerId}/claims/${encodeURIComponent(claimId)}/items/approve`,
331
+ body: input,
332
+ rateLimiter: this.limiter
333
+ })
334
+ };
329
335
  }
330
336
  /**
331
337
  * List claims (page-based; SDK exposes opaque cursor convention).
@@ -899,33 +905,39 @@ var InvoicesResource = class {
899
905
  if (input.invoiceNumber !== void 0) {
900
906
  form.append("invoiceNumber", input.invoiceNumber);
901
907
  }
902
- return this.transport.request({
903
- method: "POST",
904
- path: `/integration/sellers/${this.transport.sellerId}/seller-invoice-file`,
905
- body: form,
906
- rateLimiter: this.limiter
907
- });
908
+ return {
909
+ raw: await this.transport.request({
910
+ method: "POST",
911
+ path: `/integration/sellers/${this.transport.sellerId}/seller-invoice-file`,
912
+ body: form,
913
+ rateLimiter: this.limiter
914
+ })
915
+ };
908
916
  }
909
917
  /** Register an invoice URL with Trendyol (alternative to uploading the file). */
910
918
  async sendLink(input) {
911
919
  if (!input?.invoiceLink) {
912
920
  throw new ValidationError({ message: "invoices.sendLink: invoiceLink is required" });
913
921
  }
914
- return this.transport.request({
915
- method: "POST",
916
- path: `/integration/sellers/${this.transport.sellerId}/seller-invoice-links`,
917
- body: input,
918
- rateLimiter: this.limiter
919
- });
922
+ return {
923
+ raw: await this.transport.request({
924
+ method: "POST",
925
+ path: `/integration/sellers/${this.transport.sellerId}/seller-invoice-links`,
926
+ body: input,
927
+ rateLimiter: this.limiter
928
+ })
929
+ };
920
930
  }
921
931
  /** Remove a previously-registered invoice link. */
922
932
  async deleteLink(input) {
923
- return this.transport.request({
924
- method: "POST",
925
- path: `/integration/sellers/${this.transport.sellerId}/seller-invoice-links/delete`,
926
- body: input,
927
- rateLimiter: this.limiter
928
- });
933
+ return {
934
+ raw: await this.transport.request({
935
+ method: "POST",
936
+ path: `/integration/sellers/${this.transport.sellerId}/seller-invoice-links/delete`,
937
+ body: input,
938
+ rateLimiter: this.limiter
939
+ })
940
+ };
929
941
  }
930
942
  };
931
943
  var LabelsResource = class {
@@ -1958,6 +1970,11 @@ var ProductsResource = class {
1958
1970
  * List approved products. Use `paginate()` from `@lonca/core` to iterate
1959
1971
  * lazily across pages.
1960
1972
  *
1973
+ * **Approved only:** this endpoint silently excludes products still in review
1974
+ * or rejected — use {@link listUnapproved} for those. Date fields on the
1975
+ * returned {@link Product} (`createdAt` / `updatedAt`) are ISO 8601 UTC
1976
+ * **strings**, not `Date` objects.
1977
+ *
1961
1978
  * Trendyol exposes both page-based and `nextPageToken`-based pagination
1962
1979
  * (the latter required when the dataset exceeds 10,000 items). The SDK
1963
1980
  * picks the right strategy automatically — pass our opaque `cursor` from