node-autotask 0.69.1 → 0.71.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.
- package/CHANGELOG.md +30 -0
- package/MCP_TOOL_CATALOG.json +369 -9
- package/README.md +7 -1
- package/capabilities.json +1697 -392
- package/dist/capabilities-data.js +1696 -391
- package/dist/capabilities.cjs +4 -4
- package/dist/capabilities.js +1 -1
- package/dist/{chunk-WFVLF7EW.cjs → chunk-4DSLRDIF.cjs} +33 -30
- package/dist/{chunk-FK37JXSJ.js → chunk-4OR3XBIP.js} +699 -168
- package/dist/{chunk-MMGO3SFL.js → chunk-5COLIVBE.js} +2 -2
- package/dist/{chunk-KAZE4WC7.cjs → chunk-JLCHKCEB.cjs} +3 -3
- package/dist/{chunk-SCFB5MF3.js → chunk-LKJA57CH.js} +3 -3
- package/dist/{chunk-EWXRFHPP.cjs → chunk-QJ327YI6.cjs} +177 -177
- package/dist/{chunk-CLHDTYWO.cjs → chunk-QQFF7X67.cjs} +704 -172
- package/dist/{chunk-64BMSXWT.js → chunk-YKQ2KNQO.js} +5 -2
- package/dist/{index-BT_0tTPS.d.cts → index-CAXT5ZKT.d.cts} +14 -4
- package/dist/{index-COQEG55Q.d.cts → index-CM_SRgtH.d.cts} +209 -1
- package/dist/{index-COQEG55Q.d.ts → index-CM_SRgtH.d.ts} +209 -1
- package/dist/{index-Coe7LFLY.d.ts → index-lGpxr4gY.d.ts} +14 -4
- package/dist/index.cjs +84 -84
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +5 -5
- package/dist/operations/index.cjs +54 -50
- package/dist/operations/index.d.cts +25 -7
- package/dist/operations/index.d.ts +25 -7
- package/dist/operations/index.js +2 -2
- package/dist/pool.cjs +12 -12
- package/dist/pool.d.cts +1 -1
- package/dist/pool.d.ts +1 -1
- package/dist/pool.js +4 -4
- package/dist/resources/index.cjs +27 -27
- package/dist/resources/index.d.cts +2 -2
- package/dist/resources/index.d.ts +2 -2
- package/dist/resources/index.js +3 -3
- package/dist/types/index.d.cts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/docs/API.md +108 -2
- package/docs/N8N-ADAPTER.md +1 -1
- package/docs/RELEASING.md +11 -3
- package/docs/performance-caching.md +92 -0
- package/docs/performance-reads.md +9 -1
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../chunk-
|
|
3
|
+
var chunkQQFF7X67_cjs = require('../chunk-QQFF7X67.cjs');
|
|
4
|
+
require('../chunk-JLCHKCEB.cjs');
|
|
5
5
|
var chunkBD4AUGCJ_cjs = require('../chunk-BD4AUGCJ.cjs');
|
|
6
6
|
|
|
7
7
|
// src/operations/describeWrite.ts
|
|
@@ -78,194 +78,198 @@ function describeWrite(dry, record, opts) {
|
|
|
78
78
|
|
|
79
79
|
Object.defineProperty(exports, "AGGREGATE_DATE_BUCKETS", {
|
|
80
80
|
enumerable: true,
|
|
81
|
-
get: function () { return
|
|
81
|
+
get: function () { return chunkQQFF7X67_cjs.AGGREGATE_DATE_BUCKETS; }
|
|
82
82
|
});
|
|
83
83
|
Object.defineProperty(exports, "AGGREGATE_DEFAULT_LIMIT", {
|
|
84
84
|
enumerable: true,
|
|
85
|
-
get: function () { return
|
|
85
|
+
get: function () { return chunkQQFF7X67_cjs.AGGREGATE_DEFAULT_LIMIT; }
|
|
86
86
|
});
|
|
87
87
|
Object.defineProperty(exports, "AGGREGATE_DEFAULT_TOP", {
|
|
88
88
|
enumerable: true,
|
|
89
|
-
get: function () { return
|
|
89
|
+
get: function () { return chunkQQFF7X67_cjs.AGGREGATE_DEFAULT_TOP; }
|
|
90
90
|
});
|
|
91
91
|
Object.defineProperty(exports, "AGGREGATE_TOP_MAX", {
|
|
92
92
|
enumerable: true,
|
|
93
|
-
get: function () { return
|
|
93
|
+
get: function () { return chunkQQFF7X67_cjs.AGGREGATE_TOP_MAX; }
|
|
94
94
|
});
|
|
95
95
|
Object.defineProperty(exports, "CREATE_BLOCKER_KINDS", {
|
|
96
96
|
enumerable: true,
|
|
97
|
-
get: function () { return
|
|
97
|
+
get: function () { return chunkQQFF7X67_cjs.CREATE_BLOCKER_KINDS; }
|
|
98
98
|
});
|
|
99
99
|
Object.defineProperty(exports, "EXPAND_RESOURCE_NAMES_MAX_IDS", {
|
|
100
100
|
enumerable: true,
|
|
101
|
-
get: function () { return
|
|
101
|
+
get: function () { return chunkQQFF7X67_cjs.EXPAND_RESOURCE_NAMES_MAX_IDS; }
|
|
102
102
|
});
|
|
103
103
|
Object.defineProperty(exports, "FETCH_BY_IDS_CHUNK_SIZE", {
|
|
104
104
|
enumerable: true,
|
|
105
|
-
get: function () { return
|
|
105
|
+
get: function () { return chunkQQFF7X67_cjs.FETCH_BY_IDS_CHUNK_SIZE; }
|
|
106
106
|
});
|
|
107
107
|
Object.defineProperty(exports, "FETCH_BY_IDS_MAX_ITEMS", {
|
|
108
108
|
enumerable: true,
|
|
109
|
-
get: function () { return
|
|
109
|
+
get: function () { return chunkQQFF7X67_cjs.FETCH_BY_IDS_MAX_ITEMS; }
|
|
110
110
|
});
|
|
111
111
|
Object.defineProperty(exports, "FIELD_CACHE_KINDS", {
|
|
112
112
|
enumerable: true,
|
|
113
|
-
get: function () { return
|
|
113
|
+
get: function () { return chunkQQFF7X67_cjs.FIELD_CACHE_KINDS; }
|
|
114
114
|
});
|
|
115
115
|
Object.defineProperty(exports, "FIELD_CATALOG_HONESTY_NOTE", {
|
|
116
116
|
enumerable: true,
|
|
117
|
-
get: function () { return
|
|
117
|
+
get: function () { return chunkQQFF7X67_cjs.FIELD_CATALOG_HONESTY_NOTE; }
|
|
118
118
|
});
|
|
119
119
|
Object.defineProperty(exports, "INVOKE_OPTION_KEYS", {
|
|
120
120
|
enumerable: true,
|
|
121
|
-
get: function () { return
|
|
121
|
+
get: function () { return chunkQQFF7X67_cjs.INVOKE_OPTION_KEYS; }
|
|
122
122
|
});
|
|
123
123
|
Object.defineProperty(exports, "MAX_FIELD_CATALOG_WIRE", {
|
|
124
124
|
enumerable: true,
|
|
125
|
-
get: function () { return
|
|
125
|
+
get: function () { return chunkQQFF7X67_cjs.MAX_FIELD_CATALOG_WIRE; }
|
|
126
126
|
});
|
|
127
127
|
Object.defineProperty(exports, "MIN_FIELD_CATALOG_MAX_BYTES", {
|
|
128
128
|
enumerable: true,
|
|
129
|
-
get: function () { return
|
|
129
|
+
get: function () { return chunkQQFF7X67_cjs.MIN_FIELD_CATALOG_MAX_BYTES; }
|
|
130
130
|
});
|
|
131
131
|
Object.defineProperty(exports, "PARAMS_BAG_KEYS", {
|
|
132
132
|
enumerable: true,
|
|
133
|
-
get: function () { return
|
|
133
|
+
get: function () { return chunkQQFF7X67_cjs.PARAMS_BAG_KEYS; }
|
|
134
134
|
});
|
|
135
135
|
Object.defineProperty(exports, "PICKLIST_VALUE_NOT_SERVED_NOTE", {
|
|
136
136
|
enumerable: true,
|
|
137
|
-
get: function () { return
|
|
137
|
+
get: function () { return chunkQQFF7X67_cjs.PICKLIST_VALUE_NOT_SERVED_NOTE; }
|
|
138
138
|
});
|
|
139
139
|
Object.defineProperty(exports, "UI_LINK_ENTITIES", {
|
|
140
140
|
enumerable: true,
|
|
141
|
-
get: function () { return
|
|
141
|
+
get: function () { return chunkQQFF7X67_cjs.UI_LINK_ENTITIES; }
|
|
142
142
|
});
|
|
143
143
|
Object.defineProperty(exports, "WORKFLOW_RESOURCES", {
|
|
144
144
|
enumerable: true,
|
|
145
|
-
get: function () { return
|
|
145
|
+
get: function () { return chunkQQFF7X67_cjs.WORKFLOW_RESOURCES; }
|
|
146
146
|
});
|
|
147
147
|
Object.defineProperty(exports, "aggregate", {
|
|
148
148
|
enumerable: true,
|
|
149
|
-
get: function () { return
|
|
149
|
+
get: function () { return chunkQQFF7X67_cjs.aggregate; }
|
|
150
150
|
});
|
|
151
151
|
Object.defineProperty(exports, "arAging", {
|
|
152
152
|
enumerable: true,
|
|
153
|
-
get: function () { return
|
|
153
|
+
get: function () { return chunkQQFF7X67_cjs.arAging; }
|
|
154
154
|
});
|
|
155
155
|
Object.defineProperty(exports, "buildUiLink", {
|
|
156
156
|
enumerable: true,
|
|
157
|
-
get: function () { return
|
|
157
|
+
get: function () { return chunkQQFF7X67_cjs.buildUiLink; }
|
|
158
158
|
});
|
|
159
159
|
Object.defineProperty(exports, "createGuidance", {
|
|
160
160
|
enumerable: true,
|
|
161
|
-
get: function () { return
|
|
161
|
+
get: function () { return chunkQQFF7X67_cjs.createGuidance; }
|
|
162
162
|
});
|
|
163
163
|
Object.defineProperty(exports, "dateBucketLabel", {
|
|
164
164
|
enumerable: true,
|
|
165
|
-
get: function () { return
|
|
165
|
+
get: function () { return chunkQQFF7X67_cjs.dateBucketLabel; }
|
|
166
166
|
});
|
|
167
167
|
Object.defineProperty(exports, "effectiveRequiredFields", {
|
|
168
168
|
enumerable: true,
|
|
169
|
-
get: function () { return
|
|
169
|
+
get: function () { return chunkQQFF7X67_cjs.effectiveRequiredFields; }
|
|
170
170
|
});
|
|
171
171
|
Object.defineProperty(exports, "expandResourceNames", {
|
|
172
172
|
enumerable: true,
|
|
173
|
-
get: function () { return
|
|
173
|
+
get: function () { return chunkQQFF7X67_cjs.expandResourceNames; }
|
|
174
174
|
});
|
|
175
175
|
Object.defineProperty(exports, "fetchByIds", {
|
|
176
176
|
enumerable: true,
|
|
177
|
-
get: function () { return
|
|
177
|
+
get: function () { return chunkQQFF7X67_cjs.fetchByIds; }
|
|
178
178
|
});
|
|
179
179
|
Object.defineProperty(exports, "fieldCatalog", {
|
|
180
180
|
enumerable: true,
|
|
181
|
-
get: function () { return
|
|
181
|
+
get: function () { return chunkQQFF7X67_cjs.fieldCatalog; }
|
|
182
182
|
});
|
|
183
183
|
Object.defineProperty(exports, "foldFlattenedOpts", {
|
|
184
184
|
enumerable: true,
|
|
185
|
-
get: function () { return
|
|
185
|
+
get: function () { return chunkQQFF7X67_cjs.foldFlattenedOpts; }
|
|
186
186
|
});
|
|
187
187
|
Object.defineProperty(exports, "invoke", {
|
|
188
188
|
enumerable: true,
|
|
189
|
-
get: function () { return
|
|
189
|
+
get: function () { return chunkQQFF7X67_cjs.invoke; }
|
|
190
190
|
});
|
|
191
191
|
Object.defineProperty(exports, "invokeDelete", {
|
|
192
192
|
enumerable: true,
|
|
193
|
-
get: function () { return
|
|
193
|
+
get: function () { return chunkQQFF7X67_cjs.invokeDelete; }
|
|
194
194
|
});
|
|
195
195
|
Object.defineProperty(exports, "invokeRead", {
|
|
196
196
|
enumerable: true,
|
|
197
|
-
get: function () { return
|
|
197
|
+
get: function () { return chunkQQFF7X67_cjs.invokeRead; }
|
|
198
|
+
});
|
|
199
|
+
Object.defineProperty(exports, "invokeReadPages", {
|
|
200
|
+
enumerable: true,
|
|
201
|
+
get: function () { return chunkQQFF7X67_cjs.invokeReadPages; }
|
|
198
202
|
});
|
|
199
203
|
Object.defineProperty(exports, "invokeWrite", {
|
|
200
204
|
enumerable: true,
|
|
201
|
-
get: function () { return
|
|
205
|
+
get: function () { return chunkQQFF7X67_cjs.invokeWrite; }
|
|
202
206
|
});
|
|
203
207
|
Object.defineProperty(exports, "needsConfirmation", {
|
|
204
208
|
enumerable: true,
|
|
205
|
-
get: function () { return
|
|
209
|
+
get: function () { return chunkQQFF7X67_cjs.needsConfirmation; }
|
|
206
210
|
});
|
|
207
211
|
Object.defineProperty(exports, "nonChargeableWork", {
|
|
208
212
|
enumerable: true,
|
|
209
|
-
get: function () { return
|
|
213
|
+
get: function () { return chunkQQFF7X67_cjs.nonChargeableWork; }
|
|
210
214
|
});
|
|
211
215
|
Object.defineProperty(exports, "notPersistedFields", {
|
|
212
216
|
enumerable: true,
|
|
213
|
-
get: function () { return
|
|
217
|
+
get: function () { return chunkQQFF7X67_cjs.notPersistedFields; }
|
|
214
218
|
});
|
|
215
219
|
Object.defineProperty(exports, "portfolioMargin", {
|
|
216
220
|
enumerable: true,
|
|
217
|
-
get: function () { return
|
|
221
|
+
get: function () { return chunkQQFF7X67_cjs.portfolioMargin; }
|
|
218
222
|
});
|
|
219
223
|
Object.defineProperty(exports, "recurringRevenue", {
|
|
220
224
|
enumerable: true,
|
|
221
|
-
get: function () { return
|
|
225
|
+
get: function () { return chunkQQFF7X67_cjs.recurringRevenue; }
|
|
222
226
|
});
|
|
223
227
|
Object.defineProperty(exports, "relationshipMap", {
|
|
224
228
|
enumerable: true,
|
|
225
|
-
get: function () { return
|
|
229
|
+
get: function () { return chunkQQFF7X67_cjs.relationshipMap; }
|
|
226
230
|
});
|
|
227
231
|
Object.defineProperty(exports, "resolveAny", {
|
|
228
232
|
enumerable: true,
|
|
229
|
-
get: function () { return
|
|
233
|
+
get: function () { return chunkQQFF7X67_cjs.resolveAny; }
|
|
230
234
|
});
|
|
231
235
|
Object.defineProperty(exports, "resolveStaff", {
|
|
232
236
|
enumerable: true,
|
|
233
|
-
get: function () { return
|
|
237
|
+
get: function () { return chunkQQFF7X67_cjs.resolveStaff; }
|
|
234
238
|
});
|
|
235
239
|
Object.defineProperty(exports, "revenueRollup", {
|
|
236
240
|
enumerable: true,
|
|
237
|
-
get: function () { return
|
|
241
|
+
get: function () { return chunkQQFF7X67_cjs.revenueRollup; }
|
|
238
242
|
});
|
|
239
243
|
Object.defineProperty(exports, "sanitiseResult", {
|
|
240
244
|
enumerable: true,
|
|
241
|
-
get: function () { return
|
|
245
|
+
get: function () { return chunkQQFF7X67_cjs.sanitiseResult; }
|
|
242
246
|
});
|
|
243
247
|
Object.defineProperty(exports, "searchAcrossResources", {
|
|
244
248
|
enumerable: true,
|
|
245
|
-
get: function () { return
|
|
249
|
+
get: function () { return chunkQQFF7X67_cjs.searchAcrossResources; }
|
|
246
250
|
});
|
|
247
251
|
Object.defineProperty(exports, "uiLink", {
|
|
248
252
|
enumerable: true,
|
|
249
|
-
get: function () { return
|
|
253
|
+
get: function () { return chunkQQFF7X67_cjs.uiLink; }
|
|
250
254
|
});
|
|
251
255
|
Object.defineProperty(exports, "unknownKeysRefusal", {
|
|
252
256
|
enumerable: true,
|
|
253
|
-
get: function () { return
|
|
257
|
+
get: function () { return chunkQQFF7X67_cjs.unknownKeysRefusal; }
|
|
254
258
|
});
|
|
255
259
|
Object.defineProperty(exports, "validateDispatchArgs", {
|
|
256
260
|
enumerable: true,
|
|
257
|
-
get: function () { return
|
|
261
|
+
get: function () { return chunkQQFF7X67_cjs.validateDispatchArgs; }
|
|
258
262
|
});
|
|
259
263
|
Object.defineProperty(exports, "validateInvokeOptions", {
|
|
260
264
|
enumerable: true,
|
|
261
|
-
get: function () { return
|
|
265
|
+
get: function () { return chunkQQFF7X67_cjs.validateInvokeOptions; }
|
|
262
266
|
});
|
|
263
267
|
Object.defineProperty(exports, "validateParamsBag", {
|
|
264
268
|
enumerable: true,
|
|
265
|
-
get: function () { return
|
|
269
|
+
get: function () { return chunkQQFF7X67_cjs.validateParamsBag; }
|
|
266
270
|
});
|
|
267
271
|
Object.defineProperty(exports, "wipHours", {
|
|
268
272
|
enumerable: true,
|
|
269
|
-
get: function () { return
|
|
273
|
+
get: function () { return chunkQQFF7X67_cjs.wipHours; }
|
|
270
274
|
});
|
|
271
275
|
exports.describeWrite = describeWrite;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { a6 as RowNamesSummary, a7 as BlindSurfaceInfo, a8 as RelationshipResource, a9 as CreateGuidanceValueRequirement, aa as CreateGuidanceRow, ab as CreateBlockerKind, ac as CreateGuidanceReport, ad as FieldCacheKind } from '../index-
|
|
1
|
+
import { a6 as RowNamesSummary, a7 as BlindSurfaceInfo, a8 as RelationshipResource, a9 as CreateGuidanceValueRequirement, aa as CreateGuidanceRow, ab as CreateBlockerKind, ac as CreateGuidanceReport, ad as FieldCacheKind, ae as BoundedQueryResult } from '../index-CAXT5ZKT.cjs';
|
|
2
2
|
import { AutotaskClient, ProfitabilityLabourCostMethod, ZoneName } from '../index.cjs';
|
|
3
|
-
export {
|
|
4
|
-
import { I as Identifier, E as EmptyReasonInfo, D as DryRunResult, P as PickListValue } from '../index-
|
|
5
|
-
export { a as PICKLIST_VALUE_NOT_SERVED_NOTE } from '../index-
|
|
3
|
+
export { af as FIELD_CACHE_KINDS } from '../index-CAXT5ZKT.cjs';
|
|
4
|
+
import { I as Identifier, E as EmptyReasonInfo, D as DryRunResult, P as PickListValue } from '../index-CM_SRgtH.cjs';
|
|
5
|
+
export { a as PICKLIST_VALUE_NOT_SERVED_NOTE } from '../index-CM_SRgtH.cjs';
|
|
6
6
|
import { CapabilityRecord } from '../capabilities.cjs';
|
|
7
7
|
import { AutotaskConfigError } from '../index.cjs';
|
|
8
8
|
import '../logger-B1gYmFre.cjs';
|
|
@@ -1306,7 +1306,7 @@ interface FieldCatalogRow<F = FieldCatalogFieldRow> {
|
|
|
1306
1306
|
resource: string;
|
|
1307
1307
|
/** The vendor entity name (the path segment; plan-derived). */
|
|
1308
1308
|
apiEntity: string;
|
|
1309
|
-
/** The plan resource's `udfCapable` flag, read from the registry record (`CapabilityRecord.udfCapable`, issue #254): true for the resources whose records carry `userDefinedFields`.
|
|
1309
|
+
/** The plan resource's `udfCapable` flag, read from the registry record (`CapabilityRecord.udfCapable`, issue #254): true for the resources whose records carry `userDefinedFields`. The `udf` include requires a documented `getUdfInfo` route; unavailable routes produce a typed row error. Endpoint presence does not make a resource UDF-capable. */
|
|
1310
1310
|
udfCapable: boolean;
|
|
1311
1311
|
/** The filter mechanism for a UDF name — present exactly when `udfCapable`: a filter on a UDF name is accepted only with the vendor's `udf: true` marker (a plain filter is refused), so the row states the marker rather than leaving a consumer to read the UDF rows' `isQueryable` (issue #219 N7). */
|
|
1312
1312
|
udfFilter?: 'udf-marker';
|
|
@@ -1582,6 +1582,18 @@ declare function validateInvokeOptions(opts: Record<string, unknown> | undefined
|
|
|
1582
1582
|
*/
|
|
1583
1583
|
declare function unknownKeysRefusal(raw: unknown, validKeys: readonly string[], subject: string, operation?: string): AutotaskConfigError | null;
|
|
1584
1584
|
|
|
1585
|
+
/** Page-consumer contract for governed explicit bounded query walks. */
|
|
1586
|
+
|
|
1587
|
+
interface BoundedQueryPage<T = Record<string, unknown>> {
|
|
1588
|
+
/** Served rows after per-page names and note truncation, in vendor order. */
|
|
1589
|
+
readonly items: readonly T[];
|
|
1590
|
+
/** One-based vendor page ordinal; no cursor is exposed. */
|
|
1591
|
+
readonly page: number;
|
|
1592
|
+
}
|
|
1593
|
+
type BoundedQueryPageConsumer<T = Record<string, unknown>> = (page: BoundedQueryPage<T>) => void | Promise<void>;
|
|
1594
|
+
/** Fulfilled only after every served page was accepted; errors/abort reject instead. */
|
|
1595
|
+
type BoundedQuerySummary = Omit<BoundedQueryResult<unknown>, 'items'>;
|
|
1596
|
+
|
|
1585
1597
|
/**
|
|
1586
1598
|
* Invoke one registry operation through its typed SDK method — the legacy
|
|
1587
1599
|
* path (programmatic escape hatch). The mode is derived from the registry
|
|
@@ -1595,6 +1607,12 @@ declare function invoke(client: AutotaskClient, operation: string, args?: readon
|
|
|
1595
1607
|
* refuses (reads have no dry run).
|
|
1596
1608
|
*/
|
|
1597
1609
|
declare function invokeRead(client: AutotaskClient, operation: string, args?: readonly unknown[] | Record<string, unknown>, opts?: InvokeOptions): Promise<unknown>;
|
|
1610
|
+
/**
|
|
1611
|
+
* Consume a governed explicit bounded query, awaiting each served page.
|
|
1612
|
+
* Only primitive query reads with walk.maxRows are supported. Rejections,
|
|
1613
|
+
* including cancellation during the last sink, produce no terminal summary.
|
|
1614
|
+
*/
|
|
1615
|
+
declare function invokeReadPages(client: AutotaskClient, operation: string, args: readonly unknown[] | Record<string, unknown> | null, onPage: BoundedQueryPageConsumer, opts?: InvokeOptions): Promise<BoundedQuerySummary>;
|
|
1598
1616
|
/**
|
|
1599
1617
|
* `autotask_write` (SDK form): route an `effect=write` operation, dry-run-
|
|
1600
1618
|
* first (the governed `dryRun ?? true`). A read or destructive op refuses
|
|
@@ -1609,5 +1627,5 @@ declare function invokeWrite(client: AutotaskClient, operation: string, args?: r
|
|
|
1609
1627
|
*/
|
|
1610
1628
|
declare function invokeDelete(client: AutotaskClient, operation: string, args?: readonly unknown[] | Record<string, unknown>, opts?: InvokeOptions): Promise<unknown>;
|
|
1611
1629
|
|
|
1612
|
-
export { AGGREGATE_DATE_BUCKETS, AGGREGATE_DEFAULT_LIMIT, AGGREGATE_DEFAULT_TOP, AGGREGATE_TOP_MAX, CREATE_BLOCKER_KINDS, EXPAND_RESOURCE_NAMES_MAX_IDS, FETCH_BY_IDS_CHUNK_SIZE, FETCH_BY_IDS_MAX_ITEMS, FIELD_CATALOG_HONESTY_NOTE, FieldCacheKind, INVOKE_OPTION_KEYS, MAX_FIELD_CATALOG_WIRE, MIN_FIELD_CATALOG_MAX_BYTES, PARAMS_BAG_KEYS, RowNamesSummary, UI_LINK_ENTITIES, WORKFLOW_RESOURCES, aggregate, arAging, buildUiLink, createGuidance, dateBucketLabel, describeWrite, effectiveRequiredFields, expandResourceNames, fetchByIds, fieldCatalog, foldFlattenedOpts, invoke, invokeDelete, invokeRead, invokeWrite, needsConfirmation, nonChargeableWork, notPersistedFields, portfolioMargin, recurringRevenue, relationshipMap, resolveAny, resolveStaff, revenueRollup, sanitiseResult, searchAcrossResources, uiLink, unknownKeysRefusal, validateDispatchArgs, validateInvokeOptions, validateParamsBag, wipHours };
|
|
1613
|
-
export type { AggregateGroup, AggregateOptions, AggregateResult, ArAgingBuckets, ArAgingOptions, ArAgingResult, ArAgingRow, CreateGuidanceOptions, DateBucket, DerivationRule, DescribeWriteOptions, EffectiveRequiredFields, ExpandResourceNameRow, ExpandResourceNamesOptions, ExpandResourceNamesResult, FetchByIdsOptions, FetchManyItem, FetchManyItemError, FetchManyItemResult, FetchManyResult, FieldCatalogCompactFieldRow, FieldCatalogFieldRow, FieldCatalogOptions, FieldCatalogResult, FieldCatalogRow, FieldCatalogRowError, FieldCatalogTrimKind, FieldCatalogTruncation, FieldDerivation, InvokeMode, InvokeOptions, NonChargeableWorkAmount, NonChargeableWorkFigures, NonChargeableWorkGroupBy, NonChargeableWorkOptions, NonChargeableWorkResult, NonChargeableWorkRow, PortfolioMarginDimension, PortfolioMarginFigures, PortfolioMarginKey, PortfolioMarginOptions, PortfolioMarginResult, PortfolioMarginRow, RecurringRevenueOptions, RecurringRevenueResult, RecurringRevenueRow, RequiredFieldsRecord, RequiredFieldsSource, RequiredFieldsZoneFacts, ResolveAnyOptions, ResolveAnyResourceOutcome, ResolveAnyResult, ResolveStaffMatch, ResolveStaffOptions, ResolveStaffResult, RevenueRollupAmount, RevenueRollupDimension, RevenueRollupKey, RevenueRollupNonChargeable, RevenueRollupNonChargeableAmount, RevenueRollupOptions, RevenueRollupResult, RevenueRollupRow, SanitiseResult, SearchAcrossResourcesOptions, SearchAcrossResourcesResult, SearchAcrossResourcesRow, ServedCreateGuidanceReport, ServedCreateGuidanceRow, UiLinkEntity, UiLinkInput, UiLinkResult, UnpostedNonBillableTime, WipHoursFigures, WipHoursGroupBy, WipHoursOptions, WipHoursResult, WipHoursRow, WriteDescription };
|
|
1630
|
+
export { AGGREGATE_DATE_BUCKETS, AGGREGATE_DEFAULT_LIMIT, AGGREGATE_DEFAULT_TOP, AGGREGATE_TOP_MAX, CREATE_BLOCKER_KINDS, EXPAND_RESOURCE_NAMES_MAX_IDS, FETCH_BY_IDS_CHUNK_SIZE, FETCH_BY_IDS_MAX_ITEMS, FIELD_CATALOG_HONESTY_NOTE, FieldCacheKind, INVOKE_OPTION_KEYS, MAX_FIELD_CATALOG_WIRE, MIN_FIELD_CATALOG_MAX_BYTES, PARAMS_BAG_KEYS, RowNamesSummary, UI_LINK_ENTITIES, WORKFLOW_RESOURCES, aggregate, arAging, buildUiLink, createGuidance, dateBucketLabel, describeWrite, effectiveRequiredFields, expandResourceNames, fetchByIds, fieldCatalog, foldFlattenedOpts, invoke, invokeDelete, invokeRead, invokeReadPages, invokeWrite, needsConfirmation, nonChargeableWork, notPersistedFields, portfolioMargin, recurringRevenue, relationshipMap, resolveAny, resolveStaff, revenueRollup, sanitiseResult, searchAcrossResources, uiLink, unknownKeysRefusal, validateDispatchArgs, validateInvokeOptions, validateParamsBag, wipHours };
|
|
1631
|
+
export type { AggregateGroup, AggregateOptions, AggregateResult, ArAgingBuckets, ArAgingOptions, ArAgingResult, ArAgingRow, BoundedQueryPage, BoundedQueryPageConsumer, BoundedQuerySummary, CreateGuidanceOptions, DateBucket, DerivationRule, DescribeWriteOptions, EffectiveRequiredFields, ExpandResourceNameRow, ExpandResourceNamesOptions, ExpandResourceNamesResult, FetchByIdsOptions, FetchManyItem, FetchManyItemError, FetchManyItemResult, FetchManyResult, FieldCatalogCompactFieldRow, FieldCatalogFieldRow, FieldCatalogOptions, FieldCatalogResult, FieldCatalogRow, FieldCatalogRowError, FieldCatalogTrimKind, FieldCatalogTruncation, FieldDerivation, InvokeMode, InvokeOptions, NonChargeableWorkAmount, NonChargeableWorkFigures, NonChargeableWorkGroupBy, NonChargeableWorkOptions, NonChargeableWorkResult, NonChargeableWorkRow, PortfolioMarginDimension, PortfolioMarginFigures, PortfolioMarginKey, PortfolioMarginOptions, PortfolioMarginResult, PortfolioMarginRow, RecurringRevenueOptions, RecurringRevenueResult, RecurringRevenueRow, RequiredFieldsRecord, RequiredFieldsSource, RequiredFieldsZoneFacts, ResolveAnyOptions, ResolveAnyResourceOutcome, ResolveAnyResult, ResolveStaffMatch, ResolveStaffOptions, ResolveStaffResult, RevenueRollupAmount, RevenueRollupDimension, RevenueRollupKey, RevenueRollupNonChargeable, RevenueRollupNonChargeableAmount, RevenueRollupOptions, RevenueRollupResult, RevenueRollupRow, SanitiseResult, SearchAcrossResourcesOptions, SearchAcrossResourcesResult, SearchAcrossResourcesRow, ServedCreateGuidanceReport, ServedCreateGuidanceRow, UiLinkEntity, UiLinkInput, UiLinkResult, UnpostedNonBillableTime, WipHoursFigures, WipHoursGroupBy, WipHoursOptions, WipHoursResult, WipHoursRow, WriteDescription };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { a6 as RowNamesSummary, a7 as BlindSurfaceInfo, a8 as RelationshipResource, a9 as CreateGuidanceValueRequirement, aa as CreateGuidanceRow, ab as CreateBlockerKind, ac as CreateGuidanceReport, ad as FieldCacheKind } from '../index-
|
|
1
|
+
import { a6 as RowNamesSummary, a7 as BlindSurfaceInfo, a8 as RelationshipResource, a9 as CreateGuidanceValueRequirement, aa as CreateGuidanceRow, ab as CreateBlockerKind, ac as CreateGuidanceReport, ad as FieldCacheKind, ae as BoundedQueryResult } from '../index-lGpxr4gY.js';
|
|
2
2
|
import { AutotaskClient, ProfitabilityLabourCostMethod, ZoneName } from '../index.js';
|
|
3
|
-
export {
|
|
4
|
-
import { I as Identifier, E as EmptyReasonInfo, D as DryRunResult, P as PickListValue } from '../index-
|
|
5
|
-
export { a as PICKLIST_VALUE_NOT_SERVED_NOTE } from '../index-
|
|
3
|
+
export { af as FIELD_CACHE_KINDS } from '../index-lGpxr4gY.js';
|
|
4
|
+
import { I as Identifier, E as EmptyReasonInfo, D as DryRunResult, P as PickListValue } from '../index-CM_SRgtH.js';
|
|
5
|
+
export { a as PICKLIST_VALUE_NOT_SERVED_NOTE } from '../index-CM_SRgtH.js';
|
|
6
6
|
import { CapabilityRecord } from '../capabilities.js';
|
|
7
7
|
import { AutotaskConfigError } from '../index.js';
|
|
8
8
|
import '../logger-B1gYmFre.js';
|
|
@@ -1306,7 +1306,7 @@ interface FieldCatalogRow<F = FieldCatalogFieldRow> {
|
|
|
1306
1306
|
resource: string;
|
|
1307
1307
|
/** The vendor entity name (the path segment; plan-derived). */
|
|
1308
1308
|
apiEntity: string;
|
|
1309
|
-
/** The plan resource's `udfCapable` flag, read from the registry record (`CapabilityRecord.udfCapable`, issue #254): true for the resources whose records carry `userDefinedFields`.
|
|
1309
|
+
/** The plan resource's `udfCapable` flag, read from the registry record (`CapabilityRecord.udfCapable`, issue #254): true for the resources whose records carry `userDefinedFields`. The `udf` include requires a documented `getUdfInfo` route; unavailable routes produce a typed row error. Endpoint presence does not make a resource UDF-capable. */
|
|
1310
1310
|
udfCapable: boolean;
|
|
1311
1311
|
/** The filter mechanism for a UDF name — present exactly when `udfCapable`: a filter on a UDF name is accepted only with the vendor's `udf: true` marker (a plain filter is refused), so the row states the marker rather than leaving a consumer to read the UDF rows' `isQueryable` (issue #219 N7). */
|
|
1312
1312
|
udfFilter?: 'udf-marker';
|
|
@@ -1582,6 +1582,18 @@ declare function validateInvokeOptions(opts: Record<string, unknown> | undefined
|
|
|
1582
1582
|
*/
|
|
1583
1583
|
declare function unknownKeysRefusal(raw: unknown, validKeys: readonly string[], subject: string, operation?: string): AutotaskConfigError | null;
|
|
1584
1584
|
|
|
1585
|
+
/** Page-consumer contract for governed explicit bounded query walks. */
|
|
1586
|
+
|
|
1587
|
+
interface BoundedQueryPage<T = Record<string, unknown>> {
|
|
1588
|
+
/** Served rows after per-page names and note truncation, in vendor order. */
|
|
1589
|
+
readonly items: readonly T[];
|
|
1590
|
+
/** One-based vendor page ordinal; no cursor is exposed. */
|
|
1591
|
+
readonly page: number;
|
|
1592
|
+
}
|
|
1593
|
+
type BoundedQueryPageConsumer<T = Record<string, unknown>> = (page: BoundedQueryPage<T>) => void | Promise<void>;
|
|
1594
|
+
/** Fulfilled only after every served page was accepted; errors/abort reject instead. */
|
|
1595
|
+
type BoundedQuerySummary = Omit<BoundedQueryResult<unknown>, 'items'>;
|
|
1596
|
+
|
|
1585
1597
|
/**
|
|
1586
1598
|
* Invoke one registry operation through its typed SDK method — the legacy
|
|
1587
1599
|
* path (programmatic escape hatch). The mode is derived from the registry
|
|
@@ -1595,6 +1607,12 @@ declare function invoke(client: AutotaskClient, operation: string, args?: readon
|
|
|
1595
1607
|
* refuses (reads have no dry run).
|
|
1596
1608
|
*/
|
|
1597
1609
|
declare function invokeRead(client: AutotaskClient, operation: string, args?: readonly unknown[] | Record<string, unknown>, opts?: InvokeOptions): Promise<unknown>;
|
|
1610
|
+
/**
|
|
1611
|
+
* Consume a governed explicit bounded query, awaiting each served page.
|
|
1612
|
+
* Only primitive query reads with walk.maxRows are supported. Rejections,
|
|
1613
|
+
* including cancellation during the last sink, produce no terminal summary.
|
|
1614
|
+
*/
|
|
1615
|
+
declare function invokeReadPages(client: AutotaskClient, operation: string, args: readonly unknown[] | Record<string, unknown> | null, onPage: BoundedQueryPageConsumer, opts?: InvokeOptions): Promise<BoundedQuerySummary>;
|
|
1598
1616
|
/**
|
|
1599
1617
|
* `autotask_write` (SDK form): route an `effect=write` operation, dry-run-
|
|
1600
1618
|
* first (the governed `dryRun ?? true`). A read or destructive op refuses
|
|
@@ -1609,5 +1627,5 @@ declare function invokeWrite(client: AutotaskClient, operation: string, args?: r
|
|
|
1609
1627
|
*/
|
|
1610
1628
|
declare function invokeDelete(client: AutotaskClient, operation: string, args?: readonly unknown[] | Record<string, unknown>, opts?: InvokeOptions): Promise<unknown>;
|
|
1611
1629
|
|
|
1612
|
-
export { AGGREGATE_DATE_BUCKETS, AGGREGATE_DEFAULT_LIMIT, AGGREGATE_DEFAULT_TOP, AGGREGATE_TOP_MAX, CREATE_BLOCKER_KINDS, EXPAND_RESOURCE_NAMES_MAX_IDS, FETCH_BY_IDS_CHUNK_SIZE, FETCH_BY_IDS_MAX_ITEMS, FIELD_CATALOG_HONESTY_NOTE, FieldCacheKind, INVOKE_OPTION_KEYS, MAX_FIELD_CATALOG_WIRE, MIN_FIELD_CATALOG_MAX_BYTES, PARAMS_BAG_KEYS, RowNamesSummary, UI_LINK_ENTITIES, WORKFLOW_RESOURCES, aggregate, arAging, buildUiLink, createGuidance, dateBucketLabel, describeWrite, effectiveRequiredFields, expandResourceNames, fetchByIds, fieldCatalog, foldFlattenedOpts, invoke, invokeDelete, invokeRead, invokeWrite, needsConfirmation, nonChargeableWork, notPersistedFields, portfolioMargin, recurringRevenue, relationshipMap, resolveAny, resolveStaff, revenueRollup, sanitiseResult, searchAcrossResources, uiLink, unknownKeysRefusal, validateDispatchArgs, validateInvokeOptions, validateParamsBag, wipHours };
|
|
1613
|
-
export type { AggregateGroup, AggregateOptions, AggregateResult, ArAgingBuckets, ArAgingOptions, ArAgingResult, ArAgingRow, CreateGuidanceOptions, DateBucket, DerivationRule, DescribeWriteOptions, EffectiveRequiredFields, ExpandResourceNameRow, ExpandResourceNamesOptions, ExpandResourceNamesResult, FetchByIdsOptions, FetchManyItem, FetchManyItemError, FetchManyItemResult, FetchManyResult, FieldCatalogCompactFieldRow, FieldCatalogFieldRow, FieldCatalogOptions, FieldCatalogResult, FieldCatalogRow, FieldCatalogRowError, FieldCatalogTrimKind, FieldCatalogTruncation, FieldDerivation, InvokeMode, InvokeOptions, NonChargeableWorkAmount, NonChargeableWorkFigures, NonChargeableWorkGroupBy, NonChargeableWorkOptions, NonChargeableWorkResult, NonChargeableWorkRow, PortfolioMarginDimension, PortfolioMarginFigures, PortfolioMarginKey, PortfolioMarginOptions, PortfolioMarginResult, PortfolioMarginRow, RecurringRevenueOptions, RecurringRevenueResult, RecurringRevenueRow, RequiredFieldsRecord, RequiredFieldsSource, RequiredFieldsZoneFacts, ResolveAnyOptions, ResolveAnyResourceOutcome, ResolveAnyResult, ResolveStaffMatch, ResolveStaffOptions, ResolveStaffResult, RevenueRollupAmount, RevenueRollupDimension, RevenueRollupKey, RevenueRollupNonChargeable, RevenueRollupNonChargeableAmount, RevenueRollupOptions, RevenueRollupResult, RevenueRollupRow, SanitiseResult, SearchAcrossResourcesOptions, SearchAcrossResourcesResult, SearchAcrossResourcesRow, ServedCreateGuidanceReport, ServedCreateGuidanceRow, UiLinkEntity, UiLinkInput, UiLinkResult, UnpostedNonBillableTime, WipHoursFigures, WipHoursGroupBy, WipHoursOptions, WipHoursResult, WipHoursRow, WriteDescription };
|
|
1630
|
+
export { AGGREGATE_DATE_BUCKETS, AGGREGATE_DEFAULT_LIMIT, AGGREGATE_DEFAULT_TOP, AGGREGATE_TOP_MAX, CREATE_BLOCKER_KINDS, EXPAND_RESOURCE_NAMES_MAX_IDS, FETCH_BY_IDS_CHUNK_SIZE, FETCH_BY_IDS_MAX_ITEMS, FIELD_CATALOG_HONESTY_NOTE, FieldCacheKind, INVOKE_OPTION_KEYS, MAX_FIELD_CATALOG_WIRE, MIN_FIELD_CATALOG_MAX_BYTES, PARAMS_BAG_KEYS, RowNamesSummary, UI_LINK_ENTITIES, WORKFLOW_RESOURCES, aggregate, arAging, buildUiLink, createGuidance, dateBucketLabel, describeWrite, effectiveRequiredFields, expandResourceNames, fetchByIds, fieldCatalog, foldFlattenedOpts, invoke, invokeDelete, invokeRead, invokeReadPages, invokeWrite, needsConfirmation, nonChargeableWork, notPersistedFields, portfolioMargin, recurringRevenue, relationshipMap, resolveAny, resolveStaff, revenueRollup, sanitiseResult, searchAcrossResources, uiLink, unknownKeysRefusal, validateDispatchArgs, validateInvokeOptions, validateParamsBag, wipHours };
|
|
1631
|
+
export type { AggregateGroup, AggregateOptions, AggregateResult, ArAgingBuckets, ArAgingOptions, ArAgingResult, ArAgingRow, BoundedQueryPage, BoundedQueryPageConsumer, BoundedQuerySummary, CreateGuidanceOptions, DateBucket, DerivationRule, DescribeWriteOptions, EffectiveRequiredFields, ExpandResourceNameRow, ExpandResourceNamesOptions, ExpandResourceNamesResult, FetchByIdsOptions, FetchManyItem, FetchManyItemError, FetchManyItemResult, FetchManyResult, FieldCatalogCompactFieldRow, FieldCatalogFieldRow, FieldCatalogOptions, FieldCatalogResult, FieldCatalogRow, FieldCatalogRowError, FieldCatalogTrimKind, FieldCatalogTruncation, FieldDerivation, InvokeMode, InvokeOptions, NonChargeableWorkAmount, NonChargeableWorkFigures, NonChargeableWorkGroupBy, NonChargeableWorkOptions, NonChargeableWorkResult, NonChargeableWorkRow, PortfolioMarginDimension, PortfolioMarginFigures, PortfolioMarginKey, PortfolioMarginOptions, PortfolioMarginResult, PortfolioMarginRow, RecurringRevenueOptions, RecurringRevenueResult, RecurringRevenueRow, RequiredFieldsRecord, RequiredFieldsSource, RequiredFieldsZoneFacts, ResolveAnyOptions, ResolveAnyResourceOutcome, ResolveAnyResult, ResolveStaffMatch, ResolveStaffOptions, ResolveStaffResult, RevenueRollupAmount, RevenueRollupDimension, RevenueRollupKey, RevenueRollupNonChargeable, RevenueRollupNonChargeableAmount, RevenueRollupOptions, RevenueRollupResult, RevenueRollupRow, SanitiseResult, SearchAcrossResourcesOptions, SearchAcrossResourcesResult, SearchAcrossResourcesRow, ServedCreateGuidanceReport, ServedCreateGuidanceRow, UiLinkEntity, UiLinkInput, UiLinkResult, UnpostedNonBillableTime, WipHoursFigures, WipHoursGroupBy, WipHoursOptions, WipHoursResult, WipHoursRow, WriteDescription };
|
package/dist/operations/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { AGGREGATE_DATE_BUCKETS, AGGREGATE_DEFAULT_LIMIT, AGGREGATE_DEFAULT_TOP, AGGREGATE_TOP_MAX, CREATE_BLOCKER_KINDS, EXPAND_RESOURCE_NAMES_MAX_IDS, FETCH_BY_IDS_CHUNK_SIZE, FETCH_BY_IDS_MAX_ITEMS, FIELD_CACHE_KINDS, FIELD_CATALOG_HONESTY_NOTE, INVOKE_OPTION_KEYS, MAX_FIELD_CATALOG_WIRE, MIN_FIELD_CATALOG_MAX_BYTES, PARAMS_BAG_KEYS, PICKLIST_VALUE_NOT_SERVED_NOTE, UI_LINK_ENTITIES, WORKFLOW_RESOURCES, aggregate, arAging, buildUiLink, createGuidance, dateBucketLabel, effectiveRequiredFields, expandResourceNames, fetchByIds, fieldCatalog, foldFlattenedOpts, invoke, invokeDelete, invokeRead, invokeWrite, needsConfirmation, nonChargeableWork, notPersistedFields, portfolioMargin, recurringRevenue, relationshipMap, resolveAny, resolveStaff, revenueRollup, sanitiseResult, searchAcrossResources, uiLink, unknownKeysRefusal, validateDispatchArgs, validateInvokeOptions, validateParamsBag, wipHours } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
1
|
+
export { AGGREGATE_DATE_BUCKETS, AGGREGATE_DEFAULT_LIMIT, AGGREGATE_DEFAULT_TOP, AGGREGATE_TOP_MAX, CREATE_BLOCKER_KINDS, EXPAND_RESOURCE_NAMES_MAX_IDS, FETCH_BY_IDS_CHUNK_SIZE, FETCH_BY_IDS_MAX_ITEMS, FIELD_CACHE_KINDS, FIELD_CATALOG_HONESTY_NOTE, INVOKE_OPTION_KEYS, MAX_FIELD_CATALOG_WIRE, MIN_FIELD_CATALOG_MAX_BYTES, PARAMS_BAG_KEYS, PICKLIST_VALUE_NOT_SERVED_NOTE, UI_LINK_ENTITIES, WORKFLOW_RESOURCES, aggregate, arAging, buildUiLink, createGuidance, dateBucketLabel, effectiveRequiredFields, expandResourceNames, fetchByIds, fieldCatalog, foldFlattenedOpts, invoke, invokeDelete, invokeRead, invokeReadPages, invokeWrite, needsConfirmation, nonChargeableWork, notPersistedFields, portfolioMargin, recurringRevenue, relationshipMap, resolveAny, resolveStaff, revenueRollup, sanitiseResult, searchAcrossResources, uiLink, unknownKeysRefusal, validateDispatchArgs, validateInvokeOptions, validateParamsBag, wipHours } from '../chunk-4OR3XBIP.js';
|
|
2
|
+
import '../chunk-LKJA57CH.js';
|
|
3
3
|
import { REDACTED } from '../chunk-7NKB4UXV.js';
|
|
4
4
|
|
|
5
5
|
// src/operations/describeWrite.ts
|
package/dist/pool.cjs
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('./chunk-
|
|
5
|
-
var
|
|
6
|
-
require('./chunk-
|
|
3
|
+
var chunk4DSLRDIF_cjs = require('./chunk-4DSLRDIF.cjs');
|
|
4
|
+
require('./chunk-QJ327YI6.cjs');
|
|
5
|
+
var chunkQQFF7X67_cjs = require('./chunk-QQFF7X67.cjs');
|
|
6
|
+
require('./chunk-JLCHKCEB.cjs');
|
|
7
7
|
require('./chunk-BD4AUGCJ.cjs');
|
|
8
8
|
var crypto = require('crypto');
|
|
9
9
|
|
|
10
10
|
function createClientPool(options = {}) {
|
|
11
11
|
const maxSize = options.maxSize ?? 128;
|
|
12
12
|
if (!Number.isInteger(maxSize) || maxSize < 1) {
|
|
13
|
-
throw new
|
|
13
|
+
throw new chunkQQFF7X67_cjs.AutotaskConfigError(
|
|
14
14
|
`ClientPool maxSize must be a positive integer (got ${String(options.maxSize)})`
|
|
15
15
|
);
|
|
16
16
|
}
|
|
@@ -25,13 +25,13 @@ function createClientPool(options = {}) {
|
|
|
25
25
|
readCaches.set(key, existing);
|
|
26
26
|
return existing;
|
|
27
27
|
}
|
|
28
|
-
const created =
|
|
28
|
+
const created = chunkQQFF7X67_cjs.buildReadCache(config);
|
|
29
29
|
if (created === void 0) return void 0;
|
|
30
30
|
readCaches.set(key, created);
|
|
31
31
|
while (readCaches.size > maxSize) {
|
|
32
32
|
const oldest = [...readCaches.keys()].find((candidate) => candidate !== key && !entries.has(candidate));
|
|
33
33
|
if (oldest === void 0) break;
|
|
34
|
-
|
|
34
|
+
chunkQQFF7X67_cjs.suspendCompanyIndex(readCaches.get(oldest));
|
|
35
35
|
readCaches.delete(oldest);
|
|
36
36
|
}
|
|
37
37
|
return created;
|
|
@@ -43,7 +43,7 @@ function createClientPool(options = {}) {
|
|
|
43
43
|
return { ...config, cache };
|
|
44
44
|
}
|
|
45
45
|
function keyFor(config) {
|
|
46
|
-
const resolved =
|
|
46
|
+
const resolved = chunkQQFF7X67_cjs.resolveCredentials(config);
|
|
47
47
|
const tuple = [
|
|
48
48
|
resolved.userName,
|
|
49
49
|
resolved.apiIntegrationCode,
|
|
@@ -71,18 +71,18 @@ function createClientPool(options = {}) {
|
|
|
71
71
|
const oldest = entries.keys().next().value;
|
|
72
72
|
if (oldest !== void 0) {
|
|
73
73
|
const store = entries.get(oldest)?.http.readCache;
|
|
74
|
-
if (store !== void 0)
|
|
74
|
+
if (store !== void 0) chunkQQFF7X67_cjs.suspendCompanyIndex(store);
|
|
75
75
|
entries.delete(oldest);
|
|
76
76
|
}
|
|
77
77
|
}
|
|
78
|
-
const client = new
|
|
78
|
+
const client = new chunk4DSLRDIF_cjs.AutotaskClient(withSharedCache(config, sharedCacheFor(key, config)));
|
|
79
79
|
entries.set(key, client);
|
|
80
80
|
return client;
|
|
81
81
|
},
|
|
82
82
|
delete(config) {
|
|
83
83
|
const key = keyFor(config);
|
|
84
84
|
const store = entries.get(key)?.http.readCache ?? readCaches.get(key);
|
|
85
|
-
if (store !== void 0)
|
|
85
|
+
if (store !== void 0) chunkQQFF7X67_cjs.suspendCompanyIndex(store);
|
|
86
86
|
return entries.delete(key);
|
|
87
87
|
},
|
|
88
88
|
clear() {
|
|
@@ -90,7 +90,7 @@ function createClientPool(options = {}) {
|
|
|
90
90
|
for (const client of entries.values()) {
|
|
91
91
|
if (client.http.readCache !== void 0) stores.add(client.http.readCache);
|
|
92
92
|
}
|
|
93
|
-
for (const store of stores)
|
|
93
|
+
for (const store of stores) chunkQQFF7X67_cjs.suspendCompanyIndex(store);
|
|
94
94
|
entries.clear();
|
|
95
95
|
readCaches.clear();
|
|
96
96
|
},
|
package/dist/pool.d.cts
CHANGED
package/dist/pool.d.ts
CHANGED
package/dist/pool.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { AutotaskClient } from './chunk-
|
|
2
|
-
import './chunk-
|
|
3
|
-
import { AutotaskConfigError, suspendCompanyIndex, buildReadCache, resolveCredentials } from './chunk-
|
|
4
|
-
import './chunk-
|
|
1
|
+
import { AutotaskClient } from './chunk-YKQ2KNQO.js';
|
|
2
|
+
import './chunk-5COLIVBE.js';
|
|
3
|
+
import { AutotaskConfigError, suspendCompanyIndex, buildReadCache, resolveCredentials } from './chunk-4OR3XBIP.js';
|
|
4
|
+
import './chunk-LKJA57CH.js';
|
|
5
5
|
import './chunk-7NKB4UXV.js';
|
|
6
6
|
import { createHash } from 'crypto';
|
|
7
7
|
|