conductor-node 12.1.0 → 12.3.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.
Files changed (44) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/README.md +1 -1
  3. package/package.json +1 -1
  4. package/resources/qbd/index.d.ts +1 -0
  5. package/resources/qbd/index.d.ts.map +1 -1
  6. package/resources/qbd/index.js +5 -2
  7. package/resources/qbd/index.js.map +1 -1
  8. package/resources/qbd/index.mjs +1 -0
  9. package/resources/qbd/index.mjs.map +1 -1
  10. package/resources/qbd/inventory-assembly-items.d.ts +10 -7
  11. package/resources/qbd/inventory-assembly-items.d.ts.map +1 -1
  12. package/resources/qbd/inventory-assembly-items.js.map +1 -1
  13. package/resources/qbd/inventory-assembly-items.mjs.map +1 -1
  14. package/resources/qbd/inventory-items.d.ts +8 -6
  15. package/resources/qbd/inventory-items.d.ts.map +1 -1
  16. package/resources/qbd/inventory-items.js.map +1 -1
  17. package/resources/qbd/inventory-items.mjs.map +1 -1
  18. package/resources/qbd/item-sites.d.ts +227 -0
  19. package/resources/qbd/item-sites.d.ts.map +1 -0
  20. package/resources/qbd/item-sites.js +36 -0
  21. package/resources/qbd/item-sites.js.map +1 -0
  22. package/resources/qbd/item-sites.mjs +31 -0
  23. package/resources/qbd/item-sites.mjs.map +1 -0
  24. package/resources/qbd/qbd.d.ts +4 -0
  25. package/resources/qbd/qbd.d.ts.map +1 -1
  26. package/resources/qbd/qbd.js +5 -0
  27. package/resources/qbd/qbd.js.map +1 -1
  28. package/resources/qbd/qbd.mjs +5 -0
  29. package/resources/qbd/qbd.mjs.map +1 -1
  30. package/resources/qbd/receive-payments.d.ts +1 -1
  31. package/resources/qbd/receive-payments.d.ts.map +1 -1
  32. package/resources/qbd/sales-receipts.d.ts +3 -3
  33. package/resources/qbd/sales-receipts.d.ts.map +1 -1
  34. package/src/resources/qbd/index.ts +7 -0
  35. package/src/resources/qbd/inventory-assembly-items.ts +10 -7
  36. package/src/resources/qbd/inventory-items.ts +8 -6
  37. package/src/resources/qbd/item-sites.ts +302 -0
  38. package/src/resources/qbd/qbd.ts +19 -0
  39. package/src/resources/qbd/receive-payments.ts +1 -1
  40. package/src/resources/qbd/sales-receipts.ts +3 -3
  41. package/src/version.ts +1 -1
  42. package/version.d.ts +1 -1
  43. package/version.js +1 -1
  44. package/version.mjs +1 -1
@@ -0,0 +1,302 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../../resource';
4
+ import * as Core from '../../core';
5
+ import { CursorPage, type CursorPageParams } from '../../pagination';
6
+
7
+ export class ItemSites extends APIResource {
8
+ /**
9
+ * Retrieves an item site by ID.
10
+ */
11
+ retrieve(
12
+ id: string,
13
+ params: ItemSiteRetrieveParams,
14
+ options?: Core.RequestOptions,
15
+ ): Core.APIPromise<ItemSite> {
16
+ const { conductorEndUserId } = params;
17
+ return this._client.get(`/quickbooks-desktop/item-sites/${id}`, {
18
+ ...options,
19
+ headers: { 'Conductor-End-User-Id': conductorEndUserId, ...options?.headers },
20
+ });
21
+ }
22
+
23
+ /**
24
+ * Returns a list of item sites. Use the `cursor` parameter to paginate through the
25
+ * results.
26
+ */
27
+ list(
28
+ params: ItemSiteListParams,
29
+ options?: Core.RequestOptions,
30
+ ): Core.PagePromise<ItemSitesCursorPage, ItemSite> {
31
+ const { conductorEndUserId, ...query } = params;
32
+ return this._client.getAPIList('/quickbooks-desktop/item-sites', ItemSitesCursorPage, {
33
+ query,
34
+ ...options,
35
+ headers: { 'Conductor-End-User-Id': conductorEndUserId, ...options?.headers },
36
+ });
37
+ }
38
+ }
39
+
40
+ export class ItemSitesCursorPage extends CursorPage<ItemSite> {}
41
+
42
+ export interface ItemSite {
43
+ /**
44
+ * The unique identifier assigned by QuickBooks to this item site. This ID is
45
+ * unique across all item sites but not across different QuickBooks object types.
46
+ */
47
+ id: string;
48
+
49
+ /**
50
+ * The inventory level of this item site at which a new build assembly should
51
+ * begin. When the combined `quantityOnHand` and `quantityOnPurchaseOrders` drops
52
+ * below this point, QuickBooks flags the need to build additional units.
53
+ */
54
+ assemblyBuildPoint: number | null;
55
+
56
+ /**
57
+ * The date and time when this item site was created, in ISO 8601 format
58
+ * (YYYY-MM-DDThh:mm:ss±hh:mm). The time zone is the same as the user's time zone
59
+ * in QuickBooks.
60
+ */
61
+ createdAt: string;
62
+
63
+ /**
64
+ * The inventory assembly item associated with this item site. An inventory
65
+ * assembly item is assembled or manufactured from other inventory items, and the
66
+ * items and/or assemblies that make up the assembly are called components.
67
+ */
68
+ inventoryAssemblyItem: ItemSite.InventoryAssemblyItem | null;
69
+
70
+ /**
71
+ * The inventory item associated with this item site.
72
+ */
73
+ inventoryItem: ItemSite.InventoryItem | null;
74
+
75
+ /**
76
+ * The site location where inventory for the item associated with this item site is
77
+ * stored.
78
+ */
79
+ inventorySite: ItemSite.InventorySite | null;
80
+
81
+ /**
82
+ * The specific location (e.g., bin or shelf) within the inventory site where the
83
+ * item associated with this item site is stored.
84
+ */
85
+ inventorySiteLocation: ItemSite.InventorySiteLocation | null;
86
+
87
+ /**
88
+ * The type of object. This value is always `"qbd_item_site"`.
89
+ */
90
+ objectType: 'qbd_item_site';
91
+
92
+ /**
93
+ * The number of units of this item site currently in inventory. `quantityOnHand`
94
+ * multiplied by `averageCost` equals `totalValue` for inventory item lists. To
95
+ * change the `quantityOnHand` for an item site, you must use an
96
+ * inventory-adjustment instead of updating the item site directly.
97
+ */
98
+ quantityOnHand: number | null;
99
+
100
+ /**
101
+ * The number of units of this item site that are currently on pending inventory
102
+ * transfer transactions.
103
+ */
104
+ quantityOnPendingTransfers: number | null;
105
+
106
+ /**
107
+ * The number of units of this item site that are currently listed on outstanding
108
+ * purchase orders and have not yet been received.
109
+ */
110
+ quantityOnPurchaseOrders: number | null;
111
+
112
+ /**
113
+ * The number of units of this item site that are currently listed on outstanding
114
+ * sales orders and have not yet been fulfilled or delivered to customers.
115
+ */
116
+ quantityOnSalesOrders: number | null;
117
+
118
+ /**
119
+ * The number of units of this item site required by pending build transactions.
120
+ */
121
+ quantityRequiredByPendingBuildTransactions: number | null;
122
+
123
+ /**
124
+ * The number of units of this item site that are scheduled to be built on pending
125
+ * build transactions.
126
+ */
127
+ quantityToBeBuiltByPendingBuildTransactions: number | null;
128
+
129
+ /**
130
+ * The inventory level at which QuickBooks prompts you to reorder this item site.
131
+ */
132
+ reorderLevel: number | null;
133
+
134
+ /**
135
+ * The current QuickBooks-assigned revision number of this item site object, which
136
+ * changes each time the object is modified. When updating this object, you must
137
+ * provide the most recent `revisionNumber` to ensure you're working with the
138
+ * latest data; otherwise, the update will return an error.
139
+ */
140
+ revisionNumber: string;
141
+
142
+ /**
143
+ * The date and time when this item site was last updated, in ISO 8601 format
144
+ * (YYYY-MM-DDThh:mm:ss±hh:mm). The time zone is the same as the user's time zone
145
+ * in QuickBooks.
146
+ */
147
+ updatedAt: string;
148
+ }
149
+
150
+ export namespace ItemSite {
151
+ /**
152
+ * The inventory assembly item associated with this item site. An inventory
153
+ * assembly item is assembled or manufactured from other inventory items, and the
154
+ * items and/or assemblies that make up the assembly are called components.
155
+ */
156
+ export interface InventoryAssemblyItem {
157
+ /**
158
+ * The unique identifier assigned by QuickBooks to this object. This ID is unique
159
+ * across all objects of the same type, but not across different QuickBooks object
160
+ * types.
161
+ */
162
+ id: string | null;
163
+
164
+ /**
165
+ * The fully-qualified unique name for this object, formed by combining the names
166
+ * of its parent objects with its own `name`, separated by colons. Not
167
+ * case-sensitive.
168
+ */
169
+ fullName: string | null;
170
+ }
171
+
172
+ /**
173
+ * The inventory item associated with this item site.
174
+ */
175
+ export interface InventoryItem {
176
+ /**
177
+ * The unique identifier assigned by QuickBooks to this object. This ID is unique
178
+ * across all objects of the same type, but not across different QuickBooks object
179
+ * types.
180
+ */
181
+ id: string | null;
182
+
183
+ /**
184
+ * The fully-qualified unique name for this object, formed by combining the names
185
+ * of its parent objects with its own `name`, separated by colons. Not
186
+ * case-sensitive.
187
+ */
188
+ fullName: string | null;
189
+ }
190
+
191
+ /**
192
+ * The site location where inventory for the item associated with this item site is
193
+ * stored.
194
+ */
195
+ export interface InventorySite {
196
+ /**
197
+ * The unique identifier assigned by QuickBooks to this object. This ID is unique
198
+ * across all objects of the same type, but not across different QuickBooks object
199
+ * types.
200
+ */
201
+ id: string | null;
202
+
203
+ /**
204
+ * The fully-qualified unique name for this object, formed by combining the names
205
+ * of its parent objects with its own `name`, separated by colons. Not
206
+ * case-sensitive.
207
+ */
208
+ fullName: string | null;
209
+ }
210
+
211
+ /**
212
+ * The specific location (e.g., bin or shelf) within the inventory site where the
213
+ * item associated with this item site is stored.
214
+ */
215
+ export interface InventorySiteLocation {
216
+ /**
217
+ * The unique identifier assigned by QuickBooks to this object. This ID is unique
218
+ * across all objects of the same type, but not across different QuickBooks object
219
+ * types.
220
+ */
221
+ id: string | null;
222
+
223
+ /**
224
+ * The fully-qualified unique name for this object, formed by combining the names
225
+ * of its parent objects with its own `name`, separated by colons. Not
226
+ * case-sensitive.
227
+ */
228
+ fullName: string | null;
229
+ }
230
+ }
231
+
232
+ export interface ItemSiteRetrieveParams {
233
+ /**
234
+ * The ID of the EndUser to receive this request (e.g.,
235
+ * `"Conductor-End-User-Id: {{END_USER_ID}}"`).
236
+ */
237
+ conductorEndUserId: string;
238
+ }
239
+
240
+ export interface ItemSiteListParams extends CursorPageParams {
241
+ /**
242
+ * Header param: The ID of the EndUser to receive this request (e.g.,
243
+ * `"Conductor-End-User-Id: {{END_USER_ID}}"`).
244
+ */
245
+ conductorEndUserId: string;
246
+
247
+ /**
248
+ * Query param: Filter for specific item sites by their QuickBooks-assigned unique
249
+ * identifier(s).
250
+ *
251
+ * **IMPORTANT**: If you include this parameter, QuickBooks will ignore all other
252
+ * query parameters for this request.
253
+ *
254
+ * **NOTE**: If any of the values you specify in this parameter are not found, the
255
+ * request will return an error.
256
+ */
257
+ ids?: Array<string>;
258
+
259
+ /**
260
+ * Query param: Filter for item sites for these items.
261
+ */
262
+ itemIds?: Array<string>;
263
+
264
+ /**
265
+ * Query param: Filter for item sites that match this item type.
266
+ */
267
+ itemType?:
268
+ | 'all_except_fixed_asset'
269
+ | 'assembly'
270
+ | 'discount'
271
+ | 'fixed_asset'
272
+ | 'inventory'
273
+ | 'inventory_and_assembly'
274
+ | 'non_inventory'
275
+ | 'other_charge'
276
+ | 'payment'
277
+ | 'sales'
278
+ | 'sales_tax'
279
+ | 'service';
280
+
281
+ /**
282
+ * Query param: Filter for item sites at these sites. A site represents a physical
283
+ * location, such as a warehouse or store.
284
+ */
285
+ siteIds?: Array<string>;
286
+
287
+ /**
288
+ * Query param: Filter for item sites that are active, inactive, or both.
289
+ */
290
+ status?: 'active' | 'all' | 'inactive';
291
+ }
292
+
293
+ ItemSites.ItemSitesCursorPage = ItemSitesCursorPage;
294
+
295
+ export declare namespace ItemSites {
296
+ export {
297
+ type ItemSite as ItemSite,
298
+ ItemSitesCursorPage as ItemSitesCursorPage,
299
+ type ItemSiteRetrieveParams as ItemSiteRetrieveParams,
300
+ type ItemSiteListParams as ItemSiteListParams,
301
+ };
302
+ }
@@ -241,6 +241,14 @@ import {
241
241
  ItemReceipts,
242
242
  ItemReceiptsCursorPage,
243
243
  } from './item-receipts';
244
+ import * as ItemSitesAPI from './item-sites';
245
+ import {
246
+ ItemSite,
247
+ ItemSiteListParams,
248
+ ItemSiteRetrieveParams,
249
+ ItemSites,
250
+ ItemSitesCursorPage,
251
+ } from './item-sites';
244
252
  import * as JournalEntriesAPI from './journal-entries';
245
253
  import {
246
254
  JournalEntries,
@@ -477,6 +485,7 @@ export class Qbd extends APIResource {
477
485
  invoices: InvoicesAPI.Invoices = new InvoicesAPI.Invoices(this._client);
478
486
  itemGroups: ItemGroupsAPI.ItemGroups = new ItemGroupsAPI.ItemGroups(this._client);
479
487
  itemReceipts: ItemReceiptsAPI.ItemReceipts = new ItemReceiptsAPI.ItemReceipts(this._client);
488
+ itemSites: ItemSitesAPI.ItemSites = new ItemSitesAPI.ItemSites(this._client);
480
489
  journalEntries: JournalEntriesAPI.JournalEntries = new JournalEntriesAPI.JournalEntries(this._client);
481
490
  nonInventoryItems: NonInventoryItemsAPI.NonInventoryItems = new NonInventoryItemsAPI.NonInventoryItems(
482
491
  this._client,
@@ -583,6 +592,8 @@ Qbd.ItemGroups = ItemGroups;
583
592
  Qbd.ItemGroupsCursorPage = ItemGroupsCursorPage;
584
593
  Qbd.ItemReceipts = ItemReceipts;
585
594
  Qbd.ItemReceiptsCursorPage = ItemReceiptsCursorPage;
595
+ Qbd.ItemSites = ItemSites;
596
+ Qbd.ItemSitesCursorPage = ItemSitesCursorPage;
586
597
  Qbd.JournalEntries = JournalEntries;
587
598
  Qbd.JournalEntriesCursorPage = JournalEntriesCursorPage;
588
599
  Qbd.NonInventoryItems = NonInventoryItems;
@@ -867,6 +878,14 @@ export declare namespace Qbd {
867
878
  type ItemReceiptDeleteParams as ItemReceiptDeleteParams,
868
879
  };
869
880
 
881
+ export {
882
+ ItemSites as ItemSites,
883
+ type ItemSite as ItemSite,
884
+ ItemSitesCursorPage as ItemSitesCursorPage,
885
+ type ItemSiteRetrieveParams as ItemSiteRetrieveParams,
886
+ type ItemSiteListParams as ItemSiteListParams,
887
+ };
888
+
870
889
  export {
871
890
  JournalEntries as JournalEntries,
872
891
  type JournalEntry as JournalEntry,
@@ -485,7 +485,7 @@ export namespace ReceivePayment {
485
485
  /**
486
486
  * The cardholder's name on the card.
487
487
  */
488
- name: string;
488
+ name: string | null;
489
489
 
490
490
  /**
491
491
  * The credit card number. Must be masked with lower case "x" and no dashes.
@@ -488,7 +488,7 @@ export namespace SalesReceipt {
488
488
  /**
489
489
  * The cardholder's name on the card.
490
490
  */
491
- name: string;
491
+ name: string | null;
492
492
 
493
493
  /**
494
494
  * The credit card number. Must be masked with lower case "x" and no dashes.
@@ -1116,7 +1116,7 @@ export namespace SalesReceipt {
1116
1116
  /**
1117
1117
  * The cardholder's name on the card.
1118
1118
  */
1119
- name: string;
1119
+ name: string | null;
1120
1120
 
1121
1121
  /**
1122
1122
  * The credit card number. Must be masked with lower case "x" and no dashes.
@@ -1649,7 +1649,7 @@ export namespace SalesReceipt {
1649
1649
  /**
1650
1650
  * The cardholder's name on the card.
1651
1651
  */
1652
- name: string;
1652
+ name: string | null;
1653
1653
 
1654
1654
  /**
1655
1655
  * The credit card number. Must be masked with lower case "x" and no dashes.
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '12.1.0'; // x-release-please-version
1
+ export const VERSION = '12.3.0'; // x-release-please-version
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "12.1.0";
1
+ export declare const VERSION = "12.3.0";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '12.1.0'; // x-release-please-version
4
+ exports.VERSION = '12.3.0'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '12.1.0'; // x-release-please-version
1
+ export const VERSION = '12.3.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map