node-autotask 0.37.1 → 0.39.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/MCP_TOOL_CATALOG.json +127 -44
  3. package/MCP_TOOL_MANIFEST.md +9 -9
  4. package/N8N_MCP_MANIFEST.json +4 -4
  5. package/N8N_MCP_MANIFEST.md +5 -5
  6. package/README.md +3 -0
  7. package/capabilities.json +2500 -1713
  8. package/capabilities.schema.json +2 -1
  9. package/dist/capabilities.cjs +2 -2
  10. package/dist/capabilities.d.cts +4 -4
  11. package/dist/capabilities.d.ts +4 -4
  12. package/dist/capabilities.js +1 -1
  13. package/dist/{chunk-KQ6HMBB4.js → chunk-2KQS3RHQ.js} +2499 -1712
  14. package/dist/{chunk-TBFXRNNE.cjs → chunk-45PLS73K.cjs} +2452 -2065
  15. package/dist/chunk-5VHSLJMR.js +71 -0
  16. package/dist/{chunk-PFFW4DIK.cjs → chunk-6ROB5KXB.cjs} +285 -285
  17. package/dist/{chunk-7IADHNBZ.js → chunk-FV5PJLIZ.js} +2602 -2215
  18. package/dist/{chunk-25VGFT5M.cjs → chunk-KSNK6UEW.cjs} +143 -143
  19. package/dist/{chunk-PFJAMFUL.js → chunk-LD5UPSDB.js} +2 -2
  20. package/dist/chunk-MJTKK3QG.cjs +71 -0
  21. package/dist/{chunk-7WI7FBPB.js → chunk-OKFTECIE.js} +2 -2
  22. package/dist/{chunk-HBYKTXN3.cjs → chunk-RAZEXOLC.cjs} +2499 -1712
  23. package/dist/{index-m-7fOwFl.d.cts → index-BQVStxwi.d.cts} +15 -1
  24. package/dist/{index-m-7fOwFl.d.ts → index-BQVStxwi.d.ts} +15 -1
  25. package/dist/{index-CqepIQfp.d.cts → index-BVOOHPvr.d.cts} +28 -8
  26. package/dist/{index-BDqw377y.d.ts → index-Bmoiwhx2.d.ts} +28 -8
  27. package/dist/index.cjs +27 -22
  28. package/dist/index.d.cts +26 -5
  29. package/dist/index.d.ts +26 -5
  30. package/dist/index.js +9 -4
  31. package/dist/operations/index.cjs +249 -227
  32. package/dist/operations/index.d.cts +76 -15
  33. package/dist/operations/index.d.ts +76 -15
  34. package/dist/operations/index.js +60 -38
  35. package/dist/pool.cjs +10 -9
  36. package/dist/pool.d.cts +2 -2
  37. package/dist/pool.d.ts +2 -2
  38. package/dist/pool.js +5 -4
  39. package/dist/resources/index.cjs +5 -4
  40. package/dist/resources/index.d.cts +2 -2
  41. package/dist/resources/index.d.ts +2 -2
  42. package/dist/resources/index.js +4 -3
  43. package/dist/types/index.d.cts +1 -1
  44. package/dist/types/index.d.ts +1 -1
  45. package/dist/untrusted.cjs +24 -70
  46. package/dist/untrusted.js +12 -58
  47. package/docs/API.md +129 -3
  48. package/examples/mcp/manifest.ts +5 -0
  49. package/examples/mcp/rank.ts +62 -0
  50. package/examples/mcp/tools-meta.ts +6 -1
  51. package/package.json +1 -1
@@ -30,13 +30,13 @@
30
30
 
31
31
 
32
32
 
33
- var _chunkTBFXRNNEcjs = require('./chunk-TBFXRNNE.cjs');
33
+ var _chunk45PLS73Kcjs = require('./chunk-45PLS73K.cjs');
34
34
 
35
35
 
36
- var _chunkHBYKTXN3cjs = require('./chunk-HBYKTXN3.cjs');
36
+ var _chunkRAZEXOLCcjs = require('./chunk-RAZEXOLC.cjs');
37
37
 
38
38
  // src/resources/appointments.ts
39
- var AppointmentsResource = class extends _chunkTBFXRNNEcjs.BaseResource {
39
+ var AppointmentsResource = class extends _chunk45PLS73Kcjs.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 _chunkTBFXRNNEcjs.BaseResource {
124
+ var BillingItemApprovalLevelsResource = class extends _chunk45PLS73Kcjs.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 _chunkTBFXRNNEcjs.BaseReso
157
157
  };
158
158
 
159
159
  // src/resources/change_request_links.ts
160
- var ChangeRequestLinksResource = class extends _chunkTBFXRNNEcjs.BaseResource {
160
+ var ChangeRequestLinksResource = class extends _chunk45PLS73Kcjs.BaseResource {
161
161
  constructor(http, pageSize) {
162
162
  super(http, {
163
163
  key: "change_request_links",
@@ -211,7 +211,7 @@ var ChangeRequestLinksResource = class extends _chunkTBFXRNNEcjs.BaseResource {
211
211
  };
212
212
 
213
213
  // src/resources/checklist_libraries.ts
214
- var ChecklistLibrariesResource = class extends _chunkTBFXRNNEcjs.BaseResource {
214
+ var ChecklistLibrariesResource = class extends _chunk45PLS73Kcjs.BaseResource {
215
215
  constructor(http, pageSize) {
216
216
  super(http, {
217
217
  key: "checklist_libraries",
@@ -285,7 +285,7 @@ var ChecklistLibrariesResource = class extends _chunkTBFXRNNEcjs.BaseResource {
285
285
  };
286
286
 
287
287
  // src/resources/checklist_library_checklist_items.ts
288
- var ChecklistLibraryChecklistItemsResource = class extends _chunkTBFXRNNEcjs.BaseResource {
288
+ var ChecklistLibraryChecklistItemsResource = class extends _chunk45PLS73Kcjs.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 _chunkTBFXRNNEcjs.Bas
351
351
  };
352
352
 
353
353
  // src/resources/classification_icons.ts
354
- var ClassificationIconsResource = class extends _chunkTBFXRNNEcjs.BaseResource {
354
+ var ClassificationIconsResource = class extends _chunk45PLS73Kcjs.BaseResource {
355
355
  constructor(http, pageSize) {
356
356
  super(http, {
357
357
  key: "classification_icons",
@@ -395,7 +395,7 @@ var ClassificationIconsResource = class extends _chunkTBFXRNNEcjs.BaseResource {
395
395
  };
396
396
 
397
397
  // src/resources/company_alerts.ts
398
- var CompanyAlertsResource = class extends _chunkTBFXRNNEcjs.BaseResource {
398
+ var CompanyAlertsResource = class extends _chunk45PLS73Kcjs.BaseResource {
399
399
  constructor(http, pageSize) {
400
400
  super(http, {
401
401
  key: "company_alerts",
@@ -461,7 +461,7 @@ var CompanyAlertsResource = class extends _chunkTBFXRNNEcjs.BaseResource {
461
461
  };
462
462
 
463
463
  // src/resources/company_locations.ts
464
- var CompanyLocationsResource = class extends _chunkTBFXRNNEcjs.BaseResource {
464
+ var CompanyLocationsResource = class extends _chunk45PLS73Kcjs.BaseResource {
465
465
  constructor(http, pageSize) {
466
466
  super(http, {
467
467
  key: "company_locations",
@@ -532,7 +532,7 @@ var CompanyLocationsResource = class extends _chunkTBFXRNNEcjs.BaseResource {
532
532
  };
533
533
 
534
534
  // src/resources/company_notes.ts
535
- var CompanyNotesResource = class extends _chunkTBFXRNNEcjs.BaseResource {
535
+ var CompanyNotesResource = class extends _chunk45PLS73Kcjs.BaseResource {
536
536
  constructor(http, pageSize) {
537
537
  super(http, {
538
538
  key: "company_notes",
@@ -597,7 +597,7 @@ var CompanyNotesResource = class extends _chunkTBFXRNNEcjs.BaseResource {
597
597
  };
598
598
 
599
599
  // src/resources/company_site_configurations.ts
600
- var CompanySiteConfigurationsResource = class extends _chunkTBFXRNNEcjs.BaseResource {
600
+ var CompanySiteConfigurationsResource = class extends _chunk45PLS73Kcjs.BaseResource {
601
601
  constructor(http, pageSize) {
602
602
  super(http, {
603
603
  key: "company_site_configurations",
@@ -648,7 +648,7 @@ var CompanySiteConfigurationsResource = class extends _chunkTBFXRNNEcjs.BaseReso
648
648
  };
649
649
 
650
650
  // src/resources/company_webhooks.ts
651
- var CompanyWebhooksResource = class extends _chunkTBFXRNNEcjs.BaseResource {
651
+ var CompanyWebhooksResource = class extends _chunk45PLS73Kcjs.BaseResource {
652
652
  constructor(http, pageSize) {
653
653
  super(http, {
654
654
  key: "company_webhooks",
@@ -724,7 +724,7 @@ var CompanyWebhooksResource = class extends _chunkTBFXRNNEcjs.BaseResource {
724
724
  };
725
725
 
726
726
  // src/resources/configuration_item_billing_product_associations.ts
727
- var ConfigurationItemBillingProductAssociationsResource = class extends _chunkTBFXRNNEcjs.BaseResource {
727
+ var ConfigurationItemBillingProductAssociationsResource = class extends _chunk45PLS73Kcjs.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 _chunkTB
790
790
  };
791
791
 
792
792
  // src/resources/configuration_item_categories.ts
793
- var ConfigurationItemCategoriesResource = class extends _chunkTBFXRNNEcjs.BaseResource {
793
+ var ConfigurationItemCategoriesResource = class extends _chunk45PLS73Kcjs.BaseResource {
794
794
  constructor(http, pageSize) {
795
795
  super(http, {
796
796
  key: "configuration_item_categories",
@@ -857,7 +857,7 @@ var ConfigurationItemCategoriesResource = class extends _chunkTBFXRNNEcjs.BaseRe
857
857
  };
858
858
 
859
859
  // src/resources/configuration_item_category_udf_associations.ts
860
- var ConfigurationItemCategoryUdfAssociationsResource = class extends _chunkTBFXRNNEcjs.BaseResource {
860
+ var ConfigurationItemCategoryUdfAssociationsResource = class extends _chunk45PLS73Kcjs.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 _chunkTBFXR
923
923
  };
924
924
 
925
925
  // src/resources/configuration_item_dns_records.ts
926
- var ConfigurationItemDnsRecordsResource = class extends _chunkTBFXRNNEcjs.BaseResource {
926
+ var ConfigurationItemDnsRecordsResource = class extends _chunk45PLS73Kcjs.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 _chunkTBFXRNNEcjs.BaseRe
972
972
  };
973
973
 
974
974
  // src/resources/configuration_item_notes.ts
975
- var ConfigurationItemNotesResource = class extends _chunkTBFXRNNEcjs.BaseResource {
975
+ var ConfigurationItemNotesResource = class extends _chunk45PLS73Kcjs.BaseResource {
976
976
  constructor(http, pageSize) {
977
977
  super(http, {
978
978
  key: "configuration_item_notes",
@@ -1031,7 +1031,7 @@ var ConfigurationItemNotesResource = class extends _chunkTBFXRNNEcjs.BaseResourc
1031
1031
  };
1032
1032
 
1033
1033
  // src/resources/configuration_item_related_items.ts
1034
- var ConfigurationItemRelatedItemsResource = class extends _chunkTBFXRNNEcjs.BaseResource {
1034
+ var ConfigurationItemRelatedItemsResource = class extends _chunk45PLS73Kcjs.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, _chunkTBFXRNNEcjs.NotFoundError)(`${label} not found`, { code: "NOT_FOUND", category: "not_found" });
1095
+ throw new (0, _chunk45PLS73Kcjs.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 = _chunkTBFXRNNEcjs.parseIdentifier.call(void 0, sourceId, "sourceId");
1100
+ const numericSource = _chunk45PLS73Kcjs.parseIdentifier.call(void 0, sourceId, "sourceId");
1101
1101
  if (_optionalChain([opts, 'optionalAccess', _25 => _25.destinationCompanyId]) === void 0) {
1102
- throw new (0, _chunkTBFXRNNEcjs.AutotaskConfigError)("moveConfigurationItem: destinationCompanyId is required");
1102
+ throw new (0, _chunk45PLS73Kcjs.AutotaskConfigError)("moveConfigurationItem: destinationCompanyId is required");
1103
1103
  }
1104
- const destId = _chunkTBFXRNNEcjs.parseIdentifier.call(void 0, opts.destinationCompanyId, "destinationCompanyId");
1104
+ const destId = _chunk45PLS73Kcjs.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, _chunkTBFXRNNEcjs.AutotaskConfigError)("moveConfigurationItem: newReferenceTitle must be non-empty");
1114
+ if (opts.newReferenceTitle.trim() === "") throw new (0, _chunk45PLS73Kcjs.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, _chunkTBFXRNNEcjs.StaleObjectError)(
1120
+ throw new (0, _chunk45PLS73Kcjs.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 _chunkTBFXRNNEcjs.buildDryRunResult.call(void 0, {
1127
+ return _chunk45PLS73Kcjs.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, _chunkTBFXRNNEcjs.AutotaskConfigError)("moveConfigurationItem: vendor create response has no itemId");
1152
+ throw new (0, _chunk45PLS73Kcjs.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, _chunkTBFXRNNEcjs.AutotaskConfigError)(`profile: ${name} must be an integer >= 1 (got ${String(value)})`);
1171
+ throw new (0, _chunk45PLS73Kcjs.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, _chunkTBFXRNNEcjs.NotFoundError)(`context part not found (unexpected envelope shape)`, { resourceIds: [referenceId], details: { idRefs: [{ entity, id: referenceId }] } });
1187
+ throw new (0, _chunk45PLS73Kcjs.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, _chunkTBFXRNNEcjs.NotFoundError)("context part not found", { resourceIds: [referenceId], details: { idRefs: [{ entity, id: referenceId }] } });
1190
+ throw new (0, _chunk45PLS73Kcjs.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 _chunkTBFXRNNEcjs.NotFoundError) return null;
1194
+ if (err instanceof _chunk45PLS73Kcjs.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 _chunkTBFXRNNEcjs.unwrapItems.call(void 0, res).items;
1206
+ return _chunk45PLS73Kcjs.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([_chunkTBFXRNNEcjs.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([_chunk45PLS73Kcjs.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 = _chunkTBFXRNNEcjs.createNamePlan.call(void 0, );
1244
+ const builder = _chunk45PLS73Kcjs.createNamePlan.call(void 0, );
1245
1245
  builder.addFk("contract", root["contractID"]);
1246
- const names = await _chunkTBFXRNNEcjs.resolveCompositeNames.call(void 0, http, builder.plan(), { maxNameReads: opts.maxNameReads });
1246
+ const names = await _chunk45PLS73Kcjs.resolveCompositeNames.call(void 0, http, builder.plan(), { maxNameReads: opts.maxNameReads });
1247
1247
  const ciRow = { ...ci };
1248
- _chunkTBFXRNNEcjs.addNameSibling.call(void 0, ciRow, "contractID", (v) => names.recordName("contract", v));
1248
+ _chunk45PLS73Kcjs.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 _chunkTBFXRNNEcjs.BaseResource {
1256
+ var ConfigurationItemsResource = class extends _chunk45PLS73Kcjs.BaseResource {
1257
1257
  constructor(http, pageSize) {
1258
1258
  super(http, {
1259
1259
  key: "configuration_items",
@@ -1342,7 +1342,7 @@ var ConfigurationItemsResource = class extends _chunkTBFXRNNEcjs.BaseResource {
1342
1342
  };
1343
1343
 
1344
1344
  // src/resources/configuration_item_ssl_subject_alternative_names.ts
1345
- var ConfigurationItemSslSubjectAlternativeNamesResource = class extends _chunkTBFXRNNEcjs.BaseResource {
1345
+ var ConfigurationItemSslSubjectAlternativeNamesResource = class extends _chunk45PLS73Kcjs.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 _chunkTB
1405
1405
  };
1406
1406
 
1407
1407
  // src/resources/configuration_item_types.ts
1408
- var ConfigurationItemTypesResource = class extends _chunkTBFXRNNEcjs.BaseResource {
1408
+ var ConfigurationItemTypesResource = class extends _chunk45PLS73Kcjs.BaseResource {
1409
1409
  constructor(http, pageSize) {
1410
1410
  super(http, {
1411
1411
  key: "configuration_item_types",
@@ -1479,7 +1479,7 @@ var ConfigurationItemTypesResource = class extends _chunkTBFXRNNEcjs.BaseResourc
1479
1479
  };
1480
1480
 
1481
1481
  // src/resources/configuration_item_webhooks.ts
1482
- var ConfigurationItemWebhooksResource = class extends _chunkTBFXRNNEcjs.BaseResource {
1482
+ var ConfigurationItemWebhooksResource = class extends _chunk45PLS73Kcjs.BaseResource {
1483
1483
  constructor(http, pageSize) {
1484
1484
  super(http, {
1485
1485
  key: "configuration_item_webhooks",
@@ -1555,7 +1555,7 @@ var ConfigurationItemWebhooksResource = class extends _chunkTBFXRNNEcjs.BaseReso
1555
1555
  };
1556
1556
 
1557
1557
  // src/resources/contact_group_contacts.ts
1558
- var ContactGroupContactsResource = class extends _chunkTBFXRNNEcjs.BaseResource {
1558
+ var ContactGroupContactsResource = class extends _chunk45PLS73Kcjs.BaseResource {
1559
1559
  constructor(http, pageSize) {
1560
1560
  super(http, {
1561
1561
  key: "contact_group_contacts",
@@ -1609,7 +1609,7 @@ var ContactGroupContactsResource = class extends _chunkTBFXRNNEcjs.BaseResource
1609
1609
  };
1610
1610
 
1611
1611
  // src/resources/contact_groups.ts
1612
- var ContactGroupsResource = class extends _chunkTBFXRNNEcjs.BaseResource {
1612
+ var ContactGroupsResource = class extends _chunk45PLS73Kcjs.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, _chunkTBFXRNNEcjs.NotFoundError)(`${label} not found`, { code: "NOT_FOUND", category: "not_found" });
1690
+ throw new (0, _chunk45PLS73Kcjs.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 = _chunkTBFXRNNEcjs.parseIdentifier.call(void 0, sourceContactId, "sourceContactId");
1696
- const destId = _chunkTBFXRNNEcjs.parseIdentifier.call(void 0, destinationCompanyId, "destinationCompanyId");
1695
+ const sourceId = _chunk45PLS73Kcjs.parseIdentifier.call(void 0, sourceContactId, "sourceContactId");
1696
+ const destId = _chunk45PLS73Kcjs.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, _chunkTBFXRNNEcjs.NotFoundError)(`Contact ${sourceId} has no companyID (cannot scope the source delete)`);
1700
+ throw new (0, _chunk45PLS73Kcjs.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, _chunkTBFXRNNEcjs.StaleObjectError)(
1705
+ throw new (0, _chunk45PLS73Kcjs.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 = _chunkTBFXRNNEcjs.unwrapItems.call(void 0, res).items;
1727
+ const items = _chunk45PLS73Kcjs.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, _chunkTBFXRNNEcjs.ConflictError)(
1730
+ throw new (0, _chunk45PLS73Kcjs.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 _chunkTBFXRNNEcjs.buildDryRunResult.call(void 0, {
1744
+ return _chunk45PLS73Kcjs.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, _chunkTBFXRNNEcjs.AutotaskConfigError)("contacts.moveToCompany: vendor create response has no itemId");
1770
+ throw new (0, _chunk45PLS73Kcjs.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 _chunkTBFXRNNEcjs.AutotaskError {
1789
+ var CompanyNotFoundError = class extends _chunk45PLS73Kcjs.AutotaskError {
1790
1790
  constructor(message, options = {}) {
1791
1791
  super(message, {
1792
1792
  code: "COMPANY_NOT_FOUND",
@@ -1797,7 +1797,7 @@ var CompanyNotFoundError = class extends _chunkTBFXRNNEcjs.AutotaskError {
1797
1797
  this.name = "CompanyNotFoundError";
1798
1798
  }
1799
1799
  };
1800
- var ContactCreateFailedError = class extends _chunkTBFXRNNEcjs.AutotaskError {
1800
+ var ContactCreateFailedError = class extends _chunk45PLS73Kcjs.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 _chunkTBFXRNNEcjs.AutotaskError {
1807
1807
  }
1808
1808
  };
1809
1809
  async function upsertByEmail(resource, companyID, email, extra, opts, http) {
1810
- const cid = _chunkTBFXRNNEcjs.parseIdentifier.call(void 0, companyID, "companyID");
1810
+ const cid = _chunk45PLS73Kcjs.parseIdentifier.call(void 0, companyID, "companyID");
1811
1811
  if (typeof email !== "string" || !EMAIL_SHAPE.test(email)) {
1812
- throw new (0, _chunkTBFXRNNEcjs.AutotaskConfigError)(
1812
+ throw new (0, _chunk45PLS73Kcjs.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, _chunkTBFXRNNEcjs.AutotaskConfigError)(
1819
+ throw new (0, _chunk45PLS73Kcjs.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, _chunkTBFXRNNEcjs.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, _chunk45PLS73Kcjs.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, _chunkTBFXRNNEcjs.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, _chunk45PLS73Kcjs.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 _chunkTBFXRNNEcjs.buildDryRunResult.call(void 0,
1849
+ return _chunk45PLS73Kcjs.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 _chunkTBFXRNNEcjs.buildDryRunResult.call(void 0,
1879
+ return _chunk45PLS73Kcjs.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 (!_chunkTBFXRNNEcjs.isAutotaskError.call(void 0, err) || err.vendorError === void 0) throw err;
1903
- const named = (_nullishCoalesce(_chunkTBFXRNNEcjs.parseVendorErrors.call(void 0, err.vendorError), () => ( []))).map((e) => e.field).filter((f) => f !== void 0);
1902
+ if (!_chunk45PLS73Kcjs.isAutotaskError.call(void 0, err) || err.vendorError === void 0) throw err;
1903
+ const named = (_nullishCoalesce(_chunk45PLS73Kcjs.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 = _chunkTBFXRNNEcjs.formatVendorDetail.call(void 0, err.vendorError);
1917
+ const detail = _chunk45PLS73Kcjs.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 _chunkTBFXRNNEcjs.BaseResource {
1934
+ var ContactsResource = class extends _chunk45PLS73Kcjs.BaseResource {
1935
1935
  constructor(http, pageSize) {
1936
1936
  super(http, {
1937
1937
  key: "contacts",
@@ -2023,7 +2023,7 @@ var ContactsResource = class extends _chunkTBFXRNNEcjs.BaseResource {
2023
2023
  };
2024
2024
 
2025
2025
  // src/resources/contact_webhooks.ts
2026
- var ContactWebhooksResource = class extends _chunkTBFXRNNEcjs.BaseResource {
2026
+ var ContactWebhooksResource = class extends _chunk45PLS73Kcjs.BaseResource {
2027
2027
  constructor(http, pageSize) {
2028
2028
  super(http, {
2029
2029
  key: "contact_webhooks",
@@ -2099,7 +2099,7 @@ var ContactWebhooksResource = class extends _chunkTBFXRNNEcjs.BaseResource {
2099
2099
  };
2100
2100
 
2101
2101
  // src/resources/contract_billing_rules.ts
2102
- var ContractBillingRulesResource = class extends _chunkTBFXRNNEcjs.BaseResource {
2102
+ var ContractBillingRulesResource = class extends _chunk45PLS73Kcjs.BaseResource {
2103
2103
  constructor(http, pageSize) {
2104
2104
  super(http, {
2105
2105
  key: "contract_billing_rules",
@@ -2165,7 +2165,7 @@ var ContractBillingRulesResource = class extends _chunkTBFXRNNEcjs.BaseResource
2165
2165
  };
2166
2166
 
2167
2167
  // src/resources/contract_block_hour_factors.ts
2168
- var ContractBlockHourFactorsResource = class extends _chunkTBFXRNNEcjs.BaseResource {
2168
+ var ContractBlockHourFactorsResource = class extends _chunk45PLS73Kcjs.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 _chunkTBFXRNNEcjs.BaseResou
2224
2224
  };
2225
2225
 
2226
2226
  // src/resources/contract_blocks.ts
2227
- var ContractBlocksResource = class extends _chunkTBFXRNNEcjs.BaseResource {
2227
+ var ContractBlocksResource = class extends _chunk45PLS73Kcjs.BaseResource {
2228
2228
  constructor(http, pageSize) {
2229
2229
  super(http, {
2230
2230
  key: "contract_blocks",
@@ -2283,7 +2283,7 @@ var ContractBlocksResource = class extends _chunkTBFXRNNEcjs.BaseResource {
2283
2283
  };
2284
2284
 
2285
2285
  // src/resources/contract_charges.ts
2286
- var ContractChargesResource = class extends _chunkTBFXRNNEcjs.BaseResource {
2286
+ var ContractChargesResource = class extends _chunk45PLS73Kcjs.BaseResource {
2287
2287
  constructor(http, pageSize) {
2288
2288
  super(http, {
2289
2289
  key: "contract_charges",
@@ -2354,7 +2354,7 @@ var ContractChargesResource = class extends _chunkTBFXRNNEcjs.BaseResource {
2354
2354
  };
2355
2355
 
2356
2356
  // src/resources/contract_exclusion_billing_codes.ts
2357
- var ContractExclusionBillingCodesResource = class extends _chunkTBFXRNNEcjs.BaseResource {
2357
+ var ContractExclusionBillingCodesResource = class extends _chunk45PLS73Kcjs.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 _chunkTBFXRNNEcjs.Base
2411
2411
  };
2412
2412
 
2413
2413
  // src/resources/contract_exclusion_roles.ts
2414
- var ContractExclusionRolesResource = class extends _chunkTBFXRNNEcjs.BaseResource {
2414
+ var ContractExclusionRolesResource = class extends _chunk45PLS73Kcjs.BaseResource {
2415
2415
  constructor(http, pageSize) {
2416
2416
  super(http, {
2417
2417
  key: "contract_exclusion_roles",
@@ -2468,7 +2468,7 @@ var ContractExclusionRolesResource = class extends _chunkTBFXRNNEcjs.BaseResourc
2468
2468
  };
2469
2469
 
2470
2470
  // src/resources/contract_exclusion_set_excluded_roles.ts
2471
- var ContractExclusionSetExcludedRolesResource = class extends _chunkTBFXRNNEcjs.BaseResource {
2471
+ var ContractExclusionSetExcludedRolesResource = class extends _chunk45PLS73Kcjs.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 _chunkTBFXRNNEcjs.
2525
2525
  };
2526
2526
 
2527
2527
  // src/resources/contract_exclusion_set_excluded_work_types.ts
2528
- var ContractExclusionSetExcludedWorkTypesResource = class extends _chunkTBFXRNNEcjs.BaseResource {
2528
+ var ContractExclusionSetExcludedWorkTypesResource = class extends _chunk45PLS73Kcjs.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 _chunkTBFXRNNE
2582
2582
  };
2583
2583
 
2584
2584
  // src/resources/contract_exclusion_sets.ts
2585
- var ContractExclusionSetsResource = class extends _chunkTBFXRNNEcjs.BaseResource {
2585
+ var ContractExclusionSetsResource = class extends _chunk45PLS73Kcjs.BaseResource {
2586
2586
  constructor(http, pageSize) {
2587
2587
  super(http, {
2588
2588
  key: "contract_exclusion_sets",
@@ -2656,7 +2656,7 @@ var ContractExclusionSetsResource = class extends _chunkTBFXRNNEcjs.BaseResource
2656
2656
  };
2657
2657
 
2658
2658
  // src/resources/contract_milestones.ts
2659
- var ContractMilestonesResource = class extends _chunkTBFXRNNEcjs.BaseResource {
2659
+ var ContractMilestonesResource = class extends _chunk45PLS73Kcjs.BaseResource {
2660
2660
  constructor(http, pageSize) {
2661
2661
  super(http, {
2662
2662
  key: "contract_milestones",
@@ -2715,7 +2715,7 @@ var ContractMilestonesResource = class extends _chunkTBFXRNNEcjs.BaseResource {
2715
2715
  };
2716
2716
 
2717
2717
  // src/resources/contract_notes.ts
2718
- var ContractNotesResource = class extends _chunkTBFXRNNEcjs.BaseResource {
2718
+ var ContractNotesResource = class extends _chunk45PLS73Kcjs.BaseResource {
2719
2719
  constructor(http, pageSize) {
2720
2720
  super(http, {
2721
2721
  key: "contract_notes",
@@ -2774,7 +2774,7 @@ var ContractNotesResource = class extends _chunkTBFXRNNEcjs.BaseResource {
2774
2774
  };
2775
2775
 
2776
2776
  // src/resources/contract_rates.ts
2777
- var ContractRatesResource = class extends _chunkTBFXRNNEcjs.BaseResource {
2777
+ var ContractRatesResource = class extends _chunk45PLS73Kcjs.BaseResource {
2778
2778
  constructor(http, pageSize) {
2779
2779
  super(http, {
2780
2780
  key: "contract_rates",
@@ -2833,7 +2833,7 @@ var ContractRatesResource = class extends _chunkTBFXRNNEcjs.BaseResource {
2833
2833
  };
2834
2834
 
2835
2835
  // src/resources/contract_retainers.ts
2836
- var ContractRetainersResource = class extends _chunkTBFXRNNEcjs.BaseResource {
2836
+ var ContractRetainersResource = class extends _chunk45PLS73Kcjs.BaseResource {
2837
2837
  constructor(http, pageSize) {
2838
2838
  super(http, {
2839
2839
  key: "contract_retainers",
@@ -2892,7 +2892,7 @@ var ContractRetainersResource = class extends _chunkTBFXRNNEcjs.BaseResource {
2892
2892
  };
2893
2893
 
2894
2894
  // src/resources/contract_role_costs.ts
2895
- var ContractRoleCostsResource = class extends _chunkTBFXRNNEcjs.BaseResource {
2895
+ var ContractRoleCostsResource = class extends _chunk45PLS73Kcjs.BaseResource {
2896
2896
  constructor(http, pageSize) {
2897
2897
  super(http, {
2898
2898
  key: "contract_role_costs",
@@ -2951,7 +2951,7 @@ var ContractRoleCostsResource = class extends _chunkTBFXRNNEcjs.BaseResource {
2951
2951
  };
2952
2952
 
2953
2953
  // src/resources/contract_service_adjustments.ts
2954
- var ContractServiceAdjustmentsResource = class extends _chunkTBFXRNNEcjs.BaseResource {
2954
+ var ContractServiceAdjustmentsResource = class extends _chunk45PLS73Kcjs.BaseResource {
2955
2955
  constructor(http, pageSize) {
2956
2956
  super(http, {
2957
2957
  key: "contract_service_adjustments",
@@ -2985,7 +2985,7 @@ var ContractServiceAdjustmentsResource = class extends _chunkTBFXRNNEcjs.BaseRes
2985
2985
  };
2986
2986
 
2987
2987
  // src/resources/contract_service_bundle_adjustments.ts
2988
- var ContractServiceBundleAdjustmentsResource = class extends _chunkTBFXRNNEcjs.BaseResource {
2988
+ var ContractServiceBundleAdjustmentsResource = class extends _chunk45PLS73Kcjs.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 _chunkTBFXRNNEcjs.B
3019
3019
  };
3020
3020
 
3021
3021
  // src/resources/contract_service_bundles.ts
3022
- var ContractServiceBundlesResource = class extends _chunkTBFXRNNEcjs.BaseResource {
3022
+ var ContractServiceBundlesResource = class extends _chunk45PLS73Kcjs.BaseResource {
3023
3023
  constructor(http, pageSize) {
3024
3024
  super(http, {
3025
3025
  key: "contract_service_bundles",
@@ -3078,7 +3078,7 @@ var ContractServiceBundlesResource = class extends _chunkTBFXRNNEcjs.BaseResourc
3078
3078
  };
3079
3079
 
3080
3080
  // src/resources/contract_service_bundle_units.ts
3081
- var ContractServiceBundleUnitsResource = class extends _chunkTBFXRNNEcjs.BaseResource {
3081
+ var ContractServiceBundleUnitsResource = class extends _chunk45PLS73Kcjs.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 _chunkTBFXRNNEcjs.BaseRes
3120
3120
  };
3121
3121
 
3122
3122
  // src/resources/contract_services.ts
3123
- var ContractServicesResource = class extends _chunkTBFXRNNEcjs.BaseResource {
3123
+ var ContractServicesResource = class extends _chunk45PLS73Kcjs.BaseResource {
3124
3124
  constructor(http, pageSize) {
3125
3125
  super(http, {
3126
3126
  key: "contract_services",
@@ -3179,7 +3179,7 @@ var ContractServicesResource = class extends _chunkTBFXRNNEcjs.BaseResource {
3179
3179
  };
3180
3180
 
3181
3181
  // src/resources/contract_service_units.ts
3182
- var ContractServiceUnitsResource = class extends _chunkTBFXRNNEcjs.BaseResource {
3182
+ var ContractServiceUnitsResource = class extends _chunk45PLS73Kcjs.BaseResource {
3183
3183
  constructor(http, pageSize) {
3184
3184
  super(http, {
3185
3185
  key: "contract_service_units",
@@ -3221,7 +3221,7 @@ var ContractServiceUnitsResource = class extends _chunkTBFXRNNEcjs.BaseResource
3221
3221
  };
3222
3222
 
3223
3223
  // src/resources/contract_ticket_purchases.ts
3224
- var ContractTicketPurchasesResource = class extends _chunkTBFXRNNEcjs.BaseResource {
3224
+ var ContractTicketPurchasesResource = class extends _chunk45PLS73Kcjs.BaseResource {
3225
3225
  constructor(http, pageSize) {
3226
3226
  super(http, {
3227
3227
  key: "contract_ticket_purchases",
@@ -3280,7 +3280,7 @@ var ContractTicketPurchasesResource = class extends _chunkTBFXRNNEcjs.BaseResour
3280
3280
  };
3281
3281
 
3282
3282
  // src/resources/countries.ts
3283
- var CountriesResource = class extends _chunkTBFXRNNEcjs.BaseResource {
3283
+ var CountriesResource = class extends _chunk45PLS73Kcjs.BaseResource {
3284
3284
  constructor(http, pageSize) {
3285
3285
  super(http, {
3286
3286
  key: "countries",
@@ -3339,7 +3339,7 @@ var CountriesResource = class extends _chunkTBFXRNNEcjs.BaseResource {
3339
3339
  };
3340
3340
 
3341
3341
  // src/resources/currencies.ts
3342
- var CurrenciesResource = class extends _chunkTBFXRNNEcjs.BaseResource {
3342
+ var CurrenciesResource = class extends _chunk45PLS73Kcjs.BaseResource {
3343
3343
  constructor(http, pageSize) {
3344
3344
  super(http, {
3345
3345
  key: "currencies",
@@ -3383,7 +3383,7 @@ var CurrenciesResource = class extends _chunkTBFXRNNEcjs.BaseResource {
3383
3383
  };
3384
3384
 
3385
3385
  // src/resources/departments.ts
3386
- var DepartmentsResource = class extends _chunkTBFXRNNEcjs.BaseResource {
3386
+ var DepartmentsResource = class extends _chunk45PLS73Kcjs.BaseResource {
3387
3387
  constructor(http, pageSize) {
3388
3388
  super(http, {
3389
3389
  key: "departments",
@@ -3450,7 +3450,7 @@ var DepartmentsResource = class extends _chunkTBFXRNNEcjs.BaseResource {
3450
3450
  };
3451
3451
 
3452
3452
  // src/resources/domain_registrars.ts
3453
- var DomainRegistrarsResource = class extends _chunkTBFXRNNEcjs.BaseResource {
3453
+ var DomainRegistrarsResource = class extends _chunk45PLS73Kcjs.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 _chunkTBFXRNNEcjs.BaseResource {
3536
+ var ExpenseItemAttachmentsResource = class extends _chunk45PLS73Kcjs.BaseResource {
3537
3537
  constructor(http, pageSize) {
3538
3538
  super(http, {
3539
3539
  key: "expense_item_attachments",
@@ -3595,7 +3595,7 @@ var ExpenseItemAttachmentsResource = class extends _chunkTBFXRNNEcjs.BaseResourc
3595
3595
  };
3596
3596
 
3597
3597
  // src/resources/expense_items.ts
3598
- var ExpenseItemsResource = class extends _chunkTBFXRNNEcjs.BaseResource {
3598
+ var ExpenseItemsResource = class extends _chunk45PLS73Kcjs.BaseResource {
3599
3599
  constructor(http, pageSize) {
3600
3600
  super(http, {
3601
3601
  key: "expense_items",
@@ -3654,7 +3654,7 @@ var ExpenseItemsResource = class extends _chunkTBFXRNNEcjs.BaseResource {
3654
3654
  };
3655
3655
 
3656
3656
  // src/resources/expense_reports.ts
3657
- var ExpenseReportsResource = class extends _chunkTBFXRNNEcjs.BaseResource {
3657
+ var ExpenseReportsResource = class extends _chunk45PLS73Kcjs.BaseResource {
3658
3658
  constructor(http, pageSize) {
3659
3659
  super(http, {
3660
3660
  key: "expense_reports",
@@ -3721,7 +3721,7 @@ var ExpenseReportsResource = class extends _chunkTBFXRNNEcjs.BaseResource {
3721
3721
  };
3722
3722
 
3723
3723
  // src/resources/holiday_sets.ts
3724
- var HolidaySetsResource = class extends _chunkTBFXRNNEcjs.BaseResource {
3724
+ var HolidaySetsResource = class extends _chunk45PLS73Kcjs.BaseResource {
3725
3725
  constructor(http, pageSize) {
3726
3726
  super(http, {
3727
3727
  key: "holiday_sets",
@@ -3790,7 +3790,7 @@ var HolidaySetsResource = class extends _chunkTBFXRNNEcjs.BaseResource {
3790
3790
  };
3791
3791
 
3792
3792
  // src/resources/holidays.ts
3793
- var HolidaysResource = class extends _chunkTBFXRNNEcjs.BaseResource {
3793
+ var HolidaysResource = class extends _chunk45PLS73Kcjs.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 = _chunkTBFXRNNEcjs.parseIdentifier.call(void 0, parentId, "parentId");
3865
+ const numericParent = _chunk45PLS73Kcjs.parseIdentifier.call(void 0, parentId, "parentId");
3866
3866
  const suffix = PATH_SUFFIX[kind];
3867
3867
  if (opts.dryRun === true) {
3868
- return _chunkTBFXRNNEcjs.buildDryRunResult.call(void 0, {
3868
+ return _chunk45PLS73Kcjs.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 _chunkTBFXRNNEcjs.unwrapOperation.call(void 0, res);
3885
+ return _chunk45PLS73Kcjs.unwrapOperation.call(void 0, res);
3886
3886
  }
3887
3887
 
3888
3888
  // src/resources/inventory_products.ts
3889
- var InventoryProductsResource = class extends _chunkTBFXRNNEcjs.BaseResource {
3889
+ var InventoryProductsResource = class extends _chunk45PLS73Kcjs.BaseResource {
3890
3890
  constructor(http, pageSize) {
3891
3891
  super(http, {
3892
3892
  key: "inventory_products",
@@ -3967,7 +3967,7 @@ var InventoryProductsResource = class extends _chunkTBFXRNNEcjs.BaseResource {
3967
3967
  };
3968
3968
 
3969
3969
  // src/resources/invoice_templates.ts
3970
- var InvoiceTemplatesResource = class extends _chunkTBFXRNNEcjs.BaseResource {
3970
+ var InvoiceTemplatesResource = class extends _chunk45PLS73Kcjs.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 _chunkTBFXRNNEcjs.BaseResource {
4014
+ var NotificationHistoryResource = class extends _chunk45PLS73Kcjs.BaseResource {
4015
4015
  constructor(http, pageSize) {
4016
4016
  super(http, {
4017
4017
  key: "notification_history",
@@ -4050,7 +4050,7 @@ var NotificationHistoryResource = class extends _chunkTBFXRNNEcjs.BaseResource {
4050
4050
  };
4051
4051
 
4052
4052
  // src/resources/opportunities.ts
4053
- var OpportunitiesResource = class extends _chunkTBFXRNNEcjs.BaseResource {
4053
+ var OpportunitiesResource = class extends _chunk45PLS73Kcjs.BaseResource {
4054
4054
  constructor(http, pageSize) {
4055
4055
  super(http, {
4056
4056
  key: "opportunities",
@@ -4112,7 +4112,7 @@ var OpportunitiesResource = class extends _chunkTBFXRNNEcjs.BaseResource {
4112
4112
  };
4113
4113
 
4114
4114
  // src/resources/opportunity_attachments.ts
4115
- var OpportunityAttachmentsResource = class extends _chunkTBFXRNNEcjs.BaseResource {
4115
+ var OpportunityAttachmentsResource = class extends _chunk45PLS73Kcjs.BaseResource {
4116
4116
  constructor(http, pageSize) {
4117
4117
  super(http, {
4118
4118
  key: "opportunity_attachments",
@@ -4174,7 +4174,7 @@ var OpportunityAttachmentsResource = class extends _chunkTBFXRNNEcjs.BaseResourc
4174
4174
  };
4175
4175
 
4176
4176
  // src/resources/opportunity_categories.ts
4177
- var OpportunityCategoriesResource = class extends _chunkTBFXRNNEcjs.BaseResource {
4177
+ var OpportunityCategoriesResource = class extends _chunk45PLS73Kcjs.BaseResource {
4178
4178
  constructor(http, pageSize) {
4179
4179
  super(http, {
4180
4180
  key: "opportunity_categories",
@@ -4233,7 +4233,7 @@ var OpportunityCategoriesResource = class extends _chunkTBFXRNNEcjs.BaseResource
4233
4233
  };
4234
4234
 
4235
4235
  // src/resources/phases.ts
4236
- var PhasesResource = class extends _chunkTBFXRNNEcjs.BaseResource {
4236
+ var PhasesResource = class extends _chunk45PLS73Kcjs.BaseResource {
4237
4237
  constructor(http, pageSize) {
4238
4238
  super(http, {
4239
4239
  key: "phases",
@@ -4292,7 +4292,7 @@ var PhasesResource = class extends _chunkTBFXRNNEcjs.BaseResource {
4292
4292
  };
4293
4293
 
4294
4294
  // src/resources/products.ts
4295
- var ProductsResource = class extends _chunkTBFXRNNEcjs.BaseResource {
4295
+ var ProductsResource = class extends _chunk45PLS73Kcjs.BaseResource {
4296
4296
  constructor(http, pageSize) {
4297
4297
  super(http, {
4298
4298
  key: "products",
@@ -4359,7 +4359,7 @@ var ProductsResource = class extends _chunkTBFXRNNEcjs.BaseResource {
4359
4359
  };
4360
4360
 
4361
4361
  // src/resources/product_vendors.ts
4362
- var ProductVendorsResource = class extends _chunkTBFXRNNEcjs.BaseResource {
4362
+ var ProductVendorsResource = class extends _chunk45PLS73Kcjs.BaseResource {
4363
4363
  constructor(http, pageSize) {
4364
4364
  super(http, {
4365
4365
  key: "product_vendors",
@@ -4418,7 +4418,7 @@ var ProductVendorsResource = class extends _chunkTBFXRNNEcjs.BaseResource {
4418
4418
  };
4419
4419
 
4420
4420
  // src/resources/project_charges.ts
4421
- var ProjectChargesResource = class extends _chunkTBFXRNNEcjs.BaseResource {
4421
+ var ProjectChargesResource = class extends _chunk45PLS73Kcjs.BaseResource {
4422
4422
  constructor(http, pageSize) {
4423
4423
  super(http, {
4424
4424
  key: "project_charges",
@@ -4489,7 +4489,7 @@ var ProjectChargesResource = class extends _chunkTBFXRNNEcjs.BaseResource {
4489
4489
  };
4490
4490
 
4491
4491
  // src/resources/project_notes.ts
4492
- var ProjectNotesResource = class extends _chunkTBFXRNNEcjs.BaseResource {
4492
+ var ProjectNotesResource = class extends _chunk45PLS73Kcjs.BaseResource {
4493
4493
  constructor(http, pageSize) {
4494
4494
  super(http, {
4495
4495
  key: "project_notes",
@@ -4548,7 +4548,7 @@ var ProjectNotesResource = class extends _chunkTBFXRNNEcjs.BaseResource {
4548
4548
  };
4549
4549
 
4550
4550
  // src/resources/projects.ts
4551
- var ProjectsResource = class extends _chunkTBFXRNNEcjs.BaseResource {
4551
+ var ProjectsResource = class extends _chunk45PLS73Kcjs.BaseResource {
4552
4552
  constructor(http, pageSize) {
4553
4553
  super(http, {
4554
4554
  key: "projects",
@@ -4625,13 +4625,13 @@ var ProjectsResource = class extends _chunkTBFXRNNEcjs.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 = _chunkTBFXRNNEcjs.createNamePlan.call(void 0, );
4628
+ const builder = _chunk45PLS73Kcjs.createNamePlan.call(void 0, );
4629
4629
  builder.addResource(root["creatorResourceID"]);
4630
4630
  builder.addFk("contract", root["contractID"]);
4631
- const names = await _chunkTBFXRNNEcjs.resolveCompositeNames.call(void 0, this.http, builder.plan(), { maxNameReads: opts.maxNameReads });
4631
+ const names = await _chunk45PLS73Kcjs.resolveCompositeNames.call(void 0, this.http, builder.plan(), { maxNameReads: opts.maxNameReads });
4632
4632
  const row = { ...project };
4633
- _chunkTBFXRNNEcjs.addNameSibling.call(void 0, row, "creatorResourceID", (v) => names.resourceName(v));
4634
- _chunkTBFXRNNEcjs.addNameSibling.call(void 0, row, "contractID", (v) => names.recordName("contract", v));
4633
+ _chunk45PLS73Kcjs.addNameSibling.call(void 0, row, "creatorResourceID", (v) => names.resourceName(v));
4634
+ _chunk45PLS73Kcjs.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 _chunkTBFXRNNEcjs.BaseResource {
4640
4640
  };
4641
4641
 
4642
4642
  // src/resources/purchase_approvals.ts
4643
- var PurchaseApprovalsResource = class extends _chunkTBFXRNNEcjs.BaseResource {
4643
+ var PurchaseApprovalsResource = class extends _chunk45PLS73Kcjs.BaseResource {
4644
4644
  constructor(http, pageSize) {
4645
4645
  super(http, {
4646
4646
  key: "purchase_approvals",
@@ -4694,7 +4694,7 @@ var PurchaseApprovalsResource = class extends _chunkTBFXRNNEcjs.BaseResource {
4694
4694
  };
4695
4695
 
4696
4696
  // src/resources/purchase_order_item_receiving.ts
4697
- var PurchaseOrderItemReceivingResource = class extends _chunkTBFXRNNEcjs.BaseResource {
4697
+ var PurchaseOrderItemReceivingResource = class extends _chunk45PLS73Kcjs.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 _chunkTBFXRNNEcjs.BaseRes
4744
4744
  };
4745
4745
 
4746
4746
  // src/resources/purchase_order_items.ts
4747
- var PurchaseOrderItemsResource = class extends _chunkTBFXRNNEcjs.BaseResource {
4747
+ var PurchaseOrderItemsResource = class extends _chunk45PLS73Kcjs.BaseResource {
4748
4748
  constructor(http, pageSize) {
4749
4749
  super(http, {
4750
4750
  key: "purchase_order_items",
@@ -4803,7 +4803,7 @@ var PurchaseOrderItemsResource = class extends _chunkTBFXRNNEcjs.BaseResource {
4803
4803
  };
4804
4804
 
4805
4805
  // src/resources/purchase_orders.ts
4806
- var PurchaseOrdersResource = class extends _chunkTBFXRNNEcjs.BaseResource {
4806
+ var PurchaseOrdersResource = class extends _chunk45PLS73Kcjs.BaseResource {
4807
4807
  constructor(http, pageSize) {
4808
4808
  super(http, {
4809
4809
  key: "purchase_orders",
@@ -4865,7 +4865,7 @@ var PurchaseOrdersResource = class extends _chunkTBFXRNNEcjs.BaseResource {
4865
4865
  };
4866
4866
 
4867
4867
  // src/resources/quote_items.ts
4868
- var QuoteItemsResource = class extends _chunkTBFXRNNEcjs.BaseResource {
4868
+ var QuoteItemsResource = class extends _chunk45PLS73Kcjs.BaseResource {
4869
4869
  constructor(http, pageSize) {
4870
4870
  super(http, {
4871
4871
  key: "quote_items",
@@ -4936,7 +4936,7 @@ var QuoteItemsResource = class extends _chunkTBFXRNNEcjs.BaseResource {
4936
4936
  };
4937
4937
 
4938
4938
  // src/resources/quote_locations.ts
4939
- var QuoteLocationsResource = class extends _chunkTBFXRNNEcjs.BaseResource {
4939
+ var QuoteLocationsResource = class extends _chunk45PLS73Kcjs.BaseResource {
4940
4940
  constructor(http, pageSize) {
4941
4941
  super(http, {
4942
4942
  key: "quote_locations",
@@ -5001,7 +5001,7 @@ var QuoteLocationsResource = class extends _chunkTBFXRNNEcjs.BaseResource {
5001
5001
  };
5002
5002
 
5003
5003
  // src/resources/quotes.ts
5004
- var QuotesResource = class extends _chunkTBFXRNNEcjs.BaseResource {
5004
+ var QuotesResource = class extends _chunk45PLS73Kcjs.BaseResource {
5005
5005
  constructor(http, pageSize) {
5006
5006
  super(http, {
5007
5007
  key: "quotes",
@@ -5068,7 +5068,7 @@ var QuotesResource = class extends _chunkTBFXRNNEcjs.BaseResource {
5068
5068
  };
5069
5069
 
5070
5070
  // src/resources/quote_templates.ts
5071
- var QuoteTemplatesResource = class extends _chunkTBFXRNNEcjs.BaseResource {
5071
+ var QuoteTemplatesResource = class extends _chunk45PLS73Kcjs.BaseResource {
5072
5072
  constructor(http, pageSize) {
5073
5073
  super(http, {
5074
5074
  key: "quote_templates",
@@ -5112,7 +5112,7 @@ var QuoteTemplatesResource = class extends _chunkTBFXRNNEcjs.BaseResource {
5112
5112
  };
5113
5113
 
5114
5114
  // src/resources/resource_role_queues.ts
5115
- var ResourceRoleQueuesResource = class extends _chunkTBFXRNNEcjs.BaseResource {
5115
+ var ResourceRoleQueuesResource = class extends _chunk45PLS73Kcjs.BaseResource {
5116
5116
  constructor(http, pageSize) {
5117
5117
  super(http, {
5118
5118
  key: "resource_role_queues",
@@ -5171,7 +5171,7 @@ var ResourceRoleQueuesResource = class extends _chunkTBFXRNNEcjs.BaseResource {
5171
5171
  };
5172
5172
 
5173
5173
  // src/resources/resource_roles.ts
5174
- var ResourceRolesResource = class extends _chunkTBFXRNNEcjs.BaseResource {
5174
+ var ResourceRolesResource = class extends _chunk45PLS73Kcjs.BaseResource {
5175
5175
  constructor(http, pageSize) {
5176
5176
  super(http, {
5177
5177
  key: "resource_roles",
@@ -5213,7 +5213,7 @@ var ResourceRolesResource = class extends _chunkTBFXRNNEcjs.BaseResource {
5213
5213
  };
5214
5214
 
5215
5215
  // src/resources/resource_skills.ts
5216
- var ResourceSkillsResource = class extends _chunkTBFXRNNEcjs.BaseResource {
5216
+ var ResourceSkillsResource = class extends _chunk45PLS73Kcjs.BaseResource {
5217
5217
  constructor(http, pageSize) {
5218
5218
  super(http, {
5219
5219
  key: "resource_skills",
@@ -5265,7 +5265,7 @@ var ResourceSkillsResource = class extends _chunkTBFXRNNEcjs.BaseResource {
5265
5265
 
5266
5266
  // src/resources/special/resource_time_off_additional.ts
5267
5267
  async function getByResource(_resource, resourceId, http) {
5268
- const numericResource = _chunkTBFXRNNEcjs.parseIdentifier.call(void 0, resourceId, "resourceId");
5268
+ const numericResource = _chunk45PLS73Kcjs.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 _chunkTBFXRNNEcjs.unwrapItems.call(void 0, res, "resource_time_off_additional.getByResource").items;
5282
+ return _chunk45PLS73Kcjs.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 _chunkTBFXRNNEcjs.BaseResource {
5286
+ var ResourceTimeOffAdditionalResource = class extends _chunk45PLS73Kcjs.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 _chunkTBFXRNNEcjs.BaseReso
5322
5322
  };
5323
5323
 
5324
5324
  // src/resources/resource_time_off_approvers.ts
5325
- var ResourceTimeOffApproversResource = class extends _chunkTBFXRNNEcjs.BaseResource {
5325
+ var ResourceTimeOffApproversResource = class extends _chunk45PLS73Kcjs.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 _chunkTBFXRNNEcjs.BaseResou
5365
5365
 
5366
5366
  // src/resources/special/resource_time_off_balances.ts
5367
5367
  async function getByResource2(_resource, resourceId, http) {
5368
- const numericResource = _chunkTBFXRNNEcjs.parseIdentifier.call(void 0, resourceId, "resourceId");
5368
+ const numericResource = _chunk45PLS73Kcjs.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 _chunkTBFXRNNEcjs.unwrapItems.call(void 0, res, "resource_time_off_balances.getByResource").items;
5374
+ return _chunk45PLS73Kcjs.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 = _chunkTBFXRNNEcjs.parseIdentifier.call(void 0, resourceId, "resourceId");
5377
+ const numericResource = _chunk45PLS73Kcjs.parseIdentifier.call(void 0, resourceId, "resourceId");
5378
5378
  if (!Number.isSafeInteger(year) || year < 1) {
5379
- throw new (0, _chunkTBFXRNNEcjs.AutotaskConfigError)("getByYear: year must be a positive integer");
5379
+ throw new (0, _chunk45PLS73Kcjs.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 _chunkTBFXRNNEcjs.unwrapItem.call(void 0, res, year, "resource_time_off_balances.getByYear", "resource_time_off_balance");
5386
+ return _chunk45PLS73Kcjs.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 _chunkTBFXRNNEcjs.BaseResource {
5390
+ var ResourceTimeOffBalancesResource = class extends _chunk45PLS73Kcjs.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 _chunkTBFXRNNEcjs.BaseResour
5425
5425
  };
5426
5426
 
5427
5427
  // src/resources/roles.ts
5428
- var RolesResource = class extends _chunkTBFXRNNEcjs.BaseResource {
5428
+ var RolesResource = class extends _chunk45PLS73Kcjs.BaseResource {
5429
5429
  constructor(http, pageSize) {
5430
5430
  super(http, {
5431
5431
  key: "roles",
@@ -5492,7 +5492,7 @@ var RolesResource = class extends _chunkTBFXRNNEcjs.BaseResource {
5492
5492
  };
5493
5493
 
5494
5494
  // src/resources/sales_orders.ts
5495
- var SalesOrdersResource = class extends _chunkTBFXRNNEcjs.BaseResource {
5495
+ var SalesOrdersResource = class extends _chunk45PLS73Kcjs.BaseResource {
5496
5496
  constructor(http, pageSize) {
5497
5497
  super(http, {
5498
5498
  key: "sales_orders",
@@ -5535,7 +5535,7 @@ var SalesOrdersResource = class extends _chunkTBFXRNNEcjs.BaseResource {
5535
5535
  };
5536
5536
 
5537
5537
  // src/resources/service_calls.ts
5538
- var ServiceCallsResource = class extends _chunkTBFXRNNEcjs.BaseResource {
5538
+ var ServiceCallsResource = class extends _chunk45PLS73Kcjs.BaseResource {
5539
5539
  constructor(http, pageSize) {
5540
5540
  super(http, {
5541
5541
  key: "service_calls",
@@ -5604,7 +5604,7 @@ var ServiceCallsResource = class extends _chunkTBFXRNNEcjs.BaseResource {
5604
5604
  };
5605
5605
 
5606
5606
  // src/resources/service_call_task_resources.ts
5607
- var ServiceCallTaskResourcesResource = class extends _chunkTBFXRNNEcjs.BaseResource {
5607
+ var ServiceCallTaskResourcesResource = class extends _chunk45PLS73Kcjs.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 _chunkTBFXRNNEcjs.BaseResou
5661
5661
  };
5662
5662
 
5663
5663
  // src/resources/service_call_tasks.ts
5664
- var ServiceCallTasksResource = class extends _chunkTBFXRNNEcjs.BaseResource {
5664
+ var ServiceCallTasksResource = class extends _chunk45PLS73Kcjs.BaseResource {
5665
5665
  constructor(http, pageSize) {
5666
5666
  super(http, {
5667
5667
  key: "service_call_tasks",
@@ -5718,7 +5718,7 @@ var ServiceCallTasksResource = class extends _chunkTBFXRNNEcjs.BaseResource {
5718
5718
  };
5719
5719
 
5720
5720
  // src/resources/service_call_ticket_resources.ts
5721
- var ServiceCallTicketResourcesResource = class extends _chunkTBFXRNNEcjs.BaseResource {
5721
+ var ServiceCallTicketResourcesResource = class extends _chunk45PLS73Kcjs.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 _chunkTBFXRNNEcjs.BaseRes
5775
5775
  };
5776
5776
 
5777
5777
  // src/resources/service_call_tickets.ts
5778
- var ServiceCallTicketsResource = class extends _chunkTBFXRNNEcjs.BaseResource {
5778
+ var ServiceCallTicketsResource = class extends _chunk45PLS73Kcjs.BaseResource {
5779
5779
  constructor(http, pageSize) {
5780
5780
  super(http, {
5781
5781
  key: "service_call_tickets",
@@ -5832,7 +5832,7 @@ var ServiceCallTicketsResource = class extends _chunkTBFXRNNEcjs.BaseResource {
5832
5832
  };
5833
5833
 
5834
5834
  // src/resources/service_level_agreement_results.ts
5835
- var ServiceLevelAgreementResultsResource = class extends _chunkTBFXRNNEcjs.BaseResource {
5835
+ var ServiceLevelAgreementResultsResource = class extends _chunk45PLS73Kcjs.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 _chunkTBFXRNNEcjs.BaseR
5871
5871
  };
5872
5872
 
5873
5873
  // src/resources/services.ts
5874
- var ServicesResource = class extends _chunkTBFXRNNEcjs.BaseResource {
5874
+ var ServicesResource = class extends _chunk45PLS73Kcjs.BaseResource {
5875
5875
  constructor(http, pageSize) {
5876
5876
  super(http, {
5877
5877
  key: "services",
@@ -5939,7 +5939,7 @@ var ServicesResource = class extends _chunkTBFXRNNEcjs.BaseResource {
5939
5939
  };
5940
5940
 
5941
5941
  // src/resources/skills.ts
5942
- var SkillsResource = class extends _chunkTBFXRNNEcjs.BaseResource {
5942
+ var SkillsResource = class extends _chunk45PLS73Kcjs.BaseResource {
5943
5943
  constructor(http, pageSize) {
5944
5944
  super(http, {
5945
5945
  key: "skills",
@@ -5983,7 +5983,7 @@ var SkillsResource = class extends _chunkTBFXRNNEcjs.BaseResource {
5983
5983
  };
5984
5984
 
5985
5985
  // src/resources/subscription_periods.ts
5986
- var SubscriptionPeriodsResource = class extends _chunkTBFXRNNEcjs.BaseResource {
5986
+ var SubscriptionPeriodsResource = class extends _chunk45PLS73Kcjs.BaseResource {
5987
5987
  constructor(http, pageSize) {
5988
5988
  super(http, {
5989
5989
  key: "subscription_periods",
@@ -6022,7 +6022,7 @@ var SubscriptionPeriodsResource = class extends _chunkTBFXRNNEcjs.BaseResource {
6022
6022
  };
6023
6023
 
6024
6024
  // src/resources/subscriptions.ts
6025
- var SubscriptionsResource = class extends _chunkTBFXRNNEcjs.BaseResource {
6025
+ var SubscriptionsResource = class extends _chunk45PLS73Kcjs.BaseResource {
6026
6026
  constructor(http, pageSize) {
6027
6027
  super(http, {
6028
6028
  key: "subscriptions",
@@ -6091,7 +6091,7 @@ var SubscriptionsResource = class extends _chunkTBFXRNNEcjs.BaseResource {
6091
6091
  };
6092
6092
 
6093
6093
  // src/resources/survey_results.ts
6094
- var SurveyResultsResource = class extends _chunkTBFXRNNEcjs.BaseResource {
6094
+ var SurveyResultsResource = class extends _chunk45PLS73Kcjs.BaseResource {
6095
6095
  constructor(http, pageSize) {
6096
6096
  super(http, {
6097
6097
  key: "survey_results",
@@ -6130,7 +6130,7 @@ var SurveyResultsResource = class extends _chunkTBFXRNNEcjs.BaseResource {
6130
6130
  };
6131
6131
 
6132
6132
  // src/resources/surveys.ts
6133
- var SurveysResource = class extends _chunkTBFXRNNEcjs.BaseResource {
6133
+ var SurveysResource = class extends _chunk45PLS73Kcjs.BaseResource {
6134
6134
  constructor(http, pageSize) {
6135
6135
  super(http, {
6136
6136
  key: "surveys",
@@ -6174,7 +6174,7 @@ var SurveysResource = class extends _chunkTBFXRNNEcjs.BaseResource {
6174
6174
  };
6175
6175
 
6176
6176
  // src/resources/tag_aliases.ts
6177
- var TagAliasesResource = class extends _chunkTBFXRNNEcjs.BaseResource {
6177
+ var TagAliasesResource = class extends _chunk45PLS73Kcjs.BaseResource {
6178
6178
  constructor(http, pageSize) {
6179
6179
  super(http, {
6180
6180
  key: "tag_aliases",
@@ -6231,7 +6231,7 @@ var TagAliasesResource = class extends _chunkTBFXRNNEcjs.BaseResource {
6231
6231
  };
6232
6232
 
6233
6233
  // src/resources/tag_groups.ts
6234
- var TagGroupsResource = class extends _chunkTBFXRNNEcjs.BaseResource {
6234
+ var TagGroupsResource = class extends _chunk45PLS73Kcjs.BaseResource {
6235
6235
  constructor(http, pageSize) {
6236
6236
  super(http, {
6237
6237
  key: "tag_groups",
@@ -6300,7 +6300,7 @@ var TagGroupsResource = class extends _chunkTBFXRNNEcjs.BaseResource {
6300
6300
  };
6301
6301
 
6302
6302
  // src/resources/tags.ts
6303
- var TagsResource = class extends _chunkTBFXRNNEcjs.BaseResource {
6303
+ var TagsResource = class extends _chunk45PLS73Kcjs.BaseResource {
6304
6304
  constructor(http, pageSize) {
6305
6305
  super(http, {
6306
6306
  key: "tags",
@@ -6369,7 +6369,7 @@ var TagsResource = class extends _chunkTBFXRNNEcjs.BaseResource {
6369
6369
  };
6370
6370
 
6371
6371
  // src/resources/task_secondary_resources.ts
6372
- var TaskSecondaryResourcesResource = class extends _chunkTBFXRNNEcjs.BaseResource {
6372
+ var TaskSecondaryResourcesResource = class extends _chunk45PLS73Kcjs.BaseResource {
6373
6373
  constructor(http, pageSize) {
6374
6374
  super(http, {
6375
6375
  key: "task_secondary_resources",
@@ -6426,7 +6426,7 @@ var TaskSecondaryResourcesResource = class extends _chunkTBFXRNNEcjs.BaseResourc
6426
6426
  };
6427
6427
 
6428
6428
  // src/resources/tasks.ts
6429
- var TasksResource = class extends _chunkTBFXRNNEcjs.BaseResource {
6429
+ var TasksResource = class extends _chunk45PLS73Kcjs.BaseResource {
6430
6430
  constructor(http, pageSize) {
6431
6431
  super(http, {
6432
6432
  key: "tasks",
@@ -6490,7 +6490,7 @@ var TasksResource = class extends _chunkTBFXRNNEcjs.BaseResource {
6490
6490
  };
6491
6491
 
6492
6492
  // src/resources/tax_regions.ts
6493
- var TaxRegionsResource = class extends _chunkTBFXRNNEcjs.BaseResource {
6493
+ var TaxRegionsResource = class extends _chunk45PLS73Kcjs.BaseResource {
6494
6494
  constructor(http, pageSize) {
6495
6495
  super(http, {
6496
6496
  key: "tax_regions",
@@ -6565,7 +6565,7 @@ var ThresholdInformationResource = class {
6565
6565
  };
6566
6566
 
6567
6567
  // src/resources/ticket_additional_configuration_items.ts
6568
- var TicketAdditionalConfigurationItemsResource = class extends _chunkTBFXRNNEcjs.BaseResource {
6568
+ var TicketAdditionalConfigurationItemsResource = class extends _chunk45PLS73Kcjs.BaseResource {
6569
6569
  constructor(http, pageSize) {
6570
6570
  super(http, {
6571
6571
  key: "ticket_additional_configuration_items",
@@ -6622,7 +6622,7 @@ var TicketAdditionalConfigurationItemsResource = class extends _chunkTBFXRNNEcjs
6622
6622
  };
6623
6623
 
6624
6624
  // src/resources/ticket_additional_contacts.ts
6625
- var TicketAdditionalContactsResource = class extends _chunkTBFXRNNEcjs.BaseResource {
6625
+ var TicketAdditionalContactsResource = class extends _chunk45PLS73Kcjs.BaseResource {
6626
6626
  constructor(http, pageSize) {
6627
6627
  super(http, {
6628
6628
  key: "ticket_additional_contacts",
@@ -6679,7 +6679,7 @@ var TicketAdditionalContactsResource = class extends _chunkTBFXRNNEcjs.BaseResou
6679
6679
  };
6680
6680
 
6681
6681
  // src/resources/ticket_attachments.ts
6682
- var TicketAttachmentsResource = class extends _chunkTBFXRNNEcjs.BaseResource {
6682
+ var TicketAttachmentsResource = class extends _chunk45PLS73Kcjs.BaseResource {
6683
6683
  constructor(http, pageSize) {
6684
6684
  super(http, {
6685
6685
  key: "ticket_attachments",
@@ -6741,7 +6741,7 @@ var TicketAttachmentsResource = class extends _chunkTBFXRNNEcjs.BaseResource {
6741
6741
  };
6742
6742
 
6743
6743
  // src/resources/ticket_categories.ts
6744
- var TicketCategoriesResource = class extends _chunkTBFXRNNEcjs.BaseResource {
6744
+ var TicketCategoriesResource = class extends _chunk45PLS73Kcjs.BaseResource {
6745
6745
  constructor(http, pageSize) {
6746
6746
  super(http, {
6747
6747
  key: "ticket_categories",
@@ -6800,7 +6800,7 @@ var TicketCategoriesResource = class extends _chunkTBFXRNNEcjs.BaseResource {
6800
6800
  };
6801
6801
 
6802
6802
  // src/resources/ticket_category_field_defaults.ts
6803
- var TicketCategoryFieldDefaultsResource = class extends _chunkTBFXRNNEcjs.BaseResource {
6803
+ var TicketCategoryFieldDefaultsResource = class extends _chunk45PLS73Kcjs.BaseResource {
6804
6804
  constructor(http, pageSize) {
6805
6805
  super(http, {
6806
6806
  key: "ticket_category_field_defaults",
@@ -6842,7 +6842,7 @@ var TicketCategoryFieldDefaultsResource = class extends _chunkTBFXRNNEcjs.BaseRe
6842
6842
  };
6843
6843
 
6844
6844
  // src/resources/ticket_change_request_approvals.ts
6845
- var TicketChangeRequestApprovalsResource = class extends _chunkTBFXRNNEcjs.BaseResource {
6845
+ var TicketChangeRequestApprovalsResource = class extends _chunk45PLS73Kcjs.BaseResource {
6846
6846
  constructor(http, pageSize) {
6847
6847
  super(http, {
6848
6848
  key: "ticket_change_request_approvals",
@@ -6903,13 +6903,13 @@ var OP = "ticket_charges.moveToTicket";
6903
6903
  var COPY = ["name", "description", "chargeType", "billingCodeID", "productID", "unitQuantity", "unitCost", "unitPrice", "datePurchased", "isBillableToCompany", "notes", "purchaseOrderNumber", "internalPurchaseOrderNumber"];
6904
6904
  var CONTRACT_SCOPED = ["contractServiceID", "contractServiceBundleID"];
6905
6905
  async function readCharge(http, id, retries) {
6906
- const rows = await _chunkTBFXRNNEcjs.queryRows.call(void 0, http, "TicketCharges", [{ field: "id", op: "eq", value: id }], OP, retries);
6906
+ const rows = await _chunk45PLS73Kcjs.queryRows.call(void 0, http, "TicketCharges", [{ field: "id", op: "eq", value: id }], OP, retries);
6907
6907
  return _nullishCoalesce(rows[0], () => ( null));
6908
6908
  }
6909
6909
  async function checkSource({ http, source, sourceId, sourceTicketId, toTicketId }) {
6910
6910
  if (source.isBilled === true) {
6911
- throw _chunkTBFXRNNEcjs.refuse.call(void 0, "MOVE_BLOCKED_BILLED", `${OP}: ticket charge ${sourceId} is billed \u2014 move it in the Autotask UI`, { sourceId, toTicketId }, OP, {
6912
- manualAction: { action: "delete_source", uiLink: _chunkTBFXRNNEcjs.uiLinkFor.call(void 0, http, "tickets", sourceTicketId), reason: "billed charges are not moved by the API (the ticket link opens its charges)" }
6911
+ throw _chunk45PLS73Kcjs.refuse.call(void 0, "MOVE_BLOCKED_BILLED", `${OP}: ticket charge ${sourceId} is billed \u2014 move it in the Autotask UI`, { sourceId, toTicketId }, OP, {
6912
+ manualAction: { action: "delete_source", uiLink: _chunk45PLS73Kcjs.uiLinkFor.call(void 0, http, "tickets", sourceTicketId), reason: "billed charges are not moved by the API (the ticket link opens its charges)" }
6913
6913
  });
6914
6914
  }
6915
6915
  }
@@ -6943,14 +6943,14 @@ var SPEC = {
6943
6943
  ]
6944
6944
  }),
6945
6945
  // charges have no ExecuteCommand code: the parent ticket is the closest clickable target
6946
- manualLink: (http, source) => typeof source.ticketID === "number" ? _chunkTBFXRNNEcjs.uiLinkFor.call(void 0, http, "tickets", source.ticketID) : null
6946
+ manualLink: (http, source) => typeof source.ticketID === "number" ? _chunk45PLS73Kcjs.uiLinkFor.call(void 0, http, "tickets", source.ticketID) : null
6947
6947
  };
6948
6948
  function moveToTicket(_resource, sourceId, toTicketId, opts, http) {
6949
- return _chunkTBFXRNNEcjs.runMove.call(void 0, http, SPEC, sourceId, toTicketId, opts);
6949
+ return _chunk45PLS73Kcjs.runMove.call(void 0, http, SPEC, sourceId, toTicketId, opts);
6950
6950
  }
6951
6951
 
6952
6952
  // src/resources/ticket_charges.ts
6953
- var TicketChargesResource = class extends _chunkTBFXRNNEcjs.BaseResource {
6953
+ var TicketChargesResource = class extends _chunk45PLS73Kcjs.BaseResource {
6954
6954
  constructor(http, pageSize) {
6955
6955
  super(http, {
6956
6956
  key: "ticket_charges",
@@ -7025,7 +7025,7 @@ var TicketChargesResource = class extends _chunkTBFXRNNEcjs.BaseResource {
7025
7025
  };
7026
7026
 
7027
7027
  // src/resources/ticket_checklist_items.ts
7028
- var TicketChecklistItemsResource = class extends _chunkTBFXRNNEcjs.BaseResource {
7028
+ var TicketChecklistItemsResource = class extends _chunk45PLS73Kcjs.BaseResource {
7029
7029
  constructor(http, pageSize) {
7030
7030
  super(http, {
7031
7031
  key: "ticket_checklist_items",
@@ -7091,7 +7091,7 @@ var TicketChecklistItemsResource = class extends _chunkTBFXRNNEcjs.BaseResource
7091
7091
  };
7092
7092
 
7093
7093
  // src/resources/ticket_checklist_libraries.ts
7094
- var TicketChecklistLibrariesResource = class extends _chunkTBFXRNNEcjs.BaseResource {
7094
+ var TicketChecklistLibrariesResource = class extends _chunk45PLS73Kcjs.BaseResource {
7095
7095
  constructor(http, pageSize) {
7096
7096
  super(http, {
7097
7097
  key: "ticket_checklist_libraries",
@@ -7115,9 +7115,9 @@ var TicketChecklistLibrariesResource = class extends _chunkTBFXRNNEcjs.BaseResou
7115
7115
  * `dryRun: true` returns the pinned envelope (document existence is unverifiable in the MVP
7116
7116
  * surface — no documents read op — and never issues the POST). */
7117
7117
  async attachToDocument(documentID, data, opts = {}) {
7118
- const n = _chunkTBFXRNNEcjs.parseIdentifier.call(void 0, documentID, "documentID");
7118
+ const n = _chunk45PLS73Kcjs.parseIdentifier.call(void 0, documentID, "documentID");
7119
7119
  if (opts.dryRun === true) {
7120
- return _chunkTBFXRNNEcjs.buildDryRunResult.call(void 0, {
7120
+ return _chunk45PLS73Kcjs.buildDryRunResult.call(void 0, {
7121
7121
  operation: "ticket_checklist_libraries.attachToDocument",
7122
7122
  method: "POST",
7123
7123
  path: `/V1.0/Documents/${n}/ChecklistLibraries`,
@@ -7135,7 +7135,7 @@ var TicketChecklistLibrariesResource = class extends _chunkTBFXRNNEcjs.BaseResou
7135
7135
  operation: "ticket_checklist_libraries.attachToDocument",
7136
7136
  maxRetries: opts.maxRetries
7137
7137
  });
7138
- return _chunkTBFXRNNEcjs.unwrapOperation.call(void 0, res);
7138
+ return _chunk45PLS73Kcjs.unwrapOperation.call(void 0, res);
7139
7139
  }
7140
7140
  /** Resolve a TicketChecklistLibrary from a numeric id (or, where the vendor indexes a primary text field,
7141
7141
  * from a numeric id — this resource has no primary text field). A numeric id miss throws NOT_FOUND;
@@ -7151,7 +7151,7 @@ var TicketChecklistLibrariesResource = class extends _chunkTBFXRNNEcjs.BaseResou
7151
7151
  };
7152
7152
 
7153
7153
  // src/resources/ticket_history.ts
7154
- var TicketHistoryResource = class extends _chunkTBFXRNNEcjs.BaseResource {
7154
+ var TicketHistoryResource = class extends _chunk45PLS73Kcjs.BaseResource {
7155
7155
  constructor(http, pageSize) {
7156
7156
  super(http, {
7157
7157
  key: "ticket_history",
@@ -7190,7 +7190,7 @@ var TicketHistoryResource = class extends _chunkTBFXRNNEcjs.BaseResource {
7190
7190
  };
7191
7191
 
7192
7192
  // src/resources/ticket_note_attachments.ts
7193
- var TicketNoteAttachmentsResource = class extends _chunkTBFXRNNEcjs.BaseResource {
7193
+ var TicketNoteAttachmentsResource = class extends _chunk45PLS73Kcjs.BaseResource {
7194
7194
  constructor(http, pageSize) {
7195
7195
  super(http, {
7196
7196
  key: "ticket_note_attachments",
@@ -7252,7 +7252,7 @@ var TicketNoteAttachmentsResource = class extends _chunkTBFXRNNEcjs.BaseResource
7252
7252
  };
7253
7253
 
7254
7254
  // src/resources/ticket_notes.ts
7255
- var TicketNotesResource = class extends _chunkTBFXRNNEcjs.BaseResource {
7255
+ var TicketNotesResource = class extends _chunk45PLS73Kcjs.BaseResource {
7256
7256
  constructor(http, pageSize) {
7257
7257
  super(http, {
7258
7258
  key: "ticket_notes",
@@ -7311,7 +7311,7 @@ var TicketNotesResource = class extends _chunkTBFXRNNEcjs.BaseResource {
7311
7311
  };
7312
7312
 
7313
7313
  // src/resources/ticket_note_webhooks.ts
7314
- var TicketNoteWebhooksResource = class extends _chunkTBFXRNNEcjs.BaseResource {
7314
+ var TicketNoteWebhooksResource = class extends _chunk45PLS73Kcjs.BaseResource {
7315
7315
  constructor(http, pageSize) {
7316
7316
  super(http, {
7317
7317
  key: "ticket_note_webhooks",
@@ -7387,7 +7387,7 @@ var TicketNoteWebhooksResource = class extends _chunkTBFXRNNEcjs.BaseResource {
7387
7387
  };
7388
7388
 
7389
7389
  // src/resources/ticket_secondary_resources.ts
7390
- var TicketSecondaryResourcesResource = class extends _chunkTBFXRNNEcjs.BaseResource {
7390
+ var TicketSecondaryResourcesResource = class extends _chunk45PLS73Kcjs.BaseResource {
7391
7391
  constructor(http, pageSize) {
7392
7392
  super(http, {
7393
7393
  key: "ticket_secondary_resources",
@@ -7452,9 +7452,9 @@ async function fetchTicket(http, id, operation) {
7452
7452
  });
7453
7453
  const body = res;
7454
7454
  if (body === null || !("item" in body)) {
7455
- throw new (0, _chunkTBFXRNNEcjs.NotFoundError)(`Ticket ${id} not found (unexpected envelope shape)`, { resourceIds: [id], details: { idRefs: [{ entity: "ticket", id }] } });
7455
+ throw new (0, _chunk45PLS73Kcjs.NotFoundError)(`Ticket ${id} not found (unexpected envelope shape)`, { resourceIds: [id], details: { idRefs: [{ entity: "ticket", id }] } });
7456
7456
  }
7457
- if (body.item === null || body.item === void 0) throw new (0, _chunkTBFXRNNEcjs.NotFoundError)(`Ticket ${id} not found`, { resourceIds: [id], details: { idRefs: [{ entity: "ticket", id }] } });
7457
+ if (body.item === null || body.item === void 0) throw new (0, _chunk45PLS73Kcjs.NotFoundError)(`Ticket ${id} not found`, { resourceIds: [id], details: { idRefs: [{ entity: "ticket", id }] } });
7458
7458
  return body.item;
7459
7459
  }
7460
7460
  async function ticketQueryItems(http, path, filter, maxRecords, operation) {
@@ -7465,7 +7465,7 @@ async function ticketQueryItems(http, path, filter, maxRecords, operation) {
7465
7465
  body: { MaxRecords: maxRecords, filter },
7466
7466
  operation
7467
7467
  });
7468
- return _chunkTBFXRNNEcjs.unwrapItems.call(void 0, res).items;
7468
+ return _chunk45PLS73Kcjs.unwrapItems.call(void 0, res).items;
7469
7469
  }
7470
7470
  function truncate(text, limit) {
7471
7471
  const full = _nullishCoalesce(text, () => ( ""));
@@ -7475,26 +7475,26 @@ function truncate(text, limit) {
7475
7475
 
7476
7476
  // src/resources/special/tickets/childRead.ts
7477
7477
  function isRouteUnavailable(err) {
7478
- return _chunkTBFXRNNEcjs.isAutotaskError.call(void 0, err) && (err.httpStatus === 404 || err.httpStatus === 500);
7478
+ return _chunk45PLS73Kcjs.isAutotaskError.call(void 0, err) && (err.httpStatus === 404 || err.httpStatus === 500);
7479
7479
  }
7480
7480
  function routeFact(route, path, err) {
7481
7481
  return {
7482
7482
  route,
7483
7483
  path,
7484
- httpStatus: _chunkTBFXRNNEcjs.isAutotaskError.call(void 0, err) && typeof err.httpStatus === "number" ? err.httpStatus : null
7484
+ httpStatus: _chunk45PLS73Kcjs.isAutotaskError.call(void 0, err) && typeof err.httpStatus === "number" ? err.httpStatus : null
7485
7485
  };
7486
7486
  }
7487
7487
  function childDeclaresQuery(resourceKey) {
7488
- return _chunkHBYKTXN3cjs.CAPABILITIES.some(
7488
+ return _chunkRAZEXOLCcjs.CAPABILITIES.some(
7489
7489
  (c) => c.id === `${resourceKey}.query` && (c.status === "implemented" || c.status === "tested")
7490
7490
  );
7491
7491
  }
7492
7492
  function planScopedPath(resourceKey, ticketId) {
7493
7493
  if (!childDeclaresQuery(resourceKey)) return null;
7494
- const entry = _chunkTBFXRNNEcjs.RELATIONSHIP_MAP[resourceKey];
7494
+ const entry = _chunk45PLS73Kcjs.RELATIONSHIP_MAP[resourceKey];
7495
7495
  const parent = entry === void 0 ? null : entry.parent;
7496
7496
  if (parent === null || parent.resource !== "tickets" || parent.segment === null || parent.field === null) return null;
7497
- const parentPath = _optionalChain([_chunkTBFXRNNEcjs.RELATIONSHIP_MAP, 'access', _158 => _158[parent.resource], 'optionalAccess', _159 => _159.path]);
7497
+ const parentPath = _optionalChain([_chunk45PLS73Kcjs.RELATIONSHIP_MAP, 'access', _158 => _158[parent.resource], 'optionalAccess', _159 => _159.path]);
7498
7498
  if (parentPath === null || parentPath === void 0) return null;
7499
7499
  return `/V1.0/${parentPath}/${ticketId}/${parent.segment}`;
7500
7500
  }
@@ -7533,14 +7533,14 @@ async function scopedCollectionRead(http, startPath, limit, operation, accept) {
7533
7533
  break;
7534
7534
  }
7535
7535
  const body = await http.request({ method: "GET", path: target, operation });
7536
- const { items: pageItems, pageDetails } = _chunkTBFXRNNEcjs.unwrapItems.call(void 0, body, operation);
7536
+ const { items: pageItems, pageDetails } = _chunk45PLS73Kcjs.unwrapItems.call(void 0, body, operation);
7537
7537
  nextCursor = pageDetails.nextPageUrl;
7538
7538
  pages += 1;
7539
7539
  const window = pageItems.slice(0, Math.max(0, limit - items.length));
7540
7540
  for (const row of window) if (accept(row)) items.push(row);
7541
7541
  if (items.length >= limit) break;
7542
7542
  if (nextCursor === null || pageItems.length === 0) break;
7543
- target = _chunkTBFXRNNEcjs.cursorToPath.call(void 0, http.baseUrl, nextCursor);
7543
+ target = _chunk45PLS73Kcjs.cursorToPath.call(void 0, http.baseUrl, nextCursor);
7544
7544
  }
7545
7545
  const capped = items.length >= limit || guard && nextCursor !== null;
7546
7546
  return { items, capped };
@@ -7573,7 +7573,7 @@ var MS = 864e5;
7573
7573
  var SLA_PAGE = 100;
7574
7574
  async function slaHealthCheck(_resource, id, opts = {}, http) {
7575
7575
  void opts;
7576
- const ticketId = _chunkTBFXRNNEcjs.parseIdentifier.call(void 0, id, "id");
7576
+ const ticketId = _chunk45PLS73Kcjs.parseIdentifier.call(void 0, id, "id");
7577
7577
  await fetchTicket(http, ticketId, "tickets.slaHealthCheck");
7578
7578
  const rows = await ticketQueryItems(
7579
7579
  http,
@@ -7598,9 +7598,9 @@ async function slaHealthCheck(_resource, id, opts = {}, http) {
7598
7598
  async function summary(_resource, id, opts = {}, http) {
7599
7599
  const limit = opts.summaryTextLimit === void 0 ? 500 : Math.trunc(opts.summaryTextLimit);
7600
7600
  if (!Number.isInteger(limit) || limit < 1) {
7601
- throw new (0, _chunkTBFXRNNEcjs.AutotaskConfigError)(`summaryTextLimit must be an integer >= 1 (got ${String(opts.summaryTextLimit)})`);
7601
+ throw new (0, _chunk45PLS73Kcjs.AutotaskConfigError)(`summaryTextLimit must be an integer >= 1 (got ${String(opts.summaryTextLimit)})`);
7602
7602
  }
7603
- const ticketId = _chunkTBFXRNNEcjs.parseIdentifier.call(void 0, id, "id");
7603
+ const ticketId = _chunk45PLS73Kcjs.parseIdentifier.call(void 0, id, "id");
7604
7604
  const ticket = await fetchTicket(http, ticketId, "tickets.summary");
7605
7605
  const desc = truncate(ticket.description, limit);
7606
7606
  const now = _nullishCoalesce(opts.now, () => ( /* @__PURE__ */ new Date()));
@@ -7629,11 +7629,11 @@ async function summary(_resource, id, opts = {}, http) {
7629
7629
  // src/resources/special/tickets/timeline.ts
7630
7630
  function validateTimelineLimits(opts) {
7631
7631
  const limit = opts.limit === void 0 ? 100 : Math.trunc(opts.limit);
7632
- if (!Number.isInteger(limit) || limit < 1) throw new (0, _chunkTBFXRNNEcjs.AutotaskConfigError)(`limit must be an integer >= 1 (got ${String(opts.limit)})`);
7632
+ if (!Number.isInteger(limit) || limit < 1) throw new (0, _chunk45PLS73Kcjs.AutotaskConfigError)(`limit must be an integer >= 1 (got ${String(opts.limit)})`);
7633
7633
  const bounded = Math.min(limit, 500);
7634
7634
  const textLimit = opts.textLimit === void 0 ? 500 : Math.trunc(opts.textLimit);
7635
7635
  if (!Number.isInteger(textLimit) || textLimit < 1) {
7636
- throw new (0, _chunkTBFXRNNEcjs.AutotaskConfigError)(`textLimit must be an integer >= 1 (got ${String(opts.textLimit)})`);
7636
+ throw new (0, _chunk45PLS73Kcjs.AutotaskConfigError)(`textLimit must be an integer >= 1 (got ${String(opts.textLimit)})`);
7637
7637
  }
7638
7638
  return { bounded, textLimit };
7639
7639
  }
@@ -7685,7 +7685,7 @@ function compareEventDates(a, b) {
7685
7685
  }
7686
7686
  async function timeline(_resource, id, opts = {}, http) {
7687
7687
  const { bounded, textLimit } = validateTimelineLimits(opts);
7688
- const ticketId = _chunkTBFXRNNEcjs.parseIdentifier.call(void 0, id, "id");
7688
+ const ticketId = _chunk45PLS73Kcjs.parseIdentifier.call(void 0, id, "id");
7689
7689
  await fetchTicket(http, ticketId, "tickets.timeline");
7690
7690
  const dateFilters = (field) => {
7691
7691
  const f = [{ field: "ticketID", op: "eq", value: ticketId }];
@@ -7725,7 +7725,7 @@ async function timeline(_resource, id, opts = {}, http) {
7725
7725
  }
7726
7726
 
7727
7727
  // src/resources/special/tickets/errors.ts
7728
- var QueueRequiredError = class extends _chunkTBFXRNNEcjs.AutotaskError {
7728
+ var QueueRequiredError = class extends _chunk45PLS73Kcjs.AutotaskError {
7729
7729
  constructor(message, options = {}) {
7730
7730
  super(message, {
7731
7731
  code: "QUEUE_REQUIRED",
@@ -7736,13 +7736,13 @@ var QueueRequiredError = class extends _chunkTBFXRNNEcjs.AutotaskError {
7736
7736
  this.name = "QueueRequiredError";
7737
7737
  }
7738
7738
  };
7739
- var TicketResourceInvalidError = class extends _chunkTBFXRNNEcjs.AutotaskError {
7739
+ var TicketResourceInvalidError = class extends _chunk45PLS73Kcjs.AutotaskError {
7740
7740
  constructor(message, options = {}) {
7741
7741
  super(message, { code: "RESOURCE_INVALID", category: "validation", ...options });
7742
7742
  this.name = "TicketResourceInvalidError";
7743
7743
  }
7744
7744
  };
7745
- var TicketCreateValidationFailedError = class extends _chunkTBFXRNNEcjs.AutotaskError {
7745
+ var TicketCreateValidationFailedError = class extends _chunk45PLS73Kcjs.AutotaskError {
7746
7746
  /** The vendor-named fields (empty when the 500 body named nothing parseable). */
7747
7747
 
7748
7748
  constructor(message, vendorFields, options = {}) {
@@ -7751,7 +7751,7 @@ var TicketCreateValidationFailedError = class extends _chunkTBFXRNNEcjs.Autotask
7751
7751
  this.vendorFields = vendorFields;
7752
7752
  }
7753
7753
  };
7754
- var StatusUnknownError = class extends _chunkTBFXRNNEcjs.AutotaskError {
7754
+ var StatusUnknownError = class extends _chunk45PLS73Kcjs.AutotaskError {
7755
7755
  /** The live picklist size (the message names it; the values + labels are via operations.fieldCatalog with labels: true). */
7756
7756
 
7757
7757
  constructor(message, options = {}) {
@@ -7765,7 +7765,7 @@ var StatusUnknownError = class extends _chunkTBFXRNNEcjs.AutotaskError {
7765
7765
  this.picklistCount = _nullishCoalesce(options.picklistCount, () => ( 0));
7766
7766
  }
7767
7767
  };
7768
- var StatusFieldsRequiredError = class extends _chunkTBFXRNNEcjs.AutotaskError {
7768
+ var StatusFieldsRequiredError = class extends _chunk45PLS73Kcjs.AutotaskError {
7769
7769
 
7770
7770
 
7771
7771
 
@@ -7788,14 +7788,14 @@ function isPositiveInt(v) {
7788
7788
  return typeof v === "number" && Number.isInteger(v) && v > 0;
7789
7789
  }
7790
7790
  function namedVendorFields(err) {
7791
- if (!_chunkTBFXRNNEcjs.isAutotaskError.call(void 0, err) || err.vendorError === void 0) return [];
7792
- const entries = _nullishCoalesce(_chunkTBFXRNNEcjs.parseVendorErrors.call(void 0, err.vendorError), () => ( []));
7791
+ if (!_chunk45PLS73Kcjs.isAutotaskError.call(void 0, err) || err.vendorError === void 0) return [];
7792
+ const entries = _nullishCoalesce(_chunk45PLS73Kcjs.parseVendorErrors.call(void 0, err.vendorError), () => ( []));
7793
7793
  const out = /* @__PURE__ */ new Set();
7794
7794
  for (const e of entries) if (e.field !== void 0) out.add(e.field);
7795
7795
  return [...out];
7796
7796
  }
7797
7797
  function vendorDetailOf(err) {
7798
- return _chunkTBFXRNNEcjs.isAutotaskError.call(void 0, err) ? _chunkTBFXRNNEcjs.formatVendorDetail.call(void 0, err.vendorError) : void 0;
7798
+ return _chunk45PLS73Kcjs.isAutotaskError.call(void 0, err) ? _chunk45PLS73Kcjs.formatVendorDetail.call(void 0, err.vendorError) : void 0;
7799
7799
  }
7800
7800
  async function fetchItem(http, path, operation, readOpts) {
7801
7801
  const res = await http.request({ method: "GET", path, operation, maxRetries: _optionalChain([readOpts, 'optionalAccess', _160 => _160.maxRetries]) });
@@ -7816,8 +7816,8 @@ function operationId(res) {
7816
7816
  return typeof body.itemId === "number" ? body.itemId : typeof body.id === "number" ? body.id : void 0;
7817
7817
  }
7818
7818
  function discoveryMerge(err, body, defaults) {
7819
- if (!_chunkTBFXRNNEcjs.isAutotaskError.call(void 0, err) || err.vendorError === void 0) return null;
7820
- const entries = _chunkTBFXRNNEcjs.parseVendorErrors.call(void 0, err.vendorError);
7819
+ if (!_chunk45PLS73Kcjs.isAutotaskError.call(void 0, err) || err.vendorError === void 0) return null;
7820
+ const entries = _chunk45PLS73Kcjs.parseVendorErrors.call(void 0, err.vendorError);
7821
7821
  if (entries === void 0) return null;
7822
7822
  for (const entry of entries) {
7823
7823
  const field = entry.field;
@@ -7829,7 +7829,7 @@ function discoveryMerge(err, body, defaults) {
7829
7829
  }
7830
7830
  function stepErrorText(code, err) {
7831
7831
  const detail = vendorDetailOf(err);
7832
- const base = _chunkTBFXRNNEcjs.isAutotaskError.call(void 0, err) ? err.message : String(err);
7832
+ const base = _chunk45PLS73Kcjs.isAutotaskError.call(void 0, err) ? err.message : String(err);
7833
7833
  return detail ? `${code}: ${detail}` : `${code}: ${base}`;
7834
7834
  }
7835
7835
 
@@ -7841,43 +7841,43 @@ var DEFAULT_PUBLISH = 1;
7841
7841
  var PUBLISH_VALUES = /* @__PURE__ */ new Set([1, 2, 4]);
7842
7842
  var SAFE_TICKET_CREATE_DEFAULTS = {};
7843
7843
  function validateOpenInput(params, note, assign) {
7844
- const companyID = _chunkTBFXRNNEcjs.parseIdentifier.call(void 0, _optionalChain([params, 'optionalAccess', _162 => _162.companyID]), "params.companyID");
7844
+ const companyID = _chunk45PLS73Kcjs.parseIdentifier.call(void 0, _optionalChain([params, 'optionalAccess', _162 => _162.companyID]), "params.companyID");
7845
7845
  const title = _optionalChain([params, 'optionalAccess', _163 => _163.title]);
7846
7846
  if (typeof title !== "string" || title.trim() === "") {
7847
- throw new (0, _chunkTBFXRNNEcjs.AutotaskConfigError)("openWithNoteAndAssign: params.title is required (a non-empty string)", { operation: OP_OPEN });
7847
+ throw new (0, _chunk45PLS73Kcjs.AutotaskConfigError)("openWithNoteAndAssign: params.title is required (a non-empty string)", { operation: OP_OPEN });
7848
7848
  }
7849
7849
  const priority = _nullishCoalesce(params.priority, () => ( DEFAULT_TICKET_PRIORITY));
7850
7850
  const status = _nullishCoalesce(params.status, () => ( DEFAULT_TICKET_STATUS));
7851
7851
  if (!isPositiveInt(priority)) {
7852
- throw new (0, _chunkTBFXRNNEcjs.AutotaskConfigError)(`openWithNoteAndAssign: params.priority must be a positive integer (got ${String(params.priority)})`, { operation: OP_OPEN });
7852
+ throw new (0, _chunk45PLS73Kcjs.AutotaskConfigError)(`openWithNoteAndAssign: params.priority must be a positive integer (got ${String(params.priority)})`, { operation: OP_OPEN });
7853
7853
  }
7854
7854
  if (!isPositiveInt(status)) {
7855
- throw new (0, _chunkTBFXRNNEcjs.AutotaskConfigError)(`openWithNoteAndAssign: params.status must be a positive integer (got ${String(params.status)})`, { operation: OP_OPEN });
7855
+ throw new (0, _chunk45PLS73Kcjs.AutotaskConfigError)(`openWithNoteAndAssign: params.status must be a positive integer (got ${String(params.status)})`, { operation: OP_OPEN });
7856
7856
  }
7857
7857
  if (params.queueID !== void 0 && !isPositiveInt(params.queueID)) {
7858
- throw new (0, _chunkTBFXRNNEcjs.AutotaskConfigError)(`openWithNoteAndAssign: params.queueID must be a positive integer (got ${String(params.queueID)})`, { operation: OP_OPEN });
7858
+ throw new (0, _chunk45PLS73Kcjs.AutotaskConfigError)(`openWithNoteAndAssign: params.queueID must be a positive integer (got ${String(params.queueID)})`, { operation: OP_OPEN });
7859
7859
  }
7860
7860
  if (note !== void 0) {
7861
7861
  if (typeof note.description !== "string" || note.description.trim() === "") {
7862
- throw new (0, _chunkTBFXRNNEcjs.AutotaskConfigError)("openWithNoteAndAssign: note.description is required (a non-empty string)", { operation: OP_OPEN });
7862
+ throw new (0, _chunk45PLS73Kcjs.AutotaskConfigError)("openWithNoteAndAssign: note.description is required (a non-empty string)", { operation: OP_OPEN });
7863
7863
  }
7864
7864
  if (typeof note.title !== "string" || note.title.trim() === "") {
7865
- throw new (0, _chunkTBFXRNNEcjs.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 });
7865
+ throw new (0, _chunk45PLS73Kcjs.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 });
7866
7866
  }
7867
7867
  if (note.noteType !== void 0 && !isPositiveInt(note.noteType)) {
7868
- throw new (0, _chunkTBFXRNNEcjs.AutotaskConfigError)(`openWithNoteAndAssign: note.noteType must be a positive integer (got ${String(note.noteType)})`, { operation: OP_OPEN });
7868
+ throw new (0, _chunk45PLS73Kcjs.AutotaskConfigError)(`openWithNoteAndAssign: note.noteType must be a positive integer (got ${String(note.noteType)})`, { operation: OP_OPEN });
7869
7869
  }
7870
7870
  if (note.publish !== void 0 && !PUBLISH_VALUES.has(note.publish)) {
7871
- throw new (0, _chunkTBFXRNNEcjs.AutotaskConfigError)(`openWithNoteAndAssign: note.publish must be an integer picklist value 1/2/4 (got ${String(note.publish)} \u2014 NOT a boolean)`, { operation: OP_OPEN });
7871
+ throw new (0, _chunk45PLS73Kcjs.AutotaskConfigError)(`openWithNoteAndAssign: note.publish must be an integer picklist value 1/2/4 (got ${String(note.publish)} \u2014 NOT a boolean)`, { operation: OP_OPEN });
7872
7872
  }
7873
7873
  }
7874
- const assignee = assign === void 0 ? void 0 : _chunkTBFXRNNEcjs.parseIdentifier.call(void 0, assign.resourceID, "assign.resourceID");
7874
+ const assignee = assign === void 0 ? void 0 : _chunk45PLS73Kcjs.parseIdentifier.call(void 0, assign.resourceID, "assign.resourceID");
7875
7875
  if (assign !== void 0 && assignee !== void 0 && (typeof assignee === "number" ? assignee < 1 : false)) {
7876
- throw new (0, _chunkTBFXRNNEcjs.AutotaskConfigError)(`openWithNoteAndAssign: assign.resourceID must be a positive integer (got ${String(assignee)})`, { operation: OP_OPEN });
7876
+ throw new (0, _chunk45PLS73Kcjs.AutotaskConfigError)(`openWithNoteAndAssign: assign.resourceID must be a positive integer (got ${String(assignee)})`, { operation: OP_OPEN });
7877
7877
  }
7878
7878
  const roleID = _optionalChain([assign, 'optionalAccess', _164 => _164.roleID]);
7879
7879
  if (assign !== void 0 && !isPositiveInt(roleID)) {
7880
- throw new (0, _chunkTBFXRNNEcjs.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 });
7880
+ throw new (0, _chunk45PLS73Kcjs.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 });
7881
7881
  }
7882
7882
  return { companyID, title, priority, status, assignee, roleID };
7883
7883
  }
@@ -7906,7 +7906,7 @@ function openDryRun(http, v, params, assign, body, noteBody) {
7906
7906
  if (assign !== void 0) {
7907
7907
  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).`);
7908
7908
  }
7909
- return _chunkTBFXRNNEcjs.buildDryRunResult.call(void 0,
7909
+ return _chunk45PLS73Kcjs.buildDryRunResult.call(void 0,
7910
7910
  {
7911
7911
  operation: OP_OPEN,
7912
7912
  method: "POST",
@@ -7946,8 +7946,8 @@ async function createTicketWithDiscovery(resource, params, companyID, body, step
7946
7946
  `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}` : ""}`,
7947
7947
  {
7948
7948
  operation: OP_OPEN,
7949
- httpStatus: _chunkTBFXRNNEcjs.isAutotaskError.call(void 0, err) ? err.httpStatus : void 0,
7950
- vendorError: _chunkTBFXRNNEcjs.isAutotaskError.call(void 0, err) ? err.vendorError : void 0
7949
+ httpStatus: _chunk45PLS73Kcjs.isAutotaskError.call(void 0, err) ? err.httpStatus : void 0,
7950
+ vendorError: _chunk45PLS73Kcjs.isAutotaskError.call(void 0, err) ? err.vendorError : void 0
7951
7951
  }
7952
7952
  );
7953
7953
  }
@@ -7962,8 +7962,8 @@ async function createTicketWithDiscovery(resource, params, companyID, body, step
7962
7962
  named,
7963
7963
  {
7964
7964
  operation: OP_OPEN,
7965
- httpStatus: _chunkTBFXRNNEcjs.isAutotaskError.call(void 0, err) ? err.httpStatus : void 0,
7966
- vendorError: _chunkTBFXRNNEcjs.isAutotaskError.call(void 0, err) ? err.vendorError : void 0,
7965
+ httpStatus: _chunk45PLS73Kcjs.isAutotaskError.call(void 0, err) ? err.httpStatus : void 0,
7966
+ vendorError: _chunk45PLS73Kcjs.isAutotaskError.call(void 0, err) ? err.vendorError : void 0,
7967
7967
  resourceIds: [companyID],
7968
7968
  details: { idRefs: [{ entity: "company", id: companyID }] }
7969
7969
  }
@@ -7988,10 +7988,10 @@ async function assignStep(http, ticketId, assignee, roleID, opts, steps) {
7988
7988
  try {
7989
7989
  const current = await fetchItemUnredacted(http, `/V1.0/Tickets/${ticketId}`, OP_OPEN, { maxRetries: opts.maxRetries });
7990
7990
  if (current === null) {
7991
- throw new (0, _chunkTBFXRNNEcjs.NotFoundError)(`openWithNoteAndAssign: ticket ${ticketId} vanished between the create and the assign merge read`, { operation: OP_OPEN, resourceIds: [ticketId], details: { idRefs: [{ entity: "ticket", id: ticketId }] } });
7991
+ throw new (0, _chunk45PLS73Kcjs.NotFoundError)(`openWithNoteAndAssign: ticket ${ticketId} vanished between the create and the assign merge read`, { operation: OP_OPEN, resourceIds: [ticketId], details: { idRefs: [{ entity: "ticket", id: ticketId }] } });
7992
7992
  }
7993
7993
  ticketNumber = typeof current.ticketNumber === "string" ? current.ticketNumber : null;
7994
- const merged = _chunkTBFXRNNEcjs.mergePartialBody.call(void 0, current, { id: ticketId, assignedResourceID: assignee, assignedResourceRoleID: roleID });
7994
+ const merged = _chunk45PLS73Kcjs.mergePartialBody.call(void 0, current, { id: ticketId, assignedResourceID: assignee, assignedResourceRoleID: roleID });
7995
7995
  merged.id = ticketId;
7996
7996
  await http.request({ method: "PUT", path: "/V1.0/Tickets", body: merged, operation: OP_OPEN, maxRetries: opts.maxRetries });
7997
7997
  assigned = true;
@@ -8055,7 +8055,7 @@ async function guardTargetStatus(resource, http, targetStatus) {
8055
8055
  const ids = await readLiveStatusSet(resource);
8056
8056
  if (ids.size > 0) liveStatus = ids;
8057
8057
  } catch (err) {
8058
- if (!_chunkTBFXRNNEcjs.isAutotaskError.call(void 0, err) || err.code === "ABORTED") throw err;
8058
+ if (!_chunk45PLS73Kcjs.isAutotaskError.call(void 0, err) || err.code === "ABORTED") throw err;
8059
8059
  }
8060
8060
  if (liveStatus !== null && !liveStatus.has(targetStatus)) {
8061
8061
  _optionalChain([http, 'access', _165 => _165.fieldCache, 'optionalAccess', _166 => _166.invalidate, 'call', _167 => _167("tickets")]);
@@ -8065,7 +8065,7 @@ async function guardTargetStatus(resource, http, targetStatus) {
8065
8065
  const freshIds = await readLiveStatusSet(resource);
8066
8066
  if (freshIds.size > 0) freshStatus = freshIds;
8067
8067
  } catch (err) {
8068
- if (!_chunkTBFXRNNEcjs.isAutotaskError.call(void 0, err) || err.code === "ABORTED") throw err;
8068
+ if (!_chunk45PLS73Kcjs.isAutotaskError.call(void 0, err) || err.code === "ABORTED") throw err;
8069
8069
  freshStatus = null;
8070
8070
  reReadFailed = true;
8071
8071
  }
@@ -8083,7 +8083,7 @@ async function guardTargetStatus(resource, http, targetStatus) {
8083
8083
  return { guardDegraded: liveStatus === null };
8084
8084
  }
8085
8085
  function noChangeDryRun(http, ticketId, targetStatus, guardDegraded) {
8086
- return _chunkTBFXRNNEcjs.buildDryRunResult.call(void 0,
8086
+ return _chunk45PLS73Kcjs.buildDryRunResult.call(void 0,
8087
8087
  {
8088
8088
  operation: OP_STATUS,
8089
8089
  method: "PUT",
@@ -8137,7 +8137,7 @@ function mergeDryRun(http, ticketId, targetStatus, guardDegraded, filled, mapEnt
8137
8137
  if (mapEntry === void 0) {
8138
8138
  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).`);
8139
8139
  }
8140
- return _chunkTBFXRNNEcjs.buildDryRunResult.call(void 0,
8140
+ return _chunk45PLS73Kcjs.buildDryRunResult.call(void 0,
8141
8141
  {
8142
8142
  operation: OP_STATUS,
8143
8143
  method: "PUT",
@@ -8157,7 +8157,7 @@ function mergeDryRun(http, ticketId, targetStatus, guardDegraded, filled, mapEnt
8157
8157
  }
8158
8158
  async function putStatusWithDiscovery(http, ticketId, targetStatus, previousStatus, current, mergeData, mapEntry, filled, opts) {
8159
8159
  const safeDefaults = _nullishCoalesce(_optionalChain([mapEntry, 'optionalAccess', _170 => _170.safeDefaults]), () => ( {}));
8160
- const body = _chunkTBFXRNNEcjs.mergePartialBody.call(void 0, current, mergeData);
8160
+ const body = _chunk45PLS73Kcjs.mergePartialBody.call(void 0, current, mergeData);
8161
8161
  body.id = ticketId;
8162
8162
  let merges = 0;
8163
8163
  for (; ; ) {
@@ -8181,8 +8181,8 @@ async function putStatusWithDiscovery(http, ticketId, targetStatus, previousStat
8181
8181
  { vendorFields: named, currentStatus: previousStatus, targetStatus, currentValues },
8182
8182
  {
8183
8183
  operation: OP_STATUS,
8184
- httpStatus: _chunkTBFXRNNEcjs.isAutotaskError.call(void 0, err) ? err.httpStatus : void 0,
8185
- vendorError: _chunkTBFXRNNEcjs.isAutotaskError.call(void 0, err) ? err.vendorError : void 0,
8184
+ httpStatus: _chunk45PLS73Kcjs.isAutotaskError.call(void 0, err) ? err.httpStatus : void 0,
8185
+ vendorError: _chunk45PLS73Kcjs.isAutotaskError.call(void 0, err) ? err.vendorError : void 0,
8186
8186
  resourceIds: [ticketId],
8187
8187
  details: { idRefs: [{ entity: "ticket", id: ticketId }] }
8188
8188
  }
@@ -8195,7 +8195,7 @@ async function putStatusWithDiscovery(http, ticketId, targetStatus, previousStat
8195
8195
  async function verifyStatusApplied(http, ticketId, targetStatus, opts) {
8196
8196
  const verify = await fetchItem(http, `/V1.0/Tickets/${ticketId}`, OP_STATUS, { maxRetries: opts.maxRetries });
8197
8197
  if (verify === null) {
8198
- throw new (0, _chunkTBFXRNNEcjs.AutotaskError)(`changeStatus: the post-PUT read-back found no ticket ${ticketId} (the PUT 200ed but the record is gone)`, {
8198
+ throw new (0, _chunk45PLS73Kcjs.AutotaskError)(`changeStatus: the post-PUT read-back found no ticket ${ticketId} (the PUT 200ed but the record is gone)`, {
8199
8199
  code: "INVALID_RESPONSE",
8200
8200
  category: "server",
8201
8201
  operation: OP_STATUS,
@@ -8205,7 +8205,7 @@ async function verifyStatusApplied(http, ticketId, targetStatus, opts) {
8205
8205
  }
8206
8206
  const finalStatus = typeof verify.status === "number" ? verify.status : null;
8207
8207
  if (finalStatus !== targetStatus) {
8208
- throw new (0, _chunkTBFXRNNEcjs.AutotaskError)(
8208
+ throw new (0, _chunk45PLS73Kcjs.AutotaskError)(
8209
8209
  `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)`,
8210
8210
  {
8211
8211
  code: "INVALID_RESPONSE",
@@ -8220,17 +8220,17 @@ async function verifyStatusApplied(http, ticketId, targetStatus, opts) {
8220
8220
  }
8221
8221
  }
8222
8222
  async function changeStatus(resource, id, targetStatus, fields, opts, http) {
8223
- const ticketId = _chunkTBFXRNNEcjs.parseIdentifier.call(void 0, id, "id");
8223
+ const ticketId = _chunk45PLS73Kcjs.parseIdentifier.call(void 0, id, "id");
8224
8224
  if (!isPositiveInt(targetStatus)) {
8225
- throw new (0, _chunkTBFXRNNEcjs.AutotaskConfigError)(`changeStatus: targetStatus must be a positive integer (got ${String(targetStatus)})`, { operation: OP_STATUS });
8225
+ throw new (0, _chunk45PLS73Kcjs.AutotaskConfigError)(`changeStatus: targetStatus must be a positive integer (got ${String(targetStatus)})`, { operation: OP_STATUS });
8226
8226
  }
8227
8227
  const { guardDegraded } = await guardTargetStatus(resource, http, targetStatus);
8228
8228
  if (fields !== void 0 && (typeof fields !== "object" || fields === null || Array.isArray(fields))) {
8229
- throw new (0, _chunkTBFXRNNEcjs.AutotaskConfigError)("changeStatus: fields must be a plain object of ticket fields (or omitted)", { operation: OP_STATUS });
8229
+ throw new (0, _chunk45PLS73Kcjs.AutotaskConfigError)("changeStatus: fields must be a plain object of ticket fields (or omitted)", { operation: OP_STATUS });
8230
8230
  }
8231
8231
  const current = await fetchItemUnredacted(http, `/V1.0/Tickets/${ticketId}`, OP_STATUS, { maxRetries: opts.maxRetries });
8232
8232
  if (current === null) {
8233
- throw new (0, _chunkTBFXRNNEcjs.NotFoundError)(`changeStatus: ticket ${ticketId} was not found (tickets.get returned item: null)`, { operation: OP_STATUS, resourceIds: [ticketId], details: { idRefs: [{ entity: "ticket", id: ticketId }] } });
8233
+ throw new (0, _chunk45PLS73Kcjs.NotFoundError)(`changeStatus: ticket ${ticketId} was not found (tickets.get returned item: null)`, { operation: OP_STATUS, resourceIds: [ticketId], details: { idRefs: [{ entity: "ticket", id: ticketId }] } });
8234
8234
  }
8235
8235
  const previousStatus = typeof current.status === "number" ? current.status : null;
8236
8236
  if (previousStatus === targetStatus) {
@@ -8250,7 +8250,7 @@ var DEFAULT_PART_LIMIT = 50;
8250
8250
  function partLimit(value, name) {
8251
8251
  const n = value === void 0 ? DEFAULT_PART_LIMIT : Math.trunc(value);
8252
8252
  if (!Number.isInteger(n) || n < 1) {
8253
- throw new (0, _chunkTBFXRNNEcjs.AutotaskConfigError)(`fullContext: ${name} must be an integer >= 1 (got ${String(value)})`);
8253
+ throw new (0, _chunk45PLS73Kcjs.AutotaskConfigError)(`fullContext: ${name} must be an integer >= 1 (got ${String(value)})`);
8254
8254
  }
8255
8255
  return n;
8256
8256
  }
@@ -8263,13 +8263,13 @@ function servedTextRecord(row, textField, limit) {
8263
8263
  return out;
8264
8264
  }
8265
8265
  async function addCompositeNames(http, ctx, entriesPart, result, opts) {
8266
- const builder = _chunkTBFXRNNEcjs.createNamePlan.call(void 0, _chunkTBFXRNNEcjs.TICKET_LABEL_FIELDS);
8266
+ const builder = _chunk45PLS73Kcjs.createNamePlan.call(void 0, _chunk45PLS73Kcjs.TICKET_LABEL_FIELDS);
8267
8267
  const t = ctx.ticket;
8268
8268
  builder.addResource(t["creatorResourceID"]);
8269
8269
  builder.addFk("contract", t["contractID"]);
8270
8270
  builder.addFk("billingCode", t["billingCodeID"]);
8271
8271
  builder.addFk("role", t["assignedResourceRoleID"]);
8272
- const ticketLobPointer = _chunkTBFXRNNEcjs.vendorId.call(void 0, t["organizationalLevelAssociationID"]);
8272
+ const ticketLobPointer = _chunk45PLS73Kcjs.vendorId.call(void 0, t["organizationalLevelAssociationID"]);
8273
8273
  if (ticketLobPointer !== void 0) {
8274
8274
  builder.addLineOfBusiness(ticketLobPointer, { source: "ticket" });
8275
8275
  } else {
@@ -8281,20 +8281,20 @@ async function addCompositeNames(http, ctx, entriesPart, result, opts) {
8281
8281
  builder.addFk("billingCode", e["billingCodeID"]);
8282
8282
  builder.addFk("contract", e["contractID"]);
8283
8283
  }
8284
- const names = await _chunkTBFXRNNEcjs.resolveCompositeNames.call(void 0, http, builder.plan(), { maxNameReads: opts.maxNameReads });
8284
+ const names = await _chunk45PLS73Kcjs.resolveCompositeNames.call(void 0, http, builder.plan(), { maxNameReads: opts.maxNameReads });
8285
8285
  const ticketRow = { ...ctx.ticket };
8286
- _chunkTBFXRNNEcjs.addNameSibling.call(void 0, ticketRow, "creatorResourceID", (v) => names.resourceName(v));
8287
- _chunkTBFXRNNEcjs.addNameSibling.call(void 0, ticketRow, "contractID", (v) => names.recordName("contract", v));
8288
- _chunkTBFXRNNEcjs.addNameSibling.call(void 0, ticketRow, "billingCodeID", (v) => names.recordName("billingCode", v));
8289
- _chunkTBFXRNNEcjs.addNameSibling.call(void 0, ticketRow, "assignedResourceRoleID", (v) => names.recordName("role", v));
8290
- for (const f of _chunkTBFXRNNEcjs.TICKET_LABEL_FIELDS) _chunkTBFXRNNEcjs.addLabelSibling.call(void 0, ticketRow, f, names);
8286
+ _chunk45PLS73Kcjs.addNameSibling.call(void 0, ticketRow, "creatorResourceID", (v) => names.resourceName(v));
8287
+ _chunk45PLS73Kcjs.addNameSibling.call(void 0, ticketRow, "contractID", (v) => names.recordName("contract", v));
8288
+ _chunk45PLS73Kcjs.addNameSibling.call(void 0, ticketRow, "billingCodeID", (v) => names.recordName("billingCode", v));
8289
+ _chunk45PLS73Kcjs.addNameSibling.call(void 0, ticketRow, "assignedResourceRoleID", (v) => names.recordName("role", v));
8290
+ for (const f of _chunk45PLS73Kcjs.TICKET_LABEL_FIELDS) _chunk45PLS73Kcjs.addLabelSibling.call(void 0, ticketRow, f, names);
8291
8291
  result.ticket = ticketRow;
8292
8292
  result.timeEntries.items = entriesPart.items.map((e) => {
8293
8293
  const row = { ...e };
8294
- _chunkTBFXRNNEcjs.addNameSibling.call(void 0, row, "resourceID", (v) => names.resourceName(v));
8295
- _chunkTBFXRNNEcjs.addNameSibling.call(void 0, row, "roleID", (v) => names.recordName("role", v));
8296
- _chunkTBFXRNNEcjs.addNameSibling.call(void 0, row, "billingCodeID", (v) => names.recordName("billingCode", v));
8297
- _chunkTBFXRNNEcjs.addNameSibling.call(void 0, row, "contractID", (v) => names.recordName("contract", v));
8294
+ _chunk45PLS73Kcjs.addNameSibling.call(void 0, row, "resourceID", (v) => names.resourceName(v));
8295
+ _chunk45PLS73Kcjs.addNameSibling.call(void 0, row, "roleID", (v) => names.recordName("role", v));
8296
+ _chunk45PLS73Kcjs.addNameSibling.call(void 0, row, "billingCodeID", (v) => names.recordName("billingCode", v));
8297
+ _chunk45PLS73Kcjs.addNameSibling.call(void 0, row, "contractID", (v) => names.recordName("contract", v));
8298
8298
  return row;
8299
8299
  });
8300
8300
  result.names = names.section;
@@ -8310,7 +8310,7 @@ async function fullContext(resource, id, opts = {}, http) {
8310
8310
  const noteLimit = partLimit(opts.noteLimit, "noteLimit");
8311
8311
  const timeEntryLimit = partLimit(opts.timeEntryLimit, "timeEntryLimit");
8312
8312
  const textLimit = partLimit(opts.textLimit, "textLimit");
8313
- const ticketId = _chunkTBFXRNNEcjs.parseIdentifier.call(void 0, id, "id");
8313
+ const ticketId = _chunk45PLS73Kcjs.parseIdentifier.call(void 0, id, "id");
8314
8314
  const ctx = await resource.getContext(ticketId);
8315
8315
  const op = "tickets.fullContext";
8316
8316
  const ticketFilter = [{ field: "ticketID", op: "eq", value: ticketId }];
@@ -8378,7 +8378,7 @@ var TICKET_FIELDS = ["id", "ticketNumber", "title", "status", "assignedResourceI
8378
8378
  function positiveId(value, name) {
8379
8379
  const n = typeof value === "string" && /^\d+$/.test(value.trim()) ? Number(value) : value;
8380
8380
  if (typeof n !== "number" || !Number.isSafeInteger(n) || n < 1) {
8381
- throw new (0, _chunkTBFXRNNEcjs.AutotaskConfigError)(`${OP2}: ${name} must be a positive integer id (got ${String(value)})`, { operation: OP2 });
8381
+ throw new (0, _chunk45PLS73Kcjs.AutotaskConfigError)(`${OP2}: ${name} must be a positive integer id (got ${String(value)})`, { operation: OP2 });
8382
8382
  }
8383
8383
  return n;
8384
8384
  }
@@ -8390,7 +8390,7 @@ async function ticketPage(http, filter, maxRecords, fields) {
8390
8390
  body: { MaxRecords: maxRecords, filter, IncludeFields: fields },
8391
8391
  operation: OP2
8392
8392
  });
8393
- const page = _chunkTBFXRNNEcjs.unwrapItems.call(void 0, res, OP2);
8393
+ const page = _chunk45PLS73Kcjs.unwrapItems.call(void 0, res, OP2);
8394
8394
  return { rows: page.items, more: page.pageDetails.nextPageUrl !== null };
8395
8395
  }
8396
8396
  async function readLinkIds(http, resourceID, maxPages = 1) {
@@ -8400,11 +8400,11 @@ async function readLinkIds(http, resourceID, maxPages = 1) {
8400
8400
  const res = await http.request({
8401
8401
  method: "POST",
8402
8402
  idempotent: true,
8403
- path: cursor === null ? "/V1.0/TicketSecondaryResources/query" : _chunkTBFXRNNEcjs.cursorToPath.call(void 0, http.baseUrl, cursor),
8403
+ path: cursor === null ? "/V1.0/TicketSecondaryResources/query" : _chunk45PLS73Kcjs.cursorToPath.call(void 0, http.baseUrl, cursor),
8404
8404
  body: { MaxRecords: LINK_READ_CAP, filter: [{ field: "resourceID", op: "eq", value: resourceID }], IncludeFields: ["ticketID"] },
8405
8405
  operation: OP2
8406
8406
  });
8407
- const page = _chunkTBFXRNNEcjs.unwrapItems.call(void 0, res, OP2);
8407
+ const page = _chunk45PLS73Kcjs.unwrapItems.call(void 0, res, OP2);
8408
8408
  for (const row of page.items) if (typeof row.ticketID === "number") ids.add(row.ticketID);
8409
8409
  cursor = page.pageDetails.nextPageUrl;
8410
8410
  if (cursor === null || page.items.length === 0) return { ids: [...ids], capped: false };
@@ -8412,35 +8412,35 @@ async function readLinkIds(http, resourceID, maxPages = 1) {
8412
8412
  return { ids: [...ids], capped: true };
8413
8413
  }
8414
8414
  async function forResource(_resource, resourceIDIn, http, opts = {}) {
8415
- if (opts === null || typeof opts !== "object") throw new (0, _chunkTBFXRNNEcjs.AutotaskConfigError)(`${OP2}: opts must be an object`, { operation: OP2 });
8415
+ if (opts === null || typeof opts !== "object") throw new (0, _chunk45PLS73Kcjs.AutotaskConfigError)(`${OP2}: opts must be an object`, { operation: OP2 });
8416
8416
  const resourceID = positiveId(resourceIDIn, "resourceID");
8417
8417
  const scope = _nullishCoalesce(opts.scope, () => ( "both"));
8418
8418
  if (scope !== "primary" && scope !== "secondary" && scope !== "both") {
8419
- throw new (0, _chunkTBFXRNNEcjs.AutotaskConfigError)(`${OP2}: scope must be 'primary', 'secondary' or 'both' (got ${JSON.stringify(opts.scope)})`, { operation: OP2 });
8419
+ throw new (0, _chunk45PLS73Kcjs.AutotaskConfigError)(`${OP2}: scope must be 'primary', 'secondary' or 'both' (got ${JSON.stringify(opts.scope)})`, { operation: OP2 });
8420
8420
  }
8421
8421
  if (opts.openOnly !== void 0 && typeof opts.openOnly !== "boolean") {
8422
- throw new (0, _chunkTBFXRNNEcjs.AutotaskConfigError)(`${OP2}: openOnly must be a boolean`, { operation: OP2 });
8422
+ throw new (0, _chunk45PLS73Kcjs.AutotaskConfigError)(`${OP2}: openOnly must be a boolean`, { operation: OP2 });
8423
8423
  }
8424
8424
  const limit = opts.limit === void 0 ? LIMIT_DEFAULT : opts.limit;
8425
8425
  if (opts.countOnly !== true && (!Number.isInteger(limit) || limit < 1 || limit > LIMIT_MAX)) {
8426
- throw new (0, _chunkTBFXRNNEcjs.AutotaskConfigError)(`${OP2}: limit must be an integer 1-${LIMIT_MAX} (got ${String(opts.limit)})`, { operation: OP2 });
8426
+ throw new (0, _chunk45PLS73Kcjs.AutotaskConfigError)(`${OP2}: limit must be an integer 1-${LIMIT_MAX} (got ${String(opts.limit)})`, { operation: OP2 });
8427
8427
  }
8428
8428
  const includeFields = _nullishCoalesce(opts.includeFields, () => ( []));
8429
8429
  if (!Array.isArray(includeFields) || includeFields.some((f) => typeof f !== "string" || f.length === 0)) {
8430
- throw new (0, _chunkTBFXRNNEcjs.AutotaskConfigError)(`${OP2}: includeFields must be a list of field names`, { operation: OP2 });
8430
+ throw new (0, _chunk45PLS73Kcjs.AutotaskConfigError)(`${OP2}: includeFields must be a list of field names`, { operation: OP2 });
8431
8431
  }
8432
8432
  const openOnly = opts.openOnly === true;
8433
8433
  const fields = [.../* @__PURE__ */ new Set([...TICKET_FIELDS, ...includeFields])];
8434
8434
  if (opts.countOnly !== void 0 && typeof opts.countOnly !== "boolean") {
8435
- throw new (0, _chunkTBFXRNNEcjs.AutotaskConfigError)(`${OP2}: countOnly must be a boolean`, { operation: OP2 });
8435
+ throw new (0, _chunk45PLS73Kcjs.AutotaskConfigError)(`${OP2}: countOnly must be a boolean`, { operation: OP2 });
8436
8436
  }
8437
- const closed = await _chunkTBFXRNNEcjs.resolveTicketStatusSemantics.call(void 0,
8437
+ const closed = await _chunk45PLS73Kcjs.resolveTicketStatusSemantics.call(void 0,
8438
8438
  http,
8439
8439
  { ...opts.excludeStatusIds === void 0 ? {} : { excludeStatusIds: opts.excludeStatusIds }, ...opts.allowAssumed === void 0 ? {} : { allowAssumed: opts.allowAssumed } },
8440
8440
  OP2
8441
8441
  );
8442
8442
  const closedStatus = { closedIds: closed.closedIds, source: closed.source, note: closed.note };
8443
- const openLeaf = openOnly || opts.countOnly === true ? [_chunkTBFXRNNEcjs.openStatusFilter.call(void 0, closed.closedIds)] : [];
8443
+ const openLeaf = openOnly || opts.countOnly === true ? [_chunk45PLS73Kcjs.openStatusFilter.call(void 0, closed.closedIds)] : [];
8444
8444
  if (opts.countOnly === true) {
8445
8445
  const primaryCount = scope === "secondary" ? 0 : await _resource.count({ filter: [{ field: "assignedResourceID", op: "eq", value: resourceID }, ...openLeaf] });
8446
8446
  let secondaryCount = 0;
@@ -8454,7 +8454,7 @@ async function forResource(_resource, resourceIDIn, http, opts = {}) {
8454
8454
  const page = await ticketPage(http, [{ field: "id", op: "in", value: chunk }, ...openLeaf], chunk.length, ["id", "status", "assignedResourceID"]);
8455
8455
  const seen = /* @__PURE__ */ new Set();
8456
8456
  for (const t of page.rows) {
8457
- if (typeof t.id !== "number" || seen.has(t.id) || _chunkTBFXRNNEcjs.isClosedStatus.call(void 0, t.status, closed.closedIds)) continue;
8457
+ if (typeof t.id !== "number" || seen.has(t.id) || _chunk45PLS73Kcjs.isClosedStatus.call(void 0, t.status, closed.closedIds)) continue;
8458
8458
  seen.add(t.id);
8459
8459
  if (scope === "both" && t.assignedResourceID === resourceID) bothCount++;
8460
8460
  }
@@ -8500,13 +8500,13 @@ async function forResource(_resource, resourceIDIn, http, opts = {}) {
8500
8500
  for (const [id, t] of primary) merged.set(id, t);
8501
8501
  for (const [id, t] of secondary) if (!merged.has(id)) merged.set(id, t);
8502
8502
  let tickets = [...merged.values()];
8503
- if (openOnly) tickets = tickets.filter((t) => !_chunkTBFXRNNEcjs.isClosedStatus.call(void 0, t.status, closed.closedIds));
8503
+ if (openOnly) tickets = tickets.filter((t) => !_chunk45PLS73Kcjs.isClosedStatus.call(void 0, t.status, closed.closedIds));
8504
8504
  tickets.sort((a, b) => Number(a.id) - Number(b.id));
8505
8505
  if (tickets.length > limit) {
8506
8506
  tickets = tickets.slice(0, limit);
8507
8507
  capped = true;
8508
8508
  }
8509
- const openCount = tickets.filter((t) => !_chunkTBFXRNNEcjs.isClosedStatus.call(void 0, t.status, closed.closedIds)).length;
8509
+ const openCount = tickets.filter((t) => !_chunk45PLS73Kcjs.isClosedStatus.call(void 0, t.status, closed.closedIds)).length;
8510
8510
  const primaryIds = [...primary.keys()].sort((a, b) => a - b);
8511
8511
  const secondaryIds = [...secondary.keys()].sort((a, b) => a - b);
8512
8512
  const both = primaryIds.filter((id) => secondary.has(id));
@@ -8530,7 +8530,7 @@ var OP3 = "tickets.lineOfBusiness";
8530
8530
  function positiveId2(value, name) {
8531
8531
  const n = typeof value === "string" && /^[0-9]+$/.test(value.trim()) ? Number(value) : value;
8532
8532
  if (typeof n !== "number" || !Number.isSafeInteger(n) || n < 1) {
8533
- throw new (0, _chunkTBFXRNNEcjs.AutotaskConfigError)(OP3 + ": " + name + " must be a positive integer id (got " + String(value) + ")", { operation: OP3 });
8533
+ throw new (0, _chunk45PLS73Kcjs.AutotaskConfigError)(OP3 + ": " + name + " must be a positive integer id (got " + String(value) + ")", { operation: OP3 });
8534
8534
  }
8535
8535
  return n;
8536
8536
  }
@@ -8545,25 +8545,25 @@ async function lineOfBusiness(resource, ticketIdIn, http, associationIdIn) {
8545
8545
  associationSource = "argument";
8546
8546
  } else {
8547
8547
  const ticket = await resource.get(ticketId);
8548
- associationId = _chunkTBFXRNNEcjs.vendorId.call(void 0, ticket.organizationalLevelAssociationID);
8548
+ associationId = _chunk45PLS73Kcjs.vendorId.call(void 0, ticket.organizationalLevelAssociationID);
8549
8549
  if (associationId !== void 0) {
8550
8550
  associationSource = "ticket";
8551
8551
  } else {
8552
- const contractRef = _chunkTBFXRNNEcjs.vendorId.call(void 0, ticket.contractID);
8552
+ const contractRef = _chunk45PLS73Kcjs.vendorId.call(void 0, ticket.contractID);
8553
8553
  if (contractRef !== void 0) {
8554
8554
  const client = http.client;
8555
8555
  if (client === void 0) {
8556
- throw new (0, _chunkTBFXRNNEcjs.AutotaskConfigError)(OP3 + ": the transport is not wired to an AutotaskClient (the composite must run through the client)", { operation: OP3 });
8556
+ throw new (0, _chunk45PLS73Kcjs.AutotaskConfigError)(OP3 + ": the transport is not wired to an AutotaskClient (the composite must run through the client)", { operation: OP3 });
8557
8557
  }
8558
8558
  try {
8559
8559
  const contract = await client.contracts.get(contractRef);
8560
8560
  contractId = contractRef;
8561
- associationId = _chunkTBFXRNNEcjs.vendorId.call(void 0, contract.organizationalLevelAssociationID);
8561
+ associationId = _chunk45PLS73Kcjs.vendorId.call(void 0, contract.organizationalLevelAssociationID);
8562
8562
  if (associationId !== void 0) associationSource = "contract";
8563
8563
  } catch (e) {
8564
- if (e instanceof _chunkTBFXRNNEcjs.NotFoundError) {
8564
+ if (e instanceof _chunk45PLS73Kcjs.NotFoundError) {
8565
8565
  contractId = contractRef;
8566
- } else if (_chunkTBFXRNNEcjs.isAutotaskError.call(void 0, e) && e.code !== "ABORTED") {
8566
+ } else if (_chunk45PLS73Kcjs.isAutotaskError.call(void 0, e) && e.code !== "ABORTED") {
8567
8567
  contractId = contractRef;
8568
8568
  contractUnread = true;
8569
8569
  } else {
@@ -8584,18 +8584,18 @@ async function lineOfBusiness(resource, ticketIdIn, http, associationIdIn) {
8584
8584
  markers: { association: contractUnread ? "unresolved" : "missing", organizationalLevel2: "missing", organizationalLevel1: "missing" }
8585
8585
  };
8586
8586
  }
8587
- const chain = await _chunkTBFXRNNEcjs.resolveLineOfBusinessChain.call(void 0, http, associationId, { budget: 3, operation: OP3, onError: "propagate" });
8587
+ const chain = await _chunk45PLS73Kcjs.resolveLineOfBusinessChain.call(void 0, http, associationId, { budget: 3, operation: OP3, onError: "propagate" });
8588
8588
  const { association, organizationalLevel2, organizationalLevel1, markers } = chain.lineOfBusiness;
8589
8589
  return { ticketId, associationSource, contractId, association, organizationalLevel2, organizationalLevel1, markers };
8590
8590
  }
8591
8591
 
8592
8592
  // src/resources/special/tickets/statusSemantics.ts
8593
8593
  async function statusSemantics(_resource, opts = {}, http) {
8594
- return _chunkTBFXRNNEcjs.resolveTicketStatusSemantics.call(void 0, http, opts);
8594
+ return _chunk45PLS73Kcjs.resolveTicketStatusSemantics.call(void 0, http, opts);
8595
8595
  }
8596
8596
 
8597
8597
  // src/resources/tickets.ts
8598
- var TicketsResource = class extends _chunkTBFXRNNEcjs.BaseResource {
8598
+ var TicketsResource = class extends _chunk45PLS73Kcjs.BaseResource {
8599
8599
  constructor(http, pageSize) {
8600
8600
  super(http, {
8601
8601
  key: "tickets",
@@ -8713,7 +8713,7 @@ var TicketsResource = class extends _chunkTBFXRNNEcjs.BaseResource {
8713
8713
  };
8714
8714
 
8715
8715
  // src/resources/ticket_webhooks.ts
8716
- var TicketWebhooksResource = class extends _chunkTBFXRNNEcjs.BaseResource {
8716
+ var TicketWebhooksResource = class extends _chunk45PLS73Kcjs.BaseResource {
8717
8717
  constructor(http, pageSize) {
8718
8718
  super(http, {
8719
8719
  key: "ticket_webhooks",
@@ -8789,7 +8789,7 @@ var TicketWebhooksResource = class extends _chunkTBFXRNNEcjs.BaseResource {
8789
8789
  };
8790
8790
 
8791
8791
  // src/resources/time_entry_attachments.ts
8792
- var TimeEntryAttachmentsResource = class extends _chunkTBFXRNNEcjs.BaseResource {
8792
+ var TimeEntryAttachmentsResource = class extends _chunk45PLS73Kcjs.BaseResource {
8793
8793
  constructor(http, pageSize) {
8794
8794
  super(http, {
8795
8795
  key: "time_entry_attachments",
@@ -8852,9 +8852,9 @@ var TimeEntryAttachmentsResource = class extends _chunkTBFXRNNEcjs.BaseResource
8852
8852
 
8853
8853
  // src/resources/special/time_off_requests.ts
8854
8854
  async function approve(_resource, id, opts = {}, http) {
8855
- const numericId = _chunkTBFXRNNEcjs.parseIdentifier.call(void 0, id, "id");
8855
+ const numericId = _chunk45PLS73Kcjs.parseIdentifier.call(void 0, id, "id");
8856
8856
  if (opts.dryRun === true) {
8857
- return _chunkTBFXRNNEcjs.buildDryRunResult.call(void 0, {
8857
+ return _chunk45PLS73Kcjs.buildDryRunResult.call(void 0, {
8858
8858
  operation: "time_off_requests.approve",
8859
8859
  method: "GET",
8860
8860
  path: `/V1.0/TimeOffRequests/${numericId}/Approve`,
@@ -8870,16 +8870,16 @@ async function approve(_resource, id, opts = {}, http) {
8870
8870
  operation: "time_off_requests.approve",
8871
8871
  maxRetries: opts.maxRetries
8872
8872
  });
8873
- return _chunkTBFXRNNEcjs.unwrapOperation.call(void 0, res);
8873
+ return _chunk45PLS73Kcjs.unwrapOperation.call(void 0, res);
8874
8874
  }
8875
8875
  async function reject(_resource, id, reason, opts = {}, http) {
8876
- const numericId = _chunkTBFXRNNEcjs.parseIdentifier.call(void 0, id, "id");
8876
+ const numericId = _chunk45PLS73Kcjs.parseIdentifier.call(void 0, id, "id");
8877
8877
  const text = reason.trim();
8878
8878
  if (text === "") {
8879
- throw new (0, _chunkTBFXRNNEcjs.AutotaskConfigError)("reject: a non-empty reason is required (vendor TimeOffRequestRejectModel)");
8879
+ throw new (0, _chunk45PLS73Kcjs.AutotaskConfigError)("reject: a non-empty reason is required (vendor TimeOffRequestRejectModel)");
8880
8880
  }
8881
8881
  if (opts.dryRun === true) {
8882
- return _chunkTBFXRNNEcjs.buildDryRunResult.call(void 0, {
8882
+ return _chunk45PLS73Kcjs.buildDryRunResult.call(void 0, {
8883
8883
  operation: "time_off_requests.reject",
8884
8884
  method: "POST",
8885
8885
  path: `/V1.0/TimeOffRequests/${numericId}/Reject`,
@@ -8897,11 +8897,11 @@ async function reject(_resource, id, reason, opts = {}, http) {
8897
8897
  operation: "time_off_requests.reject",
8898
8898
  maxRetries: opts.maxRetries
8899
8899
  });
8900
- return _chunkTBFXRNNEcjs.unwrapOperation.call(void 0, res);
8900
+ return _chunk45PLS73Kcjs.unwrapOperation.call(void 0, res);
8901
8901
  }
8902
8902
 
8903
8903
  // src/resources/time_off_requests.ts
8904
- var TimeOffRequestsResource = class extends _chunkTBFXRNNEcjs.BaseResource {
8904
+ var TimeOffRequestsResource = class extends _chunk45PLS73Kcjs.BaseResource {
8905
8905
  constructor(http, pageSize) {
8906
8906
  super(http, {
8907
8907
  key: "time_off_requests",