node-autotask 0.42.0 → 0.43.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.
@@ -30,13 +30,13 @@
30
30
 
31
31
 
32
32
 
33
- var _chunkSEFJJY4Jcjs = require('./chunk-SEFJJY4J.cjs');
33
+ var _chunkVFLAMMIJcjs = require('./chunk-VFLAMMIJ.cjs');
34
34
 
35
35
 
36
- var _chunkVEOSOIU4cjs = require('./chunk-VEOSOIU4.cjs');
36
+ var _chunk5BDUMDAQcjs = require('./chunk-5BDUMDAQ.cjs');
37
37
 
38
38
  // src/resources/appointments.ts
39
- var AppointmentsResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
39
+ var AppointmentsResource = class extends _chunkVFLAMMIJcjs.BaseResource {
40
40
  constructor(http, pageSize) {
41
41
  super(http, {
42
42
  key: "appointments",
@@ -121,7 +121,7 @@ var AuthenticateResource = class {
121
121
  };
122
122
 
123
123
  // src/resources/billing_item_approval_levels.ts
124
- var BillingItemApprovalLevelsResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
124
+ var BillingItemApprovalLevelsResource = class extends _chunkVFLAMMIJcjs.BaseResource {
125
125
  constructor(http, pageSize) {
126
126
  super(http, {
127
127
  key: "billing_item_approval_levels",
@@ -157,7 +157,7 @@ var BillingItemApprovalLevelsResource = class extends _chunkSEFJJY4Jcjs.BaseReso
157
157
  };
158
158
 
159
159
  // src/resources/change_request_links.ts
160
- var ChangeRequestLinksResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
160
+ var ChangeRequestLinksResource = class extends _chunkVFLAMMIJcjs.BaseResource {
161
161
  constructor(http, pageSize) {
162
162
  super(http, {
163
163
  key: "change_request_links",
@@ -211,7 +211,7 @@ var ChangeRequestLinksResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
211
211
  };
212
212
 
213
213
  // src/resources/checklist_libraries.ts
214
- var ChecklistLibrariesResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
214
+ var ChecklistLibrariesResource = class extends _chunkVFLAMMIJcjs.BaseResource {
215
215
  constructor(http, pageSize) {
216
216
  super(http, {
217
217
  key: "checklist_libraries",
@@ -285,7 +285,7 @@ var ChecklistLibrariesResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
285
285
  };
286
286
 
287
287
  // src/resources/checklist_library_checklist_items.ts
288
- var ChecklistLibraryChecklistItemsResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
288
+ var ChecklistLibraryChecklistItemsResource = class extends _chunkVFLAMMIJcjs.BaseResource {
289
289
  constructor(http, pageSize) {
290
290
  super(http, {
291
291
  key: "checklist_library_checklist_items",
@@ -351,7 +351,7 @@ var ChecklistLibraryChecklistItemsResource = class extends _chunkSEFJJY4Jcjs.Bas
351
351
  };
352
352
 
353
353
  // src/resources/classification_icons.ts
354
- var ClassificationIconsResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
354
+ var ClassificationIconsResource = class extends _chunkVFLAMMIJcjs.BaseResource {
355
355
  constructor(http, pageSize) {
356
356
  super(http, {
357
357
  key: "classification_icons",
@@ -395,7 +395,7 @@ var ClassificationIconsResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
395
395
  };
396
396
 
397
397
  // src/resources/company_alerts.ts
398
- var CompanyAlertsResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
398
+ var CompanyAlertsResource = class extends _chunkVFLAMMIJcjs.BaseResource {
399
399
  constructor(http, pageSize) {
400
400
  super(http, {
401
401
  key: "company_alerts",
@@ -461,7 +461,7 @@ var CompanyAlertsResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
461
461
  };
462
462
 
463
463
  // src/resources/company_locations.ts
464
- var CompanyLocationsResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
464
+ var CompanyLocationsResource = class extends _chunkVFLAMMIJcjs.BaseResource {
465
465
  constructor(http, pageSize) {
466
466
  super(http, {
467
467
  key: "company_locations",
@@ -532,7 +532,7 @@ var CompanyLocationsResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
532
532
  };
533
533
 
534
534
  // src/resources/company_notes.ts
535
- var CompanyNotesResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
535
+ var CompanyNotesResource = class extends _chunkVFLAMMIJcjs.BaseResource {
536
536
  constructor(http, pageSize) {
537
537
  super(http, {
538
538
  key: "company_notes",
@@ -597,7 +597,7 @@ var CompanyNotesResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
597
597
  };
598
598
 
599
599
  // src/resources/company_site_configurations.ts
600
- var CompanySiteConfigurationsResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
600
+ var CompanySiteConfigurationsResource = class extends _chunkVFLAMMIJcjs.BaseResource {
601
601
  constructor(http, pageSize) {
602
602
  super(http, {
603
603
  key: "company_site_configurations",
@@ -648,7 +648,7 @@ var CompanySiteConfigurationsResource = class extends _chunkSEFJJY4Jcjs.BaseReso
648
648
  };
649
649
 
650
650
  // src/resources/company_webhooks.ts
651
- var CompanyWebhooksResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
651
+ var CompanyWebhooksResource = class extends _chunkVFLAMMIJcjs.BaseResource {
652
652
  constructor(http, pageSize) {
653
653
  super(http, {
654
654
  key: "company_webhooks",
@@ -724,7 +724,7 @@ var CompanyWebhooksResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
724
724
  };
725
725
 
726
726
  // src/resources/configuration_item_billing_product_associations.ts
727
- var ConfigurationItemBillingProductAssociationsResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
727
+ var ConfigurationItemBillingProductAssociationsResource = class extends _chunkVFLAMMIJcjs.BaseResource {
728
728
  constructor(http, pageSize) {
729
729
  super(http, {
730
730
  key: "configuration_item_billing_product_associations",
@@ -790,7 +790,7 @@ var ConfigurationItemBillingProductAssociationsResource = class extends _chunkSE
790
790
  };
791
791
 
792
792
  // src/resources/configuration_item_categories.ts
793
- var ConfigurationItemCategoriesResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
793
+ var ConfigurationItemCategoriesResource = class extends _chunkVFLAMMIJcjs.BaseResource {
794
794
  constructor(http, pageSize) {
795
795
  super(http, {
796
796
  key: "configuration_item_categories",
@@ -857,7 +857,7 @@ var ConfigurationItemCategoriesResource = class extends _chunkSEFJJY4Jcjs.BaseRe
857
857
  };
858
858
 
859
859
  // src/resources/configuration_item_category_udf_associations.ts
860
- var ConfigurationItemCategoryUdfAssociationsResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
860
+ var ConfigurationItemCategoryUdfAssociationsResource = class extends _chunkVFLAMMIJcjs.BaseResource {
861
861
  constructor(http, pageSize) {
862
862
  super(http, {
863
863
  key: "configuration_item_category_udf_associations",
@@ -923,7 +923,7 @@ var ConfigurationItemCategoryUdfAssociationsResource = class extends _chunkSEFJJ
923
923
  };
924
924
 
925
925
  // src/resources/configuration_item_dns_records.ts
926
- var ConfigurationItemDnsRecordsResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
926
+ var ConfigurationItemDnsRecordsResource = class extends _chunkVFLAMMIJcjs.BaseResource {
927
927
  constructor(http, pageSize) {
928
928
  super(http, {
929
929
  key: "configuration_item_dns_records",
@@ -972,7 +972,7 @@ var ConfigurationItemDnsRecordsResource = class extends _chunkSEFJJY4Jcjs.BaseRe
972
972
  };
973
973
 
974
974
  // src/resources/configuration_item_notes.ts
975
- var ConfigurationItemNotesResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
975
+ var ConfigurationItemNotesResource = class extends _chunkVFLAMMIJcjs.BaseResource {
976
976
  constructor(http, pageSize) {
977
977
  super(http, {
978
978
  key: "configuration_item_notes",
@@ -1031,7 +1031,7 @@ var ConfigurationItemNotesResource = class extends _chunkSEFJJY4Jcjs.BaseResourc
1031
1031
  };
1032
1032
 
1033
1033
  // src/resources/configuration_item_related_items.ts
1034
- var ConfigurationItemRelatedItemsResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
1034
+ var ConfigurationItemRelatedItemsResource = class extends _chunkVFLAMMIJcjs.BaseResource {
1035
1035
  constructor(http, pageSize) {
1036
1036
  super(http, {
1037
1037
  key: "configuration_item_related_items",
@@ -1092,16 +1092,16 @@ async function fetchRecord(http, path, label, readOpts) {
1092
1092
  const res = await http.request({ method: "GET", path, operation: "configuration_items.moveConfigurationItem", maxRetries: _optionalChain([readOpts, 'optionalAccess', _24 => _24.maxRetries]) });
1093
1093
  const body = res;
1094
1094
  if (body === null || !("item" in body) || body.item === null || body.item === void 0) {
1095
- throw new (0, _chunkSEFJJY4Jcjs.NotFoundError)(`${label} not found`, { code: "NOT_FOUND", category: "not_found" });
1095
+ throw new (0, _chunkVFLAMMIJcjs.NotFoundError)(`${label} not found`, { code: "NOT_FOUND", category: "not_found" });
1096
1096
  }
1097
1097
  return body.item;
1098
1098
  }
1099
1099
  async function moveConfigurationItem(_resource, sourceId, opts, http) {
1100
- const numericSource = _chunkSEFJJY4Jcjs.parseIdentifier.call(void 0, sourceId, "sourceId");
1100
+ const numericSource = _chunkVFLAMMIJcjs.parseIdentifier.call(void 0, sourceId, "sourceId");
1101
1101
  if (_optionalChain([opts, 'optionalAccess', _25 => _25.destinationCompanyId]) === void 0) {
1102
- throw new (0, _chunkSEFJJY4Jcjs.AutotaskConfigError)("moveConfigurationItem: destinationCompanyId is required");
1102
+ throw new (0, _chunkVFLAMMIJcjs.AutotaskConfigError)("moveConfigurationItem: destinationCompanyId is required");
1103
1103
  }
1104
- const destId = _chunkSEFJJY4Jcjs.parseIdentifier.call(void 0, opts.destinationCompanyId, "destinationCompanyId");
1104
+ const destId = _chunkVFLAMMIJcjs.parseIdentifier.call(void 0, opts.destinationCompanyId, "destinationCompanyId");
1105
1105
  const source = await fetchRecord(http, `/V1.0/ConfigurationItems/${numericSource}`, `Configuration item ${numericSource}`, { maxRetries: opts.maxRetries });
1106
1106
  await fetchRecord(http, `/V1.0/Companies/${destId}`, `Company ${destId}`, { maxRetries: opts.maxRetries });
1107
1107
  const body = { ...source };
@@ -1111,20 +1111,20 @@ async function moveConfigurationItem(_resource, sourceId, opts, http) {
1111
1111
  body.companyID = destId;
1112
1112
  body.isActive = true;
1113
1113
  if (opts.newReferenceTitle !== void 0) {
1114
- if (opts.newReferenceTitle.trim() === "") throw new (0, _chunkSEFJJY4Jcjs.AutotaskConfigError)("moveConfigurationItem: newReferenceTitle must be non-empty");
1114
+ if (opts.newReferenceTitle.trim() === "") throw new (0, _chunkVFLAMMIJcjs.AutotaskConfigError)("moveConfigurationItem: newReferenceTitle must be non-empty");
1115
1115
  body.referenceTitle = opts.newReferenceTitle.trim();
1116
1116
  }
1117
1117
  if (opts.lastModifiedDate !== void 0) {
1118
1118
  const current = source.lastModifiedDate;
1119
1119
  if (current !== opts.lastModifiedDate) {
1120
- throw new (0, _chunkSEFJJY4Jcjs.StaleObjectError)(
1120
+ throw new (0, _chunkVFLAMMIJcjs.StaleObjectError)(
1121
1121
  `moveConfigurationItem: source item ${numericSource} was modified since the snapshot (expected lastModifiedDate ${opts.lastModifiedDate}, current ${_nullishCoalesce(current, () => ( "unknown"))})`,
1122
1122
  { operation: "configuration_items.moveConfigurationItem", resourceIds: [numericSource], details: { idRefs: [{ entity: "configuration_item", id: numericSource }] } }
1123
1123
  );
1124
1124
  }
1125
1125
  }
1126
1126
  if (opts.dryRun === true) {
1127
- return _chunkSEFJJY4Jcjs.buildDryRunResult.call(void 0, {
1127
+ return _chunkVFLAMMIJcjs.buildDryRunResult.call(void 0, {
1128
1128
  operation: "configuration_items.moveConfigurationItem",
1129
1129
  method: "POST",
1130
1130
  path: "/V1.0/ConfigurationItems",
@@ -1149,7 +1149,7 @@ async function moveConfigurationItem(_resource, sourceId, opts, http) {
1149
1149
  const createdBody = created;
1150
1150
  const newId = createdBody !== null ? _nullishCoalesce(createdBody.itemId, () => ( createdBody.id)) : void 0;
1151
1151
  if (typeof newId !== "number") {
1152
- throw new (0, _chunkSEFJJY4Jcjs.AutotaskConfigError)("moveConfigurationItem: vendor create response has no itemId");
1152
+ throw new (0, _chunkVFLAMMIJcjs.AutotaskConfigError)("moveConfigurationItem: vendor create response has no itemId");
1153
1153
  }
1154
1154
  let sourceDeactivated = false;
1155
1155
  if (opts.deactivateSource !== false) {
@@ -1168,7 +1168,7 @@ var PROFILE_PART_LIMIT = 50;
1168
1168
  function profilePartLimit(value, name) {
1169
1169
  const n = value === void 0 ? PROFILE_PART_LIMIT : Math.trunc(value);
1170
1170
  if (!Number.isInteger(n) || n < 1) {
1171
- throw new (0, _chunkSEFJJY4Jcjs.AutotaskConfigError)(`profile: ${name} must be an integer >= 1 (got ${String(value)})`);
1171
+ throw new (0, _chunkVFLAMMIJcjs.AutotaskConfigError)(`profile: ${name} must be an integer >= 1 (got ${String(value)})`);
1172
1172
  }
1173
1173
  return n;
1174
1174
  }
@@ -1184,14 +1184,14 @@ async function contextFetchPart(http, entityPath, referenceId, entity) {
1184
1184
  });
1185
1185
  const body = res;
1186
1186
  if (body === null || !("item" in body)) {
1187
- throw new (0, _chunkSEFJJY4Jcjs.NotFoundError)(`context part not found (unexpected envelope shape)`, { resourceIds: [referenceId], details: { idRefs: [{ entity, id: referenceId }] } });
1187
+ throw new (0, _chunkVFLAMMIJcjs.NotFoundError)(`context part not found (unexpected envelope shape)`, { resourceIds: [referenceId], details: { idRefs: [{ entity, id: referenceId }] } });
1188
1188
  }
1189
1189
  if (body.item === null || body.item === void 0) {
1190
- throw new (0, _chunkSEFJJY4Jcjs.NotFoundError)("context part not found", { resourceIds: [referenceId], details: { idRefs: [{ entity, id: referenceId }] } });
1190
+ throw new (0, _chunkVFLAMMIJcjs.NotFoundError)("context part not found", { resourceIds: [referenceId], details: { idRefs: [{ entity, id: referenceId }] } });
1191
1191
  }
1192
1192
  return body.item;
1193
1193
  } catch (err) {
1194
- if (err instanceof _chunkSEFJJY4Jcjs.NotFoundError) return null;
1194
+ if (err instanceof _chunkVFLAMMIJcjs.NotFoundError) return null;
1195
1195
  throw err;
1196
1196
  }
1197
1197
  }
@@ -1203,7 +1203,7 @@ async function ciScopedQuery(http, path, itemID, limit) {
1203
1203
  body: { MaxRecords: limit, filter: [{ field: "configurationItemID", op: "eq", value: itemID }] },
1204
1204
  operation: "configuration_items.profile"
1205
1205
  });
1206
- return _chunkSEFJJY4Jcjs.unwrapItems.call(void 0, res).items;
1206
+ return _chunkVFLAMMIJcjs.unwrapItems.call(void 0, res).items;
1207
1207
  }
1208
1208
  async function profile(resource, id, opts = {}, http) {
1209
1209
  const noteLimit = profilePartLimit(opts.noteLimit, "noteLimit");
@@ -1215,7 +1215,7 @@ async function profile(resource, id, opts = {}, http) {
1215
1215
  const notes = await ciScopedQuery(http, "/V1.0/ConfigurationItemNotes/query", id, noteLimit);
1216
1216
  const relatedItems = await ciScopedQuery(http, "/V1.0/ConfigurationItemRelatedItems/query", id, relatedLimit);
1217
1217
  const associations = await ciScopedQuery(http, "/V1.0/ConfigurationItemBillingProductAssociations/query", id, PROFILE_PART_LIMIT);
1218
- const wallQuirk = _optionalChain([_chunkSEFJJY4Jcjs.RELATIONSHIP_MAP, 'access', _26 => _26["configuration_items"], 'optionalAccess', _27 => _27.zoneFacts, 'optionalAccess', _28 => _28.quirks, 'optionalAccess', _29 => _29.find, 'call', _30 => _30(
1218
+ const wallQuirk = _optionalChain([_chunkVFLAMMIJcjs.RELATIONSHIP_MAP, 'access', _26 => _26["configuration_items"], 'optionalAccess', _27 => _27.zoneFacts, 'optionalAccess', _28 => _28.quirks, 'optionalAccess', _29 => _29.find, 'call', _30 => _30(
1219
1219
  (q) => q.kind === "field-constraint" && q.ops.includes("create") && (_nullishCoalesce(q.fields, () => ( []))).includes("productID")
1220
1220
  )]);
1221
1221
  const productAssociations = {
@@ -1241,11 +1241,11 @@ async function profile(resource, id, opts = {}, http) {
1241
1241
  }
1242
1242
  };
1243
1243
  if (opts.names === true) {
1244
- const builder = _chunkSEFJJY4Jcjs.createNamePlan.call(void 0, );
1244
+ const builder = _chunkVFLAMMIJcjs.createNamePlan.call(void 0, );
1245
1245
  builder.addFk("contract", root["contractID"]);
1246
- const names = await _chunkSEFJJY4Jcjs.resolveCompositeNames.call(void 0, http, builder.plan(), { maxNameReads: opts.maxNameReads });
1246
+ const names = await _chunkVFLAMMIJcjs.resolveCompositeNames.call(void 0, http, builder.plan(), { maxNameReads: opts.maxNameReads });
1247
1247
  const ciRow = { ...ci };
1248
- _chunkSEFJJY4Jcjs.addNameSibling.call(void 0, ciRow, "contractID", (v) => names.recordName("contract", v));
1248
+ _chunkVFLAMMIJcjs.addNameSibling.call(void 0, ciRow, "contractID", (v) => names.recordName("contract", v));
1249
1249
  result.ci = ciRow;
1250
1250
  result.names = names.section;
1251
1251
  }
@@ -1253,7 +1253,7 @@ async function profile(resource, id, opts = {}, http) {
1253
1253
  }
1254
1254
 
1255
1255
  // src/resources/configuration_items.ts
1256
- var ConfigurationItemsResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
1256
+ var ConfigurationItemsResource = class extends _chunkVFLAMMIJcjs.BaseResource {
1257
1257
  constructor(http, pageSize) {
1258
1258
  super(http, {
1259
1259
  key: "configuration_items",
@@ -1342,7 +1342,7 @@ var ConfigurationItemsResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
1342
1342
  };
1343
1343
 
1344
1344
  // src/resources/configuration_item_ssl_subject_alternative_names.ts
1345
- var ConfigurationItemSslSubjectAlternativeNamesResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
1345
+ var ConfigurationItemSslSubjectAlternativeNamesResource = class extends _chunkVFLAMMIJcjs.BaseResource {
1346
1346
  constructor(http, pageSize) {
1347
1347
  super(http, {
1348
1348
  key: "configuration_item_ssl_subject_alternative_names",
@@ -1405,7 +1405,7 @@ var ConfigurationItemSslSubjectAlternativeNamesResource = class extends _chunkSE
1405
1405
  };
1406
1406
 
1407
1407
  // src/resources/configuration_item_types.ts
1408
- var ConfigurationItemTypesResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
1408
+ var ConfigurationItemTypesResource = class extends _chunkVFLAMMIJcjs.BaseResource {
1409
1409
  constructor(http, pageSize) {
1410
1410
  super(http, {
1411
1411
  key: "configuration_item_types",
@@ -1479,7 +1479,7 @@ var ConfigurationItemTypesResource = class extends _chunkSEFJJY4Jcjs.BaseResourc
1479
1479
  };
1480
1480
 
1481
1481
  // src/resources/configuration_item_webhooks.ts
1482
- var ConfigurationItemWebhooksResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
1482
+ var ConfigurationItemWebhooksResource = class extends _chunkVFLAMMIJcjs.BaseResource {
1483
1483
  constructor(http, pageSize) {
1484
1484
  super(http, {
1485
1485
  key: "configuration_item_webhooks",
@@ -1555,7 +1555,7 @@ var ConfigurationItemWebhooksResource = class extends _chunkSEFJJY4Jcjs.BaseReso
1555
1555
  };
1556
1556
 
1557
1557
  // src/resources/contact_group_contacts.ts
1558
- var ContactGroupContactsResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
1558
+ var ContactGroupContactsResource = class extends _chunkVFLAMMIJcjs.BaseResource {
1559
1559
  constructor(http, pageSize) {
1560
1560
  super(http, {
1561
1561
  key: "contact_group_contacts",
@@ -1609,7 +1609,7 @@ var ContactGroupContactsResource = class extends _chunkSEFJJY4Jcjs.BaseResource
1609
1609
  };
1610
1610
 
1611
1611
  // src/resources/contact_groups.ts
1612
- var ContactGroupsResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
1612
+ var ContactGroupsResource = class extends _chunkVFLAMMIJcjs.BaseResource {
1613
1613
  constructor(http, pageSize) {
1614
1614
  super(http, {
1615
1615
  key: "contact_groups",
@@ -1687,22 +1687,22 @@ async function fetchRecord2(http, path, label, readOpts) {
1687
1687
  const res = await http.request({ method: "GET", path, operation: "contacts.moveToCompany", maxRetries: _optionalChain([readOpts, 'optionalAccess', _42 => _42.maxRetries]) });
1688
1688
  const body = res;
1689
1689
  if (body === null || !("item" in body) || body.item === null || body.item === void 0) {
1690
- throw new (0, _chunkSEFJJY4Jcjs.NotFoundError)(`${label} not found`, { code: "NOT_FOUND", category: "not_found" });
1690
+ throw new (0, _chunkVFLAMMIJcjs.NotFoundError)(`${label} not found`, { code: "NOT_FOUND", category: "not_found" });
1691
1691
  }
1692
1692
  return body.item;
1693
1693
  }
1694
1694
  async function moveToCompany(_resource, sourceContactId, destinationCompanyId, opts = {}, http) {
1695
- const sourceId = _chunkSEFJJY4Jcjs.parseIdentifier.call(void 0, sourceContactId, "sourceContactId");
1696
- const destId = _chunkSEFJJY4Jcjs.parseIdentifier.call(void 0, destinationCompanyId, "destinationCompanyId");
1695
+ const sourceId = _chunkVFLAMMIJcjs.parseIdentifier.call(void 0, sourceContactId, "sourceContactId");
1696
+ const destId = _chunkVFLAMMIJcjs.parseIdentifier.call(void 0, destinationCompanyId, "destinationCompanyId");
1697
1697
  const source = await fetchRecord2(http, `/V1.0/Contacts/${sourceId}`, `Contact ${sourceId}`, { maxRetries: opts.maxRetries });
1698
1698
  const companyID = source.companyID;
1699
1699
  if (typeof companyID !== "number" || companyID < 0) {
1700
- throw new (0, _chunkSEFJJY4Jcjs.NotFoundError)(`Contact ${sourceId} has no companyID (cannot scope the source delete)`);
1700
+ throw new (0, _chunkVFLAMMIJcjs.NotFoundError)(`Contact ${sourceId} has no companyID (cannot scope the source delete)`);
1701
1701
  }
1702
1702
  if (opts.lastModifiedDate !== void 0) {
1703
1703
  const current = source.lastModifiedDate;
1704
1704
  if (current !== opts.lastModifiedDate) {
1705
- throw new (0, _chunkSEFJJY4Jcjs.StaleObjectError)(
1705
+ throw new (0, _chunkVFLAMMIJcjs.StaleObjectError)(
1706
1706
  `moveToCompany: source contact ${sourceId} was modified since the snapshot (expected lastModifiedDate ${opts.lastModifiedDate}, current ${typeof current === "string" ? current : "unknown"})`,
1707
1707
  { operation: "contacts.moveToCompany", resourceIds: [sourceId, destId], details: { idRefs: [{ entity: "contact", id: sourceId }, { entity: "company", id: destId }] } }
1708
1708
  );
@@ -1724,10 +1724,10 @@ async function moveToCompany(_resource, sourceContactId, destinationCompanyId, o
1724
1724
  },
1725
1725
  operation: "contacts.moveToCompany"
1726
1726
  });
1727
- const items = _chunkSEFJJY4Jcjs.unwrapItems.call(void 0, res).items;
1727
+ const items = _chunkVFLAMMIJcjs.unwrapItems.call(void 0, res).items;
1728
1728
  const clash = items.find((c) => String(c.id) !== String(sourceId));
1729
1729
  if (clash !== void 0) {
1730
- throw new (0, _chunkSEFJJY4Jcjs.ConflictError)(
1730
+ throw new (0, _chunkVFLAMMIJcjs.ConflictError)(
1731
1731
  `Contact email "${email}" already exists under company ${destId} (contact ${String(clash.id)}); aborting the move`,
1732
1732
  { resourceIds: [sourceId, destId], details: { idRefs: [{ entity: "contact", id: sourceId }, { entity: "company", id: destId }] } }
1733
1733
  );
@@ -1741,7 +1741,7 @@ async function moveToCompany(_resource, sourceContactId, destinationCompanyId, o
1741
1741
  if (opts.dryRun === true) {
1742
1742
  const warnings = [];
1743
1743
  if (opts.deleteSource === true) warnings.push("the source contact will be deleted after the move");
1744
- return _chunkSEFJJY4Jcjs.buildDryRunResult.call(void 0, {
1744
+ return _chunkVFLAMMIJcjs.buildDryRunResult.call(void 0, {
1745
1745
  operation: "contacts.moveToCompany",
1746
1746
  method: "POST",
1747
1747
  path: `/V1.0/Companies/${destId}/Contacts`,
@@ -1767,7 +1767,7 @@ async function moveToCompany(_resource, sourceContactId, destinationCompanyId, o
1767
1767
  const createdBody = created;
1768
1768
  const newId = createdBody !== null ? _nullishCoalesce(createdBody.itemId, () => ( createdBody.id)) : void 0;
1769
1769
  if (typeof newId !== "number") {
1770
- throw new (0, _chunkSEFJJY4Jcjs.AutotaskConfigError)("contacts.moveToCompany: vendor create response has no itemId");
1770
+ throw new (0, _chunkVFLAMMIJcjs.AutotaskConfigError)("contacts.moveToCompany: vendor create response has no itemId");
1771
1771
  }
1772
1772
  let sourceDeleted = false;
1773
1773
  if (opts.deleteSource === true) {
@@ -1786,7 +1786,7 @@ var UPSERT_MAX_DISCOVERY_MERGES = 3;
1786
1786
  var EMAIL_SHAPE = /^.+@.+/;
1787
1787
  var SAFE_CONTACT_CREATE_DEFAULTS = {};
1788
1788
  var DEDUP_LIMIT = 10;
1789
- var CompanyNotFoundError = class extends _chunkSEFJJY4Jcjs.AutotaskError {
1789
+ var CompanyNotFoundError = class extends _chunkVFLAMMIJcjs.AutotaskError {
1790
1790
  constructor(message, options = {}) {
1791
1791
  super(message, {
1792
1792
  code: "COMPANY_NOT_FOUND",
@@ -1797,7 +1797,7 @@ var CompanyNotFoundError = class extends _chunkSEFJJY4Jcjs.AutotaskError {
1797
1797
  this.name = "CompanyNotFoundError";
1798
1798
  }
1799
1799
  };
1800
- var ContactCreateFailedError = class extends _chunkSEFJJY4Jcjs.AutotaskError {
1800
+ var ContactCreateFailedError = class extends _chunkVFLAMMIJcjs.AutotaskError {
1801
1801
  /** The vendor-named fields (empty when the 500 body named nothing parseable). */
1802
1802
 
1803
1803
  constructor(message, vendorFields, options = {}) {
@@ -1807,25 +1807,25 @@ var ContactCreateFailedError = class extends _chunkSEFJJY4Jcjs.AutotaskError {
1807
1807
  }
1808
1808
  };
1809
1809
  async function upsertByEmail(resource, companyID, email, extra, opts, http) {
1810
- const cid = _chunkSEFJJY4Jcjs.parseIdentifier.call(void 0, companyID, "companyID");
1810
+ const cid = _chunkVFLAMMIJcjs.parseIdentifier.call(void 0, companyID, "companyID");
1811
1811
  if (typeof email !== "string" || !EMAIL_SHAPE.test(email)) {
1812
- throw new (0, _chunkSEFJJY4Jcjs.AutotaskConfigError)(
1812
+ throw new (0, _chunkVFLAMMIJcjs.AutotaskConfigError)(
1813
1813
  `upsertByEmail: email must be a non-empty string with the @ shape (a non-empty local part + a non-empty domain; got ${JSON.stringify(email)})`,
1814
1814
  { operation: OP_UPSERT_EMAIL }
1815
1815
  );
1816
1816
  }
1817
1817
  if (extra !== void 0) {
1818
1818
  if (extra.isActive !== void 0 && typeof extra.isActive !== "boolean" && extra.isActive !== 0 && extra.isActive !== 1) {
1819
- throw new (0, _chunkSEFJJY4Jcjs.AutotaskConfigError)(
1819
+ throw new (0, _chunkVFLAMMIJcjs.AutotaskConfigError)(
1820
1820
  `upsertByEmail: extra.isActive must be a boolean (mapped to the zone-correct number 1/0) or a raw 0/1 number (got ${String(extra.isActive)})`,
1821
1821
  { operation: OP_UPSERT_EMAIL }
1822
1822
  );
1823
1823
  }
1824
1824
  if (extra.firstName !== void 0 && (typeof extra.firstName !== "string" || extra.firstName === "")) {
1825
- throw new (0, _chunkSEFJJY4Jcjs.AutotaskConfigError)("upsertByEmail: extra.firstName must be a non-empty string (or omitted \u2014 the node defaults it to the email local-part)", { operation: OP_UPSERT_EMAIL });
1825
+ throw new (0, _chunkVFLAMMIJcjs.AutotaskConfigError)("upsertByEmail: extra.firstName must be a non-empty string (or omitted \u2014 the node defaults it to the email local-part)", { operation: OP_UPSERT_EMAIL });
1826
1826
  }
1827
1827
  if (extra.lastName !== void 0 && typeof extra.lastName !== "string") {
1828
- throw new (0, _chunkSEFJJY4Jcjs.AutotaskConfigError)("upsertByEmail: extra.lastName must be a string (or omitted \u2014 the node defaults it to the non-empty neutral value Unknown)", { operation: OP_UPSERT_EMAIL });
1828
+ throw new (0, _chunkVFLAMMIJcjs.AutotaskConfigError)("upsertByEmail: extra.lastName must be a string (or omitted \u2014 the node defaults it to the non-empty neutral value Unknown)", { operation: OP_UPSERT_EMAIL });
1829
1829
  }
1830
1830
  }
1831
1831
  const parentRes = await http.request({ method: "GET", path: `/V1.0/Companies/${cid}`, operation: OP_UPSERT_EMAIL, maxRetries: opts.maxRetries });
@@ -1846,7 +1846,7 @@ async function upsertByEmail(resource, companyID, email, extra, opts, http) {
1846
1846
  const match = q.items[0];
1847
1847
  if (match !== void 0) {
1848
1848
  if (opts.dryRun === true) {
1849
- return _chunkSEFJJY4Jcjs.buildDryRunResult.call(void 0,
1849
+ return _chunkVFLAMMIJcjs.buildDryRunResult.call(void 0,
1850
1850
  {
1851
1851
  operation: OP_UPSERT_EMAIL,
1852
1852
  method: "POST",
@@ -1876,7 +1876,7 @@ async function upsertByEmail(resource, companyID, email, extra, opts, http) {
1876
1876
  isActive: typeof isActive === "boolean" ? isActive ? 1 : 0 : isActive
1877
1877
  };
1878
1878
  if (opts.dryRun === true) {
1879
- return _chunkSEFJJY4Jcjs.buildDryRunResult.call(void 0,
1879
+ return _chunkVFLAMMIJcjs.buildDryRunResult.call(void 0,
1880
1880
  {
1881
1881
  operation: OP_UPSERT_EMAIL,
1882
1882
  method: "POST",
@@ -1899,8 +1899,8 @@ async function upsertByEmail(resource, companyID, email, extra, opts, http) {
1899
1899
  const created = await resource.create(cid, body, { maxRetries: opts.maxRetries });
1900
1900
  return { id: created.id, created: true };
1901
1901
  } catch (err) {
1902
- if (!_chunkSEFJJY4Jcjs.isAutotaskError.call(void 0, err) || err.vendorError === void 0) throw err;
1903
- const named = (_nullishCoalesce(_chunkSEFJJY4Jcjs.parseVendorErrors.call(void 0, err.vendorError), () => ( []))).map((e) => e.field).filter((f) => f !== void 0);
1902
+ if (!_chunkVFLAMMIJcjs.isAutotaskError.call(void 0, err) || err.vendorError === void 0) throw err;
1903
+ const named = (_nullishCoalesce(_chunkVFLAMMIJcjs.parseVendorErrors.call(void 0, err.vendorError), () => ( []))).map((e) => e.field).filter((f) => f !== void 0);
1904
1904
  const seen = /* @__PURE__ */ new Set();
1905
1905
  const unique = [...named].filter((f) => seen.has(f) ? false : (seen.add(f), true));
1906
1906
  const hasDefault = unique.some((f) => SAFE_CONTACT_CREATE_DEFAULTS[f] !== void 0);
@@ -1914,7 +1914,7 @@ async function upsertByEmail(resource, companyID, email, extra, opts, http) {
1914
1914
  }
1915
1915
  continue;
1916
1916
  }
1917
- const detail = _chunkSEFJJY4Jcjs.formatVendorDetail.call(void 0, err.vendorError);
1917
+ const detail = _chunkVFLAMMIJcjs.formatVendorDetail.call(void 0, err.vendorError);
1918
1918
  throw new ContactCreateFailedError(
1919
1919
  `upsertByEmail: the vendor rejected the contact create${unique.length > 0 ? ` naming field(s) ${unique.join(", ")}` : ""} (no proven-safe default \u2014 the required set is fully filled by the node)${detail ? ` \u2014 ${detail}` : ""}`,
1920
1920
  unique,
@@ -1931,7 +1931,7 @@ async function upsertByEmail(resource, companyID, email, extra, opts, http) {
1931
1931
  }
1932
1932
 
1933
1933
  // src/resources/contacts.ts
1934
- var ContactsResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
1934
+ var ContactsResource = class extends _chunkVFLAMMIJcjs.BaseResource {
1935
1935
  constructor(http, pageSize) {
1936
1936
  super(http, {
1937
1937
  key: "contacts",
@@ -2023,7 +2023,7 @@ var ContactsResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
2023
2023
  };
2024
2024
 
2025
2025
  // src/resources/contact_webhooks.ts
2026
- var ContactWebhooksResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
2026
+ var ContactWebhooksResource = class extends _chunkVFLAMMIJcjs.BaseResource {
2027
2027
  constructor(http, pageSize) {
2028
2028
  super(http, {
2029
2029
  key: "contact_webhooks",
@@ -2099,7 +2099,7 @@ var ContactWebhooksResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
2099
2099
  };
2100
2100
 
2101
2101
  // src/resources/contract_billing_rules.ts
2102
- var ContractBillingRulesResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
2102
+ var ContractBillingRulesResource = class extends _chunkVFLAMMIJcjs.BaseResource {
2103
2103
  constructor(http, pageSize) {
2104
2104
  super(http, {
2105
2105
  key: "contract_billing_rules",
@@ -2165,7 +2165,7 @@ var ContractBillingRulesResource = class extends _chunkSEFJJY4Jcjs.BaseResource
2165
2165
  };
2166
2166
 
2167
2167
  // src/resources/contract_block_hour_factors.ts
2168
- var ContractBlockHourFactorsResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
2168
+ var ContractBlockHourFactorsResource = class extends _chunkVFLAMMIJcjs.BaseResource {
2169
2169
  constructor(http, pageSize) {
2170
2170
  super(http, {
2171
2171
  key: "contract_block_hour_factors",
@@ -2224,7 +2224,7 @@ var ContractBlockHourFactorsResource = class extends _chunkSEFJJY4Jcjs.BaseResou
2224
2224
  };
2225
2225
 
2226
2226
  // src/resources/contract_blocks.ts
2227
- var ContractBlocksResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
2227
+ var ContractBlocksResource = class extends _chunkVFLAMMIJcjs.BaseResource {
2228
2228
  constructor(http, pageSize) {
2229
2229
  super(http, {
2230
2230
  key: "contract_blocks",
@@ -2283,7 +2283,7 @@ var ContractBlocksResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
2283
2283
  };
2284
2284
 
2285
2285
  // src/resources/contract_charges.ts
2286
- var ContractChargesResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
2286
+ var ContractChargesResource = class extends _chunkVFLAMMIJcjs.BaseResource {
2287
2287
  constructor(http, pageSize) {
2288
2288
  super(http, {
2289
2289
  key: "contract_charges",
@@ -2354,7 +2354,7 @@ var ContractChargesResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
2354
2354
  };
2355
2355
 
2356
2356
  // src/resources/contract_exclusion_billing_codes.ts
2357
- var ContractExclusionBillingCodesResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
2357
+ var ContractExclusionBillingCodesResource = class extends _chunkVFLAMMIJcjs.BaseResource {
2358
2358
  constructor(http, pageSize) {
2359
2359
  super(http, {
2360
2360
  key: "contract_exclusion_billing_codes",
@@ -2411,7 +2411,7 @@ var ContractExclusionBillingCodesResource = class extends _chunkSEFJJY4Jcjs.Base
2411
2411
  };
2412
2412
 
2413
2413
  // src/resources/contract_exclusion_roles.ts
2414
- var ContractExclusionRolesResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
2414
+ var ContractExclusionRolesResource = class extends _chunkVFLAMMIJcjs.BaseResource {
2415
2415
  constructor(http, pageSize) {
2416
2416
  super(http, {
2417
2417
  key: "contract_exclusion_roles",
@@ -2468,7 +2468,7 @@ var ContractExclusionRolesResource = class extends _chunkSEFJJY4Jcjs.BaseResourc
2468
2468
  };
2469
2469
 
2470
2470
  // src/resources/contract_exclusion_set_excluded_roles.ts
2471
- var ContractExclusionSetExcludedRolesResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
2471
+ var ContractExclusionSetExcludedRolesResource = class extends _chunkVFLAMMIJcjs.BaseResource {
2472
2472
  constructor(http, pageSize) {
2473
2473
  super(http, {
2474
2474
  key: "contract_exclusion_set_excluded_roles",
@@ -2525,7 +2525,7 @@ var ContractExclusionSetExcludedRolesResource = class extends _chunkSEFJJY4Jcjs.
2525
2525
  };
2526
2526
 
2527
2527
  // src/resources/contract_exclusion_set_excluded_work_types.ts
2528
- var ContractExclusionSetExcludedWorkTypesResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
2528
+ var ContractExclusionSetExcludedWorkTypesResource = class extends _chunkVFLAMMIJcjs.BaseResource {
2529
2529
  constructor(http, pageSize) {
2530
2530
  super(http, {
2531
2531
  key: "contract_exclusion_set_excluded_work_types",
@@ -2582,7 +2582,7 @@ var ContractExclusionSetExcludedWorkTypesResource = class extends _chunkSEFJJY4J
2582
2582
  };
2583
2583
 
2584
2584
  // src/resources/contract_exclusion_sets.ts
2585
- var ContractExclusionSetsResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
2585
+ var ContractExclusionSetsResource = class extends _chunkVFLAMMIJcjs.BaseResource {
2586
2586
  constructor(http, pageSize) {
2587
2587
  super(http, {
2588
2588
  key: "contract_exclusion_sets",
@@ -2656,7 +2656,7 @@ var ContractExclusionSetsResource = class extends _chunkSEFJJY4Jcjs.BaseResource
2656
2656
  };
2657
2657
 
2658
2658
  // src/resources/contract_milestones.ts
2659
- var ContractMilestonesResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
2659
+ var ContractMilestonesResource = class extends _chunkVFLAMMIJcjs.BaseResource {
2660
2660
  constructor(http, pageSize) {
2661
2661
  super(http, {
2662
2662
  key: "contract_milestones",
@@ -2715,7 +2715,7 @@ var ContractMilestonesResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
2715
2715
  };
2716
2716
 
2717
2717
  // src/resources/contract_notes.ts
2718
- var ContractNotesResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
2718
+ var ContractNotesResource = class extends _chunkVFLAMMIJcjs.BaseResource {
2719
2719
  constructor(http, pageSize) {
2720
2720
  super(http, {
2721
2721
  key: "contract_notes",
@@ -2774,7 +2774,7 @@ var ContractNotesResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
2774
2774
  };
2775
2775
 
2776
2776
  // src/resources/contract_rates.ts
2777
- var ContractRatesResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
2777
+ var ContractRatesResource = class extends _chunkVFLAMMIJcjs.BaseResource {
2778
2778
  constructor(http, pageSize) {
2779
2779
  super(http, {
2780
2780
  key: "contract_rates",
@@ -2833,7 +2833,7 @@ var ContractRatesResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
2833
2833
  };
2834
2834
 
2835
2835
  // src/resources/contract_retainers.ts
2836
- var ContractRetainersResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
2836
+ var ContractRetainersResource = class extends _chunkVFLAMMIJcjs.BaseResource {
2837
2837
  constructor(http, pageSize) {
2838
2838
  super(http, {
2839
2839
  key: "contract_retainers",
@@ -2892,7 +2892,7 @@ var ContractRetainersResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
2892
2892
  };
2893
2893
 
2894
2894
  // src/resources/contract_role_costs.ts
2895
- var ContractRoleCostsResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
2895
+ var ContractRoleCostsResource = class extends _chunkVFLAMMIJcjs.BaseResource {
2896
2896
  constructor(http, pageSize) {
2897
2897
  super(http, {
2898
2898
  key: "contract_role_costs",
@@ -2951,7 +2951,7 @@ var ContractRoleCostsResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
2951
2951
  };
2952
2952
 
2953
2953
  // src/resources/contract_service_adjustments.ts
2954
- var ContractServiceAdjustmentsResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
2954
+ var ContractServiceAdjustmentsResource = class extends _chunkVFLAMMIJcjs.BaseResource {
2955
2955
  constructor(http, pageSize) {
2956
2956
  super(http, {
2957
2957
  key: "contract_service_adjustments",
@@ -2985,7 +2985,7 @@ var ContractServiceAdjustmentsResource = class extends _chunkSEFJJY4Jcjs.BaseRes
2985
2985
  };
2986
2986
 
2987
2987
  // src/resources/contract_service_bundle_adjustments.ts
2988
- var ContractServiceBundleAdjustmentsResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
2988
+ var ContractServiceBundleAdjustmentsResource = class extends _chunkVFLAMMIJcjs.BaseResource {
2989
2989
  constructor(http, pageSize) {
2990
2990
  super(http, {
2991
2991
  key: "contract_service_bundle_adjustments",
@@ -3019,7 +3019,7 @@ var ContractServiceBundleAdjustmentsResource = class extends _chunkSEFJJY4Jcjs.B
3019
3019
  };
3020
3020
 
3021
3021
  // src/resources/contract_service_bundles.ts
3022
- var ContractServiceBundlesResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
3022
+ var ContractServiceBundlesResource = class extends _chunkVFLAMMIJcjs.BaseResource {
3023
3023
  constructor(http, pageSize) {
3024
3024
  super(http, {
3025
3025
  key: "contract_service_bundles",
@@ -3078,7 +3078,7 @@ var ContractServiceBundlesResource = class extends _chunkSEFJJY4Jcjs.BaseResourc
3078
3078
  };
3079
3079
 
3080
3080
  // src/resources/contract_service_bundle_units.ts
3081
- var ContractServiceBundleUnitsResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
3081
+ var ContractServiceBundleUnitsResource = class extends _chunkVFLAMMIJcjs.BaseResource {
3082
3082
  constructor(http, pageSize) {
3083
3083
  super(http, {
3084
3084
  key: "contract_service_bundle_units",
@@ -3120,7 +3120,7 @@ var ContractServiceBundleUnitsResource = class extends _chunkSEFJJY4Jcjs.BaseRes
3120
3120
  };
3121
3121
 
3122
3122
  // src/resources/contract_services.ts
3123
- var ContractServicesResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
3123
+ var ContractServicesResource = class extends _chunkVFLAMMIJcjs.BaseResource {
3124
3124
  constructor(http, pageSize) {
3125
3125
  super(http, {
3126
3126
  key: "contract_services",
@@ -3179,7 +3179,7 @@ var ContractServicesResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
3179
3179
  };
3180
3180
 
3181
3181
  // src/resources/contract_service_units.ts
3182
- var ContractServiceUnitsResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
3182
+ var ContractServiceUnitsResource = class extends _chunkVFLAMMIJcjs.BaseResource {
3183
3183
  constructor(http, pageSize) {
3184
3184
  super(http, {
3185
3185
  key: "contract_service_units",
@@ -3221,7 +3221,7 @@ var ContractServiceUnitsResource = class extends _chunkSEFJJY4Jcjs.BaseResource
3221
3221
  };
3222
3222
 
3223
3223
  // src/resources/contract_ticket_purchases.ts
3224
- var ContractTicketPurchasesResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
3224
+ var ContractTicketPurchasesResource = class extends _chunkVFLAMMIJcjs.BaseResource {
3225
3225
  constructor(http, pageSize) {
3226
3226
  super(http, {
3227
3227
  key: "contract_ticket_purchases",
@@ -3280,7 +3280,7 @@ var ContractTicketPurchasesResource = class extends _chunkSEFJJY4Jcjs.BaseResour
3280
3280
  };
3281
3281
 
3282
3282
  // src/resources/countries.ts
3283
- var CountriesResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
3283
+ var CountriesResource = class extends _chunkVFLAMMIJcjs.BaseResource {
3284
3284
  constructor(http, pageSize) {
3285
3285
  super(http, {
3286
3286
  key: "countries",
@@ -3339,7 +3339,7 @@ var CountriesResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
3339
3339
  };
3340
3340
 
3341
3341
  // src/resources/currencies.ts
3342
- var CurrenciesResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
3342
+ var CurrenciesResource = class extends _chunkVFLAMMIJcjs.BaseResource {
3343
3343
  constructor(http, pageSize) {
3344
3344
  super(http, {
3345
3345
  key: "currencies",
@@ -3383,7 +3383,7 @@ var CurrenciesResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
3383
3383
  };
3384
3384
 
3385
3385
  // src/resources/departments.ts
3386
- var DepartmentsResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
3386
+ var DepartmentsResource = class extends _chunkVFLAMMIJcjs.BaseResource {
3387
3387
  constructor(http, pageSize) {
3388
3388
  super(http, {
3389
3389
  key: "departments",
@@ -3450,7 +3450,7 @@ var DepartmentsResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
3450
3450
  };
3451
3451
 
3452
3452
  // src/resources/domain_registrars.ts
3453
- var DomainRegistrarsResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
3453
+ var DomainRegistrarsResource = class extends _chunkVFLAMMIJcjs.BaseResource {
3454
3454
  constructor(http, pageSize) {
3455
3455
  super(http, {
3456
3456
  key: "domain_registrars",
@@ -3533,7 +3533,7 @@ var EntityInformationResource = class {
3533
3533
  };
3534
3534
 
3535
3535
  // src/resources/expense_item_attachments.ts
3536
- var ExpenseItemAttachmentsResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
3536
+ var ExpenseItemAttachmentsResource = class extends _chunkVFLAMMIJcjs.BaseResource {
3537
3537
  constructor(http, pageSize) {
3538
3538
  super(http, {
3539
3539
  key: "expense_item_attachments",
@@ -3595,7 +3595,7 @@ var ExpenseItemAttachmentsResource = class extends _chunkSEFJJY4Jcjs.BaseResourc
3595
3595
  };
3596
3596
 
3597
3597
  // src/resources/expense_items.ts
3598
- var ExpenseItemsResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
3598
+ var ExpenseItemsResource = class extends _chunkVFLAMMIJcjs.BaseResource {
3599
3599
  constructor(http, pageSize) {
3600
3600
  super(http, {
3601
3601
  key: "expense_items",
@@ -3604,7 +3604,7 @@ var ExpenseItemsResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
3604
3604
  parentField: "expenseReportID",
3605
3605
  deletable: false,
3606
3606
  udfCapable: true,
3607
- parentPath: "/V1.0/Expenses"
3607
+ parentPath: "/V1.0/ExpenseReports"
3608
3608
  }, pageSize);
3609
3609
  }
3610
3610
  /** Query ExpenseItem records (global; narrow with the expenseReportID filter). */
@@ -3654,7 +3654,7 @@ var ExpenseItemsResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
3654
3654
  };
3655
3655
 
3656
3656
  // src/resources/expense_reports.ts
3657
- var ExpenseReportsResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
3657
+ var ExpenseReportsResource = class extends _chunkVFLAMMIJcjs.BaseResource {
3658
3658
  constructor(http, pageSize) {
3659
3659
  super(http, {
3660
3660
  key: "expense_reports",
@@ -3721,7 +3721,7 @@ var ExpenseReportsResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
3721
3721
  };
3722
3722
 
3723
3723
  // src/resources/holiday_sets.ts
3724
- var HolidaySetsResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
3724
+ var HolidaySetsResource = class extends _chunkVFLAMMIJcjs.BaseResource {
3725
3725
  constructor(http, pageSize) {
3726
3726
  super(http, {
3727
3727
  key: "holiday_sets",
@@ -3790,7 +3790,7 @@ var HolidaySetsResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
3790
3790
  };
3791
3791
 
3792
3792
  // src/resources/holidays.ts
3793
- var HolidaysResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
3793
+ var HolidaysResource = class extends _chunkVFLAMMIJcjs.BaseResource {
3794
3794
  constructor(http, pageSize) {
3795
3795
  super(http, {
3796
3796
  key: "holidays",
@@ -3862,10 +3862,10 @@ var PATH_SUFFIX = {
3862
3862
  transfer: "StockedItemsTransfer"
3863
3863
  };
3864
3864
  async function stockedItems(_resource, kind, parentId, data, opts = {}, http) {
3865
- const numericParent = _chunkSEFJJY4Jcjs.parseIdentifier.call(void 0, parentId, "parentId");
3865
+ const numericParent = _chunkVFLAMMIJcjs.parseIdentifier.call(void 0, parentId, "parentId");
3866
3866
  const suffix = PATH_SUFFIX[kind];
3867
3867
  if (opts.dryRun === true) {
3868
- return _chunkSEFJJY4Jcjs.buildDryRunResult.call(void 0, {
3868
+ return _chunkVFLAMMIJcjs.buildDryRunResult.call(void 0, {
3869
3869
  operation: `inventory_products.stockedItems${suffix.slice("StockedItems".length)}`,
3870
3870
  method: "POST",
3871
3871
  path: `/V1.0/InventoryProducts/${numericParent}/${suffix}`,
@@ -3882,11 +3882,11 @@ async function stockedItems(_resource, kind, parentId, data, opts = {}, http) {
3882
3882
  operation: `inventory_products.stockedItems${suffix.slice("StockedItems".length)}`,
3883
3883
  maxRetries: opts.maxRetries
3884
3884
  });
3885
- return _chunkSEFJJY4Jcjs.unwrapOperation.call(void 0, res);
3885
+ return _chunkVFLAMMIJcjs.unwrapOperation.call(void 0, res);
3886
3886
  }
3887
3887
 
3888
3888
  // src/resources/inventory_products.ts
3889
- var InventoryProductsResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
3889
+ var InventoryProductsResource = class extends _chunkVFLAMMIJcjs.BaseResource {
3890
3890
  constructor(http, pageSize) {
3891
3891
  super(http, {
3892
3892
  key: "inventory_products",
@@ -3967,7 +3967,7 @@ var InventoryProductsResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
3967
3967
  };
3968
3968
 
3969
3969
  // src/resources/invoice_templates.ts
3970
- var InvoiceTemplatesResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
3970
+ var InvoiceTemplatesResource = class extends _chunkVFLAMMIJcjs.BaseResource {
3971
3971
  constructor(http, pageSize) {
3972
3972
  super(http, {
3973
3973
  key: "invoice_templates",
@@ -4011,7 +4011,7 @@ var ModulesResource = class {
4011
4011
  };
4012
4012
 
4013
4013
  // src/resources/notification_history.ts
4014
- var NotificationHistoryResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
4014
+ var NotificationHistoryResource = class extends _chunkVFLAMMIJcjs.BaseResource {
4015
4015
  constructor(http, pageSize) {
4016
4016
  super(http, {
4017
4017
  key: "notification_history",
@@ -4050,7 +4050,7 @@ var NotificationHistoryResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
4050
4050
  };
4051
4051
 
4052
4052
  // src/resources/opportunities.ts
4053
- var OpportunitiesResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
4053
+ var OpportunitiesResource = class extends _chunkVFLAMMIJcjs.BaseResource {
4054
4054
  constructor(http, pageSize) {
4055
4055
  super(http, {
4056
4056
  key: "opportunities",
@@ -4112,7 +4112,7 @@ var OpportunitiesResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
4112
4112
  };
4113
4113
 
4114
4114
  // src/resources/opportunity_attachments.ts
4115
- var OpportunityAttachmentsResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
4115
+ var OpportunityAttachmentsResource = class extends _chunkVFLAMMIJcjs.BaseResource {
4116
4116
  constructor(http, pageSize) {
4117
4117
  super(http, {
4118
4118
  key: "opportunity_attachments",
@@ -4174,7 +4174,7 @@ var OpportunityAttachmentsResource = class extends _chunkSEFJJY4Jcjs.BaseResourc
4174
4174
  };
4175
4175
 
4176
4176
  // src/resources/opportunity_categories.ts
4177
- var OpportunityCategoriesResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
4177
+ var OpportunityCategoriesResource = class extends _chunkVFLAMMIJcjs.BaseResource {
4178
4178
  constructor(http, pageSize) {
4179
4179
  super(http, {
4180
4180
  key: "opportunity_categories",
@@ -4233,7 +4233,7 @@ var OpportunityCategoriesResource = class extends _chunkSEFJJY4Jcjs.BaseResource
4233
4233
  };
4234
4234
 
4235
4235
  // src/resources/phases.ts
4236
- var PhasesResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
4236
+ var PhasesResource = class extends _chunkVFLAMMIJcjs.BaseResource {
4237
4237
  constructor(http, pageSize) {
4238
4238
  super(http, {
4239
4239
  key: "phases",
@@ -4292,7 +4292,7 @@ var PhasesResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
4292
4292
  };
4293
4293
 
4294
4294
  // src/resources/products.ts
4295
- var ProductsResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
4295
+ var ProductsResource = class extends _chunkVFLAMMIJcjs.BaseResource {
4296
4296
  constructor(http, pageSize) {
4297
4297
  super(http, {
4298
4298
  key: "products",
@@ -4359,7 +4359,7 @@ var ProductsResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
4359
4359
  };
4360
4360
 
4361
4361
  // src/resources/product_vendors.ts
4362
- var ProductVendorsResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
4362
+ var ProductVendorsResource = class extends _chunkVFLAMMIJcjs.BaseResource {
4363
4363
  constructor(http, pageSize) {
4364
4364
  super(http, {
4365
4365
  key: "product_vendors",
@@ -4418,7 +4418,7 @@ var ProductVendorsResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
4418
4418
  };
4419
4419
 
4420
4420
  // src/resources/project_charges.ts
4421
- var ProjectChargesResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
4421
+ var ProjectChargesResource = class extends _chunkVFLAMMIJcjs.BaseResource {
4422
4422
  constructor(http, pageSize) {
4423
4423
  super(http, {
4424
4424
  key: "project_charges",
@@ -4489,7 +4489,7 @@ var ProjectChargesResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
4489
4489
  };
4490
4490
 
4491
4491
  // src/resources/project_notes.ts
4492
- var ProjectNotesResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
4492
+ var ProjectNotesResource = class extends _chunkVFLAMMIJcjs.BaseResource {
4493
4493
  constructor(http, pageSize) {
4494
4494
  super(http, {
4495
4495
  key: "project_notes",
@@ -4548,7 +4548,7 @@ var ProjectNotesResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
4548
4548
  };
4549
4549
 
4550
4550
  // src/resources/projects.ts
4551
- var ProjectsResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
4551
+ var ProjectsResource = class extends _chunkVFLAMMIJcjs.BaseResource {
4552
4552
  constructor(http, pageSize) {
4553
4553
  super(http, {
4554
4554
  key: "projects",
@@ -4625,13 +4625,13 @@ var ProjectsResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
4625
4625
  const leadResource = await this.contextFetch("/V1.0/Resources", root["projectLeadResourceID"]);
4626
4626
  const result = { project, company, opportunity, leadResource };
4627
4627
  if (opts.names === true) {
4628
- const builder = _chunkSEFJJY4Jcjs.createNamePlan.call(void 0, );
4628
+ const builder = _chunkVFLAMMIJcjs.createNamePlan.call(void 0, );
4629
4629
  builder.addResource(root["creatorResourceID"]);
4630
4630
  builder.addFk("contract", root["contractID"]);
4631
- const names = await _chunkSEFJJY4Jcjs.resolveCompositeNames.call(void 0, this.http, builder.plan(), { maxNameReads: opts.maxNameReads });
4631
+ const names = await _chunkVFLAMMIJcjs.resolveCompositeNames.call(void 0, this.http, builder.plan(), { maxNameReads: opts.maxNameReads });
4632
4632
  const row = { ...project };
4633
- _chunkSEFJJY4Jcjs.addNameSibling.call(void 0, row, "creatorResourceID", (v) => names.resourceName(v));
4634
- _chunkSEFJJY4Jcjs.addNameSibling.call(void 0, row, "contractID", (v) => names.recordName("contract", v));
4633
+ _chunkVFLAMMIJcjs.addNameSibling.call(void 0, row, "creatorResourceID", (v) => names.resourceName(v));
4634
+ _chunkVFLAMMIJcjs.addNameSibling.call(void 0, row, "contractID", (v) => names.recordName("contract", v));
4635
4635
  result.project = row;
4636
4636
  result.names = names.section;
4637
4637
  }
@@ -4640,7 +4640,7 @@ var ProjectsResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
4640
4640
  };
4641
4641
 
4642
4642
  // src/resources/purchase_approvals.ts
4643
- var PurchaseApprovalsResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
4643
+ var PurchaseApprovalsResource = class extends _chunkVFLAMMIJcjs.BaseResource {
4644
4644
  constructor(http, pageSize) {
4645
4645
  super(http, {
4646
4646
  key: "purchase_approvals",
@@ -4694,7 +4694,7 @@ var PurchaseApprovalsResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
4694
4694
  };
4695
4695
 
4696
4696
  // src/resources/purchase_order_item_receiving.ts
4697
- var PurchaseOrderItemReceivingResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
4697
+ var PurchaseOrderItemReceivingResource = class extends _chunkVFLAMMIJcjs.BaseResource {
4698
4698
  constructor(http, pageSize) {
4699
4699
  super(http, {
4700
4700
  key: "purchase_order_item_receiving",
@@ -4744,7 +4744,7 @@ var PurchaseOrderItemReceivingResource = class extends _chunkSEFJJY4Jcjs.BaseRes
4744
4744
  };
4745
4745
 
4746
4746
  // src/resources/purchase_order_items.ts
4747
- var PurchaseOrderItemsResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
4747
+ var PurchaseOrderItemsResource = class extends _chunkVFLAMMIJcjs.BaseResource {
4748
4748
  constructor(http, pageSize) {
4749
4749
  super(http, {
4750
4750
  key: "purchase_order_items",
@@ -4803,7 +4803,7 @@ var PurchaseOrderItemsResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
4803
4803
  };
4804
4804
 
4805
4805
  // src/resources/purchase_orders.ts
4806
- var PurchaseOrdersResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
4806
+ var PurchaseOrdersResource = class extends _chunkVFLAMMIJcjs.BaseResource {
4807
4807
  constructor(http, pageSize) {
4808
4808
  super(http, {
4809
4809
  key: "purchase_orders",
@@ -4865,7 +4865,7 @@ var PurchaseOrdersResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
4865
4865
  };
4866
4866
 
4867
4867
  // src/resources/quote_items.ts
4868
- var QuoteItemsResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
4868
+ var QuoteItemsResource = class extends _chunkVFLAMMIJcjs.BaseResource {
4869
4869
  constructor(http, pageSize) {
4870
4870
  super(http, {
4871
4871
  key: "quote_items",
@@ -4936,7 +4936,7 @@ var QuoteItemsResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
4936
4936
  };
4937
4937
 
4938
4938
  // src/resources/quote_locations.ts
4939
- var QuoteLocationsResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
4939
+ var QuoteLocationsResource = class extends _chunkVFLAMMIJcjs.BaseResource {
4940
4940
  constructor(http, pageSize) {
4941
4941
  super(http, {
4942
4942
  key: "quote_locations",
@@ -5001,7 +5001,7 @@ var QuoteLocationsResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
5001
5001
  };
5002
5002
 
5003
5003
  // src/resources/quotes.ts
5004
- var QuotesResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
5004
+ var QuotesResource = class extends _chunkVFLAMMIJcjs.BaseResource {
5005
5005
  constructor(http, pageSize) {
5006
5006
  super(http, {
5007
5007
  key: "quotes",
@@ -5068,7 +5068,7 @@ var QuotesResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
5068
5068
  };
5069
5069
 
5070
5070
  // src/resources/quote_templates.ts
5071
- var QuoteTemplatesResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
5071
+ var QuoteTemplatesResource = class extends _chunkVFLAMMIJcjs.BaseResource {
5072
5072
  constructor(http, pageSize) {
5073
5073
  super(http, {
5074
5074
  key: "quote_templates",
@@ -5112,7 +5112,7 @@ var QuoteTemplatesResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
5112
5112
  };
5113
5113
 
5114
5114
  // src/resources/resource_role_queues.ts
5115
- var ResourceRoleQueuesResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
5115
+ var ResourceRoleQueuesResource = class extends _chunkVFLAMMIJcjs.BaseResource {
5116
5116
  constructor(http, pageSize) {
5117
5117
  super(http, {
5118
5118
  key: "resource_role_queues",
@@ -5171,7 +5171,7 @@ var ResourceRoleQueuesResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
5171
5171
  };
5172
5172
 
5173
5173
  // src/resources/resource_roles.ts
5174
- var ResourceRolesResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
5174
+ var ResourceRolesResource = class extends _chunkVFLAMMIJcjs.BaseResource {
5175
5175
  constructor(http, pageSize) {
5176
5176
  super(http, {
5177
5177
  key: "resource_roles",
@@ -5213,7 +5213,7 @@ var ResourceRolesResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
5213
5213
  };
5214
5214
 
5215
5215
  // src/resources/resource_skills.ts
5216
- var ResourceSkillsResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
5216
+ var ResourceSkillsResource = class extends _chunkVFLAMMIJcjs.BaseResource {
5217
5217
  constructor(http, pageSize) {
5218
5218
  super(http, {
5219
5219
  key: "resource_skills",
@@ -5265,7 +5265,7 @@ var ResourceSkillsResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
5265
5265
 
5266
5266
  // src/resources/special/resource_time_off_additional.ts
5267
5267
  async function getByResource(_resource, resourceId, http) {
5268
- const numericResource = _chunkSEFJJY4Jcjs.parseIdentifier.call(void 0, resourceId, "resourceId");
5268
+ const numericResource = _chunkVFLAMMIJcjs.parseIdentifier.call(void 0, resourceId, "resourceId");
5269
5269
  const res = await http.request({
5270
5270
  method: "GET",
5271
5271
  path: `/V1.0/Resources/${numericResource}/TimeOffAdditional`,
@@ -5279,11 +5279,11 @@ async function getByResource(_resource, resourceId, http) {
5279
5279
  if (typeof item === "object" && !Array.isArray(item)) return [item];
5280
5280
  }
5281
5281
  }
5282
- return _chunkSEFJJY4Jcjs.unwrapItems.call(void 0, res, "resource_time_off_additional.getByResource").items;
5282
+ return _chunkVFLAMMIJcjs.unwrapItems.call(void 0, res, "resource_time_off_additional.getByResource").items;
5283
5283
  }
5284
5284
 
5285
5285
  // src/resources/resource_time_off_additional.ts
5286
- var ResourceTimeOffAdditionalResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
5286
+ var ResourceTimeOffAdditionalResource = class extends _chunkVFLAMMIJcjs.BaseResource {
5287
5287
  constructor(http, pageSize) {
5288
5288
  super(http, {
5289
5289
  key: "resource_time_off_additional",
@@ -5322,7 +5322,7 @@ var ResourceTimeOffAdditionalResource = class extends _chunkSEFJJY4Jcjs.BaseReso
5322
5322
  };
5323
5323
 
5324
5324
  // src/resources/resource_time_off_approvers.ts
5325
- var ResourceTimeOffApproversResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
5325
+ var ResourceTimeOffApproversResource = class extends _chunkVFLAMMIJcjs.BaseResource {
5326
5326
  constructor(http, pageSize) {
5327
5327
  super(http, {
5328
5328
  key: "resource_time_off_approvers",
@@ -5365,29 +5365,29 @@ var ResourceTimeOffApproversResource = class extends _chunkSEFJJY4Jcjs.BaseResou
5365
5365
 
5366
5366
  // src/resources/special/resource_time_off_balances.ts
5367
5367
  async function getByResource2(_resource, resourceId, http) {
5368
- const numericResource = _chunkSEFJJY4Jcjs.parseIdentifier.call(void 0, resourceId, "resourceId");
5368
+ const numericResource = _chunkVFLAMMIJcjs.parseIdentifier.call(void 0, resourceId, "resourceId");
5369
5369
  const res = await http.request({
5370
5370
  method: "GET",
5371
5371
  path: `/V1.0/Resources/${numericResource}/TimeOffBalances`,
5372
5372
  operation: "resource_time_off_balances.getByResource"
5373
5373
  });
5374
- return _chunkSEFJJY4Jcjs.unwrapItems.call(void 0, res, "resource_time_off_balances.getByResource").items;
5374
+ return _chunkVFLAMMIJcjs.unwrapItems.call(void 0, res, "resource_time_off_balances.getByResource").items;
5375
5375
  }
5376
5376
  async function getByYear(_resource, resourceId, year, http) {
5377
- const numericResource = _chunkSEFJJY4Jcjs.parseIdentifier.call(void 0, resourceId, "resourceId");
5377
+ const numericResource = _chunkVFLAMMIJcjs.parseIdentifier.call(void 0, resourceId, "resourceId");
5378
5378
  if (!Number.isSafeInteger(year) || year < 1) {
5379
- throw new (0, _chunkSEFJJY4Jcjs.AutotaskConfigError)("getByYear: year must be a positive integer");
5379
+ throw new (0, _chunkVFLAMMIJcjs.AutotaskConfigError)("getByYear: year must be a positive integer");
5380
5380
  }
5381
5381
  const res = await http.request({
5382
5382
  method: "GET",
5383
5383
  path: `/V1.0/Resources/${numericResource}/TimeOffBalances/${year}`,
5384
5384
  operation: "resource_time_off_balances.getByYear"
5385
5385
  });
5386
- return _chunkSEFJJY4Jcjs.unwrapItem.call(void 0, res, year, "resource_time_off_balances.getByYear", "resource_time_off_balance");
5386
+ return _chunkVFLAMMIJcjs.unwrapItem.call(void 0, res, year, "resource_time_off_balances.getByYear", "resource_time_off_balance");
5387
5387
  }
5388
5388
 
5389
5389
  // src/resources/resource_time_off_balances.ts
5390
- var ResourceTimeOffBalancesResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
5390
+ var ResourceTimeOffBalancesResource = class extends _chunkVFLAMMIJcjs.BaseResource {
5391
5391
  constructor(http, pageSize) {
5392
5392
  super(http, {
5393
5393
  key: "resource_time_off_balances",
@@ -5425,7 +5425,7 @@ var ResourceTimeOffBalancesResource = class extends _chunkSEFJJY4Jcjs.BaseResour
5425
5425
  };
5426
5426
 
5427
5427
  // src/resources/roles.ts
5428
- var RolesResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
5428
+ var RolesResource = class extends _chunkVFLAMMIJcjs.BaseResource {
5429
5429
  constructor(http, pageSize) {
5430
5430
  super(http, {
5431
5431
  key: "roles",
@@ -5492,7 +5492,7 @@ var RolesResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
5492
5492
  };
5493
5493
 
5494
5494
  // src/resources/sales_orders.ts
5495
- var SalesOrdersResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
5495
+ var SalesOrdersResource = class extends _chunkVFLAMMIJcjs.BaseResource {
5496
5496
  constructor(http, pageSize) {
5497
5497
  super(http, {
5498
5498
  key: "sales_orders",
@@ -5535,7 +5535,7 @@ var SalesOrdersResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
5535
5535
  };
5536
5536
 
5537
5537
  // src/resources/service_calls.ts
5538
- var ServiceCallsResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
5538
+ var ServiceCallsResource = class extends _chunkVFLAMMIJcjs.BaseResource {
5539
5539
  constructor(http, pageSize) {
5540
5540
  super(http, {
5541
5541
  key: "service_calls",
@@ -5604,7 +5604,7 @@ var ServiceCallsResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
5604
5604
  };
5605
5605
 
5606
5606
  // src/resources/service_call_task_resources.ts
5607
- var ServiceCallTaskResourcesResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
5607
+ var ServiceCallTaskResourcesResource = class extends _chunkVFLAMMIJcjs.BaseResource {
5608
5608
  constructor(http, pageSize) {
5609
5609
  super(http, {
5610
5610
  key: "service_call_task_resources",
@@ -5661,7 +5661,7 @@ var ServiceCallTaskResourcesResource = class extends _chunkSEFJJY4Jcjs.BaseResou
5661
5661
  };
5662
5662
 
5663
5663
  // src/resources/service_call_tasks.ts
5664
- var ServiceCallTasksResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
5664
+ var ServiceCallTasksResource = class extends _chunkVFLAMMIJcjs.BaseResource {
5665
5665
  constructor(http, pageSize) {
5666
5666
  super(http, {
5667
5667
  key: "service_call_tasks",
@@ -5718,7 +5718,7 @@ var ServiceCallTasksResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
5718
5718
  };
5719
5719
 
5720
5720
  // src/resources/service_call_ticket_resources.ts
5721
- var ServiceCallTicketResourcesResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
5721
+ var ServiceCallTicketResourcesResource = class extends _chunkVFLAMMIJcjs.BaseResource {
5722
5722
  constructor(http, pageSize) {
5723
5723
  super(http, {
5724
5724
  key: "service_call_ticket_resources",
@@ -5775,7 +5775,7 @@ var ServiceCallTicketResourcesResource = class extends _chunkSEFJJY4Jcjs.BaseRes
5775
5775
  };
5776
5776
 
5777
5777
  // src/resources/service_call_tickets.ts
5778
- var ServiceCallTicketsResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
5778
+ var ServiceCallTicketsResource = class extends _chunkVFLAMMIJcjs.BaseResource {
5779
5779
  constructor(http, pageSize) {
5780
5780
  super(http, {
5781
5781
  key: "service_call_tickets",
@@ -5832,7 +5832,7 @@ var ServiceCallTicketsResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
5832
5832
  };
5833
5833
 
5834
5834
  // src/resources/service_level_agreement_results.ts
5835
- var ServiceLevelAgreementResultsResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
5835
+ var ServiceLevelAgreementResultsResource = class extends _chunkVFLAMMIJcjs.BaseResource {
5836
5836
  constructor(http, pageSize) {
5837
5837
  super(http, {
5838
5838
  key: "service_level_agreement_results",
@@ -5871,7 +5871,7 @@ var ServiceLevelAgreementResultsResource = class extends _chunkSEFJJY4Jcjs.BaseR
5871
5871
  };
5872
5872
 
5873
5873
  // src/resources/services.ts
5874
- var ServicesResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
5874
+ var ServicesResource = class extends _chunkVFLAMMIJcjs.BaseResource {
5875
5875
  constructor(http, pageSize) {
5876
5876
  super(http, {
5877
5877
  key: "services",
@@ -5939,7 +5939,7 @@ var ServicesResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
5939
5939
  };
5940
5940
 
5941
5941
  // src/resources/skills.ts
5942
- var SkillsResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
5942
+ var SkillsResource = class extends _chunkVFLAMMIJcjs.BaseResource {
5943
5943
  constructor(http, pageSize) {
5944
5944
  super(http, {
5945
5945
  key: "skills",
@@ -5983,7 +5983,7 @@ var SkillsResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
5983
5983
  };
5984
5984
 
5985
5985
  // src/resources/subscription_periods.ts
5986
- var SubscriptionPeriodsResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
5986
+ var SubscriptionPeriodsResource = class extends _chunkVFLAMMIJcjs.BaseResource {
5987
5987
  constructor(http, pageSize) {
5988
5988
  super(http, {
5989
5989
  key: "subscription_periods",
@@ -6022,7 +6022,7 @@ var SubscriptionPeriodsResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
6022
6022
  };
6023
6023
 
6024
6024
  // src/resources/subscriptions.ts
6025
- var SubscriptionsResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
6025
+ var SubscriptionsResource = class extends _chunkVFLAMMIJcjs.BaseResource {
6026
6026
  constructor(http, pageSize) {
6027
6027
  super(http, {
6028
6028
  key: "subscriptions",
@@ -6091,7 +6091,7 @@ var SubscriptionsResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
6091
6091
  };
6092
6092
 
6093
6093
  // src/resources/survey_results.ts
6094
- var SurveyResultsResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
6094
+ var SurveyResultsResource = class extends _chunkVFLAMMIJcjs.BaseResource {
6095
6095
  constructor(http, pageSize) {
6096
6096
  super(http, {
6097
6097
  key: "survey_results",
@@ -6130,7 +6130,7 @@ var SurveyResultsResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
6130
6130
  };
6131
6131
 
6132
6132
  // src/resources/surveys.ts
6133
- var SurveysResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
6133
+ var SurveysResource = class extends _chunkVFLAMMIJcjs.BaseResource {
6134
6134
  constructor(http, pageSize) {
6135
6135
  super(http, {
6136
6136
  key: "surveys",
@@ -6174,7 +6174,7 @@ var SurveysResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
6174
6174
  };
6175
6175
 
6176
6176
  // src/resources/tag_aliases.ts
6177
- var TagAliasesResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
6177
+ var TagAliasesResource = class extends _chunkVFLAMMIJcjs.BaseResource {
6178
6178
  constructor(http, pageSize) {
6179
6179
  super(http, {
6180
6180
  key: "tag_aliases",
@@ -6231,7 +6231,7 @@ var TagAliasesResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
6231
6231
  };
6232
6232
 
6233
6233
  // src/resources/tag_groups.ts
6234
- var TagGroupsResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
6234
+ var TagGroupsResource = class extends _chunkVFLAMMIJcjs.BaseResource {
6235
6235
  constructor(http, pageSize) {
6236
6236
  super(http, {
6237
6237
  key: "tag_groups",
@@ -6300,7 +6300,7 @@ var TagGroupsResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
6300
6300
  };
6301
6301
 
6302
6302
  // src/resources/tags.ts
6303
- var TagsResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
6303
+ var TagsResource = class extends _chunkVFLAMMIJcjs.BaseResource {
6304
6304
  constructor(http, pageSize) {
6305
6305
  super(http, {
6306
6306
  key: "tags",
@@ -6369,7 +6369,7 @@ var TagsResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
6369
6369
  };
6370
6370
 
6371
6371
  // src/resources/task_secondary_resources.ts
6372
- var TaskSecondaryResourcesResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
6372
+ var TaskSecondaryResourcesResource = class extends _chunkVFLAMMIJcjs.BaseResource {
6373
6373
  constructor(http, pageSize) {
6374
6374
  super(http, {
6375
6375
  key: "task_secondary_resources",
@@ -6426,7 +6426,7 @@ var TaskSecondaryResourcesResource = class extends _chunkSEFJJY4Jcjs.BaseResourc
6426
6426
  };
6427
6427
 
6428
6428
  // src/resources/tasks.ts
6429
- var TasksResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
6429
+ var TasksResource = class extends _chunkVFLAMMIJcjs.BaseResource {
6430
6430
  constructor(http, pageSize) {
6431
6431
  super(http, {
6432
6432
  key: "tasks",
@@ -6490,7 +6490,7 @@ var TasksResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
6490
6490
  };
6491
6491
 
6492
6492
  // src/resources/tax_regions.ts
6493
- var TaxRegionsResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
6493
+ var TaxRegionsResource = class extends _chunkVFLAMMIJcjs.BaseResource {
6494
6494
  constructor(http, pageSize) {
6495
6495
  super(http, {
6496
6496
  key: "tax_regions",
@@ -6560,7 +6560,7 @@ var ThresholdInformationResource = class {
6560
6560
  };
6561
6561
 
6562
6562
  // src/resources/ticket_additional_configuration_items.ts
6563
- var TicketAdditionalConfigurationItemsResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
6563
+ var TicketAdditionalConfigurationItemsResource = class extends _chunkVFLAMMIJcjs.BaseResource {
6564
6564
  constructor(http, pageSize) {
6565
6565
  super(http, {
6566
6566
  key: "ticket_additional_configuration_items",
@@ -6617,7 +6617,7 @@ var TicketAdditionalConfigurationItemsResource = class extends _chunkSEFJJY4Jcjs
6617
6617
  };
6618
6618
 
6619
6619
  // src/resources/ticket_additional_contacts.ts
6620
- var TicketAdditionalContactsResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
6620
+ var TicketAdditionalContactsResource = class extends _chunkVFLAMMIJcjs.BaseResource {
6621
6621
  constructor(http, pageSize) {
6622
6622
  super(http, {
6623
6623
  key: "ticket_additional_contacts",
@@ -6674,7 +6674,7 @@ var TicketAdditionalContactsResource = class extends _chunkSEFJJY4Jcjs.BaseResou
6674
6674
  };
6675
6675
 
6676
6676
  // src/resources/ticket_attachments.ts
6677
- var TicketAttachmentsResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
6677
+ var TicketAttachmentsResource = class extends _chunkVFLAMMIJcjs.BaseResource {
6678
6678
  constructor(http, pageSize) {
6679
6679
  super(http, {
6680
6680
  key: "ticket_attachments",
@@ -6736,7 +6736,7 @@ var TicketAttachmentsResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
6736
6736
  };
6737
6737
 
6738
6738
  // src/resources/ticket_categories.ts
6739
- var TicketCategoriesResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
6739
+ var TicketCategoriesResource = class extends _chunkVFLAMMIJcjs.BaseResource {
6740
6740
  constructor(http, pageSize) {
6741
6741
  super(http, {
6742
6742
  key: "ticket_categories",
@@ -6795,7 +6795,7 @@ var TicketCategoriesResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
6795
6795
  };
6796
6796
 
6797
6797
  // src/resources/ticket_category_field_defaults.ts
6798
- var TicketCategoryFieldDefaultsResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
6798
+ var TicketCategoryFieldDefaultsResource = class extends _chunkVFLAMMIJcjs.BaseResource {
6799
6799
  constructor(http, pageSize) {
6800
6800
  super(http, {
6801
6801
  key: "ticket_category_field_defaults",
@@ -6837,7 +6837,7 @@ var TicketCategoryFieldDefaultsResource = class extends _chunkSEFJJY4Jcjs.BaseRe
6837
6837
  };
6838
6838
 
6839
6839
  // src/resources/ticket_change_request_approvals.ts
6840
- var TicketChangeRequestApprovalsResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
6840
+ var TicketChangeRequestApprovalsResource = class extends _chunkVFLAMMIJcjs.BaseResource {
6841
6841
  constructor(http, pageSize) {
6842
6842
  super(http, {
6843
6843
  key: "ticket_change_request_approvals",
@@ -6898,13 +6898,13 @@ var OP = "ticket_charges.moveToTicket";
6898
6898
  var COPY = ["name", "description", "chargeType", "billingCodeID", "productID", "unitQuantity", "unitCost", "unitPrice", "datePurchased", "isBillableToCompany", "notes", "purchaseOrderNumber", "internalPurchaseOrderNumber"];
6899
6899
  var CONTRACT_SCOPED = ["contractServiceID", "contractServiceBundleID"];
6900
6900
  async function readCharge(http, id, retries) {
6901
- const rows = await _chunkSEFJJY4Jcjs.queryRows.call(void 0, http, "TicketCharges", [{ field: "id", op: "eq", value: id }], OP, retries);
6901
+ const rows = await _chunkVFLAMMIJcjs.queryRows.call(void 0, http, "TicketCharges", [{ field: "id", op: "eq", value: id }], OP, retries);
6902
6902
  return _nullishCoalesce(rows[0], () => ( null));
6903
6903
  }
6904
6904
  async function checkSource({ http, source, sourceId, sourceTicketId, toTicketId }) {
6905
6905
  if (source.isBilled === true) {
6906
- throw _chunkSEFJJY4Jcjs.refuse.call(void 0, "MOVE_BLOCKED_BILLED", `${OP}: ticket charge ${sourceId} is billed \u2014 move it in the Autotask UI`, { sourceId, toTicketId }, OP, {
6907
- manualAction: { action: "delete_source", uiLink: _chunkSEFJJY4Jcjs.uiLinkFor.call(void 0, http, "tickets", sourceTicketId), reason: "billed charges are not moved by the API (the ticket link opens its charges)" }
6906
+ throw _chunkVFLAMMIJcjs.refuse.call(void 0, "MOVE_BLOCKED_BILLED", `${OP}: ticket charge ${sourceId} is billed \u2014 move it in the Autotask UI`, { sourceId, toTicketId }, OP, {
6907
+ manualAction: { action: "delete_source", uiLink: _chunkVFLAMMIJcjs.uiLinkFor.call(void 0, http, "tickets", sourceTicketId), reason: "billed charges are not moved by the API (the ticket link opens its charges)" }
6908
6908
  });
6909
6909
  }
6910
6910
  }
@@ -6938,14 +6938,14 @@ var SPEC = {
6938
6938
  ]
6939
6939
  }),
6940
6940
  // charges have no ExecuteCommand code: the parent ticket is the closest clickable target
6941
- manualLink: (http, source) => typeof source.ticketID === "number" ? _chunkSEFJJY4Jcjs.uiLinkFor.call(void 0, http, "tickets", source.ticketID) : null
6941
+ manualLink: (http, source) => typeof source.ticketID === "number" ? _chunkVFLAMMIJcjs.uiLinkFor.call(void 0, http, "tickets", source.ticketID) : null
6942
6942
  };
6943
6943
  function moveToTicket(_resource, sourceId, toTicketId, opts, http) {
6944
- return _chunkSEFJJY4Jcjs.runMove.call(void 0, http, SPEC, sourceId, toTicketId, opts);
6944
+ return _chunkVFLAMMIJcjs.runMove.call(void 0, http, SPEC, sourceId, toTicketId, opts);
6945
6945
  }
6946
6946
 
6947
6947
  // src/resources/ticket_charges.ts
6948
- var TicketChargesResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
6948
+ var TicketChargesResource = class extends _chunkVFLAMMIJcjs.BaseResource {
6949
6949
  constructor(http, pageSize) {
6950
6950
  super(http, {
6951
6951
  key: "ticket_charges",
@@ -7020,7 +7020,7 @@ var TicketChargesResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
7020
7020
  };
7021
7021
 
7022
7022
  // src/resources/ticket_checklist_items.ts
7023
- var TicketChecklistItemsResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
7023
+ var TicketChecklistItemsResource = class extends _chunkVFLAMMIJcjs.BaseResource {
7024
7024
  constructor(http, pageSize) {
7025
7025
  super(http, {
7026
7026
  key: "ticket_checklist_items",
@@ -7086,7 +7086,7 @@ var TicketChecklistItemsResource = class extends _chunkSEFJJY4Jcjs.BaseResource
7086
7086
  };
7087
7087
 
7088
7088
  // src/resources/ticket_checklist_libraries.ts
7089
- var TicketChecklistLibrariesResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
7089
+ var TicketChecklistLibrariesResource = class extends _chunkVFLAMMIJcjs.BaseResource {
7090
7090
  constructor(http, pageSize) {
7091
7091
  super(http, {
7092
7092
  key: "ticket_checklist_libraries",
@@ -7110,9 +7110,9 @@ var TicketChecklistLibrariesResource = class extends _chunkSEFJJY4Jcjs.BaseResou
7110
7110
  * `dryRun: true` returns the pinned envelope (document existence is unverifiable in the MVP
7111
7111
  * surface — no documents read op — and never issues the POST). */
7112
7112
  async attachToDocument(documentID, data, opts = {}) {
7113
- const n = _chunkSEFJJY4Jcjs.parseIdentifier.call(void 0, documentID, "documentID");
7113
+ const n = _chunkVFLAMMIJcjs.parseIdentifier.call(void 0, documentID, "documentID");
7114
7114
  if (opts.dryRun === true) {
7115
- return _chunkSEFJJY4Jcjs.buildDryRunResult.call(void 0, {
7115
+ return _chunkVFLAMMIJcjs.buildDryRunResult.call(void 0, {
7116
7116
  operation: "ticket_checklist_libraries.attachToDocument",
7117
7117
  method: "POST",
7118
7118
  path: `/V1.0/Documents/${n}/ChecklistLibraries`,
@@ -7130,7 +7130,7 @@ var TicketChecklistLibrariesResource = class extends _chunkSEFJJY4Jcjs.BaseResou
7130
7130
  operation: "ticket_checklist_libraries.attachToDocument",
7131
7131
  maxRetries: opts.maxRetries
7132
7132
  });
7133
- return _chunkSEFJJY4Jcjs.unwrapOperation.call(void 0, res);
7133
+ return _chunkVFLAMMIJcjs.unwrapOperation.call(void 0, res);
7134
7134
  }
7135
7135
  /** Resolve a TicketChecklistLibrary from a numeric id (or, where the vendor indexes a primary text field,
7136
7136
  * from a numeric id — this resource has no primary text field). A numeric id miss throws NOT_FOUND;
@@ -7146,7 +7146,7 @@ var TicketChecklistLibrariesResource = class extends _chunkSEFJJY4Jcjs.BaseResou
7146
7146
  };
7147
7147
 
7148
7148
  // src/resources/ticket_history.ts
7149
- var TicketHistoryResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
7149
+ var TicketHistoryResource = class extends _chunkVFLAMMIJcjs.BaseResource {
7150
7150
  constructor(http, pageSize) {
7151
7151
  super(http, {
7152
7152
  key: "ticket_history",
@@ -7185,7 +7185,7 @@ var TicketHistoryResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
7185
7185
  };
7186
7186
 
7187
7187
  // src/resources/ticket_note_attachments.ts
7188
- var TicketNoteAttachmentsResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
7188
+ var TicketNoteAttachmentsResource = class extends _chunkVFLAMMIJcjs.BaseResource {
7189
7189
  constructor(http, pageSize) {
7190
7190
  super(http, {
7191
7191
  key: "ticket_note_attachments",
@@ -7247,7 +7247,7 @@ var TicketNoteAttachmentsResource = class extends _chunkSEFJJY4Jcjs.BaseResource
7247
7247
  };
7248
7248
 
7249
7249
  // src/resources/ticket_notes.ts
7250
- var TicketNotesResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
7250
+ var TicketNotesResource = class extends _chunkVFLAMMIJcjs.BaseResource {
7251
7251
  constructor(http, pageSize) {
7252
7252
  super(http, {
7253
7253
  key: "ticket_notes",
@@ -7306,7 +7306,7 @@ var TicketNotesResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
7306
7306
  };
7307
7307
 
7308
7308
  // src/resources/ticket_note_webhooks.ts
7309
- var TicketNoteWebhooksResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
7309
+ var TicketNoteWebhooksResource = class extends _chunkVFLAMMIJcjs.BaseResource {
7310
7310
  constructor(http, pageSize) {
7311
7311
  super(http, {
7312
7312
  key: "ticket_note_webhooks",
@@ -7382,7 +7382,7 @@ var TicketNoteWebhooksResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
7382
7382
  };
7383
7383
 
7384
7384
  // src/resources/ticket_secondary_resources.ts
7385
- var TicketSecondaryResourcesResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
7385
+ var TicketSecondaryResourcesResource = class extends _chunkVFLAMMIJcjs.BaseResource {
7386
7386
  constructor(http, pageSize) {
7387
7387
  super(http, {
7388
7388
  key: "ticket_secondary_resources",
@@ -7447,9 +7447,9 @@ async function fetchTicket(http, id, operation) {
7447
7447
  });
7448
7448
  const body = res;
7449
7449
  if (body === null || !("item" in body)) {
7450
- throw new (0, _chunkSEFJJY4Jcjs.NotFoundError)(`Ticket ${id} not found (unexpected envelope shape)`, { resourceIds: [id], details: { idRefs: [{ entity: "ticket", id }] } });
7450
+ throw new (0, _chunkVFLAMMIJcjs.NotFoundError)(`Ticket ${id} not found (unexpected envelope shape)`, { resourceIds: [id], details: { idRefs: [{ entity: "ticket", id }] } });
7451
7451
  }
7452
- if (body.item === null || body.item === void 0) throw new (0, _chunkSEFJJY4Jcjs.NotFoundError)(`Ticket ${id} not found`, { resourceIds: [id], details: { idRefs: [{ entity: "ticket", id }] } });
7452
+ if (body.item === null || body.item === void 0) throw new (0, _chunkVFLAMMIJcjs.NotFoundError)(`Ticket ${id} not found`, { resourceIds: [id], details: { idRefs: [{ entity: "ticket", id }] } });
7453
7453
  return body.item;
7454
7454
  }
7455
7455
  async function ticketQueryItems(http, path, filter, maxRecords, operation) {
@@ -7460,7 +7460,7 @@ async function ticketQueryItems(http, path, filter, maxRecords, operation) {
7460
7460
  body: { MaxRecords: maxRecords, filter },
7461
7461
  operation
7462
7462
  });
7463
- return _chunkSEFJJY4Jcjs.unwrapItems.call(void 0, res).items;
7463
+ return _chunkVFLAMMIJcjs.unwrapItems.call(void 0, res).items;
7464
7464
  }
7465
7465
  function truncate(text, limit) {
7466
7466
  const full = _nullishCoalesce(text, () => ( ""));
@@ -7470,26 +7470,26 @@ function truncate(text, limit) {
7470
7470
 
7471
7471
  // src/resources/special/tickets/childRead.ts
7472
7472
  function isRouteUnavailable(err) {
7473
- return _chunkSEFJJY4Jcjs.isAutotaskError.call(void 0, err) && (err.httpStatus === 404 || err.httpStatus === 500);
7473
+ return _chunkVFLAMMIJcjs.isAutotaskError.call(void 0, err) && (err.httpStatus === 404 || err.httpStatus === 500);
7474
7474
  }
7475
7475
  function routeFact(route, path, err) {
7476
7476
  return {
7477
7477
  route,
7478
7478
  path,
7479
- httpStatus: _chunkSEFJJY4Jcjs.isAutotaskError.call(void 0, err) && typeof err.httpStatus === "number" ? err.httpStatus : null
7479
+ httpStatus: _chunkVFLAMMIJcjs.isAutotaskError.call(void 0, err) && typeof err.httpStatus === "number" ? err.httpStatus : null
7480
7480
  };
7481
7481
  }
7482
7482
  function childDeclaresQuery(resourceKey) {
7483
- return _chunkVEOSOIU4cjs.CAPABILITIES.some(
7483
+ return _chunk5BDUMDAQcjs.CAPABILITIES.some(
7484
7484
  (c) => c.id === `${resourceKey}.query` && (c.status === "implemented" || c.status === "tested")
7485
7485
  );
7486
7486
  }
7487
7487
  function planScopedPath(resourceKey, ticketId) {
7488
7488
  if (!childDeclaresQuery(resourceKey)) return null;
7489
- const entry = _chunkSEFJJY4Jcjs.RELATIONSHIP_MAP[resourceKey];
7489
+ const entry = _chunkVFLAMMIJcjs.RELATIONSHIP_MAP[resourceKey];
7490
7490
  const parent = entry === void 0 ? null : entry.parent;
7491
7491
  if (parent === null || parent.resource !== "tickets" || parent.segment === null || parent.field === null) return null;
7492
- const parentPath = _optionalChain([_chunkSEFJJY4Jcjs.RELATIONSHIP_MAP, 'access', _158 => _158[parent.resource], 'optionalAccess', _159 => _159.path]);
7492
+ const parentPath = _optionalChain([_chunkVFLAMMIJcjs.RELATIONSHIP_MAP, 'access', _158 => _158[parent.resource], 'optionalAccess', _159 => _159.path]);
7493
7493
  if (parentPath === null || parentPath === void 0) return null;
7494
7494
  return `/V1.0/${parentPath}/${ticketId}/${parent.segment}`;
7495
7495
  }
@@ -7528,14 +7528,14 @@ async function scopedCollectionRead(http, startPath, limit, operation, accept) {
7528
7528
  break;
7529
7529
  }
7530
7530
  const body = await http.request({ method: "GET", path: target, operation });
7531
- const { items: pageItems, pageDetails } = _chunkSEFJJY4Jcjs.unwrapItems.call(void 0, body, operation);
7531
+ const { items: pageItems, pageDetails } = _chunkVFLAMMIJcjs.unwrapItems.call(void 0, body, operation);
7532
7532
  nextCursor = pageDetails.nextPageUrl;
7533
7533
  pages += 1;
7534
7534
  const window = pageItems.slice(0, Math.max(0, limit - items.length));
7535
7535
  for (const row of window) if (accept(row)) items.push(row);
7536
7536
  if (items.length >= limit) break;
7537
7537
  if (nextCursor === null || pageItems.length === 0) break;
7538
- target = _chunkSEFJJY4Jcjs.cursorToPath.call(void 0, http.baseUrl, nextCursor);
7538
+ target = _chunkVFLAMMIJcjs.cursorToPath.call(void 0, http.baseUrl, nextCursor);
7539
7539
  }
7540
7540
  const capped = items.length >= limit || guard && nextCursor !== null;
7541
7541
  return { items, capped };
@@ -7568,7 +7568,7 @@ var MS = 864e5;
7568
7568
  var SLA_PAGE = 100;
7569
7569
  async function slaHealthCheck(_resource, id, opts = {}, http) {
7570
7570
  void opts;
7571
- const ticketId = _chunkSEFJJY4Jcjs.parseIdentifier.call(void 0, id, "id");
7571
+ const ticketId = _chunkVFLAMMIJcjs.parseIdentifier.call(void 0, id, "id");
7572
7572
  await fetchTicket(http, ticketId, "tickets.slaHealthCheck");
7573
7573
  const rows = await ticketQueryItems(
7574
7574
  http,
@@ -7593,9 +7593,9 @@ async function slaHealthCheck(_resource, id, opts = {}, http) {
7593
7593
  async function summary(_resource, id, opts = {}, http) {
7594
7594
  const limit = opts.summaryTextLimit === void 0 ? 500 : Math.trunc(opts.summaryTextLimit);
7595
7595
  if (!Number.isInteger(limit) || limit < 1) {
7596
- throw new (0, _chunkSEFJJY4Jcjs.AutotaskConfigError)(`summaryTextLimit must be an integer >= 1 (got ${String(opts.summaryTextLimit)})`);
7596
+ throw new (0, _chunkVFLAMMIJcjs.AutotaskConfigError)(`summaryTextLimit must be an integer >= 1 (got ${String(opts.summaryTextLimit)})`);
7597
7597
  }
7598
- const ticketId = _chunkSEFJJY4Jcjs.parseIdentifier.call(void 0, id, "id");
7598
+ const ticketId = _chunkVFLAMMIJcjs.parseIdentifier.call(void 0, id, "id");
7599
7599
  const ticket = await fetchTicket(http, ticketId, "tickets.summary");
7600
7600
  const desc = truncate(ticket.description, limit);
7601
7601
  const now = _nullishCoalesce(opts.now, () => ( /* @__PURE__ */ new Date()));
@@ -7624,11 +7624,11 @@ async function summary(_resource, id, opts = {}, http) {
7624
7624
  // src/resources/special/tickets/timeline.ts
7625
7625
  function validateTimelineLimits(opts) {
7626
7626
  const limit = opts.limit === void 0 ? 100 : Math.trunc(opts.limit);
7627
- if (!Number.isInteger(limit) || limit < 1) throw new (0, _chunkSEFJJY4Jcjs.AutotaskConfigError)(`limit must be an integer >= 1 (got ${String(opts.limit)})`);
7627
+ if (!Number.isInteger(limit) || limit < 1) throw new (0, _chunkVFLAMMIJcjs.AutotaskConfigError)(`limit must be an integer >= 1 (got ${String(opts.limit)})`);
7628
7628
  const bounded = Math.min(limit, 500);
7629
7629
  const textLimit = opts.textLimit === void 0 ? 500 : Math.trunc(opts.textLimit);
7630
7630
  if (!Number.isInteger(textLimit) || textLimit < 1) {
7631
- throw new (0, _chunkSEFJJY4Jcjs.AutotaskConfigError)(`textLimit must be an integer >= 1 (got ${String(opts.textLimit)})`);
7631
+ throw new (0, _chunkVFLAMMIJcjs.AutotaskConfigError)(`textLimit must be an integer >= 1 (got ${String(opts.textLimit)})`);
7632
7632
  }
7633
7633
  return { bounded, textLimit };
7634
7634
  }
@@ -7680,7 +7680,7 @@ function compareEventDates(a, b) {
7680
7680
  }
7681
7681
  async function timeline(_resource, id, opts = {}, http) {
7682
7682
  const { bounded, textLimit } = validateTimelineLimits(opts);
7683
- const ticketId = _chunkSEFJJY4Jcjs.parseIdentifier.call(void 0, id, "id");
7683
+ const ticketId = _chunkVFLAMMIJcjs.parseIdentifier.call(void 0, id, "id");
7684
7684
  await fetchTicket(http, ticketId, "tickets.timeline");
7685
7685
  const dateFilters = (field) => {
7686
7686
  const f = [{ field: "ticketID", op: "eq", value: ticketId }];
@@ -7720,7 +7720,7 @@ async function timeline(_resource, id, opts = {}, http) {
7720
7720
  }
7721
7721
 
7722
7722
  // src/resources/special/tickets/errors.ts
7723
- var QueueRequiredError = class extends _chunkSEFJJY4Jcjs.AutotaskError {
7723
+ var QueueRequiredError = class extends _chunkVFLAMMIJcjs.AutotaskError {
7724
7724
  constructor(message, options = {}) {
7725
7725
  super(message, {
7726
7726
  code: "QUEUE_REQUIRED",
@@ -7731,13 +7731,13 @@ var QueueRequiredError = class extends _chunkSEFJJY4Jcjs.AutotaskError {
7731
7731
  this.name = "QueueRequiredError";
7732
7732
  }
7733
7733
  };
7734
- var TicketResourceInvalidError = class extends _chunkSEFJJY4Jcjs.AutotaskError {
7734
+ var TicketResourceInvalidError = class extends _chunkVFLAMMIJcjs.AutotaskError {
7735
7735
  constructor(message, options = {}) {
7736
7736
  super(message, { code: "RESOURCE_INVALID", category: "validation", ...options });
7737
7737
  this.name = "TicketResourceInvalidError";
7738
7738
  }
7739
7739
  };
7740
- var TicketCreateValidationFailedError = class extends _chunkSEFJJY4Jcjs.AutotaskError {
7740
+ var TicketCreateValidationFailedError = class extends _chunkVFLAMMIJcjs.AutotaskError {
7741
7741
  /** The vendor-named fields (empty when the 500 body named nothing parseable). */
7742
7742
 
7743
7743
  constructor(message, vendorFields, options = {}) {
@@ -7746,7 +7746,7 @@ var TicketCreateValidationFailedError = class extends _chunkSEFJJY4Jcjs.Autotask
7746
7746
  this.vendorFields = vendorFields;
7747
7747
  }
7748
7748
  };
7749
- var StatusUnknownError = class extends _chunkSEFJJY4Jcjs.AutotaskError {
7749
+ var StatusUnknownError = class extends _chunkVFLAMMIJcjs.AutotaskError {
7750
7750
  /** The live picklist size (the message names it; the values + labels are via operations.fieldCatalog with labels: true). */
7751
7751
 
7752
7752
  constructor(message, options = {}) {
@@ -7760,7 +7760,7 @@ var StatusUnknownError = class extends _chunkSEFJJY4Jcjs.AutotaskError {
7760
7760
  this.picklistCount = _nullishCoalesce(options.picklistCount, () => ( 0));
7761
7761
  }
7762
7762
  };
7763
- var StatusFieldsRequiredError = class extends _chunkSEFJJY4Jcjs.AutotaskError {
7763
+ var StatusFieldsRequiredError = class extends _chunkVFLAMMIJcjs.AutotaskError {
7764
7764
 
7765
7765
 
7766
7766
 
@@ -7783,14 +7783,14 @@ function isPositiveInt(v) {
7783
7783
  return typeof v === "number" && Number.isInteger(v) && v > 0;
7784
7784
  }
7785
7785
  function namedVendorFields(err) {
7786
- if (!_chunkSEFJJY4Jcjs.isAutotaskError.call(void 0, err) || err.vendorError === void 0) return [];
7787
- const entries = _nullishCoalesce(_chunkSEFJJY4Jcjs.parseVendorErrors.call(void 0, err.vendorError), () => ( []));
7786
+ if (!_chunkVFLAMMIJcjs.isAutotaskError.call(void 0, err) || err.vendorError === void 0) return [];
7787
+ const entries = _nullishCoalesce(_chunkVFLAMMIJcjs.parseVendorErrors.call(void 0, err.vendorError), () => ( []));
7788
7788
  const out = /* @__PURE__ */ new Set();
7789
7789
  for (const e of entries) if (e.field !== void 0) out.add(e.field);
7790
7790
  return [...out];
7791
7791
  }
7792
7792
  function vendorDetailOf(err) {
7793
- return _chunkSEFJJY4Jcjs.isAutotaskError.call(void 0, err) ? _chunkSEFJJY4Jcjs.formatVendorDetail.call(void 0, err.vendorError) : void 0;
7793
+ return _chunkVFLAMMIJcjs.isAutotaskError.call(void 0, err) ? _chunkVFLAMMIJcjs.formatVendorDetail.call(void 0, err.vendorError) : void 0;
7794
7794
  }
7795
7795
  async function fetchItem(http, path, operation, readOpts) {
7796
7796
  const res = await http.request({ method: "GET", path, operation, maxRetries: _optionalChain([readOpts, 'optionalAccess', _160 => _160.maxRetries]) });
@@ -7811,8 +7811,8 @@ function operationId(res) {
7811
7811
  return typeof body.itemId === "number" ? body.itemId : typeof body.id === "number" ? body.id : void 0;
7812
7812
  }
7813
7813
  function discoveryMerge(err, body, defaults) {
7814
- if (!_chunkSEFJJY4Jcjs.isAutotaskError.call(void 0, err) || err.vendorError === void 0) return null;
7815
- const entries = _chunkSEFJJY4Jcjs.parseVendorErrors.call(void 0, err.vendorError);
7814
+ if (!_chunkVFLAMMIJcjs.isAutotaskError.call(void 0, err) || err.vendorError === void 0) return null;
7815
+ const entries = _chunkVFLAMMIJcjs.parseVendorErrors.call(void 0, err.vendorError);
7816
7816
  if (entries === void 0) return null;
7817
7817
  for (const entry of entries) {
7818
7818
  const field = entry.field;
@@ -7824,7 +7824,7 @@ function discoveryMerge(err, body, defaults) {
7824
7824
  }
7825
7825
  function stepErrorText(code, err) {
7826
7826
  const detail = vendorDetailOf(err);
7827
- const base = _chunkSEFJJY4Jcjs.isAutotaskError.call(void 0, err) ? err.message : String(err);
7827
+ const base = _chunkVFLAMMIJcjs.isAutotaskError.call(void 0, err) ? err.message : String(err);
7828
7828
  return detail ? `${code}: ${detail}` : `${code}: ${base}`;
7829
7829
  }
7830
7830
 
@@ -7836,43 +7836,43 @@ var DEFAULT_PUBLISH = 1;
7836
7836
  var PUBLISH_VALUES = /* @__PURE__ */ new Set([1, 2, 4]);
7837
7837
  var SAFE_TICKET_CREATE_DEFAULTS = {};
7838
7838
  function validateOpenInput(params, note, assign) {
7839
- const companyID = _chunkSEFJJY4Jcjs.parseIdentifier.call(void 0, _optionalChain([params, 'optionalAccess', _162 => _162.companyID]), "params.companyID");
7839
+ const companyID = _chunkVFLAMMIJcjs.parseIdentifier.call(void 0, _optionalChain([params, 'optionalAccess', _162 => _162.companyID]), "params.companyID");
7840
7840
  const title = _optionalChain([params, 'optionalAccess', _163 => _163.title]);
7841
7841
  if (typeof title !== "string" || title.trim() === "") {
7842
- throw new (0, _chunkSEFJJY4Jcjs.AutotaskConfigError)("openWithNoteAndAssign: params.title is required (a non-empty string)", { operation: OP_OPEN });
7842
+ throw new (0, _chunkVFLAMMIJcjs.AutotaskConfigError)("openWithNoteAndAssign: params.title is required (a non-empty string)", { operation: OP_OPEN });
7843
7843
  }
7844
7844
  const priority = _nullishCoalesce(params.priority, () => ( DEFAULT_TICKET_PRIORITY));
7845
7845
  const status = _nullishCoalesce(params.status, () => ( DEFAULT_TICKET_STATUS));
7846
7846
  if (!isPositiveInt(priority)) {
7847
- throw new (0, _chunkSEFJJY4Jcjs.AutotaskConfigError)(`openWithNoteAndAssign: params.priority must be a positive integer (got ${String(params.priority)})`, { operation: OP_OPEN });
7847
+ throw new (0, _chunkVFLAMMIJcjs.AutotaskConfigError)(`openWithNoteAndAssign: params.priority must be a positive integer (got ${String(params.priority)})`, { operation: OP_OPEN });
7848
7848
  }
7849
7849
  if (!isPositiveInt(status)) {
7850
- throw new (0, _chunkSEFJJY4Jcjs.AutotaskConfigError)(`openWithNoteAndAssign: params.status must be a positive integer (got ${String(params.status)})`, { operation: OP_OPEN });
7850
+ throw new (0, _chunkVFLAMMIJcjs.AutotaskConfigError)(`openWithNoteAndAssign: params.status must be a positive integer (got ${String(params.status)})`, { operation: OP_OPEN });
7851
7851
  }
7852
7852
  if (params.queueID !== void 0 && !isPositiveInt(params.queueID)) {
7853
- throw new (0, _chunkSEFJJY4Jcjs.AutotaskConfigError)(`openWithNoteAndAssign: params.queueID must be a positive integer (got ${String(params.queueID)})`, { operation: OP_OPEN });
7853
+ throw new (0, _chunkVFLAMMIJcjs.AutotaskConfigError)(`openWithNoteAndAssign: params.queueID must be a positive integer (got ${String(params.queueID)})`, { operation: OP_OPEN });
7854
7854
  }
7855
7855
  if (note !== void 0) {
7856
7856
  if (typeof note.description !== "string" || note.description.trim() === "") {
7857
- throw new (0, _chunkSEFJJY4Jcjs.AutotaskConfigError)("openWithNoteAndAssign: note.description is required (a non-empty string)", { operation: OP_OPEN });
7857
+ throw new (0, _chunkVFLAMMIJcjs.AutotaskConfigError)("openWithNoteAndAssign: note.description is required (a non-empty string)", { operation: OP_OPEN });
7858
7858
  }
7859
7859
  if (typeof note.title !== "string" || note.title.trim() === "") {
7860
- throw new (0, _chunkSEFJJY4Jcjs.AutotaskConfigError)("openWithNoteAndAssign: note.title is required (a non-empty string) \u2014 the ww29 scoped note create 500s without it (S12-A live-verified: Missing Required Field: title; the S11-B proven note body is { title, description, noteType: 1, publish: 1 })", { operation: OP_OPEN });
7860
+ throw new (0, _chunkVFLAMMIJcjs.AutotaskConfigError)("openWithNoteAndAssign: note.title is required (a non-empty string) \u2014 the ww29 scoped note create 500s without it (S12-A live-verified: Missing Required Field: title; the S11-B proven note body is { title, description, noteType: 1, publish: 1 })", { operation: OP_OPEN });
7861
7861
  }
7862
7862
  if (note.noteType !== void 0 && !isPositiveInt(note.noteType)) {
7863
- throw new (0, _chunkSEFJJY4Jcjs.AutotaskConfigError)(`openWithNoteAndAssign: note.noteType must be a positive integer (got ${String(note.noteType)})`, { operation: OP_OPEN });
7863
+ throw new (0, _chunkVFLAMMIJcjs.AutotaskConfigError)(`openWithNoteAndAssign: note.noteType must be a positive integer (got ${String(note.noteType)})`, { operation: OP_OPEN });
7864
7864
  }
7865
7865
  if (note.publish !== void 0 && !PUBLISH_VALUES.has(note.publish)) {
7866
- throw new (0, _chunkSEFJJY4Jcjs.AutotaskConfigError)(`openWithNoteAndAssign: note.publish must be an integer picklist value 1/2/4 (got ${String(note.publish)} \u2014 NOT a boolean)`, { operation: OP_OPEN });
7866
+ throw new (0, _chunkVFLAMMIJcjs.AutotaskConfigError)(`openWithNoteAndAssign: note.publish must be an integer picklist value 1/2/4 (got ${String(note.publish)} \u2014 NOT a boolean)`, { operation: OP_OPEN });
7867
7867
  }
7868
7868
  }
7869
- const assignee = assign === void 0 ? void 0 : _chunkSEFJJY4Jcjs.parseIdentifier.call(void 0, assign.resourceID, "assign.resourceID");
7869
+ const assignee = assign === void 0 ? void 0 : _chunkVFLAMMIJcjs.parseIdentifier.call(void 0, assign.resourceID, "assign.resourceID");
7870
7870
  if (assign !== void 0 && assignee !== void 0 && (typeof assignee === "number" ? assignee < 1 : false)) {
7871
- throw new (0, _chunkSEFJJY4Jcjs.AutotaskConfigError)(`openWithNoteAndAssign: assign.resourceID must be a positive integer (got ${String(assignee)})`, { operation: OP_OPEN });
7871
+ throw new (0, _chunkVFLAMMIJcjs.AutotaskConfigError)(`openWithNoteAndAssign: assign.resourceID must be a positive integer (got ${String(assignee)})`, { operation: OP_OPEN });
7872
7872
  }
7873
7873
  const roleID = _optionalChain([assign, 'optionalAccess', _164 => _164.roleID]);
7874
7874
  if (assign !== void 0 && !isPositiveInt(roleID)) {
7875
- throw new (0, _chunkSEFJJY4Jcjs.AutotaskConfigError)("openWithNoteAndAssign: assign.roleID is required (a positive integer) \u2014 the ww29 vendor requires BOTH assignedResourceID and assignedResourceRoleID when assigning a resource (S12-A live-verified: Data violation: When assigning a Resource, you must assign both a assignedResourceID and assignedResourceRoleID)", { operation: OP_OPEN });
7875
+ throw new (0, _chunkVFLAMMIJcjs.AutotaskConfigError)("openWithNoteAndAssign: assign.roleID is required (a positive integer) \u2014 the ww29 vendor requires BOTH assignedResourceID and assignedResourceRoleID when assigning a resource (S12-A live-verified: Data violation: When assigning a Resource, you must assign both a assignedResourceID and assignedResourceRoleID)", { operation: OP_OPEN });
7876
7876
  }
7877
7877
  return { companyID, title, priority, status, assignee, roleID };
7878
7878
  }
@@ -7901,7 +7901,7 @@ function openDryRun(http, v, params, assign, body, noteBody) {
7901
7901
  if (assign !== void 0) {
7902
7902
  warnings.push(`the assignment is the v0.6.0 MERGE update (unredacted GET + collection PUT, 2 wire) setting assignedResourceID ${String(assignee)} + assignedResourceRoleID ${String(roleID)} (the vendor requires both \u2014 S12-A live-verified); a failure lands in steps[] as ASSIGN_FAILED (the applied ticketId is still returned).`);
7903
7903
  }
7904
- return _chunkSEFJJY4Jcjs.buildDryRunResult.call(void 0,
7904
+ return _chunkVFLAMMIJcjs.buildDryRunResult.call(void 0,
7905
7905
  {
7906
7906
  operation: OP_OPEN,
7907
7907
  method: "POST",
@@ -7941,8 +7941,8 @@ async function createTicketWithDiscovery(resource, params, companyID, body, step
7941
7941
  `openWithNoteAndAssign: the vendor rejected the ticket create naming 'queueID' (the ww29 live-required set is { title, status, priority, companyID, queueID }) and the node never guesses a queue${detail ? ` \u2014 ${detail}` : ""}`,
7942
7942
  {
7943
7943
  operation: OP_OPEN,
7944
- httpStatus: _chunkSEFJJY4Jcjs.isAutotaskError.call(void 0, err) ? err.httpStatus : void 0,
7945
- vendorError: _chunkSEFJJY4Jcjs.isAutotaskError.call(void 0, err) ? err.vendorError : void 0
7944
+ httpStatus: _chunkVFLAMMIJcjs.isAutotaskError.call(void 0, err) ? err.httpStatus : void 0,
7945
+ vendorError: _chunkVFLAMMIJcjs.isAutotaskError.call(void 0, err) ? err.vendorError : void 0
7946
7946
  }
7947
7947
  );
7948
7948
  }
@@ -7957,8 +7957,8 @@ async function createTicketWithDiscovery(resource, params, companyID, body, step
7957
7957
  named,
7958
7958
  {
7959
7959
  operation: OP_OPEN,
7960
- httpStatus: _chunkSEFJJY4Jcjs.isAutotaskError.call(void 0, err) ? err.httpStatus : void 0,
7961
- vendorError: _chunkSEFJJY4Jcjs.isAutotaskError.call(void 0, err) ? err.vendorError : void 0,
7960
+ httpStatus: _chunkVFLAMMIJcjs.isAutotaskError.call(void 0, err) ? err.httpStatus : void 0,
7961
+ vendorError: _chunkVFLAMMIJcjs.isAutotaskError.call(void 0, err) ? err.vendorError : void 0,
7962
7962
  resourceIds: [companyID],
7963
7963
  details: { idRefs: [{ entity: "company", id: companyID }] }
7964
7964
  }
@@ -7983,10 +7983,10 @@ async function assignStep(http, ticketId, assignee, roleID, opts, steps) {
7983
7983
  try {
7984
7984
  const current = await fetchItemUnredacted(http, `/V1.0/Tickets/${ticketId}`, OP_OPEN, { maxRetries: opts.maxRetries });
7985
7985
  if (current === null) {
7986
- throw new (0, _chunkSEFJJY4Jcjs.NotFoundError)(`openWithNoteAndAssign: ticket ${ticketId} vanished between the create and the assign merge read`, { operation: OP_OPEN, resourceIds: [ticketId], details: { idRefs: [{ entity: "ticket", id: ticketId }] } });
7986
+ throw new (0, _chunkVFLAMMIJcjs.NotFoundError)(`openWithNoteAndAssign: ticket ${ticketId} vanished between the create and the assign merge read`, { operation: OP_OPEN, resourceIds: [ticketId], details: { idRefs: [{ entity: "ticket", id: ticketId }] } });
7987
7987
  }
7988
7988
  ticketNumber = typeof current.ticketNumber === "string" ? current.ticketNumber : null;
7989
- const merged = _chunkSEFJJY4Jcjs.mergePartialBody.call(void 0, current, { id: ticketId, assignedResourceID: assignee, assignedResourceRoleID: roleID });
7989
+ const merged = _chunkVFLAMMIJcjs.mergePartialBody.call(void 0, current, { id: ticketId, assignedResourceID: assignee, assignedResourceRoleID: roleID });
7990
7990
  merged.id = ticketId;
7991
7991
  await http.request({ method: "PUT", path: "/V1.0/Tickets", body: merged, operation: OP_OPEN, maxRetries: opts.maxRetries });
7992
7992
  assigned = true;
@@ -8050,7 +8050,7 @@ async function guardTargetStatus(resource, http, targetStatus) {
8050
8050
  const ids = await readLiveStatusSet(resource);
8051
8051
  if (ids.size > 0) liveStatus = ids;
8052
8052
  } catch (err) {
8053
- if (!_chunkSEFJJY4Jcjs.isAutotaskError.call(void 0, err) || err.code === "ABORTED") throw err;
8053
+ if (!_chunkVFLAMMIJcjs.isAutotaskError.call(void 0, err) || err.code === "ABORTED") throw err;
8054
8054
  }
8055
8055
  if (liveStatus !== null && !liveStatus.has(targetStatus)) {
8056
8056
  _optionalChain([http, 'access', _165 => _165.fieldCache, 'optionalAccess', _166 => _166.invalidate, 'call', _167 => _167("tickets:")]);
@@ -8060,7 +8060,7 @@ async function guardTargetStatus(resource, http, targetStatus) {
8060
8060
  const freshIds = await readLiveStatusSet(resource);
8061
8061
  if (freshIds.size > 0) freshStatus = freshIds;
8062
8062
  } catch (err) {
8063
- if (!_chunkSEFJJY4Jcjs.isAutotaskError.call(void 0, err) || err.code === "ABORTED") throw err;
8063
+ if (!_chunkVFLAMMIJcjs.isAutotaskError.call(void 0, err) || err.code === "ABORTED") throw err;
8064
8064
  freshStatus = null;
8065
8065
  reReadFailed = true;
8066
8066
  }
@@ -8078,7 +8078,7 @@ async function guardTargetStatus(resource, http, targetStatus) {
8078
8078
  return { guardDegraded: liveStatus === null };
8079
8079
  }
8080
8080
  function noChangeDryRun(http, ticketId, targetStatus, guardDegraded) {
8081
- return _chunkSEFJJY4Jcjs.buildDryRunResult.call(void 0,
8081
+ return _chunkVFLAMMIJcjs.buildDryRunResult.call(void 0,
8082
8082
  {
8083
8083
  operation: OP_STATUS,
8084
8084
  method: "PUT",
@@ -8132,7 +8132,7 @@ function mergeDryRun(http, ticketId, targetStatus, guardDegraded, filled, mapEnt
8132
8132
  if (mapEntry === void 0) {
8133
8133
  warnings.push(`status ${targetStatus} has no entry in the live-discovered required-field map yet \u2014 if the vendor 500 names a required field without a safe default, the apply throws the typed STATUS_FIELDS_REQUIRED (the caller supplies the value; never a blind retry).`);
8134
8134
  }
8135
- return _chunkSEFJJY4Jcjs.buildDryRunResult.call(void 0,
8135
+ return _chunkVFLAMMIJcjs.buildDryRunResult.call(void 0,
8136
8136
  {
8137
8137
  operation: OP_STATUS,
8138
8138
  method: "PUT",
@@ -8152,7 +8152,7 @@ function mergeDryRun(http, ticketId, targetStatus, guardDegraded, filled, mapEnt
8152
8152
  }
8153
8153
  async function putStatusWithDiscovery(http, ticketId, targetStatus, previousStatus, current, mergeData, mapEntry, filled, opts) {
8154
8154
  const safeDefaults = _nullishCoalesce(_optionalChain([mapEntry, 'optionalAccess', _170 => _170.safeDefaults]), () => ( {}));
8155
- const body = _chunkSEFJJY4Jcjs.mergePartialBody.call(void 0, current, mergeData);
8155
+ const body = _chunkVFLAMMIJcjs.mergePartialBody.call(void 0, current, mergeData);
8156
8156
  body.id = ticketId;
8157
8157
  let merges = 0;
8158
8158
  for (; ; ) {
@@ -8176,8 +8176,8 @@ async function putStatusWithDiscovery(http, ticketId, targetStatus, previousStat
8176
8176
  { vendorFields: named, currentStatus: previousStatus, targetStatus, currentValues },
8177
8177
  {
8178
8178
  operation: OP_STATUS,
8179
- httpStatus: _chunkSEFJJY4Jcjs.isAutotaskError.call(void 0, err) ? err.httpStatus : void 0,
8180
- vendorError: _chunkSEFJJY4Jcjs.isAutotaskError.call(void 0, err) ? err.vendorError : void 0,
8179
+ httpStatus: _chunkVFLAMMIJcjs.isAutotaskError.call(void 0, err) ? err.httpStatus : void 0,
8180
+ vendorError: _chunkVFLAMMIJcjs.isAutotaskError.call(void 0, err) ? err.vendorError : void 0,
8181
8181
  resourceIds: [ticketId],
8182
8182
  details: { idRefs: [{ entity: "ticket", id: ticketId }] }
8183
8183
  }
@@ -8190,7 +8190,7 @@ async function putStatusWithDiscovery(http, ticketId, targetStatus, previousStat
8190
8190
  async function verifyStatusApplied(http, ticketId, targetStatus, opts) {
8191
8191
  const verify = await fetchItem(http, `/V1.0/Tickets/${ticketId}`, OP_STATUS, { maxRetries: opts.maxRetries });
8192
8192
  if (verify === null) {
8193
- throw new (0, _chunkSEFJJY4Jcjs.AutotaskError)(`changeStatus: the post-PUT read-back found no ticket ${ticketId} (the PUT 200ed but the record is gone)`, {
8193
+ throw new (0, _chunkVFLAMMIJcjs.AutotaskError)(`changeStatus: the post-PUT read-back found no ticket ${ticketId} (the PUT 200ed but the record is gone)`, {
8194
8194
  code: "INVALID_RESPONSE",
8195
8195
  category: "server",
8196
8196
  operation: OP_STATUS,
@@ -8200,7 +8200,7 @@ async function verifyStatusApplied(http, ticketId, targetStatus, opts) {
8200
8200
  }
8201
8201
  const finalStatus = typeof verify.status === "number" ? verify.status : null;
8202
8202
  if (finalStatus !== targetStatus) {
8203
- throw new (0, _chunkSEFJJY4Jcjs.AutotaskError)(
8203
+ throw new (0, _chunkVFLAMMIJcjs.AutotaskError)(
8204
8204
  `changeStatus: the post-PUT read-back shows status ${_nullishCoalesce(finalStatus, () => ( "unknown"))} (the vendor 200ed the PUT but did not apply ${targetStatus} \u2014 the F-A1 lesson: the 200 proves nothing)`,
8205
8205
  {
8206
8206
  code: "INVALID_RESPONSE",
@@ -8215,17 +8215,17 @@ async function verifyStatusApplied(http, ticketId, targetStatus, opts) {
8215
8215
  }
8216
8216
  }
8217
8217
  async function changeStatus(resource, id, targetStatus, fields, opts, http) {
8218
- const ticketId = _chunkSEFJJY4Jcjs.parseIdentifier.call(void 0, id, "id");
8218
+ const ticketId = _chunkVFLAMMIJcjs.parseIdentifier.call(void 0, id, "id");
8219
8219
  if (!isPositiveInt(targetStatus)) {
8220
- throw new (0, _chunkSEFJJY4Jcjs.AutotaskConfigError)(`changeStatus: targetStatus must be a positive integer (got ${String(targetStatus)})`, { operation: OP_STATUS });
8220
+ throw new (0, _chunkVFLAMMIJcjs.AutotaskConfigError)(`changeStatus: targetStatus must be a positive integer (got ${String(targetStatus)})`, { operation: OP_STATUS });
8221
8221
  }
8222
8222
  const { guardDegraded } = await guardTargetStatus(resource, http, targetStatus);
8223
8223
  if (fields !== void 0 && (typeof fields !== "object" || fields === null || Array.isArray(fields))) {
8224
- throw new (0, _chunkSEFJJY4Jcjs.AutotaskConfigError)("changeStatus: fields must be a plain object of ticket fields (or omitted)", { operation: OP_STATUS });
8224
+ throw new (0, _chunkVFLAMMIJcjs.AutotaskConfigError)("changeStatus: fields must be a plain object of ticket fields (or omitted)", { operation: OP_STATUS });
8225
8225
  }
8226
8226
  const current = await fetchItemUnredacted(http, `/V1.0/Tickets/${ticketId}`, OP_STATUS, { maxRetries: opts.maxRetries });
8227
8227
  if (current === null) {
8228
- throw new (0, _chunkSEFJJY4Jcjs.NotFoundError)(`changeStatus: ticket ${ticketId} was not found (tickets.get returned item: null)`, { operation: OP_STATUS, resourceIds: [ticketId], details: { idRefs: [{ entity: "ticket", id: ticketId }] } });
8228
+ throw new (0, _chunkVFLAMMIJcjs.NotFoundError)(`changeStatus: ticket ${ticketId} was not found (tickets.get returned item: null)`, { operation: OP_STATUS, resourceIds: [ticketId], details: { idRefs: [{ entity: "ticket", id: ticketId }] } });
8229
8229
  }
8230
8230
  const previousStatus = typeof current.status === "number" ? current.status : null;
8231
8231
  if (previousStatus === targetStatus) {
@@ -8245,7 +8245,7 @@ var DEFAULT_PART_LIMIT = 50;
8245
8245
  function partLimit(value, name) {
8246
8246
  const n = value === void 0 ? DEFAULT_PART_LIMIT : Math.trunc(value);
8247
8247
  if (!Number.isInteger(n) || n < 1) {
8248
- throw new (0, _chunkSEFJJY4Jcjs.AutotaskConfigError)(`fullContext: ${name} must be an integer >= 1 (got ${String(value)})`);
8248
+ throw new (0, _chunkVFLAMMIJcjs.AutotaskConfigError)(`fullContext: ${name} must be an integer >= 1 (got ${String(value)})`);
8249
8249
  }
8250
8250
  return n;
8251
8251
  }
@@ -8258,13 +8258,13 @@ function servedTextRecord(row, textField, limit) {
8258
8258
  return out;
8259
8259
  }
8260
8260
  async function addCompositeNames(http, ctx, entriesPart, result, opts) {
8261
- const builder = _chunkSEFJJY4Jcjs.createNamePlan.call(void 0, _chunkSEFJJY4Jcjs.TICKET_LABEL_FIELDS);
8261
+ const builder = _chunkVFLAMMIJcjs.createNamePlan.call(void 0, _chunkVFLAMMIJcjs.TICKET_LABEL_FIELDS);
8262
8262
  const t = ctx.ticket;
8263
8263
  builder.addResource(t["creatorResourceID"]);
8264
8264
  builder.addFk("contract", t["contractID"]);
8265
8265
  builder.addFk("billingCode", t["billingCodeID"]);
8266
8266
  builder.addFk("role", t["assignedResourceRoleID"]);
8267
- const ticketLobPointer = _chunkSEFJJY4Jcjs.vendorId.call(void 0, t["organizationalLevelAssociationID"]);
8267
+ const ticketLobPointer = _chunkVFLAMMIJcjs.vendorId.call(void 0, t["organizationalLevelAssociationID"]);
8268
8268
  if (ticketLobPointer !== void 0) {
8269
8269
  builder.addLineOfBusiness(ticketLobPointer, { source: "ticket" });
8270
8270
  } else {
@@ -8276,20 +8276,20 @@ async function addCompositeNames(http, ctx, entriesPart, result, opts) {
8276
8276
  builder.addFk("billingCode", e["billingCodeID"]);
8277
8277
  builder.addFk("contract", e["contractID"]);
8278
8278
  }
8279
- const names = await _chunkSEFJJY4Jcjs.resolveCompositeNames.call(void 0, http, builder.plan(), { maxNameReads: opts.maxNameReads });
8279
+ const names = await _chunkVFLAMMIJcjs.resolveCompositeNames.call(void 0, http, builder.plan(), { maxNameReads: opts.maxNameReads });
8280
8280
  const ticketRow = { ...ctx.ticket };
8281
- _chunkSEFJJY4Jcjs.addNameSibling.call(void 0, ticketRow, "creatorResourceID", (v) => names.resourceName(v));
8282
- _chunkSEFJJY4Jcjs.addNameSibling.call(void 0, ticketRow, "contractID", (v) => names.recordName("contract", v));
8283
- _chunkSEFJJY4Jcjs.addNameSibling.call(void 0, ticketRow, "billingCodeID", (v) => names.recordName("billingCode", v));
8284
- _chunkSEFJJY4Jcjs.addNameSibling.call(void 0, ticketRow, "assignedResourceRoleID", (v) => names.recordName("role", v));
8285
- for (const f of _chunkSEFJJY4Jcjs.TICKET_LABEL_FIELDS) _chunkSEFJJY4Jcjs.addLabelSibling.call(void 0, ticketRow, f, names);
8281
+ _chunkVFLAMMIJcjs.addNameSibling.call(void 0, ticketRow, "creatorResourceID", (v) => names.resourceName(v));
8282
+ _chunkVFLAMMIJcjs.addNameSibling.call(void 0, ticketRow, "contractID", (v) => names.recordName("contract", v));
8283
+ _chunkVFLAMMIJcjs.addNameSibling.call(void 0, ticketRow, "billingCodeID", (v) => names.recordName("billingCode", v));
8284
+ _chunkVFLAMMIJcjs.addNameSibling.call(void 0, ticketRow, "assignedResourceRoleID", (v) => names.recordName("role", v));
8285
+ for (const f of _chunkVFLAMMIJcjs.TICKET_LABEL_FIELDS) _chunkVFLAMMIJcjs.addLabelSibling.call(void 0, ticketRow, f, names);
8286
8286
  result.ticket = ticketRow;
8287
8287
  result.timeEntries.items = entriesPart.items.map((e) => {
8288
8288
  const row = { ...e };
8289
- _chunkSEFJJY4Jcjs.addNameSibling.call(void 0, row, "resourceID", (v) => names.resourceName(v));
8290
- _chunkSEFJJY4Jcjs.addNameSibling.call(void 0, row, "roleID", (v) => names.recordName("role", v));
8291
- _chunkSEFJJY4Jcjs.addNameSibling.call(void 0, row, "billingCodeID", (v) => names.recordName("billingCode", v));
8292
- _chunkSEFJJY4Jcjs.addNameSibling.call(void 0, row, "contractID", (v) => names.recordName("contract", v));
8289
+ _chunkVFLAMMIJcjs.addNameSibling.call(void 0, row, "resourceID", (v) => names.resourceName(v));
8290
+ _chunkVFLAMMIJcjs.addNameSibling.call(void 0, row, "roleID", (v) => names.recordName("role", v));
8291
+ _chunkVFLAMMIJcjs.addNameSibling.call(void 0, row, "billingCodeID", (v) => names.recordName("billingCode", v));
8292
+ _chunkVFLAMMIJcjs.addNameSibling.call(void 0, row, "contractID", (v) => names.recordName("contract", v));
8293
8293
  return row;
8294
8294
  });
8295
8295
  result.names = names.section;
@@ -8305,7 +8305,7 @@ async function fullContext(resource, id, opts = {}, http) {
8305
8305
  const noteLimit = partLimit(opts.noteLimit, "noteLimit");
8306
8306
  const timeEntryLimit = partLimit(opts.timeEntryLimit, "timeEntryLimit");
8307
8307
  const textLimit = partLimit(opts.textLimit, "textLimit");
8308
- const ticketId = _chunkSEFJJY4Jcjs.parseIdentifier.call(void 0, id, "id");
8308
+ const ticketId = _chunkVFLAMMIJcjs.parseIdentifier.call(void 0, id, "id");
8309
8309
  const ctx = await resource.getContext(ticketId);
8310
8310
  const op = "tickets.fullContext";
8311
8311
  const ticketFilter = [{ field: "ticketID", op: "eq", value: ticketId }];
@@ -8373,7 +8373,7 @@ var TICKET_FIELDS = ["id", "ticketNumber", "title", "status", "assignedResourceI
8373
8373
  function positiveId(value, name) {
8374
8374
  const n = typeof value === "string" && /^\d+$/.test(value.trim()) ? Number(value) : value;
8375
8375
  if (typeof n !== "number" || !Number.isSafeInteger(n) || n < 1) {
8376
- throw new (0, _chunkSEFJJY4Jcjs.AutotaskConfigError)(`${OP2}: ${name} must be a positive integer id (got ${String(value)})`, { operation: OP2 });
8376
+ throw new (0, _chunkVFLAMMIJcjs.AutotaskConfigError)(`${OP2}: ${name} must be a positive integer id (got ${String(value)})`, { operation: OP2 });
8377
8377
  }
8378
8378
  return n;
8379
8379
  }
@@ -8385,7 +8385,7 @@ async function ticketPage(http, filter, maxRecords, fields) {
8385
8385
  body: { MaxRecords: maxRecords, filter, IncludeFields: fields },
8386
8386
  operation: OP2
8387
8387
  });
8388
- const page = _chunkSEFJJY4Jcjs.unwrapItems.call(void 0, res, OP2);
8388
+ const page = _chunkVFLAMMIJcjs.unwrapItems.call(void 0, res, OP2);
8389
8389
  return { rows: page.items, more: page.pageDetails.nextPageUrl !== null };
8390
8390
  }
8391
8391
  async function readLinkIds(http, resourceID, maxPages = 1) {
@@ -8395,11 +8395,11 @@ async function readLinkIds(http, resourceID, maxPages = 1) {
8395
8395
  const res = await http.request({
8396
8396
  method: "POST",
8397
8397
  idempotent: true,
8398
- path: cursor === null ? "/V1.0/TicketSecondaryResources/query" : _chunkSEFJJY4Jcjs.cursorToPath.call(void 0, http.baseUrl, cursor),
8398
+ path: cursor === null ? "/V1.0/TicketSecondaryResources/query" : _chunkVFLAMMIJcjs.cursorToPath.call(void 0, http.baseUrl, cursor),
8399
8399
  body: { MaxRecords: LINK_READ_CAP, filter: [{ field: "resourceID", op: "eq", value: resourceID }], IncludeFields: ["ticketID"] },
8400
8400
  operation: OP2
8401
8401
  });
8402
- const page = _chunkSEFJJY4Jcjs.unwrapItems.call(void 0, res, OP2);
8402
+ const page = _chunkVFLAMMIJcjs.unwrapItems.call(void 0, res, OP2);
8403
8403
  for (const row of page.items) if (typeof row.ticketID === "number") ids.add(row.ticketID);
8404
8404
  cursor = page.pageDetails.nextPageUrl;
8405
8405
  if (cursor === null || page.items.length === 0) return { ids: [...ids], capped: false };
@@ -8407,35 +8407,35 @@ async function readLinkIds(http, resourceID, maxPages = 1) {
8407
8407
  return { ids: [...ids], capped: true };
8408
8408
  }
8409
8409
  async function forResource(_resource, resourceIDIn, http, opts = {}) {
8410
- if (opts === null || typeof opts !== "object") throw new (0, _chunkSEFJJY4Jcjs.AutotaskConfigError)(`${OP2}: opts must be an object`, { operation: OP2 });
8410
+ if (opts === null || typeof opts !== "object") throw new (0, _chunkVFLAMMIJcjs.AutotaskConfigError)(`${OP2}: opts must be an object`, { operation: OP2 });
8411
8411
  const resourceID = positiveId(resourceIDIn, "resourceID");
8412
8412
  const scope = _nullishCoalesce(opts.scope, () => ( "both"));
8413
8413
  if (scope !== "primary" && scope !== "secondary" && scope !== "both") {
8414
- throw new (0, _chunkSEFJJY4Jcjs.AutotaskConfigError)(`${OP2}: scope must be 'primary', 'secondary' or 'both' (got ${JSON.stringify(opts.scope)})`, { operation: OP2 });
8414
+ throw new (0, _chunkVFLAMMIJcjs.AutotaskConfigError)(`${OP2}: scope must be 'primary', 'secondary' or 'both' (got ${JSON.stringify(opts.scope)})`, { operation: OP2 });
8415
8415
  }
8416
8416
  if (opts.openOnly !== void 0 && typeof opts.openOnly !== "boolean") {
8417
- throw new (0, _chunkSEFJJY4Jcjs.AutotaskConfigError)(`${OP2}: openOnly must be a boolean`, { operation: OP2 });
8417
+ throw new (0, _chunkVFLAMMIJcjs.AutotaskConfigError)(`${OP2}: openOnly must be a boolean`, { operation: OP2 });
8418
8418
  }
8419
8419
  const limit = opts.limit === void 0 ? LIMIT_DEFAULT : opts.limit;
8420
8420
  if (opts.countOnly !== true && (!Number.isInteger(limit) || limit < 1 || limit > LIMIT_MAX)) {
8421
- throw new (0, _chunkSEFJJY4Jcjs.AutotaskConfigError)(`${OP2}: limit must be an integer 1-${LIMIT_MAX} (got ${String(opts.limit)})`, { operation: OP2 });
8421
+ throw new (0, _chunkVFLAMMIJcjs.AutotaskConfigError)(`${OP2}: limit must be an integer 1-${LIMIT_MAX} (got ${String(opts.limit)})`, { operation: OP2 });
8422
8422
  }
8423
8423
  const includeFields = _nullishCoalesce(opts.includeFields, () => ( []));
8424
8424
  if (!Array.isArray(includeFields) || includeFields.some((f) => typeof f !== "string" || f.length === 0)) {
8425
- throw new (0, _chunkSEFJJY4Jcjs.AutotaskConfigError)(`${OP2}: includeFields must be a list of field names`, { operation: OP2 });
8425
+ throw new (0, _chunkVFLAMMIJcjs.AutotaskConfigError)(`${OP2}: includeFields must be a list of field names`, { operation: OP2 });
8426
8426
  }
8427
8427
  const openOnly = opts.openOnly === true;
8428
8428
  const fields = [.../* @__PURE__ */ new Set([...TICKET_FIELDS, ...includeFields])];
8429
8429
  if (opts.countOnly !== void 0 && typeof opts.countOnly !== "boolean") {
8430
- throw new (0, _chunkSEFJJY4Jcjs.AutotaskConfigError)(`${OP2}: countOnly must be a boolean`, { operation: OP2 });
8430
+ throw new (0, _chunkVFLAMMIJcjs.AutotaskConfigError)(`${OP2}: countOnly must be a boolean`, { operation: OP2 });
8431
8431
  }
8432
- const closed = await _chunkSEFJJY4Jcjs.resolveTicketStatusSemantics.call(void 0,
8432
+ const closed = await _chunkVFLAMMIJcjs.resolveTicketStatusSemantics.call(void 0,
8433
8433
  http,
8434
8434
  { ...opts.excludeStatusIds === void 0 ? {} : { excludeStatusIds: opts.excludeStatusIds }, ...opts.allowAssumed === void 0 ? {} : { allowAssumed: opts.allowAssumed } },
8435
8435
  OP2
8436
8436
  );
8437
8437
  const closedStatus = { closedIds: closed.closedIds, source: closed.source, note: closed.note };
8438
- const openLeaf = openOnly || opts.countOnly === true ? [_chunkSEFJJY4Jcjs.openStatusFilter.call(void 0, closed.closedIds)] : [];
8438
+ const openLeaf = openOnly || opts.countOnly === true ? [_chunkVFLAMMIJcjs.openStatusFilter.call(void 0, closed.closedIds)] : [];
8439
8439
  if (opts.countOnly === true) {
8440
8440
  const primaryCount = scope === "secondary" ? 0 : await _resource.count({ filter: [{ field: "assignedResourceID", op: "eq", value: resourceID }, ...openLeaf] });
8441
8441
  let secondaryCount = 0;
@@ -8449,7 +8449,7 @@ async function forResource(_resource, resourceIDIn, http, opts = {}) {
8449
8449
  const page = await ticketPage(http, [{ field: "id", op: "in", value: chunk }, ...openLeaf], chunk.length, ["id", "status", "assignedResourceID"]);
8450
8450
  const seen = /* @__PURE__ */ new Set();
8451
8451
  for (const t of page.rows) {
8452
- if (typeof t.id !== "number" || seen.has(t.id) || _chunkSEFJJY4Jcjs.isClosedStatus.call(void 0, t.status, closed.closedIds)) continue;
8452
+ if (typeof t.id !== "number" || seen.has(t.id) || _chunkVFLAMMIJcjs.isClosedStatus.call(void 0, t.status, closed.closedIds)) continue;
8453
8453
  seen.add(t.id);
8454
8454
  if (scope === "both" && t.assignedResourceID === resourceID) bothCount++;
8455
8455
  }
@@ -8495,13 +8495,13 @@ async function forResource(_resource, resourceIDIn, http, opts = {}) {
8495
8495
  for (const [id, t] of primary) merged.set(id, t);
8496
8496
  for (const [id, t] of secondary) if (!merged.has(id)) merged.set(id, t);
8497
8497
  let tickets = [...merged.values()];
8498
- if (openOnly) tickets = tickets.filter((t) => !_chunkSEFJJY4Jcjs.isClosedStatus.call(void 0, t.status, closed.closedIds));
8498
+ if (openOnly) tickets = tickets.filter((t) => !_chunkVFLAMMIJcjs.isClosedStatus.call(void 0, t.status, closed.closedIds));
8499
8499
  tickets.sort((a, b) => Number(a.id) - Number(b.id));
8500
8500
  if (tickets.length > limit) {
8501
8501
  tickets = tickets.slice(0, limit);
8502
8502
  capped = true;
8503
8503
  }
8504
- const openCount = tickets.filter((t) => !_chunkSEFJJY4Jcjs.isClosedStatus.call(void 0, t.status, closed.closedIds)).length;
8504
+ const openCount = tickets.filter((t) => !_chunkVFLAMMIJcjs.isClosedStatus.call(void 0, t.status, closed.closedIds)).length;
8505
8505
  const primaryIds = [...primary.keys()].sort((a, b) => a - b);
8506
8506
  const secondaryIds = [...secondary.keys()].sort((a, b) => a - b);
8507
8507
  const both = primaryIds.filter((id) => secondary.has(id));
@@ -8525,7 +8525,7 @@ var OP3 = "tickets.lineOfBusiness";
8525
8525
  function positiveId2(value, name) {
8526
8526
  const n = typeof value === "string" && /^[0-9]+$/.test(value.trim()) ? Number(value) : value;
8527
8527
  if (typeof n !== "number" || !Number.isSafeInteger(n) || n < 1) {
8528
- throw new (0, _chunkSEFJJY4Jcjs.AutotaskConfigError)(OP3 + ": " + name + " must be a positive integer id (got " + String(value) + ")", { operation: OP3 });
8528
+ throw new (0, _chunkVFLAMMIJcjs.AutotaskConfigError)(OP3 + ": " + name + " must be a positive integer id (got " + String(value) + ")", { operation: OP3 });
8529
8529
  }
8530
8530
  return n;
8531
8531
  }
@@ -8540,25 +8540,25 @@ async function lineOfBusiness(resource, ticketIdIn, http, associationIdIn) {
8540
8540
  associationSource = "argument";
8541
8541
  } else {
8542
8542
  const ticket = await resource.get(ticketId);
8543
- associationId = _chunkSEFJJY4Jcjs.vendorId.call(void 0, ticket.organizationalLevelAssociationID);
8543
+ associationId = _chunkVFLAMMIJcjs.vendorId.call(void 0, ticket.organizationalLevelAssociationID);
8544
8544
  if (associationId !== void 0) {
8545
8545
  associationSource = "ticket";
8546
8546
  } else {
8547
- const contractRef = _chunkSEFJJY4Jcjs.vendorId.call(void 0, ticket.contractID);
8547
+ const contractRef = _chunkVFLAMMIJcjs.vendorId.call(void 0, ticket.contractID);
8548
8548
  if (contractRef !== void 0) {
8549
8549
  const client = http.client;
8550
8550
  if (client === void 0) {
8551
- throw new (0, _chunkSEFJJY4Jcjs.AutotaskConfigError)(OP3 + ": the transport is not wired to an AutotaskClient (the composite must run through the client)", { operation: OP3 });
8551
+ throw new (0, _chunkVFLAMMIJcjs.AutotaskConfigError)(OP3 + ": the transport is not wired to an AutotaskClient (the composite must run through the client)", { operation: OP3 });
8552
8552
  }
8553
8553
  try {
8554
8554
  const contract = await client.contracts.get(contractRef);
8555
8555
  contractId = contractRef;
8556
- associationId = _chunkSEFJJY4Jcjs.vendorId.call(void 0, contract.organizationalLevelAssociationID);
8556
+ associationId = _chunkVFLAMMIJcjs.vendorId.call(void 0, contract.organizationalLevelAssociationID);
8557
8557
  if (associationId !== void 0) associationSource = "contract";
8558
8558
  } catch (e) {
8559
- if (e instanceof _chunkSEFJJY4Jcjs.NotFoundError) {
8559
+ if (e instanceof _chunkVFLAMMIJcjs.NotFoundError) {
8560
8560
  contractId = contractRef;
8561
- } else if (_chunkSEFJJY4Jcjs.isAutotaskError.call(void 0, e) && e.code !== "ABORTED") {
8561
+ } else if (_chunkVFLAMMIJcjs.isAutotaskError.call(void 0, e) && e.code !== "ABORTED") {
8562
8562
  contractId = contractRef;
8563
8563
  contractUnread = true;
8564
8564
  } else {
@@ -8579,18 +8579,18 @@ async function lineOfBusiness(resource, ticketIdIn, http, associationIdIn) {
8579
8579
  markers: { association: contractUnread ? "unresolved" : "missing", organizationalLevel2: "missing", organizationalLevel1: "missing" }
8580
8580
  };
8581
8581
  }
8582
- const chain = await _chunkSEFJJY4Jcjs.resolveLineOfBusinessChain.call(void 0, http, associationId, { budget: 3, operation: OP3, onError: "propagate" });
8582
+ const chain = await _chunkVFLAMMIJcjs.resolveLineOfBusinessChain.call(void 0, http, associationId, { budget: 3, operation: OP3, onError: "propagate" });
8583
8583
  const { association, organizationalLevel2, organizationalLevel1, markers } = chain.lineOfBusiness;
8584
8584
  return { ticketId, associationSource, contractId, association, organizationalLevel2, organizationalLevel1, markers };
8585
8585
  }
8586
8586
 
8587
8587
  // src/resources/special/tickets/statusSemantics.ts
8588
8588
  async function statusSemantics(_resource, opts = {}, http) {
8589
- return _chunkSEFJJY4Jcjs.resolveTicketStatusSemantics.call(void 0, http, opts);
8589
+ return _chunkVFLAMMIJcjs.resolveTicketStatusSemantics.call(void 0, http, opts);
8590
8590
  }
8591
8591
 
8592
8592
  // src/resources/tickets.ts
8593
- var TicketsResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
8593
+ var TicketsResource = class extends _chunkVFLAMMIJcjs.BaseResource {
8594
8594
  constructor(http, pageSize) {
8595
8595
  super(http, {
8596
8596
  key: "tickets",
@@ -8708,7 +8708,7 @@ var TicketsResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
8708
8708
  };
8709
8709
 
8710
8710
  // src/resources/ticket_webhooks.ts
8711
- var TicketWebhooksResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
8711
+ var TicketWebhooksResource = class extends _chunkVFLAMMIJcjs.BaseResource {
8712
8712
  constructor(http, pageSize) {
8713
8713
  super(http, {
8714
8714
  key: "ticket_webhooks",
@@ -8784,7 +8784,7 @@ var TicketWebhooksResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
8784
8784
  };
8785
8785
 
8786
8786
  // src/resources/time_entry_attachments.ts
8787
- var TimeEntryAttachmentsResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
8787
+ var TimeEntryAttachmentsResource = class extends _chunkVFLAMMIJcjs.BaseResource {
8788
8788
  constructor(http, pageSize) {
8789
8789
  super(http, {
8790
8790
  key: "time_entry_attachments",
@@ -8847,9 +8847,9 @@ var TimeEntryAttachmentsResource = class extends _chunkSEFJJY4Jcjs.BaseResource
8847
8847
 
8848
8848
  // src/resources/special/time_off_requests.ts
8849
8849
  async function approve(_resource, id, opts = {}, http) {
8850
- const numericId = _chunkSEFJJY4Jcjs.parseIdentifier.call(void 0, id, "id");
8850
+ const numericId = _chunkVFLAMMIJcjs.parseIdentifier.call(void 0, id, "id");
8851
8851
  if (opts.dryRun === true) {
8852
- return _chunkSEFJJY4Jcjs.buildDryRunResult.call(void 0, {
8852
+ return _chunkVFLAMMIJcjs.buildDryRunResult.call(void 0, {
8853
8853
  operation: "time_off_requests.approve",
8854
8854
  method: "GET",
8855
8855
  path: `/V1.0/TimeOffRequests/${numericId}/Approve`,
@@ -8865,16 +8865,16 @@ async function approve(_resource, id, opts = {}, http) {
8865
8865
  operation: "time_off_requests.approve",
8866
8866
  maxRetries: opts.maxRetries
8867
8867
  });
8868
- return _chunkSEFJJY4Jcjs.unwrapOperation.call(void 0, res);
8868
+ return _chunkVFLAMMIJcjs.unwrapOperation.call(void 0, res);
8869
8869
  }
8870
8870
  async function reject(_resource, id, reason, opts = {}, http) {
8871
- const numericId = _chunkSEFJJY4Jcjs.parseIdentifier.call(void 0, id, "id");
8871
+ const numericId = _chunkVFLAMMIJcjs.parseIdentifier.call(void 0, id, "id");
8872
8872
  const text = reason.trim();
8873
8873
  if (text === "") {
8874
- throw new (0, _chunkSEFJJY4Jcjs.AutotaskConfigError)("reject: a non-empty reason is required (vendor TimeOffRequestRejectModel)");
8874
+ throw new (0, _chunkVFLAMMIJcjs.AutotaskConfigError)("reject: a non-empty reason is required (vendor TimeOffRequestRejectModel)");
8875
8875
  }
8876
8876
  if (opts.dryRun === true) {
8877
- return _chunkSEFJJY4Jcjs.buildDryRunResult.call(void 0, {
8877
+ return _chunkVFLAMMIJcjs.buildDryRunResult.call(void 0, {
8878
8878
  operation: "time_off_requests.reject",
8879
8879
  method: "POST",
8880
8880
  path: `/V1.0/TimeOffRequests/${numericId}/Reject`,
@@ -8892,11 +8892,11 @@ async function reject(_resource, id, reason, opts = {}, http) {
8892
8892
  operation: "time_off_requests.reject",
8893
8893
  maxRetries: opts.maxRetries
8894
8894
  });
8895
- return _chunkSEFJJY4Jcjs.unwrapOperation.call(void 0, res);
8895
+ return _chunkVFLAMMIJcjs.unwrapOperation.call(void 0, res);
8896
8896
  }
8897
8897
 
8898
8898
  // src/resources/time_off_requests.ts
8899
- var TimeOffRequestsResource = class extends _chunkSEFJJY4Jcjs.BaseResource {
8899
+ var TimeOffRequestsResource = class extends _chunkVFLAMMIJcjs.BaseResource {
8900
8900
  constructor(http, pageSize) {
8901
8901
  super(http, {
8902
8902
  key: "time_off_requests",