@epilot/notification-client
Advanced tools
@@ -1,1 +0,1 @@ | ||
| (()=>{"use strict";var e={390:function(e,t,r){var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=a(r(466));t.default=i.default},466:e=>{e.exports=JSON.parse('{"openapi":"3.0.3","info":{"title":"","version":""},"paths":{"/v2/notification/notifications":{"get":{"operationId":"getNotificationsV2","parameters":[{"in":"query","name":"cursor","required":false},{"in":"query","name":"after_id"},{"in":"query","name":"limit"}],"responses":{}}},"/v1/notification/notifications":{"post":{"operationId":"createNotification","requestBody":{"content":{"application/json":{}}},"responses":{}},"get":{"operationId":"getNotifications","parameters":[{"in":"query","name":"after_id"},{"in":"query","name":"limit"},{"in":"query","name":"no_hydrate"}],"responses":{}}},"/v1/notification/notifications/{id}":{"get":{"operationId":"getNotification","parameters":[{"in":"path","name":"id","required":true}],"responses":{}}},"/v1/notification/notifications/mark":{"put":{"operationId":"markAllAsRead","responses":{}}},"/v1/notification/notifications/{id}/mark":{"put":{"operationId":"markAsRead","parameters":[{"in":"path","name":"id","required":true}],"responses":{}}},"/v1/notification/unreads":{"get":{"operationId":"getTotalUnread","responses":{}}},"/v1/notification/templates":{"get":{"operationId":"listNotificationTemplates","parameters":[{"name":"q","in":"query","required":false},{"name":"from","in":"query","required":false},{"name":"size","in":"query","required":false},{"name":"sort","in":"query","required":false},{"name":"fields","in":"query","required":false},{"name":"hydrate","in":"query","required":false}],"responses":{}},"post":{"operationId":"createNotificationTemplate","requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/notification/templates/{id}":{"get":{"operationId":"getNotificationTemplate","parameters":[{"$ref":"#/components/parameters/TemplateIdPathParam"}],"responses":{}},"put":{"operationId":"updateNotificationTemplate","parameters":[{"$ref":"#/components/parameters/TemplateIdPathParam"}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}},"patch":{"operationId":"patchNotificationTemplate","parameters":[{"$ref":"#/components/parameters/TemplateIdPathParam"}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}},"delete":{"operationId":"deleteNotificationTemplate","parameters":[{"$ref":"#/components/parameters/TemplateIdPathParam"}],"responses":{}}},"/v1/notification/templates/send-preview":{"post":{"operationId":"sendPreview","requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}}},"components":{"parameters":{"TemplateIdPathParam":{"name":"id","in":"path","required":true}}},"servers":[{"url":"https://notification.sls.epilot.io"}]}')}},t={},r=function r(a){var i=t[a];if(void 0!==i)return i.exports;var o=t[a]={exports:{}};return e[a].call(o.exports,o,o.exports,r),o.exports}(390),a=exports;for(var i in r)a[i]=r[i];r.__esModule&&Object.defineProperty(a,"__esModule",{value:!0})})(); | ||
| (()=>{"use strict";var e={330:function(e,t,r){var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=a(r(466));t.default=i.default},466:e=>{e.exports=JSON.parse('{"openapi":"3.0.3","info":{"title":"","version":""},"paths":{"/v2/notification/notifications":{"get":{"operationId":"getNotificationsV2","parameters":[{"in":"query","name":"cursor","required":false},{"in":"query","name":"after_id"},{"in":"query","name":"limit"}],"responses":{}}},"/v1/notification/notifications":{"post":{"operationId":"createNotification","requestBody":{"content":{"application/json":{}}},"responses":{}},"get":{"operationId":"getNotifications","parameters":[{"in":"query","name":"after_id"},{"in":"query","name":"limit"},{"in":"query","name":"no_hydrate"}],"responses":{}}},"/v1/notification/notifications/{id}":{"get":{"operationId":"getNotification","parameters":[{"in":"path","name":"id","required":true}],"responses":{}}},"/v1/notification/notifications/mark":{"put":{"operationId":"markAllAsRead","responses":{}}},"/v1/notification/notifications/{id}/mark":{"put":{"operationId":"markAsRead","parameters":[{"in":"path","name":"id","required":true}],"responses":{}}},"/v1/notification/unreads":{"get":{"operationId":"getTotalUnread","responses":{}}},"/v1/notification/templates":{"get":{"operationId":"listNotificationTemplates","parameters":[{"name":"q","in":"query","required":false},{"name":"from","in":"query","required":false},{"name":"size","in":"query","required":false},{"name":"sort","in":"query","required":false},{"name":"fields","in":"query","required":false},{"name":"hydrate","in":"query","required":false}],"responses":{}},"post":{"operationId":"createNotificationTemplate","requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/notification/templates/{id}":{"get":{"operationId":"getNotificationTemplate","parameters":[{"$ref":"#/components/parameters/TemplateIdPathParam"}],"responses":{}},"put":{"operationId":"updateNotificationTemplate","parameters":[{"$ref":"#/components/parameters/TemplateIdPathParam"}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}},"patch":{"operationId":"patchNotificationTemplate","parameters":[{"$ref":"#/components/parameters/TemplateIdPathParam"}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}},"delete":{"operationId":"deleteNotificationTemplate","parameters":[{"$ref":"#/components/parameters/TemplateIdPathParam"}],"responses":{}}},"/v1/notification/templates/send-preview":{"post":{"operationId":"sendPreview","requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}}},"components":{"parameters":{"TemplateIdPathParam":{"name":"id","in":"path","required":true}}},"servers":[{"url":"https://notification.sls.epilot.io"}]}')}},t={},r=function r(a){var i=t[a];if(void 0!==i)return i.exports;var o=t[a]={exports:{}};return e[a].call(o.exports,o,o.exports,r),o.exports}(330),a=exports;for(var i in r)a[i]=r[i];r.__esModule&&Object.defineProperty(a,"__esModule",{value:!0})})(); |
@@ -454,15 +454,15 @@ /* eslint-disable */ | ||
| */ | ||
| _id?: string; // uuid | ||
| _id: string; // uuid | ||
| /** | ||
| * Entity schema type | ||
| */ | ||
| _schema?: string; | ||
| _schema: string; | ||
| /** | ||
| * Display title | ||
| */ | ||
| _title?: string; | ||
| _title: string | null; | ||
| /** | ||
| * Organization ID | ||
| */ | ||
| _org?: string; | ||
| _org: string; | ||
| /** | ||
@@ -469,0 +469,0 @@ * Tags for categorization |
+15
-14
| { | ||
| "name": "@epilot/notification-client", | ||
| "version": "0.9.0", | ||
| "version": "0.10.0", | ||
| "description": "API Client for epilot Notification API", | ||
@@ -21,2 +21,14 @@ "main": "dist/index.js", | ||
| ], | ||
| "scripts": { | ||
| "test": "jest", | ||
| "typescript": "tsc", | ||
| "bundle-definition": "webpack", | ||
| "openapi": "node ../../scripts/update-openapi.js https://docs.api.epilot.io/svc-notification-api.yaml", | ||
| "typegen": "openapi typegen src/openapi.json --client -b '/* eslint-disable */' > src/openapi.d.ts", | ||
| "build": "tsc && npm run build:patch && npm run bundle-definition", | ||
| "build:patch": "sed -i'' -e '/^__exportStar.*openapi.*$/d' dist/index.js", | ||
| "build:watch": "npm run build && tsc -w", | ||
| "prepublishOnly": "npm run typegen && npm run build", | ||
| "lint": "pnpm exec eslint src" | ||
| }, | ||
| "files": [ | ||
@@ -62,14 +74,3 @@ "*.js", | ||
| }, | ||
| "gitHead": "39426e86cfb320fa3227dc03f60ee6a10848e7c7", | ||
| "scripts": { | ||
| "test": "jest", | ||
| "typescript": "tsc", | ||
| "bundle-definition": "webpack", | ||
| "openapi": "node ../../scripts/update-openapi.js https://docs.api.epilot.io/svc-notification-api.yaml", | ||
| "typegen": "openapi typegen src/openapi.json --client -b '/* eslint-disable */' > src/openapi.d.ts", | ||
| "build": "tsc && npm run build:patch && npm run bundle-definition", | ||
| "build:patch": "sed -i'' -e '/^__exportStar.*openapi.*$/d' dist/index.js", | ||
| "build:watch": "npm run build && tsc -w", | ||
| "lint": "pnpm exec eslint src" | ||
| } | ||
| } | ||
| "gitHead": "39426e86cfb320fa3227dc03f60ee6a10848e7c7" | ||
| } |
-21
| The MIT License (MIT) | ||
| Copyright (c) 2025 epilot GmbH | ||
| Permission is hereby granted, free of charge, to any person obtaining a copy | ||
| of this software and associated documentation files (the "Software"), to deal | ||
| in the Software without restriction, including without limitation the rights | ||
| to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
| copies of the Software, and to permit persons to whom the Software is | ||
| furnished to do so, subject to the following conditions: | ||
| The above copyright notice and this permission notice shall be included in | ||
| all copies or substantial portions of the Software. | ||
| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
| AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
| LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
| OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
| THE SOFTWARE. |
-1136
| /* eslint-disable */ | ||
| import type { | ||
| OpenAPIClient, | ||
| Parameters, | ||
| UnknownParamsObject, | ||
| OperationResponse, | ||
| AxiosRequestConfig, | ||
| } from 'openapi-client-axios'; | ||
| declare namespace Components { | ||
| namespace Parameters { | ||
| export type TemplateIdPathParam = string; // uuid | ||
| } | ||
| export interface PathParameters { | ||
| TemplateIdPathParam?: Parameters.TemplateIdPathParam /* uuid */; | ||
| } | ||
| namespace Schemas { | ||
| export interface CreateNotificationTemplateInput { | ||
| /** | ||
| * Internal template name (required) | ||
| */ | ||
| name: string; | ||
| /** | ||
| * Notification type key (required) | ||
| */ | ||
| type: string; | ||
| /** | ||
| * Notification title (Lexical editor JSON, supports variables) | ||
| */ | ||
| notification_title?: string; | ||
| /** | ||
| * Notification body (Lexical editor JSON, supports variables) | ||
| */ | ||
| message?: string; | ||
| /** | ||
| * CTA button text (supports variables) | ||
| */ | ||
| action_label?: string; | ||
| /** | ||
| * CTA button URL (supports variables) | ||
| */ | ||
| action_url?: string; | ||
| /** | ||
| * JSON string with style config | ||
| */ | ||
| style?: string; | ||
| /** | ||
| * Display title | ||
| */ | ||
| _title?: string; | ||
| /** | ||
| * Tags for categorization | ||
| */ | ||
| _tags?: string[]; | ||
| } | ||
| export interface Entity { | ||
| [name: string]: any; | ||
| } | ||
| /** | ||
| * Access control list | ||
| */ | ||
| export interface EntityAcl { | ||
| view?: string[]; | ||
| edit?: string[]; | ||
| delete?: string[]; | ||
| } | ||
| export type EntityId = string; // uuid | ||
| export interface EntityOperation { | ||
| entity: EntityId /* uuid */; | ||
| /** | ||
| * example: | ||
| * updateEntity | ||
| */ | ||
| operation?: string; | ||
| /** | ||
| * example: | ||
| * { | ||
| * "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", | ||
| * "slug": "contact" | ||
| * } | ||
| */ | ||
| params?: { | ||
| id?: EntityId /* uuid */; | ||
| slug?: /** | ||
| * URL-friendly identifier for the entity schema | ||
| * example: | ||
| * contact | ||
| */ | ||
| EntitySlug; | ||
| }; | ||
| /** | ||
| * example: | ||
| * { | ||
| * "_schema": "contact", | ||
| * "_org": "123", | ||
| * "status": "Inactive" | ||
| * } | ||
| */ | ||
| payload?: { | ||
| [name: string]: any; | ||
| }; | ||
| } | ||
| export interface EntityOwner { | ||
| /** | ||
| * Organization ID | ||
| */ | ||
| org_id?: string; | ||
| /** | ||
| * User ID | ||
| */ | ||
| user_id?: string; | ||
| } | ||
| /** | ||
| * URL-friendly identifier for the entity schema | ||
| * example: | ||
| * contact | ||
| */ | ||
| export type EntitySlug = string; | ||
| export interface Error { | ||
| /** | ||
| * Error message | ||
| */ | ||
| message: string; | ||
| /** | ||
| * Error code | ||
| */ | ||
| code?: string; | ||
| } | ||
| /** | ||
| * example: | ||
| * 123456789 | ||
| */ | ||
| export type Id = number; | ||
| export interface Notification { | ||
| notification_id?: number; | ||
| timestamp?: string; // date-time | ||
| /** | ||
| * Type of notification | ||
| * example: | ||
| * workflow | ||
| */ | ||
| type: string; | ||
| /** | ||
| * Redirect url | ||
| * example: | ||
| * https://epilot.cloud | ||
| */ | ||
| redirect_url?: string; | ||
| /** | ||
| * Organization Id | ||
| * example: | ||
| * 206801 | ||
| */ | ||
| organization_id?: string; | ||
| title: { | ||
| /** | ||
| * Title for notification. Supports handlebars syntax. | ||
| * example: | ||
| * My custom notification | ||
| */ | ||
| en?: string; | ||
| /** | ||
| * Title for notification. Supports handlebars syntax. | ||
| * example: | ||
| * Meine benutzerdefinierte Aktivität | ||
| */ | ||
| de?: string; | ||
| }; | ||
| message: { | ||
| /** | ||
| * Message for notification. Supports handlebars syntax. | ||
| * example: | ||
| * {{caller}} did something with {{contact.entity.id}} {{branch.name}}. | ||
| */ | ||
| en?: string; | ||
| /** | ||
| * Message for notification. Supports handlebars syntax. | ||
| * example: | ||
| * {{caller}} habe etwas damit gemacht {{contact.entity.id}} {{branch.name}}. | ||
| */ | ||
| de?: string; | ||
| }; | ||
| /** | ||
| * example: | ||
| * { | ||
| * "entity": { | ||
| * "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", | ||
| * "schema": "contact" | ||
| * } | ||
| * } | ||
| */ | ||
| payload?: { | ||
| [name: string]: any; | ||
| }; | ||
| caller?: NotificationCallerContext; | ||
| operations?: EntityOperation[]; | ||
| /** | ||
| * example: | ||
| * { | ||
| * "12345": { | ||
| * "email": false, | ||
| * "in_app": false | ||
| * } | ||
| * } | ||
| */ | ||
| force_notify_users?: { | ||
| [name: string]: any; | ||
| }; | ||
| /** | ||
| * example: | ||
| * false | ||
| */ | ||
| read_state?: boolean; | ||
| /** | ||
| * The person who is the corresponding event recipient. | ||
| * example: | ||
| * [ | ||
| * "1", | ||
| * "2", | ||
| * "3", | ||
| * "4", | ||
| * "5" | ||
| * ] | ||
| */ | ||
| visibility_user_ids?: string[]; | ||
| } | ||
| export interface NotificationBase { | ||
| notification_id?: number; | ||
| timestamp?: string; // date-time | ||
| /** | ||
| * Type of notification | ||
| * example: | ||
| * workflow | ||
| */ | ||
| type: string; | ||
| /** | ||
| * Redirect url | ||
| * example: | ||
| * https://epilot.cloud | ||
| */ | ||
| redirect_url?: string; | ||
| /** | ||
| * Organization Id | ||
| * example: | ||
| * 206801 | ||
| */ | ||
| organization_id?: string; | ||
| title: { | ||
| /** | ||
| * Title for notification. Supports handlebars syntax. | ||
| * example: | ||
| * My custom notification | ||
| */ | ||
| en?: string; | ||
| /** | ||
| * Title for notification. Supports handlebars syntax. | ||
| * example: | ||
| * Meine benutzerdefinierte Aktivität | ||
| */ | ||
| de?: string; | ||
| }; | ||
| message: { | ||
| /** | ||
| * Message for notification. Supports handlebars syntax. | ||
| * example: | ||
| * {{caller}} did something with {{contact.entity.id}} {{branch.name}}. | ||
| */ | ||
| en?: string; | ||
| /** | ||
| * Message for notification. Supports handlebars syntax. | ||
| * example: | ||
| * {{caller}} habe etwas damit gemacht {{contact.entity.id}} {{branch.name}}. | ||
| */ | ||
| de?: string; | ||
| }; | ||
| /** | ||
| * example: | ||
| * { | ||
| * "entity": { | ||
| * "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", | ||
| * "schema": "contact" | ||
| * } | ||
| * } | ||
| */ | ||
| payload?: { | ||
| [name: string]: any; | ||
| }; | ||
| caller?: NotificationCallerContext; | ||
| operations?: EntityOperation[]; | ||
| /** | ||
| * example: | ||
| * { | ||
| * "12345": { | ||
| * "email": false, | ||
| * "in_app": false | ||
| * } | ||
| * } | ||
| */ | ||
| force_notify_users?: { | ||
| [name: string]: any; | ||
| }; | ||
| } | ||
| export interface NotificationCallerContext { | ||
| [name: string]: any; | ||
| EpilotAuth?: { | ||
| /** | ||
| * example: | ||
| * { | ||
| * "sub": "476e9b48-42f4-4234-a2b0-4668b34626ce", | ||
| * "cognito:groups": [ | ||
| * "Administrator" | ||
| * ], | ||
| * "cognito:preferred_role": "arn:aws:iam::912468240823:role/base-administrator-role", | ||
| * "iss": "https://cognito-idp.eu-central-1.amazonaws.com/eu-central-1_6lZSgmU6D", | ||
| * "custom:ivy_org_id": "739224", | ||
| * "cognito:username": "n.ahmad@epilot.cloud", | ||
| * "custom:ivy_user_id": "10006129", | ||
| * "cognito:roles": [ | ||
| * "arn:aws:iam::912468240823:role/base-administrator-role" | ||
| * ], | ||
| * "aud": "6e0jbdnger7nmoktaaflarue1l", | ||
| * "event_id": "cd5f5583-d90c-4db5-8e99-5f5dd29a4d75", | ||
| * "token_use": "id", | ||
| * "auth_time": 1614333023, | ||
| * "exp": 1614336623, | ||
| * "iat": 1614333023, | ||
| * "email": "n.ahmad@epilot.cloud" | ||
| * } | ||
| */ | ||
| token?: { | ||
| /** | ||
| * example: | ||
| * 476e9b48-42f4-4234-a2b0-4668b34626ce | ||
| */ | ||
| sub?: string; | ||
| /** | ||
| * example: | ||
| * example@epilot.cloud | ||
| */ | ||
| email?: string; | ||
| /** | ||
| * example: | ||
| * example@epilot.cloud | ||
| */ | ||
| "cognito:username"?: string; | ||
| /** | ||
| * example: | ||
| * 10006129 | ||
| */ | ||
| "custom:ivy_user_id"?: string; | ||
| }; | ||
| }; | ||
| } | ||
| /** | ||
| * example: | ||
| * 123456789 | ||
| */ | ||
| export type NotificationId = number; | ||
| export interface NotificationItem { | ||
| id?: /** | ||
| * example: | ||
| * 123456789 | ||
| */ | ||
| Id; | ||
| notification_id?: /** | ||
| * example: | ||
| * 123456789 | ||
| */ | ||
| NotificationId; | ||
| timestamp?: string; // date-time | ||
| /** | ||
| * example: | ||
| * false | ||
| */ | ||
| read_state?: boolean; | ||
| /** | ||
| * Type of notification | ||
| * example: | ||
| * workflow | ||
| */ | ||
| type: string; | ||
| /** | ||
| * Redirect url | ||
| * example: | ||
| * https://epilot.cloud | ||
| */ | ||
| redirect_url?: string; | ||
| /** | ||
| * Organization Id | ||
| * example: | ||
| * 206801 | ||
| */ | ||
| organization_id?: string; | ||
| title: { | ||
| /** | ||
| * Title for notification. Supports handlebars syntax. | ||
| * example: | ||
| * My custom notification | ||
| */ | ||
| en?: string; | ||
| /** | ||
| * Title for notification. Supports handlebars syntax. | ||
| * example: | ||
| * Meine benutzerdefinierte Aktivität | ||
| */ | ||
| de?: string; | ||
| }; | ||
| message: { | ||
| /** | ||
| * Message for notification. Supports handlebars syntax. | ||
| * example: | ||
| * {{caller}} did something with {{contact.entity.id}} {{branch.name}}. | ||
| */ | ||
| en?: string; | ||
| /** | ||
| * Message for notification. Supports handlebars syntax. | ||
| * example: | ||
| * {{caller}} habe etwas damit gemacht {{contact.entity.id}} {{branch.name}}. | ||
| */ | ||
| de?: string; | ||
| }; | ||
| /** | ||
| * example: | ||
| * { | ||
| * "entity": { | ||
| * "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", | ||
| * "schema": "contact" | ||
| * } | ||
| * } | ||
| */ | ||
| payload?: { | ||
| [name: string]: any; | ||
| }; | ||
| caller?: NotificationCallerContext; | ||
| operations?: EntityOperation[]; | ||
| /** | ||
| * example: | ||
| * { | ||
| * "12345": { | ||
| * "email": false, | ||
| * "in_app": false | ||
| * } | ||
| * } | ||
| */ | ||
| force_notify_users?: { | ||
| [name: string]: any; | ||
| }; | ||
| } | ||
| export interface NotificationTemplate { | ||
| /** | ||
| * Unique identifier | ||
| */ | ||
| _id?: string; // uuid | ||
| /** | ||
| * Entity schema type | ||
| */ | ||
| _schema?: string; | ||
| /** | ||
| * Display title | ||
| */ | ||
| _title?: string; | ||
| /** | ||
| * Organization ID | ||
| */ | ||
| _org?: string; | ||
| /** | ||
| * Tags for categorization | ||
| */ | ||
| _tags?: string[]; | ||
| /** | ||
| * ISO timestamp of creation | ||
| */ | ||
| _created_at?: string; // date-time | ||
| /** | ||
| * ISO timestamp of last update | ||
| */ | ||
| _updated_at?: string; // date-time | ||
| /** | ||
| * Entity owners | ||
| */ | ||
| _owners?: EntityOwner[]; | ||
| /** | ||
| * Access control list | ||
| */ | ||
| _acl?: { | ||
| view?: string[]; | ||
| edit?: string[]; | ||
| delete?: string[]; | ||
| }; | ||
| /** | ||
| * Internal template name | ||
| */ | ||
| name?: string; | ||
| /** | ||
| * Notification type key | ||
| */ | ||
| type?: string; | ||
| /** | ||
| * Notification title (Lexical editor JSON, supports variables) | ||
| */ | ||
| notification_title?: string; | ||
| /** | ||
| * Notification body (Lexical editor JSON, supports variables) | ||
| */ | ||
| message?: string; | ||
| /** | ||
| * CTA button text (supports variables) | ||
| */ | ||
| action_label?: string; | ||
| /** | ||
| * CTA button URL (supports variables) | ||
| */ | ||
| action_url?: string; | ||
| /** | ||
| * JSON string with style config | ||
| */ | ||
| style?: string; | ||
| /** | ||
| * Whether this is a system template | ||
| */ | ||
| system_template?: boolean; | ||
| /** | ||
| * User ID who created the template | ||
| */ | ||
| created_by?: string; | ||
| /** | ||
| * User ID who last updated the template | ||
| */ | ||
| updated_by?: string; | ||
| } | ||
| export interface NotificationTemplateListResponse { | ||
| results?: NotificationTemplate[]; | ||
| /** | ||
| * Total number of matching results | ||
| */ | ||
| hits?: number; | ||
| } | ||
| export interface SendPreviewInput { | ||
| template: UpdateNotificationTemplateInput; | ||
| /** | ||
| * Optional context IDs for variable replacement | ||
| */ | ||
| context_ids?: { | ||
| [name: string]: string; | ||
| }; | ||
| } | ||
| /** | ||
| * Array of results for each notification channel (email, in-app) | ||
| */ | ||
| export type SendPreviewResponse = { | ||
| /** | ||
| * Whether this notification was sent successfully | ||
| */ | ||
| success: boolean; | ||
| /** | ||
| * Result data | ||
| */ | ||
| data?: any; | ||
| }[]; | ||
| export interface UpdateNotificationTemplateInput { | ||
| /** | ||
| * Internal template name | ||
| */ | ||
| name?: string; | ||
| /** | ||
| * Notification title (Lexical editor JSON, supports variables) | ||
| */ | ||
| notification_title?: string; | ||
| /** | ||
| * Notification body (Lexical editor JSON, supports variables) | ||
| */ | ||
| message?: string; | ||
| /** | ||
| * CTA button text (supports variables) | ||
| */ | ||
| action_label?: string; | ||
| /** | ||
| * CTA button URL (supports variables) | ||
| */ | ||
| action_url?: string; | ||
| /** | ||
| * JSON string with style config | ||
| */ | ||
| style?: string; | ||
| /** | ||
| * Display title | ||
| */ | ||
| _title?: string; | ||
| /** | ||
| * Tags for categorization | ||
| */ | ||
| _tags?: string[]; | ||
| } | ||
| } | ||
| } | ||
| declare namespace Paths { | ||
| namespace CreateNotification { | ||
| export type RequestBody = Components.Schemas.Notification; | ||
| namespace Responses { | ||
| export interface $202 { | ||
| } | ||
| } | ||
| } | ||
| namespace CreateNotificationTemplate { | ||
| export type RequestBody = Components.Schemas.CreateNotificationTemplateInput; | ||
| namespace Responses { | ||
| export type $201 = Components.Schemas.NotificationTemplate; | ||
| export type $400 = Components.Schemas.Error; | ||
| export type $401 = Components.Schemas.Error; | ||
| export type $500 = Components.Schemas.Error; | ||
| } | ||
| } | ||
| namespace DeleteNotificationTemplate { | ||
| namespace Parameters { | ||
| export type Id = string; // uuid | ||
| } | ||
| export interface PathParameters { | ||
| id: Parameters.Id /* uuid */; | ||
| } | ||
| namespace Responses { | ||
| export type $200 = Components.Schemas.NotificationTemplate; | ||
| export type $401 = Components.Schemas.Error; | ||
| export type $404 = Components.Schemas.Error; | ||
| export type $500 = Components.Schemas.Error; | ||
| } | ||
| } | ||
| namespace GetNotification { | ||
| namespace Parameters { | ||
| export type Id = number; | ||
| } | ||
| export interface PathParameters { | ||
| id: Parameters.Id; | ||
| } | ||
| namespace Responses { | ||
| export type $200 = Components.Schemas.NotificationItem; | ||
| } | ||
| } | ||
| namespace GetNotificationTemplate { | ||
| namespace Parameters { | ||
| export type Id = string; // uuid | ||
| } | ||
| export interface PathParameters { | ||
| id: Parameters.Id /* uuid */; | ||
| } | ||
| namespace Responses { | ||
| export type $200 = Components.Schemas.NotificationTemplate; | ||
| export type $401 = Components.Schemas.Error; | ||
| export type $404 = Components.Schemas.Error; | ||
| export type $500 = Components.Schemas.Error; | ||
| } | ||
| } | ||
| namespace GetNotifications { | ||
| namespace Parameters { | ||
| export type AfterId = number; | ||
| export type Limit = number; | ||
| export type NoHydrate = boolean; | ||
| } | ||
| export interface QueryParameters { | ||
| after_id?: Parameters.AfterId; | ||
| limit?: Parameters.Limit; | ||
| no_hydrate?: Parameters.NoHydrate; | ||
| } | ||
| namespace Responses { | ||
| export interface $200 { | ||
| /** | ||
| * example: | ||
| * 1 | ||
| */ | ||
| total?: number; | ||
| /** | ||
| * example: | ||
| * 1 | ||
| */ | ||
| total_unread?: number; | ||
| results?: Components.Schemas.NotificationItem[]; | ||
| } | ||
| } | ||
| } | ||
| namespace GetNotificationsV2 { | ||
| namespace Parameters { | ||
| export type AfterId = number; | ||
| export type Cursor = string; | ||
| export type Limit = number; | ||
| } | ||
| export interface QueryParameters { | ||
| cursor?: Parameters.Cursor; | ||
| after_id?: Parameters.AfterId; | ||
| limit?: Parameters.Limit; | ||
| } | ||
| namespace Responses { | ||
| export interface $200 { | ||
| /** | ||
| * Base64 encoded cursor to be used for pagination | ||
| * example: | ||
| * eyJjcmVhd | ||
| */ | ||
| cursor?: string; | ||
| /** | ||
| * example: | ||
| * 1 | ||
| */ | ||
| total?: number; | ||
| /** | ||
| * example: | ||
| * 1 | ||
| */ | ||
| total_unread?: number; | ||
| results?: Components.Schemas.NotificationItem[]; | ||
| } | ||
| } | ||
| } | ||
| namespace GetTotalUnread { | ||
| namespace Responses { | ||
| /** | ||
| * example: | ||
| * 999 | ||
| */ | ||
| export type $200 = number; | ||
| } | ||
| } | ||
| namespace ListNotificationTemplates { | ||
| namespace Parameters { | ||
| export type Fields = string; | ||
| export type From = number; | ||
| export type Hydrate = boolean; | ||
| export type Q = string; | ||
| export type Size = number; | ||
| export type Sort = string; | ||
| } | ||
| export interface QueryParameters { | ||
| q?: Parameters.Q; | ||
| from?: Parameters.From; | ||
| size?: Parameters.Size; | ||
| sort?: Parameters.Sort; | ||
| fields?: Parameters.Fields; | ||
| hydrate?: Parameters.Hydrate; | ||
| } | ||
| namespace Responses { | ||
| export type $200 = Components.Schemas.NotificationTemplateListResponse; | ||
| export type $401 = Components.Schemas.Error; | ||
| export type $500 = Components.Schemas.Error; | ||
| } | ||
| } | ||
| namespace MarkAllAsRead { | ||
| namespace Responses { | ||
| export interface $204 { | ||
| } | ||
| } | ||
| } | ||
| namespace MarkAsRead { | ||
| namespace Parameters { | ||
| export type Id = number; | ||
| } | ||
| export interface PathParameters { | ||
| id: Parameters.Id; | ||
| } | ||
| namespace Responses { | ||
| export interface $204 { | ||
| } | ||
| } | ||
| } | ||
| namespace PatchNotificationTemplate { | ||
| namespace Parameters { | ||
| export type Id = string; // uuid | ||
| } | ||
| export interface PathParameters { | ||
| id: Parameters.Id /* uuid */; | ||
| } | ||
| export type RequestBody = Components.Schemas.UpdateNotificationTemplateInput; | ||
| namespace Responses { | ||
| export type $200 = Components.Schemas.NotificationTemplate; | ||
| export type $400 = Components.Schemas.Error; | ||
| export type $401 = Components.Schemas.Error; | ||
| export type $404 = Components.Schemas.Error; | ||
| export type $500 = Components.Schemas.Error; | ||
| } | ||
| } | ||
| namespace SendPreview { | ||
| export type RequestBody = Components.Schemas.SendPreviewInput; | ||
| namespace Responses { | ||
| export type $200 = /* Array of results for each notification channel (email, in-app) */ Components.Schemas.SendPreviewResponse; | ||
| export type $400 = Components.Schemas.Error; | ||
| export type $401 = Components.Schemas.Error; | ||
| export type $500 = Components.Schemas.Error; | ||
| } | ||
| } | ||
| namespace UpdateNotificationTemplate { | ||
| namespace Parameters { | ||
| export type Id = string; // uuid | ||
| } | ||
| export interface PathParameters { | ||
| id: Parameters.Id /* uuid */; | ||
| } | ||
| export type RequestBody = Components.Schemas.UpdateNotificationTemplateInput; | ||
| namespace Responses { | ||
| export type $200 = Components.Schemas.NotificationTemplate; | ||
| export type $400 = Components.Schemas.Error; | ||
| export type $401 = Components.Schemas.Error; | ||
| export type $404 = Components.Schemas.Error; | ||
| export type $500 = Components.Schemas.Error; | ||
| } | ||
| } | ||
| } | ||
| export interface OperationMethods { | ||
| /** | ||
| * getNotificationsV2 - getNotificationsV2 | ||
| * | ||
| * Get notifications items. These items may eventually contain entities within their payload, which can be hydrated by the client if desired by calling the Entity API directly. | ||
| */ | ||
| 'getNotificationsV2'( | ||
| parameters?: Parameters<Paths.GetNotificationsV2.QueryParameters> | null, | ||
| data?: any, | ||
| config?: AxiosRequestConfig | ||
| ): OperationResponse<Paths.GetNotificationsV2.Responses.$200> | ||
| /** | ||
| * getNotifications - getNotifications | ||
| * | ||
| * Get notifications | ||
| */ | ||
| 'getNotifications'( | ||
| parameters?: Parameters<Paths.GetNotifications.QueryParameters> | null, | ||
| data?: any, | ||
| config?: AxiosRequestConfig | ||
| ): OperationResponse<Paths.GetNotifications.Responses.$200> | ||
| /** | ||
| * createNotification - createNotification | ||
| * | ||
| * Create a message that can be displayed in the notification panel. | ||
| */ | ||
| 'createNotification'( | ||
| parameters?: Parameters<UnknownParamsObject> | null, | ||
| data?: Paths.CreateNotification.RequestBody, | ||
| config?: AxiosRequestConfig | ||
| ): OperationResponse<Paths.CreateNotification.Responses.$202> | ||
| /** | ||
| * getNotification - getNotification | ||
| * | ||
| * Get the details of a single notification. | ||
| */ | ||
| 'getNotification'( | ||
| parameters?: Parameters<Paths.GetNotification.PathParameters> | null, | ||
| data?: any, | ||
| config?: AxiosRequestConfig | ||
| ): OperationResponse<Paths.GetNotification.Responses.$200> | ||
| /** | ||
| * markAllAsRead - markAllAsRead | ||
| * | ||
| * Mark all as read | ||
| */ | ||
| 'markAllAsRead'( | ||
| parameters?: Parameters<UnknownParamsObject> | null, | ||
| data?: any, | ||
| config?: AxiosRequestConfig | ||
| ): OperationResponse<Paths.MarkAllAsRead.Responses.$204> | ||
| /** | ||
| * markAsRead - markAsRead | ||
| * | ||
| * Mark as read | ||
| */ | ||
| 'markAsRead'( | ||
| parameters?: Parameters<Paths.MarkAsRead.PathParameters> | null, | ||
| data?: any, | ||
| config?: AxiosRequestConfig | ||
| ): OperationResponse<Paths.MarkAsRead.Responses.$204> | ||
| /** | ||
| * getTotalUnread - getTotalUnread | ||
| * | ||
| * Get total unread | ||
| */ | ||
| 'getTotalUnread'( | ||
| parameters?: Parameters<UnknownParamsObject> | null, | ||
| data?: any, | ||
| config?: AxiosRequestConfig | ||
| ): OperationResponse<Paths.GetTotalUnread.Responses.$200> | ||
| /** | ||
| * listNotificationTemplates - listNotificationTemplates | ||
| * | ||
| * List notification templates with optional filtering and pagination | ||
| */ | ||
| 'listNotificationTemplates'( | ||
| parameters?: Parameters<Paths.ListNotificationTemplates.QueryParameters> | null, | ||
| data?: any, | ||
| config?: AxiosRequestConfig | ||
| ): OperationResponse<Paths.ListNotificationTemplates.Responses.$200> | ||
| /** | ||
| * createNotificationTemplate - createNotificationTemplate | ||
| * | ||
| * Create a new notification template | ||
| */ | ||
| 'createNotificationTemplate'( | ||
| parameters?: Parameters<UnknownParamsObject> | null, | ||
| data?: Paths.CreateNotificationTemplate.RequestBody, | ||
| config?: AxiosRequestConfig | ||
| ): OperationResponse<Paths.CreateNotificationTemplate.Responses.$201> | ||
| /** | ||
| * getNotificationTemplate - getNotificationTemplate | ||
| * | ||
| * Get a single notification template by ID | ||
| */ | ||
| 'getNotificationTemplate'( | ||
| parameters?: Parameters<Paths.GetNotificationTemplate.PathParameters> | null, | ||
| data?: any, | ||
| config?: AxiosRequestConfig | ||
| ): OperationResponse<Paths.GetNotificationTemplate.Responses.$200> | ||
| /** | ||
| * updateNotificationTemplate - updateNotificationTemplate | ||
| * | ||
| * Update a notification template (full replacement) | ||
| */ | ||
| 'updateNotificationTemplate'( | ||
| parameters?: Parameters<Paths.UpdateNotificationTemplate.PathParameters> | null, | ||
| data?: Paths.UpdateNotificationTemplate.RequestBody, | ||
| config?: AxiosRequestConfig | ||
| ): OperationResponse<Paths.UpdateNotificationTemplate.Responses.$200> | ||
| /** | ||
| * patchNotificationTemplate - patchNotificationTemplate | ||
| * | ||
| * Partially update a notification template | ||
| */ | ||
| 'patchNotificationTemplate'( | ||
| parameters?: Parameters<Paths.PatchNotificationTemplate.PathParameters> | null, | ||
| data?: Paths.PatchNotificationTemplate.RequestBody, | ||
| config?: AxiosRequestConfig | ||
| ): OperationResponse<Paths.PatchNotificationTemplate.Responses.$200> | ||
| /** | ||
| * deleteNotificationTemplate - deleteNotificationTemplate | ||
| * | ||
| * Delete a notification template permanently | ||
| */ | ||
| 'deleteNotificationTemplate'( | ||
| parameters?: Parameters<Paths.DeleteNotificationTemplate.PathParameters> | null, | ||
| data?: any, | ||
| config?: AxiosRequestConfig | ||
| ): OperationResponse<Paths.DeleteNotificationTemplate.Responses.$200> | ||
| /** | ||
| * sendPreview - sendPreview | ||
| * | ||
| * Send a preview notification (both email and in-app) to the requesting user. | ||
| * Used to test notification templates before saving. | ||
| * | ||
| */ | ||
| 'sendPreview'( | ||
| parameters?: Parameters<UnknownParamsObject> | null, | ||
| data?: Paths.SendPreview.RequestBody, | ||
| config?: AxiosRequestConfig | ||
| ): OperationResponse<Paths.SendPreview.Responses.$200> | ||
| } | ||
| export interface PathsDictionary { | ||
| ['/v2/notification/notifications']: { | ||
| /** | ||
| * getNotificationsV2 - getNotificationsV2 | ||
| * | ||
| * Get notifications items. These items may eventually contain entities within their payload, which can be hydrated by the client if desired by calling the Entity API directly. | ||
| */ | ||
| 'get'( | ||
| parameters?: Parameters<Paths.GetNotificationsV2.QueryParameters> | null, | ||
| data?: any, | ||
| config?: AxiosRequestConfig | ||
| ): OperationResponse<Paths.GetNotificationsV2.Responses.$200> | ||
| } | ||
| ['/v1/notification/notifications']: { | ||
| /** | ||
| * createNotification - createNotification | ||
| * | ||
| * Create a message that can be displayed in the notification panel. | ||
| */ | ||
| 'post'( | ||
| parameters?: Parameters<UnknownParamsObject> | null, | ||
| data?: Paths.CreateNotification.RequestBody, | ||
| config?: AxiosRequestConfig | ||
| ): OperationResponse<Paths.CreateNotification.Responses.$202> | ||
| /** | ||
| * getNotifications - getNotifications | ||
| * | ||
| * Get notifications | ||
| */ | ||
| 'get'( | ||
| parameters?: Parameters<Paths.GetNotifications.QueryParameters> | null, | ||
| data?: any, | ||
| config?: AxiosRequestConfig | ||
| ): OperationResponse<Paths.GetNotifications.Responses.$200> | ||
| } | ||
| ['/v1/notification/notifications/{id}']: { | ||
| /** | ||
| * getNotification - getNotification | ||
| * | ||
| * Get the details of a single notification. | ||
| */ | ||
| 'get'( | ||
| parameters?: Parameters<Paths.GetNotification.PathParameters> | null, | ||
| data?: any, | ||
| config?: AxiosRequestConfig | ||
| ): OperationResponse<Paths.GetNotification.Responses.$200> | ||
| } | ||
| ['/v1/notification/notifications/mark']: { | ||
| /** | ||
| * markAllAsRead - markAllAsRead | ||
| * | ||
| * Mark all as read | ||
| */ | ||
| 'put'( | ||
| parameters?: Parameters<UnknownParamsObject> | null, | ||
| data?: any, | ||
| config?: AxiosRequestConfig | ||
| ): OperationResponse<Paths.MarkAllAsRead.Responses.$204> | ||
| } | ||
| ['/v1/notification/notifications/{id}/mark']: { | ||
| /** | ||
| * markAsRead - markAsRead | ||
| * | ||
| * Mark as read | ||
| */ | ||
| 'put'( | ||
| parameters?: Parameters<Paths.MarkAsRead.PathParameters> | null, | ||
| data?: any, | ||
| config?: AxiosRequestConfig | ||
| ): OperationResponse<Paths.MarkAsRead.Responses.$204> | ||
| } | ||
| ['/v1/notification/unreads']: { | ||
| /** | ||
| * getTotalUnread - getTotalUnread | ||
| * | ||
| * Get total unread | ||
| */ | ||
| 'get'( | ||
| parameters?: Parameters<UnknownParamsObject> | null, | ||
| data?: any, | ||
| config?: AxiosRequestConfig | ||
| ): OperationResponse<Paths.GetTotalUnread.Responses.$200> | ||
| } | ||
| ['/v1/notification/templates']: { | ||
| /** | ||
| * listNotificationTemplates - listNotificationTemplates | ||
| * | ||
| * List notification templates with optional filtering and pagination | ||
| */ | ||
| 'get'( | ||
| parameters?: Parameters<Paths.ListNotificationTemplates.QueryParameters> | null, | ||
| data?: any, | ||
| config?: AxiosRequestConfig | ||
| ): OperationResponse<Paths.ListNotificationTemplates.Responses.$200> | ||
| /** | ||
| * createNotificationTemplate - createNotificationTemplate | ||
| * | ||
| * Create a new notification template | ||
| */ | ||
| 'post'( | ||
| parameters?: Parameters<UnknownParamsObject> | null, | ||
| data?: Paths.CreateNotificationTemplate.RequestBody, | ||
| config?: AxiosRequestConfig | ||
| ): OperationResponse<Paths.CreateNotificationTemplate.Responses.$201> | ||
| } | ||
| ['/v1/notification/templates/{id}']: { | ||
| /** | ||
| * getNotificationTemplate - getNotificationTemplate | ||
| * | ||
| * Get a single notification template by ID | ||
| */ | ||
| 'get'( | ||
| parameters?: Parameters<Paths.GetNotificationTemplate.PathParameters> | null, | ||
| data?: any, | ||
| config?: AxiosRequestConfig | ||
| ): OperationResponse<Paths.GetNotificationTemplate.Responses.$200> | ||
| /** | ||
| * updateNotificationTemplate - updateNotificationTemplate | ||
| * | ||
| * Update a notification template (full replacement) | ||
| */ | ||
| 'put'( | ||
| parameters?: Parameters<Paths.UpdateNotificationTemplate.PathParameters> | null, | ||
| data?: Paths.UpdateNotificationTemplate.RequestBody, | ||
| config?: AxiosRequestConfig | ||
| ): OperationResponse<Paths.UpdateNotificationTemplate.Responses.$200> | ||
| /** | ||
| * patchNotificationTemplate - patchNotificationTemplate | ||
| * | ||
| * Partially update a notification template | ||
| */ | ||
| 'patch'( | ||
| parameters?: Parameters<Paths.PatchNotificationTemplate.PathParameters> | null, | ||
| data?: Paths.PatchNotificationTemplate.RequestBody, | ||
| config?: AxiosRequestConfig | ||
| ): OperationResponse<Paths.PatchNotificationTemplate.Responses.$200> | ||
| /** | ||
| * deleteNotificationTemplate - deleteNotificationTemplate | ||
| * | ||
| * Delete a notification template permanently | ||
| */ | ||
| 'delete'( | ||
| parameters?: Parameters<Paths.DeleteNotificationTemplate.PathParameters> | null, | ||
| data?: any, | ||
| config?: AxiosRequestConfig | ||
| ): OperationResponse<Paths.DeleteNotificationTemplate.Responses.$200> | ||
| } | ||
| ['/v1/notification/templates/send-preview']: { | ||
| /** | ||
| * sendPreview - sendPreview | ||
| * | ||
| * Send a preview notification (both email and in-app) to the requesting user. | ||
| * Used to test notification templates before saving. | ||
| * | ||
| */ | ||
| 'post'( | ||
| parameters?: Parameters<UnknownParamsObject> | null, | ||
| data?: Paths.SendPreview.RequestBody, | ||
| config?: AxiosRequestConfig | ||
| ): OperationResponse<Paths.SendPreview.Responses.$200> | ||
| } | ||
| } | ||
| export type Client = OpenAPIClient<OperationMethods, PathsDictionary> | ||
| export type CreateNotificationTemplateInput = Components.Schemas.CreateNotificationTemplateInput; | ||
| export type Entity = Components.Schemas.Entity; | ||
| export type EntityAcl = Components.Schemas.EntityAcl; | ||
| export type EntityId = Components.Schemas.EntityId; | ||
| export type EntityOperation = Components.Schemas.EntityOperation; | ||
| export type EntityOwner = Components.Schemas.EntityOwner; | ||
| export type EntitySlug = Components.Schemas.EntitySlug; | ||
| export type Error = Components.Schemas.Error; | ||
| export type Id = Components.Schemas.Id; | ||
| export type Notification = Components.Schemas.Notification; | ||
| export type NotificationBase = Components.Schemas.NotificationBase; | ||
| export type NotificationCallerContext = Components.Schemas.NotificationCallerContext; | ||
| export type NotificationId = Components.Schemas.NotificationId; | ||
| export type NotificationItem = Components.Schemas.NotificationItem; | ||
| export type NotificationTemplate = Components.Schemas.NotificationTemplate; | ||
| export type NotificationTemplateListResponse = Components.Schemas.NotificationTemplateListResponse; | ||
| export type SendPreviewInput = Components.Schemas.SendPreviewInput; | ||
| export type SendPreviewResponse = Components.Schemas.SendPreviewResponse; | ||
| export type UpdateNotificationTemplateInput = Components.Schemas.UpdateNotificationTemplateInput; |
Explicitly Unlicensed Item
LicenseSomething was found which is explicitly marked as unlicensed.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
Explicitly Unlicensed Item
LicenseSomething was found which is explicitly marked as unlicensed.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
0
-100%45256
-45%9
-18.18%1191
-48.64%