@dsptch-work/api-client 0.49.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.
@@ -4190,6 +4190,9 @@ export const zProjectResponseObject = z.object({
4190
4190
  id: z.string(),
4191
4191
  name: z.string()
4192
4192
  })),
4193
+ project_address: z.object({
4194
+ label: z.string()
4195
+ }).nullable(),
4193
4196
  federal_pwa_mode: z.enum([
4194
4197
  'all',
4195
4198
  'pw_only',
@@ -4248,9 +4251,23 @@ export const zProjectParameters = z.object({
4248
4251
  parent_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).nullish(),
4249
4252
  participating_company_ids: z.array(z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/)).optional(),
4250
4253
  manager_user_ids: z.array(z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/)).optional(),
4254
+ project_address_attributes: z.object({
4255
+ id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).nullish(),
4256
+ sub_address_number: z.string().nullish(),
4257
+ address_number: z.string().nullish(),
4258
+ neighborhood: z.string().nullish(),
4259
+ municipality: z.string().nullish(),
4260
+ sub_region: z.string().nullish(),
4261
+ region: z.string().nullish(),
4262
+ postal_code: z.string().nullish(),
4263
+ country: z.string().nullish(),
4264
+ timezone: z.string().nullish(),
4265
+ verified: z.boolean().optional(),
4266
+ label: z.string().nullish()
4267
+ }).nullish(),
4251
4268
  start_date: z.iso.date().nullish(),
4252
4269
  end_date: z.iso.date().nullish(),
4253
- tz_name: z.string().nullish(),
4270
+ tz_name: z.string().optional(),
4254
4271
  billing_start_day: z.int().gte(0).lte(6).nullish(),
4255
4272
  federal_pwa_mode: z.enum([
4256
4273
  'all',
@@ -4289,9 +4306,23 @@ export const zProjectUpdateParameters = z.object({
4289
4306
  parent_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).nullish(),
4290
4307
  participating_company_ids: z.array(z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/)).optional(),
4291
4308
  manager_user_ids: z.array(z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/)).optional(),
4309
+ project_address_attributes: z.object({
4310
+ id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).nullish(),
4311
+ sub_address_number: z.string().nullish(),
4312
+ address_number: z.string().nullish(),
4313
+ neighborhood: z.string().nullish(),
4314
+ municipality: z.string().nullish(),
4315
+ sub_region: z.string().nullish(),
4316
+ region: z.string().nullish(),
4317
+ postal_code: z.string().nullish(),
4318
+ country: z.string().nullish(),
4319
+ timezone: z.string().nullish(),
4320
+ verified: z.boolean().optional(),
4321
+ label: z.string().nullish()
4322
+ }).nullish(),
4292
4323
  start_date: z.iso.date().nullish(),
4293
4324
  end_date: z.iso.date().nullish(),
4294
- tz_name: z.string().nullish(),
4325
+ tz_name: z.string().optional(),
4295
4326
  billing_start_day: z.int().gte(0).lte(6).nullish(),
4296
4327
  federal_pwa_mode: z.enum([
4297
4328
  'all',
@@ -8093,6 +8124,7 @@ export const zAssetsSiteResponseObject = z.object({
8093
8124
  kind: z.enum(['warehouse', 'yard']),
8094
8125
  name: z.string(),
8095
8126
  site_type: z.string().nullable(),
8127
+ responsible_user_ids: z.array(z.string()),
8096
8128
  created_at: z.iso.datetime(),
8097
8129
  updated_at: z.iso.datetime()
8098
8130
  });
@@ -8102,7 +8134,8 @@ export const zAssetsSiteResponseObject = z.object({
8102
8134
  export const zAssetsSiteParameters = z.object({
8103
8135
  site_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).nullish(),
8104
8136
  kind: z.enum(['warehouse', 'yard']),
8105
- name: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).nullish()
8137
+ name: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).nullish(),
8138
+ responsible_user_ids: z.array(z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/)).optional()
8106
8139
  });
8107
8140
  /**
8108
8141
  * Request body for updating an asset location. Every field is optional; send only the fields to change. The saved location must still have a name or a backing `site_id`.
@@ -8110,7 +8143,8 @@ export const zAssetsSiteParameters = z.object({
8110
8143
  export const zAssetsSiteUpdateParameters = z.object({
8111
8144
  site_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).nullish(),
8112
8145
  kind: z.enum(['warehouse', 'yard']).optional(),
8113
- name: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).nullish()
8146
+ name: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).nullish(),
8147
+ responsible_user_ids: z.array(z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/)).optional()
8114
8148
  });
8115
8149
  /**
8116
8150
  * A company-level rule that auto-generates asset form assignments. When an item of one of its products changes custody (an assignment or unassignment), the rule creates or refreshes a form task for the chosen users, due on the configured schedule.
@@ -8818,7 +8852,7 @@ export const zAssetsSubLocationUpdateParameters = z.object({
8818
8852
  code: z.string().min(1).optional()
8819
8853
  });
8820
8854
  /**
8821
- * A completed movement of item stock between two holders, each a site, a user, or a container. Each line moves one item; applying the transfer records paired outbound and inbound transactions and updates the on-hand, custody, and containment counts. Transfers created through this API are always completed. 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.
8855
+ * 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.
8822
8856
  */
8823
8857
  export const zAssetsTransferResponseObject = z.object({
8824
8858
  id: z.string(),
@@ -8827,6 +8861,7 @@ export const zAssetsTransferResponseObject = z.object({
8827
8861
  'pending',
8828
8862
  'in_transit',
8829
8863
  'completed',
8864
+ 'declined',
8830
8865
  'cancelled'
8831
8866
  ]),
8832
8867
  from_assets_site_id: z.string().nullable(),
@@ -8837,7 +8872,9 @@ export const zAssetsTransferResponseObject = z.object({
8837
8872
  to_container_item_id: z.string().nullable(),
8838
8873
  to_assets_sub_location_id: z.string().nullable(),
8839
8874
  initiated_by_user_id: z.string(),
8875
+ resolved_by_user_id: z.string().nullable(),
8840
8876
  completed_at: z.iso.datetime().nullable(),
8877
+ resolved_at: z.iso.datetime().nullable(),
8841
8878
  transfer_lines: z.array(z.object({
8842
8879
  id: z.string(),
8843
8880
  assets_item_id: z.string(),
@@ -8848,7 +8885,7 @@ export const zAssetsTransferResponseObject = z.object({
8848
8885
  updated_at: z.iso.datetime()
8849
8886
  });
8850
8887
  /**
8851
- * 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. Moves are applied immediately, so the source must hold enough of each item.
8888
+ * 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.
8852
8889
  */
8853
8890
  export const zAssetsTransferParameters = z.object({
8854
8891
  from_assets_site_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).optional(),
@@ -8860,11 +8897,47 @@ export const zAssetsTransferParameters = z.object({
8860
8897
  to_container_item_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).optional(),
8861
8898
  to_assets_sub_location_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).nullish(),
8862
8899
  performed_by_user_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/),
8900
+ status: z.enum(['pending', 'completed']).optional(),
8863
8901
  line_items: z.array(z.object({
8864
8902
  assets_item_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/),
8865
8903
  quantity: z.int().gte(1)
8866
8904
  })).min(1)
8867
8905
  });
8906
+ /**
8907
+ * Answer a transfer — decline, cancel, or reopen it. The named filer is recorded on the step. An optional note is the step comment.
8908
+ */
8909
+ export const zAssetsTransferCommandParameters = z.object({
8910
+ performed_by_user_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/),
8911
+ note: z.string().optional()
8912
+ });
8913
+ /**
8914
+ * 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.
8915
+ */
8916
+ export const zAssetsTransferAcceptanceParameters = z.object({
8917
+ performed_by_user_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/),
8918
+ note: z.string().optional(),
8919
+ placements: z.array(z.object({
8920
+ line_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/),
8921
+ container_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).nullish(),
8922
+ sub_location_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).nullish()
8923
+ })).optional()
8924
+ });
8925
+ /**
8926
+ * 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.
8927
+ */
8928
+ export const zAssetsTransferLineParameters = z.object({
8929
+ assets_item_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/),
8930
+ quantity: z.int().gte(1),
8931
+ from_assets_sub_location_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).nullish(),
8932
+ to_assets_sub_location_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).nullish()
8933
+ });
8934
+ /**
8935
+ * 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.
8936
+ */
8937
+ export const zAssetsTransferLineUpdateParameters = z.object({
8938
+ quantity: z.int().gte(1).optional(),
8939
+ to_assets_sub_location_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).nullish()
8940
+ });
8868
8941
  /**
8869
8942
  * 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.
8870
8943
  */
@@ -10271,6 +10344,63 @@ export const zGetTransferPath = z.object({
10271
10344
  * Success
10272
10345
  */
10273
10346
  export const zGetTransferResponse = zAssetsTransferResponseObject;
10347
+ export const zAcceptTransferBody = zAssetsTransferAcceptanceParameters;
10348
+ export const zAcceptTransferPath = z.object({
10349
+ transfer_id: z.string()
10350
+ });
10351
+ /**
10352
+ * Created
10353
+ */
10354
+ export const zAcceptTransferResponse = zAssetsTransferResponseObject;
10355
+ export const zDeclineTransferBody = zAssetsTransferCommandParameters;
10356
+ export const zDeclineTransferPath = z.object({
10357
+ transfer_id: z.string()
10358
+ });
10359
+ /**
10360
+ * Created
10361
+ */
10362
+ export const zDeclineTransferResponse = zAssetsTransferResponseObject;
10363
+ export const zCancelTransferBody = zAssetsTransferCommandParameters;
10364
+ export const zCancelTransferPath = z.object({
10365
+ transfer_id: z.string()
10366
+ });
10367
+ /**
10368
+ * Created
10369
+ */
10370
+ export const zCancelTransferResponse = zAssetsTransferResponseObject;
10371
+ export const zReopenTransferBody = zAssetsTransferCommandParameters;
10372
+ export const zReopenTransferPath = z.object({
10373
+ transfer_id: z.string()
10374
+ });
10375
+ /**
10376
+ * Created
10377
+ */
10378
+ export const zReopenTransferResponse = zAssetsTransferResponseObject;
10379
+ export const zCreateTransferLineBody = zAssetsTransferLineParameters;
10380
+ export const zCreateTransferLinePath = z.object({
10381
+ transfer_id: z.string()
10382
+ });
10383
+ /**
10384
+ * Created
10385
+ */
10386
+ export const zCreateTransferLineResponse = zAssetsTransferResponseObject;
10387
+ export const zDeleteTransferLinePath = z.object({
10388
+ transfer_id: z.string(),
10389
+ line_id: z.string()
10390
+ });
10391
+ /**
10392
+ * No Content
10393
+ */
10394
+ export const zDeleteTransferLineResponse = z.void();
10395
+ export const zUpdateTransferLineBody = zAssetsTransferLineUpdateParameters;
10396
+ export const zUpdateTransferLinePath = z.object({
10397
+ transfer_id: z.string(),
10398
+ line_id: z.string()
10399
+ });
10400
+ /**
10401
+ * Success
10402
+ */
10403
+ export const zUpdateTransferLineResponse = zAssetsTransferResponseObject;
10274
10404
  export const zListVendorsQuery = z.object({
10275
10405
  filter: z.string().optional(),
10276
10406
  'filter[unexpected]': z.string().optional(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dsptch-work/api-client",
3
- "version": "0.49.0",
3
+ "version": "0.51.0",
4
4
  "description": "Generated TypeScript client for the DSPTCH REST API.",
5
5
  "keywords": [
6
6
  "dsptch",