Skip to content

Commit 5a32e17

Browse files
committed
chore: bump to v2.9.0, strengthen deprecation warnings
- Version bump: 2.7.0 → 2.9.0 - Change deprecation warnings to "FINAL WARNING" for urgency - Add "next version (v3.0.0)" and "last chance" language - Include migration guide URL in all warnings
1 parent 3c926ab commit 5a32e17

9 files changed

Lines changed: 109 additions & 58 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "daytona-wildberries-typescript-sdk",
3-
"version": "2.7.0",
3+
"version": "2.9.0",
44
"description": "Full-featured TypeScript SDK providing type-safe access to all Wildberries marketplace API methods",
55
"keywords": [
66
"wildberries",

src/modules/analytics/index.ts

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,9 @@ export class AnalyticsModule {
5959
// eslint-disable-next-line @typescript-eslint/no-deprecated
6060
async createNmReportDetail(data: NmReportDetailRequest): Promise<NmReportDetailResponse> {
6161
console.warn(
62-
'[Wildberries SDK] DEPRECATION WARNING: createNmReportDetail() is deprecated and will be removed in v3.0.0. ' +
63-
'Please migrate to getSalesFunnelProducts(). See: https://github.com/salacoste/daytona-wildberries-typescript-sdk/blob/main/docs/guides/migration-v3.md'
62+
'[Wildberries SDK] FINAL WARNING: createNmReportDetail() will be REMOVED in the NEXT version (v3.0.0). ' +
63+
'This is your last chance to migrate to getSalesFunnelProducts(). ' +
64+
'See: https://github.com/salacoste/daytona-wildberries-typescript-sdk/blob/main/docs/guides/migration-v3.md'
6465
);
6566
const page = data.page || 1;
6667
const v3Request: SalesFunnelProductsRequest = {
@@ -88,8 +89,9 @@ export class AnalyticsModule {
8889
// eslint-disable-next-line @typescript-eslint/no-deprecated
8990
): Promise<NmReportDetailHistoryResponse> {
9091
console.warn(
91-
'[Wildberries SDK] DEPRECATION WARNING: createDetailHistory() is deprecated and will be removed in v3.0.0. ' +
92-
'Please migrate to getSalesFunnelProductsHistory(). See: https://github.com/salacoste/daytona-wildberries-typescript-sdk/blob/main/docs/guides/migration-v3.md'
92+
'[Wildberries SDK] FINAL WARNING: createDetailHistory() will be REMOVED in the NEXT version (v3.0.0). ' +
93+
'This is your last chance to migrate to getSalesFunnelProductsHistory(). ' +
94+
'See: https://github.com/salacoste/daytona-wildberries-typescript-sdk/blob/main/docs/guides/migration-v3.md'
9395
);
9496
const v3Request: SalesFunnelProductsHistoryRequest = {
9597
selectedPeriod: { start: data.period.begin ?? '', end: data.period.end ?? '' },
@@ -117,8 +119,9 @@ export class AnalyticsModule {
117119
data: NmReportGroupedHistoryRequest
118120
): Promise<NmReportGroupedHistoryResponse> {
119121
console.warn(
120-
'[Wildberries SDK] DEPRECATION WARNING: createGroupedHistory() is deprecated and will be removed in v3.0.0. ' +
121-
'Please migrate to getSalesFunnelGroupedHistory(). See: https://github.com/salacoste/daytona-wildberries-typescript-sdk/blob/main/docs/guides/migration-v3.md'
122+
'[Wildberries SDK] FINAL WARNING: createGroupedHistory() will be REMOVED in the NEXT version (v3.0.0). ' +
123+
'This is your last chance to migrate to getSalesFunnelGroupedHistory(). ' +
124+
'See: https://github.com/salacoste/daytona-wildberries-typescript-sdk/blob/main/docs/guides/migration-v3.md'
122125
);
123126
const v3Request: SalesFunnelGroupedHistoryRequest = {
124127
selectedPeriod: { start: data.period.begin ?? '', end: data.period.end ?? '' },

src/modules/communications/index.ts

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,9 @@ export class CommunicationsModule {
451451
if (!CommunicationsModule._deprecatedWarnings.has('supplierValuations')) {
452452
CommunicationsModule._deprecatedWarnings.add('supplierValuations');
453453
console.warn(
454-
'[WB SDK] supplierValuations is deprecated and may be removed. This endpoint has been removed from the Wildberries API.'
454+
'[Wildberries SDK] FINAL WARNING: supplierValuations() will be REMOVED in the NEXT version (v3.0.0). ' +
455+
'This is your last chance to migrate - endpoint removed from Wildberries API. ' +
456+
'See: https://github.com/salacoste/daytona-wildberries-typescript-sdk/blob/main/docs/guides/migration-v3.md'
455457
);
456458
}
457459
return this.client.get<{
@@ -510,7 +512,9 @@ export class CommunicationsModule {
510512
if (!CommunicationsModule._deprecatedWarnings.has('createFeedbacksAction')) {
511513
CommunicationsModule._deprecatedWarnings.add('createFeedbacksAction');
512514
console.warn(
513-
'[WB SDK] createFeedbacksAction is deprecated and may be removed. This endpoint has been removed from the Wildberries API.'
515+
'[Wildberries SDK] FINAL WARNING: createFeedbacksAction() will be REMOVED in the NEXT version (v3.0.0). ' +
516+
'This is your last chance to migrate - endpoint removed from Wildberries API. ' +
517+
'See: https://github.com/salacoste/daytona-wildberries-typescript-sdk/blob/main/docs/guides/migration-v3.md'
514518
);
515519
}
516520
return this.client.post('https://feedbacks-api.wildberries.ru/api/v1/feedbacks/actions', data, {
@@ -754,7 +758,9 @@ export class CommunicationsModule {
754758
if (!CommunicationsModule._deprecatedWarnings.has('templates')) {
755759
CommunicationsModule._deprecatedWarnings.add('templates');
756760
console.warn(
757-
'[WB SDK] templates is deprecated and may be removed. This endpoint has been removed from the Wildberries API.'
761+
'[Wildberries SDK] FINAL WARNING: templates() will be REMOVED in the NEXT version (v3.0.0). ' +
762+
'This is your last chance to migrate - endpoint removed from Wildberries API. ' +
763+
'See: https://github.com/salacoste/daytona-wildberries-typescript-sdk/blob/main/docs/guides/migration-v3.md'
758764
);
759765
}
760766
return this.client.get<ResponseTemplate>(
@@ -789,7 +795,9 @@ export class CommunicationsModule {
789795
if (!CommunicationsModule._deprecatedWarnings.has('createTemplate')) {
790796
CommunicationsModule._deprecatedWarnings.add('createTemplate');
791797
console.warn(
792-
'[WB SDK] createTemplate is deprecated and may be removed. This endpoint has been removed from the Wildberries API.'
798+
'[Wildberries SDK] FINAL WARNING: createTemplate() will be REMOVED in the NEXT version (v3.0.0). ' +
799+
'This is your last chance to migrate - endpoint removed from Wildberries API. ' +
800+
'See: https://github.com/salacoste/daytona-wildberries-typescript-sdk/blob/main/docs/guides/migration-v3.md'
793801
);
794802
}
795803
return this.client.post<PostTemplate>(
@@ -825,7 +833,9 @@ export class CommunicationsModule {
825833
if (!CommunicationsModule._deprecatedWarnings.has('updateTemplate')) {
826834
CommunicationsModule._deprecatedWarnings.add('updateTemplate');
827835
console.warn(
828-
'[WB SDK] updateTemplate is deprecated and may be removed. This endpoint has been removed from the Wildberries API.'
836+
'[Wildberries SDK] FINAL WARNING: updateTemplate() will be REMOVED in the NEXT version (v3.0.0). ' +
837+
'This is your last chance to migrate - endpoint removed from Wildberries API. ' +
838+
'See: https://github.com/salacoste/daytona-wildberries-typescript-sdk/blob/main/docs/guides/migration-v3.md'
829839
);
830840
}
831841
return this.client.patch<PatchDelResp>(
@@ -857,7 +867,9 @@ export class CommunicationsModule {
857867
if (!CommunicationsModule._deprecatedWarnings.has('deleteTemplate')) {
858868
CommunicationsModule._deprecatedWarnings.add('deleteTemplate');
859869
console.warn(
860-
'[WB SDK] deleteTemplate is deprecated and may be removed. This endpoint has been removed from the Wildberries API.'
870+
'[Wildberries SDK] FINAL WARNING: deleteTemplate() will be REMOVED in the NEXT version (v3.0.0). ' +
871+
'This is your last chance to migrate - endpoint removed from Wildberries API. ' +
872+
'See: https://github.com/salacoste/daytona-wildberries-typescript-sdk/blob/main/docs/guides/migration-v3.md'
861873
);
862874
}
863875
return this.client.delete<PatchDelResp>(

src/modules/in-store-pickup/index.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,8 +213,9 @@ export class InStorePickupModule {
213213
*/
214214
async createOrdersStatu(data: ApiOrdersRequest): Promise<ApiOrderStatuses> {
215215
console.warn(
216-
'[Wildberries SDK] DEPRECATION WARNING: createOrdersStatu() is deprecated and will be removed in v3.0.0. ' +
217-
'Please migrate to createOrdersStatus(). See: https://github.com/salacoste/daytona-wildberries-typescript-sdk/blob/main/docs/guides/migration-v3.md'
216+
'[Wildberries SDK] FINAL WARNING: createOrdersStatu() will be REMOVED in the NEXT version (v3.0.0). ' +
217+
'This is your last chance to migrate to createOrdersStatus(). ' +
218+
'See: https://github.com/salacoste/daytona-wildberries-typescript-sdk/blob/main/docs/guides/migration-v3.md'
218219
);
219220
return this.createOrdersStatus(data);
220221
}

src/modules/orders-dbs/index.ts

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -941,8 +941,9 @@ export class OrdersDbsModule {
941941
/** @deprecated Use deliverBulk instead */
942942
async deliver(orderId: number): Promise<void> {
943943
console.warn(
944-
'[Wildberries SDK] DEPRECATION WARNING: deliver() is deprecated and will be removed in v3.0.0. ' +
945-
'Please migrate to deliverBulk(). See: https://github.com/salacoste/daytona-wildberries-typescript-sdk/blob/main/docs/guides/migration-v3.md'
944+
'[Wildberries SDK] FINAL WARNING: deliver() will be REMOVED in the NEXT version (v3.0.0). ' +
945+
'This is your last chance to migrate to deliverBulk(). ' +
946+
'See: https://github.com/salacoste/daytona-wildberries-typescript-sdk/blob/main/docs/guides/migration-v3.md'
946947
);
947948
if (orderId <= 0) {
948949
throw new ValidationError('orderId must be a positive number');
@@ -955,8 +956,9 @@ export class OrdersDbsModule {
955956
/** @deprecated Use receiveBulk instead */
956957
async receive(orderId: number, code: string): Promise<void> {
957958
console.warn(
958-
'[Wildberries SDK] DEPRECATION WARNING: receive() is deprecated and will be removed in v3.0.0. ' +
959-
'Please migrate to receiveBulk(). See: https://github.com/salacoste/daytona-wildberries-typescript-sdk/blob/main/docs/guides/migration-v3.md'
959+
'[Wildberries SDK] FINAL WARNING: receive() will be REMOVED in the NEXT version (v3.0.0). ' +
960+
'This is your last chance to migrate to receiveBulk(). ' +
961+
'See: https://github.com/salacoste/daytona-wildberries-typescript-sdk/blob/main/docs/guides/migration-v3.md'
960962
);
961963
if (orderId <= 0) {
962964
throw new ValidationError('orderId must be a positive number');
@@ -974,8 +976,9 @@ export class OrdersDbsModule {
974976
/** @deprecated Use rejectBulk instead */
975977
async reject(orderId: number, code: string): Promise<void> {
976978
console.warn(
977-
'[Wildberries SDK] DEPRECATION WARNING: reject() is deprecated and will be removed in v3.0.0. ' +
978-
'Please migrate to rejectBulk(). See: https://github.com/salacoste/daytona-wildberries-typescript-sdk/blob/main/docs/guides/migration-v3.md'
979+
'[Wildberries SDK] FINAL WARNING: reject() will be REMOVED in the NEXT version (v3.0.0). ' +
980+
'This is your last chance to migrate to rejectBulk(). ' +
981+
'See: https://github.com/salacoste/daytona-wildberries-typescript-sdk/blob/main/docs/guides/migration-v3.md'
979982
);
980983
if (orderId <= 0) {
981984
throw new ValidationError('orderId must be a positive number');
@@ -993,8 +996,9 @@ export class OrdersDbsModule {
993996
/** @deprecated Use cancelBulk instead */
994997
async cancel(orderId: number): Promise<void> {
995998
console.warn(
996-
'[Wildberries SDK] DEPRECATION WARNING: cancel() is deprecated and will be removed in v3.0.0. ' +
997-
'Please migrate to cancelBulk(). See: https://github.com/salacoste/daytona-wildberries-typescript-sdk/blob/main/docs/guides/migration-v3.md'
999+
'[Wildberries SDK] FINAL WARNING: cancel() will be REMOVED in the NEXT version (v3.0.0). ' +
1000+
'This is your last chance to migrate to cancelBulk(). ' +
1001+
'See: https://github.com/salacoste/daytona-wildberries-typescript-sdk/blob/main/docs/guides/migration-v3.md'
9981002
);
9991003
if (orderId <= 0) {
10001004
throw new ValidationError('orderId must be a positive number');

src/modules/orders-fbs/index.ts

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -270,8 +270,9 @@ export class OrdersFbsModule {
270270
*/
271271
async createOrdersStatu(data?: OrderStatusRequest): Promise<OrderStatusResponse> {
272272
console.warn(
273-
'[Wildberries SDK] DEPRECATION WARNING: createOrdersStatu() is deprecated and will be removed in v3.0.0. ' +
274-
'Please migrate to getOrderStatuses(). See: https://github.com/salacoste/daytona-wildberries-typescript-sdk/blob/main/docs/guides/migration-v3.md'
273+
'[Wildberries SDK] FINAL WARNING: createOrdersStatu() will be REMOVED in the NEXT version (v3.0.0). ' +
274+
'This is your last chance to migrate to getOrderStatuses(). ' +
275+
'See: https://github.com/salacoste/daytona-wildberries-typescript-sdk/blob/main/docs/guides/migration-v3.md'
275276
);
276277
return this.client.post<OrderStatusResponse>(
277278
'https://marketplace-api.wildberries.ru/api/v3/orders/status',
@@ -390,8 +391,9 @@ export class OrdersFbsModule {
390391
*/
391392
async getOrdersMeta(orderId: number): Promise<OrderMetaResponse> {
392393
console.warn(
393-
'[Wildberries SDK] DEPRECATION WARNING: getOrdersMeta() is deprecated and will be removed in v3.0.0. ' +
394-
'Please migrate to getOrdersMetaBulk(). See: https://github.com/salacoste/daytona-wildberries-typescript-sdk/blob/main/docs/guides/migration-v3.md'
394+
'[Wildberries SDK] FINAL WARNING: getOrdersMeta() will be REMOVED in the NEXT version (v3.0.0). ' +
395+
'This is your last chance to migrate to getOrdersMetaBulk(). ' +
396+
'See: https://github.com/salacoste/daytona-wildberries-typescript-sdk/blob/main/docs/guides/migration-v3.md'
395397
);
396398
const response = await this.getOrdersMetaBulk({ orders: [orderId] });
397399
const orderMeta = response.orders?.find((o) => o.id === orderId);
@@ -796,8 +798,9 @@ export class OrdersFbsModule {
796798
*/
797799
async updateSuppliesOrder(supplyId: string, orderId: number): Promise<void> {
798800
console.warn(
799-
'[Wildberries SDK] DEPRECATION WARNING: updateSuppliesOrder() is deprecated and will be removed in v3.0.0. ' +
800-
'Please migrate to addOrdersToSupply(). See: https://github.com/salacoste/daytona-wildberries-typescript-sdk/blob/main/docs/guides/migration-v3.md'
801+
'[Wildberries SDK] FINAL WARNING: updateSuppliesOrder() will be REMOVED in the NEXT version (v3.0.0). ' +
802+
'This is your last chance to migrate to addOrdersToSupply(). ' +
803+
'See: https://github.com/salacoste/daytona-wildberries-typescript-sdk/blob/main/docs/guides/migration-v3.md'
801804
);
802805
return this.client.patch(
803806
`https://marketplace-api.wildberries.ru/api/v3/supplies/${supplyId}/orders/${orderId}`,
@@ -882,8 +885,9 @@ export class OrdersFbsModule {
882885
*/
883886
async getSuppliesOrder(supplyId: string): Promise<SupplyOrdersResponse> {
884887
console.warn(
885-
'[Wildberries SDK] DEPRECATION WARNING: getSuppliesOrder() is deprecated and will be removed in v3.0.0. ' +
886-
'Please migrate to getSupplyOrderIds(). See: https://github.com/salacoste/daytona-wildberries-typescript-sdk/blob/main/docs/guides/migration-v3.md'
888+
'[Wildberries SDK] FINAL WARNING: getSuppliesOrder() will be REMOVED in the NEXT version (v3.0.0). ' +
889+
'This is your last chance to migrate to getSupplyOrderIds(). ' +
890+
'See: https://github.com/salacoste/daytona-wildberries-typescript-sdk/blob/main/docs/guides/migration-v3.md'
887891
);
888892
return this.client.get<SupplyOrdersResponse>(
889893
`https://marketplace-api.wildberries.ru/api/v3/supplies/${supplyId}/orders`,

src/modules/products/index.ts

Lines changed: 21 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -791,8 +791,9 @@ export class ProductsModule {
791791
cursor?: { updatedAt?: string; nmID?: number; total?: number };
792792
}> {
793793
console.warn(
794-
'[Wildberries SDK] DEPRECATION WARNING: createCardsList() is deprecated and will be removed in v3.0.0. ' +
795-
'Please migrate to getCardsList(). See: https://github.com/salacoste/daytona-wildberries-typescript-sdk/blob/main/docs/guides/migration-v3.md'
794+
'[Wildberries SDK] FINAL WARNING: createCardsList() will be REMOVED in the NEXT version (v3.0.0). ' +
795+
'This is your last chance to migrate to getCardsList(). ' +
796+
'See: https://github.com/salacoste/daytona-wildberries-typescript-sdk/blob/main/docs/guides/migration-v3.md'
796797
);
797798
return this.getCardsList(data, options);
798799
}
@@ -1129,8 +1130,9 @@ export class ProductsModule {
11291130
cursor?: { trashedAt?: string; nmID?: number; total?: number };
11301131
}> {
11311132
console.warn(
1132-
'[Wildberries SDK] DEPRECATION WARNING: createCardsTrash() is deprecated and will be removed in v3.0.0. ' +
1133-
'Please migrate to getTrashedCards(). See: https://github.com/salacoste/daytona-wildberries-typescript-sdk/blob/main/docs/guides/migration-v3.md'
1133+
'[Wildberries SDK] FINAL WARNING: createCardsTrash() will be REMOVED in the NEXT version (v3.0.0). ' +
1134+
'This is your last chance to migrate to getTrashedCards(). ' +
1135+
'See: https://github.com/salacoste/daytona-wildberries-typescript-sdk/blob/main/docs/guides/migration-v3.md'
11341136
);
11351137
return this.getTrashedCards(data, options);
11361138
}
@@ -1608,8 +1610,9 @@ export class ProductsModule {
16081610
uploadID: number;
16091611
}): Promise<GoodsBufferResponse> {
16101612
console.warn(
1611-
'[Wildberries SDK] DEPRECATION WARNING: getGoodsTask2() is deprecated and will be removed in v3.0.0. ' +
1612-
'Please migrate to getBufferGoodsTask(). See: https://github.com/salacoste/daytona-wildberries-typescript-sdk/blob/main/docs/guides/migration-v3.md'
1613+
'[Wildberries SDK] FINAL WARNING: getGoodsTask2() will be REMOVED in the NEXT version (v3.0.0). ' +
1614+
'This is your last chance to migrate to getBufferGoodsTask(). ' +
1615+
'See: https://github.com/salacoste/daytona-wildberries-typescript-sdk/blob/main/docs/guides/migration-v3.md'
16131616
);
16141617
return this.getBufferGoodsTask(options);
16151618
}
@@ -1786,8 +1789,9 @@ export class ProductsModule {
17861789
data: { skus: string[] }
17871790
): Promise<{ stocks?: { sku?: string; amount?: number }[] }> {
17881791
console.warn(
1789-
'[Wildberries SDK] DEPRECATION WARNING: createStock() is deprecated and will be removed in v3.0.0. ' +
1790-
'Please migrate to getStocks(). See: https://github.com/salacoste/daytona-wildberries-typescript-sdk/blob/main/docs/guides/migration-v3.md'
1792+
'[Wildberries SDK] FINAL WARNING: createStock() will be REMOVED in the NEXT version (v3.0.0). ' +
1793+
'This is your last chance to migrate to getStocks(). ' +
1794+
'See: https://github.com/salacoste/daytona-wildberries-typescript-sdk/blob/main/docs/guides/migration-v3.md'
17911795
);
17921796
return this.getStocks(warehouseId, data);
17931797
}
@@ -1944,8 +1948,9 @@ export class ProductsModule {
19441948
*/
19451949
async createWarehous(data: { name: string; officeId: number }): Promise<{ id?: number }> {
19461950
console.warn(
1947-
'[Wildberries SDK] DEPRECATION WARNING: createWarehous() is deprecated and will be removed in v3.0.0. ' +
1948-
'Please migrate to createWarehouse(). See: https://github.com/salacoste/daytona-wildberries-typescript-sdk/blob/main/docs/guides/migration-v3.md'
1951+
'[Wildberries SDK] FINAL WARNING: createWarehous() will be REMOVED in the NEXT version (v3.0.0). ' +
1952+
'This is your last chance to migrate to createWarehouse(). ' +
1953+
'See: https://github.com/salacoste/daytona-wildberries-typescript-sdk/blob/main/docs/guides/migration-v3.md'
19491954
);
19501955
return this.createWarehouse(data);
19511956
}
@@ -1992,8 +1997,9 @@ export class ProductsModule {
19921997
data: { name: string; officeId: number }
19931998
): Promise<void> {
19941999
console.warn(
1995-
'[Wildberries SDK] DEPRECATION WARNING: updateWarehous() is deprecated and will be removed in v3.0.0. ' +
1996-
'Please migrate to updateWarehouse(). See: https://github.com/salacoste/daytona-wildberries-typescript-sdk/blob/main/docs/guides/migration-v3.md'
2000+
'[Wildberries SDK] FINAL WARNING: updateWarehous() will be REMOVED in the NEXT version (v3.0.0). ' +
2001+
'This is your last chance to migrate to updateWarehouse(). ' +
2002+
'See: https://github.com/salacoste/daytona-wildberries-typescript-sdk/blob/main/docs/guides/migration-v3.md'
19972003
);
19982004
return this.updateWarehouse(warehouseId, data);
19992005
}
@@ -2030,8 +2036,9 @@ export class ProductsModule {
20302036
*/
20312037
async deleteWarehous(warehouseId: number): Promise<void> {
20322038
console.warn(
2033-
'[Wildberries SDK] DEPRECATION WARNING: deleteWarehous() is deprecated and will be removed in v3.0.0. ' +
2034-
'Please migrate to deleteWarehouse(). See: https://github.com/salacoste/daytona-wildberries-typescript-sdk/blob/main/docs/guides/migration-v3.md'
2039+
'[Wildberries SDK] FINAL WARNING: deleteWarehous() will be REMOVED in the NEXT version (v3.0.0). ' +
2040+
'This is your last chance to migrate to deleteWarehouse(). ' +
2041+
'See: https://github.com/salacoste/daytona-wildberries-typescript-sdk/blob/main/docs/guides/migration-v3.md'
20352042
);
20362043
return this.deleteWarehouse(warehouseId);
20372044
}

0 commit comments

Comments
 (0)