@dsptch-work/api-client 0.48.0 → 0.49.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/CHANGELOG.md +14 -0
- package/dist/gen/types.gen.d.ts +10 -9
- package/dist/gen/zod.gen.d.ts +8 -4
- package/dist/gen/zod.gen.js +4 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,20 @@ minor bump until `1.0.0`. See [RELEASING.md](./RELEASING.md) for the release and
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.49.0] - 2026-11-03
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- `AssetsTransactionEventResponseObject.transaction.kind` and `zAssetsTransactionEventResponseObject` now include `transfer_contents`. Update exhaustive handlers for item movement events.
|
|
15
|
+
|
|
16
|
+
### Changed
|
|
17
|
+
|
|
18
|
+
- **Breaking:** `AssetsTransferResponseObject.from_assets_sub_location_id` moved to the required nullable `transfer_lines[].from_assets_sub_location_id`. Update readers and typed fixtures; `zAssetsTransferResponseObject` now requires the field on each line. `AssetsTransferParameters.from_assets_sub_location_id` remains a top-level request field and applies to each line.
|
|
19
|
+
- `AssetsTransfers.listTransfers()` accepts `declined` in `query['filter[status]']`; the generated query remains a `string`. The generated `AssetsTransferResponseObject.status` type and its Zod validator do not yet include `declined`, even though the API can return it; handle the response accordingly.
|
|
20
|
+
- `PwaCompanyDetailsParameters.pwcr_number` and `PwaCompanyDetailsUpdateParameters.pwcr_number` document a ten-digit value; the API rejects `NA`. Their generated types remain `string | null`, and callers should not rely on those types for validation.
|
|
21
|
+
|
|
22
|
+
See the [API changelog](https://dsptch.app/support/docs/developers/api-changelog) for the full REST contract changes.
|
|
23
|
+
|
|
10
24
|
## [0.48.0] - 2026-11-02
|
|
11
25
|
|
|
12
26
|
### Added
|
package/dist/gen/types.gen.d.ts
CHANGED
|
@@ -4117,7 +4117,7 @@ export type PwaCompanyDetailsResponseObject = {
|
|
|
4117
4117
|
*/
|
|
4118
4118
|
company_id: string;
|
|
4119
4119
|
/**
|
|
4120
|
-
* California PWCR number (exactly 10 digits
|
|
4120
|
+
* California PWCR number (exactly 10 digits); null when unset.
|
|
4121
4121
|
*/
|
|
4122
4122
|
pwcr_number: string | null;
|
|
4123
4123
|
/**
|
|
@@ -4214,7 +4214,7 @@ export type PwaCompanyDetailsResponseObject = {
|
|
|
4214
4214
|
*/
|
|
4215
4215
|
export type PwaCompanyDetailsParameters = {
|
|
4216
4216
|
/**
|
|
4217
|
-
* California PWCR number (exactly 10 digits
|
|
4217
|
+
* California PWCR number (exactly 10 digits).
|
|
4218
4218
|
*/
|
|
4219
4219
|
pwcr_number?: string | null;
|
|
4220
4220
|
/**
|
|
@@ -4311,7 +4311,7 @@ export type PwaCompanyDetailsParameters = {
|
|
|
4311
4311
|
*/
|
|
4312
4312
|
export type PwaCompanyDetailsUpdateParameters = {
|
|
4313
4313
|
/**
|
|
4314
|
-
* California PWCR number (exactly 10 digits
|
|
4314
|
+
* California PWCR number (exactly 10 digits).
|
|
4315
4315
|
*/
|
|
4316
4316
|
pwcr_number?: string | null;
|
|
4317
4317
|
/**
|
|
@@ -16410,7 +16410,7 @@ export type AssetsTransactionEventResponseObject = {
|
|
|
16410
16410
|
/**
|
|
16411
16411
|
* What produced the movement: receive (a stock, unstock, or custody change), adjust (a reconciliation), or transfer (part of a stock transfer).
|
|
16412
16412
|
*/
|
|
16413
|
-
kind: 'receive' | 'adjust' | 'transfer';
|
|
16413
|
+
kind: 'receive' | 'adjust' | 'transfer' | 'transfer_contents';
|
|
16414
16414
|
/**
|
|
16415
16415
|
* Number of units moved; always positive.
|
|
16416
16416
|
*/
|
|
@@ -16957,10 +16957,6 @@ export type AssetsTransferResponseObject = {
|
|
|
16957
16957
|
* ID of the destination container item; null when the destination is a site or user.
|
|
16958
16958
|
*/
|
|
16959
16959
|
to_container_item_id: string | null;
|
|
16960
|
-
/**
|
|
16961
|
-
* ID of the storage location within the source site or container the stock drew from; null for an unbinned source or a user source.
|
|
16962
|
-
*/
|
|
16963
|
-
from_assets_sub_location_id: string | null;
|
|
16964
16960
|
/**
|
|
16965
16961
|
* ID of the storage location within the destination site or container the stock landed in; null for an unbinned destination or a user destination.
|
|
16966
16962
|
*/
|
|
@@ -16989,6 +16985,10 @@ export type AssetsTransferResponseObject = {
|
|
|
16989
16985
|
* Number of units of the item to move; greater than 0.
|
|
16990
16986
|
*/
|
|
16991
16987
|
quantity: number;
|
|
16988
|
+
/**
|
|
16989
|
+
* ID of the storage location within the source site or container this line's stock drew from; null for an unbinned source or a user source.
|
|
16990
|
+
*/
|
|
16991
|
+
from_assets_sub_location_id: string | null;
|
|
16992
16992
|
}>;
|
|
16993
16993
|
/**
|
|
16994
16994
|
* When the record was created (ISO 8601).
|
|
@@ -17016,7 +17016,7 @@ export type AssetsTransferParameters = {
|
|
|
17016
17016
|
*/
|
|
17017
17017
|
from_container_item_id?: string;
|
|
17018
17018
|
/**
|
|
17019
|
-
* Optional. The storage location within the source site or container
|
|
17019
|
+
* Optional. The storage location within the source site or container every line's stock draws from, recorded on each line. Omit or send null for the source's unbinned stock. A blank ID or a wrong type answers 422, a storage location outside the company that owns the API key answers 404, and one named without a source site or container, or not belonging to it, answers 422.
|
|
17020
17020
|
*/
|
|
17021
17021
|
from_assets_sub_location_id?: string | null;
|
|
17022
17022
|
/**
|
|
@@ -21556,6 +21556,7 @@ export type ListTransfersData = {
|
|
|
21556
21556
|
* * `pending`
|
|
21557
21557
|
* * `in_transit`
|
|
21558
21558
|
* * `completed`
|
|
21559
|
+
* * `declined`
|
|
21559
21560
|
* * `cancelled`
|
|
21560
21561
|
*
|
|
21561
21562
|
*/
|
package/dist/gen/zod.gen.d.ts
CHANGED
|
@@ -11316,6 +11316,7 @@ export declare const zAssetsTransactionEventResponseObject: z.ZodObject<{
|
|
|
11316
11316
|
receive: "receive";
|
|
11317
11317
|
adjust: "adjust";
|
|
11318
11318
|
transfer: "transfer";
|
|
11319
|
+
transfer_contents: "transfer_contents";
|
|
11319
11320
|
}>;
|
|
11320
11321
|
quantity: z.ZodInt;
|
|
11321
11322
|
}, z.core.$strip>;
|
|
@@ -11371,6 +11372,7 @@ export declare const zAssetsItemEventResponseObject: z.ZodDiscriminatedUnion<[z.
|
|
|
11371
11372
|
receive: "receive";
|
|
11372
11373
|
adjust: "adjust";
|
|
11373
11374
|
transfer: "transfer";
|
|
11375
|
+
transfer_contents: "transfer_contents";
|
|
11374
11376
|
}>;
|
|
11375
11377
|
quantity: z.ZodInt;
|
|
11376
11378
|
}, z.core.$strip>;
|
|
@@ -11661,7 +11663,6 @@ export declare const zAssetsTransferResponseObject: z.ZodObject<{
|
|
|
11661
11663
|
to_assets_site_id: z.ZodNullable<z.ZodString>;
|
|
11662
11664
|
to_user_id: z.ZodNullable<z.ZodString>;
|
|
11663
11665
|
to_container_item_id: z.ZodNullable<z.ZodString>;
|
|
11664
|
-
from_assets_sub_location_id: z.ZodNullable<z.ZodString>;
|
|
11665
11666
|
to_assets_sub_location_id: z.ZodNullable<z.ZodString>;
|
|
11666
11667
|
initiated_by_user_id: z.ZodString;
|
|
11667
11668
|
completed_at: z.ZodNullable<z.ZodISODateTime>;
|
|
@@ -11669,6 +11670,7 @@ export declare const zAssetsTransferResponseObject: z.ZodObject<{
|
|
|
11669
11670
|
id: z.ZodString;
|
|
11670
11671
|
assets_item_id: z.ZodString;
|
|
11671
11672
|
quantity: z.ZodInt;
|
|
11673
|
+
from_assets_sub_location_id: z.ZodNullable<z.ZodString>;
|
|
11672
11674
|
}, z.core.$strip>>;
|
|
11673
11675
|
created_at: z.ZodISODateTime;
|
|
11674
11676
|
updated_at: z.ZodISODateTime;
|
|
@@ -13472,6 +13474,7 @@ export declare const zListEventsResponse: z.ZodObject<{
|
|
|
13472
13474
|
receive: "receive";
|
|
13473
13475
|
adjust: "adjust";
|
|
13474
13476
|
transfer: "transfer";
|
|
13477
|
+
transfer_contents: "transfer_contents";
|
|
13475
13478
|
}>;
|
|
13476
13479
|
quantity: z.ZodInt;
|
|
13477
13480
|
}, z.core.$strip>;
|
|
@@ -13526,6 +13529,7 @@ export declare const zGetEventResponse: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
13526
13529
|
receive: "receive";
|
|
13527
13530
|
adjust: "adjust";
|
|
13528
13531
|
transfer: "transfer";
|
|
13532
|
+
transfer_contents: "transfer_contents";
|
|
13529
13533
|
}>;
|
|
13530
13534
|
quantity: z.ZodInt;
|
|
13531
13535
|
}, z.core.$strip>;
|
|
@@ -16499,7 +16503,6 @@ export declare const zListTransfersResponse: z.ZodObject<{
|
|
|
16499
16503
|
to_assets_site_id: z.ZodNullable<z.ZodString>;
|
|
16500
16504
|
to_user_id: z.ZodNullable<z.ZodString>;
|
|
16501
16505
|
to_container_item_id: z.ZodNullable<z.ZodString>;
|
|
16502
|
-
from_assets_sub_location_id: z.ZodNullable<z.ZodString>;
|
|
16503
16506
|
to_assets_sub_location_id: z.ZodNullable<z.ZodString>;
|
|
16504
16507
|
initiated_by_user_id: z.ZodString;
|
|
16505
16508
|
completed_at: z.ZodNullable<z.ZodISODateTime>;
|
|
@@ -16507,6 +16510,7 @@ export declare const zListTransfersResponse: z.ZodObject<{
|
|
|
16507
16510
|
id: z.ZodString;
|
|
16508
16511
|
assets_item_id: z.ZodString;
|
|
16509
16512
|
quantity: z.ZodInt;
|
|
16513
|
+
from_assets_sub_location_id: z.ZodNullable<z.ZodString>;
|
|
16510
16514
|
}, z.core.$strip>>;
|
|
16511
16515
|
created_at: z.ZodISODateTime;
|
|
16512
16516
|
updated_at: z.ZodISODateTime;
|
|
@@ -16542,7 +16546,6 @@ export declare const zCreateTransferResponse: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
16542
16546
|
to_assets_site_id: z.ZodNullable<z.ZodString>;
|
|
16543
16547
|
to_user_id: z.ZodNullable<z.ZodString>;
|
|
16544
16548
|
to_container_item_id: z.ZodNullable<z.ZodString>;
|
|
16545
|
-
from_assets_sub_location_id: z.ZodNullable<z.ZodString>;
|
|
16546
16549
|
to_assets_sub_location_id: z.ZodNullable<z.ZodString>;
|
|
16547
16550
|
initiated_by_user_id: z.ZodString;
|
|
16548
16551
|
completed_at: z.ZodNullable<z.ZodISODateTime>;
|
|
@@ -16550,6 +16553,7 @@ export declare const zCreateTransferResponse: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
16550
16553
|
id: z.ZodString;
|
|
16551
16554
|
assets_item_id: z.ZodString;
|
|
16552
16555
|
quantity: z.ZodInt;
|
|
16556
|
+
from_assets_sub_location_id: z.ZodNullable<z.ZodString>;
|
|
16553
16557
|
}, z.core.$strip>>;
|
|
16554
16558
|
created_at: z.ZodISODateTime;
|
|
16555
16559
|
updated_at: z.ZodISODateTime;
|
|
@@ -16575,7 +16579,6 @@ export declare const zGetTransferResponse: z.ZodObject<{
|
|
|
16575
16579
|
to_assets_site_id: z.ZodNullable<z.ZodString>;
|
|
16576
16580
|
to_user_id: z.ZodNullable<z.ZodString>;
|
|
16577
16581
|
to_container_item_id: z.ZodNullable<z.ZodString>;
|
|
16578
|
-
from_assets_sub_location_id: z.ZodNullable<z.ZodString>;
|
|
16579
16582
|
to_assets_sub_location_id: z.ZodNullable<z.ZodString>;
|
|
16580
16583
|
initiated_by_user_id: z.ZodString;
|
|
16581
16584
|
completed_at: z.ZodNullable<z.ZodISODateTime>;
|
|
@@ -16583,6 +16586,7 @@ export declare const zGetTransferResponse: z.ZodObject<{
|
|
|
16583
16586
|
id: z.ZodString;
|
|
16584
16587
|
assets_item_id: z.ZodString;
|
|
16585
16588
|
quantity: z.ZodInt;
|
|
16589
|
+
from_assets_sub_location_id: z.ZodNullable<z.ZodString>;
|
|
16586
16590
|
}, z.core.$strip>>;
|
|
16587
16591
|
created_at: z.ZodISODateTime;
|
|
16588
16592
|
updated_at: z.ZodISODateTime;
|
package/dist/gen/zod.gen.js
CHANGED
|
@@ -8561,7 +8561,8 @@ export const zAssetsTransactionEventResponseObject = z.object({
|
|
|
8561
8561
|
kind: z.enum([
|
|
8562
8562
|
'receive',
|
|
8563
8563
|
'adjust',
|
|
8564
|
-
'transfer'
|
|
8564
|
+
'transfer',
|
|
8565
|
+
'transfer_contents'
|
|
8565
8566
|
]),
|
|
8566
8567
|
quantity: z.int()
|
|
8567
8568
|
}),
|
|
@@ -8834,14 +8835,14 @@ export const zAssetsTransferResponseObject = z.object({
|
|
|
8834
8835
|
to_assets_site_id: z.string().nullable(),
|
|
8835
8836
|
to_user_id: z.string().nullable(),
|
|
8836
8837
|
to_container_item_id: z.string().nullable(),
|
|
8837
|
-
from_assets_sub_location_id: z.string().nullable(),
|
|
8838
8838
|
to_assets_sub_location_id: z.string().nullable(),
|
|
8839
8839
|
initiated_by_user_id: z.string(),
|
|
8840
8840
|
completed_at: z.iso.datetime().nullable(),
|
|
8841
8841
|
transfer_lines: z.array(z.object({
|
|
8842
8842
|
id: z.string(),
|
|
8843
8843
|
assets_item_id: z.string(),
|
|
8844
|
-
quantity: z.int()
|
|
8844
|
+
quantity: z.int(),
|
|
8845
|
+
from_assets_sub_location_id: z.string().nullable()
|
|
8845
8846
|
})),
|
|
8846
8847
|
created_at: z.iso.datetime(),
|
|
8847
8848
|
updated_at: z.iso.datetime()
|