@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.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { f as BatchRequestStatus,
|
|
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,
|
|
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
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
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
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
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
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
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
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
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
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
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
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
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
|