node-autotask 0.62.0 → 0.63.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.
@@ -1,18 +1,18 @@
1
1
  'use strict';
2
2
 
3
- var chunkODPM4YVG_cjs = require('./chunk-ODPM4YVG.cjs');
3
+ var chunkCY6T5SPE_cjs = require('./chunk-CY6T5SPE.cjs');
4
4
 
5
5
 
6
6
 
7
7
  Object.defineProperty(exports, "CAPABILITY_PLAN_HASHES", {
8
8
  enumerable: true,
9
- get: function () { return chunkODPM4YVG_cjs.CAPABILITY_PLAN_HASHES; }
9
+ get: function () { return chunkCY6T5SPE_cjs.CAPABILITY_PLAN_HASHES; }
10
10
  });
11
11
  Object.defineProperty(exports, "loadCapabilities", {
12
12
  enumerable: true,
13
- get: function () { return chunkODPM4YVG_cjs.loadCapabilities; }
13
+ get: function () { return chunkCY6T5SPE_cjs.loadCapabilities; }
14
14
  });
15
15
  Object.defineProperty(exports, "loadCapabilityRecords", {
16
16
  enumerable: true,
17
- get: function () { return chunkODPM4YVG_cjs.loadCapabilityRecords; }
17
+ get: function () { return chunkCY6T5SPE_cjs.loadCapabilityRecords; }
18
18
  });
@@ -1 +1 @@
1
- export { CAPABILITY_PLAN_HASHES, loadCapabilities, loadCapabilityRecords } from './chunk-XJNNCMBS.js';
1
+ export { CAPABILITY_PLAN_HASHES, loadCapabilities, loadCapabilityRecords } from './chunk-X46S4BDG.js';
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var chunkQHM6ROAE_cjs = require('./chunk-QHM6ROAE.cjs');
4
- var chunkVDYUG6RK_cjs = require('./chunk-VDYUG6RK.cjs');
3
+ var chunkXCNB4D6C_cjs = require('./chunk-XCNB4D6C.cjs');
4
+ var chunkTRRB42W4_cjs = require('./chunk-TRRB42W4.cjs');
5
5
 
6
6
  // src/client.ts
7
7
  var AutotaskClient = class {
@@ -154,34 +154,34 @@ var AutotaskClient = class {
154
154
  * anything is wired. Construction issues NO request.
155
155
  */
156
156
  constructor(options) {
157
- this.config = chunkVDYUG6RK_cjs.resolveConfig(options);
158
- this.http = new chunkVDYUG6RK_cjs.HttpClient(this.config);
157
+ this.config = chunkTRRB42W4_cjs.resolveConfig(options);
158
+ this.http = new chunkTRRB42W4_cjs.HttpClient(this.config);
159
159
  this.http.client = this;
160
- for (const entry of chunkVDYUG6RK_cjs.SIMPLE_RESOURCES) {
161
- this[entry.accessor] = new chunkVDYUG6RK_cjs.GenericResource(this.http, entry, this.config.pageSize);
160
+ for (const entry of chunkTRRB42W4_cjs.SIMPLE_RESOURCES) {
161
+ this[entry.accessor] = new chunkTRRB42W4_cjs.GenericResource(this.http, entry, this.config.pageSize);
162
162
  }
163
- this.companies = new chunkVDYUG6RK_cjs.CompaniesResource(this.http, this.config.pageSize);
164
- this.configurationItems = new chunkQHM6ROAE_cjs.ConfigurationItemsResource(this.http, this.config.pageSize);
165
- this.contacts = new chunkQHM6ROAE_cjs.ContactsResource(this.http, this.config.pageSize);
166
- this.contracts = new chunkVDYUG6RK_cjs.ContractsResource(this.http, this.config.pageSize);
167
- this.inventoryProducts = new chunkQHM6ROAE_cjs.InventoryProductsResource(this.http, this.config.pageSize);
168
- this.invoices = new chunkVDYUG6RK_cjs.InvoicesResource(this.http, this.config.pageSize);
169
- this.quotes = new chunkQHM6ROAE_cjs.QuotesResource(this.http, this.config.pageSize);
170
- this.resourceTimeOffAdditional = new chunkQHM6ROAE_cjs.ResourceTimeOffAdditionalResource(this.http, this.config.pageSize);
171
- this.resourceTimeOffBalances = new chunkQHM6ROAE_cjs.ResourceTimeOffBalancesResource(this.http, this.config.pageSize);
172
- this.resources = new chunkQHM6ROAE_cjs.ResourcesResource(this.http, this.config, this.config.pageSize);
173
- this.serviceCalls = new chunkQHM6ROAE_cjs.ServiceCallsResource(this.http, this.config.pageSize);
174
- this.ticketCharges = new chunkQHM6ROAE_cjs.TicketChargesResource(this.http, this.config.pageSize);
175
- this.tickets = new chunkQHM6ROAE_cjs.TicketsResource(this.http, this.config.pageSize);
176
- this.timeEntries = new chunkVDYUG6RK_cjs.TimeEntriesResource(this.http, this.config.pageSize);
177
- this.timeOffRequests = new chunkQHM6ROAE_cjs.TimeOffRequestsResource(this.http, this.config.pageSize);
178
- this.authenticateResource = new chunkQHM6ROAE_cjs.AuthenticateResource(this.http);
179
- this.entityInformation = new chunkQHM6ROAE_cjs.EntityInformationResource(this.http);
180
- this.modules = new chunkQHM6ROAE_cjs.ModulesResource(this.http);
181
- this.thresholdInformation = new chunkQHM6ROAE_cjs.ThresholdInformationResource(this.http);
182
- this.version = new chunkQHM6ROAE_cjs.VersionResource(this.http);
183
- this.versionInformation = new chunkQHM6ROAE_cjs.VersionInformationResource(this.http);
184
- this.zoneInformation = new chunkQHM6ROAE_cjs.ZoneInformationResource(this.http);
163
+ this.companies = new chunkTRRB42W4_cjs.CompaniesResource(this.http, this.config.pageSize);
164
+ this.configurationItems = new chunkXCNB4D6C_cjs.ConfigurationItemsResource(this.http, this.config.pageSize);
165
+ this.contacts = new chunkXCNB4D6C_cjs.ContactsResource(this.http, this.config.pageSize);
166
+ this.contracts = new chunkTRRB42W4_cjs.ContractsResource(this.http, this.config.pageSize);
167
+ this.inventoryProducts = new chunkXCNB4D6C_cjs.InventoryProductsResource(this.http, this.config.pageSize);
168
+ this.invoices = new chunkTRRB42W4_cjs.InvoicesResource(this.http, this.config.pageSize);
169
+ this.quotes = new chunkXCNB4D6C_cjs.QuotesResource(this.http, this.config.pageSize);
170
+ this.resourceTimeOffAdditional = new chunkXCNB4D6C_cjs.ResourceTimeOffAdditionalResource(this.http, this.config.pageSize);
171
+ this.resourceTimeOffBalances = new chunkXCNB4D6C_cjs.ResourceTimeOffBalancesResource(this.http, this.config.pageSize);
172
+ this.resources = new chunkXCNB4D6C_cjs.ResourcesResource(this.http, this.config, this.config.pageSize);
173
+ this.serviceCalls = new chunkXCNB4D6C_cjs.ServiceCallsResource(this.http, this.config.pageSize);
174
+ this.ticketCharges = new chunkXCNB4D6C_cjs.TicketChargesResource(this.http, this.config.pageSize);
175
+ this.tickets = new chunkXCNB4D6C_cjs.TicketsResource(this.http, this.config.pageSize);
176
+ this.timeEntries = new chunkTRRB42W4_cjs.TimeEntriesResource(this.http, this.config.pageSize);
177
+ this.timeOffRequests = new chunkXCNB4D6C_cjs.TimeOffRequestsResource(this.http, this.config.pageSize);
178
+ this.authenticateResource = new chunkXCNB4D6C_cjs.AuthenticateResource(this.http);
179
+ this.entityInformation = new chunkXCNB4D6C_cjs.EntityInformationResource(this.http);
180
+ this.modules = new chunkXCNB4D6C_cjs.ModulesResource(this.http);
181
+ this.thresholdInformation = new chunkXCNB4D6C_cjs.ThresholdInformationResource(this.http);
182
+ this.version = new chunkXCNB4D6C_cjs.VersionResource(this.http);
183
+ this.versionInformation = new chunkXCNB4D6C_cjs.VersionInformationResource(this.http);
184
+ this.zoneInformation = new chunkXCNB4D6C_cjs.ZoneInformationResource(this.http);
185
185
  }
186
186
  /**
187
187
  * `GET /V1.0/Authenticate` → `AuthTokenResultModel` (as-is). The SDK does
@@ -215,12 +215,12 @@ var AutotaskClient = class {
215
215
  * parameter on each: `await client.withSignal(signal, () => invoke(client, ...))`.
216
216
  */
217
217
  withSignal(signal, fn) {
218
- return chunkVDYUG6RK_cjs.runWithSignal(signal, fn);
218
+ return chunkTRRB42W4_cjs.runWithSignal(signal, fn);
219
219
  }
220
220
  async batch(fn, items, opts = {}) {
221
221
  const concurrency = opts.concurrency ?? this.config.maxConcurrent;
222
222
  if (!Number.isInteger(concurrency) || concurrency <= 0) {
223
- throw new chunkVDYUG6RK_cjs.AutotaskConfigError("batch concurrency must be a positive integer");
223
+ throw new chunkTRRB42W4_cjs.AutotaskConfigError("batch concurrency must be a positive integer");
224
224
  }
225
225
  const { signal, settle } = opts;
226
226
  const results = new Array(items.length);
@@ -235,7 +235,7 @@ var AutotaskClient = class {
235
235
  const i = next++;
236
236
  try {
237
237
  const item = items[i];
238
- const value = await (signal === void 0 ? fn(item) : chunkVDYUG6RK_cjs.runWithSignal(signal, () => fn(item)));
238
+ const value = await (signal === void 0 ? fn(item) : chunkTRRB42W4_cjs.runWithSignal(signal, () => fn(item)));
239
239
  results[i] = settle ? { status: "fulfilled", value } : value;
240
240
  } catch (error) {
241
241
  if (settle) results[i] = { status: "rejected", reason: error };
@@ -2,9 +2,9 @@
2
2
 
3
3
  // src/capabilities.ts
4
4
  var CAPABILITY_PLAN_HASHES = {
5
- "B": "ccbe1f33bf20dfb0f67f994169a5e15a1be839e82703dd2f3929e7247991d3f0",
6
- "A": "ccbe1f33bf20dfb0f67f994169a5e15a1be839e82703dd2f3929e7247991d3f0",
7
- "operations": "ccbe1f33bf20dfb0f67f994169a5e15a1be839e82703dd2f3929e7247991d3f0"
5
+ "B": "e5f02696b643dc5075c6a0e70ebb4150f1f1ecd1eedf18c6f2df32629846ac8c",
6
+ "A": "e5f02696b643dc5075c6a0e70ebb4150f1f1ecd1eedf18c6f2df32629846ac8c",
7
+ "operations": "e5f02696b643dc5075c6a0e70ebb4150f1f1ecd1eedf18c6f2df32629846ac8c"
8
8
  };
9
9
  var cached = null;
10
10
  function loadCapabilities() {
@@ -1,5 +1,5 @@
1
- import { ConfigurationItemsResource, ContactsResource, InventoryProductsResource, QuotesResource, ResourceTimeOffAdditionalResource, ResourceTimeOffBalancesResource, ResourcesResource, ServiceCallsResource, TicketChargesResource, TicketsResource, TimeOffRequestsResource, AuthenticateResource, EntityInformationResource, ModulesResource, ThresholdInformationResource, VersionResource, VersionInformationResource, ZoneInformationResource } from './chunk-S4YR3RLJ.js';
2
- import { resolveConfig, HttpClient, SIMPLE_RESOURCES, GenericResource, CompaniesResource, ContractsResource, InvoicesResource, TimeEntriesResource, runWithSignal, AutotaskConfigError } from './chunk-TGCFJCWN.js';
1
+ import { ConfigurationItemsResource, ContactsResource, InventoryProductsResource, QuotesResource, ResourceTimeOffAdditionalResource, ResourceTimeOffBalancesResource, ResourcesResource, ServiceCallsResource, TicketChargesResource, TicketsResource, TimeOffRequestsResource, AuthenticateResource, EntityInformationResource, ModulesResource, ThresholdInformationResource, VersionResource, VersionInformationResource, ZoneInformationResource } from './chunk-WL7VSHPI.js';
2
+ import { resolveConfig, HttpClient, SIMPLE_RESOURCES, GenericResource, CompaniesResource, ContractsResource, InvoicesResource, TimeEntriesResource, runWithSignal, AutotaskConfigError } from './chunk-LCZJ3STD.js';
3
3
 
4
4
  // src/client.ts
5
5
  var AutotaskClient = class {
@@ -1,4 +1,4 @@
1
- import { loadCapabilityRecords } from './chunk-XJNNCMBS.js';
1
+ import { loadCapabilityRecords } from './chunk-X46S4BDG.js';
2
2
  import { NoopLogger, REDACTED, deepMarkUntrusted, wrapUntrusted } from './chunk-7NKB4UXV.js';
3
3
  import { randomUUID } from 'crypto';
4
4
  import { AsyncLocalStorage } from 'async_hooks';
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkODPM4YVG_cjs = require('./chunk-ODPM4YVG.cjs');
3
+ var chunkCY6T5SPE_cjs = require('./chunk-CY6T5SPE.cjs');
4
4
  var chunkBD4AUGCJ_cjs = require('./chunk-BD4AUGCJ.cjs');
5
5
  var crypto = require('crypto');
6
6
  var async_hooks = require('async_hooks');
@@ -1422,7 +1422,7 @@ async function capabilitySets() {
1422
1422
  const fieldOps = /* @__PURE__ */ new Map();
1423
1423
  const udfCapable = /* @__PURE__ */ new Set();
1424
1424
  const resources = /* @__PURE__ */ new Set();
1425
- for (const rec of await chunkODPM4YVG_cjs.loadCapabilityRecords()) {
1425
+ for (const rec of await chunkCY6T5SPE_cjs.loadCapabilityRecords()) {
1426
1426
  if (rec.resource === "operations") continue;
1427
1427
  resources.add(rec.resource);
1428
1428
  if (rec.operation === "getFieldInfo") fieldOps.set(rec.resource, rec);
@@ -1433,7 +1433,7 @@ async function capabilitySets() {
1433
1433
  var derivedIndexPromise = null;
1434
1434
  function derivedIndexLoad() {
1435
1435
  if (derivedIndexPromise === null) {
1436
- derivedIndexPromise = chunkODPM4YVG_cjs.loadCapabilityRecords().then((records) => {
1436
+ derivedIndexPromise = chunkCY6T5SPE_cjs.loadCapabilityRecords().then((records) => {
1437
1437
  const index = /* @__PURE__ */ new Map();
1438
1438
  for (const rec of records) {
1439
1439
  const declared = rec.metadata?.derivedFields;
@@ -21582,7 +21582,7 @@ function dateBucketLabel(value, bucket) {
21582
21582
  var queryResourceKeysPromise = null;
21583
21583
  function queryResourceKeys() {
21584
21584
  if (queryResourceKeysPromise === null) {
21585
- queryResourceKeysPromise = chunkODPM4YVG_cjs.loadCapabilityRecords().then((records) => {
21585
+ queryResourceKeysPromise = chunkCY6T5SPE_cjs.loadCapabilityRecords().then((records) => {
21586
21586
  const s = /* @__PURE__ */ new Set();
21587
21587
  for (const rec of records) if (rec.operation === "query") s.add(rec.resource);
21588
21588
  return s;
@@ -21704,7 +21704,7 @@ function parseTopAndLimit(opts, problems) {
21704
21704
  return { top, limit };
21705
21705
  }
21706
21706
  async function checkFieldNames(resourceKey, conditions, opts, problems) {
21707
- const records = resourceKey === void 0 ? [] : await chunkODPM4YVG_cjs.loadCapabilityRecords();
21707
+ const records = resourceKey === void 0 ? [] : await chunkCY6T5SPE_cjs.loadCapabilityRecords();
21708
21708
  const record = resourceKey === void 0 ? void 0 : records.find((r) => r.resource === resourceKey && r.operation === "query");
21709
21709
  if (record === void 0) return void 0;
21710
21710
  const strings = (v) => Array.isArray(v) ? v.filter((f) => typeof f === "string" && f.trim() !== "") : [];
@@ -22344,7 +22344,7 @@ async function uiLink(client, input) {
22344
22344
  var indexPromise = null;
22345
22345
  function operationIndex() {
22346
22346
  if (indexPromise === null) {
22347
- indexPromise = chunkODPM4YVG_cjs.loadCapabilityRecords().then((records) => new Map(records.map((r) => [r.id, r])));
22347
+ indexPromise = chunkCY6T5SPE_cjs.loadCapabilityRecords().then((records) => new Map(records.map((r) => [r.id, r])));
22348
22348
  }
22349
22349
  return indexPromise;
22350
22350
  }
@@ -1,5 +1,5 @@
1
- import { GenericResource, parseIdentifier, AutotaskConfigError, StaleObjectError, buildDryRunResult, RELATIONSHIP_MAP, createNamePlan, resolveCompositeNames, addNameSibling, NotFoundError, unwrapItems, ConflictError, clientOf, compositePartLimit, invokeRead, compositePart, openTicketsOfPart, unwrapOperation, unwrapItem, ResolutionError, numericIds, IN_FILTER_CAP, runMove, resolveTicketStatusSemantics, openStatusFilter, isClosedStatus, vendorId, isAutotaskError, resolveLineOfBusinessChain, uiLinkFor, refuse, queryRows, mergePartialBody, AutotaskError, TICKET_LABEL_FIELDS, addLabelSibling, parseVendorErrors, cursorToPath } from './chunk-TGCFJCWN.js';
2
- import { loadCapabilityRecords } from './chunk-XJNNCMBS.js';
1
+ import { GenericResource, parseIdentifier, AutotaskConfigError, StaleObjectError, buildDryRunResult, RELATIONSHIP_MAP, createNamePlan, resolveCompositeNames, addNameSibling, NotFoundError, unwrapItems, ConflictError, clientOf, compositePartLimit, invokeRead, compositePart, openTicketsOfPart, unwrapOperation, unwrapItem, ResolutionError, numericIds, IN_FILTER_CAP, runMove, resolveTicketStatusSemantics, openStatusFilter, isClosedStatus, vendorId, isAutotaskError, resolveLineOfBusinessChain, uiLinkFor, refuse, queryRows, mergePartialBody, AutotaskError, TICKET_LABEL_FIELDS, addLabelSibling, parseVendorErrors, cursorToPath } from './chunk-LCZJ3STD.js';
2
+ import { loadCapabilityRecords } from './chunk-X46S4BDG.js';
3
3
 
4
4
  // src/resources/special/configuration_items.ts
5
5
  async function fetchRecord(http, path, label, readOpts) {
@@ -1,8 +1,8 @@
1
1
  // src/capabilities.ts
2
2
  var CAPABILITY_PLAN_HASHES = {
3
- "B": "ccbe1f33bf20dfb0f67f994169a5e15a1be839e82703dd2f3929e7247991d3f0",
4
- "A": "ccbe1f33bf20dfb0f67f994169a5e15a1be839e82703dd2f3929e7247991d3f0",
5
- "operations": "ccbe1f33bf20dfb0f67f994169a5e15a1be839e82703dd2f3929e7247991d3f0"
3
+ "B": "e5f02696b643dc5075c6a0e70ebb4150f1f1ecd1eedf18c6f2df32629846ac8c",
4
+ "A": "e5f02696b643dc5075c6a0e70ebb4150f1f1ecd1eedf18c6f2df32629846ac8c",
5
+ "operations": "e5f02696b643dc5075c6a0e70ebb4150f1f1ecd1eedf18c6f2df32629846ac8c"
6
6
  };
7
7
  var cached = null;
8
8
  function loadCapabilities() {