@vitrina/api 14.25.0 → 14.26.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/index.d.cts CHANGED
@@ -45354,6 +45354,307 @@ interface paths {
45354
45354
  };
45355
45355
  trace?: never;
45356
45356
  };
45357
+ "/instagram-posts/vehicles/{vehicleId}/drafts": {
45358
+ parameters: {
45359
+ query?: never;
45360
+ header?: never;
45361
+ path?: never;
45362
+ cookie?: never;
45363
+ };
45364
+ get?: never;
45365
+ put?: never;
45366
+ /**
45367
+ * Prepare an Instagram post for one-click approval
45368
+ * @description What choosing Instagram in a vehicle's "Publicar" step does: prepares a post in `pending_approval` (server-generated caption, the first 10 photos of the gallery) and publishes NOTHING. 201 when created; 200 with the existing post when the vehicle already has one waiting. 422 when the vehicle has no photos or no Instagram account is connected.
45369
+ */
45370
+ post: {
45371
+ parameters: {
45372
+ query?: never;
45373
+ header?: {
45374
+ /** @description Replay-safe retries: resending the SAME key with the SAME body returns the original response (`X-Idempotent-Replay: 1`) instead of creating a second copy — safe to send whenever a response might not have arrived. The same key with a DIFFERENT body answers `409 IDEMPOTENCY_KEY_CONFLICT`; use a fresh key per operation. */
45375
+ "Idempotency-Key"?: string;
45376
+ };
45377
+ path: {
45378
+ vehicleId: string;
45379
+ };
45380
+ cookie?: never;
45381
+ };
45382
+ requestBody?: never;
45383
+ responses: {
45384
+ /** @description The post already waiting for approval */
45385
+ 200: {
45386
+ headers: {
45387
+ [name: string]: unknown;
45388
+ };
45389
+ content: {
45390
+ "application/json": {
45391
+ data?: unknown;
45392
+ meta?: {
45393
+ [key: string]: unknown;
45394
+ };
45395
+ };
45396
+ };
45397
+ };
45398
+ /** @description The prepared post */
45399
+ 201: {
45400
+ headers: {
45401
+ [name: string]: unknown;
45402
+ };
45403
+ content: {
45404
+ /**
45405
+ * @example {
45406
+ * "data": {
45407
+ * "id": "1a5ea0c1-0000-4000-8000-000000000001",
45408
+ * "vehicle_id": "c4c4c4c4-0000-4000-8000-000000000001",
45409
+ * "status": "pending_approval",
45410
+ * "caption": "⚡️Se vende! Toyota RAV4 Híbrido 2022\n\n$24.990.000\n\n- Automática\n- 38.000 km\n\nEscríbenos por DM.",
45411
+ * "photos": [
45412
+ * {
45413
+ * "photo_index": 0,
45414
+ * "crop": null,
45415
+ * "resolved_url": "https://cdn.vitrinadev.com/vehicles/rav4-1.jpg"
45416
+ * },
45417
+ * {
45418
+ * "photo_index": 1,
45419
+ * "crop": null,
45420
+ * "resolved_url": "https://cdn.vitrinadev.com/vehicles/rav4-2.jpg"
45421
+ * }
45422
+ * ],
45423
+ * "scheduled_at": null,
45424
+ * "published_at": null,
45425
+ * "published_media_id": null,
45426
+ * "messaging_account_id": null,
45427
+ * "error": null,
45428
+ * "created_by": "5e5e5e5e-0000-4000-8000-000000000001",
45429
+ * "created_at": "2026-10-15T14:00:00.000Z",
45430
+ * "updated_at": "2026-10-15T14:00:00.000Z"
45431
+ * }
45432
+ * }
45433
+ */
45434
+ "application/json": {
45435
+ data?: unknown;
45436
+ };
45437
+ };
45438
+ };
45439
+ /** @description Validation error */
45440
+ 400: {
45441
+ headers: {
45442
+ [name: string]: unknown;
45443
+ };
45444
+ content: {
45445
+ "application/json": components["schemas"]["Error"];
45446
+ };
45447
+ };
45448
+ /** @description Unauthorized */
45449
+ 401: {
45450
+ headers: {
45451
+ [name: string]: unknown;
45452
+ };
45453
+ content: {
45454
+ "application/json": components["schemas"]["Error"];
45455
+ };
45456
+ };
45457
+ /** @description Forbidden */
45458
+ 403: {
45459
+ headers: {
45460
+ [name: string]: unknown;
45461
+ };
45462
+ content: {
45463
+ "application/json": components["schemas"]["Error"];
45464
+ };
45465
+ };
45466
+ /** @description Not found */
45467
+ 404: {
45468
+ headers: {
45469
+ [name: string]: unknown;
45470
+ };
45471
+ content: {
45472
+ "application/json": components["schemas"]["Error"];
45473
+ };
45474
+ };
45475
+ /** @description Conflict (incl. Idempotency-Key reuse with different body) */
45476
+ 409: {
45477
+ headers: {
45478
+ [name: string]: unknown;
45479
+ };
45480
+ content: {
45481
+ "application/json": components["schemas"]["Error"];
45482
+ };
45483
+ };
45484
+ /** @description Rate limited */
45485
+ 429: {
45486
+ headers: {
45487
+ [name: string]: unknown;
45488
+ };
45489
+ content: {
45490
+ "application/json": components["schemas"]["Error"];
45491
+ };
45492
+ };
45493
+ };
45494
+ };
45495
+ delete?: never;
45496
+ options?: never;
45497
+ head?: never;
45498
+ patch?: never;
45499
+ trace?: never;
45500
+ };
45501
+ "/instagram-posts/{id}/approve": {
45502
+ parameters: {
45503
+ query?: never;
45504
+ header?: never;
45505
+ path?: never;
45506
+ cookie?: never;
45507
+ };
45508
+ get?: never;
45509
+ put?: never;
45510
+ /**
45511
+ * Approve and publish (or schedule) a prepared Instagram post
45512
+ * @description Publishes a `pending_approval` post, optionally with an edited caption / photo selection, or schedules it when `scheduled_at` is present. Like the compose POST, a publish that Instagram refuses answers 200 with `status: "failed"` and the reason — branch on `status`. 409 when the post is no longer waiting for approval.
45513
+ */
45514
+ post: {
45515
+ parameters: {
45516
+ query?: never;
45517
+ header?: {
45518
+ /** @description Replay-safe retries: resending the SAME key with the SAME body returns the original response (`X-Idempotent-Replay: 1`) instead of creating a second copy — safe to send whenever a response might not have arrived. The same key with a DIFFERENT body answers `409 IDEMPOTENCY_KEY_CONFLICT`; use a fresh key per operation. */
45519
+ "Idempotency-Key"?: string;
45520
+ };
45521
+ path: {
45522
+ id: string;
45523
+ };
45524
+ cookie?: never;
45525
+ };
45526
+ requestBody?: {
45527
+ content: {
45528
+ /**
45529
+ * @example {
45530
+ * "caption": "⚡️Se vende! Toyota RAV4 Híbrido 2022\n\n$24.990.000\n\n- Automática\n- 38.000 km\n\nEscríbenos por DM.",
45531
+ * "scheduled_at": "2026-10-16T13:00:00.000Z"
45532
+ * }
45533
+ */
45534
+ "application/json": {
45535
+ photos?: {
45536
+ photo_index: number;
45537
+ crop?: {
45538
+ preset?: string;
45539
+ x?: number;
45540
+ y?: number;
45541
+ width?: number;
45542
+ height?: number;
45543
+ } | null;
45544
+ }[];
45545
+ caption?: string;
45546
+ /** Format: date-time */
45547
+ scheduled_at?: string;
45548
+ };
45549
+ };
45550
+ };
45551
+ responses: {
45552
+ /** @description The approved post */
45553
+ 200: {
45554
+ headers: {
45555
+ [name: string]: unknown;
45556
+ };
45557
+ content: {
45558
+ /**
45559
+ * @example {
45560
+ * "data": {
45561
+ * "id": "1a5ea0c1-0000-4000-8000-000000000001",
45562
+ * "vehicle_id": "c4c4c4c4-0000-4000-8000-000000000001",
45563
+ * "status": "scheduled",
45564
+ * "caption": "⚡️Se vende! Toyota RAV4 Híbrido 2022\n\n$24.990.000\n\n- Automática\n- 38.000 km\n\nEscríbenos por DM.",
45565
+ * "photos": [
45566
+ * {
45567
+ * "photo_index": 0,
45568
+ * "crop": null,
45569
+ * "resolved_url": "https://cdn.vitrinadev.com/vehicles/rav4-1.jpg"
45570
+ * },
45571
+ * {
45572
+ * "photo_index": 1,
45573
+ * "crop": null,
45574
+ * "resolved_url": "https://cdn.vitrinadev.com/vehicles/rav4-2.jpg"
45575
+ * }
45576
+ * ],
45577
+ * "scheduled_at": "2026-10-16T13:00:00.000Z",
45578
+ * "published_at": null,
45579
+ * "published_media_id": null,
45580
+ * "messaging_account_id": null,
45581
+ * "error": null,
45582
+ * "created_by": "5e5e5e5e-0000-4000-8000-000000000001",
45583
+ * "created_at": "2026-10-15T14:00:00.000Z",
45584
+ * "updated_at": "2026-10-15T14:02:10.000Z"
45585
+ * }
45586
+ * }
45587
+ */
45588
+ "application/json": {
45589
+ data?: unknown;
45590
+ meta?: {
45591
+ [key: string]: unknown;
45592
+ };
45593
+ };
45594
+ };
45595
+ };
45596
+ /** @description Validation error */
45597
+ 400: {
45598
+ headers: {
45599
+ [name: string]: unknown;
45600
+ };
45601
+ content: {
45602
+ "application/json": components["schemas"]["Error"];
45603
+ };
45604
+ };
45605
+ /** @description Unauthorized */
45606
+ 401: {
45607
+ headers: {
45608
+ [name: string]: unknown;
45609
+ };
45610
+ content: {
45611
+ "application/json": components["schemas"]["Error"];
45612
+ };
45613
+ };
45614
+ /** @description Forbidden */
45615
+ 403: {
45616
+ headers: {
45617
+ [name: string]: unknown;
45618
+ };
45619
+ content: {
45620
+ "application/json": components["schemas"]["Error"];
45621
+ };
45622
+ };
45623
+ /** @description Not found */
45624
+ 404: {
45625
+ headers: {
45626
+ [name: string]: unknown;
45627
+ };
45628
+ content: {
45629
+ "application/json": components["schemas"]["Error"];
45630
+ };
45631
+ };
45632
+ /** @description Conflict (incl. Idempotency-Key reuse with different body) */
45633
+ 409: {
45634
+ headers: {
45635
+ [name: string]: unknown;
45636
+ };
45637
+ content: {
45638
+ "application/json": components["schemas"]["Error"];
45639
+ };
45640
+ };
45641
+ /** @description Rate limited */
45642
+ 429: {
45643
+ headers: {
45644
+ [name: string]: unknown;
45645
+ };
45646
+ content: {
45647
+ "application/json": components["schemas"]["Error"];
45648
+ };
45649
+ };
45650
+ };
45651
+ };
45652
+ delete?: never;
45653
+ options?: never;
45654
+ head?: never;
45655
+ patch?: never;
45656
+ trace?: never;
45657
+ };
45357
45658
  "/margin/preview": {
45358
45659
  parameters: {
45359
45660
  query?: never;
package/dist/index.d.ts CHANGED
@@ -45354,6 +45354,307 @@ interface paths {
45354
45354
  };
45355
45355
  trace?: never;
45356
45356
  };
45357
+ "/instagram-posts/vehicles/{vehicleId}/drafts": {
45358
+ parameters: {
45359
+ query?: never;
45360
+ header?: never;
45361
+ path?: never;
45362
+ cookie?: never;
45363
+ };
45364
+ get?: never;
45365
+ put?: never;
45366
+ /**
45367
+ * Prepare an Instagram post for one-click approval
45368
+ * @description What choosing Instagram in a vehicle's "Publicar" step does: prepares a post in `pending_approval` (server-generated caption, the first 10 photos of the gallery) and publishes NOTHING. 201 when created; 200 with the existing post when the vehicle already has one waiting. 422 when the vehicle has no photos or no Instagram account is connected.
45369
+ */
45370
+ post: {
45371
+ parameters: {
45372
+ query?: never;
45373
+ header?: {
45374
+ /** @description Replay-safe retries: resending the SAME key with the SAME body returns the original response (`X-Idempotent-Replay: 1`) instead of creating a second copy — safe to send whenever a response might not have arrived. The same key with a DIFFERENT body answers `409 IDEMPOTENCY_KEY_CONFLICT`; use a fresh key per operation. */
45375
+ "Idempotency-Key"?: string;
45376
+ };
45377
+ path: {
45378
+ vehicleId: string;
45379
+ };
45380
+ cookie?: never;
45381
+ };
45382
+ requestBody?: never;
45383
+ responses: {
45384
+ /** @description The post already waiting for approval */
45385
+ 200: {
45386
+ headers: {
45387
+ [name: string]: unknown;
45388
+ };
45389
+ content: {
45390
+ "application/json": {
45391
+ data?: unknown;
45392
+ meta?: {
45393
+ [key: string]: unknown;
45394
+ };
45395
+ };
45396
+ };
45397
+ };
45398
+ /** @description The prepared post */
45399
+ 201: {
45400
+ headers: {
45401
+ [name: string]: unknown;
45402
+ };
45403
+ content: {
45404
+ /**
45405
+ * @example {
45406
+ * "data": {
45407
+ * "id": "1a5ea0c1-0000-4000-8000-000000000001",
45408
+ * "vehicle_id": "c4c4c4c4-0000-4000-8000-000000000001",
45409
+ * "status": "pending_approval",
45410
+ * "caption": "⚡️Se vende! Toyota RAV4 Híbrido 2022\n\n$24.990.000\n\n- Automática\n- 38.000 km\n\nEscríbenos por DM.",
45411
+ * "photos": [
45412
+ * {
45413
+ * "photo_index": 0,
45414
+ * "crop": null,
45415
+ * "resolved_url": "https://cdn.vitrinadev.com/vehicles/rav4-1.jpg"
45416
+ * },
45417
+ * {
45418
+ * "photo_index": 1,
45419
+ * "crop": null,
45420
+ * "resolved_url": "https://cdn.vitrinadev.com/vehicles/rav4-2.jpg"
45421
+ * }
45422
+ * ],
45423
+ * "scheduled_at": null,
45424
+ * "published_at": null,
45425
+ * "published_media_id": null,
45426
+ * "messaging_account_id": null,
45427
+ * "error": null,
45428
+ * "created_by": "5e5e5e5e-0000-4000-8000-000000000001",
45429
+ * "created_at": "2026-10-15T14:00:00.000Z",
45430
+ * "updated_at": "2026-10-15T14:00:00.000Z"
45431
+ * }
45432
+ * }
45433
+ */
45434
+ "application/json": {
45435
+ data?: unknown;
45436
+ };
45437
+ };
45438
+ };
45439
+ /** @description Validation error */
45440
+ 400: {
45441
+ headers: {
45442
+ [name: string]: unknown;
45443
+ };
45444
+ content: {
45445
+ "application/json": components["schemas"]["Error"];
45446
+ };
45447
+ };
45448
+ /** @description Unauthorized */
45449
+ 401: {
45450
+ headers: {
45451
+ [name: string]: unknown;
45452
+ };
45453
+ content: {
45454
+ "application/json": components["schemas"]["Error"];
45455
+ };
45456
+ };
45457
+ /** @description Forbidden */
45458
+ 403: {
45459
+ headers: {
45460
+ [name: string]: unknown;
45461
+ };
45462
+ content: {
45463
+ "application/json": components["schemas"]["Error"];
45464
+ };
45465
+ };
45466
+ /** @description Not found */
45467
+ 404: {
45468
+ headers: {
45469
+ [name: string]: unknown;
45470
+ };
45471
+ content: {
45472
+ "application/json": components["schemas"]["Error"];
45473
+ };
45474
+ };
45475
+ /** @description Conflict (incl. Idempotency-Key reuse with different body) */
45476
+ 409: {
45477
+ headers: {
45478
+ [name: string]: unknown;
45479
+ };
45480
+ content: {
45481
+ "application/json": components["schemas"]["Error"];
45482
+ };
45483
+ };
45484
+ /** @description Rate limited */
45485
+ 429: {
45486
+ headers: {
45487
+ [name: string]: unknown;
45488
+ };
45489
+ content: {
45490
+ "application/json": components["schemas"]["Error"];
45491
+ };
45492
+ };
45493
+ };
45494
+ };
45495
+ delete?: never;
45496
+ options?: never;
45497
+ head?: never;
45498
+ patch?: never;
45499
+ trace?: never;
45500
+ };
45501
+ "/instagram-posts/{id}/approve": {
45502
+ parameters: {
45503
+ query?: never;
45504
+ header?: never;
45505
+ path?: never;
45506
+ cookie?: never;
45507
+ };
45508
+ get?: never;
45509
+ put?: never;
45510
+ /**
45511
+ * Approve and publish (or schedule) a prepared Instagram post
45512
+ * @description Publishes a `pending_approval` post, optionally with an edited caption / photo selection, or schedules it when `scheduled_at` is present. Like the compose POST, a publish that Instagram refuses answers 200 with `status: "failed"` and the reason — branch on `status`. 409 when the post is no longer waiting for approval.
45513
+ */
45514
+ post: {
45515
+ parameters: {
45516
+ query?: never;
45517
+ header?: {
45518
+ /** @description Replay-safe retries: resending the SAME key with the SAME body returns the original response (`X-Idempotent-Replay: 1`) instead of creating a second copy — safe to send whenever a response might not have arrived. The same key with a DIFFERENT body answers `409 IDEMPOTENCY_KEY_CONFLICT`; use a fresh key per operation. */
45519
+ "Idempotency-Key"?: string;
45520
+ };
45521
+ path: {
45522
+ id: string;
45523
+ };
45524
+ cookie?: never;
45525
+ };
45526
+ requestBody?: {
45527
+ content: {
45528
+ /**
45529
+ * @example {
45530
+ * "caption": "⚡️Se vende! Toyota RAV4 Híbrido 2022\n\n$24.990.000\n\n- Automática\n- 38.000 km\n\nEscríbenos por DM.",
45531
+ * "scheduled_at": "2026-10-16T13:00:00.000Z"
45532
+ * }
45533
+ */
45534
+ "application/json": {
45535
+ photos?: {
45536
+ photo_index: number;
45537
+ crop?: {
45538
+ preset?: string;
45539
+ x?: number;
45540
+ y?: number;
45541
+ width?: number;
45542
+ height?: number;
45543
+ } | null;
45544
+ }[];
45545
+ caption?: string;
45546
+ /** Format: date-time */
45547
+ scheduled_at?: string;
45548
+ };
45549
+ };
45550
+ };
45551
+ responses: {
45552
+ /** @description The approved post */
45553
+ 200: {
45554
+ headers: {
45555
+ [name: string]: unknown;
45556
+ };
45557
+ content: {
45558
+ /**
45559
+ * @example {
45560
+ * "data": {
45561
+ * "id": "1a5ea0c1-0000-4000-8000-000000000001",
45562
+ * "vehicle_id": "c4c4c4c4-0000-4000-8000-000000000001",
45563
+ * "status": "scheduled",
45564
+ * "caption": "⚡️Se vende! Toyota RAV4 Híbrido 2022\n\n$24.990.000\n\n- Automática\n- 38.000 km\n\nEscríbenos por DM.",
45565
+ * "photos": [
45566
+ * {
45567
+ * "photo_index": 0,
45568
+ * "crop": null,
45569
+ * "resolved_url": "https://cdn.vitrinadev.com/vehicles/rav4-1.jpg"
45570
+ * },
45571
+ * {
45572
+ * "photo_index": 1,
45573
+ * "crop": null,
45574
+ * "resolved_url": "https://cdn.vitrinadev.com/vehicles/rav4-2.jpg"
45575
+ * }
45576
+ * ],
45577
+ * "scheduled_at": "2026-10-16T13:00:00.000Z",
45578
+ * "published_at": null,
45579
+ * "published_media_id": null,
45580
+ * "messaging_account_id": null,
45581
+ * "error": null,
45582
+ * "created_by": "5e5e5e5e-0000-4000-8000-000000000001",
45583
+ * "created_at": "2026-10-15T14:00:00.000Z",
45584
+ * "updated_at": "2026-10-15T14:02:10.000Z"
45585
+ * }
45586
+ * }
45587
+ */
45588
+ "application/json": {
45589
+ data?: unknown;
45590
+ meta?: {
45591
+ [key: string]: unknown;
45592
+ };
45593
+ };
45594
+ };
45595
+ };
45596
+ /** @description Validation error */
45597
+ 400: {
45598
+ headers: {
45599
+ [name: string]: unknown;
45600
+ };
45601
+ content: {
45602
+ "application/json": components["schemas"]["Error"];
45603
+ };
45604
+ };
45605
+ /** @description Unauthorized */
45606
+ 401: {
45607
+ headers: {
45608
+ [name: string]: unknown;
45609
+ };
45610
+ content: {
45611
+ "application/json": components["schemas"]["Error"];
45612
+ };
45613
+ };
45614
+ /** @description Forbidden */
45615
+ 403: {
45616
+ headers: {
45617
+ [name: string]: unknown;
45618
+ };
45619
+ content: {
45620
+ "application/json": components["schemas"]["Error"];
45621
+ };
45622
+ };
45623
+ /** @description Not found */
45624
+ 404: {
45625
+ headers: {
45626
+ [name: string]: unknown;
45627
+ };
45628
+ content: {
45629
+ "application/json": components["schemas"]["Error"];
45630
+ };
45631
+ };
45632
+ /** @description Conflict (incl. Idempotency-Key reuse with different body) */
45633
+ 409: {
45634
+ headers: {
45635
+ [name: string]: unknown;
45636
+ };
45637
+ content: {
45638
+ "application/json": components["schemas"]["Error"];
45639
+ };
45640
+ };
45641
+ /** @description Rate limited */
45642
+ 429: {
45643
+ headers: {
45644
+ [name: string]: unknown;
45645
+ };
45646
+ content: {
45647
+ "application/json": components["schemas"]["Error"];
45648
+ };
45649
+ };
45650
+ };
45651
+ };
45652
+ delete?: never;
45653
+ options?: never;
45654
+ head?: never;
45655
+ patch?: never;
45656
+ trace?: never;
45657
+ };
45357
45658
  "/margin/preview": {
45358
45659
  parameters: {
45359
45660
  query?: never;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vitrina/api",
3
- "version": "14.25.0",
3
+ "version": "14.26.0",
4
4
  "description": "Typed TypeScript SDK for the Vitrina API pública — generated from the committed openapi.public.json (ADR 0106).",
5
5
  "type": "module",
6
6
  "license": "MIT",