@dsptch-work/api-client 0.50.0 → 0.51.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 +23 -0
- package/dist/gen/index.d.ts +1 -1
- package/dist/gen/sdk.gen.d.ts +91 -1
- package/dist/gen/sdk.gen.js +156 -0
- package/dist/gen/types.gen.d.ts +300 -5
- package/dist/gen/zod.gen.d.ts +313 -2
- package/dist/gen/zod.gen.js +98 -2
- package/package.json +1 -1
package/dist/gen/types.gen.d.ts
CHANGED
|
@@ -3955,6 +3955,9 @@ export type PayPeriodConfigHistoryCorrectionObject = {
|
|
|
3955
3955
|
start_day_of_week: number;
|
|
3956
3956
|
tz_name: string;
|
|
3957
3957
|
currency: string;
|
|
3958
|
+
/**
|
|
3959
|
+
* New schedules return pending while pay periods are generated. Synced means pay periods were generated for the requested versions and time card synchronization was successfully requested; asynchronous time card jobs may still be queued. Poll until synced or failed. Failed means generation or the synchronization request failed.
|
|
3960
|
+
*/
|
|
3958
3961
|
status: 'synced' | 'pending' | 'failed';
|
|
3959
3962
|
payroll_mode: 'none' | 'base' | 'aggregate' | null;
|
|
3960
3963
|
time_mode: 'none' | 'base' | 'aggregate';
|
|
@@ -3981,6 +3984,9 @@ export type PayPeriodConfigHistoryVersionObject = {
|
|
|
3981
3984
|
start_day_of_week: number;
|
|
3982
3985
|
tz_name: string;
|
|
3983
3986
|
currency: string;
|
|
3987
|
+
/**
|
|
3988
|
+
* New schedules return pending while pay periods are generated. Synced means pay periods were generated for the requested versions and time card synchronization was successfully requested; asynchronous time card jobs may still be queued. Poll until synced or failed. Failed means generation or the synchronization request failed.
|
|
3989
|
+
*/
|
|
3984
3990
|
status: 'synced' | 'pending' | 'failed';
|
|
3985
3991
|
payroll_mode: 'none' | 'base' | 'aggregate' | null;
|
|
3986
3992
|
time_mode: 'none' | 'base' | 'aggregate';
|
|
@@ -17045,7 +17051,7 @@ export type AssetsSubLocationUpdateParameters = {
|
|
|
17045
17051
|
code?: string;
|
|
17046
17052
|
};
|
|
17047
17053
|
/**
|
|
17048
|
-
* A
|
|
17054
|
+
* A movement of item stock between two holders, each a site, a user, or a container. Each line names one item. A completed transfer has applied paired outbound and inbound transactions and updated on-hand, custody, and containment counts. A pending transfer has not moved stock; it waits to be accepted, declined, or cancelled. One-sided moves (placing or removing an item with only one endpoint) record transactions but no transfer, and so are not represented by this resource.
|
|
17049
17055
|
*/
|
|
17050
17056
|
export type AssetsTransferResponseObject = {
|
|
17051
17057
|
/**
|
|
@@ -17057,9 +17063,9 @@ export type AssetsTransferResponseObject = {
|
|
|
17057
17063
|
*/
|
|
17058
17064
|
company_id: string;
|
|
17059
17065
|
/**
|
|
17060
|
-
* Lifecycle state of the transfer
|
|
17066
|
+
* Lifecycle state of the transfer. The published values are the model's status keys, including declined.
|
|
17061
17067
|
*/
|
|
17062
|
-
status: 'pending' | 'in_transit' | 'completed' | 'cancelled';
|
|
17068
|
+
status: 'pending' | 'in_transit' | 'completed' | 'declined' | 'cancelled';
|
|
17063
17069
|
/**
|
|
17064
17070
|
* ID of the source site; null when the source is a user or container.
|
|
17065
17071
|
*/
|
|
@@ -17093,9 +17099,17 @@ export type AssetsTransferResponseObject = {
|
|
|
17093
17099
|
*/
|
|
17094
17100
|
initiated_by_user_id: string;
|
|
17095
17101
|
/**
|
|
17096
|
-
*
|
|
17102
|
+
* ID of the user who completed, declined, or cancelled the transfer; null while it is unresolved.
|
|
17103
|
+
*/
|
|
17104
|
+
resolved_by_user_id: string | null;
|
|
17105
|
+
/**
|
|
17106
|
+
* When the transfer was applied (ISO 8601); null unless status is completed. Same instant as resolved_at when completed.
|
|
17097
17107
|
*/
|
|
17098
17108
|
completed_at: string | null;
|
|
17109
|
+
/**
|
|
17110
|
+
* When the transfer was completed, declined, or cancelled (ISO 8601); null while it is unresolved.
|
|
17111
|
+
*/
|
|
17112
|
+
resolved_at: string | null;
|
|
17099
17113
|
/**
|
|
17100
17114
|
* The item movements in this transfer, one entry per item.
|
|
17101
17115
|
*/
|
|
@@ -17127,7 +17141,7 @@ export type AssetsTransferResponseObject = {
|
|
|
17127
17141
|
updated_at: string;
|
|
17128
17142
|
};
|
|
17129
17143
|
/**
|
|
17130
|
-
* Move item stock. Each endpoint is a site, a user, or a container — give at most one per side; more than one on a side, or no endpoint at all, answers 422. With both a source and a destination this is a two-sided transfer (returns the created transfer, 201). With a single open end it is a one-sided move — placing an unplaced item (destination only) or removing it from its holder (source only) — which records transactions but no transfer and returns 204.
|
|
17144
|
+
* Move item stock. Each endpoint is a site, a user, or a container — give at most one per side; more than one on a side, or no endpoint at all, answers 422. With both a source and a destination this is a two-sided transfer (returns the created transfer, 201). Omit status or send completed to apply it immediately; send pending to persist without moving stock. A pending create requires both endpoints (one endpoint answers 422). With a single open end and completed (or omitted) status it is a one-sided move — placing an unplaced item (destination only) or removing it from its holder (source only) — which records transactions but no transfer and returns 204. A completed create applies immediately, so the source must hold enough of each item.
|
|
17131
17145
|
*/
|
|
17132
17146
|
export type AssetsTransferParameters = {
|
|
17133
17147
|
/**
|
|
@@ -17166,6 +17180,10 @@ export type AssetsTransferParameters = {
|
|
|
17166
17180
|
* ID of the user this move is performed on behalf of, recorded as its initiator. Omission answers 400; supplied null, a blank ID, or a wrong type answers 422. A user outside the company that owns the API key answers 422.
|
|
17167
17181
|
*/
|
|
17168
17182
|
performed_by_user_id: string;
|
|
17183
|
+
/**
|
|
17184
|
+
* Optional. pending persists the transfer without moving stock. completed (the default when omitted) applies the move immediately. A pending create requires both a source and a destination; one endpoint answers 422. Any other value answers 422.
|
|
17185
|
+
*/
|
|
17186
|
+
status?: 'pending' | 'completed';
|
|
17169
17187
|
/**
|
|
17170
17188
|
* The items and quantities to move, as a list of row objects; at least one is required. Omission answers 400, and null, an empty list, or a value that is not a list answers 422. A row missing a field answers 400 naming it, and an unknown or wrongly typed row field answers 422 at that row.
|
|
17171
17189
|
*/
|
|
@@ -17180,6 +17198,83 @@ export type AssetsTransferParameters = {
|
|
|
17180
17198
|
quantity: number;
|
|
17181
17199
|
}>;
|
|
17182
17200
|
};
|
|
17201
|
+
/**
|
|
17202
|
+
* Answer a transfer — decline, cancel, or reopen it. The named filer is recorded on the step. An optional note is the step comment.
|
|
17203
|
+
*/
|
|
17204
|
+
export type AssetsTransferCommandParameters = {
|
|
17205
|
+
/**
|
|
17206
|
+
* ID of the user this answer is performed on behalf of, recorded on the step. Omission answers 400; supplied null, a blank ID, or a wrong type answers 422. A user outside the company that owns the API key answers 422.
|
|
17207
|
+
*/
|
|
17208
|
+
performed_by_user_id: string;
|
|
17209
|
+
/**
|
|
17210
|
+
* Optional comment recorded with the step. Omit to leave the step without a comment.
|
|
17211
|
+
*/
|
|
17212
|
+
note?: string;
|
|
17213
|
+
};
|
|
17214
|
+
/**
|
|
17215
|
+
* Accept a pending transfer and move its stock. The named filer is recorded on the step. An optional note is the step comment. Optional placements put individual lines away at the destination; a line without a placement lands in the destination holder's own bucket.
|
|
17216
|
+
*/
|
|
17217
|
+
export type AssetsTransferAcceptanceParameters = {
|
|
17218
|
+
/**
|
|
17219
|
+
* ID of the user this acceptance is performed on behalf of, recorded on the step. Omission answers 400; supplied null, a blank ID, or a wrong type answers 422. A user outside the company that owns the API key answers 422.
|
|
17220
|
+
*/
|
|
17221
|
+
performed_by_user_id: string;
|
|
17222
|
+
/**
|
|
17223
|
+
* Optional comment recorded with the step. Omit to leave the step without a comment.
|
|
17224
|
+
*/
|
|
17225
|
+
note?: string;
|
|
17226
|
+
/**
|
|
17227
|
+
* Optional list of per-line put-aways at the destination. Omit or send an empty list to land every line in the destination holder's own bucket. A placement that names a line not on the transfer answers 422.
|
|
17228
|
+
*/
|
|
17229
|
+
placements?: Array<{
|
|
17230
|
+
/**
|
|
17231
|
+
* ID of the transfer line to put away. A blank ID or a wrong type answers 422 at its row.
|
|
17232
|
+
*/
|
|
17233
|
+
line_id: string;
|
|
17234
|
+
/**
|
|
17235
|
+
* Optional. ID of a container at the destination to put this line into. Omit or send null for the destination holder's own bucket. A blank ID or a wrong type answers 422 at its row.
|
|
17236
|
+
*/
|
|
17237
|
+
container_id?: string | null;
|
|
17238
|
+
/**
|
|
17239
|
+
* Optional. ID of a storage location at the destination (or inside the named container) to put this line into. Omit or send null for the holder's or container's unbinned bucket. A blank ID or a wrong type answers 422 at its row.
|
|
17240
|
+
*/
|
|
17241
|
+
sub_location_id?: string | null;
|
|
17242
|
+
}>;
|
|
17243
|
+
};
|
|
17244
|
+
/**
|
|
17245
|
+
* Add a line to a pending transfer. The item is identified the same way create's line_items are, under this transfer's source holder. Stock stays with the sender until the transfer is accepted. A resolved transfer answers 422.
|
|
17246
|
+
*/
|
|
17247
|
+
export type AssetsTransferLineParameters = {
|
|
17248
|
+
/**
|
|
17249
|
+
* ID of the asset item to add. A blank ID or a wrong type answers 422, and an item outside the company that owns the API key answers 404. The source holder must currently hold the item, or the matching bucket answers 404.
|
|
17250
|
+
*/
|
|
17251
|
+
assets_item_id: string;
|
|
17252
|
+
/**
|
|
17253
|
+
* Number of units of the item to add, as an integer of 1 or more. Any other value, a fraction or a numeric string included, answers 422.
|
|
17254
|
+
*/
|
|
17255
|
+
quantity: number;
|
|
17256
|
+
/**
|
|
17257
|
+
* Optional. The storage location within the source site or container this line's stock draws from. 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 against a user source answers 422.
|
|
17258
|
+
*/
|
|
17259
|
+
from_assets_sub_location_id?: string | null;
|
|
17260
|
+
/**
|
|
17261
|
+
* Optional. The storage location within the destination site or container this line will land in when accepted. Omit to leave the line in the destination holder's own bucket. Send null for the same. A blank ID or a wrong type answers 422, and a storage location outside the company that owns the API key answers 404.
|
|
17262
|
+
*/
|
|
17263
|
+
to_assets_sub_location_id?: string | null;
|
|
17264
|
+
};
|
|
17265
|
+
/**
|
|
17266
|
+
* Change a pending transfer line's quantity and/or destination storage location. A resolved transfer answers 422. A line that is not on this transfer answers 404.
|
|
17267
|
+
*/
|
|
17268
|
+
export type AssetsTransferLineUpdateParameters = {
|
|
17269
|
+
/**
|
|
17270
|
+
* Optional. The new quantity, as an integer of 1 or more. Any other value, a fraction or a numeric string included, answers 422.
|
|
17271
|
+
*/
|
|
17272
|
+
quantity?: number;
|
|
17273
|
+
/**
|
|
17274
|
+
* Optional. The storage location within the destination site or container this line will land in when accepted. Send null to land it in the destination holder's own bucket. A blank ID or a wrong type answers 422, and a storage location outside the company that owns the API key answers 404.
|
|
17275
|
+
*/
|
|
17276
|
+
to_assets_sub_location_id?: string | null;
|
|
17277
|
+
};
|
|
17183
17278
|
/**
|
|
17184
17279
|
* Add stock of a bulk product to a holder — a site, a user's custody, or a container — recording a receive transaction. Name the holder with exactly one of assets_site_id, user_id, or container_item_id; several answer 422 at each named key, and none answers 422. Bulk products only.
|
|
17185
17280
|
*/
|
|
@@ -21795,6 +21890,206 @@ export type GetTransferResponses = {
|
|
|
21795
21890
|
200: AssetsTransferResponseObject;
|
|
21796
21891
|
};
|
|
21797
21892
|
export type GetTransferResponse = GetTransferResponses[keyof GetTransferResponses];
|
|
21893
|
+
export type AcceptTransferData = {
|
|
21894
|
+
body: AssetsTransferAcceptanceParameters;
|
|
21895
|
+
path: {
|
|
21896
|
+
transfer_id: string;
|
|
21897
|
+
};
|
|
21898
|
+
query?: never;
|
|
21899
|
+
url: '/api/v1/assets/transfers/{transfer_id}/acceptance';
|
|
21900
|
+
};
|
|
21901
|
+
export type AcceptTransferErrors = {
|
|
21902
|
+
/**
|
|
21903
|
+
* Bad Request (missing performed_by_user_id)
|
|
21904
|
+
*/
|
|
21905
|
+
400: Problem;
|
|
21906
|
+
/**
|
|
21907
|
+
* Forbidden
|
|
21908
|
+
*/
|
|
21909
|
+
403: Problem;
|
|
21910
|
+
/**
|
|
21911
|
+
* Not Found
|
|
21912
|
+
*/
|
|
21913
|
+
404: Problem;
|
|
21914
|
+
/**
|
|
21915
|
+
* Unprocessable Content
|
|
21916
|
+
*/
|
|
21917
|
+
422: Problem;
|
|
21918
|
+
};
|
|
21919
|
+
export type AcceptTransferError = AcceptTransferErrors[keyof AcceptTransferErrors];
|
|
21920
|
+
export type AcceptTransferResponses = {
|
|
21921
|
+
/**
|
|
21922
|
+
* Created
|
|
21923
|
+
*/
|
|
21924
|
+
201: AssetsTransferResponseObject;
|
|
21925
|
+
};
|
|
21926
|
+
export type AcceptTransferResponse = AcceptTransferResponses[keyof AcceptTransferResponses];
|
|
21927
|
+
export type DeclineTransferData = {
|
|
21928
|
+
body: AssetsTransferCommandParameters;
|
|
21929
|
+
path: {
|
|
21930
|
+
transfer_id: string;
|
|
21931
|
+
};
|
|
21932
|
+
query?: never;
|
|
21933
|
+
url: '/api/v1/assets/transfers/{transfer_id}/decline';
|
|
21934
|
+
};
|
|
21935
|
+
export type DeclineTransferErrors = {
|
|
21936
|
+
/**
|
|
21937
|
+
* Forbidden
|
|
21938
|
+
*/
|
|
21939
|
+
403: Problem;
|
|
21940
|
+
};
|
|
21941
|
+
export type DeclineTransferError = DeclineTransferErrors[keyof DeclineTransferErrors];
|
|
21942
|
+
export type DeclineTransferResponses = {
|
|
21943
|
+
/**
|
|
21944
|
+
* Created
|
|
21945
|
+
*/
|
|
21946
|
+
201: AssetsTransferResponseObject;
|
|
21947
|
+
};
|
|
21948
|
+
export type DeclineTransferResponse = DeclineTransferResponses[keyof DeclineTransferResponses];
|
|
21949
|
+
export type CancelTransferData = {
|
|
21950
|
+
body: AssetsTransferCommandParameters;
|
|
21951
|
+
path: {
|
|
21952
|
+
transfer_id: string;
|
|
21953
|
+
};
|
|
21954
|
+
query?: never;
|
|
21955
|
+
url: '/api/v1/assets/transfers/{transfer_id}/cancellation';
|
|
21956
|
+
};
|
|
21957
|
+
export type CancelTransferErrors = {
|
|
21958
|
+
/**
|
|
21959
|
+
* Forbidden
|
|
21960
|
+
*/
|
|
21961
|
+
403: Problem;
|
|
21962
|
+
};
|
|
21963
|
+
export type CancelTransferError = CancelTransferErrors[keyof CancelTransferErrors];
|
|
21964
|
+
export type CancelTransferResponses = {
|
|
21965
|
+
/**
|
|
21966
|
+
* Created
|
|
21967
|
+
*/
|
|
21968
|
+
201: AssetsTransferResponseObject;
|
|
21969
|
+
};
|
|
21970
|
+
export type CancelTransferResponse = CancelTransferResponses[keyof CancelTransferResponses];
|
|
21971
|
+
export type ReopenTransferData = {
|
|
21972
|
+
body: AssetsTransferCommandParameters;
|
|
21973
|
+
path: {
|
|
21974
|
+
transfer_id: string;
|
|
21975
|
+
};
|
|
21976
|
+
query?: never;
|
|
21977
|
+
url: '/api/v1/assets/transfers/{transfer_id}/reopening';
|
|
21978
|
+
};
|
|
21979
|
+
export type ReopenTransferErrors = {
|
|
21980
|
+
/**
|
|
21981
|
+
* Forbidden
|
|
21982
|
+
*/
|
|
21983
|
+
403: Problem;
|
|
21984
|
+
/**
|
|
21985
|
+
* Unprocessable Content
|
|
21986
|
+
*/
|
|
21987
|
+
422: Problem;
|
|
21988
|
+
};
|
|
21989
|
+
export type ReopenTransferError = ReopenTransferErrors[keyof ReopenTransferErrors];
|
|
21990
|
+
export type ReopenTransferResponses = {
|
|
21991
|
+
/**
|
|
21992
|
+
* Created
|
|
21993
|
+
*/
|
|
21994
|
+
201: AssetsTransferResponseObject;
|
|
21995
|
+
};
|
|
21996
|
+
export type ReopenTransferResponse = ReopenTransferResponses[keyof ReopenTransferResponses];
|
|
21997
|
+
export type CreateTransferLineData = {
|
|
21998
|
+
body: AssetsTransferLineParameters;
|
|
21999
|
+
path: {
|
|
22000
|
+
transfer_id: string;
|
|
22001
|
+
};
|
|
22002
|
+
query?: never;
|
|
22003
|
+
url: '/api/v1/assets/transfers/{transfer_id}/lines';
|
|
22004
|
+
};
|
|
22005
|
+
export type CreateTransferLineErrors = {
|
|
22006
|
+
/**
|
|
22007
|
+
* Bad Request
|
|
22008
|
+
*/
|
|
22009
|
+
400: Problem;
|
|
22010
|
+
/**
|
|
22011
|
+
* Forbidden
|
|
22012
|
+
*/
|
|
22013
|
+
403: Problem;
|
|
22014
|
+
/**
|
|
22015
|
+
* Not Found
|
|
22016
|
+
*/
|
|
22017
|
+
404: Problem;
|
|
22018
|
+
/**
|
|
22019
|
+
* Unprocessable Content
|
|
22020
|
+
*/
|
|
22021
|
+
422: Problem;
|
|
22022
|
+
};
|
|
22023
|
+
export type CreateTransferLineError = CreateTransferLineErrors[keyof CreateTransferLineErrors];
|
|
22024
|
+
export type CreateTransferLineResponses = {
|
|
22025
|
+
/**
|
|
22026
|
+
* Created
|
|
22027
|
+
*/
|
|
22028
|
+
201: AssetsTransferResponseObject;
|
|
22029
|
+
};
|
|
22030
|
+
export type CreateTransferLineResponse = CreateTransferLineResponses[keyof CreateTransferLineResponses];
|
|
22031
|
+
export type DeleteTransferLineData = {
|
|
22032
|
+
body?: never;
|
|
22033
|
+
path: {
|
|
22034
|
+
transfer_id: string;
|
|
22035
|
+
line_id: string;
|
|
22036
|
+
};
|
|
22037
|
+
query?: never;
|
|
22038
|
+
url: '/api/v1/assets/transfers/{transfer_id}/lines/{line_id}';
|
|
22039
|
+
};
|
|
22040
|
+
export type DeleteTransferLineErrors = {
|
|
22041
|
+
/**
|
|
22042
|
+
* Forbidden
|
|
22043
|
+
*/
|
|
22044
|
+
403: Problem;
|
|
22045
|
+
/**
|
|
22046
|
+
* Unprocessable Content
|
|
22047
|
+
*/
|
|
22048
|
+
422: Problem;
|
|
22049
|
+
};
|
|
22050
|
+
export type DeleteTransferLineError = DeleteTransferLineErrors[keyof DeleteTransferLineErrors];
|
|
22051
|
+
export type DeleteTransferLineResponses = {
|
|
22052
|
+
/**
|
|
22053
|
+
* No Content
|
|
22054
|
+
*/
|
|
22055
|
+
204: void;
|
|
22056
|
+
};
|
|
22057
|
+
export type DeleteTransferLineResponse = DeleteTransferLineResponses[keyof DeleteTransferLineResponses];
|
|
22058
|
+
export type UpdateTransferLineData = {
|
|
22059
|
+
body: AssetsTransferLineUpdateParameters;
|
|
22060
|
+
path: {
|
|
22061
|
+
transfer_id: string;
|
|
22062
|
+
line_id: string;
|
|
22063
|
+
};
|
|
22064
|
+
query?: never;
|
|
22065
|
+
url: '/api/v1/assets/transfers/{transfer_id}/lines/{line_id}';
|
|
22066
|
+
};
|
|
22067
|
+
export type UpdateTransferLineErrors = {
|
|
22068
|
+
/**
|
|
22069
|
+
* Bad Request
|
|
22070
|
+
*/
|
|
22071
|
+
400: Problem;
|
|
22072
|
+
/**
|
|
22073
|
+
* Forbidden
|
|
22074
|
+
*/
|
|
22075
|
+
403: Problem;
|
|
22076
|
+
/**
|
|
22077
|
+
* Not Found
|
|
22078
|
+
*/
|
|
22079
|
+
404: Problem;
|
|
22080
|
+
/**
|
|
22081
|
+
* Unprocessable Content
|
|
22082
|
+
*/
|
|
22083
|
+
422: Problem;
|
|
22084
|
+
};
|
|
22085
|
+
export type UpdateTransferLineError = UpdateTransferLineErrors[keyof UpdateTransferLineErrors];
|
|
22086
|
+
export type UpdateTransferLineResponses = {
|
|
22087
|
+
/**
|
|
22088
|
+
* Success
|
|
22089
|
+
*/
|
|
22090
|
+
200: AssetsTransferResponseObject;
|
|
22091
|
+
};
|
|
22092
|
+
export type UpdateTransferLineResponse = UpdateTransferLineResponses[keyof UpdateTransferLineResponses];
|
|
21798
22093
|
export type ListVendorsData = {
|
|
21799
22094
|
body?: never;
|
|
21800
22095
|
path?: never;
|