Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@epilot/notification-client

Package Overview
Dependencies
Maintainers
43
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@epilot/notification-client - npm Package Compare versions

Comparing version
0.6.1
to
0.7.0
+1
-1
dist/definition.js

@@ -1,1 +0,1 @@

(()=>{"use strict";var e={914:function(e,t,i){var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var n=o(i(240));t.default=n.default},240: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":{}}}},"components":{},"servers":[{"url":"https://notification.sls.epilot.io"}]}')}},t={},i=function i(o){var n=t[o];if(void 0!==n)return n.exports;var r=t[o]={exports:{}};return e[o].call(r.exports,r,r.exports,i),r.exports}(914),o=exports;for(var n in i)o[n]=i[n];i.__esModule&&Object.defineProperty(o,"__esModule",{value:!0})})();
(()=>{"use strict";var e={390:function(e,t,i){var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var n=o(i(466));t.default=n.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":{}}}},"components":{},"servers":[{"url":"https://notification.sls.epilot.io"}]}')}},t={},i=function i(o){var n=t[o];if(void 0!==n)return n.exports;var r=t[o]={exports:{}};return e[o].call(r.exports,r,r.exports,i),r.exports}(390),o=exports;for(var n in i)o[n]=i[n];i.__esModule&&Object.defineProperty(o,"__esModule",{value:!0})})();

@@ -484,2 +484,3 @@ /* eslint-disable */

export interface OperationMethods {

@@ -645,2 +646,3 @@ /**

export type Entity = Components.Schemas.Entity;

@@ -647,0 +649,0 @@ export type EntityId = Components.Schemas.EntityId;

{
"name": "@epilot/notification-client",
"version": "0.6.1",
"version": "0.7.0",
"description": "API Client for epilot Notification API",

@@ -28,6 +28,6 @@ "main": "dist/index.js",

"build": "tsc && npm run build:patch && npm run bundle-definition",
"build:patch": "sed -i '/^__exportStar.*openapi.*$/d' dist/index.js",
"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": "../../node_modules/eslint/bin/eslint.js src"
"lint": "pnpm exec eslint src"
},

@@ -47,4 +47,5 @@ "files": [

"license": "UNLICENSED",
"private": false,
"peerDependencies": {
"axios": "^1.6.2"
"axios": "^1.0.0 || >=0.25.0 <1.0.0"
},

@@ -55,3 +56,3 @@ "dependencies": {

"https-browserify": "^1.0.0",
"openapi-client-axios": "^7.5.1",
"openapi-client-axios": "^7.6.0",
"stream-http": "^3.1.1",

@@ -63,7 +64,7 @@ "url": "^0.11.0",

"@types/jest": "^26.0.20",
"axios": "^1.6.2",
"axios": "^1.11.0",
"copy-webpack-plugin": "^7.0.0",
"jest": "^26.6.3",
"json-loader": "^0.5.7",
"openapicmd": "^2.6.0",
"openapicmd": "^2.7.0",
"ts-jest": "^26.5.0",

@@ -76,3 +77,3 @@ "ts-loader": "^8.0.14",

},
"gitHead": "cb7e6acc938eb178e531c19834ea8bd0d6445e6f"
"gitHead": "39426e86cfb320fa3227dc03f60ee6a10848e7c7"
}

@@ -10,3 +10,3 @@ # @epilot/notification-client

Uses [`openapi-client-axios`](https://github.com/anttiviljami/openapi-client-axios)
Uses [`openapi-client-axios`](https://github.com/openapistack/openapi-client-axios)

@@ -13,0 +13,0 @@ ## Installation

The MIT License (MIT)
Copyright (c) 2022 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.
/* eslint-disable */
import type {
OpenAPIClient,
Parameters,
UnknownParamsObject,
OperationResponse,
AxiosRequestConfig,
} from 'openapi-client-axios';
declare namespace Components {
namespace Schemas {
export interface Entity {
[name: string]: any;
}
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;
};
}
/**
* URL-friendly identifier for the entity schema
* example:
* contact
*/
export type EntitySlug = string;
/**
* example:
* 123456789
*/
export type Id = number;
export interface Notification {
[name: string]: any;
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;
};
/**
* The person who is the corresponding event recipient.
* example:
* [
* "1",
* "2",
* "3",
* "4",
* "5"
* ]
*/
visibility_user_ids?: string[];
}
export interface NotificationBase {
[name: string]: any;
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 {
[name: string]: any;
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;
};
}
}
}
declare namespace Paths {
namespace CreateNotification {
export type RequestBody = Components.Schemas.Notification;
namespace Responses {
export interface $202 {
}
}
}
namespace GetNotification {
namespace Parameters {
export type Id = number;
}
export interface PathParameters {
id: Parameters.Id;
}
namespace Responses {
export type $200 = Components.Schemas.NotificationItem;
}
}
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 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 {
}
}
}
}
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>
}
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>
}
}
export type Client = OpenAPIClient<OperationMethods, PathsDictionary>
export type Entity = Components.Schemas.Entity;
export type EntityId = Components.Schemas.EntityId;
export type EntityOperation = Components.Schemas.EntityOperation;
export type EntitySlug = Components.Schemas.EntitySlug;
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;