timezest 1.0.6 → 1.0.7
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/index.d.ts +9 -65
- package/index.js.map +1 -1
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -1,70 +1,6 @@
|
|
|
1
1
|
import { log, LogLevel, Logger } from "./utils/logger";
|
|
2
2
|
import { TimeZestAPIConfig } from "./config/config";
|
|
3
3
|
import { Agent, Resource, AppointmentType, SchedulingRequest, Team } from "./entities/entities";
|
|
4
|
-
/**
|
|
5
|
-
* Represents the main interface for the TimeZest API.
|
|
6
|
-
*/
|
|
7
|
-
export interface TimeZestAPI {
|
|
8
|
-
/**
|
|
9
|
-
* Logs a message with a specified log level.
|
|
10
|
-
* @param level - The log level (e.g., 'info', 'debug').
|
|
11
|
-
* @param message - The message to log.
|
|
12
|
-
* @param data - Optional additional data to log.
|
|
13
|
-
*/
|
|
14
|
-
log: (level: LogLevel, message: string, data?: any) => void;
|
|
15
|
-
/**
|
|
16
|
-
* Retrieves a list of resources, optionally filtered by a query.
|
|
17
|
-
* @param filter - An optional filter string in TQL format
|
|
18
|
-
* @returns A promise that resolves to an array of resources.
|
|
19
|
-
*/
|
|
20
|
-
getResources(filter?: string | null): Promise<Resource[]>;
|
|
21
|
-
/**
|
|
22
|
-
* Retrieves a list of agents, optionally filtered by a query.
|
|
23
|
-
* @param filter - An optional filter string in TQL format
|
|
24
|
-
* @returns A promise that resolves to an array of agents.
|
|
25
|
-
*/
|
|
26
|
-
getAgents(filter?: string | null): Promise<Agent[]>;
|
|
27
|
-
/**
|
|
28
|
-
* Retrieves a list of teams, optionally filtered by a query.
|
|
29
|
-
* @param filter - An optional filter string in TQL format
|
|
30
|
-
* @returns A promise that resolves to an array of teams.
|
|
31
|
-
*/
|
|
32
|
-
getTeams(filter?: string | null): Promise<Team[]>;
|
|
33
|
-
/**
|
|
34
|
-
* Retrieves a list of appointment types, optionally filtered by a query.
|
|
35
|
-
* @param filter - An optional filter string in TQL format
|
|
36
|
-
* @returns A promise that resolves to an array of appointment types.
|
|
37
|
-
*/
|
|
38
|
-
getAppointmentTypes(filter?: string | null): Promise<AppointmentType[]>;
|
|
39
|
-
/**
|
|
40
|
-
* Retrieves a specific scheduling request by its ID.
|
|
41
|
-
* @param id - The ID of the scheduling request.
|
|
42
|
-
* @returns A promise that resolves to the scheduling request.
|
|
43
|
-
*/
|
|
44
|
-
getSchedulingRequest(id: string): Promise<SchedulingRequest>;
|
|
45
|
-
/**
|
|
46
|
-
* Retrieves a list of scheduling requests, optionally filtered by a query.
|
|
47
|
-
* @param filter - An optional filter string in TQL format
|
|
48
|
-
* @returns A promise that resolves to an array of scheduling requests.
|
|
49
|
-
*/
|
|
50
|
-
getSchedulingRequests(filter?: string | null): Promise<SchedulingRequest[]>;
|
|
51
|
-
/**
|
|
52
|
-
* Creates a new scheduling request.
|
|
53
|
-
* @param data - The data for the new scheduling request.
|
|
54
|
-
* @returns A promise that resolves to the created scheduling request.
|
|
55
|
-
*/
|
|
56
|
-
createSchedulingRequest(data: SchedulingRequest): Promise<SchedulingRequest>;
|
|
57
|
-
/**
|
|
58
|
-
* Retrieves the API key.
|
|
59
|
-
* @returns The API key as a string.
|
|
60
|
-
*/
|
|
61
|
-
getApiKey(): string;
|
|
62
|
-
/**
|
|
63
|
-
* Retrieves the configuration object.
|
|
64
|
-
* @returns The configuration object.
|
|
65
|
-
*/
|
|
66
|
-
getConfig(): TimeZestAPIConfig;
|
|
67
|
-
}
|
|
68
4
|
/**
|
|
69
5
|
* Options for configuring the TimeZest API.
|
|
70
6
|
*/
|
|
@@ -80,10 +16,18 @@ export interface TimeZestAPIOptions {
|
|
|
80
16
|
/** The maximum total retry time, in milliseconds. */
|
|
81
17
|
maxRetryTimeMs?: number;
|
|
82
18
|
}
|
|
83
|
-
export declare class TimeZestAPI
|
|
19
|
+
export declare class TimeZestAPI {
|
|
84
20
|
private config;
|
|
85
21
|
private apiKey;
|
|
86
22
|
log: log;
|
|
87
23
|
constructor(apiKey: string, options?: TimeZestAPIOptions);
|
|
24
|
+
getApiKey(): string;
|
|
25
|
+
getConfig(): TimeZestAPIConfig;
|
|
88
26
|
getResources: (filter?: string | null) => Promise<Resource[]>;
|
|
27
|
+
getAgents(filter?: string | null): Promise<Agent[]>;
|
|
28
|
+
getTeams(filter?: string | null): Promise<Team[]>;
|
|
29
|
+
getAppointmentTypes(filter?: string | null): Promise<AppointmentType[]>;
|
|
30
|
+
getSchedulingRequest(id: string): Promise<SchedulingRequest>;
|
|
31
|
+
getSchedulingRequests(filter?: string | null): Promise<SchedulingRequest[]>;
|
|
32
|
+
createSchedulingRequest(data: SchedulingRequest): Promise<SchedulingRequest>;
|
|
89
33
|
}
|
package/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAGA,gDAM4B;AAC5B,4CAAyC;AACzC,qDAAkD;AAClD,qDAAsD;AACtD,2CAA0D;AAC1D,uEAAoE;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAGA,gDAM4B;AAC5B,4CAAyC;AACzC,qDAAkD;AAClD,qDAAsD;AACtD,2CAA0D;AAC1D,uEAAoE;AAsBpE,MAAa,WAAW;IAKtB,YAAY,MAAc,EAAE,OAA4B;QAoDxD,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,QAAQ,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,wBAAc,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;QAC5D,CAAC,CAAA,CAAC;QA5DA,IAA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