@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/{client-DMndJSb0.d.cts → client-CtygosAW.d.cts} +31 -22
- package/dist/{client-DMndJSb0.d.ts → client-CtygosAW.d.ts} +31 -22
- package/dist/index.cjs +53 -36
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +53 -36
- package/dist/index.js.map +1 -1
- package/dist/testing.cjs +53 -36
- package/dist/testing.cjs.map +1 -1
- package/dist/testing.d.cts +1 -1
- package/dist/testing.d.ts +1 -1
- package/dist/testing.js +53 -36
- package/dist/testing.js.map +1 -1
- package/package.json +2 -2
package/dist/testing.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
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
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
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
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
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
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
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
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
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
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
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
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 {
|
|
@@ -1960,6 +1972,11 @@ var ProductsResource = class {
|
|
|
1960
1972
|
* List approved products. Use `paginate()` from `@lonca/core` to iterate
|
|
1961
1973
|
* lazily across pages.
|
|
1962
1974
|
*
|
|
1975
|
+
* **Approved only:** this endpoint silently excludes products still in review
|
|
1976
|
+
* or rejected — use {@link listUnapproved} for those. Date fields on the
|
|
1977
|
+
* returned {@link Product} (`createdAt` / `updatedAt`) are ISO 8601 UTC
|
|
1978
|
+
* **strings**, not `Date` objects.
|
|
1979
|
+
*
|
|
1963
1980
|
* Trendyol exposes both page-based and `nextPageToken`-based pagination
|
|
1964
1981
|
* (the latter required when the dataset exceeds 10,000 items). The SDK
|
|
1965
1982
|
* picks the right strategy automatically — pass our opaque `cursor` from
|