conductor-node 12.0.0-beta.4 → 12.0.0-beta.6

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,61 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+ import { APIResource } from "../../resource.mjs";
3
+ import { CursorPage } from "../../pagination.mjs";
4
+ export class TimeTrackingActivities extends APIResource {
5
+ /**
6
+ * Creates a new time tracking activity.
7
+ */
8
+ create(params, options) {
9
+ const { conductorEndUserId, ...body } = params;
10
+ return this._client.post('/quickbooks-desktop/time-tracking-activities', {
11
+ body,
12
+ ...options,
13
+ headers: { 'Conductor-End-User-Id': conductorEndUserId, ...options?.headers },
14
+ });
15
+ }
16
+ /**
17
+ * Retrieves a time tracking activity by ID.
18
+ */
19
+ retrieve(id, params, options) {
20
+ const { conductorEndUserId } = params;
21
+ return this._client.get(`/quickbooks-desktop/time-tracking-activities/${id}`, {
22
+ ...options,
23
+ headers: { 'Conductor-End-User-Id': conductorEndUserId, ...options?.headers },
24
+ });
25
+ }
26
+ /**
27
+ * Updates an existing time tracking activity.
28
+ */
29
+ update(id, params, options) {
30
+ const { conductorEndUserId, ...body } = params;
31
+ return this._client.post(`/quickbooks-desktop/time-tracking-activities/${id}`, {
32
+ body,
33
+ ...options,
34
+ headers: { 'Conductor-End-User-Id': conductorEndUserId, ...options?.headers },
35
+ });
36
+ }
37
+ /**
38
+ * Returns a list of time tracking activities. Use the `cursor` parameter to
39
+ * paginate through the results.
40
+ */
41
+ list(params, options) {
42
+ const { conductorEndUserId, ...query } = params;
43
+ return this._client.getAPIList('/quickbooks-desktop/time-tracking-activities', TimeTrackingActivitiesCursorPage, { query, ...options, headers: { 'Conductor-End-User-Id': conductorEndUserId, ...options?.headers } });
44
+ }
45
+ /**
46
+ * Permanently deletes a a time tracking activity. The deletion will fail if the
47
+ * time tracking activity is currently in use or has any linked transactions that
48
+ * are in use.
49
+ */
50
+ delete(id, params, options) {
51
+ const { conductorEndUserId } = params;
52
+ return this._client.delete(`/quickbooks-desktop/time-tracking-activities/${id}`, {
53
+ ...options,
54
+ headers: { 'Conductor-End-User-Id': conductorEndUserId, ...options?.headers },
55
+ });
56
+ }
57
+ }
58
+ export class TimeTrackingActivitiesCursorPage extends CursorPage {
59
+ }
60
+ TimeTrackingActivities.TimeTrackingActivitiesCursorPage = TimeTrackingActivitiesCursorPage;
61
+ //# sourceMappingURL=time-tracking-activities.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"time-tracking-activities.mjs","sourceRoot":"","sources":["../../src/resources/qbd/time-tracking-activities.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAEf,EAAE,UAAU,EAAyB;AAE5C,MAAM,OAAO,sBAAuB,SAAQ,WAAW;IACrD;;OAEG;IACH,MAAM,CACJ,MAAwC,EACxC,OAA6B;QAE7B,MAAM,EAAE,kBAAkB,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QAC/C,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,8CAA8C,EAAE;YACvE,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,EAAE,uBAAuB,EAAE,kBAAkB,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE;SAC9E,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,QAAQ,CACN,EAAU,EACV,MAA0C,EAC1C,OAA6B;QAE7B,MAAM,EAAE,kBAAkB,EAAE,GAAG,MAAM,CAAC;QACtC,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,gDAAgD,EAAE,EAAE,EAAE;YAC5E,GAAG,OAAO;YACV,OAAO,EAAE,EAAE,uBAAuB,EAAE,kBAAkB,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE;SAC9E,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,MAAM,CACJ,EAAU,EACV,MAAwC,EACxC,OAA6B;QAE7B,MAAM,EAAE,kBAAkB,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QAC/C,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,gDAAgD,EAAE,EAAE,EAAE;YAC7E,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,EAAE,uBAAuB,EAAE,kBAAkB,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE;SAC9E,CAAC,CAAC;IACL,CAAC;IAED;;;OAGG;IACH,IAAI,CACF,MAAsC,EACtC,OAA6B;QAE7B,MAAM,EAAE,kBAAkB,EAAE,GAAG,KAAK,EAAE,GAAG,MAAM,CAAC;QAChD,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAC5B,8CAA8C,EAC9C,gCAAgC,EAChC,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE,EAAE,uBAAuB,EAAE,kBAAkB,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE,EAAE,CACrG,CAAC;IACJ,CAAC;IAED;;;;OAIG;IACH,MAAM,CACJ,EAAU,EACV,MAAwC,EACxC,OAA6B;QAE7B,MAAM,EAAE,kBAAkB,EAAE,GAAG,MAAM,CAAC;QACtC,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,gDAAgD,EAAE,EAAE,EAAE;YAC/E,GAAG,OAAO;YACV,OAAO,EAAE,EAAE,uBAAuB,EAAE,kBAAkB,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE;SAC9E,CAAC,CAAC;IACL,CAAC;CACF;AAED,MAAM,OAAO,gCAAiC,SAAQ,UAAgC;CAAG;AAggBzF,sBAAsB,CAAC,gCAAgC,GAAG,gCAAgC,CAAC"}
@@ -779,23 +779,30 @@ export namespace Employee {
779
779
  accrualStartDate: string | null;
780
780
 
781
781
  /**
782
- * The number of sick hours the employee will accrue per accrual period.
782
+ * The number of sick hours the employee will accrue per accrual period, in ISO
783
+ * 8601 format for time intervals (PTnHnMnS). For example, 1 hour and 30 minutes is
784
+ * represented as PT1H30M.
783
785
  */
784
786
  hoursAccruedPerPeriod: string | null;
785
787
 
786
788
  /**
787
- * The total number of sick hours currently available for the employee to use.
788
- * Defaults to 0.
789
+ * The total number of sick hours currently available for the employee to use, in
790
+ * ISO 8601 format for time intervals (PTnHnMnS). For example, 1 hour and 30
791
+ * minutes is represented as PT1H30M. Defaults to 0.
789
792
  */
790
793
  hoursAvailable: string | null;
791
794
 
792
795
  /**
793
- * The number of sick hours the employee has used.
796
+ * The number of sick hours the employee has used, in ISO 8601 format for time
797
+ * intervals (PTnHnMnS). For example, 1 hour and 30 minutes is represented as
798
+ * PT1H30M.
794
799
  */
795
800
  hoursUsed: string | null;
796
801
 
797
802
  /**
798
- * The maximum number of sick hours the employee can accrue.
803
+ * The maximum number of sick hours the employee can accrue, in ISO 8601 format for
804
+ * time intervals (PTnHnMnS). For example, 1 hour and 30 minutes is represented as
805
+ * PT1H30M.
799
806
  */
800
807
  maximumHours: string | null;
801
808
 
@@ -823,23 +830,30 @@ export namespace Employee {
823
830
  accrualStartDate: string | null;
824
831
 
825
832
  /**
826
- * The number of vacation hours the employee will accrue per accrual period.
833
+ * The number of vacation hours the employee will accrue per accrual period, in ISO
834
+ * 8601 format for time intervals (PTnHnMnS). For example, 1 hour and 30 minutes is
835
+ * represented as PT1H30M.
827
836
  */
828
837
  hoursAccruedPerPeriod: string | null;
829
838
 
830
839
  /**
831
- * The total number of vacation hours currently available for the employee to use.
832
- * Defaults to 0.
840
+ * The total number of vacation hours currently available for the employee to use,
841
+ * in ISO 8601 format for time intervals (PTnHnMnS). For example, 1 hour and 30
842
+ * minutes is represented as PT1H30M. Defaults to 0.
833
843
  */
834
844
  hoursAvailable: string | null;
835
845
 
836
846
  /**
837
- * The number of vacation hours the employee has used.
847
+ * The number of vacation hours the employee has used, in ISO 8601 format for time
848
+ * intervals (PTnHnMnS). For example, 1 hour and 30 minutes is represented as
849
+ * PT1H30M.
838
850
  */
839
851
  hoursUsed: string | null;
840
852
 
841
853
  /**
842
- * The maximum number of vacation hours the employee can accrue.
854
+ * The maximum number of vacation hours the employee can accrue, in ISO 8601 format
855
+ * for time intervals (PTnHnMnS). For example, 1 hour and 30 minutes is represented
856
+ * as PT1H30M.
843
857
  */
844
858
  maximumHours: string | null;
845
859
 
@@ -1448,23 +1462,30 @@ export namespace EmployeeCreateParams {
1448
1462
  accrualStartDate?: string;
1449
1463
 
1450
1464
  /**
1451
- * The number of sick hours the employee will accrue per accrual period.
1465
+ * The number of sick hours the employee will accrue per accrual period, in ISO
1466
+ * 8601 format for time intervals (PTnHnMnS). For example, 1 hour and 30 minutes is
1467
+ * represented as PT1H30M.
1452
1468
  */
1453
1469
  hoursAccruedPerPeriod?: string;
1454
1470
 
1455
1471
  /**
1456
- * The total number of sick hours currently available for the employee to use.
1457
- * Defaults to 0.
1472
+ * The total number of sick hours currently available for the employee to use, in
1473
+ * ISO 8601 format for time intervals (PTnHnMnS). For example, 1 hour and 30
1474
+ * minutes is represented as PT1H30M. Defaults to 0.
1458
1475
  */
1459
1476
  hoursAvailable?: string;
1460
1477
 
1461
1478
  /**
1462
- * The number of sick hours the employee has used.
1479
+ * The number of sick hours the employee has used, in ISO 8601 format for time
1480
+ * intervals (PTnHnMnS). For example, 1 hour and 30 minutes is represented as
1481
+ * PT1H30M.
1463
1482
  */
1464
1483
  hoursUsed?: string;
1465
1484
 
1466
1485
  /**
1467
- * The maximum number of sick hours the employee can accrue.
1486
+ * The maximum number of sick hours the employee can accrue, in ISO 8601 format for
1487
+ * time intervals (PTnHnMnS). For example, 1 hour and 30 minutes is represented as
1488
+ * PT1H30M.
1468
1489
  */
1469
1490
  maximumHours?: string;
1470
1491
 
@@ -1492,23 +1513,30 @@ export namespace EmployeeCreateParams {
1492
1513
  accrualStartDate?: string;
1493
1514
 
1494
1515
  /**
1495
- * The number of vacation hours the employee will accrue per accrual period.
1516
+ * The number of vacation hours the employee will accrue per accrual period, in ISO
1517
+ * 8601 format for time intervals (PTnHnMnS). For example, 1 hour and 30 minutes is
1518
+ * represented as PT1H30M.
1496
1519
  */
1497
1520
  hoursAccruedPerPeriod?: string;
1498
1521
 
1499
1522
  /**
1500
- * The total number of vacation hours currently available for the employee to use.
1501
- * Defaults to 0.
1523
+ * The total number of vacation hours currently available for the employee to use,
1524
+ * in ISO 8601 format for time intervals (PTnHnMnS). For example, 1 hour and 30
1525
+ * minutes is represented as PT1H30M. Defaults to 0.
1502
1526
  */
1503
1527
  hoursAvailable?: string;
1504
1528
 
1505
1529
  /**
1506
- * The number of vacation hours the employee has used.
1530
+ * The number of vacation hours the employee has used, in ISO 8601 format for time
1531
+ * intervals (PTnHnMnS). For example, 1 hour and 30 minutes is represented as
1532
+ * PT1H30M.
1507
1533
  */
1508
1534
  hoursUsed?: string;
1509
1535
 
1510
1536
  /**
1511
- * The maximum number of vacation hours the employee can accrue.
1537
+ * The maximum number of vacation hours the employee can accrue, in ISO 8601 format
1538
+ * for time intervals (PTnHnMnS). For example, 1 hour and 30 minutes is represented
1539
+ * as PT1H30M.
1512
1540
  */
1513
1541
  maximumHours?: string;
1514
1542
 
@@ -2095,23 +2123,30 @@ export namespace EmployeeUpdateParams {
2095
2123
  accrualStartDate?: string;
2096
2124
 
2097
2125
  /**
2098
- * The number of sick hours the employee will accrue per accrual period.
2126
+ * The number of sick hours the employee will accrue per accrual period, in ISO
2127
+ * 8601 format for time intervals (PTnHnMnS). For example, 1 hour and 30 minutes is
2128
+ * represented as PT1H30M.
2099
2129
  */
2100
2130
  hoursAccruedPerPeriod?: string;
2101
2131
 
2102
2132
  /**
2103
- * The total number of sick hours currently available for the employee to use.
2104
- * Defaults to 0.
2133
+ * The total number of sick hours currently available for the employee to use, in
2134
+ * ISO 8601 format for time intervals (PTnHnMnS). For example, 1 hour and 30
2135
+ * minutes is represented as PT1H30M. Defaults to 0.
2105
2136
  */
2106
2137
  hoursAvailable?: string;
2107
2138
 
2108
2139
  /**
2109
- * The number of sick hours the employee has used.
2140
+ * The number of sick hours the employee has used, in ISO 8601 format for time
2141
+ * intervals (PTnHnMnS). For example, 1 hour and 30 minutes is represented as
2142
+ * PT1H30M.
2110
2143
  */
2111
2144
  hoursUsed?: string;
2112
2145
 
2113
2146
  /**
2114
- * The maximum number of sick hours the employee can accrue.
2147
+ * The maximum number of sick hours the employee can accrue, in ISO 8601 format for
2148
+ * time intervals (PTnHnMnS). For example, 1 hour and 30 minutes is represented as
2149
+ * PT1H30M.
2115
2150
  */
2116
2151
  maximumHours?: string;
2117
2152
 
@@ -2139,23 +2174,30 @@ export namespace EmployeeUpdateParams {
2139
2174
  accrualStartDate?: string;
2140
2175
 
2141
2176
  /**
2142
- * The number of vacation hours the employee will accrue per accrual period.
2177
+ * The number of vacation hours the employee will accrue per accrual period, in ISO
2178
+ * 8601 format for time intervals (PTnHnMnS). For example, 1 hour and 30 minutes is
2179
+ * represented as PT1H30M.
2143
2180
  */
2144
2181
  hoursAccruedPerPeriod?: string;
2145
2182
 
2146
2183
  /**
2147
- * The total number of vacation hours currently available for the employee to use.
2148
- * Defaults to 0.
2184
+ * The total number of vacation hours currently available for the employee to use,
2185
+ * in ISO 8601 format for time intervals (PTnHnMnS). For example, 1 hour and 30
2186
+ * minutes is represented as PT1H30M. Defaults to 0.
2149
2187
  */
2150
2188
  hoursAvailable?: string;
2151
2189
 
2152
2190
  /**
2153
- * The number of vacation hours the employee has used.
2191
+ * The number of vacation hours the employee has used, in ISO 8601 format for time
2192
+ * intervals (PTnHnMnS). For example, 1 hour and 30 minutes is represented as
2193
+ * PT1H30M.
2154
2194
  */
2155
2195
  hoursUsed?: string;
2156
2196
 
2157
2197
  /**
2158
- * The maximum number of vacation hours the employee can accrue.
2198
+ * The maximum number of vacation hours the employee can accrue, in ISO 8601 format
2199
+ * for time intervals (PTnHnMnS). For example, 1 hour and 30 minutes is represented
2200
+ * as PT1H30M.
2159
2201
  */
2160
2202
  maximumHours?: string;
2161
2203
 
@@ -315,6 +315,17 @@ export {
315
315
  type SubtotalItemUpdateParams,
316
316
  type SubtotalItemListParams,
317
317
  } from './subtotal-items';
318
+ export {
319
+ TimeTrackingActivitiesCursorPage,
320
+ TimeTrackingActivities,
321
+ type TimeTrackingActivity,
322
+ type TimeTrackingActivityDeleteResponse,
323
+ type TimeTrackingActivityCreateParams,
324
+ type TimeTrackingActivityRetrieveParams,
325
+ type TimeTrackingActivityUpdateParams,
326
+ type TimeTrackingActivityListParams,
327
+ type TimeTrackingActivityDeleteParams,
328
+ } from './time-tracking-activities';
318
329
  export {
319
330
  TransfersCursorPage,
320
331
  Transfers,
@@ -347,6 +347,18 @@ import {
347
347
  SubtotalItems,
348
348
  SubtotalItemsCursorPage,
349
349
  } from './subtotal-items';
350
+ import * as TimeTrackingActivitiesAPI from './time-tracking-activities';
351
+ import {
352
+ TimeTrackingActivities,
353
+ TimeTrackingActivitiesCursorPage,
354
+ TimeTrackingActivity,
355
+ TimeTrackingActivityCreateParams,
356
+ TimeTrackingActivityDeleteParams,
357
+ TimeTrackingActivityDeleteResponse,
358
+ TimeTrackingActivityListParams,
359
+ TimeTrackingActivityRetrieveParams,
360
+ TimeTrackingActivityUpdateParams,
361
+ } from './time-tracking-activities';
350
362
  import * as TransfersAPI from './transfers';
351
363
  import {
352
364
  Transfer,
@@ -427,6 +439,8 @@ export class Qbd extends APIResource {
427
439
  serviceItems: ServiceItemsAPI.ServiceItems = new ServiceItemsAPI.ServiceItems(this._client);
428
440
  standardTerms: StandardTermsAPI.StandardTerms = new StandardTermsAPI.StandardTerms(this._client);
429
441
  subtotalItems: SubtotalItemsAPI.SubtotalItems = new SubtotalItemsAPI.SubtotalItems(this._client);
442
+ timeTrackingActivities: TimeTrackingActivitiesAPI.TimeTrackingActivities =
443
+ new TimeTrackingActivitiesAPI.TimeTrackingActivities(this._client);
430
444
  transfers: TransfersAPI.Transfers = new TransfersAPI.Transfers(this._client);
431
445
  vendorCredits: VendorCreditsAPI.VendorCredits = new VendorCreditsAPI.VendorCredits(this._client);
432
446
  vendors: VendorsAPI.Vendors = new VendorsAPI.Vendors(this._client);
@@ -488,6 +502,8 @@ Qbd.ServiceItemsCursorPage = ServiceItemsCursorPage;
488
502
  Qbd.StandardTerms = StandardTerms;
489
503
  Qbd.SubtotalItems = SubtotalItems;
490
504
  Qbd.SubtotalItemsCursorPage = SubtotalItemsCursorPage;
505
+ Qbd.TimeTrackingActivities = TimeTrackingActivities;
506
+ Qbd.TimeTrackingActivitiesCursorPage = TimeTrackingActivitiesCursorPage;
491
507
  Qbd.Transfers = Transfers;
492
508
  Qbd.TransfersCursorPage = TransfersCursorPage;
493
509
  Qbd.VendorCredits = VendorCredits;
@@ -842,6 +858,18 @@ export declare namespace Qbd {
842
858
  type SubtotalItemListParams as SubtotalItemListParams,
843
859
  };
844
860
 
861
+ export {
862
+ TimeTrackingActivities as TimeTrackingActivities,
863
+ type TimeTrackingActivity as TimeTrackingActivity,
864
+ type TimeTrackingActivityDeleteResponse as TimeTrackingActivityDeleteResponse,
865
+ TimeTrackingActivitiesCursorPage as TimeTrackingActivitiesCursorPage,
866
+ type TimeTrackingActivityCreateParams as TimeTrackingActivityCreateParams,
867
+ type TimeTrackingActivityRetrieveParams as TimeTrackingActivityRetrieveParams,
868
+ type TimeTrackingActivityUpdateParams as TimeTrackingActivityUpdateParams,
869
+ type TimeTrackingActivityListParams as TimeTrackingActivityListParams,
870
+ type TimeTrackingActivityDeleteParams as TimeTrackingActivityDeleteParams,
871
+ };
872
+
845
873
  export {
846
874
  Transfers as Transfers,
847
875
  type Transfer as Transfer,