@vindentech/api-client 0.3.0-next.36 → 0.3.0-next.38

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.
Files changed (29) hide show
  1. package/dist/generated/_all.d.ts +1 -0
  2. package/dist/generated/_all.d.ts.map +1 -1
  3. package/dist/generated/_all.js +1 -0
  4. package/dist/generated/_all.js.map +1 -1
  5. package/dist/generated/_permissions.d.ts +21 -1
  6. package/dist/generated/_permissions.d.ts.map +1 -1
  7. package/dist/generated/_permissions.js +5 -0
  8. package/dist/generated/_permissions.js.map +1 -1
  9. package/dist/generated/billable-events/billable-events.d.ts +58 -0
  10. package/dist/generated/billable-events/billable-events.d.ts.map +1 -0
  11. package/dist/generated/billable-events/billable-events.js +40 -0
  12. package/dist/generated/billable-events/billable-events.js.map +1 -0
  13. package/dist/generated/index.schemas.d.ts +222 -0
  14. package/dist/generated/index.schemas.d.ts.map +1 -1
  15. package/dist/generated/index.schemas.js +36 -0
  16. package/dist/generated/index.schemas.js.map +1 -1
  17. package/dist/generated/invoices/invoices.d.ts +22 -1
  18. package/dist/generated/invoices/invoices.d.ts.map +1 -1
  19. package/dist/generated/invoices/invoices.js +11 -0
  20. package/dist/generated/invoices/invoices.js.map +1 -1
  21. package/dist/generated/orders/orders.d.ts +15 -1
  22. package/dist/generated/orders/orders.d.ts.map +1 -1
  23. package/dist/generated/orders/orders.js +12 -0
  24. package/dist/generated/orders/orders.js.map +1 -1
  25. package/dist/generated/transport-legs/transport-legs.d.ts +3 -3
  26. package/dist/generated/transport-legs/transport-legs.d.ts.map +1 -1
  27. package/dist/generated/transport-legs/transport-legs.js +2 -2
  28. package/dist/generated/transport-legs/transport-legs.js.map +1 -1
  29. package/package.json +1 -1
@@ -549,6 +549,19 @@ export interface EditOrderItemsDto {
549
549
  /** Full desired set of product lines. Omit a stored line to remove it; an empty array removes all removable lines. */
550
550
  items: OrderItemInput[];
551
551
  }
552
+ export interface EditOrderMerchandiseLineInput {
553
+ /** The existing merchandise line to adjust. */
554
+ salesOrderMerchandiseId: string;
555
+ /**
556
+ * New quantity for this line.
557
+ * @minimum 1
558
+ */
559
+ quantity: number;
560
+ }
561
+ export interface EditOrderMerchandiseDto {
562
+ /** Lines to adjust. A live line not listed here is left unchanged. */
563
+ lines: EditOrderMerchandiseLineInput[];
564
+ }
552
565
  export interface SetManualBillingDto {
553
566
  /** Whether the order is excluded from automatic billing. */
554
567
  manualBilling: boolean;
@@ -4110,9 +4123,26 @@ export interface CompleteStopResultDto {
4110
4123
  /** True when this was an idempotent replay. */
4111
4124
  idempotent: boolean;
4112
4125
  }
4126
+ /**
4127
+ * Structured failure-reason code. Drives customer-fault billing attribution — omit or use an operational code to never bill.
4128
+ */
4129
+ export type FailStopDtoFailureReasonCode = typeof FailStopDtoFailureReasonCode[keyof typeof FailStopDtoFailureReasonCode];
4130
+ export declare const FailStopDtoFailureReasonCode: {
4131
+ readonly RECIPIENT_NOT_HOME: "RECIPIENT_NOT_HOME";
4132
+ readonly ACCESS_BLOCKED: "ACCESS_BLOCKED";
4133
+ readonly ADDRESS_INVALID: "ADDRESS_INVALID";
4134
+ readonly DELIVERY_REFUSED: "DELIVERY_REFUSED";
4135
+ readonly CARRIER_VEHICLE_ISSUE: "CARRIER_VEHICLE_ISSUE";
4136
+ readonly CARRIER_CAPACITY: "CARRIER_CAPACITY";
4137
+ readonly WAREHOUSE_ERROR: "WAREHOUSE_ERROR";
4138
+ readonly WEATHER_OR_ROAD_CONDITIONS: "WEATHER_OR_ROAD_CONDITIONS";
4139
+ readonly OTHER_OPERATIONAL: "OTHER_OPERATIONAL";
4140
+ };
4113
4141
  export interface FailStopDto {
4114
4142
  /** Why the delivery failed (required). */
4115
4143
  failureReason: string;
4144
+ /** Structured failure-reason code. Drives customer-fault billing attribution — omit or use an operational code to never bill. */
4145
+ failureReasonCode?: FailStopDtoFailureReasonCode;
4116
4146
  /** @maxLength 1000 */
4117
4147
  notes?: string;
4118
4148
  photoFileIds?: string[];
@@ -4203,6 +4233,22 @@ export declare const TransportLegDtoStatus: {
4203
4233
  readonly CANCELLED: "CANCELLED";
4204
4234
  readonly FAILED: "FAILED";
4205
4235
  };
4236
+ /**
4237
+ * Structured failure-reason taxonomy code, set on fail(). NULL = not classified (BE-1832).
4238
+ * @nullable
4239
+ */
4240
+ export type TransportLegDtoFailureReasonCode = typeof TransportLegDtoFailureReasonCode[keyof typeof TransportLegDtoFailureReasonCode] | null;
4241
+ export declare const TransportLegDtoFailureReasonCode: {
4242
+ readonly RECIPIENT_NOT_HOME: "RECIPIENT_NOT_HOME";
4243
+ readonly ACCESS_BLOCKED: "ACCESS_BLOCKED";
4244
+ readonly ADDRESS_INVALID: "ADDRESS_INVALID";
4245
+ readonly DELIVERY_REFUSED: "DELIVERY_REFUSED";
4246
+ readonly CARRIER_VEHICLE_ISSUE: "CARRIER_VEHICLE_ISSUE";
4247
+ readonly CARRIER_CAPACITY: "CARRIER_CAPACITY";
4248
+ readonly WAREHOUSE_ERROR: "WAREHOUSE_ERROR";
4249
+ readonly WEATHER_OR_ROAD_CONDITIONS: "WEATHER_OR_ROAD_CONDITIONS";
4250
+ readonly OTHER_OPERATIONAL: "OTHER_OPERATIONAL";
4251
+ };
4206
4252
  /**
4207
4253
  * @nullable
4208
4254
  */
@@ -4215,6 +4261,11 @@ export interface TransportLegDto {
4215
4261
  legType: string;
4216
4262
  legSequence: number;
4217
4263
  status: TransportLegDtoStatus;
4264
+ /**
4265
+ * Structured failure-reason taxonomy code, set on fail(). NULL = not classified (BE-1832).
4266
+ * @nullable
4267
+ */
4268
+ failureReasonCode: TransportLegDtoFailureReasonCode;
4218
4269
  /** @nullable */
4219
4270
  transportServiceId: string | null;
4220
4271
  /** @nullable */
@@ -4339,6 +4390,32 @@ export interface CompleteLegDto {
4339
4390
  /** A file_asset id linked via entity_file. */
4340
4391
  proofOfDeliveryFileId?: string;
4341
4392
  }
4393
+ /**
4394
+ * Structured failure-reason code. Drives customer-fault billing attribution — omit or use an operational code to never bill.
4395
+ */
4396
+ export type FailTransportLegDtoFailureReasonCode = typeof FailTransportLegDtoFailureReasonCode[keyof typeof FailTransportLegDtoFailureReasonCode];
4397
+ export declare const FailTransportLegDtoFailureReasonCode: {
4398
+ readonly RECIPIENT_NOT_HOME: "RECIPIENT_NOT_HOME";
4399
+ readonly ACCESS_BLOCKED: "ACCESS_BLOCKED";
4400
+ readonly ADDRESS_INVALID: "ADDRESS_INVALID";
4401
+ readonly DELIVERY_REFUSED: "DELIVERY_REFUSED";
4402
+ readonly CARRIER_VEHICLE_ISSUE: "CARRIER_VEHICLE_ISSUE";
4403
+ readonly CARRIER_CAPACITY: "CARRIER_CAPACITY";
4404
+ readonly WAREHOUSE_ERROR: "WAREHOUSE_ERROR";
4405
+ readonly WEATHER_OR_ROAD_CONDITIONS: "WEATHER_OR_ROAD_CONDITIONS";
4406
+ readonly OTHER_OPERATIONAL: "OTHER_OPERATIONAL";
4407
+ };
4408
+ export interface FailTransportLegDto {
4409
+ /**
4410
+ * Required — the failure/cancellation reason.
4411
+ * @maxLength 500
4412
+ */
4413
+ reason?: string;
4414
+ /** When the event occurred (client clock). */
4415
+ occurredAt?: string;
4416
+ /** Structured failure-reason code. Drives customer-fault billing attribution — omit or use an operational code to never bill. */
4417
+ failureReasonCode?: FailTransportLegDtoFailureReasonCode;
4418
+ }
4342
4419
  export interface FailLegDto {
4343
4420
  /**
4344
4421
  * Required — the failure/cancellation reason.
@@ -7078,6 +7155,17 @@ export interface VoidInvoiceDto {
7078
7155
  /** Why the invoice is being voided (required, recorded on the row). */
7079
7156
  voidReason: string;
7080
7157
  }
7158
+ export interface ReprocessInvoiceFromBasisResponseDto {
7159
+ invoiceId: string;
7160
+ /** Always CANCELLED on success. */
7161
+ invoiceStatus: string;
7162
+ /** New invoice_basis_row(s) inserted across all events behind this invoice. */
7163
+ insertedCount: number;
7164
+ /** invoice_basis_row_supersession row(s) inserted. */
7165
+ supersededCount: number;
7166
+ /** Explains that the replacement invoice is produced asynchronously by the next scheduled aggregation run, not by this call. */
7167
+ note: string;
7168
+ }
7081
7169
  export interface CreditNoteRowDto {
7082
7170
  invoiceRowId: string;
7083
7171
  /** Amount (excl. VAT, minor units, POSITIVE magnitude) to refund off this row. The service writes it as a negative credit-note row. */
@@ -8368,6 +8456,119 @@ export interface InvoiceDetailsDto {
8368
8456
  */
8369
8457
  paymentMethodName: string | null;
8370
8458
  }
8459
+ export interface BillableEventDto {
8460
+ billableEventId: string;
8461
+ tenantId: string;
8462
+ organizationId: string;
8463
+ /**
8464
+ * Null until the operational source resolves the billing account.
8465
+ * @nullable
8466
+ */
8467
+ billingAccountId: string | null;
8468
+ /** e.g. picking_order_processed, storage_snapshot. */
8469
+ eventType: string;
8470
+ /** Operational source table this event was raised from. */
8471
+ sourceTable: string;
8472
+ /** Id of the row in sourceTable. */
8473
+ sourceId: string;
8474
+ /**
8475
+ * Disambiguates multiple events for the same source in one period (e.g. a credit note's invoice id).
8476
+ * @nullable
8477
+ */
8478
+ sourceDiscriminator: string | null;
8479
+ basisPeriodStart: string;
8480
+ /** @nullable */
8481
+ basisPeriodEnd: string | null;
8482
+ /**
8483
+ * Informational snapshot only — NOT authoritative pricing.
8484
+ * @nullable
8485
+ */
8486
+ amountMinor: number | null;
8487
+ /**
8488
+ * ISO 4217 currency code.
8489
+ * @nullable
8490
+ */
8491
+ currencyCode: string | null;
8492
+ createdAt: string;
8493
+ /**
8494
+ * Set once the pricing materializer has consumed this event (0 basis rows is still processed).
8495
+ * @nullable
8496
+ */
8497
+ processedAt: string | null;
8498
+ }
8499
+ export interface PaginatedBillableEventsDto {
8500
+ /** The page of rows. */
8501
+ items: BillableEventDto[];
8502
+ /** Exact count of all rows matching the filter, pre-pagination (RLS-scoped). */
8503
+ total: number;
8504
+ /** Effective max rows applied (after defaults/clamp). */
8505
+ limit: number;
8506
+ /** Effective rows skipped applied. */
8507
+ offset: number;
8508
+ }
8509
+ /**
8510
+ * Raw operational payload.
8511
+ * @nullable
8512
+ */
8513
+ export type BillableEventDetailDtoPayload = {
8514
+ [key: string]: unknown;
8515
+ } | null;
8516
+ export interface BillableEventDetailDto {
8517
+ billableEventId: string;
8518
+ tenantId: string;
8519
+ organizationId: string;
8520
+ /**
8521
+ * Null until the operational source resolves the billing account.
8522
+ * @nullable
8523
+ */
8524
+ billingAccountId: string | null;
8525
+ /** e.g. picking_order_processed, storage_snapshot. */
8526
+ eventType: string;
8527
+ /** Operational source table this event was raised from. */
8528
+ sourceTable: string;
8529
+ /** Id of the row in sourceTable. */
8530
+ sourceId: string;
8531
+ /**
8532
+ * Disambiguates multiple events for the same source in one period (e.g. a credit note's invoice id).
8533
+ * @nullable
8534
+ */
8535
+ sourceDiscriminator: string | null;
8536
+ basisPeriodStart: string;
8537
+ /** @nullable */
8538
+ basisPeriodEnd: string | null;
8539
+ /**
8540
+ * Informational snapshot only — NOT authoritative pricing.
8541
+ * @nullable
8542
+ */
8543
+ amountMinor: number | null;
8544
+ /**
8545
+ * ISO 4217 currency code.
8546
+ * @nullable
8547
+ */
8548
+ currencyCode: string | null;
8549
+ createdAt: string;
8550
+ /**
8551
+ * Set once the pricing materializer has consumed this event (0 basis rows is still processed).
8552
+ * @nullable
8553
+ */
8554
+ processedAt: string | null;
8555
+ /**
8556
+ * Raw operational payload.
8557
+ * @nullable
8558
+ */
8559
+ payload: BillableEventDetailDtoPayload;
8560
+ }
8561
+ export interface ReprocessPricingDto {
8562
+ /** Why this event is being reprocessed (recorded on the supersession row). */
8563
+ reason?: string;
8564
+ }
8565
+ export interface ReprocessPricingResponseDto {
8566
+ billableEventId: string;
8567
+ /** New invoice_basis_row(s) inserted by this call. */
8568
+ insertedCount: number;
8569
+ /** invoice_basis_row_supersession row(s) inserted by this call. */
8570
+ supersededCount: number;
8571
+ }
8371
8572
  export interface StripeWebhookAckDto {
8372
8573
  /** Always true once the event was accepted. */
8373
8574
  received: boolean;
@@ -11658,6 +11859,27 @@ export type PricingRulesControllerListPricingRulesV1Params = {
11658
11859
  */
11659
11860
  offset?: number;
11660
11861
  };
11862
+ export type BillableEventsControllerListBillableEventsV1Params = {
11863
+ /**
11864
+ * Max rows to return (1–100).
11865
+ * @minimum 1
11866
+ * @maximum 100
11867
+ */
11868
+ limit?: number;
11869
+ /**
11870
+ * Rows to skip.
11871
+ * @minimum 0
11872
+ */
11873
+ offset?: number;
11874
+ /**
11875
+ * Filter by the operational source table.
11876
+ */
11877
+ sourceTable?: string;
11878
+ /**
11879
+ * Filter by the operational source row id.
11880
+ */
11881
+ sourceId?: string;
11882
+ };
11661
11883
  export type UsersControllerListV1Params = {
11662
11884
  /**
11663
11885
  * Case-insensitive substring match over display name OR email. Omit to list the first page of the directory.