@lssm/module.notifications 0.0.0-canary-20251207012602 → 0.0.0-canary-20251207043720
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/contracts/index.js +1 -1
- package/dist/entities/index.js +1 -1
- package/package.json +15 -7
- package/dist/channels/index.d.ts +0 -106
- package/dist/contracts/index.d.ts +0 -637
- package/dist/entities/index.d.ts +0 -182
- package/dist/index.d.ts +0 -5
- package/dist/libs/contracts/dist/capabilities/openbanking.js +0 -1
- package/dist/libs/contracts/dist/client/index.js +0 -1
- package/dist/libs/contracts/dist/client/react/feature-render.js +0 -1
- package/dist/libs/contracts/dist/client/react/form-render.js +0 -1
- package/dist/libs/contracts/dist/client/react/index.js +0 -1
- package/dist/libs/contracts/dist/events.js +0 -1
- package/dist/libs/contracts/dist/experiments/evaluator.js +0 -1
- package/dist/libs/contracts/dist/graphql-federation/dist/index.js +0 -1
- package/dist/libs/contracts/dist/index.js +0 -1
- package/dist/libs/contracts/dist/install.js +0 -1
- package/dist/libs/contracts/dist/integrations/contracts.js +0 -1
- package/dist/libs/contracts/dist/integrations/index.js +0 -1
- package/dist/libs/contracts/dist/integrations/openbanking/contracts/accounts.js +0 -1
- package/dist/libs/contracts/dist/integrations/openbanking/contracts/balances.js +0 -1
- package/dist/libs/contracts/dist/integrations/openbanking/contracts/index.js +0 -1
- package/dist/libs/contracts/dist/integrations/openbanking/contracts/transactions.js +0 -1
- package/dist/libs/contracts/dist/integrations/openbanking/models.js +0 -1
- package/dist/libs/contracts/dist/integrations/openbanking/telemetry.js +0 -1
- package/dist/libs/contracts/dist/integrations/providers/elevenlabs.js +0 -1
- package/dist/libs/contracts/dist/integrations/providers/gcs-storage.js +0 -1
- package/dist/libs/contracts/dist/integrations/providers/gmail.js +0 -1
- package/dist/libs/contracts/dist/integrations/providers/google-calendar.js +0 -1
- package/dist/libs/contracts/dist/integrations/providers/impls/elevenlabs-voice.js +0 -1
- package/dist/libs/contracts/dist/integrations/providers/impls/gcs-storage.js +0 -1
- package/dist/libs/contracts/dist/integrations/providers/impls/gmail-inbound.js +0 -1
- package/dist/libs/contracts/dist/integrations/providers/impls/gmail-outbound.js +0 -1
- package/dist/libs/contracts/dist/integrations/providers/impls/google-calendar.js +0 -1
- package/dist/libs/contracts/dist/integrations/providers/impls/index.js +0 -1
- package/dist/libs/contracts/dist/integrations/providers/impls/mistral-embedding.js +0 -1
- package/dist/libs/contracts/dist/integrations/providers/impls/mistral-llm.js +0 -1
- package/dist/libs/contracts/dist/integrations/providers/impls/postmark-email.js +0 -1
- package/dist/libs/contracts/dist/integrations/providers/impls/powens-client.js +0 -1
- package/dist/libs/contracts/dist/integrations/providers/impls/powens-openbanking.js +0 -1
- package/dist/libs/contracts/dist/integrations/providers/impls/provider-factory.js +0 -1
- package/dist/libs/contracts/dist/integrations/providers/impls/qdrant-vector.js +0 -1
- package/dist/libs/contracts/dist/integrations/providers/impls/stripe-payments.js +0 -1
- package/dist/libs/contracts/dist/integrations/providers/impls/twilio-sms.js +0 -1
- package/dist/libs/contracts/dist/integrations/providers/index.js +0 -1
- package/dist/libs/contracts/dist/integrations/providers/mistral.js +0 -1
- package/dist/libs/contracts/dist/integrations/providers/postmark.js +0 -1
- package/dist/libs/contracts/dist/integrations/providers/powens.js +0 -1
- package/dist/libs/contracts/dist/integrations/providers/qdrant.js +0 -1
- package/dist/libs/contracts/dist/integrations/providers/stripe.js +0 -1
- package/dist/libs/contracts/dist/integrations/providers/twilio-sms.js +0 -1
- package/dist/libs/contracts/dist/integrations/runtime.js +0 -1
- package/dist/libs/contracts/dist/integrations/secrets/env-secret-provider.js +0 -1
- package/dist/libs/contracts/dist/integrations/secrets/gcp-secret-manager.js +0 -1
- package/dist/libs/contracts/dist/integrations/secrets/index.js +0 -1
- package/dist/libs/contracts/dist/integrations/secrets/manager.js +0 -1
- package/dist/libs/contracts/dist/integrations/secrets/provider.js +0 -1
- package/dist/libs/contracts/dist/jsonschema.js +0 -1
- package/dist/libs/contracts/dist/knowledge/contracts.js +0 -1
- package/dist/libs/contracts/dist/knowledge/index.js +0 -1
- package/dist/libs/contracts/dist/knowledge/spaces/email-threads.js +0 -1
- package/dist/libs/contracts/dist/knowledge/spaces/financial-docs.js +0 -1
- package/dist/libs/contracts/dist/knowledge/spaces/financial-overview.js +0 -1
- package/dist/libs/contracts/dist/knowledge/spaces/index.js +0 -1
- package/dist/libs/contracts/dist/knowledge/spaces/product-canon.js +0 -1
- package/dist/libs/contracts/dist/knowledge/spaces/support-faq.js +0 -1
- package/dist/libs/contracts/dist/knowledge/spaces/uploaded-docs.js +0 -1
- package/dist/libs/contracts/dist/onboarding-base.js +0 -1
- package/dist/libs/contracts/dist/ownership.js +0 -1
- package/dist/libs/contracts/dist/presentations.js +0 -1
- package/dist/libs/contracts/dist/presentations.v2.js +0 -1
- package/dist/libs/contracts/dist/prompt.js +0 -1
- package/dist/libs/contracts/dist/promptRegistry.js +0 -1
- package/dist/libs/contracts/dist/regenerator/index.js +0 -1
- package/dist/libs/contracts/dist/regenerator/service.js +0 -1
- package/dist/libs/contracts/dist/registry.js +0 -1
- package/dist/libs/contracts/dist/resources.js +0 -1
- package/dist/libs/contracts/dist/schema/dist/EnumType.js +0 -1
- package/dist/libs/contracts/dist/schema/dist/FieldType.js +0 -1
- package/dist/libs/contracts/dist/schema/dist/ScalarTypeEnum.js +0 -1
- package/dist/libs/contracts/dist/schema/dist/SchemaModel.js +0 -1
- package/dist/libs/contracts/dist/schema/dist/entity/defineEntity.js +0 -1
- package/dist/libs/contracts/dist/schema/dist/entity/index.js +0 -1
- package/dist/libs/contracts/dist/schema/dist/entity/types.js +0 -1
- package/dist/libs/contracts/dist/schema/dist/index.js +0 -1
- package/dist/libs/contracts/dist/server/graphql-pothos.js +0 -1
- package/dist/libs/contracts/dist/server/graphql-schema-export.js +0 -1
- package/dist/libs/contracts/dist/server/index.js +0 -1
- package/dist/libs/contracts/dist/server/provider-mcp.js +0 -1
- package/dist/libs/contracts/dist/server/rest-elysia.js +0 -1
- package/dist/libs/contracts/dist/server/rest-express.js +0 -1
- package/dist/libs/contracts/dist/server/rest-generic.js +0 -1
- package/dist/libs/contracts/dist/server/rest-next-app.js +0 -1
- package/dist/libs/contracts/dist/server/rest-next-pages.js +0 -1
- package/dist/libs/contracts/dist/spec.js +0 -1
- package/dist/libs/contracts/dist/telemetry/index.js +0 -1
- package/dist/libs/contracts/dist/telemetry/tracker.js +0 -1
- package/dist/libs/contracts/dist/tests/index.js +0 -1
- package/dist/libs/contracts/dist/tests/runner.js +0 -1
- package/dist/libs/contracts/dist/workflow/index.js +0 -1
- package/dist/libs/contracts/dist/workflow/runner.js +0 -1
- package/dist/libs/schema/dist/EnumType.js +0 -1
- package/dist/libs/schema/dist/FieldType.js +0 -1
- package/dist/libs/schema/dist/ScalarTypeEnum.js +0 -1
- package/dist/libs/schema/dist/SchemaModel.js +0 -1
- package/dist/libs/schema/dist/entity/defineEntity.js +0 -1
- package/dist/libs/schema/dist/entity/index.js +0 -1
- package/dist/libs/schema/dist/entity/types.js +0 -1
- package/dist/libs/schema/dist/index.js +0 -1
- package/dist/templates/index.d.ts +0 -91
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./runner.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"../index.js";import"node:assert";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./runner.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"node:crypto";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{z as e}from"zod";import{GraphQLEnumType as t}from"graphql";var n=class{name;values;gqlEnum;constructor(e,n){this.name=e,this.values=n,this.gqlEnum=new t({name:this.name,values:Object.fromEntries(n.map(e=>[e,{value:e}]))})}getName(){return this.name}getEnumValues(){return this.values}getPothos(){return this.gqlEnum}getZod(){return e.enum(this.values)}getJson(){return{type:`string`,enum:this.values}}getJsonSchema(){return this.getJson()}};const r=(e,t)=>new n(e,t);export{n,r};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{z as e}from"zod";import{GraphQLScalarType as t}from"graphql";var n=class extends t{zodSchema;jsonSchemaDef;constructor(e){super(e),this.zodSchema=e.zod,this.jsonSchemaDef=e.jsonSchema}getZod(){return this.zodSchema}getPothos(){return this}getJson(){return typeof this.jsonSchemaDef==`function`?this.jsonSchemaDef():this.jsonSchemaDef}getJsonSchemaDef(){return this.jsonSchemaDef}getJsonSchema(){let e=t=>{let n=typeof t==`function`?t():t;if(Array.isArray(n))return n.map(t=>e(t));if(n&&typeof n==`object`){let t={};for(let[r,i]of Object.entries(n))t[r]=e(i);return t}return n};return e(this.getJson())}};export{n};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e}from"./FieldType.js";import{z as t}from"zod";import{Kind as n}from"graphql";const r=/^[A-Za-z]{2}(?:-[A-Za-z0-9]{2,8})*$/,i=/^(?:UTC|[A-Za-z_]+\/[A-Za-z_]+)$/,a=/^[+]?\d[\d\s().-]{3,}$/,o=/^[A-Z]{3}$/,s=/^[A-Z]{2}$/,c=-180,l={String_unsecure:()=>new e({name:`String_unsecure`,description:`Unvalidated string scalar`,zod:t.string(),parseValue:e=>t.string().parse(e),serialize:e=>String(e),parseLiteral:e=>{if(e.kind!==n.STRING)throw TypeError(`Invalid literal`);return e.value},jsonSchema:{type:`string`}}),Int_unsecure:()=>new e({name:`Int_unsecure`,description:`Unvalidated integer scalar`,zod:t.number().int(),parseValue:e=>{let n=typeof e==`number`?e:Number(e);return t.number().int().parse(n)},serialize:e=>Math.trunc(typeof e==`number`?e:Number(e)),parseLiteral:e=>{if(e.kind!==n.INT)throw TypeError(`Invalid literal`);return Number(e.value)},jsonSchema:{type:`integer`}}),Float_unsecure:()=>new e({name:`Float_unsecure`,description:`Unvalidated float scalar`,zod:t.number(),parseValue:e=>{let n=typeof e==`number`?e:Number(e);return t.number().parse(n)},serialize:e=>Number(e),parseLiteral:e=>{if(e.kind!==n.FLOAT&&e.kind!==n.INT)throw TypeError(`Invalid literal`);return Number(e.value)},jsonSchema:{type:`number`}}),Boolean:()=>new e({name:`Boolean`,description:`Unvalidated boolean scalar`,zod:t.boolean(),parseValue:e=>t.coerce.boolean().parse(e),serialize:e=>!!e,parseLiteral:e=>{if(e.kind!==n.BOOLEAN)throw TypeError(`Invalid literal`);return e.value},jsonSchema:{type:`boolean`}}),ID:()=>new e({name:`ID`,description:`Unvalidated id scalar`,zod:t.string(),parseValue:e=>t.string().parse(e),serialize:e=>String(e),parseLiteral:e=>{if(e.kind!==n.STRING)throw TypeError(`Invalid literal`);return e.value},jsonSchema:{type:`string`}}),JSON:()=>new e({name:`JSON`,zod:t.any(),parseValue:e=>e,serialize:e=>e,jsonSchema:{}}),JSONObject:()=>new e({name:`JSONObject`,zod:t.record(t.string(),t.any()),parseValue:e=>t.record(t.string(),t.any()).parse(e),serialize:e=>e??{},jsonSchema:{type:`object`}}),Date:()=>new e({name:`Date`,zod:t.date(),parseValue:e=>e instanceof Date?e:new Date(String(e)),serialize:e=>e instanceof Date?e.toISOString().split(`T`)[0]:String(e),jsonSchema:{type:`string`,format:`date`}}),DateTime:()=>new e({name:`DateTime`,zod:t.date(),parseValue:e=>e instanceof Date?e:new Date(String(e)),serialize:e=>e instanceof Date?e.toISOString():String(e),jsonSchema:{type:`string`,format:`date-time`}}),Time:()=>new e({name:`Time`,zod:t.string().regex(/^\d{2}:\d{2}(:\d{2})?$/),parseValue:e=>t.string().regex(/^\d{2}:\d{2}(:\d{2})?$/).parse(e),serialize:e=>String(e),jsonSchema:{type:`string`,pattern:`^\\d{2}:\\d{2}(:\\d{2})?$`}}),EmailAddress:()=>new e({name:`EmailAddress`,zod:t.string().email(),parseValue:e=>t.string().email().parse(e),serialize:e=>String(e),jsonSchema:{type:`string`,format:`email`}}),URL:()=>new e({name:`URL`,zod:t.string().url(),parseValue:e=>t.string().url().parse(e),serialize:e=>String(e),jsonSchema:{type:`string`,format:`uri`}}),PhoneNumber:()=>new e({name:`PhoneNumber`,zod:t.string().regex(a),parseValue:e=>t.string().regex(a).parse(e),serialize:e=>String(e),jsonSchema:{type:`string`,pattern:a.source}}),NonEmptyString:()=>new e({name:`NonEmptyString`,zod:t.string().min(1),parseValue:e=>t.string().min(1).parse(e),serialize:e=>String(e),jsonSchema:{type:`string`,minLength:1}}),Locale:()=>new e({name:`Locale`,zod:t.string().regex(r),parseValue:e=>t.string().regex(r).parse(e),serialize:e=>String(e),jsonSchema:{type:`string`,pattern:r.source}}),TimeZone:()=>new e({name:`TimeZone`,zod:t.string().regex(i),parseValue:e=>t.string().regex(i).parse(e),serialize:e=>String(e),jsonSchema:{type:`string`,pattern:i.source}}),Latitude:()=>new e({name:`Latitude`,zod:t.number().min(-90).max(90),parseValue:e=>t.coerce.number().min(-90).max(90).parse(e),serialize:e=>Number(e),jsonSchema:{type:`number`,minimum:-90,maximum:90}}),Longitude:()=>new e({name:`Longitude`,zod:t.number().min(c).max(180),parseValue:e=>t.coerce.number().min(c).max(180).parse(e),serialize:e=>Number(e),jsonSchema:{type:`number`,minimum:c,maximum:180}}),Currency:()=>new e({name:`Currency`,zod:t.string().regex(o),parseValue:e=>t.string().regex(o).parse(e),serialize:e=>String(e),jsonSchema:{type:`string`,pattern:o.source}}),CountryCode:()=>new e({name:`CountryCode`,zod:t.string().regex(s),parseValue:e=>t.string().regex(s).parse(e),serialize:e=>String(e),jsonSchema:{type:`string`,pattern:s.source}})};export{l};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./EnumType.js";import"./FieldType.js";import{z as e}from"zod";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{z as e}from"zod";function t(e){return e}function n(e){return e}const r={string(e){return{kind:`scalar`,type:`String`,...e}},int(e){return{kind:`scalar`,type:`Int`,...e}},float(e){return{kind:`scalar`,type:`Float`,...e}},boolean(e){return{kind:`scalar`,type:`Boolean`,...e}},dateTime(e){return{kind:`scalar`,type:`DateTime`,...e}},json(e){return{kind:`scalar`,type:`Json`,...e}},bigInt(e){return{kind:`scalar`,type:`BigInt`,...e}},decimal(e){return{kind:`scalar`,type:`Decimal`,...e}},bytes(e){return{kind:`scalar`,type:`Bytes`,...e}},id(e){return{kind:`scalar`,type:`String`,isId:!0,default:`cuid()`,...e}},uuid(e){return{kind:`scalar`,type:`String`,isId:!0,default:`uuid()`,...e}},autoIncrement(e){return{kind:`scalar`,type:`Int`,isId:!0,default:`autoincrement()`,...e}},createdAt(e){return{kind:`scalar`,type:`DateTime`,default:`now()`,...e}},updatedAt(e){return{kind:`scalar`,type:`DateTime`,updatedAt:!0,...e}},email(t){return{kind:`scalar`,type:`String`,zod:e.email(),...t}},url(t){return{kind:`scalar`,type:`String`,zod:e.url(),...t}},enum(e,t){return{kind:`enum`,enumName:e,...t}},inlineEnum(e,t,n){return{kind:`enum`,enumName:e,values:t,...n}},hasOne(e,t){return{kind:`relation`,type:`hasOne`,target:e,...t}},hasMany(e,t){return{kind:`relation`,type:`hasMany`,target:e,...t}},belongsTo(e,t,n,r){return{kind:`relation`,type:`belongsTo`,target:e,fields:t,references:n,...r}},foreignKey(e){return{kind:`scalar`,type:`String`,...e}}},i={on(e,t){return{fields:e,...t}},unique(e,t){return{fields:e,unique:!0,...t}},compound(e,t,n){return{fields:e,sort:t,...n}}};export{i,n,r,t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{i as e,n as t,r as n,t as r}from"./defineEntity.js";import"./types.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{z as e}from"zod";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e,r as t}from"./EnumType.js";import{n}from"./FieldType.js";import{l as r}from"./ScalarTypeEnum.js";import"./SchemaModel.js";import{i,n as a,r as o,t as s}from"./entity/defineEntity.js";import"./entity/index.js";
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
//#region src/templates/index.d.ts
|
|
2
|
-
/**
|
|
3
|
-
* Template variable definition.
|
|
4
|
-
*/
|
|
5
|
-
interface TemplateVariable {
|
|
6
|
-
name: string;
|
|
7
|
-
type: 'string' | 'number' | 'boolean' | 'date' | 'url';
|
|
8
|
-
required?: boolean;
|
|
9
|
-
default?: string | number | boolean;
|
|
10
|
-
description?: string;
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* Channel-specific template content.
|
|
14
|
-
*/
|
|
15
|
-
interface ChannelTemplateContent {
|
|
16
|
-
title?: string;
|
|
17
|
-
subject?: string;
|
|
18
|
-
body: string;
|
|
19
|
-
actionUrl?: string;
|
|
20
|
-
actionText?: string;
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* Notification template definition.
|
|
24
|
-
*/
|
|
25
|
-
interface NotificationTemplateDefinition {
|
|
26
|
-
id: string;
|
|
27
|
-
name: string;
|
|
28
|
-
description?: string;
|
|
29
|
-
category?: string;
|
|
30
|
-
variables?: TemplateVariable[];
|
|
31
|
-
defaultChannels?: string[];
|
|
32
|
-
channels: {
|
|
33
|
-
email?: ChannelTemplateContent;
|
|
34
|
-
inApp?: ChannelTemplateContent;
|
|
35
|
-
push?: ChannelTemplateContent;
|
|
36
|
-
webhook?: ChannelTemplateContent;
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
/**
|
|
40
|
-
* Rendered notification content.
|
|
41
|
-
*/
|
|
42
|
-
interface RenderedNotification {
|
|
43
|
-
title: string;
|
|
44
|
-
body: string;
|
|
45
|
-
actionUrl?: string;
|
|
46
|
-
email?: {
|
|
47
|
-
subject: string;
|
|
48
|
-
html: string;
|
|
49
|
-
text: string;
|
|
50
|
-
};
|
|
51
|
-
}
|
|
52
|
-
/**
|
|
53
|
-
* Define a notification template.
|
|
54
|
-
*/
|
|
55
|
-
declare function defineTemplate(def: NotificationTemplateDefinition): NotificationTemplateDefinition;
|
|
56
|
-
/**
|
|
57
|
-
* Render a template with variables.
|
|
58
|
-
*/
|
|
59
|
-
declare function renderTemplate(content: string, variables: Record<string, unknown>): string;
|
|
60
|
-
/**
|
|
61
|
-
* Render a notification template for a specific channel.
|
|
62
|
-
*/
|
|
63
|
-
declare function renderNotificationTemplate(template: NotificationTemplateDefinition, channel: keyof NotificationTemplateDefinition['channels'], variables: Record<string, unknown>): RenderedNotification | null;
|
|
64
|
-
/**
|
|
65
|
-
* Template registry for managing templates.
|
|
66
|
-
*/
|
|
67
|
-
declare class TemplateRegistry {
|
|
68
|
-
private templates;
|
|
69
|
-
register(template: NotificationTemplateDefinition): void;
|
|
70
|
-
get(templateId: string): NotificationTemplateDefinition | undefined;
|
|
71
|
-
getAll(): NotificationTemplateDefinition[];
|
|
72
|
-
getByCategory(category: string): NotificationTemplateDefinition[];
|
|
73
|
-
}
|
|
74
|
-
/**
|
|
75
|
-
* Create a template registry.
|
|
76
|
-
*/
|
|
77
|
-
declare function createTemplateRegistry(): TemplateRegistry;
|
|
78
|
-
/**
|
|
79
|
-
* Welcome email template.
|
|
80
|
-
*/
|
|
81
|
-
declare const WelcomeTemplate: NotificationTemplateDefinition;
|
|
82
|
-
/**
|
|
83
|
-
* Organization invite template.
|
|
84
|
-
*/
|
|
85
|
-
declare const OrgInviteTemplate: NotificationTemplateDefinition;
|
|
86
|
-
/**
|
|
87
|
-
* Mention template.
|
|
88
|
-
*/
|
|
89
|
-
declare const MentionTemplate: NotificationTemplateDefinition;
|
|
90
|
-
//#endregion
|
|
91
|
-
export { ChannelTemplateContent, MentionTemplate, NotificationTemplateDefinition, OrgInviteTemplate, RenderedNotification, TemplateRegistry, TemplateVariable, WelcomeTemplate, createTemplateRegistry, defineTemplate, renderNotificationTemplate, renderTemplate };
|