@automate.ax/integration-contracts 0.147.1 → 0.150.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/dist/calcom/events.d.ts +1067 -11
- package/dist/calcom/events.js +66 -32
- package/dist/close/events.d.ts +4 -4
- package/dist/close/schemas.d.ts +6 -6
- package/dist/google-drive/index.d.ts +3 -3
- package/dist/kit/api.d.ts +78 -0
- package/dist/kit/api.js +386 -0
- package/dist/kit/events.d.ts +437 -0
- package/dist/kit/events.js +285 -0
- package/dist/kit/index.d.ts +6 -0
- package/dist/kit/index.js +5 -0
- package/dist/kit/openapi-operations.generated.d.ts +5 -0
- package/dist/kit/openapi-operations.generated.js +5 -0
- package/dist/kit/openapi-types.generated.d.ts +9485 -0
- package/dist/kit/openapi-types.generated.js +1 -0
- package/dist/kit/operation-manifest.d.ts +657 -0
- package/dist/kit/operation-manifest.js +98 -0
- package/dist/kit/schemas.d.ts +42 -0
- package/dist/kit/schemas.js +43 -0
- package/dist/kit/types.d.ts +41 -0
- package/dist/kit/types.js +1 -0
- package/dist/krisp/api.d.ts +61 -0
- package/dist/krisp/api.js +170 -0
- package/dist/krisp/index.d.ts +2 -0
- package/dist/krisp/index.js +2 -0
- package/dist/krisp/schemas.d.ts +145 -0
- package/dist/krisp/schemas.js +97 -0
- package/dist/notion/schemas.d.ts +108 -108
- package/dist/resend/action-schemas.d.ts +14 -14
- package/dist/triggers.d.ts +2 -1
- package/package.json +15 -2
- package/src/calcom/events.ts +149 -30
- package/src/kit/api.ts +523 -0
- package/src/kit/events.ts +352 -0
- package/src/kit/index.ts +6 -0
- package/src/kit/openapi-operations.generated.ts +7 -0
- package/src/kit/openapi-types.generated.ts +9710 -0
- package/src/kit/operation-manifest.ts +771 -0
- package/src/kit/schemas.ts +93 -0
- package/src/kit/types.ts +87 -0
- package/src/krisp/api.ts +215 -0
- package/src/krisp/index.ts +2 -0
- package/src/krisp/schemas.ts +122 -0
- package/src/triggers.ts +2 -0
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
/** Complete practical Kit V4 action surface with verifiable request contracts. */
|
|
2
|
+
export const KIT_OPERATION_DEFINITIONS = [
|
|
3
|
+
operation("getCurrentAccount", "GET", "/v4/account", "getKitCurrentAccount", "Get current Kit account", "Returns the authenticated Kit account and user identity.", "safe", false),
|
|
4
|
+
operation("listColors", "GET", "/v4/account/colors", "listKitColors", "List Kit colors", "Lists the account's saved brand color palette.", "safe", false),
|
|
5
|
+
operation("updateColors", "PUT", "/v4/account/colors", "updateKitColors", "Update Kit colors", "Replaces the account's saved brand color palette.", "safe", false),
|
|
6
|
+
operation("getCreatorProfile", "GET", "/v4/account/creator_profile", "getKitCreatorProfile", "Get Kit creator profile", "Returns the account's public creator profile.", "safe", false),
|
|
7
|
+
operation("getEmailStats", "GET", "/v4/account/email_stats", "getKitEmailStats", "Get Kit email stats", "Returns account-level email performance for the last 90 days.", "safe", false),
|
|
8
|
+
operation("getGrowthStats", "GET", "/v4/account/growth_stats", "getKitGrowthStats", "Get Kit growth stats", "Returns subscriber growth statistics for a selected period.", "safe", false),
|
|
9
|
+
operation("listBroadcasts", "GET", "/v4/broadcasts", "listKitBroadcasts", "List Kit broadcasts", "Lists broadcasts with cursor pagination and lifecycle filters.", "safe", false),
|
|
10
|
+
operation("createBroadcast", "POST", "/v4/broadcasts", "createKitBroadcast", "Create Kit broadcast", "Creates a draft or scheduled Kit broadcast.", "unsafe", false),
|
|
11
|
+
operation("listBroadcastStats", "GET", "/v4/broadcasts/stats", "listKitBroadcastStats", "List Kit broadcast stats", "Lists delivery and engagement statistics for broadcasts.", "safe", false),
|
|
12
|
+
operation("listBroadcastLinkClicks", "GET", "/v4/broadcasts/{broadcast_id}/clicks", "listKitBroadcastLinkClicks", "List Kit broadcast link clicks", "Lists link-level click performance for a broadcast.", "safe", false),
|
|
13
|
+
operation("getBroadcastStats", "GET", "/v4/broadcasts/{broadcast_id}/stats", "getKitBroadcastStats", "Get Kit broadcast stats", "Returns delivery and engagement statistics for one broadcast.", "safe", false),
|
|
14
|
+
operation("deleteBroadcast", "DELETE", "/v4/broadcasts/{id}", "deleteKitBroadcast", "Delete Kit broadcast", "Permanently deletes a draft or scheduled broadcast.", "safe", false),
|
|
15
|
+
operation("getBroadcast", "GET", "/v4/broadcasts/{id}", "getKitBroadcast", "Get Kit broadcast", "Returns one broadcast with content, targeting, and publication settings.", "safe", false),
|
|
16
|
+
operation("updateBroadcast", "PUT", "/v4/broadcasts/{id}", "updateKitBroadcast", "Update Kit broadcast", "Updates a draft or scheduled broadcast.", "safe", false),
|
|
17
|
+
operation("bulkCreateCustomFields", "POST", "/v4/bulk/custom_fields", "bulkCreateKitCustomFields", "Bulk create Kit custom fields", "Creates custom fields synchronously or as an asynchronous bulk job.", "unsafe", true),
|
|
18
|
+
operation("bulkUpdateSubscriberCustomFieldValues", "POST", "/v4/bulk/custom_fields/subscribers", "bulkUpdateKitSubscriberCustomFieldValues", "Bulk update Kit subscriber custom fields", "Updates custom field values across subscribers in one bulk request.", "safe", true),
|
|
19
|
+
operation("listCustomFields", "GET", "/v4/custom_fields", "listKitCustomFields", "List Kit custom fields", "Lists custom fields with cursor pagination.", "safe", false),
|
|
20
|
+
operation("createCustomField", "POST", "/v4/custom_fields", "createKitCustomField", "Create Kit custom field", "Creates one account custom field.", "unsafe", false),
|
|
21
|
+
operation("deleteCustomField", "DELETE", "/v4/custom_fields/{id}", "deleteKitCustomField", "Delete Kit custom field", "Deletes a custom field and all subscriber values stored in it.", "safe", false),
|
|
22
|
+
operation("updateCustomField", "PUT", "/v4/custom_fields/{id}", "updateKitCustomField", "Update Kit custom field", "Renames one custom field.", "safe", false),
|
|
23
|
+
operation("listEmailTemplates", "GET", "/v4/email_templates", "listKitEmailTemplates", "List Kit email templates", "Lists account email templates with cursor pagination.", "safe", false),
|
|
24
|
+
operation("bulkAddSubscribersToForms", "POST", "/v4/bulk/forms/subscribers", "bulkAddKitSubscribersToForms", "Bulk add Kit subscribers to forms", "Adds subscribers to forms synchronously or as an asynchronous bulk job.", "safe", true),
|
|
25
|
+
operation("listForms", "GET", "/v4/forms", "listKitForms", "List Kit forms", "Lists forms and landing pages with status and type filters.", "safe", false),
|
|
26
|
+
operation("listFormSubscribers", "GET", "/v4/forms/{form_id}/subscribers", "listKitFormSubscribers", "List Kit form subscribers", "Lists subscribers associated with one form.", "safe", false),
|
|
27
|
+
operation("addSubscriberToFormByEmailAddress", "POST", "/v4/forms/{form_id}/subscribers", "addKitSubscriberToFormByEmailAddress", "Add Kit subscriber to form by email", "Adds an existing subscriber to a form by email address.", "safe", false),
|
|
28
|
+
operation("addSubscriberToForm", "POST", "/v4/forms/{form_id}/subscribers/{id}", "addKitSubscriberToForm", "Add Kit subscriber to form", "Adds an existing subscriber to a form by subscriber ID.", "safe", false),
|
|
29
|
+
operation("listPosts", "GET", "/v4/posts", "listKitPosts", "List Kit posts", "Lists posts published to the creator's Kit site or email audience.", "safe", false),
|
|
30
|
+
operation("getPost", "GET", "/v4/posts/{id}", "getKitPost", "Get Kit post", "Returns one post with content, publication, and SEO fields.", "safe", false),
|
|
31
|
+
operation("listPurchases", "GET", "/v4/purchases", "listKitPurchases", "List Kit purchases", "Lists purchases recorded in the account.", "safe", true),
|
|
32
|
+
operation("createPurchase", "POST", "/v4/purchases", "createKitPurchase", "Create Kit purchase", "Records a purchase against a subscriber.", "unsafe", true),
|
|
33
|
+
operation("getPurchase", "GET", "/v4/purchases/{id}", "getKitPurchase", "Get Kit purchase", "Returns one recorded purchase.", "safe", true),
|
|
34
|
+
operation("listSegments", "GET", "/v4/segments", "listKitSegments", "List Kit segments", "Lists account segments with cursor pagination.", "safe", false),
|
|
35
|
+
operation("listSequenceEmails", "GET", "/v4/sequences/{sequence_id}/emails", "listKitSequenceEmails", "List Kit sequence emails", "Lists the email steps in one sequence.", "safe", false),
|
|
36
|
+
operation("createSequenceEmail", "POST", "/v4/sequences/{sequence_id}/emails", "createKitSequenceEmail", "Create Kit sequence email", "Adds one email step to a sequence.", "unsafe", false),
|
|
37
|
+
operation("deleteSequenceEmail", "DELETE", "/v4/sequences/{sequence_id}/emails/{id}", "deleteKitSequenceEmail", "Delete Kit sequence email", "Permanently removes one email from a sequence.", "safe", false),
|
|
38
|
+
operation("getSequenceEmail", "GET", "/v4/sequences/{sequence_id}/emails/{id}", "getKitSequenceEmail", "Get Kit sequence email", "Returns one sequence email with its full content.", "safe", false),
|
|
39
|
+
operation("updateSequenceEmail", "PUT", "/v4/sequences/{sequence_id}/emails/{id}", "updateKitSequenceEmail", "Update Kit sequence email", "Updates one sequence email's content, timing, position, or state.", "safe", false),
|
|
40
|
+
operation("listSequences", "GET", "/v4/sequences", "listKitSequences", "List Kit sequences", "Lists automated email sequences.", "safe", false),
|
|
41
|
+
operation("createSequence", "POST", "/v4/sequences", "createKitSequence", "Create Kit sequence", "Creates an empty automated email sequence.", "unsafe", false),
|
|
42
|
+
operation("deleteSequence", "DELETE", "/v4/sequences/{id}", "deleteKitSequence", "Delete Kit sequence", "Soft-deletes a sequence and stops active delivery.", "safe", false),
|
|
43
|
+
operation("getSequence", "GET", "/v4/sequences/{id}", "getKitSequence", "Get Kit sequence", "Returns one sequence and its delivery settings.", "safe", false),
|
|
44
|
+
operation("updateSequence", "PUT", "/v4/sequences/{id}", "updateKitSequence", "Update Kit sequence", "Updates one sequence's schedule and delivery settings.", "safe", false),
|
|
45
|
+
operation("listSequenceSubscribers", "GET", "/v4/sequences/{sequence_id}/subscribers", "listKitSequenceSubscribers", "List Kit sequence subscribers", "Lists subscribers enrolled in one sequence.", "safe", false),
|
|
46
|
+
operation("addSubscriberToSequenceByEmailAddress", "POST", "/v4/sequences/{sequence_id}/subscribers", "addKitSubscriberToSequenceByEmailAddress", "Add Kit subscriber to sequence by email", "Adds an existing subscriber to a sequence by email address.", "safe", false),
|
|
47
|
+
operation("addSubscriberToSequence", "POST", "/v4/sequences/{sequence_id}/subscribers/{id}", "addKitSubscriberToSequence", "Add Kit subscriber to sequence", "Adds an existing subscriber to a sequence by subscriber ID.", "safe", false),
|
|
48
|
+
operation("listSnippets", "GET", "/v4/snippets", "listKitSnippets", "List Kit snippets", "Lists reusable email snippets.", "safe", false),
|
|
49
|
+
operation("createSnippet", "POST", "/v4/snippets", "createKitSnippet", "Create Kit snippet", "Creates a reusable email snippet.", "unsafe", false),
|
|
50
|
+
operation("getSnippet", "GET", "/v4/snippets/{id}", "getKitSnippet", "Get Kit snippet", "Returns one reusable snippet with full content.", "safe", false),
|
|
51
|
+
operation("updateSnippet", "PUT", "/v4/snippets/{id}", "updateKitSnippet", "Update Kit snippet", "Updates a snippet's name, content, or archive state.", "safe", false),
|
|
52
|
+
operation("bulkCreateSubscribers", "POST", "/v4/bulk/subscribers", "bulkCreateKitSubscribers", "Bulk create Kit subscribers", "Creates or updates subscribers in one bulk request.", "safe", true),
|
|
53
|
+
operation("listSubscribers", "GET", "/v4/subscribers", "listKitSubscribers", "List Kit subscribers", "Lists subscribers with cursor, status, date, and engagement sorting filters.", "safe", false),
|
|
54
|
+
operation("createSubscriber", "POST", "/v4/subscribers", "createKitSubscriber", "Create Kit subscriber", "Creates or updates a subscriber by email address.", "safe", false),
|
|
55
|
+
operation("filterSubscribers", "POST", "/v4/subscribers/filter", "filterKitSubscribers", "Filter Kit subscribers", "Filters subscribers by engagement, signup, state, and tags.", "safe", false),
|
|
56
|
+
operation("getSubscriber", "GET", "/v4/subscribers/{id}", "getKitSubscriber", "Get Kit subscriber", "Returns one subscriber and their custom field values.", "safe", false),
|
|
57
|
+
operation("updateSubscriber", "PUT", "/v4/subscribers/{id}", "updateKitSubscriber", "Update Kit subscriber", "Updates one subscriber and their custom field values.", "safe", false),
|
|
58
|
+
operation("unsubscribeSubscriber", "POST", "/v4/subscribers/{id}/unsubscribe", "unsubscribeKitSubscriber", "Unsubscribe Kit subscriber", "Unsubscribes a subscriber from all future Kit email.", "safe", false),
|
|
59
|
+
operation("deleteSubscriberLocation", "DELETE", "/v4/subscribers/{subscriber_id}/location", "deleteKitSubscriberLocation", "Delete Kit subscriber location", "Removes a subscriber's pinned location.", "safe", false),
|
|
60
|
+
operation("updateSubscriberLocation", "PATCH", "/v4/subscribers/{subscriber_id}/location", "updateKitSubscriberLocation", "Update Kit subscriber location", "Replaces a subscriber's pinned location.", "safe", false),
|
|
61
|
+
operation("pinSubscriberLocation", "POST", "/v4/subscribers/{subscriber_id}/location", "pinKitSubscriberLocation", "Pin Kit subscriber location", "Pins an explicit location to a subscriber.", "safe", false),
|
|
62
|
+
operation("getSubscriberStats", "GET", "/v4/subscribers/{subscriber_id}/stats", "getKitSubscriberStats", "Get Kit subscriber stats", "Returns delivery and engagement statistics for one subscriber.", "safe", false),
|
|
63
|
+
operation("listSubscriberTags", "GET", "/v4/subscribers/{subscriber_id}/tags", "listKitSubscriberTags", "List Kit subscriber tags", "Lists tags currently applied to one subscriber.", "safe", false),
|
|
64
|
+
operation("bulkDeleteTags", "DELETE", "/v4/bulk/tags", "bulkDeleteKitTags", "Bulk delete Kit tags", "Deletes tags synchronously or as an asynchronous bulk job.", "safe", true),
|
|
65
|
+
operation("bulkCreateTags", "POST", "/v4/bulk/tags", "bulkCreateKitTags", "Bulk create Kit tags", "Creates tags synchronously or as an asynchronous bulk job.", "safe", true),
|
|
66
|
+
operation("bulkTagSubscribers", "POST", "/v4/bulk/tags/subscribers", "bulkTagKitSubscribers", "Bulk tag Kit subscribers", "Applies tags to subscribers in one bulk request.", "safe", true),
|
|
67
|
+
operation("listTags", "GET", "/v4/tags", "listKitTags", "List Kit tags", "Lists account tags with cursor pagination.", "safe", false),
|
|
68
|
+
operation("createTag", "POST", "/v4/tags", "createKitTag", "Create Kit tag", "Creates a tag or returns the existing case-insensitive name match.", "safe", false),
|
|
69
|
+
operation("updateTag", "PUT", "/v4/tags/{id}", "updateKitTag", "Update Kit tag", "Renames one tag without changing its memberships.", "safe", false),
|
|
70
|
+
operation("listTagSubscribers", "GET", "/v4/tags/{tag_id}/subscribers", "listKitTagSubscribers", "List Kit tag subscribers", "Lists subscribers that have one tag.", "safe", false),
|
|
71
|
+
operation("tagSubscriberByEmailAddress", "POST", "/v4/tags/{tag_id}/subscribers", "tagKitSubscriberByEmailAddress", "Tag Kit subscriber by email", "Applies a tag to an existing subscriber by email address.", "safe", false),
|
|
72
|
+
operation("removeTagFromSubscriber", "DELETE", "/v4/tags/{tag_id}/subscribers/{id}", "removeKitTagFromSubscriber", "Remove Kit tag from subscriber", "Removes one tag from a subscriber by ID.", "safe", false),
|
|
73
|
+
operation("tagSubscriber", "POST", "/v4/tags/{tag_id}/subscribers/{id}", "tagKitSubscriber", "Tag Kit subscriber", "Applies a tag to an existing subscriber by ID.", "safe", false),
|
|
74
|
+
];
|
|
75
|
+
/**
|
|
76
|
+
* Preserves one Kit operation's public metadata.
|
|
77
|
+
*
|
|
78
|
+
* @param alias Public object alias and generated operation key.
|
|
79
|
+
* @param method Provider HTTP method.
|
|
80
|
+
* @param path Provider-relative V4 path.
|
|
81
|
+
* @param exportName Named SDK export.
|
|
82
|
+
* @param title Public action title.
|
|
83
|
+
* @param description Public action description.
|
|
84
|
+
* @param replaySafety Whether the provider operation can be replayed.
|
|
85
|
+
* @param oauthOnly Whether Kit rejects API-key authentication.
|
|
86
|
+
*/
|
|
87
|
+
function operation(alias, method, path, exportName, title, description, replaySafety, oauthOnly) {
|
|
88
|
+
return {
|
|
89
|
+
alias,
|
|
90
|
+
description,
|
|
91
|
+
exportName,
|
|
92
|
+
method,
|
|
93
|
+
oauthOnly,
|
|
94
|
+
path,
|
|
95
|
+
replaySafety,
|
|
96
|
+
title,
|
|
97
|
+
};
|
|
98
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import * as z from "zod";
|
|
2
|
+
import type { KitOperationKey } from "./operation-manifest.js";
|
|
3
|
+
import type { KitOperationInput, KitOperationOutput } from "./types.js";
|
|
4
|
+
export interface KitRuntimeParameter {
|
|
5
|
+
explode: boolean;
|
|
6
|
+
name: string;
|
|
7
|
+
providerName: string;
|
|
8
|
+
style: string;
|
|
9
|
+
}
|
|
10
|
+
/** Frozen runtime description of one public Kit operation. */
|
|
11
|
+
export interface KitRuntimeOperation {
|
|
12
|
+
bodyParameters: string[];
|
|
13
|
+
bodyWireSchema?: Record<string, unknown>;
|
|
14
|
+
inputSchema: Record<string, unknown>;
|
|
15
|
+
method: "DELETE" | "GET" | "PATCH" | "POST" | "PUT";
|
|
16
|
+
outputSchema: Record<string, unknown>;
|
|
17
|
+
outputWireSchema: Record<string, unknown>;
|
|
18
|
+
path: string;
|
|
19
|
+
pathParameters: KitRuntimeParameter[];
|
|
20
|
+
queryParameters: KitRuntimeParameter[];
|
|
21
|
+
responseMode: "json" | "void";
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Returns the immutable runtime descriptor for one Kit operation.
|
|
25
|
+
*
|
|
26
|
+
* @param key Public operation name.
|
|
27
|
+
*/
|
|
28
|
+
export declare function kitOperation<TKey extends KitOperationKey>(key: TKey): Record<"getCurrentAccount" | "listColors" | "updateColors" | "getCreatorProfile" | "getEmailStats" | "getGrowthStats" | "listBroadcasts" | "createBroadcast" | "listBroadcastStats" | "listBroadcastLinkClicks" | "getBroadcastStats" | "deleteBroadcast" | "getBroadcast" | "updateBroadcast" | "bulkCreateCustomFields" | "bulkUpdateSubscriberCustomFieldValues" | "listCustomFields" | "createCustomField" | "deleteCustomField" | "updateCustomField" | "listEmailTemplates" | "bulkAddSubscribersToForms" | "listForms" | "listFormSubscribers" | "addSubscriberToFormByEmailAddress" | "addSubscriberToForm" | "listPosts" | "getPost" | "listPurchases" | "createPurchase" | "getPurchase" | "listSegments" | "listSequenceEmails" | "createSequenceEmail" | "deleteSequenceEmail" | "getSequenceEmail" | "updateSequenceEmail" | "listSequences" | "createSequence" | "deleteSequence" | "getSequence" | "updateSequence" | "listSequenceSubscribers" | "addSubscriberToSequenceByEmailAddress" | "addSubscriberToSequence" | "listSnippets" | "createSnippet" | "getSnippet" | "updateSnippet" | "bulkCreateSubscribers" | "listSubscribers" | "createSubscriber" | "filterSubscribers" | "getSubscriber" | "updateSubscriber" | "unsubscribeSubscriber" | "deleteSubscriberLocation" | "updateSubscriberLocation" | "pinSubscriberLocation" | "getSubscriberStats" | "listSubscriberTags" | "bulkDeleteTags" | "bulkCreateTags" | "bulkTagSubscribers" | "listTags" | "createTag" | "updateTag" | "listTagSubscribers" | "tagSubscriberByEmailAddress" | "removeTagFromSubscriber" | "tagSubscriber", KitRuntimeOperation>[TKey];
|
|
29
|
+
/**
|
|
30
|
+
* Validates flattened public input for one Kit operation.
|
|
31
|
+
*
|
|
32
|
+
* @param key Public operation name.
|
|
33
|
+
*/
|
|
34
|
+
export declare function kitOperationInputSchema<TKey extends KitOperationKey>(key: TKey): z.ZodType<KitOperationInput<TKey>>;
|
|
35
|
+
/**
|
|
36
|
+
* Validates a public successful response for one Kit operation.
|
|
37
|
+
*
|
|
38
|
+
* @param key Public operation name.
|
|
39
|
+
*/
|
|
40
|
+
export declare function kitOperationOutputSchema<TKey extends KitOperationKey>(key: TKey): z.ZodType<KitOperationOutput<TKey>>;
|
|
41
|
+
/** Provider-native component schemas used for schema-guided key mapping. */
|
|
42
|
+
export declare const KIT_WIRE_DEFINITIONS: Record<string, Record<string, unknown>>;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/* oxlint-disable typescript/no-unsafe-type-assertion -- Generated operation keys index a frozen external contract. */
|
|
2
|
+
import { Validator } from "@cfworker/json-schema";
|
|
3
|
+
import * as z from "zod";
|
|
4
|
+
import { KIT_OPENAPI_DATA } from "./openapi-operations.generated";
|
|
5
|
+
/** Runtime Kit contract narrowed once from the opaque generated payload. */
|
|
6
|
+
const operationData = KIT_OPENAPI_DATA;
|
|
7
|
+
const OPERATIONS = operationData.operations;
|
|
8
|
+
const VALIDATOR = new Validator({
|
|
9
|
+
$defs: operationData.definitions,
|
|
10
|
+
$schema: "https://json-schema.org/draft/2020-12/schema",
|
|
11
|
+
additionalProperties: false,
|
|
12
|
+
properties: Object.fromEntries(Object.entries(OPERATIONS).flatMap(([key, operation]) => [
|
|
13
|
+
[`${key}:input`, operation.inputSchema],
|
|
14
|
+
[`${key}:output`, operation.outputSchema],
|
|
15
|
+
])),
|
|
16
|
+
type: "object",
|
|
17
|
+
}, "2020-12");
|
|
18
|
+
/**
|
|
19
|
+
* Returns the immutable runtime descriptor for one Kit operation.
|
|
20
|
+
*
|
|
21
|
+
* @param key Public operation name.
|
|
22
|
+
*/
|
|
23
|
+
export function kitOperation(key) {
|
|
24
|
+
return OPERATIONS[key];
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Validates flattened public input for one Kit operation.
|
|
28
|
+
*
|
|
29
|
+
* @param key Public operation name.
|
|
30
|
+
*/
|
|
31
|
+
export function kitOperationInputSchema(key) {
|
|
32
|
+
return z.custom((value) => VALIDATOR.validate({ [`${key}:input`]: value }).valid, { message: `Input does not match Kit operation ${key}.` });
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Validates a public successful response for one Kit operation.
|
|
36
|
+
*
|
|
37
|
+
* @param key Public operation name.
|
|
38
|
+
*/
|
|
39
|
+
export function kitOperationOutputSchema(key) {
|
|
40
|
+
return z.custom((value) => VALIDATOR.validate({ [`${key}:output`]: value }).valid, { message: `Output does not match Kit operation ${key}.` });
|
|
41
|
+
}
|
|
42
|
+
/** Provider-native component schemas used for schema-guided key mapping. */
|
|
43
|
+
export const KIT_WIRE_DEFINITIONS = operationData.wireDefinitions;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { Encodable } from "@automate.ax/codec";
|
|
2
|
+
import type { KitOperationMap } from "./openapi-types.generated";
|
|
3
|
+
import type { KitOperationKey } from "./operation-manifest.js";
|
|
4
|
+
type Operation<TKey extends KitOperationKey> = TKey extends keyof KitOperationMap ? KitOperationMap[TKey] : never;
|
|
5
|
+
/** Converts absent generated operation sections into intersection identities. */
|
|
6
|
+
type InputPart<TValue> = [NonNullable<TValue>] extends [never] ? unknown : NonNullable<TValue>;
|
|
7
|
+
type Parameters<TOperation, TLocation extends string> = TOperation extends {
|
|
8
|
+
parameters?: infer TParameters;
|
|
9
|
+
} ? TLocation extends keyof NonNullable<TParameters> ? InputPart<NonNullable<TParameters>[TLocation]> : unknown : unknown;
|
|
10
|
+
/** Extracts the JSON request body from one generated operation. */
|
|
11
|
+
type JsonBody<TOperation> = TOperation extends {
|
|
12
|
+
requestBody?: infer TBody;
|
|
13
|
+
} ? [NonNullable<TBody>] extends [never] ? unknown : NonNullable<TBody> extends {
|
|
14
|
+
content: infer TContent;
|
|
15
|
+
} ? "application/json" extends keyof TContent ? TContent["application/json"] : unknown : unknown : unknown;
|
|
16
|
+
/** Extracts the JSON response body from one generated response. */
|
|
17
|
+
type JsonResponse<TResponse> = TResponse extends {
|
|
18
|
+
content: infer TContent;
|
|
19
|
+
} ? "application/json" extends keyof TContent ? TContent["application/json"] : object : object;
|
|
20
|
+
/** Extracts the union of successful generated operation responses. */
|
|
21
|
+
type SuccessResponse<TOperation> = TOperation extends {
|
|
22
|
+
responses: infer TResponses;
|
|
23
|
+
} ? JsonResponse<TResponses[Extract<keyof TResponses, 200 | 201 | 202 | 203 | 204>]> : never;
|
|
24
|
+
/** Materializes an intersection as one readable object type. */
|
|
25
|
+
type Simplify<TValue> = {
|
|
26
|
+
[TKey in keyof TValue]: TValue[TKey];
|
|
27
|
+
} & {};
|
|
28
|
+
type EncodableValue<TValue> = unknown extends TValue ? Encodable : TValue extends undefined | null | boolean | number | string ? TValue : TValue extends readonly (infer TItem)[] ? EncodableValue<TItem>[] : TValue extends object ? keyof TValue extends never ? Record<string, Encodable> : {
|
|
29
|
+
[TKey in keyof TValue]: EncodableValue<TValue[TKey]>;
|
|
30
|
+
} : never;
|
|
31
|
+
/** Flattens one generated operation's path, query, and body fields. */
|
|
32
|
+
type RawKitOperationInput<TKey extends KitOperationKey> = Simplify<Parameters<Operation<TKey>, "path"> & Parameters<Operation<TKey>, "query"> & JsonBody<Operation<TKey>>>;
|
|
33
|
+
/** Preserves operation unions and rejects fields on truly empty inputs. */
|
|
34
|
+
type PublicInput<TValue> = TValue extends unknown ? keyof TValue extends never ? Record<string, never> : {
|
|
35
|
+
[TField in keyof TValue]: EncodableValue<TValue[TField]>;
|
|
36
|
+
} : never;
|
|
37
|
+
/** Flattened camelCase input for one frozen Kit V4 operation. */
|
|
38
|
+
export type KitOperationInput<TKey extends KitOperationKey> = PublicInput<RawKitOperationInput<TKey>>;
|
|
39
|
+
/** CamelCase successful response for one frozen Kit V4 operation. */
|
|
40
|
+
export type KitOperationOutput<TKey extends KitOperationKey> = EncodableValue<SuccessResponse<Operation<TKey>>>;
|
|
41
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import type { Encodable } from "@automate.ax/codec";
|
|
2
|
+
import * as z from "zod";
|
|
3
|
+
/** Options for one authenticated Krisp REST request. */
|
|
4
|
+
export interface KrispRequestOptions<TSchema extends z.ZodType> {
|
|
5
|
+
/** Public camelCase JSON body. */
|
|
6
|
+
body?: Encodable;
|
|
7
|
+
/** HTTP verb. Defaults to `GET`. */
|
|
8
|
+
method?: "GET" | "POST";
|
|
9
|
+
/** Public camelCase query parameters. */
|
|
10
|
+
query?: Record<string, boolean | number | readonly string[] | string | undefined>;
|
|
11
|
+
/** Schema for the normalized provider response. */
|
|
12
|
+
responseSchema: TSchema;
|
|
13
|
+
}
|
|
14
|
+
/** Structured Krisp REST failure. */
|
|
15
|
+
export declare class KrispApiError extends Error {
|
|
16
|
+
/** Normalized provider error payload, when valid JSON was returned. */
|
|
17
|
+
readonly body?: Encodable;
|
|
18
|
+
/** Retry delay in seconds, when Krisp returned one. */
|
|
19
|
+
readonly retryAfter?: number;
|
|
20
|
+
/** HTTP status returned by Krisp. */
|
|
21
|
+
readonly status: number;
|
|
22
|
+
/**
|
|
23
|
+
* Creates a structured Krisp API error.
|
|
24
|
+
*
|
|
25
|
+
* @param options - Provider status, body, and retry metadata.
|
|
26
|
+
* @param options.body - Normalized provider error body.
|
|
27
|
+
* @param options.retryAfter - Retry delay in seconds.
|
|
28
|
+
* @param options.status - HTTP status.
|
|
29
|
+
*/
|
|
30
|
+
constructor(options: {
|
|
31
|
+
body?: Encodable;
|
|
32
|
+
retryAfter?: number;
|
|
33
|
+
status: number;
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Creates an authenticated Krisp Meeting Assistant REST client.
|
|
38
|
+
*
|
|
39
|
+
* @param secret - Resolved Krisp API-key secret.
|
|
40
|
+
*/
|
|
41
|
+
export declare function getKrispApi(secret: Record<string, unknown>): {
|
|
42
|
+
/**
|
|
43
|
+
* Runs one Krisp request and returns its normalized response.
|
|
44
|
+
*
|
|
45
|
+
* @param path - API path relative to the v1 root.
|
|
46
|
+
* @param options - Method, parameters, and response schema.
|
|
47
|
+
*/
|
|
48
|
+
request<TSchema extends z.ZodType>(path: string, options: KrispRequestOptions<TSchema>): Promise<z.output<TSchema>>;
|
|
49
|
+
};
|
|
50
|
+
/**
|
|
51
|
+
* Converts public camelCase JSON to Krisp wire keys.
|
|
52
|
+
*
|
|
53
|
+
* @param value - Public value to normalize.
|
|
54
|
+
*/
|
|
55
|
+
export declare function toKrisp(value: Encodable): Encodable;
|
|
56
|
+
/**
|
|
57
|
+
* Converts Krisp wire JSON to public camelCase keys.
|
|
58
|
+
*
|
|
59
|
+
* @param value - Provider value to normalize.
|
|
60
|
+
*/
|
|
61
|
+
export declare function fromKrisp(value: unknown): unknown;
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
import { encodableSchema } from "@automate.ax/codec";
|
|
2
|
+
import * as z from "zod";
|
|
3
|
+
const KRISP_API_BASE_URL = "https://meeting-api.krisp.ai/v1/";
|
|
4
|
+
const KRISP_API_ORIGIN = new URL(KRISP_API_BASE_URL).origin;
|
|
5
|
+
const KRISP_SECRET_SCHEMA = z.object({ apiKey: z.string().min(1) });
|
|
6
|
+
/** Structured Krisp REST failure. */
|
|
7
|
+
export class KrispApiError extends Error {
|
|
8
|
+
/** Normalized provider error payload, when valid JSON was returned. */
|
|
9
|
+
body;
|
|
10
|
+
/** Retry delay in seconds, when Krisp returned one. */
|
|
11
|
+
retryAfter;
|
|
12
|
+
/** HTTP status returned by Krisp. */
|
|
13
|
+
status;
|
|
14
|
+
/**
|
|
15
|
+
* Creates a structured Krisp API error.
|
|
16
|
+
*
|
|
17
|
+
* @param options - Provider status, body, and retry metadata.
|
|
18
|
+
* @param options.body - Normalized provider error body.
|
|
19
|
+
* @param options.retryAfter - Retry delay in seconds.
|
|
20
|
+
* @param options.status - HTTP status.
|
|
21
|
+
*/
|
|
22
|
+
constructor(options) {
|
|
23
|
+
super(getErrorMessage(options.body) ??
|
|
24
|
+
`Krisp API request failed with status ${options.status}.`);
|
|
25
|
+
this.name = "KrispApiError";
|
|
26
|
+
this.body = options.body;
|
|
27
|
+
this.retryAfter = options.retryAfter;
|
|
28
|
+
this.status = options.status;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Creates an authenticated Krisp Meeting Assistant REST client.
|
|
33
|
+
*
|
|
34
|
+
* @param secret - Resolved Krisp API-key secret.
|
|
35
|
+
*/
|
|
36
|
+
export function getKrispApi(secret) {
|
|
37
|
+
const { apiKey } = KRISP_SECRET_SCHEMA.parse(secret);
|
|
38
|
+
return {
|
|
39
|
+
/**
|
|
40
|
+
* Runs one Krisp request and returns its normalized response.
|
|
41
|
+
*
|
|
42
|
+
* @param path - API path relative to the v1 root.
|
|
43
|
+
* @param options - Method, parameters, and response schema.
|
|
44
|
+
*/
|
|
45
|
+
async request(path, options) {
|
|
46
|
+
const url = new URL(path.replace(/^\//, ""), KRISP_API_BASE_URL);
|
|
47
|
+
if (url.origin !== KRISP_API_ORIGIN) {
|
|
48
|
+
throw new Error("Krisp API paths must use the Krisp API origin.");
|
|
49
|
+
}
|
|
50
|
+
for (const [name, value] of Object.entries(options.query ?? {})) {
|
|
51
|
+
if (value === undefined)
|
|
52
|
+
continue;
|
|
53
|
+
url.searchParams.set(toSnakeCase(name), Array.isArray(value) ? value.join(",") : String(value));
|
|
54
|
+
}
|
|
55
|
+
const response = await fetch(url, {
|
|
56
|
+
body: options.body === undefined
|
|
57
|
+
? undefined
|
|
58
|
+
: JSON.stringify(toKrisp(options.body)),
|
|
59
|
+
headers: {
|
|
60
|
+
Accept: "application/json",
|
|
61
|
+
Authorization: `Bearer ${apiKey}`,
|
|
62
|
+
...(options.body === undefined
|
|
63
|
+
? {}
|
|
64
|
+
: { "Content-Type": "application/json" }),
|
|
65
|
+
},
|
|
66
|
+
method: options.method ?? "GET",
|
|
67
|
+
});
|
|
68
|
+
const normalized = fromKrisp(parseJson(await response.text()));
|
|
69
|
+
if (!response.ok) {
|
|
70
|
+
const body = encodableSchema.safeParse(normalized);
|
|
71
|
+
throw new KrispApiError({
|
|
72
|
+
...(body.success && { body: body.data }),
|
|
73
|
+
retryAfter: parseFiniteNumber(response.headers.get("Retry-After")),
|
|
74
|
+
status: response.status,
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
return options.responseSchema.parse(normalized);
|
|
78
|
+
},
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Converts public camelCase JSON to Krisp wire keys.
|
|
83
|
+
*
|
|
84
|
+
* @param value - Public value to normalize.
|
|
85
|
+
*/
|
|
86
|
+
export function toKrisp(value) {
|
|
87
|
+
if (value instanceof Date)
|
|
88
|
+
return value.toISOString();
|
|
89
|
+
if (Array.isArray(value))
|
|
90
|
+
return value.map(toKrisp);
|
|
91
|
+
if (!isPlainObject(value))
|
|
92
|
+
return value;
|
|
93
|
+
return Object.fromEntries(Object.entries(value).map(([key, item]) => [
|
|
94
|
+
toSnakeCase(key),
|
|
95
|
+
toKrisp(item),
|
|
96
|
+
]));
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Converts Krisp wire JSON to public camelCase keys.
|
|
100
|
+
*
|
|
101
|
+
* @param value - Provider value to normalize.
|
|
102
|
+
*/
|
|
103
|
+
export function fromKrisp(value) {
|
|
104
|
+
if (Array.isArray(value))
|
|
105
|
+
return value.map(fromKrisp);
|
|
106
|
+
if (!isPlainObject(value))
|
|
107
|
+
return value;
|
|
108
|
+
return Object.fromEntries(Object.entries(value).map(([key, item]) => [
|
|
109
|
+
toCamelCase(key),
|
|
110
|
+
fromKrisp(item),
|
|
111
|
+
]));
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Checks whether a value is a key-value object.
|
|
115
|
+
*
|
|
116
|
+
* @param value - Candidate value.
|
|
117
|
+
*/
|
|
118
|
+
function isPlainObject(value) {
|
|
119
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Parses a JSON response body without obscuring the HTTP status on failure.
|
|
123
|
+
*
|
|
124
|
+
* @param value - Raw response text.
|
|
125
|
+
*/
|
|
126
|
+
function parseJson(value) {
|
|
127
|
+
try {
|
|
128
|
+
return JSON.parse(value);
|
|
129
|
+
}
|
|
130
|
+
catch {
|
|
131
|
+
return undefined;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* Parses an optional finite numeric header.
|
|
136
|
+
*
|
|
137
|
+
* @param value - Raw header value.
|
|
138
|
+
*/
|
|
139
|
+
function parseFiniteNumber(value) {
|
|
140
|
+
if (value === null)
|
|
141
|
+
return undefined;
|
|
142
|
+
const number = Number(value);
|
|
143
|
+
return Number.isFinite(number) ? number : undefined;
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* Extracts Krisp's human-readable error string.
|
|
147
|
+
*
|
|
148
|
+
* @param body - Normalized provider error body.
|
|
149
|
+
*/
|
|
150
|
+
function getErrorMessage(body) {
|
|
151
|
+
return isPlainObject(body) && typeof body.error === "string"
|
|
152
|
+
? body.error
|
|
153
|
+
: undefined;
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* Converts one public camelCase key to Krisp snake_case.
|
|
157
|
+
*
|
|
158
|
+
* @param value - Public key.
|
|
159
|
+
*/
|
|
160
|
+
function toSnakeCase(value) {
|
|
161
|
+
return value.replace(/[A-Z]/g, (letter) => `_${letter.toLowerCase()}`);
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* Converts one Krisp snake_case key to public camelCase.
|
|
165
|
+
*
|
|
166
|
+
* @param value - Provider key.
|
|
167
|
+
*/
|
|
168
|
+
function toCamelCase(value) {
|
|
169
|
+
return value.replace(/_([a-z0-9])/g, (_, letter) => letter.toUpperCase());
|
|
170
|
+
}
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import * as z from "zod";
|
|
2
|
+
import type { Encodable } from "@automate.ax/codec";
|
|
3
|
+
/** Krisp profile represented by a personal API key. */
|
|
4
|
+
export declare const KRISP_PROFILE_SCHEMA: z.ZodObject<{
|
|
5
|
+
avatar: z.ZodPrefault<z.ZodNullable<z.ZodURL>>;
|
|
6
|
+
email: z.ZodEmail;
|
|
7
|
+
firstName: z.ZodPrefault<z.ZodNullable<z.ZodString>>;
|
|
8
|
+
id: z.ZodNumber;
|
|
9
|
+
lastName: z.ZodPrefault<z.ZodNullable<z.ZodString>>;
|
|
10
|
+
teamId: z.ZodNumber;
|
|
11
|
+
workspaceId: z.ZodNumber;
|
|
12
|
+
}, z.core.$strip>;
|
|
13
|
+
/** Calendar attendee or diarized speaker attached to a Krisp meeting. */
|
|
14
|
+
export declare const KRISP_PARTICIPANT_SCHEMA: z.ZodObject<{
|
|
15
|
+
email: z.ZodPrefault<z.ZodNullable<z.ZodString>>;
|
|
16
|
+
firstName: z.ZodPrefault<z.ZodNullable<z.ZodString>>;
|
|
17
|
+
lastName: z.ZodPrefault<z.ZodNullable<z.ZodString>>;
|
|
18
|
+
photo: z.ZodPrefault<z.ZodNullable<z.ZodURL>>;
|
|
19
|
+
status: z.ZodPrefault<z.ZodNullable<z.ZodString>>;
|
|
20
|
+
}, z.core.$strip>;
|
|
21
|
+
/** Meeting metadata returned by Krisp list and detail endpoints. */
|
|
22
|
+
export declare const KRISP_MEETING_SCHEMA: z.ZodObject<{
|
|
23
|
+
duration: z.ZodNullable<z.ZodNumber>;
|
|
24
|
+
id: z.ZodString;
|
|
25
|
+
ownership: z.ZodEnum<{
|
|
26
|
+
shared: "shared";
|
|
27
|
+
owned: "owned";
|
|
28
|
+
}>;
|
|
29
|
+
participants: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
30
|
+
email: z.ZodPrefault<z.ZodNullable<z.ZodString>>;
|
|
31
|
+
firstName: z.ZodPrefault<z.ZodNullable<z.ZodString>>;
|
|
32
|
+
lastName: z.ZodPrefault<z.ZodNullable<z.ZodString>>;
|
|
33
|
+
photo: z.ZodPrefault<z.ZodNullable<z.ZodURL>>;
|
|
34
|
+
status: z.ZodPrefault<z.ZodNullable<z.ZodString>>;
|
|
35
|
+
}, z.core.$strip>>>;
|
|
36
|
+
source: z.ZodNullable<z.ZodString>;
|
|
37
|
+
startedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
38
|
+
status: z.ZodString;
|
|
39
|
+
tags: z.ZodArray<z.ZodString>;
|
|
40
|
+
title: z.ZodString;
|
|
41
|
+
}, z.core.$strip>;
|
|
42
|
+
/** One diarized transcript segment. Times are seconds from recording start. */
|
|
43
|
+
export declare const KRISP_TRANSCRIPT_SEGMENT_SCHEMA: z.ZodObject<{
|
|
44
|
+
end: z.ZodNumber;
|
|
45
|
+
speaker: z.ZodNumber;
|
|
46
|
+
start: z.ZodNumber;
|
|
47
|
+
text: z.ZodString;
|
|
48
|
+
}, z.core.$strip>;
|
|
49
|
+
declare const KRISP_NOTE_ASSIGNEE_SCHEMA: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
|
|
50
|
+
export interface KrispNoteBlock {
|
|
51
|
+
[key: string]: Encodable;
|
|
52
|
+
assignee?: z.output<typeof KRISP_NOTE_ASSIGNEE_SCHEMA> | null;
|
|
53
|
+
children?: KrispNoteBlock[];
|
|
54
|
+
completed?: boolean | null;
|
|
55
|
+
dueDate?: string | null;
|
|
56
|
+
text?: string;
|
|
57
|
+
type: string;
|
|
58
|
+
}
|
|
59
|
+
/** Recursive block returned by Krisp's fixed and custom meeting-note sections. */
|
|
60
|
+
export declare const KRISP_NOTE_BLOCK_SCHEMA: z.ZodType<KrispNoteBlock>;
|
|
61
|
+
/** Complete Krisp meeting detail with optional heavy transcript and note data. */
|
|
62
|
+
export declare const KRISP_MEETING_DETAIL_SCHEMA: z.ZodObject<{
|
|
63
|
+
duration: z.ZodNullable<z.ZodNumber>;
|
|
64
|
+
id: z.ZodString;
|
|
65
|
+
ownership: z.ZodEnum<{
|
|
66
|
+
shared: "shared";
|
|
67
|
+
owned: "owned";
|
|
68
|
+
}>;
|
|
69
|
+
participants: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
70
|
+
email: z.ZodPrefault<z.ZodNullable<z.ZodString>>;
|
|
71
|
+
firstName: z.ZodPrefault<z.ZodNullable<z.ZodString>>;
|
|
72
|
+
lastName: z.ZodPrefault<z.ZodNullable<z.ZodString>>;
|
|
73
|
+
photo: z.ZodPrefault<z.ZodNullable<z.ZodURL>>;
|
|
74
|
+
status: z.ZodPrefault<z.ZodNullable<z.ZodString>>;
|
|
75
|
+
}, z.core.$strip>>>;
|
|
76
|
+
source: z.ZodNullable<z.ZodString>;
|
|
77
|
+
startedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
78
|
+
status: z.ZodString;
|
|
79
|
+
tags: z.ZodArray<z.ZodString>;
|
|
80
|
+
title: z.ZodString;
|
|
81
|
+
language: z.ZodPrefault<z.ZodNullable<z.ZodString>>;
|
|
82
|
+
meetingType: z.ZodPrefault<z.ZodNullable<z.ZodString>>;
|
|
83
|
+
notes: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
84
|
+
blocks: z.ZodArray<z.ZodType<KrispNoteBlock, unknown, z.core.$ZodTypeInternals<KrispNoteBlock, unknown>>>;
|
|
85
|
+
}, z.core.$strip>>>;
|
|
86
|
+
transcript: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
87
|
+
language: z.ZodPrefault<z.ZodNullable<z.ZodString>>;
|
|
88
|
+
segments: z.ZodPrefault<z.ZodArray<z.ZodObject<{
|
|
89
|
+
end: z.ZodNumber;
|
|
90
|
+
speaker: z.ZodNumber;
|
|
91
|
+
start: z.ZodNumber;
|
|
92
|
+
text: z.ZodString;
|
|
93
|
+
}, z.core.$strip>>>;
|
|
94
|
+
speakers: z.ZodPrefault<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
95
|
+
email: z.ZodPrefault<z.ZodNullable<z.ZodString>>;
|
|
96
|
+
firstName: z.ZodPrefault<z.ZodNullable<z.ZodString>>;
|
|
97
|
+
lastName: z.ZodPrefault<z.ZodNullable<z.ZodString>>;
|
|
98
|
+
photo: z.ZodPrefault<z.ZodNullable<z.ZodURL>>;
|
|
99
|
+
status: z.ZodPrefault<z.ZodNullable<z.ZodString>>;
|
|
100
|
+
}, z.core.$strip>>>;
|
|
101
|
+
}, z.core.$strip>>>;
|
|
102
|
+
}, z.core.$strip>;
|
|
103
|
+
/** One action item extracted from a Krisp meeting. */
|
|
104
|
+
export declare const KRISP_ACTION_ITEM_SCHEMA: z.ZodObject<{
|
|
105
|
+
assignee: z.ZodPrefault<z.ZodNullable<z.ZodObject<{
|
|
106
|
+
email: z.ZodPrefault<z.ZodNullable<z.ZodString>>;
|
|
107
|
+
firstName: z.ZodPrefault<z.ZodNullable<z.ZodString>>;
|
|
108
|
+
lastName: z.ZodPrefault<z.ZodNullable<z.ZodString>>;
|
|
109
|
+
photo: z.ZodPrefault<z.ZodNullable<z.ZodURL>>;
|
|
110
|
+
status: z.ZodPrefault<z.ZodNullable<z.ZodString>>;
|
|
111
|
+
}, z.core.$strip>>>;
|
|
112
|
+
completed: z.ZodPrefault<z.ZodNullable<z.ZodBoolean>>;
|
|
113
|
+
dueDate: z.ZodPrefault<z.ZodNullable<z.ZodString>>;
|
|
114
|
+
id: z.ZodString;
|
|
115
|
+
meetingId: z.ZodString;
|
|
116
|
+
meetingStartedAt: z.ZodPrefault<z.ZodNullable<z.ZodISODateTime>>;
|
|
117
|
+
meetingTitle: z.ZodString;
|
|
118
|
+
title: z.ZodString;
|
|
119
|
+
}, z.core.$strip>;
|
|
120
|
+
/** Tag used to organize Krisp meetings. */
|
|
121
|
+
export declare const KRISP_TAG_SCHEMA: z.ZodObject<{
|
|
122
|
+
color: z.ZodNullable<z.ZodString>;
|
|
123
|
+
createdAt: z.ZodISODateTime;
|
|
124
|
+
id: z.ZodString;
|
|
125
|
+
name: z.ZodString;
|
|
126
|
+
}, z.core.$strip>;
|
|
127
|
+
/** Recording-import identity returned after Krisp issues an upload URL. */
|
|
128
|
+
export declare const KRISP_IMPORT_SCHEMA: z.ZodObject<{
|
|
129
|
+
expiresAt: z.ZodISODateTime;
|
|
130
|
+
importId: z.ZodString;
|
|
131
|
+
url: z.ZodURL;
|
|
132
|
+
}, z.core.$strip>;
|
|
133
|
+
/** Current processing state for a Krisp recording import. */
|
|
134
|
+
export declare const KRISP_IMPORT_STATUS_SCHEMA: z.ZodObject<{
|
|
135
|
+
error: z.ZodPrefault<z.ZodNullable<z.ZodString>>;
|
|
136
|
+
importId: z.ZodString;
|
|
137
|
+
meetingId: z.ZodPrefault<z.ZodNullable<z.ZodString>>;
|
|
138
|
+
status: z.ZodEnum<{
|
|
139
|
+
failed: "failed";
|
|
140
|
+
ready: "ready";
|
|
141
|
+
uploading: "uploading";
|
|
142
|
+
processing: "processing";
|
|
143
|
+
}>;
|
|
144
|
+
}, z.core.$strip>;
|
|
145
|
+
export {};
|