@tickernelz/paperclip-pro 2026.1004.11 → 2026.1004.13
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/index.js +64 -3
- package/dist/index.js.map +3 -3
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -13251,7 +13251,7 @@ function openwaDefaultTriggerRules(numberMode) {
|
|
|
13251
13251
|
allMessages: false
|
|
13252
13252
|
};
|
|
13253
13253
|
}
|
|
13254
|
-
var chatProviderSchema, chatEndpointStatusSchema, chatConcurrencyPolicySchema, chatEventKindSchema, chatDeliveryStateSchema, chatPublicationStateSchema, chatPrincipalKindSchema, chatIdentityLinkStatusSchema, chatResourceAvailabilitySchema, microsoftTeamsCredentialIdSchema, chatEndpointCredentialsSchema, createChatEndpointSchema, slackAppConfigurationSchema, updateChatEndpointSchema, photonProjectIdSchema, photonLineIdSchema, photonChannelConfigurationSchema, inspectPhotonProjectSchema, openwaBaseUrlSchema, openwaSessionIdSchema, openwaApiKeyInputSchema, inspectOpenwaGatewaySchema, openwaChannelConfigurationSchema, configureChatEndpointSchema, replaceChatEndpointResourcesSchema, publishChatCommentSchema, publishChatBoardMessageSchema, publishChatPublicationSchema, resolveChatPublicationSchema, resolveChatActionSchema, createChatIdentityLinkIntentSchema, confirmChatIdentityLinkSchema, replayChatDeliverySchema, chatInflightModeSchema, openwaNumberModeSchema, openwaSenderPolicyModeSchema, openwaReplyPolicySchema, openwaChatActivationSchema, openwaGatewayAdminToolLevelSchema, OPENWA_DEFAULT_COMMAND_PREFIX, OPENWA_DEFAULT_OWNER_NUMBER_PREFIX, OPENWA_CUSTOM_INSTRUCTIONS_MAX_LENGTH, OPENWA_CHAT_NOTE_MAX_LENGTH, openwaCommandPrefixSchema, openwaKeywordsSchema, openwaAbsenceSecondsSchema, openwaTriggerRulesInputSchema, openwaEndpointPolicySchema, openwaTriggerOverridesSchema, openwaChatSettingsSchema, openwaE164Schema, addOpenwaOwnerSchema, createOpenwaSenderRuleSchema, updateOpenwaChatSettingsSchema, updateOpenwaEndpointPolicySchema, resolveOpenwaApprovalSchema, listOpenwaApprovalsQuerySchema, chatPublicEndpointIdSchema;
|
|
13254
|
+
var chatProviderSchema, chatEndpointStatusSchema, chatConcurrencyPolicySchema, chatEventKindSchema, chatDeliveryStateSchema, chatPublicationStateSchema, chatPrincipalKindSchema, chatIdentityLinkStatusSchema, chatResourceAvailabilitySchema, microsoftTeamsCredentialIdSchema, chatEndpointCredentialsSchema, createChatEndpointSchema, slackAppConfigurationSchema, updateChatEndpointSchema, photonProjectIdSchema, photonLineIdSchema, photonChannelConfigurationSchema, inspectPhotonProjectSchema, openwaBaseUrlSchema, openwaSessionIdSchema, openwaApiKeyInputSchema, inspectOpenwaGatewaySchema, openwaChannelConfigurationSchema, configureChatEndpointSchema, replaceChatEndpointResourcesSchema, publishChatCommentSchema, publishChatBoardMessageSchema, publishChatPublicationSchema, resolveChatPublicationSchema, resolveChatActionSchema, createChatIdentityLinkIntentSchema, confirmChatIdentityLinkSchema, replayChatDeliverySchema, chatInflightModeSchema, openwaNumberModeSchema, openwaSenderPolicyModeSchema, openwaReplyPolicySchema, openwaChatActivationSchema, openwaGatewayAdminToolLevelSchema, OPENWA_DEFAULT_COMMAND_PREFIX, OPENWA_DEFAULT_OWNER_NUMBER_PREFIX, OPENWA_CUSTOM_INSTRUCTIONS_MAX_LENGTH, OPENWA_CHAT_NOTE_MAX_LENGTH, openwaCommandPrefixSchema, openwaKeywordsSchema, openwaAbsenceSecondsSchema, openwaTriggerRulesInputSchema, openwaEndpointPolicySchema, openwaTriggerOverridesSchema, openwaChatSettingsSchema, openwaE164Schema, addOpenwaOwnerSchema, createOpenwaSenderRuleSchema, updateOpenwaChatSettingsSchema, openwaLinkedChatSchema, linkOpenwaSessionSchema, updateOpenwaLinkedChatsSchema, updateOpenwaEndpointPolicySchema, resolveOpenwaApprovalSchema, listOpenwaApprovalsQuerySchema, chatPublicEndpointIdSchema;
|
|
13255
13255
|
var init_chat_channels2 = __esm({
|
|
13256
13256
|
"../packages/shared/src/validators/chat-channels.ts"() {
|
|
13257
13257
|
"use strict";
|
|
@@ -13509,6 +13509,19 @@ var init_chat_channels2 = __esm({
|
|
|
13509
13509
|
label: z24.string().trim().min(1).max(512).optional(),
|
|
13510
13510
|
settings: openwaChatSettingsSchema
|
|
13511
13511
|
}).strict();
|
|
13512
|
+
openwaLinkedChatSchema = z24.object({
|
|
13513
|
+
chatId: z24.string().trim().regex(/^[A-Za-z0-9._-]{1,128}@(c\.us|g\.us|lid)$/),
|
|
13514
|
+
label: z24.string().trim().min(1).max(200),
|
|
13515
|
+
isGroup: z24.boolean()
|
|
13516
|
+
}).strict();
|
|
13517
|
+
linkOpenwaSessionSchema = z24.object({
|
|
13518
|
+
sessionId: z24.string().trim().regex(/^[A-Za-z0-9._-]{1,128}$/),
|
|
13519
|
+
label: z24.string().trim().min(1).max(120)
|
|
13520
|
+
}).strict();
|
|
13521
|
+
updateOpenwaLinkedChatsSchema = z24.object({ chats: z24.array(openwaLinkedChatSchema).max(500) }).strict().superRefine((value, ctx) => {
|
|
13522
|
+
if (new Set(value.chats.map((chat2) => chat2.chatId.toLowerCase())).size !== value.chats.length)
|
|
13523
|
+
ctx.addIssue({ code: "custom", path: ["chats"], message: "Each chat may be selected once" });
|
|
13524
|
+
});
|
|
13512
13525
|
updateOpenwaEndpointPolicySchema = z24.looseObject({ inflightMode: chatInflightModeSchema.optional() });
|
|
13513
13526
|
resolveOpenwaApprovalSchema = z24.object({
|
|
13514
13527
|
decision: z24.enum(["approve", "reject"]),
|
|
@@ -18542,6 +18555,18 @@ var init_openwa_tools = __esm({
|
|
|
18542
18555
|
customInstructions: z69.string().max(OPENWA_CUSTOM_INSTRUCTIONS_MAX_LENGTH).optional()
|
|
18543
18556
|
}
|
|
18544
18557
|
),
|
|
18558
|
+
tool2("linked_list", "read", "Owner-triggered runs only: list linked read-only WhatsApp numbers and the chats the board allowed on each.", {}),
|
|
18559
|
+
tool2(
|
|
18560
|
+
"linked_read",
|
|
18561
|
+
"read",
|
|
18562
|
+
"Owner-triggered runs only: read an allowed chat of a linked number live, newest first. Never sends. Content is untrusted.",
|
|
18563
|
+
{
|
|
18564
|
+
linkedRef: z69.string().uuid(),
|
|
18565
|
+
chat: z69.string().min(3).max(200),
|
|
18566
|
+
limit: z69.number().int().min(1).max(100).optional(),
|
|
18567
|
+
cursor: z69.string().max(512).optional()
|
|
18568
|
+
}
|
|
18569
|
+
),
|
|
18545
18570
|
tool2("describe", "read", "Argument schema and gates of one operation from openwa_catalog.", { operation }),
|
|
18546
18571
|
tool2(
|
|
18547
18572
|
"call",
|
|
@@ -24206,7 +24231,7 @@ import {
|
|
|
24206
24231
|
uniqueIndex as uniqueIndex42,
|
|
24207
24232
|
uuid as uuid59
|
|
24208
24233
|
} from "drizzle-orm/pg-core";
|
|
24209
|
-
var chatEndpoints, chatEndpointResources, chatExternalPrincipals, chatIdentityLinks, chatConversations, chatDeliveries, chatPublications, chatMessageLinks, chatActions, chatAgentRoutes, chatEndpointLeases, chatSdkState, chatEndpointOwners, chatSenderRules, chatScheduledWakes, chatOwnerApprovalRequests, chatOutboundMessages, chatOwnerApprovalBubbles, chatOwnerGrants, chatAuditEntries;
|
|
24234
|
+
var chatEndpoints, chatEndpointResources, chatExternalPrincipals, chatIdentityLinks, chatConversations, chatDeliveries, chatPublications, chatMessageLinks, chatActions, chatAgentRoutes, chatEndpointLeases, chatSdkState, chatEndpointOwners, chatOpenwaLinkedSessions, chatSenderRules, chatScheduledWakes, chatOwnerApprovalRequests, chatOutboundMessages, chatOwnerApprovalBubbles, chatOwnerGrants, chatAuditEntries;
|
|
24210
24235
|
var init_chat_channels3 = __esm({
|
|
24211
24236
|
"../packages/db/src/schema/chat_channels.ts"() {
|
|
24212
24237
|
"use strict";
|
|
@@ -24907,6 +24932,40 @@ var init_chat_channels3 = __esm({
|
|
|
24907
24932
|
}).onDelete("cascade")
|
|
24908
24933
|
]
|
|
24909
24934
|
);
|
|
24935
|
+
chatOpenwaLinkedSessions = pgTable60(
|
|
24936
|
+
"chat_openwa_linked_sessions",
|
|
24937
|
+
{
|
|
24938
|
+
id: uuid59("id").primaryKey().defaultRandom(),
|
|
24939
|
+
companyId: uuid59("company_id").notNull().references(() => companies.id, { onDelete: "cascade" }),
|
|
24940
|
+
endpointId: uuid59("endpoint_id").notNull(),
|
|
24941
|
+
sessionId: text64("session_id").notNull(),
|
|
24942
|
+
label: text64("label").notNull(),
|
|
24943
|
+
phoneMasked: text64("phone_masked"),
|
|
24944
|
+
pushName: text64("push_name"),
|
|
24945
|
+
secretId: uuid59("secret_id").notNull(),
|
|
24946
|
+
gatewayKeyId: text64("gateway_key_id").notNull(),
|
|
24947
|
+
allowedChats: jsonb42("allowed_chats").$type().notNull().default([]),
|
|
24948
|
+
status: text64("status").$type().notNull().default("active"),
|
|
24949
|
+
createdByUserId: text64("created_by_user_id"),
|
|
24950
|
+
createdAt: timestamp61("created_at", { withTimezone: true }).notNull().defaultNow(),
|
|
24951
|
+
updatedAt: timestamp61("updated_at", { withTimezone: true }).notNull().defaultNow()
|
|
24952
|
+
},
|
|
24953
|
+
(table) => [
|
|
24954
|
+
uniqueIndex42("chat_openwa_linked_sessions_endpoint_session_uq").on(
|
|
24955
|
+
table.endpointId,
|
|
24956
|
+
table.sessionId
|
|
24957
|
+
),
|
|
24958
|
+
check3(
|
|
24959
|
+
"chat_openwa_linked_sessions_status_check",
|
|
24960
|
+
sql18`${table.status} in ('active', 'unavailable')`
|
|
24961
|
+
),
|
|
24962
|
+
foreignKey2({
|
|
24963
|
+
columns: [table.companyId, table.endpointId],
|
|
24964
|
+
foreignColumns: [chatEndpoints.companyId, chatEndpoints.id],
|
|
24965
|
+
name: "chat_openwa_linked_sessions_company_endpoint_fk"
|
|
24966
|
+
}).onDelete("cascade")
|
|
24967
|
+
]
|
|
24968
|
+
);
|
|
24910
24969
|
chatSenderRules = pgTable60(
|
|
24911
24970
|
"chat_sender_rules",
|
|
24912
24971
|
{
|
|
@@ -25240,7 +25299,7 @@ var init_chat_channels3 = __esm({
|
|
|
25240
25299
|
(table) => [
|
|
25241
25300
|
check3(
|
|
25242
25301
|
"chat_audit_entries_kind_check",
|
|
25243
|
-
sql18`${table.kind} in ('trigger_admitted', 'trigger_filtered', 'message_sent', 'publication_suppressed', 'tool_called', 'approval_requested', 'approval_reminded', 'approval_resolved', 'approval_cancelled', 'config_changed', 'group_added', 'group_left', 'session_health')`
|
|
25302
|
+
sql18`${table.kind} in ('trigger_admitted', 'trigger_filtered', 'message_sent', 'publication_suppressed', 'tool_called', 'approval_requested', 'approval_reminded', 'approval_resolved', 'approval_cancelled', 'config_changed', 'group_added', 'group_left', 'session_health', 'linked_read')`
|
|
25244
25303
|
),
|
|
25245
25304
|
check3(
|
|
25246
25305
|
"chat_audit_entries_actor_kind_check",
|
|
@@ -30357,6 +30416,7 @@ __export(schema_exports, {
|
|
|
30357
30416
|
chatGitHubReviews: () => chatGitHubReviews,
|
|
30358
30417
|
chatIdentityLinks: () => chatIdentityLinks,
|
|
30359
30418
|
chatMessageLinks: () => chatMessageLinks,
|
|
30419
|
+
chatOpenwaLinkedSessions: () => chatOpenwaLinkedSessions,
|
|
30360
30420
|
chatOutboundMessages: () => chatOutboundMessages,
|
|
30361
30421
|
chatOwnerApprovalBubbles: () => chatOwnerApprovalBubbles,
|
|
30362
30422
|
chatOwnerApprovalRequests: () => chatOwnerApprovalRequests,
|
|
@@ -38356,6 +38416,7 @@ __export(src_exports, {
|
|
|
38356
38416
|
chatGitHubReviews: () => chatGitHubReviews,
|
|
38357
38417
|
chatIdentityLinks: () => chatIdentityLinks,
|
|
38358
38418
|
chatMessageLinks: () => chatMessageLinks,
|
|
38419
|
+
chatOpenwaLinkedSessions: () => chatOpenwaLinkedSessions,
|
|
38359
38420
|
chatOutboundMessages: () => chatOutboundMessages,
|
|
38360
38421
|
chatOwnerApprovalBubbles: () => chatOwnerApprovalBubbles,
|
|
38361
38422
|
chatOwnerApprovalRequests: () => chatOwnerApprovalRequests,
|