conductor-node 12.24.0 → 12.25.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.
@@ -0,0 +1,426 @@
1
+ import { APIResource } from "../../resource.js";
2
+ import * as Core from "../../core.js";
3
+ export declare class UnitOfMeasureSets extends APIResource {
4
+ /**
5
+ * Creates a new unit-of-measure set.
6
+ *
7
+ * NOTE: The QuickBooks company file must have unit-of-measure enabled (either a
8
+ * single unit per item or multiple units per item). To support both
9
+ * configurations, prefix all UOM set names with "By the" (for example, "By the
10
+ * Barrel"); otherwise, the set may not appear in the QuickBooks UI when the
11
+ * company file is configured for a single unit per item.
12
+ *
13
+ * @example
14
+ * ```ts
15
+ * const unitOfMeasureSet =
16
+ * await conductor.qbd.unitOfMeasureSets.create({
17
+ * baseUnit: { abbreviation: 'ea', name: 'Each' },
18
+ * name: 'Weight Units',
19
+ * unitOfMeasureType: 'count',
20
+ * conductorEndUserId: 'end_usr_1234567abcdefg',
21
+ * });
22
+ * ```
23
+ */
24
+ create(params: UnitOfMeasureSetCreateParams, options?: Core.RequestOptions): Core.APIPromise<UnitOfMeasureSet>;
25
+ /**
26
+ * Retrieves an unit-of-measure set by ID.
27
+ *
28
+ * @example
29
+ * ```ts
30
+ * const unitOfMeasureSet =
31
+ * await conductor.qbd.unitOfMeasureSets.retrieve(
32
+ * '80000001-1234567890',
33
+ * { conductorEndUserId: 'end_usr_1234567abcdefg' },
34
+ * );
35
+ * ```
36
+ */
37
+ retrieve(id: string, params: UnitOfMeasureSetRetrieveParams, options?: Core.RequestOptions): Core.APIPromise<UnitOfMeasureSet>;
38
+ /**
39
+ * Lists all unit-of-measure sets. NOTE: QuickBooks Desktop does not support
40
+ * pagination for unit-of-measure sets; hence, there is no cursor parameter. Users
41
+ * typically have few unit-of-measure sets.
42
+ *
43
+ * NOTE: The QuickBooks company file must have unit-of-measure enabled (either a
44
+ * single unit per item or multiple units per item).
45
+ *
46
+ * @example
47
+ * ```ts
48
+ * const unitOfMeasureSets =
49
+ * await conductor.qbd.unitOfMeasureSets.list({
50
+ * conductorEndUserId: 'end_usr_1234567abcdefg',
51
+ * });
52
+ * ```
53
+ */
54
+ list(params: UnitOfMeasureSetListParams, options?: Core.RequestOptions): Core.APIPromise<UnitOfMeasureSetListResponse>;
55
+ }
56
+ export interface UnitOfMeasureSet {
57
+ /**
58
+ * The unique identifier assigned by QuickBooks to this unit-of-measure set. This
59
+ * ID is unique across all unit-of-measure sets but not across different QuickBooks
60
+ * object types.
61
+ */
62
+ id: string;
63
+ /**
64
+ * The unit-of-measure set's base unit used to track and price item quantities. If
65
+ * the company file is enabled for a single unit of measure per item, the base unit
66
+ * is the only unit available on transaction line items. If enabled for multiple
67
+ * units per item, the base unit is the default unless overridden by the set's
68
+ * default units.
69
+ */
70
+ baseUnit: UnitOfMeasureSet.BaseUnit;
71
+ /**
72
+ * The date and time when this unit-of-measure set was created, in ISO 8601 format
73
+ * (YYYY-MM-DDThh:mm:ss±hh:mm). The time zone is the same as the user's time zone
74
+ * in QuickBooks.
75
+ */
76
+ createdAt: string;
77
+ /**
78
+ * The unit-of-measure set's default units to appear in the U/M field on
79
+ * transaction line items. You can specify separate defaults for purchases, sales,
80
+ * and shipping.
81
+ */
82
+ defaultUnits: Array<UnitOfMeasureSet.DefaultUnit>;
83
+ /**
84
+ * Indicates whether this unit-of-measure set is active. Inactive objects are
85
+ * typically hidden from views and reports in QuickBooks. Defaults to `true`.
86
+ */
87
+ isActive: boolean;
88
+ /**
89
+ * The case-insensitive unique name of this unit-of-measure set, unique across all
90
+ * unit-of-measure sets. To ensure this set appears in the QuickBooks UI for
91
+ * companies configured with a single unit per item, prefix the name with "By the"
92
+ * (e.g., "By the Barrel").
93
+ *
94
+ * **NOTE**: Unit-of-measure sets do not have a `fullName` field because they are
95
+ * not hierarchical objects, which is why `name` is unique for them but not for
96
+ * objects that have parents.
97
+ */
98
+ name: string;
99
+ /**
100
+ * The type of object. This value is always `"qbd_unit_of_measure_set"`.
101
+ */
102
+ objectType: 'qbd_unit_of_measure_set';
103
+ /**
104
+ * The unit-of-measure set's related units, each specifying how many base units
105
+ * they represent (conversion ratio).
106
+ */
107
+ relatedUnits: Array<UnitOfMeasureSet.RelatedUnit>;
108
+ /**
109
+ * The current QuickBooks-assigned revision number of this unit-of-measure set
110
+ * object, which changes each time the object is modified. When updating this
111
+ * object, you must provide the most recent `revisionNumber` to ensure you're
112
+ * working with the latest data; otherwise, the update will return an error.
113
+ */
114
+ revisionNumber: string;
115
+ /**
116
+ * The unit-of-measure set's type. Use "other" for a custom type defined in
117
+ * QuickBooks.
118
+ */
119
+ unitOfMeasureType: 'area' | 'count' | 'length' | 'other' | 'time' | 'volume' | 'weight';
120
+ /**
121
+ * The date and time when this unit-of-measure set was last updated, in ISO 8601
122
+ * format (YYYY-MM-DDThh:mm:ss±hh:mm). The time zone is the same as the user's time
123
+ * zone in QuickBooks.
124
+ */
125
+ updatedAt: string;
126
+ }
127
+ export declare namespace UnitOfMeasureSet {
128
+ /**
129
+ * The unit-of-measure set's base unit used to track and price item quantities. If
130
+ * the company file is enabled for a single unit of measure per item, the base unit
131
+ * is the only unit available on transaction line items. If enabled for multiple
132
+ * units per item, the base unit is the default unless overridden by the set's
133
+ * default units.
134
+ */
135
+ interface BaseUnit {
136
+ /**
137
+ * The base unit's short identifier shown in the QuickBooks U/M field on
138
+ * transaction line items.
139
+ */
140
+ abbreviation: string;
141
+ /**
142
+ * The case-insensitive unique name of this base unit, unique across all base
143
+ * units.
144
+ *
145
+ * **NOTE**: Base units do not have a `fullName` field because they are not
146
+ * hierarchical objects, which is why `name` is unique for them but not for objects
147
+ * that have parents.
148
+ */
149
+ name: string;
150
+ }
151
+ interface DefaultUnit {
152
+ /**
153
+ * The unit name for this default unit, as displayed in the U/M field. If the
154
+ * company file is enabled for multiple units per item, this appears as an
155
+ * available unit for the item. Must correspond to the base unit or a related unit
156
+ * defined in this set.
157
+ */
158
+ unit: string;
159
+ /**
160
+ * Where this default unit is used as the default: purchase line items, sales line
161
+ * items, or shipping lines.
162
+ */
163
+ unitUsedFor: 'purchase' | 'sales' | 'shipping';
164
+ }
165
+ interface RelatedUnit {
166
+ /**
167
+ * The related unit's short identifier shown in the QuickBooks U/M field on
168
+ * transaction line items.
169
+ */
170
+ abbreviation: string;
171
+ /**
172
+ * The number of base units in this related unit, represented as a decimal string.
173
+ * For example, if the base unit is "box" and this related unit is "case" with
174
+ * `conversionRatio` = "10", that means there are 10 boxes in one case.
175
+ */
176
+ conversionRatio: string;
177
+ /**
178
+ * The case-insensitive unique name of this related unit, unique across all related
179
+ * units.
180
+ *
181
+ * **NOTE**: Related units do not have a `fullName` field because they are not
182
+ * hierarchical objects, which is why `name` is unique for them but not for objects
183
+ * that have parents.
184
+ */
185
+ name: string;
186
+ }
187
+ }
188
+ export interface UnitOfMeasureSetListResponse {
189
+ /**
190
+ * The array of unit-of-measure sets.
191
+ */
192
+ data: Array<UnitOfMeasureSet>;
193
+ /**
194
+ * The type of object. This value is always `"list"`.
195
+ */
196
+ objectType: 'list';
197
+ /**
198
+ * The endpoint URL where this list can be accessed.
199
+ */
200
+ url: string;
201
+ }
202
+ export interface UnitOfMeasureSetCreateParams {
203
+ /**
204
+ * Body param: The unit-of-measure set's base unit used to track and price item
205
+ * quantities. If the company file is enabled for a single unit of measure per
206
+ * item, the base unit is the only unit available on transaction line items. If
207
+ * enabled for multiple units per item, the base unit is the default unless
208
+ * overridden by the set's default units.
209
+ */
210
+ baseUnit: UnitOfMeasureSetCreateParams.BaseUnit;
211
+ /**
212
+ * Body param: The case-insensitive unique name of this unit-of-measure set, unique
213
+ * across all unit-of-measure sets. To ensure this set appears in the QuickBooks UI
214
+ * for companies configured with a single unit per item, prefix the name with "By
215
+ * the" (e.g., "By the Barrel").
216
+ *
217
+ * **NOTE**: Unit-of-measure sets do not have a `fullName` field because they are
218
+ * not hierarchical objects, which is why `name` is unique for them but not for
219
+ * objects that have parents.
220
+ *
221
+ * Maximum length: 31 characters.
222
+ */
223
+ name: string;
224
+ /**
225
+ * Body param: The unit-of-measure set's type. Use "other" for a custom type
226
+ * defined in QuickBooks.
227
+ */
228
+ unitOfMeasureType: 'area' | 'count' | 'length' | 'other' | 'time' | 'volume' | 'weight';
229
+ /**
230
+ * Header param: The ID of the EndUser to receive this request (e.g.,
231
+ * `"Conductor-End-User-Id: {{END_USER_ID}}"`).
232
+ */
233
+ conductorEndUserId: string;
234
+ /**
235
+ * Body param: The unit-of-measure set's default units to appear in the U/M field
236
+ * on transaction line items. You can specify separate defaults for purchases,
237
+ * sales, and shipping.
238
+ */
239
+ defaultUnits?: Array<UnitOfMeasureSetCreateParams.DefaultUnit>;
240
+ /**
241
+ * Body param: Indicates whether this unit-of-measure set is active. Inactive
242
+ * objects are typically hidden from views and reports in QuickBooks. Defaults to
243
+ * `true`.
244
+ */
245
+ isActive?: boolean;
246
+ /**
247
+ * Body param: The unit-of-measure set's related units, each specifying how many
248
+ * base units they represent (conversion ratio).
249
+ */
250
+ relatedUnits?: Array<UnitOfMeasureSetCreateParams.RelatedUnit>;
251
+ }
252
+ export declare namespace UnitOfMeasureSetCreateParams {
253
+ /**
254
+ * The unit-of-measure set's base unit used to track and price item quantities. If
255
+ * the company file is enabled for a single unit of measure per item, the base unit
256
+ * is the only unit available on transaction line items. If enabled for multiple
257
+ * units per item, the base unit is the default unless overridden by the set's
258
+ * default units.
259
+ */
260
+ interface BaseUnit {
261
+ /**
262
+ * The base unit's short identifier shown in the QuickBooks U/M field on
263
+ * transaction line items.
264
+ *
265
+ * Maximum length: 31 characters.
266
+ */
267
+ abbreviation: string;
268
+ /**
269
+ * The case-insensitive unique name of this base unit, unique across all base
270
+ * units.
271
+ *
272
+ * **NOTE**: Base units do not have a `fullName` field because they are not
273
+ * hierarchical objects, which is why `name` is unique for them but not for objects
274
+ * that have parents.
275
+ *
276
+ * Maximum length: 31 characters.
277
+ */
278
+ name: string;
279
+ }
280
+ interface DefaultUnit {
281
+ /**
282
+ * The unit name for this default unit, as displayed in the U/M field. If the
283
+ * company file is enabled for multiple units per item, this appears as an
284
+ * available unit for the item. Must correspond to the base unit or a related unit
285
+ * defined in this set.
286
+ *
287
+ * Maximum length: 31 characters.
288
+ */
289
+ unit: string;
290
+ /**
291
+ * Where this default unit is used as the default: purchase line items, sales line
292
+ * items, or shipping lines.
293
+ */
294
+ unitUsedFor: 'purchase' | 'sales' | 'shipping';
295
+ }
296
+ interface RelatedUnit {
297
+ /**
298
+ * The related unit's short identifier shown in the QuickBooks U/M field on
299
+ * transaction line items.
300
+ *
301
+ * Maximum length: 31 characters.
302
+ */
303
+ abbreviation: string;
304
+ /**
305
+ * The number of base units in this related unit, represented as a decimal string.
306
+ * For example, if the base unit is "box" and this related unit is "case" with
307
+ * `conversionRatio` = "10", that means there are 10 boxes in one case.
308
+ */
309
+ conversionRatio: string;
310
+ /**
311
+ * The case-insensitive unique name of this related unit, unique across all related
312
+ * units.
313
+ *
314
+ * **NOTE**: Related units do not have a `fullName` field because they are not
315
+ * hierarchical objects, which is why `name` is unique for them but not for objects
316
+ * that have parents.
317
+ *
318
+ * Maximum length: 31 characters.
319
+ */
320
+ name: string;
321
+ }
322
+ }
323
+ export interface UnitOfMeasureSetRetrieveParams {
324
+ /**
325
+ * The ID of the EndUser to receive this request (e.g.,
326
+ * `"Conductor-End-User-Id: {{END_USER_ID}}"`).
327
+ */
328
+ conductorEndUserId: string;
329
+ }
330
+ export interface UnitOfMeasureSetListParams {
331
+ /**
332
+ * Header param: The ID of the EndUser to receive this request (e.g.,
333
+ * `"Conductor-End-User-Id: {{END_USER_ID}}"`).
334
+ */
335
+ conductorEndUserId: string;
336
+ /**
337
+ * Query param: Filter for specific unit-of-measure sets by their
338
+ * QuickBooks-assigned unique identifier(s).
339
+ *
340
+ * **IMPORTANT**: If you include this parameter, QuickBooks will ignore all other
341
+ * query parameters for this request.
342
+ *
343
+ * **NOTE**: If any of the values you specify in this parameter are not found, the
344
+ * request will return an error.
345
+ */
346
+ ids?: Array<string>;
347
+ /**
348
+ * Query param: The maximum number of objects to return.
349
+ *
350
+ * **IMPORTANT**: QuickBooks Desktop does not support cursor-based pagination for
351
+ * unit-of-measure sets. This parameter will limit the response size, but you
352
+ * cannot fetch subsequent results using a cursor. For pagination, use the
353
+ * name-range parameters instead (e.g., `nameFrom=A&nameTo=B`).
354
+ *
355
+ * When this parameter is omitted, the endpoint returns all unit-of-measure sets
356
+ * without limit, unlike paginated endpoints which default to 150 records. This is
357
+ * acceptable because unit-of-measure sets typically have low record counts.
358
+ */
359
+ limit?: number;
360
+ /**
361
+ * Query param: Filter for unit-of-measure sets whose `name` contains this
362
+ * substring, case-insensitive.
363
+ *
364
+ * **NOTE**: If you use this parameter, you cannot also use `nameStartsWith` or
365
+ * `nameEndsWith`.
366
+ */
367
+ nameContains?: string;
368
+ /**
369
+ * Query param: Filter for unit-of-measure sets whose `name` ends with this
370
+ * substring, case-insensitive.
371
+ *
372
+ * **NOTE**: If you use this parameter, you cannot also use `nameContains` or
373
+ * `nameStartsWith`.
374
+ */
375
+ nameEndsWith?: string;
376
+ /**
377
+ * Query param: Filter for unit-of-measure sets whose `name` is alphabetically
378
+ * greater than or equal to this value.
379
+ */
380
+ nameFrom?: string;
381
+ /**
382
+ * Query param: Filter for specific unit-of-measure sets by their name(s),
383
+ * case-insensitive. Like `id`, `name` is a unique identifier for an
384
+ * unit-of-measure set.
385
+ *
386
+ * **IMPORTANT**: If you include this parameter, QuickBooks will ignore all other
387
+ * query parameters for this request.
388
+ *
389
+ * **NOTE**: If any of the values you specify in this parameter are not found, the
390
+ * request will return an error.
391
+ */
392
+ names?: Array<string>;
393
+ /**
394
+ * Query param: Filter for unit-of-measure sets whose `name` starts with this
395
+ * substring, case-insensitive.
396
+ *
397
+ * **NOTE**: If you use this parameter, you cannot also use `nameContains` or
398
+ * `nameEndsWith`.
399
+ */
400
+ nameStartsWith?: string;
401
+ /**
402
+ * Query param: Filter for unit-of-measure sets whose `name` is alphabetically less
403
+ * than or equal to this value.
404
+ */
405
+ nameTo?: string;
406
+ /**
407
+ * Query param: Filter for unit-of-measure sets that are active, inactive, or both.
408
+ */
409
+ status?: 'active' | 'all' | 'inactive';
410
+ /**
411
+ * Query param: Filter for unit-of-measure sets updated on or after this date and
412
+ * time, in ISO 8601 format (YYYY-MM-DDTHH:mm:ss). If you only provide a date
413
+ * (YYYY-MM-DD), the time is assumed to be 00:00:00 of that day.
414
+ */
415
+ updatedAfter?: string;
416
+ /**
417
+ * Query param: Filter for unit-of-measure sets updated on or before this date and
418
+ * time, in ISO 8601 format (YYYY-MM-DDTHH:mm:ss). If you only provide a date
419
+ * (YYYY-MM-DD), the time is assumed to be 23:59:59 of that day.
420
+ */
421
+ updatedBefore?: string;
422
+ }
423
+ export declare namespace UnitOfMeasureSets {
424
+ export { type UnitOfMeasureSet as UnitOfMeasureSet, type UnitOfMeasureSetListResponse as UnitOfMeasureSetListResponse, type UnitOfMeasureSetCreateParams as UnitOfMeasureSetCreateParams, type UnitOfMeasureSetRetrieveParams as UnitOfMeasureSetRetrieveParams, type UnitOfMeasureSetListParams as UnitOfMeasureSetListParams, };
425
+ }
426
+ //# sourceMappingURL=unit-of-measure-sets.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"unit-of-measure-sets.d.ts","sourceRoot":"","sources":["../../src/resources/qbd/unit-of-measure-sets.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,KAAK,IAAI,MAAM,YAAY,CAAC;AAEnC,qBAAa,iBAAkB,SAAQ,WAAW;IAChD;;;;;;;;;;;;;;;;;;;OAmBG;IACH,MAAM,CACJ,MAAM,EAAE,4BAA4B,EACpC,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAC5B,IAAI,CAAC,UAAU,CAAC,gBAAgB,CAAC;IASpC;;;;;;;;;;;OAWG;IACH,QAAQ,CACN,EAAE,EAAE,MAAM,EACV,MAAM,EAAE,8BAA8B,EACtC,OAA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spec by Stainless. See CONTRIBUTING.md for details.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.UnitOfMeasureSets = void 0;
5
+ const resource_1 = require("../../resource.js");
6
+ class UnitOfMeasureSets extends resource_1.APIResource {
7
+ /**
8
+ * Creates a new unit-of-measure set.
9
+ *
10
+ * NOTE: The QuickBooks company file must have unit-of-measure enabled (either a
11
+ * single unit per item or multiple units per item). To support both
12
+ * configurations, prefix all UOM set names with "By the" (for example, "By the
13
+ * Barrel"); otherwise, the set may not appear in the QuickBooks UI when the
14
+ * company file is configured for a single unit per item.
15
+ *
16
+ * @example
17
+ * ```ts
18
+ * const unitOfMeasureSet =
19
+ * await conductor.qbd.unitOfMeasureSets.create({
20
+ * baseUnit: { abbreviation: 'ea', name: 'Each' },
21
+ * name: 'Weight Units',
22
+ * unitOfMeasureType: 'count',
23
+ * conductorEndUserId: 'end_usr_1234567abcdefg',
24
+ * });
25
+ * ```
26
+ */
27
+ create(params, options) {
28
+ const { conductorEndUserId, ...body } = params;
29
+ return this._client.post('/quickbooks-desktop/unit-of-measure-sets', {
30
+ body,
31
+ ...options,
32
+ headers: { 'Conductor-End-User-Id': conductorEndUserId, ...options?.headers },
33
+ });
34
+ }
35
+ /**
36
+ * Retrieves an unit-of-measure set by ID.
37
+ *
38
+ * @example
39
+ * ```ts
40
+ * const unitOfMeasureSet =
41
+ * await conductor.qbd.unitOfMeasureSets.retrieve(
42
+ * '80000001-1234567890',
43
+ * { conductorEndUserId: 'end_usr_1234567abcdefg' },
44
+ * );
45
+ * ```
46
+ */
47
+ retrieve(id, params, options) {
48
+ const { conductorEndUserId } = params;
49
+ return this._client.get(`/quickbooks-desktop/unit-of-measure-sets/${id}`, {
50
+ ...options,
51
+ headers: { 'Conductor-End-User-Id': conductorEndUserId, ...options?.headers },
52
+ });
53
+ }
54
+ /**
55
+ * Lists all unit-of-measure sets. NOTE: QuickBooks Desktop does not support
56
+ * pagination for unit-of-measure sets; hence, there is no cursor parameter. Users
57
+ * typically have few unit-of-measure sets.
58
+ *
59
+ * NOTE: The QuickBooks company file must have unit-of-measure enabled (either a
60
+ * single unit per item or multiple units per item).
61
+ *
62
+ * @example
63
+ * ```ts
64
+ * const unitOfMeasureSets =
65
+ * await conductor.qbd.unitOfMeasureSets.list({
66
+ * conductorEndUserId: 'end_usr_1234567abcdefg',
67
+ * });
68
+ * ```
69
+ */
70
+ list(params, options) {
71
+ const { conductorEndUserId, ...query } = params;
72
+ return this._client.get('/quickbooks-desktop/unit-of-measure-sets', {
73
+ query,
74
+ ...options,
75
+ headers: { 'Conductor-End-User-Id': conductorEndUserId, ...options?.headers },
76
+ });
77
+ }
78
+ }
79
+ exports.UnitOfMeasureSets = UnitOfMeasureSets;
80
+ //# sourceMappingURL=unit-of-measure-sets.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"unit-of-measure-sets.js","sourceRoot":"","sources":["../../src/resources/qbd/unit-of-measure-sets.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,gDAA6C;AAG7C,MAAa,iBAAkB,SAAQ,sBAAW;IAChD;;;;;;;;;;;;;;;;;;;OAmBG;IACH,MAAM,CACJ,MAAoC,EACpC,OAA6B;QAE7B,MAAM,EAAE,kBAAkB,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QAC/C,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,0CAA0C,EAAE;YACnE,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,EAAE,uBAAuB,EAAE,kBAAkB,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE;SAC9E,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;OAWG;IACH,QAAQ,CACN,EAAU,EACV,MAAsC,EACtC,OAA6B;QAE7B,MAAM,EAAE,kBAAkB,EAAE,GAAG,MAAM,CAAC;QACtC,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,4CAA4C,EAAE,EAAE,EAAE;YACxE,GAAG,OAAO;YACV,OAAO,EAAE,EAAE,uBAAuB,EAAE,kBAAkB,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE;SAC9E,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;;;OAeG;IACH,IAAI,CACF,MAAkC,EAClC,OAA6B;QAE7B,MAAM,EAAE,kBAAkB,EAAE,GAAG,KAAK,EAAE,GAAG,MAAM,CAAC;QAChD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,0CAA0C,EAAE;YAClE,KAAK;YACL,GAAG,OAAO;YACV,OAAO,EAAE,EAAE,uBAAuB,EAAE,kBAAkB,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE;SAC9E,CAAC,CAAC;IACL,CAAC;CACF;AApFD,8CAoFC"}
@@ -0,0 +1,76 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+ import { APIResource } from "../../resource.mjs";
3
+ export class UnitOfMeasureSets extends APIResource {
4
+ /**
5
+ * Creates a new unit-of-measure set.
6
+ *
7
+ * NOTE: The QuickBooks company file must have unit-of-measure enabled (either a
8
+ * single unit per item or multiple units per item). To support both
9
+ * configurations, prefix all UOM set names with "By the" (for example, "By the
10
+ * Barrel"); otherwise, the set may not appear in the QuickBooks UI when the
11
+ * company file is configured for a single unit per item.
12
+ *
13
+ * @example
14
+ * ```ts
15
+ * const unitOfMeasureSet =
16
+ * await conductor.qbd.unitOfMeasureSets.create({
17
+ * baseUnit: { abbreviation: 'ea', name: 'Each' },
18
+ * name: 'Weight Units',
19
+ * unitOfMeasureType: 'count',
20
+ * conductorEndUserId: 'end_usr_1234567abcdefg',
21
+ * });
22
+ * ```
23
+ */
24
+ create(params, options) {
25
+ const { conductorEndUserId, ...body } = params;
26
+ return this._client.post('/quickbooks-desktop/unit-of-measure-sets', {
27
+ body,
28
+ ...options,
29
+ headers: { 'Conductor-End-User-Id': conductorEndUserId, ...options?.headers },
30
+ });
31
+ }
32
+ /**
33
+ * Retrieves an unit-of-measure set by ID.
34
+ *
35
+ * @example
36
+ * ```ts
37
+ * const unitOfMeasureSet =
38
+ * await conductor.qbd.unitOfMeasureSets.retrieve(
39
+ * '80000001-1234567890',
40
+ * { conductorEndUserId: 'end_usr_1234567abcdefg' },
41
+ * );
42
+ * ```
43
+ */
44
+ retrieve(id, params, options) {
45
+ const { conductorEndUserId } = params;
46
+ return this._client.get(`/quickbooks-desktop/unit-of-measure-sets/${id}`, {
47
+ ...options,
48
+ headers: { 'Conductor-End-User-Id': conductorEndUserId, ...options?.headers },
49
+ });
50
+ }
51
+ /**
52
+ * Lists all unit-of-measure sets. NOTE: QuickBooks Desktop does not support
53
+ * pagination for unit-of-measure sets; hence, there is no cursor parameter. Users
54
+ * typically have few unit-of-measure sets.
55
+ *
56
+ * NOTE: The QuickBooks company file must have unit-of-measure enabled (either a
57
+ * single unit per item or multiple units per item).
58
+ *
59
+ * @example
60
+ * ```ts
61
+ * const unitOfMeasureSets =
62
+ * await conductor.qbd.unitOfMeasureSets.list({
63
+ * conductorEndUserId: 'end_usr_1234567abcdefg',
64
+ * });
65
+ * ```
66
+ */
67
+ list(params, options) {
68
+ const { conductorEndUserId, ...query } = params;
69
+ return this._client.get('/quickbooks-desktop/unit-of-measure-sets', {
70
+ query,
71
+ ...options,
72
+ headers: { 'Conductor-End-User-Id': conductorEndUserId, ...options?.headers },
73
+ });
74
+ }
75
+ }
76
+ //# sourceMappingURL=unit-of-measure-sets.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"unit-of-measure-sets.mjs","sourceRoot":"","sources":["../../src/resources/qbd/unit-of-measure-sets.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAGtB,MAAM,OAAO,iBAAkB,SAAQ,WAAW;IAChD;;;;;;;;;;;;;;;;;;;OAmBG;IACH,MAAM,CACJ,MAAoC,EACpC,OAA6B;QAE7B,MAAM,EAAE,kBAAkB,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QAC/C,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,0CAA0C,EAAE;YACnE,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,EAAE,uBAAuB,EAAE,kBAAkB,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE;SAC9E,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;OAWG;IACH,QAAQ,CACN,EAAU,EACV,MAAsC,EACtC,OAA6B;QAE7B,MAAM,EAAE,kBAAkB,EAAE,GAAG,MAAM,CAAC;QACtC,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,4CAA4C,EAAE,EAAE,EAAE;YACxE,GAAG,OAAO;YACV,OAAO,EAAE,EAAE,uBAAuB,EAAE,kBAAkB,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE;SAC9E,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;;;OAeG;IACH,IAAI,CACF,MAAkC,EAClC,OAA6B;QAE7B,MAAM,EAAE,kBAAkB,EAAE,GAAG,KAAK,EAAE,GAAG,MAAM,CAAC;QAChD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,0CAA0C,EAAE;YAClE,KAAK;YACL,GAAG,OAAO;YACV,OAAO,EAAE,EAAE,uBAAuB,EAAE,kBAAkB,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE;SAC9E,CAAC,CAAC;IACL,CAAC;CACF"}
package/src/index.ts CHANGED
@@ -112,7 +112,7 @@ export class Conductor extends Core.APIClient {
112
112
  }: ClientOptions = {}) {
113
113
  if (apiKey === undefined) {
114
114
  throw new Errors.ConductorError(
115
- "The CONDUCTOR_SECRET_KEY environment variable is missing or empty; either provide it, or instantiate the Conductor client with an apiKey option, like new Conductor({ apiKey: 'My API Key' }).",
115
+ "The CONDUCTOR_SECRET_KEY environment variable is missing or empty; either provide it, or instantiate the Conductor client with an apiKey option, like new Conductor({ apiKey: 'sk_conductor_...' }).",
116
116
  );
117
117
  }
118
118
 
@@ -190,6 +190,7 @@ export class Conductor extends Core.APIClient {
190
190
  Conductor.AuthSessions = AuthSessions;
191
191
  Conductor.EndUsers = EndUsers;
192
192
  Conductor.Qbd = Qbd;
193
+
193
194
  export declare namespace Conductor {
194
195
  export type RequestOptions = Core.RequestOptions;
195
196
 
@@ -436,6 +436,14 @@ export {
436
436
  type TransferUpdateParams,
437
437
  type TransferListParams,
438
438
  } from "./transfers.js";
439
+ export {
440
+ UnitOfMeasureSets,
441
+ type UnitOfMeasureSet,
442
+ type UnitOfMeasureSetListResponse,
443
+ type UnitOfMeasureSetCreateParams,
444
+ type UnitOfMeasureSetRetrieveParams,
445
+ type UnitOfMeasureSetListParams,
446
+ } from "./unit-of-measure-sets.js";
439
447
  export {
440
448
  VendorCreditsCursorPage,
441
449
  VendorCredits,
@@ -486,6 +486,15 @@ import {
486
486
  Transfers,
487
487
  TransfersCursorPage,
488
488
  } from "./transfers.js";
489
+ import * as UnitOfMeasureSetsAPI from "./unit-of-measure-sets.js";
490
+ import {
491
+ UnitOfMeasureSet,
492
+ UnitOfMeasureSetCreateParams,
493
+ UnitOfMeasureSetListParams,
494
+ UnitOfMeasureSetListResponse,
495
+ UnitOfMeasureSetRetrieveParams,
496
+ UnitOfMeasureSets,
497
+ } from "./unit-of-measure-sets.js";
489
498
  import * as VendorCreditsAPI from "./vendor-credits.js";
490
499
  import {
491
500
  VendorCredit,
@@ -579,6 +588,9 @@ export class Qbd extends APIResource {
579
588
  new TimeTrackingActivitiesAPI.TimeTrackingActivities(this._client);
580
589
  transactions: TransactionsAPI.Transactions = new TransactionsAPI.Transactions(this._client);
581
590
  transfers: TransfersAPI.Transfers = new TransfersAPI.Transfers(this._client);
591
+ unitOfMeasureSets: UnitOfMeasureSetsAPI.UnitOfMeasureSets = new UnitOfMeasureSetsAPI.UnitOfMeasureSets(
592
+ this._client,
593
+ );
582
594
  vendorCredits: VendorCreditsAPI.VendorCredits = new VendorCreditsAPI.VendorCredits(this._client);
583
595
  vendors: VendorsAPI.Vendors = new VendorsAPI.Vendors(this._client);
584
596
 
@@ -708,6 +720,7 @@ Qbd.Transactions = Transactions;
708
720
  Qbd.TransactionsCursorPage = TransactionsCursorPage;
709
721
  Qbd.Transfers = Transfers;
710
722
  Qbd.TransfersCursorPage = TransfersCursorPage;
723
+ Qbd.UnitOfMeasureSets = UnitOfMeasureSets;
711
724
  Qbd.VendorCredits = VendorCredits;
712
725
  Qbd.VendorCreditsCursorPage = VendorCreditsCursorPage;
713
726
  Qbd.Vendors = Vendors;
@@ -1212,6 +1225,15 @@ export declare namespace Qbd {
1212
1225
  type TransferListParams as TransferListParams,
1213
1226
  };
1214
1227
 
1228
+ export {
1229
+ UnitOfMeasureSets as UnitOfMeasureSets,
1230
+ type UnitOfMeasureSet as UnitOfMeasureSet,
1231
+ type UnitOfMeasureSetListResponse as UnitOfMeasureSetListResponse,
1232
+ type UnitOfMeasureSetCreateParams as UnitOfMeasureSetCreateParams,
1233
+ type UnitOfMeasureSetRetrieveParams as UnitOfMeasureSetRetrieveParams,
1234
+ type UnitOfMeasureSetListParams as UnitOfMeasureSetListParams,
1235
+ };
1236
+
1215
1237
  export {
1216
1238
  VendorCredits as VendorCredits,
1217
1239
  type VendorCredit as VendorCredit,