Skip to content

Commit 47e6cd0

Browse files
salacosteclaude
andcommitted
chore(release): v3.6.2 — kizMarked marking code support for product cards
Sprint 8 — WB API update 2026-04-09: mandatory marking code confirmation. Adds `kizMarked?: boolean` to product card create/update/list/trash methods, enabling sellers to confirm via API that products carry the mandatory Честный ЗНАК (honest mark) marking code. Also adds missing `needKiz?: boolean` to getCardsTrash response where it was absent (pre-existing gap). Changes: - src/modules/products/index.ts: 7 kizMarked edits + 2 needKiz additions across createCardsUpload, createUploadAdd, createCardsUpdate (request), getCardsList, getTrashedCards (response — both method signature and client.post<T> duplicate inline types) - tests/unit/modules/products-crud-critical.test.ts: 5 regression tests (request-side for all 3 create/update methods + response-side for getCardsList and getTrashedCards) Code review findings (3M+2L) all fixed in same commit: - M1: getCardsTrash client.post<T> was missing needKiz+kizMarked (indent mismatch) - M2: Added 2 extra request-side regression tests (createCardsUpdate, createUploadAdd) - M3: Cleaned build artifact - L1: Added JSDoc to getCardsList client.post copy - L2: Fixed test description naming (getCardsTrash → getTrashedCards) Validation: type-check ✓, lint ✓, 2080 tests passed, DX integration test ✓ (fresh /tmp project, tsc --noEmit with kizMarked:true in createCardsUpload) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 285497c commit 47e6cd0

5 files changed

Lines changed: 142 additions & 4 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": "3.6.1",
3+
"version": "3.6.2",
44
"description": "Full-featured TypeScript SDK providing type-safe access to all Wildberries marketplace API methods",
55
"keywords": [
66
"wildberries",

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -625,7 +625,7 @@ export class WildberriesSDK {
625625
/**
626626
* SDK version
627627
*/
628-
export const version = '3.6.1';
628+
export const version = '3.6.2';
629629

630630
// Main SDK class
631631
export { WildberriesSDK as default };

src/modules/products/index.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -646,6 +646,8 @@ export class ProductsModule {
646646
title?: string;
647647
description?: string;
648648
needKiz?: boolean;
649+
/** Confirmed mandatory marking code (Честный ЗНАК) applied to product @since v3.6.2 */
650+
kizMarked?: boolean;
649651
photos?: {
650652
big?: string;
651653
c246x328?: string;
@@ -705,6 +707,8 @@ export class ProductsModule {
705707
title?: string;
706708
description?: string;
707709
needKiz?: boolean;
710+
/** Confirmed mandatory marking code (Честный ЗНАК) applied to product @since v3.6.2 */
711+
kizMarked?: boolean;
708712
photos?: {
709713
big?: string;
710714
c246x328?: string;
@@ -809,6 +813,8 @@ export class ProductsModule {
809813
dimensions?: { length?: number; width?: number; height?: number; weightBrutto?: number };
810814
characteristics?: { id: number; value: unknown }[];
811815
sizes: { chrtID?: number; techSize?: string; wbSize?: string; skus?: string[] }[];
816+
/** Confirmed mandatory marking code (Честный ЗНАК) applied to product. Default: false. @since v3.6.2 */
817+
kizMarked?: boolean;
812818
}[]
813819
): Promise<ResponseCardCreate> {
814820
return this.client.post<ResponseCardCreate>(
@@ -985,6 +991,10 @@ export class ProductsModule {
985991
isValid?: boolean;
986992
};
987993
characteristics?: { id?: number; name?: string; value?: unknown }[];
994+
/** Whether a mandatory marking code (Честный ЗНАК) is required for this product */
995+
needKiz?: boolean;
996+
/** Confirmed mandatory marking code (Честный ЗНАК) applied to product @since v3.6.2 */
997+
kizMarked?: boolean;
988998
createdAt?: string;
989999
trashedAt?: string;
9901000
}[];
@@ -1014,6 +1024,8 @@ export class ProductsModule {
10141024
isValid?: boolean;
10151025
};
10161026
characteristics?: { id?: number; name?: string; value?: unknown }[];
1027+
needKiz?: boolean;
1028+
kizMarked?: boolean;
10171029
createdAt?: string;
10181030
trashedAt?: string;
10191031
}[];
@@ -1136,6 +1148,8 @@ export class ProductsModule {
11361148
dimensions?: { length?: number; width?: number; height?: number; weightBrutto?: number };
11371149
sizes?: { techSize?: string; wbSize?: string; price?: number; skus?: string[] }[];
11381150
characteristics?: { id: number; value: unknown }[];
1151+
/** Confirmed mandatory marking code (Честный ЗНАК) applied to product. Default: false. @since v3.6.2 */
1152+
kizMarked?: boolean;
11391153
}[];
11401154
}[]
11411155
): Promise<ResponseCardCreate> {
@@ -1185,6 +1199,8 @@ export class ProductsModule {
11851199
dimensions?: { length?: number; width?: number; height?: number; weightBrutto?: number };
11861200
sizes?: { techSize?: string; wbSize?: string; price?: number; skus?: string[] }[];
11871201
characteristics?: { id: number; value: unknown }[];
1202+
/** Confirmed mandatory marking code (Честный ЗНАК) applied to product. Default: false. @since v3.6.2 */
1203+
kizMarked?: boolean;
11881204
}[];
11891205
}): Promise<ResponseCardCreate> {
11901206
return this.client.post<ResponseCardCreate>(

tests/unit/index.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ describe('SDK Index', () => {
88
expect(version).toMatch(/^\d+\.\d+\.\d+$/);
99
});
1010

11-
it('should have version 3.6.1', () => {
12-
expect(version).toBe('3.6.1');
11+
it('should have version 3.6.2', () => {
12+
expect(version).toBe('3.6.2');
1313
});
1414
});

tests/unit/modules/products-crud-critical.test.ts

Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1181,4 +1181,126 @@ describe('ProductsModule - Critical CRUD Operations', () => {
11811181
).rejects.toThrow(AuthenticationError);
11821182
});
11831183
});
1184+
1185+
// ============================================================================
1186+
// v3.6.2 Regression: kizMarked marking code field
1187+
// Source: WB API update 2026-04-09 — mandatory marking code confirmation
1188+
// Quinn's rule: every type change ships with a test that fails if the type is removed
1189+
// ============================================================================
1190+
1191+
describe('kizMarked marking code field (v3.6.2)', () => {
1192+
it('should accept kizMarked: true in createCardsUpload request', async () => {
1193+
mockClient.post.mockResolvedValue({ data: {}, error: false, errorText: '' });
1194+
1195+
await productsModule.createCardsUpload([
1196+
{
1197+
subjectID: 105,
1198+
variants: [
1199+
{
1200+
vendorCode: 'KIZ-001',
1201+
sizes: [{ techSize: '42', skus: ['1234567890123'] }],
1202+
characteristics: [{ id: 1, value: 'Test' }],
1203+
kizMarked: true,
1204+
},
1205+
],
1206+
},
1207+
]);
1208+
1209+
expect(mockClient.post).toHaveBeenCalledWith(
1210+
'https://content-api.wildberries.ru/content/v2/cards/upload',
1211+
expect.arrayContaining([
1212+
expect.objectContaining({
1213+
variants: expect.arrayContaining([expect.objectContaining({ kizMarked: true })]),
1214+
}),
1215+
]),
1216+
expect.anything()
1217+
);
1218+
});
1219+
1220+
it('should accept kizMarked: true in createCardsUpdate request', async () => {
1221+
mockClient.post.mockResolvedValue({ data: {}, error: false, errorText: '' });
1222+
1223+
await productsModule.createCardsUpdate([
1224+
{
1225+
nmID: 12345,
1226+
vendorCode: 'KIZ-UPD',
1227+
sizes: [{ techSize: '42' }],
1228+
kizMarked: true,
1229+
},
1230+
]);
1231+
1232+
expect(mockClient.post).toHaveBeenCalledWith(
1233+
'https://content-api.wildberries.ru/content/v2/cards/update',
1234+
expect.arrayContaining([expect.objectContaining({ kizMarked: true })]),
1235+
expect.anything()
1236+
);
1237+
});
1238+
1239+
it('should accept kizMarked: true in createUploadAdd request', async () => {
1240+
mockClient.post.mockResolvedValue({ data: {}, error: false, errorText: '' });
1241+
1242+
await productsModule.createUploadAdd({
1243+
imtID: 98765,
1244+
cardsToAdd: [
1245+
{
1246+
vendorCode: 'KIZ-ADD',
1247+
sizes: [{ techSize: '44', skus: ['9999999999999'] }],
1248+
characteristics: [{ id: 1, value: 'Test' }],
1249+
kizMarked: true,
1250+
},
1251+
],
1252+
});
1253+
1254+
expect(mockClient.post).toHaveBeenCalledWith(
1255+
'https://content-api.wildberries.ru/content/v2/cards/upload/add',
1256+
expect.objectContaining({
1257+
cardsToAdd: expect.arrayContaining([expect.objectContaining({ kizMarked: true })]),
1258+
}),
1259+
expect.anything()
1260+
);
1261+
});
1262+
1263+
it('should expose kizMarked and needKiz on getCardsList response', async () => {
1264+
const mockResponse = {
1265+
cards: [
1266+
{
1267+
nmID: 12345,
1268+
vendorCode: 'KIZ-001',
1269+
needKiz: true,
1270+
kizMarked: true,
1271+
},
1272+
],
1273+
cursor: { total: 1 },
1274+
};
1275+
mockClient.post.mockResolvedValue(mockResponse);
1276+
1277+
const result = await productsModule.getCardsList({
1278+
settings: { cursor: { limit: 10 } },
1279+
});
1280+
1281+
expect(result.cards?.[0].needKiz).toBe(true);
1282+
expect(result.cards?.[0].kizMarked).toBe(true);
1283+
});
1284+
1285+
it('should expose kizMarked and needKiz on getTrashedCards response', async () => {
1286+
const mockResponse = {
1287+
cards: [
1288+
{
1289+
nmID: 99999,
1290+
vendorCode: 'TRASHED-001',
1291+
needKiz: false,
1292+
kizMarked: true,
1293+
trashedAt: '2026-04-09T00:00:00Z',
1294+
},
1295+
],
1296+
cursor: { total: 1 },
1297+
};
1298+
mockClient.post.mockResolvedValue(mockResponse);
1299+
1300+
const result = await productsModule.getTrashedCards({});
1301+
1302+
expect(result.cards?.[0].needKiz).toBe(false);
1303+
expect(result.cards?.[0].kizMarked).toBe(true);
1304+
});
1305+
});
11841306
});

0 commit comments

Comments
 (0)