timezest 1.1.3 → 1.1.4

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 (37) hide show
  1. package/LICENSE +8 -8
  2. package/README.md +31 -9
  3. package/{config → dist/config}/config.d.ts +3 -0
  4. package/{config → dist/config}/config.js +5 -2
  5. package/dist/config/config.js.map +1 -0
  6. package/{index.d.ts → dist/index.d.ts} +12 -10
  7. package/{index.js → dist/index.js} +9 -6
  8. package/dist/index.js.map +1 -0
  9. package/{utils → dist/utils}/makePaginatedRequest.d.ts +3 -2
  10. package/{utils → dist/utils}/makePaginatedRequest.js +3 -2
  11. package/dist/utils/makePaginatedRequest.js.map +1 -0
  12. package/{utils → dist/utils}/makeRequest.js +30 -7
  13. package/dist/utils/makeRequest.js.map +1 -0
  14. package/dist/utils/tqlFilter.d.ts +260 -0
  15. package/dist/utils/tqlFilter.js +439 -0
  16. package/dist/utils/tqlFilter.js.map +1 -0
  17. package/package.json +1 -1
  18. package/config/config.js.map +0 -1
  19. package/index.js.map +0 -1
  20. package/utils/makePaginatedRequest.js.map +0 -1
  21. package/utils/makeRequest.js.map +0 -1
  22. /package/{constants → dist/constants}/endpoints.d.ts +0 -0
  23. /package/{constants → dist/constants}/endpoints.js +0 -0
  24. /package/{constants → dist/constants}/endpoints.js.map +0 -0
  25. /package/{entities → dist/entities}/entities.d.ts +0 -0
  26. /package/{entities → dist/entities}/entities.js +0 -0
  27. /package/{entities → dist/entities}/entities.js.map +0 -0
  28. /package/{entities → dist/entities}/schemas.d.ts +0 -0
  29. /package/{entities → dist/entities}/schemas.js +0 -0
  30. /package/{entities → dist/entities}/schemas.js.map +0 -0
  31. /package/{utils → dist/utils}/handleError.d.ts +0 -0
  32. /package/{utils → dist/utils}/handleError.js +0 -0
  33. /package/{utils → dist/utils}/handleError.js.map +0 -0
  34. /package/{utils → dist/utils}/logger.d.ts +0 -0
  35. /package/{utils → dist/utils}/logger.js +0 -0
  36. /package/{utils → dist/utils}/logger.js.map +0 -0
  37. /package/{utils → dist/utils}/makeRequest.d.ts +0 -0
package/LICENSE CHANGED
@@ -1,9 +1,9 @@
1
- MIT License
2
-
3
- Copyright (c) 2025 PNC IT
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
-
7
- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8
-
1
+ MIT License
2
+
3
+ Copyright (c) 2025 PNC IT
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
+
7
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8
+
9
9
  THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
package/README.md CHANGED
@@ -133,29 +133,51 @@ async function fetchAllResources() {
133
133
  fetchAllResources();
134
134
  ```
135
135
 
136
- ## Retry Logic
136
+ ## Rate Limiting and Retry Logic
137
137
 
138
- The `TimeZestAPI` class includes built-in retry logic for handling transient errors, such as network issues or rate-limiting responses from the TimeZest API. You can configure the retry behavior using the following options when initializing the class:
138
+ The `TimeZestAPI` class includes intelligent retry logic optimized for TimeZest's API limits. TimeZest enforces a **maximum of 180 requests in any 60-second sliding window**.
139
139
 
140
- - **`maxRetryTimeMs`**: The maximum amount of time (in milliseconds) to spend retrying a request. Defaults to a reasonable value defined in the configuration.
141
- - **`maxRetryDelayMs`**: The maximum delay (in milliseconds) between retry attempts. This helps prevent excessive delays during retries.
140
+ ### Retry Strategy
141
+
142
+ When a request fails due to rate limiting (429 Too Many Requests), the library automatically retries with an optimized strategy:
143
+
144
+ - **Aggressive Exponential Backoff**: Starts at 1 second and doubles with each retry (1s, 2s, 4s, 8s, 16s, 32s, 64s...)
145
+ - **Jitter**: Adds ±25% random variation to retry delays to prevent a thundering herd problem when multiple clients hit rate limits simultaneously
146
+ - **Retry-After Header**: Always respects the `Retry-After` header from 429 responses when provided by the API
147
+ - **Patient by Default**: Will retry for up to 5 minutes by default, allowing time for rate limit windows to clear
148
+ - **Configurable**: Full control over retry behavior via configuration options
149
+
150
+ ### Configuration Options
151
+
152
+ You can configure the retry behavior using the following options when initializing the class:
153
+
154
+ - **`maxRetryTimeMs`**: The maximum amount of time (in milliseconds) to spend retrying a request. Defaults to 5 minutes (300,000ms).
155
+ - **`maxRetryDelayMs`**: The maximum delay (in milliseconds) between individual retry attempts. Defaults to 60 seconds (60,000ms).
142
156
 
143
157
  ### Example Configuration
144
158
 
145
159
  ```typescript
146
160
  const options = {
147
- maxRetryTimeMs: 30000, // Retry for up to 30 seconds
148
- maxRetryDelayMs: 2000, // Wait up to 2 seconds between retries
161
+ maxRetryTimeMs: 10 * 60 * 1000, // Retry for up to 10 minutes
162
+ maxRetryDelayMs: 60 * 1000, // Max 60 seconds between retries
163
+ logLevel: "debug", // See detailed retry information in logs
149
164
  };
150
165
 
151
166
  const timeZest = new TimeZestAPI("your-api-key", options);
152
167
  ```
153
168
 
154
- ### How It Works
169
+ ### Retry Behavior Example
155
170
 
156
- When a request fails due to a transient error (e.g., a 429 Too Many Requests response or a network timeout), the library will automatically retry the request until the `maxRetryTimeMs` limit is reached. The delay between retries is capped by `maxRetryDelayMs` and may increase with each attempt to avoid overwhelming the server.
171
+ If you hit a rate limit without a `Retry-After` header, the retry delays will be:
172
+ - 1st retry: ~1 second (0.75-1.25s with jitter)
173
+ - 2nd retry: ~2 seconds (1.5-2.5s with jitter)
174
+ - 3rd retry: ~4 seconds (3-5s with jitter)
175
+ - 4th retry: ~8 seconds (6-10s with jitter)
176
+ - 5th retry: ~16 seconds (12-20s with jitter)
177
+ - 6th retry: ~32 seconds (24-40s with jitter)
178
+ - 7th+ retry: ~60 seconds (45-60s with jitter, capped at maxRetryDelayMs)
157
179
 
158
- This retry logic ensures that your application can gracefully handle temporary issues without requiring manual intervention.
180
+ The jitter ensures that if multiple clients hit the rate limit at the same time, they won't all retry simultaneously.
159
181
 
160
182
  ## Logging
161
183
 
@@ -30,5 +30,8 @@ export interface TimeZestAPIConfig {
30
30
  }
31
31
  /**
32
32
  * Default configuration for the TimeZest API client.
33
+ *
34
+ * Rate limit: 180 requests per 60 seconds (sliding window)
35
+ * Retry strategy: Aggressive exponential backoff with jitter
33
36
  */
34
37
  export declare const CONFIG: TimeZestAPIConfig;
@@ -4,13 +4,16 @@ exports.CONFIG = void 0;
4
4
  const logger_1 = require("../utils/logger");
5
5
  /**
6
6
  * Default configuration for the TimeZest API client.
7
+ *
8
+ * Rate limit: 180 requests per 60 seconds (sliding window)
9
+ * Retry strategy: Aggressive exponential backoff with jitter
7
10
  */
8
11
  exports.CONFIG = {
9
12
  logLevel: "error",
10
13
  logger: logger_1.defaultLogger,
11
14
  baseUrl: "https://api.timezest.com/v1",
12
- maxRetryDelayMs: 1.5 * 60 * 1000, // 1.5 minutes
13
- maxRetryTimeMs: 15 * 1000, // 15 seconds
15
+ maxRetryDelayMs: 60 * 1000, // 60 seconds (aligned with rate limit window)
16
+ maxRetryTimeMs: 5 * 60 * 1000, // 5 minutes (be patient with retries)
14
17
  outputValidation: true,
15
18
  };
16
19
  //# sourceMappingURL=config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/config/config.ts"],"names":[],"mappings":";;;AAAA,4CAAkE;AAqClE;;;;;GAKG;AACU,QAAA,MAAM,GAAsB;IACvC,QAAQ,EAAE,OAAO;IACjB,MAAM,EAAE,sBAAa;IACrB,OAAO,EAAE,6BAA6B;IACtC,eAAe,EAAE,EAAE,GAAG,IAAI,EAAE,8CAA8C;IAC1E,cAAc,EAAE,CAAC,GAAG,EAAE,GAAG,IAAI,EAAE,sCAAsC;IACrE,gBAAgB,EAAE,IAAI;CACvB,CAAC"}
@@ -1,8 +1,10 @@
1
1
  import { log, LogLevel, Logger } from "./utils/logger";
2
2
  import { TimeZestAPIConfig } from "./config/config";
3
3
  import { Agent, Resource, AppointmentType, SchedulingRequest, Team, SchedulingRequestPost } from "./entities/entities";
4
+ import { TQLFilter } from "./utils/tqlFilter";
4
5
  export { Agent, Resource, AppointmentType, SchedulingRequest, SchedulingRequestPost, Team } from "./entities/entities";
5
6
  export { ResourceSchema, AgentSchema, AppointmentTypeSchema, SchedulingRequestSchema, TeamSchema } from "./entities/schemas";
7
+ export { TQL, TQLFilter } from "./utils/tqlFilter";
6
8
  /**
7
9
  * Options for configuring the TimeZest API.
8
10
  */
@@ -46,28 +48,28 @@ export declare class TimeZestAPI {
46
48
  getConfig(): TimeZestAPIConfig;
47
49
  /**
48
50
  * Fetches resources from the TimeZest API.
49
- * @param {string | null} [filter=null] - Optional filter string to narrow down results.
51
+ * @param {TQLFilter | string | null} [filter=null] - Optional filter (TQLFilter instance or string) to narrow down results.
50
52
  * @returns {Promise<Resource[]>} A promise that resolves to an array of resources.
51
53
  */
52
- getResources: (filter?: string | null) => Promise<Resource[]>;
54
+ getResources: (filter?: TQLFilter | string | null) => Promise<Resource[]>;
53
55
  /**
54
56
  * Fetches agents from the TimeZest API.
55
- * @param {string | null} [filter=null] - Optional filter string to narrow down results.
57
+ * @param {TQLFilter | string | null} [filter=null] - Optional filter (TQLFilter instance or string) to narrow down results.
56
58
  * @returns {Promise<Agent[]>} A promise that resolves to an array of agents.
57
59
  */
58
- getAgents(filter?: string | null): Promise<Agent[]>;
60
+ getAgents(filter?: TQLFilter | string | null): Promise<Agent[]>;
59
61
  /**
60
62
  * Fetches teams from the TimeZest API.
61
- * @param {string | null} [filter=null] - Optional filter string to narrow down results.
63
+ * @param {TQLFilter | string | null} [filter=null] - Optional filter (TQLFilter instance or string) to narrow down results.
62
64
  * @returns {Promise<Team[]>} A promise that resolves to an array of teams.
63
65
  */
64
- getTeams(filter?: string | null): Promise<Team[]>;
66
+ getTeams(filter?: TQLFilter | string | null): Promise<Team[]>;
65
67
  /**
66
68
  * Fetches appointment types from the TimeZest API.
67
- * @param {string | null} [filter=null] - Optional filter string to narrow down results.
69
+ * @param {TQLFilter | string | null} [filter=null] - Optional filter (TQLFilter instance or string) to narrow down results.
68
70
  * @returns {Promise<AppointmentType[]>} A promise that resolves to an array of appointment types.
69
71
  */
70
- getAppointmentTypes(filter?: string | null): Promise<AppointmentType[]>;
72
+ getAppointmentTypes(filter?: TQLFilter | string | null): Promise<AppointmentType[]>;
71
73
  /**
72
74
  * Fetches a scheduling request by its ID.
73
75
  * @param {string} id - The ID of the scheduling request to fetch.
@@ -76,10 +78,10 @@ export declare class TimeZestAPI {
76
78
  getSchedulingRequest(id: string): Promise<SchedulingRequest>;
77
79
  /**
78
80
  * Fetches scheduling requests from the TimeZest API.
79
- * @param {string | null} [filter=null] - Optional filter string to narrow down results.
81
+ * @param {TQLFilter | string | null} [filter=null] - Optional filter (TQLFilter instance or string) to narrow down results.
80
82
  * @returns {Promise<SchedulingRequest[]>} A promise that resolves to an array of scheduling requests.
81
83
  */
82
- getSchedulingRequests(filter?: string | null): Promise<SchedulingRequest[]>;
84
+ getSchedulingRequests(filter?: TQLFilter | string | null): Promise<SchedulingRequest[]>;
83
85
  /**
84
86
  * Creates a new scheduling request in the TimeZest API.
85
87
  * @param {SchedulingRequestPost} data - The data for the new scheduling request.
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  });
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.TimeZestAPI = exports.TeamSchema = exports.SchedulingRequestSchema = exports.AppointmentTypeSchema = exports.AgentSchema = exports.ResourceSchema = void 0;
12
+ exports.TimeZestAPI = exports.TQLFilter = exports.TQL = exports.TeamSchema = exports.SchedulingRequestSchema = exports.AppointmentTypeSchema = exports.AgentSchema = exports.ResourceSchema = void 0;
13
13
  const schemas_1 = require("./entities/schemas");
14
14
  const config_1 = require("./config/config");
15
15
  const makeRequest_1 = require("./utils/makeRequest");
@@ -22,6 +22,9 @@ Object.defineProperty(exports, "AgentSchema", { enumerable: true, get: function
22
22
  Object.defineProperty(exports, "AppointmentTypeSchema", { enumerable: true, get: function () { return schemas_2.AppointmentTypeSchema; } });
23
23
  Object.defineProperty(exports, "SchedulingRequestSchema", { enumerable: true, get: function () { return schemas_2.SchedulingRequestSchema; } });
24
24
  Object.defineProperty(exports, "TeamSchema", { enumerable: true, get: function () { return schemas_2.TeamSchema; } });
25
+ var tqlFilter_1 = require("./utils/tqlFilter");
26
+ Object.defineProperty(exports, "TQL", { enumerable: true, get: function () { return tqlFilter_1.TQL; } });
27
+ Object.defineProperty(exports, "TQLFilter", { enumerable: true, get: function () { return tqlFilter_1.TQLFilter; } });
25
28
  /**
26
29
  * Represents the TimeZest API client.
27
30
  * Provides methods to interact with the TimeZest API.
@@ -35,7 +38,7 @@ class TimeZestAPI {
35
38
  constructor(apiKey, options) {
36
39
  /**
37
40
  * Fetches resources from the TimeZest API.
38
- * @param {string | null} [filter=null] - Optional filter string to narrow down results.
41
+ * @param {TQLFilter | string | null} [filter=null] - Optional filter (TQLFilter instance or string) to narrow down results.
39
42
  * @returns {Promise<Resource[]>} A promise that resolves to an array of resources.
40
43
  */
41
44
  this.getResources = (...args_1) => __awaiter(this, [...args_1], void 0, function* (filter = null) {
@@ -80,7 +83,7 @@ class TimeZestAPI {
80
83
  }
81
84
  /**
82
85
  * Fetches agents from the TimeZest API.
83
- * @param {string | null} [filter=null] - Optional filter string to narrow down results.
86
+ * @param {TQLFilter | string | null} [filter=null] - Optional filter (TQLFilter instance or string) to narrow down results.
84
87
  * @returns {Promise<Agent[]>} A promise that resolves to an array of agents.
85
88
  */
86
89
  getAgents() {
@@ -91,7 +94,7 @@ class TimeZestAPI {
91
94
  }
92
95
  /**
93
96
  * Fetches teams from the TimeZest API.
94
- * @param {string | null} [filter=null] - Optional filter string to narrow down results.
97
+ * @param {TQLFilter | string | null} [filter=null] - Optional filter (TQLFilter instance or string) to narrow down results.
95
98
  * @returns {Promise<Team[]>} A promise that resolves to an array of teams.
96
99
  */
97
100
  getTeams() {
@@ -102,7 +105,7 @@ class TimeZestAPI {
102
105
  }
103
106
  /**
104
107
  * Fetches appointment types from the TimeZest API.
105
- * @param {string | null} [filter=null] - Optional filter string to narrow down results.
108
+ * @param {TQLFilter | string | null} [filter=null] - Optional filter (TQLFilter instance or string) to narrow down results.
106
109
  * @returns {Promise<AppointmentType[]>} A promise that resolves to an array of appointment types.
107
110
  */
108
111
  getAppointmentTypes() {
@@ -124,7 +127,7 @@ class TimeZestAPI {
124
127
  }
125
128
  /**
126
129
  * Fetches scheduling requests from the TimeZest API.
127
- * @param {string | null} [filter=null] - Optional filter string to narrow down results.
130
+ * @param {TQLFilter | string | null} [filter=null] - Optional filter (TQLFilter instance or string) to narrow down results.
128
131
  * @returns {Promise<SchedulingRequest[]>} A promise that resolves to an array of scheduling requests.
129
132
  */
130
133
  getSchedulingRequests() {
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAUA,gDAM4B;AAC5B,4CAAyC;AACzC,qDAAkD;AAClD,qDAAsD;AACtD,2CAA0D;AAC1D,uEAAoE;AAKpE,8CAA6H;AAApH,yGAAA,cAAc,OAAA;AAAE,sGAAA,WAAW,OAA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M,CAAC,eAAe,CAC5B,CAAC;YACF,OAAO,iCAAuB,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;QACjD,CAAC;KAAA;IAED;;;;OAIG;IACG,qBAAqB;6DACzB,SAAoC,IAAI;YAExC,MAAM,QAAQ,GAAG,MAAM,IAAA,2CAAoB,EACzC,IAAI,EACJ,yBAAa,CAAC,mBAAmB,EACjC,KAAK,EACL,IAAI,EACJ,MAAM,CACP,CAAC;YACF,OAAO,IAAI,CAAC,gBAAgB,CAAC,QAAQ,EAAE,iCAAuB,CAAC,CAAC;QAClE,CAAC;KAAA;IAED;;;;OAIG;IACG,uBAAuB,CAC3B,IAA2B;;YAE3B,MAAM,QAAQ,GAAG,MAAM,IAAA,yBAAW,EAChC,IAAI,CAAC,GAAG,EACR,IAAI,CAAC,MAAM,EACX,IAAI,CAAC,MAAM,CAAC,OAAO,EACnB,yBAAa,CAAC,mBAAmB,EACjC,MAAM,EACN,IAAI,EACJ,IAAI,CAAC,MAAM,CAAC,cAAc,EAC1B,IAAI,CAAC,MAAM,CAAC,eAAe,CAC5B,CAAC;YACF,OAAO,QAAQ,CAAC;QAClB,CAAC;KAAA;IAED;;;;;OAKG;IACK,gBAAgB,CAAI,QAAa,EAAE,MAAiB;QAC1D,IAAI,IAAI,CAAC,MAAM,CAAC,gBAAgB,EAAE,CAAC;YACjC,OAAO,QAAQ,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;QACpD,CAAC;QACD,OAAO,QAAQ,CAAC;IAClB,CAAC;CACF;AA/MD,kCA+MC;AAED,kBAAe,WAAW,CAAC"}
@@ -1,5 +1,6 @@
1
1
  import { apiEndpoint } from "../constants/endpoints";
2
2
  import { TimeZestAPI } from "../index";
3
+ import { TQLFilter } from "./tqlFilter";
3
4
  /**
4
5
  * Makes a paginated API request.
5
6
  * @template T - The type of the response data.
@@ -7,7 +8,7 @@ import { TimeZestAPI } from "../index";
7
8
  * @param endpoint - The API endpoint to call.
8
9
  * @param method - The HTTP method (GET or POST).
9
10
  * @param data - The request payload.
10
- * @param filter - An optional filter string.
11
+ * @param filter - An optional filter string or TQLFilter instance.
11
12
  * @returns A promise that resolves to an array of response data.
12
13
  */
13
- export declare const makePaginatedRequest: <T>(apiInstance: TimeZestAPI, endpoint: apiEndpoint, method?: "GET" | "POST", data?: any, filter?: string | null) => Promise<T[]>;
14
+ export declare const makePaginatedRequest: <T>(apiInstance: TimeZestAPI, endpoint: apiEndpoint, method?: "GET" | "POST", data?: any, filter?: TQLFilter | string | null) => Promise<T[]>;
@@ -12,6 +12,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.makePaginatedRequest = void 0;
13
13
  const makeRequest_1 = require("./makeRequest");
14
14
  const handleError_1 = require("./handleError");
15
+ const tqlFilter_1 = require("./tqlFilter");
15
16
  /**
16
17
  * Makes a paginated API request.
17
18
  * @template T - The type of the response data.
@@ -19,7 +20,7 @@ const handleError_1 = require("./handleError");
19
20
  * @param endpoint - The API endpoint to call.
20
21
  * @param method - The HTTP method (GET or POST).
21
22
  * @param data - The request payload.
22
- * @param filter - An optional filter string.
23
+ * @param filter - An optional filter string or TQLFilter instance.
23
24
  * @returns A promise that resolves to an array of response data.
24
25
  */
25
26
  const makePaginatedRequest = (apiInstance_1, endpoint_1, ...args_1) => __awaiter(void 0, [apiInstance_1, endpoint_1, ...args_1], void 0, function* (apiInstance, endpoint, method = "GET", data = null, filter = null) {
@@ -31,7 +32,7 @@ const makePaginatedRequest = (apiInstance_1, endpoint_1, ...args_1) => __awaiter
31
32
  try {
32
33
  do {
33
34
  log("debug", `Fetching page ${nextPage} for ${endpoint}`);
34
- const response = yield (0, makeRequest_1.makeRequest)(log, apiKey, baseUrl, endpoint, method, Object.assign(Object.assign({}, data), { filter, page: nextPage }), maxRetryTimeMs, maxRetryDelayMs);
35
+ const response = yield (0, makeRequest_1.makeRequest)(log, apiKey, baseUrl, endpoint, method, Object.assign(Object.assign({}, data), { filter: (0, tqlFilter_1.normalizeFilter)(filter), page: nextPage }), maxRetryTimeMs, maxRetryDelayMs);
35
36
  log("http", `Page ${nextPage} fetched successfully for ${endpoint}`);
36
37
  results = results.concat(response.data);
37
38
  nextPage = response.next_page;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"makePaginatedRequest.js","sourceRoot":"","sources":["../../src/utils/makePaginatedRequest.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+CAA4C;AAC5C,+CAA4C;AAG5C,2CAAyD;AAEzD;;;;;;;;;GASG;AACI,MAAM,oBAAoB,GAAG,uCAMpB,EAAE,8EALhB,WAAwB,EACxB,QAAqB,EACrB,SAAyB,KAAK,EAC9B,OAAY,IAAI,EAChB,SAAoC,IAAI;IAExC,MAAM,EAAE,GAAG,EAAE,GAAG,WAAW,CAAC;IAC5B,MAAM,MAAM,GAAG,WAAW,CAAC,SAAS,EAAE,CAAC;IACvC,MAAM,EAAE,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,GAAG,WAAW,CAAC,SAAS,EAAE,CAAC;IAE7E,IAAI,OAAO,GAAU,EAAE,CAAC;IACxB,IAAI,QAAQ,GAAkB,CAAC,CAAC;IAEhC,IAAI,CAAC;QACH,GAAG,CAAC;YACF,GAAG,CAAC,OAAO,EAAE,iBAAiB,QAAQ,QAAQ,QAAQ,EAAE,CAAC,CAAC;YAC1D,MAAM,QAAQ,GACZ,MAAM,IAAA,yBAAW,EAIf,GAAG,EACH,MAAM,EACN,OAAO,EACP,QAAQ,EACR,MAAM,kCACD,IAAI,KAAE,MAAM,EAAE,IAAA,2BAAe,EAAC,MAAM,CAAC,EAAE,IAAI,EAAE,QAAQ,KAC1D,cAAc,EACd,eAAe,CAChB,CAAC;YAEJ,GAAG,CAAC,MAAM,EAAE,QAAQ,QAAQ,6BAA6B,QAAQ,EAAE,CAAC,CAAC;YACrE,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;YACxC,QAAQ,GAAG,QAAQ,CAAC,SAAS,CAAC;QAChC,CAAC,QAAQ,QAAQ,EAAE;QAEnB,GAAG,CAAC,MAAM,EAAE,wBAAwB,QAAQ,yBAAyB,CAAC,CAAC;QACvE,OAAO,OAAO,CAAC;IACjB,CAAC;IAAC,OAAO,KAAU,EAAE,CAAC;QACpB,GAAG,CACD,OAAO,EACP,wBAAwB,QAAQ,wBAAwB,KAAK,CAAC,OAAO,GAAG,CACzE,CAAC;QACF,IAAA,yBAAW,EAAC,GAAG,EAAE,KAAK,CAAC,CAAC;IAC1B,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC,CAAA,CAAC;AA/CW,QAAA,oBAAoB,wBA+C/B"}
@@ -49,15 +49,38 @@ function makeRequest(log, apiKey, baseUrl, endpoint, method, data, maxRetryTimeM
49
49
  }
50
50
  catch (error) {
51
51
  if (((_a = error.response) === null || _a === void 0 ? void 0 : _a.status) === 429) {
52
- const retryAfterHeader = parseInt(error.response.headers["retry-after"], 10);
53
- const retryAfter = retryAfterHeader || Math.min(maxRetryDelayMs, Math.pow(2, retries));
54
- if (totalElapsedTime + retryAfter * 1000 >= maxRetryTimeMs) {
52
+ // Parse Retry-After header (can be in seconds or HTTP date format)
53
+ let retryAfterMs;
54
+ const retryAfterHeader = error.response.headers["retry-after"];
55
+ if (retryAfterHeader) {
56
+ const retryAfterSeconds = parseInt(retryAfterHeader, 10);
57
+ if (!isNaN(retryAfterSeconds)) {
58
+ retryAfterMs = retryAfterSeconds * 1000;
59
+ }
60
+ else {
61
+ // HTTP date format - calculate difference
62
+ const retryDate = new Date(retryAfterHeader);
63
+ retryAfterMs = Math.max(0, retryDate.getTime() - Date.now());
64
+ }
65
+ }
66
+ else {
67
+ // No Retry-After header - use aggressive exponential backoff
68
+ // Start at 1 second, grow rapidly: 1s, 2s, 4s, 8s, 16s, 32s, 64s
69
+ const baseDelayMs = Math.pow(2, retries) * 1000;
70
+ // Add jitter (random ±25%) to prevent thundering herd
71
+ // If multiple clients hit 429 at the same time, they'll retry at different times
72
+ const jitterFactor = 0.75 + Math.random() * 0.5; // Random between 0.75 and 1.25
73
+ retryAfterMs = baseDelayMs * jitterFactor;
74
+ }
75
+ // Cap at maxRetryDelayMs
76
+ retryAfterMs = Math.min(maxRetryDelayMs, retryAfterMs);
77
+ if (totalElapsedTime + retryAfterMs >= maxRetryTimeMs) {
55
78
  log("error", `Max retry time exceeded for ${endpoint}`);
56
79
  break;
57
80
  }
58
- log("warn", `Rate limited on ${endpoint}. Retrying after ${retryAfter} seconds...`);
59
- yield new Promise((resolve) => setTimeout(resolve, retryAfter * 1000));
60
- totalElapsedTime += retryAfter * 1000;
81
+ log("warn", `Rate limited (429) on ${endpoint}. Retrying after ${(retryAfterMs / 1000).toFixed(2)} seconds... (attempt ${retries + 1})`);
82
+ yield new Promise((resolve) => setTimeout(resolve, retryAfterMs));
83
+ totalElapsedTime += retryAfterMs;
61
84
  retries++;
62
85
  }
63
86
  else {
@@ -66,7 +89,7 @@ function makeRequest(log, apiKey, baseUrl, endpoint, method, data, maxRetryTimeM
66
89
  }
67
90
  }
68
91
  }
69
- throw new Error(`Max retry time of ${maxRetryTimeMs} minutes exceeded for ${endpoint}`);
92
+ throw new Error(`Max retry time of ${maxRetryTimeMs / 1000} seconds exceeded for ${endpoint}`);
70
93
  });
71
94
  }
72
95
  //# sourceMappingURL=makeRequest.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"makeRequest.js","sourceRoot":"","sources":["../../src/utils/makeRequest.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAkBA,kCAqFC;AAvGD,kDAA0B;AAC1B,+CAA4C;AAI5C;;;;;;;;;;;;GAYG;AACH,SAAsB,WAAW,CAC/B,GAA2D,EAC3D,MAAc,EACd,OAAe,EACf,QAAqB,EACrB,MAAsB,EACtB,IAAS,EACT,cAAsB,EACtB,eAAuB;;;QAEvB,IAAI,gBAAgB,GAAG,CAAC,CAAC;QACzB,IAA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 * Based on the TimeZest TQL documentation: https://developer.timezest.com/tql/
6
+ *
7
+ * @example
8
+ * ```typescript
9
+ * // Type-safe filtering with autocomplete (recommended)
10
+ * const filter = TQL.forSchedulingRequests()
11
+ * .filter('status').eq('scheduled');
12
+ *
13
+ * // Type-safe chaining with AND/OR
14
+ * const filter = TQL.forSchedulingRequests()
15
+ * .filter('end_user_email').like('@example.com')
16
+ * .and('status').eq('scheduled');
17
+ *
18
+ * // Using with API - no toString() needed!
19
+ * const requests = await timeZest.getSchedulingRequests(
20
+ * TQL.forSchedulingRequests().filter('status').eq('scheduled')
21
+ * );
22
+ *
23
+ * // Flexible filtering (no type checking, still works)
24
+ * const filter = TQL.filter('scheduling_request.status').eq('scheduled');
25
+ *
26
+ * // Call toString() explicitly if you need the string
27
+ * const filterString = TQL.forAgents().filter('name').like('John').toString();
28
+ * ```
29
+ */
30
+ import type { Agent, Resource, Team, AppointmentType, SchedulingRequest } from '../entities/entities';
31
+ /**
32
+ * Union of all valid TQL attribute paths.
33
+ * This is automatically inferred from entity types when using the type-safe helpers.
34
+ */
35
+ export type TQLAttribute = `agent.${keyof Agent & string}` | `resource.${keyof Resource & string}` | `team.${keyof Team & string}` | `appointment_type.${keyof AppointmentType & string}` | `scheduling_request.${keyof SchedulingRequest & string}`;
36
+ /**
37
+ * Represents a TQL filter being constructed.
38
+ */
39
+ export declare class TQLFilter<TAttribute extends string = string> {
40
+ private predicates;
41
+ private logicalOperators;
42
+ private entityPrefix;
43
+ private currentAttribute;
44
+ private currentOperator;
45
+ private currentValue;
46
+ /**
47
+ * Creates a new TQL filter starting with the given attribute.
48
+ * @param attribute - The attribute to filter on (e.g., 'scheduling_request.status')
49
+ * @param entityPrefix - Optional prefix for this entity type (e.g., 'scheduling_request')
50
+ */
51
+ constructor(attribute: TAttribute, entityPrefix?: string);
52
+ /**
53
+ * Adds a completed predicate and starts a new one.
54
+ */
55
+ private finalizePredicate;
56
+ /**
57
+ * Sets the operator and value for comparison operations.
58
+ */
59
+ private setComparison;
60
+ /**
61
+ * Equals operator (EQ)
62
+ * @param value - The value to compare against
63
+ */
64
+ eq(value: string | number): this;
65
+ /**
66
+ * Not equals operator (NOT_EQ)
67
+ * @param value - The value to compare against
68
+ */
69
+ notEq(value: string | number): this;
70
+ /**
71
+ * Like operator (contains pattern matching)
72
+ * @param value - The pattern to match against
73
+ */
74
+ like(value: string): this;
75
+ /**
76
+ * Not like operator (does not contain pattern)
77
+ * @param value - The pattern to exclude
78
+ */
79
+ notLike(value: string): this;
80
+ /**
81
+ * In operator (value is in the provided array)
82
+ * @param values - Array of values to match against
83
+ */
84
+ in(values: string[] | number[]): this;
85
+ /**
86
+ * Not in operator (value is not in the provided array)
87
+ * @param values - Array of values to exclude
88
+ */
89
+ notIn(values: string[] | number[]): this;
90
+ /**
91
+ * Greater than operator (GT)
92
+ * @param value - The value to compare against
93
+ */
94
+ gt(value: number): this;
95
+ /**
96
+ * Greater than or equal operator (GTE)
97
+ * @param value - The value to compare against
98
+ */
99
+ gte(value: number): this;
100
+ /**
101
+ * Less than operator (LT)
102
+ * @param value - The value to compare against
103
+ */
104
+ lt(value: number): this;
105
+ /**
106
+ * Less than or equal operator (LTE)
107
+ * @param value - The value to compare against
108
+ */
109
+ lte(value: number): this;
110
+ /**
111
+ * Adds an AND logical operator and starts a new predicate with the given attribute.
112
+ * If this filter was created with an entity prefix and you pass just a property name,
113
+ * it will automatically prepend the entity prefix.
114
+ * @param attribute - The attribute for the next predicate (full path or property name if using entity prefix)
115
+ */
116
+ and(attribute: TAttribute | string): this;
117
+ /**
118
+ * Adds an OR logical operator and starts a new predicate with the given attribute.
119
+ * If this filter was created with an entity prefix and you pass just a property name,
120
+ * it will automatically prepend the entity prefix.
121
+ * @param attribute - The attribute for the next predicate (full path or property name if using entity prefix)
122
+ */
123
+ or(attribute: TAttribute | string): this;
124
+ /**
125
+ * Formats a value for TQL output.
126
+ * Handles arrays, strings with special characters, and numbers.
127
+ */
128
+ private formatValue;
129
+ /**
130
+ * Formats a single value for TQL output.
131
+ */
132
+ private formatSingleValue;
133
+ /**
134
+ * Replaces spaces with tildes outside of quoted strings.
135
+ * This is needed for URL encoding while preserving spaces inside quoted values.
136
+ * Handles escaped quotes properly (e.g., "value with \"quotes\"").
137
+ * @param str - The string to process
138
+ * @returns The string with spaces outside quotes replaced by tildes
139
+ */
140
+ private replaceSpacesOutsideQuotes;
141
+ /**
142
+ * Converts the filter to a TQL string suitable for API requests.
143
+ * In URLs, spaces are replaced with tildes (~).
144
+ * @param urlEncode - If true, replaces spaces with ~ for URL encoding (default: true)
145
+ * @returns The TQL filter string
146
+ */
147
+ toString(urlEncode?: boolean): string;
148
+ /**
149
+ * Returns the filter as a plain string with spaces (not URL encoded).
150
+ * Useful for debugging or when you need the human-readable format.
151
+ */
152
+ toHumanReadableString(): string;
153
+ /**
154
+ * Returns the string representation when converted to a primitive.
155
+ * This allows TQLFilter to be used directly without calling toString().
156
+ */
157
+ valueOf(): string;
158
+ /**
159
+ * Custom primitive conversion for string contexts.
160
+ * Allows TQLFilter to be used directly in places expecting strings.
161
+ */
162
+ [Symbol.toPrimitive](hint: 'string' | 'number' | 'default'): string;
163
+ }
164
+ /**
165
+ * Normalizes a filter value to a string.
166
+ * Converts TQLFilter instances to strings, leaves strings as-is, and returns null for null.
167
+ * @param filter - The filter value (TQLFilter, string, or null)
168
+ * @returns The normalized filter string or null
169
+ */
170
+ export declare function normalizeFilter(filter: TQLFilter | string | null): string | null;
171
+ /**
172
+ * Helper class for building type-safe filters for specific entity types.
173
+ * Provides autocomplete and type checking for entity properties.
174
+ */
175
+ declare class TypedTQLFilterBuilder<T extends Record<string, any>> {
176
+ private prefix;
177
+ constructor(prefix: string);
178
+ /**
179
+ * Starts a filter with a type-safe attribute from the entity.
180
+ * @param attribute - A valid property key from the entity type
181
+ * @returns A TQLFilter instance for method chaining (with entity prefix stored)
182
+ */
183
+ filter<K extends keyof T>(attribute: K): TQLFilter<`${string}.${string & K}`>;
184
+ }
185
+ /**
186
+ * TQL Filter Builder
187
+ * Provides a user-friendly, fluent API for constructing TimeZest Query Language filters.
188
+ */
189
+ export declare class TQL {
190
+ /**
191
+ * Starts building a TQL filter with the given attribute.
192
+ * Use this for flexibility - no type checking on the attribute.
193
+ * For type-safe filtering, use the endpoint-specific helpers like `TQL.forAgents()`.
194
+ *
195
+ * @param attribute - The attribute to filter on (e.g., 'scheduling_request.status')
196
+ * @returns A TQLFilter instance for method chaining
197
+ *
198
+ * @example
199
+ * ```typescript
200
+ * TQL.filter('scheduling_request.status').eq('scheduled')
201
+ * ```
202
+ */
203
+ static filter(attribute: string): TQLFilter<string>;
204
+ /**
205
+ * Creates a type-safe filter builder for Agent entities.
206
+ * Provides autocomplete and type checking for Agent attributes.
207
+ *
208
+ * @example
209
+ * ```typescript
210
+ * TQL.forAgents().filter('name').like('John')
211
+ * TQL.forAgents().filter('email').eq('user@example.com')
212
+ * ```
213
+ */
214
+ static forAgents(): TypedTQLFilterBuilder<Agent>;
215
+ /**
216
+ * Creates a type-safe filter builder for Resource entities.
217
+ * Provides autocomplete and type checking for Resource attributes.
218
+ *
219
+ * @example
220
+ * ```typescript
221
+ * TQL.forResources().filter('name').like('Room')
222
+ * TQL.forResources().filter('schedulable').eq(true)
223
+ * ```
224
+ */
225
+ static forResources(): TypedTQLFilterBuilder<Resource>;
226
+ /**
227
+ * Creates a type-safe filter builder for Team entities.
228
+ * Provides autocomplete and type checking for Team attributes.
229
+ *
230
+ * @example
231
+ * ```typescript
232
+ * TQL.forTeams().filter('internal_name').eq('Tier1')
233
+ * TQL.forTeams().filter('team_type').eq('support')
234
+ * ```
235
+ */
236
+ static forTeams(): TypedTQLFilterBuilder<Team>;
237
+ /**
238
+ * Creates a type-safe filter builder for AppointmentType entities.
239
+ * Provides autocomplete and type checking for AppointmentType attributes.
240
+ *
241
+ * @example
242
+ * ```typescript
243
+ * TQL.forAppointmentTypes().filter('internal_name').eq('consultation')
244
+ * TQL.forAppointmentTypes().filter('duration_mins').gte(30)
245
+ * ```
246
+ */
247
+ static forAppointmentTypes(): TypedTQLFilterBuilder<AppointmentType>;
248
+ /**
249
+ * Creates a type-safe filter builder for SchedulingRequest entities.
250
+ * Provides autocomplete and type checking for SchedulingRequest attributes.
251
+ *
252
+ * @example
253
+ * ```typescript
254
+ * TQL.forSchedulingRequests().filter('status').eq('scheduled')
255
+ * TQL.forSchedulingRequests().filter('end_user_email').like('@example.com')
256
+ * ```
257
+ */
258
+ static forSchedulingRequests(): TypedTQLFilterBuilder<SchedulingRequest>;
259
+ }
260
+ export default TQL;
@@ -0,0 +1,439 @@
1
+ "use strict";
2
+ /**
3
+ * TimeZest Query Language (TQL) Filter Builder
4
+ *
5
+ * Provides a user-friendly, fluent API for constructing valid TQL filters.
6
+ * Based on the TimeZest TQL documentation: https://developer.timezest.com/tql/
7
+ *
8
+ * @example
9
+ * ```typescript
10
+ * // Type-safe filtering with autocomplete (recommended)
11
+ * const filter = TQL.forSchedulingRequests()
12
+ * .filter('status').eq('scheduled');
13
+ *
14
+ * // Type-safe chaining with AND/OR
15
+ * const filter = TQL.forSchedulingRequests()
16
+ * .filter('end_user_email').like('@example.com')
17
+ * .and('status').eq('scheduled');
18
+ *
19
+ * // Using with API - no toString() needed!
20
+ * const requests = await timeZest.getSchedulingRequests(
21
+ * TQL.forSchedulingRequests().filter('status').eq('scheduled')
22
+ * );
23
+ *
24
+ * // Flexible filtering (no type checking, still works)
25
+ * const filter = TQL.filter('scheduling_request.status').eq('scheduled');
26
+ *
27
+ * // Call toString() explicitly if you need the string
28
+ * const filterString = TQL.forAgents().filter('name').like('John').toString();
29
+ * ```
30
+ */
31
+ Object.defineProperty(exports, "__esModule", { value: true });
32
+ exports.TQL = exports.TQLFilter = void 0;
33
+ exports.normalizeFilter = normalizeFilter;
34
+ /**
35
+ * Represents a TQL filter being constructed.
36
+ */
37
+ class TQLFilter {
38
+ /**
39
+ * Creates a new TQL filter starting with the given attribute.
40
+ * @param attribute - The attribute to filter on (e.g., 'scheduling_request.status')
41
+ * @param entityPrefix - Optional prefix for this entity type (e.g., 'scheduling_request')
42
+ */
43
+ constructor(attribute, entityPrefix) {
44
+ this.predicates = [];
45
+ this.logicalOperators = [];
46
+ this.entityPrefix = null;
47
+ this.currentOperator = null;
48
+ this.currentValue = null;
49
+ this.currentAttribute = attribute;
50
+ this.entityPrefix = entityPrefix || null;
51
+ }
52
+ /**
53
+ * Adds a completed predicate and starts a new one.
54
+ */
55
+ finalizePredicate() {
56
+ if (this.currentAttribute && this.currentOperator !== null && this.currentValue !== null) {
57
+ this.predicates.push({
58
+ attribute: this.currentAttribute,
59
+ operator: this.currentOperator,
60
+ value: this.currentValue,
61
+ });
62
+ }
63
+ this.currentAttribute = '';
64
+ this.currentOperator = null;
65
+ this.currentValue = null;
66
+ }
67
+ /**
68
+ * Sets the operator and value for comparison operations.
69
+ */
70
+ setComparison(operator, value) {
71
+ if (!this.currentAttribute) {
72
+ throw new Error('Must call filter() or and() or or() before using comparison operators');
73
+ }
74
+ this.currentOperator = operator;
75
+ this.currentValue = value;
76
+ this.finalizePredicate();
77
+ return this;
78
+ }
79
+ // String comparison operators
80
+ /**
81
+ * Equals operator (EQ)
82
+ * @param value - The value to compare against
83
+ */
84
+ eq(value) {
85
+ return this.setComparison('EQ', value);
86
+ }
87
+ /**
88
+ * Not equals operator (NOT_EQ)
89
+ * @param value - The value to compare against
90
+ */
91
+ notEq(value) {
92
+ return this.setComparison('NOT_EQ', value);
93
+ }
94
+ /**
95
+ * Like operator (contains pattern matching)
96
+ * @param value - The pattern to match against
97
+ */
98
+ like(value) {
99
+ return this.setComparison('LIKE', value);
100
+ }
101
+ /**
102
+ * Not like operator (does not contain pattern)
103
+ * @param value - The pattern to exclude
104
+ */
105
+ notLike(value) {
106
+ return this.setComparison('NOT_LIKE', value);
107
+ }
108
+ /**
109
+ * In operator (value is in the provided array)
110
+ * @param values - Array of values to match against
111
+ */
112
+ in(values) {
113
+ if (!Array.isArray(values) || values.length === 0) {
114
+ throw new Error('IN operator requires a non-empty array');
115
+ }
116
+ return this.setComparison('IN', values);
117
+ }
118
+ /**
119
+ * Not in operator (value is not in the provided array)
120
+ * @param values - Array of values to exclude
121
+ */
122
+ notIn(values) {
123
+ if (!Array.isArray(values) || values.length === 0) {
124
+ throw new Error('NOT_IN operator requires a non-empty array');
125
+ }
126
+ return this.setComparison('NOT_IN', values);
127
+ }
128
+ // Numeric/timestamp comparison operators
129
+ /**
130
+ * Greater than operator (GT)
131
+ * @param value - The value to compare against
132
+ */
133
+ gt(value) {
134
+ return this.setComparison('GT', value);
135
+ }
136
+ /**
137
+ * Greater than or equal operator (GTE)
138
+ * @param value - The value to compare against
139
+ */
140
+ gte(value) {
141
+ return this.setComparison('GTE', value);
142
+ }
143
+ /**
144
+ * Less than operator (LT)
145
+ * @param value - The value to compare against
146
+ */
147
+ lt(value) {
148
+ return this.setComparison('LT', value);
149
+ }
150
+ /**
151
+ * Less than or equal operator (LTE)
152
+ * @param value - The value to compare against
153
+ */
154
+ lte(value) {
155
+ return this.setComparison('LTE', value);
156
+ }
157
+ /**
158
+ * Adds an AND logical operator and starts a new predicate with the given attribute.
159
+ * If this filter was created with an entity prefix and you pass just a property name,
160
+ * it will automatically prepend the entity prefix.
161
+ * @param attribute - The attribute for the next predicate (full path or property name if using entity prefix)
162
+ */
163
+ and(attribute) {
164
+ if (this.predicates.length === 0) {
165
+ throw new Error('Must have at least one predicate before using AND');
166
+ }
167
+ this.logicalOperators.push('AND');
168
+ // If we have an entity prefix and the attribute doesn't contain a dot, prepend the prefix
169
+ if (this.entityPrefix && !attribute.includes('.')) {
170
+ this.currentAttribute = `${this.entityPrefix}.${attribute}`;
171
+ }
172
+ else {
173
+ this.currentAttribute = attribute;
174
+ }
175
+ return this;
176
+ }
177
+ /**
178
+ * Adds an OR logical operator and starts a new predicate with the given attribute.
179
+ * If this filter was created with an entity prefix and you pass just a property name,
180
+ * it will automatically prepend the entity prefix.
181
+ * @param attribute - The attribute for the next predicate (full path or property name if using entity prefix)
182
+ */
183
+ or(attribute) {
184
+ if (this.predicates.length === 0) {
185
+ throw new Error('Must have at least one predicate before using OR');
186
+ }
187
+ this.logicalOperators.push('OR');
188
+ // If we have an entity prefix and the attribute doesn't contain a dot, prepend the prefix
189
+ if (this.entityPrefix && !attribute.includes('.')) {
190
+ this.currentAttribute = `${this.entityPrefix}.${attribute}`;
191
+ }
192
+ else {
193
+ this.currentAttribute = attribute;
194
+ }
195
+ return this;
196
+ }
197
+ /**
198
+ * Formats a value for TQL output.
199
+ * Handles arrays, strings with special characters, and numbers.
200
+ */
201
+ formatValue(value) {
202
+ if (Array.isArray(value)) {
203
+ // Arrays are comma-separated (no spaces) according to TQL spec
204
+ return value.map(v => this.formatSingleValue(v)).join(',');
205
+ }
206
+ return this.formatSingleValue(value);
207
+ }
208
+ /**
209
+ * Formats a single value for TQL output.
210
+ */
211
+ formatSingleValue(value) {
212
+ if (typeof value === 'number') {
213
+ return String(value);
214
+ }
215
+ // Strings containing spaces, commas, or tildes should be enclosed in quotes
216
+ if (/[\s,~"]/.test(value) || value === '') {
217
+ // Escape quotes in the value
218
+ const escaped = value.replace(/"/g, '\\"');
219
+ return `"${escaped}"`;
220
+ }
221
+ return value;
222
+ }
223
+ /**
224
+ * Replaces spaces with tildes outside of quoted strings.
225
+ * This is needed for URL encoding while preserving spaces inside quoted values.
226
+ * Handles escaped quotes properly (e.g., "value with \"quotes\"").
227
+ * @param str - The string to process
228
+ * @returns The string with spaces outside quotes replaced by tildes
229
+ */
230
+ replaceSpacesOutsideQuotes(str) {
231
+ let result = '';
232
+ let insideQuotes = false;
233
+ let i = 0;
234
+ while (i < str.length) {
235
+ const char = str[i];
236
+ if (char === '\\' && insideQuotes && i + 1 < str.length) {
237
+ // Handle escaped characters (like \")
238
+ result += char + str[i + 1];
239
+ i += 2;
240
+ continue;
241
+ }
242
+ if (char === '"') {
243
+ // Toggle quote state
244
+ insideQuotes = !insideQuotes;
245
+ result += char;
246
+ }
247
+ else if (char === ' ' || char === '\t' || char === '\n') {
248
+ // Only replace whitespace if we're NOT inside quotes
249
+ result += insideQuotes ? char : '~';
250
+ }
251
+ else {
252
+ result += char;
253
+ }
254
+ i++;
255
+ }
256
+ return result;
257
+ }
258
+ /**
259
+ * Converts the filter to a TQL string suitable for API requests.
260
+ * In URLs, spaces are replaced with tildes (~).
261
+ * @param urlEncode - If true, replaces spaces with ~ for URL encoding (default: true)
262
+ * @returns The TQL filter string
263
+ */
264
+ toString(urlEncode = true) {
265
+ // Finalize any pending predicate
266
+ if (this.currentAttribute && this.currentOperator !== null && this.currentValue !== null) {
267
+ this.finalizePredicate();
268
+ }
269
+ if (this.predicates.length === 0) {
270
+ throw new Error('Filter must have at least one predicate');
271
+ }
272
+ // Build the filter string
273
+ // Format: predicate1 [operator] predicate2 [operator] predicate3 ...
274
+ const parts = [];
275
+ for (let i = 0; i < this.predicates.length; i++) {
276
+ const predicate = this.predicates[i];
277
+ const predicateStr = `${predicate.attribute} ${predicate.operator} ${this.formatValue(predicate.value)}`;
278
+ parts.push(predicateStr);
279
+ // Add logical operator AFTER this predicate if it's not the last one
280
+ // logicalOperators[i] contains the operator between predicates[i] and predicates[i+1]
281
+ if (i < this.predicates.length - 1 && this.logicalOperators[i]) {
282
+ parts.push(this.logicalOperators[i]);
283
+ }
284
+ }
285
+ let result = parts.join(' ');
286
+ // Replace spaces with ~ for URL encoding if requested
287
+ // Only replace spaces outside of quoted strings to preserve spaces in values
288
+ if (urlEncode) {
289
+ result = this.replaceSpacesOutsideQuotes(result);
290
+ }
291
+ return result;
292
+ }
293
+ /**
294
+ * Returns the filter as a plain string with spaces (not URL encoded).
295
+ * Useful for debugging or when you need the human-readable format.
296
+ */
297
+ toHumanReadableString() {
298
+ return this.toString(false);
299
+ }
300
+ /**
301
+ * Returns the string representation when converted to a primitive.
302
+ * This allows TQLFilter to be used directly without calling toString().
303
+ */
304
+ valueOf() {
305
+ return this.toString();
306
+ }
307
+ /**
308
+ * Custom primitive conversion for string contexts.
309
+ * Allows TQLFilter to be used directly in places expecting strings.
310
+ */
311
+ [Symbol.toPrimitive](hint) {
312
+ return this.toString();
313
+ }
314
+ }
315
+ exports.TQLFilter = TQLFilter;
316
+ /**
317
+ * Normalizes a filter value to a string.
318
+ * Converts TQLFilter instances to strings, leaves strings as-is, and returns null for null.
319
+ * @param filter - The filter value (TQLFilter, string, or null)
320
+ * @returns The normalized filter string or null
321
+ */
322
+ function normalizeFilter(filter) {
323
+ if (filter === null) {
324
+ return null;
325
+ }
326
+ if (typeof filter === 'string') {
327
+ return filter;
328
+ }
329
+ // filter is a TQLFilter instance
330
+ return filter.toString();
331
+ }
332
+ /**
333
+ * Helper class for building type-safe filters for specific entity types.
334
+ * Provides autocomplete and type checking for entity properties.
335
+ */
336
+ class TypedTQLFilterBuilder {
337
+ constructor(prefix) {
338
+ this.prefix = prefix;
339
+ }
340
+ /**
341
+ * Starts a filter with a type-safe attribute from the entity.
342
+ * @param attribute - A valid property key from the entity type
343
+ * @returns A TQLFilter instance for method chaining (with entity prefix stored)
344
+ */
345
+ filter(attribute) {
346
+ const fullPath = `${this.prefix}.${String(attribute)}`;
347
+ return new TQLFilter(fullPath, this.prefix);
348
+ }
349
+ }
350
+ /**
351
+ * TQL Filter Builder
352
+ * Provides a user-friendly, fluent API for constructing TimeZest Query Language filters.
353
+ */
354
+ class TQL {
355
+ /**
356
+ * Starts building a TQL filter with the given attribute.
357
+ * Use this for flexibility - no type checking on the attribute.
358
+ * For type-safe filtering, use the endpoint-specific helpers like `TQL.forAgents()`.
359
+ *
360
+ * @param attribute - The attribute to filter on (e.g., 'scheduling_request.status')
361
+ * @returns A TQLFilter instance for method chaining
362
+ *
363
+ * @example
364
+ * ```typescript
365
+ * TQL.filter('scheduling_request.status').eq('scheduled')
366
+ * ```
367
+ */
368
+ static filter(attribute) {
369
+ return new TQLFilter(attribute);
370
+ }
371
+ /**
372
+ * Creates a type-safe filter builder for Agent entities.
373
+ * Provides autocomplete and type checking for Agent attributes.
374
+ *
375
+ * @example
376
+ * ```typescript
377
+ * TQL.forAgents().filter('name').like('John')
378
+ * TQL.forAgents().filter('email').eq('user@example.com')
379
+ * ```
380
+ */
381
+ static forAgents() {
382
+ return new TypedTQLFilterBuilder('agent');
383
+ }
384
+ /**
385
+ * Creates a type-safe filter builder for Resource entities.
386
+ * Provides autocomplete and type checking for Resource attributes.
387
+ *
388
+ * @example
389
+ * ```typescript
390
+ * TQL.forResources().filter('name').like('Room')
391
+ * TQL.forResources().filter('schedulable').eq(true)
392
+ * ```
393
+ */
394
+ static forResources() {
395
+ return new TypedTQLFilterBuilder('resource');
396
+ }
397
+ /**
398
+ * Creates a type-safe filter builder for Team entities.
399
+ * Provides autocomplete and type checking for Team attributes.
400
+ *
401
+ * @example
402
+ * ```typescript
403
+ * TQL.forTeams().filter('internal_name').eq('Tier1')
404
+ * TQL.forTeams().filter('team_type').eq('support')
405
+ * ```
406
+ */
407
+ static forTeams() {
408
+ return new TypedTQLFilterBuilder('team');
409
+ }
410
+ /**
411
+ * Creates a type-safe filter builder for AppointmentType entities.
412
+ * Provides autocomplete and type checking for AppointmentType attributes.
413
+ *
414
+ * @example
415
+ * ```typescript
416
+ * TQL.forAppointmentTypes().filter('internal_name').eq('consultation')
417
+ * TQL.forAppointmentTypes().filter('duration_mins').gte(30)
418
+ * ```
419
+ */
420
+ static forAppointmentTypes() {
421
+ return new TypedTQLFilterBuilder('appointment_type');
422
+ }
423
+ /**
424
+ * Creates a type-safe filter builder for SchedulingRequest entities.
425
+ * Provides autocomplete and type checking for SchedulingRequest attributes.
426
+ *
427
+ * @example
428
+ * ```typescript
429
+ * TQL.forSchedulingRequests().filter('status').eq('scheduled')
430
+ * TQL.forSchedulingRequests().filter('end_user_email').like('@example.com')
431
+ * ```
432
+ */
433
+ static forSchedulingRequests() {
434
+ return new TypedTQLFilterBuilder('scheduling_request');
435
+ }
436
+ }
437
+ exports.TQL = TQL;
438
+ exports.default = TQL;
439
+ //# sourceMappingURL=tqlFilter.js.map
@@ -0,0 +1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+ "version": "1.1.4",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "build": "tsc",
@@ -1 +0,0 @@
1
- {"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/config/config.ts"],"names":[],"mappings":";;;AAAA,4CAAkE;AAqClE;;GAEG;AACU,QAAA,MAAM,GAAsB;IACvC,QAAQ,EAAE,OAAO;IACjB,MAAM,EAAE,sBAAa;IACrB,OAAO,EAAE,6BAA6B;IACtC,eAAe,EAAE,GAAG,GAAG,EAAE,GAAG,IAAI,EAAE,cAAc;IAChD,cAAc,EAAE,EAAE,GAAG,IAAI,EAAE,aAAa;IACxC,gBAAgB,EAAE,IAAI;CACvB,CAAC"}
package/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAUA,gDAM4B;AAC5B,4CAAyC;AACzC,qDAAkD;AAClD,qDAAsD;AACtD,2CAA0D;AAC1D,uEAAoE;AAIpE,8CAA6H;AAApH,yGAAA,cAAc,OAAA;AAAE,sGAAA,WAAW,OAAA;AAAE,gHAAA,qBAAqB,OAAA;AAAE,kHAAA,uBAAuB,OAAA;AAAE,qGAAA,UAAU,OAAA;AAyBhG;;;GAGG;AACH,MAAa,WAAW;IAKtB;;;;OAIG;IACH,YAAY,MAAc,EAAE,OAA4B;QA6DxD;;;;WAIG;QACH,iBAAY,GAAG,YAA0D,EAAE,iDAArD,SAAwB,IAAI;YAChD,MAAM,QAAQ,GAAG,MAAM,IAAA,2CAAoB,EACzC,IAAI,EACJ,yBAAa,CAAC,SAAS,EACvB,KAAK,EACL,IAAI,EACJ,MAAM,CACP,CAAC;YACF,OAAO,IAAI,CAAC,gBAAgB,CAAC,QAAQ,EAAE,wBAAc,CAAC,CAAC;QACzD,CAAC,CAAA,CAAC;QA1EA,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,MAAM,GAAG;YACZ,QAAQ,EAAE,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,IAAI,KAAK,CACb,qBAAqB,cAAc,yBAAyB,QAAQ,EAAE,CACvE,CAAC;IACJ,CAAC;CAAA"}
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes