@lonca/trendyol 0.12.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/README.md +6 -6
- package/dist/{client-BJjLOn4v.d.cts → client-CtygosAW.d.cts} +64 -25
- package/dist/{client-BJjLOn4v.d.ts → client-CtygosAW.d.ts} +64 -25
- package/dist/index.cjs +83 -45
- 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 +83 -45
- package/dist/index.js.map +1 -1
- package/dist/testing.cjs +83 -45
- 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 +83 -45
- package/dist/testing.js.map +1 -1
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
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
|
|
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 {
|
|
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
|
|
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
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
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
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
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
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
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).
|
|
@@ -715,12 +721,20 @@ var FinanceResource = class {
|
|
|
715
721
|
);
|
|
716
722
|
}
|
|
717
723
|
async queryPage(path, params) {
|
|
718
|
-
|
|
724
|
+
if (!params.transactionType) {
|
|
725
|
+
throw new ValidationError({
|
|
726
|
+
message: "finance: transactionType is required (Trendyol returns 500 without it) \u2014 pass e.g. { transactionType: 'Sale' }."
|
|
727
|
+
});
|
|
728
|
+
}
|
|
729
|
+
const size = (params.limit ?? 500) > 500 ? 1e3 : 500;
|
|
719
730
|
const page = params.cursor ? Number.parseInt(params.cursor, 10) : 0;
|
|
720
|
-
const query = {
|
|
731
|
+
const query = {
|
|
732
|
+
page,
|
|
733
|
+
size,
|
|
734
|
+
transactionType: params.transactionType
|
|
735
|
+
};
|
|
721
736
|
if (params.startDate) query.startDate = params.startDate.getTime();
|
|
722
737
|
if (params.endDate) query.endDate = params.endDate.getTime();
|
|
723
|
-
if (params.transactionType) query.transactionType = params.transactionType;
|
|
724
738
|
const data = await this.transport.request({
|
|
725
739
|
method: "GET",
|
|
726
740
|
path,
|
|
@@ -892,33 +906,39 @@ var InvoicesResource = class {
|
|
|
892
906
|
if (input.invoiceNumber !== void 0) {
|
|
893
907
|
form.append("invoiceNumber", input.invoiceNumber);
|
|
894
908
|
}
|
|
895
|
-
return
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
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
|
+
};
|
|
901
917
|
}
|
|
902
918
|
/** Register an invoice URL with Trendyol (alternative to uploading the file). */
|
|
903
919
|
async sendLink(input) {
|
|
904
920
|
if (!input?.invoiceLink) {
|
|
905
921
|
throw new ValidationError({ message: "invoices.sendLink: invoiceLink is required" });
|
|
906
922
|
}
|
|
907
|
-
return
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
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
|
+
};
|
|
913
931
|
}
|
|
914
932
|
/** Remove a previously-registered invoice link. */
|
|
915
933
|
async deleteLink(input) {
|
|
916
|
-
return
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
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
|
+
};
|
|
922
942
|
}
|
|
923
943
|
};
|
|
924
944
|
var LabelsResource = class {
|
|
@@ -997,22 +1017,32 @@ var LocationsResource = class {
|
|
|
997
1017
|
async getTurkeyCities() {
|
|
998
1018
|
return this.cities(`/integration/member/countries/domestic/TR/cities`);
|
|
999
1019
|
}
|
|
1000
|
-
|
|
1020
|
+
/**
|
|
1021
|
+
* List districts for a Turkish city. **Pass the city `id`** (`City.id`) — the
|
|
1022
|
+
* nested endpoint keys off Trendyol's internal id, not the display `code`, and
|
|
1023
|
+
* returns 500 for the code. Verified live.
|
|
1024
|
+
*/
|
|
1025
|
+
async getTurkeyDistricts(cityId) {
|
|
1001
1026
|
return this.districts(
|
|
1002
|
-
`/integration/member/countries/domestic/TR/cities/${encodeURIComponent(String(
|
|
1027
|
+
`/integration/member/countries/domestic/TR/cities/${encodeURIComponent(String(cityId))}/districts`
|
|
1003
1028
|
);
|
|
1004
1029
|
}
|
|
1005
|
-
|
|
1030
|
+
/**
|
|
1031
|
+
* List neighborhoods for a Turkish district. **Pass the ids** (`City.id`,
|
|
1032
|
+
* `District.id`) — not the display codes (those 500).
|
|
1033
|
+
*/
|
|
1034
|
+
async getTurkeyNeighborhoods(cityId, districtId) {
|
|
1006
1035
|
return this.neighborhoods(
|
|
1007
|
-
`/integration/member/countries/domestic/TR/cities/${encodeURIComponent(String(
|
|
1036
|
+
`/integration/member/countries/domestic/TR/cities/${encodeURIComponent(String(cityId))}/districts/${encodeURIComponent(String(districtId))}/neighborhoods`
|
|
1008
1037
|
);
|
|
1009
1038
|
}
|
|
1010
1039
|
async getAzerbaijanCities() {
|
|
1011
1040
|
return this.cities(`/integration/member/countries/domestic/AZ/cities`);
|
|
1012
1041
|
}
|
|
1013
|
-
|
|
1042
|
+
/** List districts for an Azerbaijani city. **Pass the city `id`** (`City.id`), not `code`. */
|
|
1043
|
+
async getAzerbaijanDistricts(cityId) {
|
|
1014
1044
|
return this.districts(
|
|
1015
|
-
`/integration/member/countries/domestic/AZ/cities/${encodeURIComponent(String(
|
|
1045
|
+
`/integration/member/countries/domestic/AZ/cities/${encodeURIComponent(String(cityId))}/districts`
|
|
1016
1046
|
);
|
|
1017
1047
|
}
|
|
1018
1048
|
// ─── International (GULF / CEE) ───────────────────────────────────────
|
|
@@ -1032,6 +1062,7 @@ var LocationsResource = class {
|
|
|
1032
1062
|
rateLimiter: this.limiter
|
|
1033
1063
|
});
|
|
1034
1064
|
return n(data, (node) => ({
|
|
1065
|
+
id: node.id !== void 0 ? String(node.id) : void 0,
|
|
1035
1066
|
code: String(node.code ?? node.id ?? ""),
|
|
1036
1067
|
name: node.name,
|
|
1037
1068
|
countryCode: node.countryCode
|
|
@@ -1044,6 +1075,7 @@ var LocationsResource = class {
|
|
|
1044
1075
|
rateLimiter: this.limiter
|
|
1045
1076
|
});
|
|
1046
1077
|
return n(data, (node) => ({
|
|
1078
|
+
id: node.id !== void 0 ? String(node.id) : void 0,
|
|
1047
1079
|
code: String(node.code ?? node.id ?? ""),
|
|
1048
1080
|
name: node.name,
|
|
1049
1081
|
cityCode: node.cityCode !== void 0 ? String(node.cityCode) : void 0
|
|
@@ -1056,6 +1088,7 @@ var LocationsResource = class {
|
|
|
1056
1088
|
rateLimiter: this.limiter
|
|
1057
1089
|
});
|
|
1058
1090
|
return n(data, (node) => ({
|
|
1091
|
+
id: node.id !== void 0 ? String(node.id) : void 0,
|
|
1059
1092
|
code: String(node.code ?? node.id ?? ""),
|
|
1060
1093
|
name: node.name,
|
|
1061
1094
|
districtCode: node.districtCode !== void 0 ? String(node.districtCode) : void 0
|
|
@@ -1941,6 +1974,11 @@ var ProductsResource = class {
|
|
|
1941
1974
|
* List approved products. Use `paginate()` from `@lonca/core` to iterate
|
|
1942
1975
|
* lazily across pages.
|
|
1943
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
|
+
*
|
|
1944
1982
|
* Trendyol exposes both page-based and `nextPageToken`-based pagination
|
|
1945
1983
|
* (the latter required when the dataset exceeds 10,000 items). The SDK
|
|
1946
1984
|
* picks the right strategy automatically — pass our opaque `cursor` from
|