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