@brivioio/api-server-types 7.25.0 → 7.27.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.
@@ -0,0 +1,95 @@
1
+ /**
2
+ * Lifecycle of a single candidate↔company email thread. The communication agent
3
+ * advances this as the conversation progresses; the scheduler reads it to decide
4
+ * what (if anything) is due next.
5
+ */
6
+ export declare enum ECandidateConversationStatus {
7
+ /** Provisioned for a shortlisted candidate, but no email has gone out yet. */
8
+ NOT_STARTED = "not_started",
9
+ /** First reach-out (and possibly reminders) sent; waiting on the candidate. */
10
+ AWAITING_CANDIDATE = "awaiting_candidate",
11
+ /** Candidate replied and the agent owes a response / next step. */
12
+ AGENT_TO_RESPOND = "agent_to_respond",
13
+ /** A query was escalated; the POC has been looped in and we're waiting on them. */
14
+ AWAITING_POC = "awaiting_poc",
15
+ /** Candidate confirmed interest and we're collecting / have collected details. */
16
+ COLLECTING_INFO = "collecting_info",
17
+ /** Closed — candidate is interested and all required info is captured. */
18
+ CLOSED_INTERESTED = "closed_interested",
19
+ /** Closed — candidate declined. */
20
+ CLOSED_NOT_INTERESTED = "closed_not_interested",
21
+ /** Closed — exhausted the reminder cadence with no response. */
22
+ CLOSED_NO_RESPONSE = "closed_no_response",
23
+ /** Closed for any other reason (manual, bounced beyond retry, etc.). */
24
+ CLOSED_OTHER = "closed_other"
25
+ }
26
+ /** The agent's read on where the candidate stands on the opportunity. */
27
+ export declare enum ECandidateInterest {
28
+ UNKNOWN = "unknown",
29
+ INTERESTED = "interested",
30
+ ON_THE_FENCE = "on_the_fence",
31
+ NOT_INTERESTED = "not_interested"
32
+ }
33
+ /**
34
+ * A stable, threaded email conversation between the company (represented by the
35
+ * agent) and one candidate, for one role. Keyed by (organization, role,
36
+ * candidateKey) so it survives re-sourcing runs — the candidate may be
37
+ * re-shortlisted under a new run/requirement version, but the thread (and its
38
+ * reply address) is continuous.
39
+ *
40
+ * The candidate's reply address embeds {@link addressToken}; inbound mail to
41
+ * team+<addressToken>@<domain> resolves straight back to this document, which is
42
+ * how we know which candidate / role / org an incoming email belongs to.
43
+ */
44
+ export interface ICandidateConversation {
45
+ _id: string;
46
+ organizationId: string;
47
+ jobRoleId: string;
48
+ /** Normalized LinkedIn handle (e.g. "in/foo-bar") — the candidate identity. */
49
+ candidateKey: string;
50
+ /**
51
+ * The most recent `candidateSearchResults` snapshot for this candidate, for
52
+ * display + profile context. Refreshed as newer snapshots land; nullable until
53
+ * resolved.
54
+ */
55
+ candidateSearchResultId: string | null;
56
+ /**
57
+ * Opaque, unique token embedded in the reply address
58
+ * (team+<addressToken>@<domain>). Used to route inbound replies back to this
59
+ * conversation without exposing the raw document id.
60
+ */
61
+ addressToken: string;
62
+ status: ECandidateConversationStatus;
63
+ interest: ECandidateInterest;
64
+ /**
65
+ * Stable subject line for the thread — reused (with "Re:" handled by clients)
66
+ * across reminders and replies so everything stays in one visual thread.
67
+ */
68
+ subject: string;
69
+ /** Count of reminder emails sent so far (0 = only the first reach-out, if any). */
70
+ reminderStage: number;
71
+ /** Total outbound emails sent on this thread (first reach-out + reminders + replies). */
72
+ emailsSentCount: number;
73
+ /** Whether the POC has been looped into this thread. */
74
+ pocLoopedIn: boolean;
75
+ lastOutboundAt: Date | null;
76
+ lastInboundAt: Date | null;
77
+ /**
78
+ * When the scheduler should next evaluate this conversation (e.g. the next
79
+ * reminder is due). Null when nothing is scheduled (closed, or waiting on a
80
+ * human/candidate with no timer).
81
+ */
82
+ nextActionAt: Date | null;
83
+ /** Message-ID header of the last email on the thread, for In-Reply-To threading. */
84
+ lastMessageIdHeader: string;
85
+ closedAt: Date | null;
86
+ closedReason: string;
87
+ internalTags: {
88
+ key: string;
89
+ value: string;
90
+ }[];
91
+ isDeleted: boolean;
92
+ createdAt: string;
93
+ updatedAt: string;
94
+ }
95
+ //# sourceMappingURL=candidateConversations.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"candidateConversations.types.d.ts","sourceRoot":"","sources":["../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AAE,MAAM,CAAC;IAC5B,QAAQ,EAAE,IAAI,GAAG,IAAI,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE;QACZ,GAAG,EAAE,MAAM,CAAC;QACZ,KAAK,EAAE,MAAM,CAAC;KACf,EAAE,CAAC;IACJ,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB"}
@@ -0,0 +1,34 @@
1
+ /**
2
+ * Lifecycle of a single candidate↔company email thread. The communication agent
3
+ * advances this as the conversation progresses; the scheduler reads it to decide
4
+ * what (if anything) is due next.
5
+ */
6
+ export var ECandidateConversationStatus;
7
+ (function (ECandidateConversationStatus) {
8
+ /** Provisioned for a shortlisted candidate, but no email has gone out yet. */
9
+ ECandidateConversationStatus["NOT_STARTED"] = "not_started";
10
+ /** First reach-out (and possibly reminders) sent; waiting on the candidate. */
11
+ ECandidateConversationStatus["AWAITING_CANDIDATE"] = "awaiting_candidate";
12
+ /** Candidate replied and the agent owes a response / next step. */
13
+ ECandidateConversationStatus["AGENT_TO_RESPOND"] = "agent_to_respond";
14
+ /** A query was escalated; the POC has been looped in and we're waiting on them. */
15
+ ECandidateConversationStatus["AWAITING_POC"] = "awaiting_poc";
16
+ /** Candidate confirmed interest and we're collecting / have collected details. */
17
+ ECandidateConversationStatus["COLLECTING_INFO"] = "collecting_info";
18
+ /** Closed — candidate is interested and all required info is captured. */
19
+ ECandidateConversationStatus["CLOSED_INTERESTED"] = "closed_interested";
20
+ /** Closed — candidate declined. */
21
+ ECandidateConversationStatus["CLOSED_NOT_INTERESTED"] = "closed_not_interested";
22
+ /** Closed — exhausted the reminder cadence with no response. */
23
+ ECandidateConversationStatus["CLOSED_NO_RESPONSE"] = "closed_no_response";
24
+ /** Closed for any other reason (manual, bounced beyond retry, etc.). */
25
+ ECandidateConversationStatus["CLOSED_OTHER"] = "closed_other";
26
+ })(ECandidateConversationStatus || (ECandidateConversationStatus = {}));
27
+ /** The agent's read on where the candidate stands on the opportunity. */
28
+ export var ECandidateInterest;
29
+ (function (ECandidateInterest) {
30
+ ECandidateInterest["UNKNOWN"] = "unknown";
31
+ ECandidateInterest["INTERESTED"] = "interested";
32
+ ECandidateInterest["ON_THE_FENCE"] = "on_the_fence";
33
+ ECandidateInterest["NOT_INTERESTED"] = "not_interested";
34
+ })(ECandidateInterest || (ECandidateInterest = {}));
@@ -0,0 +1,92 @@
1
+ export declare enum EEmailDirection {
2
+ OUTBOUND = "outbound",
3
+ INBOUND = "inbound"
4
+ }
5
+ /**
6
+ * Why an email exists on the thread. Drives reporting ("what have we sent and
7
+ * why") and lets the agent reason over the full history of intents.
8
+ */
9
+ export declare enum EEmailPurpose {
10
+ /** Tailored first reach-out about the opportunity. */
11
+ FIRST_REACHOUT = "first_reachout",
12
+ /** Follow-up nudge under the no-response cadence. */
13
+ REMINDER = "reminder",
14
+ /** Answering a candidate question the agent could safely address. */
15
+ ANSWER_QUERY = "answer_query",
16
+ /** Asking the candidate for missing details (CV, CTC, notice, location, etc.). */
17
+ COLLECT_INFO = "collect_info",
18
+ /** Bringing the POC into the thread for a query the agent shouldn't answer. */
19
+ LOOP_IN_POC = "loop_in_poc",
20
+ /** Final note closing the loop after the reminder cadence is exhausted. */
21
+ CLOSING_NO_RESPONSE = "closing_no_response",
22
+ /** An inbound message from the candidate. */
23
+ CANDIDATE_MESSAGE = "candidate_message",
24
+ /** An inbound message from the POC (or other looped-in human). */
25
+ POC_MESSAGE = "poc_message",
26
+ /** Anything not covered above. */
27
+ OTHER = "other"
28
+ }
29
+ /**
30
+ * Delivery state. Outbound starts QUEUED→SENT and advances via Resend delivery
31
+ * webhooks; inbound mail is recorded as RECEIVED.
32
+ */
33
+ export declare enum EEmailDeliveryStatus {
34
+ QUEUED = "queued",
35
+ SENT = "sent",
36
+ DELIVERED = "delivered",
37
+ BOUNCED = "bounced",
38
+ COMPLAINED = "complained",
39
+ FAILED = "failed",
40
+ RECEIVED = "received"
41
+ }
42
+ export interface IEmailAttachment {
43
+ filename: string;
44
+ mimeType: string;
45
+ sizeBytes: number;
46
+ /** S3 object key where the attachment bytes are stored. */
47
+ storageKey: string;
48
+ }
49
+ /**
50
+ * One email on a candidate conversation — sent by us or received from the
51
+ * candidate / POC. This is the durable audit trail: every email's purpose, body,
52
+ * recipients, attachments, threading headers and delivery state are persisted so
53
+ * the agent (and the team) can reconstruct exactly what was communicated and when.
54
+ */
55
+ export interface ICandidateEmailMessage {
56
+ _id: string;
57
+ /** The conversation thread this email belongs to. */
58
+ conversationId: string;
59
+ organizationId: string;
60
+ jobRoleId: string;
61
+ /** Normalized LinkedIn handle — denormalized for cheap scoping + guardrail checks. */
62
+ candidateKey: string;
63
+ direction: EEmailDirection;
64
+ purpose: EEmailPurpose;
65
+ subject: string;
66
+ /** Plain-text body. No HTML — outreach is deliberately plain to avoid spam/promotions. */
67
+ body: string;
68
+ fromAddress: string;
69
+ toAddresses: string[];
70
+ ccAddresses: string[];
71
+ replyToAddresses: string[];
72
+ /** Resend email id for outbound sends, or the inbound provider's id. Null until known. */
73
+ resendEmailId: string | null;
74
+ /** RFC 5322 Message-ID of this email. */
75
+ messageIdHeader: string;
76
+ /** Message-ID this email replies to (threading). Empty for the first email. */
77
+ inReplyTo: string;
78
+ /** Full References chain for the thread (threading). */
79
+ references: string[];
80
+ attachments: IEmailAttachment[];
81
+ deliveryStatus: EEmailDeliveryStatus;
82
+ /** For reminders: which step of the cadence (1..N). Null for non-reminders. */
83
+ reminderStage: number | null;
84
+ /** Short note on why this email was sent / how the agent decided to send it. */
85
+ rationale: string;
86
+ sentAt: Date | null;
87
+ receivedAt: Date | null;
88
+ isDeleted: boolean;
89
+ createdAt: string;
90
+ updatedAt: string;
91
+ }
92
+ //# sourceMappingURL=candidateEmailMessages.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"candidateEmailMessages.types.d.ts","sourceRoot":"","sources":["../src/candidateEmailMessages.types.ts"],"names":[],"m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BAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B,0FAA0F;IAC1F,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,yCAAyC;IACzC,eAAe,EAAE,MAAM,CAAC;IACxB,+EAA+E;IAC/E,SAAS,EAAE,MAAM,CAAC;IAClB,wDAAwD;IACxD,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,WAAW,EAAE,gBAAgB,EAAE,CAAC;IAChC,cAAc,EAAE,oBAAoB,CAAC;IACrC,+EAA+E;IAC/E,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,gFAAgF;IAChF,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,IAAI,GAAG,IAAI,CAAC;IACpB,UAAU,EAAE,IAAI,GAAG,IAAI,CAAC;IACxB,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB"}
@@ -0,0 +1,44 @@
1
+ export var EEmailDirection;
2
+ (function (EEmailDirection) {
3
+ EEmailDirection["OUTBOUND"] = "outbound";
4
+ EEmailDirection["INBOUND"] = "inbound";
5
+ })(EEmailDirection || (EEmailDirection = {}));
6
+ /**
7
+ * Why an email exists on the thread. Drives reporting ("what have we sent and
8
+ * why") and lets the agent reason over the full history of intents.
9
+ */
10
+ export var EEmailPurpose;
11
+ (function (EEmailPurpose) {
12
+ /** Tailored first reach-out about the opportunity. */
13
+ EEmailPurpose["FIRST_REACHOUT"] = "first_reachout";
14
+ /** Follow-up nudge under the no-response cadence. */
15
+ EEmailPurpose["REMINDER"] = "reminder";
16
+ /** Answering a candidate question the agent could safely address. */
17
+ EEmailPurpose["ANSWER_QUERY"] = "answer_query";
18
+ /** Asking the candidate for missing details (CV, CTC, notice, location, etc.). */
19
+ EEmailPurpose["COLLECT_INFO"] = "collect_info";
20
+ /** Bringing the POC into the thread for a query the agent shouldn't answer. */
21
+ EEmailPurpose["LOOP_IN_POC"] = "loop_in_poc";
22
+ /** Final note closing the loop after the reminder cadence is exhausted. */
23
+ EEmailPurpose["CLOSING_NO_RESPONSE"] = "closing_no_response";
24
+ /** An inbound message from the candidate. */
25
+ EEmailPurpose["CANDIDATE_MESSAGE"] = "candidate_message";
26
+ /** An inbound message from the POC (or other looped-in human). */
27
+ EEmailPurpose["POC_MESSAGE"] = "poc_message";
28
+ /** Anything not covered above. */
29
+ EEmailPurpose["OTHER"] = "other";
30
+ })(EEmailPurpose || (EEmailPurpose = {}));
31
+ /**
32
+ * Delivery state. Outbound starts QUEUED→SENT and advances via Resend delivery
33
+ * webhooks; inbound mail is recorded as RECEIVED.
34
+ */
35
+ export var EEmailDeliveryStatus;
36
+ (function (EEmailDeliveryStatus) {
37
+ EEmailDeliveryStatus["QUEUED"] = "queued";
38
+ EEmailDeliveryStatus["SENT"] = "sent";
39
+ EEmailDeliveryStatus["DELIVERED"] = "delivered";
40
+ EEmailDeliveryStatus["BOUNCED"] = "bounced";
41
+ EEmailDeliveryStatus["COMPLAINED"] = "complained";
42
+ EEmailDeliveryStatus["FAILED"] = "failed";
43
+ EEmailDeliveryStatus["RECEIVED"] = "received";
44
+ })(EEmailDeliveryStatus || (EEmailDeliveryStatus = {}));
package/dist/index.d.ts CHANGED
@@ -1,4 +1,6 @@
1
1
  export * from './candidateContacts.types';
2
+ export * from './candidateConversations.types';
3
+ export * from './candidateEmailMessages.types';
2
4
  export * from './candidateSearchResults.types';
3
5
  export * from './jobRoleChatHistory.types';
4
6
  export * from './jobRoles.types';
@@ -8,6 +10,7 @@ export * from './organizationUsers.types';
8
10
  export * from './organizations.types';
9
11
  export * from './queuedChatMessages.types';
10
12
  export * from './requirements.types';
13
+ export * from './roleOutreachConfigs.types';
11
14
  export * from './shortlists.types';
12
15
  export * from './slackChannels.types';
13
16
  export * from './slackMessages.types';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC;AAC1C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,uBAAuB,CAAC;AACtC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,sBAAsB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC;AAC1C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,uBAAuB,CAAC;AACtC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,sBAAsB,CAAC;AACrC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,sBAAsB,CAAC"}
package/dist/index.js CHANGED
@@ -1,4 +1,6 @@
1
1
  export * from './candidateContacts.types';
2
+ export * from './candidateConversations.types';
3
+ export * from './candidateEmailMessages.types';
2
4
  export * from './candidateSearchResults.types';
3
5
  export * from './jobRoleChatHistory.types';
4
6
  export * from './jobRoles.types';
@@ -8,6 +10,7 @@ export * from './organizationUsers.types';
8
10
  export * from './organizations.types';
9
11
  export * from './queuedChatMessages.types';
10
12
  export * from './requirements.types';
13
+ export * from './roleOutreachConfigs.types';
11
14
  export * from './shortlists.types';
12
15
  export * from './slackChannels.types';
13
16
  export * from './slackMessages.types';
@@ -0,0 +1,34 @@
1
+ /**
2
+ * Per-role configuration for candidate email outreach. One document per job role.
3
+ *
4
+ * The point-of-contact (POC) emails are captured during the intake chat at the
5
+ * sourcing-start gate: when a candidate asks something the agent can't answer, or
6
+ * a query needs human judgement, the POC is looped into the email thread. The POC
7
+ * address is also surfaced to candidates (in the reply-to and the email body) so
8
+ * they always have a human to reach.
9
+ */
10
+ export interface IRoleOutreachConfig {
11
+ _id: string;
12
+ organizationId: string;
13
+ /** The role this outreach config belongs to (unique — one config per role). */
14
+ jobRoleId: string;
15
+ /**
16
+ * Point-of-contact email(s) for candidate queries. The first is the primary;
17
+ * all are CC'd / looped in when the agent escalates a candidate question.
18
+ */
19
+ pocEmails: string[];
20
+ /**
21
+ * Master switch for outreach on this role. False keeps the schedule paused even
22
+ * when contacts and a verified domain are present (e.g. recruiter wants to hold).
23
+ */
24
+ isEnabled: boolean;
25
+ /**
26
+ * Local-part prefix for the sending/receiving mailbox, e.g. "team" in
27
+ * team+<token>@reply.acme.com. Defaults to "team"; configurable per org later.
28
+ */
29
+ mailboxPrefix: string;
30
+ isDeleted: boolean;
31
+ createdAt: string;
32
+ updatedAt: string;
33
+ }
34
+ //# sourceMappingURL=roleOutreachConfigs.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"roleOutreachConfigs.types.d.ts","sourceRoot":"","sources":["../src/roleOutreachConfigs.types.ts"],"names":[],"mappings":"AACA;;;;;;;;GAQG;AACH,MAAM,WAAW,mBAAmB;IAClC,GAAG,EAAE,MAAM,CAAC;IACZ,cAAc,EAAE,MAAM,CAAC;IACvB,+EAA+E;IAC/E,SAAS,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB;;;OAGG;IACH,SAAS,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB"}
@@ -0,0 +1 @@
1
+ export {};
@@ -130,13 +130,33 @@ export type TShortlistEntry = {
130
130
  feedback: TShortlistFeedback[];
131
131
  createdAt: string;
132
132
  };
133
+ /**
134
+ * One shortlist as the recruiter sees it: the ranked entries from a single
135
+ * successful sourcing run. A role accumulates one of these per run (each tied to
136
+ * the requirements version it was sourced against), and the shortlist tab shows
137
+ * them newest-first so the team can revisit every shortlist they've shared.
138
+ */
139
+ export type TShortlistGroup = {
140
+ /** The sourcing run that produced this shortlist. */
141
+ runId: string;
142
+ /** The requirements version this shortlist was sourced against. */
143
+ requirementVersion: number;
144
+ /** When the run completed (ISO), or null if not stamped. */
145
+ completedAt: string | null;
146
+ /** When the run was created (ISO) — used to order/label shortlists. */
147
+ createdAt: string;
148
+ /** Ranked entries for this run (rank 1 first). */
149
+ entries: TShortlistEntry[];
150
+ /** Candidates in this shortlist with draft (un-submitted) feedback. */
151
+ draftFeedbackCount: number;
152
+ };
133
153
  export declare namespace ShortlistsAPITypes {
134
154
  type TGetShortlistResponse = IResponse<{
135
- entries: TShortlistEntry[];
136
- requirementVersion: number | null;
137
- /** True when a newer requirement version exists than the one this shortlist was sourced from. */
155
+ /** Every successful run's shortlist for this role, newest first. */
156
+ shortlists: TShortlistGroup[];
157
+ /** True when a newer requirement version exists than the latest shortlist was sourced from. */
138
158
  stale: boolean;
139
- /** How many candidates have draft (un-submitted) feedback awaiting a re-source. */
159
+ /** Total candidates (across all shortlists) with draft feedback awaiting a re-source. */
140
160
  draftFeedbackCount: number;
141
161
  } | null>;
142
162
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"shortlists.types.d.ts","sourceRoot":"","sources":["../src/shortlists.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE/C,oBAAY,gBAAg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,MAAM,CAAC;IAClB,kDAAkD;IAClD,OAAO,EAAE,eAAe,EAAE,CAAC;IAC3B,uEAAuE;IACvE,kBAAkB,EAAE,MAAM,CAAC;CAC5B,CAAC;AAEF,yBAAiB,kBAAkB,CAAC;IAClC,KAAY,qBAAqB,GAAG,SAAS,CAAC;QAC5C,oEAAoE;QACpE,UAAU,EAAE,eAAe,EAAE,CAAC;QAC9B,+FAA+F;QAC/F,KAAK,EAAE,OAAO,CAAC;QACf,yFAAyF;QACzF,kBAAkB,EAAE,MAAM,CAAC;KAC5B,GAAG,IAAI,CAAC,CAAC;IAEV;;;OAGG;IACH,KAAY,mBAAmB,GAAG;QAChC,OAAO,EAAE,yBAAyB,CAAC;QACnC,IAAI,EAAE,MAAM,CAAC;KACd,CAAC;IAEF,KAAY,uBAAuB,GAAG,SAAS,CAAC;QAC9C,KAAK,EAAE,eAAe,CAAC;KACxB,GAAG,IAAI,CAAC,CAAC;IAEV,KAAY,uBAAuB,GAAG,SAAS,CAAC;QAC9C,KAAK,EAAE,eAAe,CAAC;KACxB,GAAG,IAAI,CAAC,CAAC;CACX"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brivioio/api-server-types",
3
- "version": "7.25.0",
3
+ "version": "7.27.0",
4
4
  "description": "TypeScript type definitions for Brivio API Server",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",