feat: Ajout d'un système d'alert
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2024-09-05 22:48:06 +02:00
parent 9b039a3fb1
commit 346399d757
217 changed files with 56413 additions and 0 deletions

View File

@ -0,0 +1,221 @@
# Changelog
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
### [6.0.6](https://github.com/mailjet/mailjet-apiv3-nodejs/compare/v6.0.5...v6.0.6) (2024-09-02)
### Bug Fixes
* upgrade axios version to fix CVE-2023-26159 ([6342638](https://github.com/mailjet/mailjet-apiv3-nodejs/commits/6342638c9dd6fcd8e62a071b60fe8aefc7d7ca5c))
### [6.0.5](https://github.com/mailjet/mailjet-apiv3-nodejs/compare/v6.0.4...v6.0.5) (2023-11-27)
### Bug Fixes
* typescript returned type, use specific axios version ([c6329ea](https://github.com/mailjet/mailjet-apiv3-nodejs/commits/c6329ea01c2fa0fc05f9838c8279d0b48a119cbb))
### [6.0.4](https://github.com/mailjet/mailjet-apiv3-nodejs/compare/v6.0.3...v6.0.4) (2023-07-24)
### Bug Fixes
* content-length header for GET requests ([be51c9d](https://github.com/mailjet/mailjet-apiv3-nodejs/commits/be51c9d94e20b35329a3331ddfe5ab80030fbf7c))
### [6.0.3](https://github.com/mailjet/mailjet-apiv3-nodejs/compare/v6.0.2...v6.0.3) (2023-07-12)
### Build changes
* **deps-dev:** bump webpack from 5.72.1 to 5.76.0 ([9b66c92](https://github.com/mailjet/mailjet-apiv3-nodejs/commits/9b66c92138673f668ad7bcfac9d97c571e9cc10f))
* **deps:** bump jose in /examples/firebase/functions ([4854e8d](https://github.com/mailjet/mailjet-apiv3-nodejs/commits/4854e8d6dc183fd31218d5fd86a9eab829ef0773))
* **deps:** bump json5 from 1.0.1 to 1.0.2 ([366f3c8](https://github.com/mailjet/mailjet-apiv3-nodejs/commits/366f3c8326a5ae9411f38b8a5561503f5ca3373e))
* **deps:** bump jsonwebtoken and firebase-admin ([6d58037](https://github.com/mailjet/mailjet-apiv3-nodejs/commits/6d58037cea542b597b5cb9e363ab8e5d145f5a08))
* **deps:** bump loader-utils from 2.0.2 to 2.0.4 ([d72014e](https://github.com/mailjet/mailjet-apiv3-nodejs/commits/d72014e386c8588c7949135dfe5146ae26580e13))
### [6.0.2](https://github.com/mailjet/mailjet-apiv3-nodejs/compare/v6.0.1...v6.0.2) (2023-01-31)
### Bug Fixes
* named export missing parameter ([2f7b040](https://github.com/mailjet/mailjet-apiv3-nodejs/commits/2f7b040097834f7b24c93bd933ef82fe9da5c6ed))
### Docs changes
* update Readme ([9a3471d](https://github.com/mailjet/mailjet-apiv3-nodejs/commits/9a3471d8bdd246e16b3fcc18957bf7411502e00c))
### Other changes
* add new built files ([882349a](https://github.com/mailjet/mailjet-apiv3-nodejs/commits/882349ad9b2e65d9323c4426e0e38bb2b73f6f45))
### [6.0.1](https://github.com/mailjet/mailjet-apiv3-nodejs/compare/v6.0.0...v6.0.1) (2023-01-09)
### Bug Fixes
* **types:** Fix TypeScript imports ([02fe5e9](https://github.com/mailjet/mailjet-apiv3-nodejs/commits/02fe5e945d9cc9fb1361b9bc681be097f40fddd6))
### Docs changes
* Update TypeScript examples in Readme ([9c202d0](https://github.com/mailjet/mailjet-apiv3-nodejs/commits/9c202d02de6c3af4271adb5e694bef7c6ab5b7de))
### Other changes
* Update TypeScript declaration for SendEmail Body type ([42f49d1](https://github.com/mailjet/mailjet-apiv3-nodejs/commits/42f49d1baf8b2a9227e9b3d54141d9a50962c6c1))
## [6.0.0](https://github.com/mailjet/mailjet-apiv3-nodejs/compare/v5.1.1...v6.0.0) (2022-12-27)
### Bug Fixes
* **types:** Build Typescript changes ([f683f70](https://github.com/mailjet/mailjet-apiv3-nodejs/commits/f683f708db0245f74568f1c4bf0e06cc5f0a86c7))
* **types:** Typescript exported types ([0e19bab](https://github.com/mailjet/mailjet-apiv3-nodejs/commits/0e19bab228ffc83d19b17c270e0156f58f60cfe1))
### Docs changes
* Update Readme ([29bb64f](https://github.com/mailjet/mailjet-apiv3-nodejs/commits/29bb64f23092d72728c19208ac2367293433d62b))
### Breaking changes
* Update TypeScript namings in the code and tests ([904735d](https://github.com/mailjet/mailjet-apiv3-nodejs/commits/904735db615480de2d1614f1b93a27a3de37d73d))
### [5.1.1](https://github.com/mailjet/mailjet-apiv3-nodejs/compare/v5.1.0...v5.1.1) (2022-07-27)
### Other changes
* Add application example with using Firebase Functions and Mailjet lib ([690ff1e](https://github.com/mailjet/mailjet-apiv3-nodejs/commits/690ff1e0a609c0e31b13f3b79c5b0ddaf0a934ad))
### Docs changes
* Add mention about Firebase application example to README ([0154a0a](https://github.com/mailjet/mailjet-apiv3-nodejs/commits/0154a0ae0de63a3d4ebdd5e1c3a38be0408c6cb9))
## [5.1.0](https://github.com/mailjet/mailjet-apiv3-nodejs/compare/v5.0.1...v5.1.0) (2022-07-22)
### Added features
* Add full TypeScript cover for Mailjet types ([784c4cd](https://github.com/mailjet/mailjet-apiv3-nodejs/commits/784c4cd79c5531aaeacbdde5547e2793b57d1427))
### Other changes
* Change global and TypeScript rules ([fa4fb60](https://github.com/mailjet/mailjet-apiv3-nodejs/commits/fa4fb606f4e380886734468ac18c2c90e05ebd17))
### Docs changes
* Update TypeScript documentation part; Add example of using Mailjet types ([15f2d11](https://github.com/mailjet/mailjet-apiv3-nodejs/commits/15f2d11dae63fe54fdb350864b99129fcc26afb0))
### Dependency changes for security
* Change webpack dependency terser package 5.0.0 - 5.14.1 ([959018a](https://github.com/mailjet/mailjet-apiv3-nodejs/commits/959018a77ff36a70769f36e22f57bdc89cba2157))
### [5.0.1](https://github.com/mailjet/mailjet-apiv3-nodejs/compare/v5.0.0...v5.0.1) (2022-06-30)
### Build changes
* Add standard-version updater for README ([e615ff7](https://github.com/mailjet/mailjet-apiv3-nodejs/commits/e615ff7cf7a07f224a4f542422b1c3bbd20179f7))
* Add VersionBump script ([f2ed676](https://github.com/mailjet/mailjet-apiv3-nodejs/commits/f2ed676134cd1dcf091fe766b7c76b2c12e625a4))
* Move standard-version config from package.json to .versionrc.js ([122e4a5](https://github.com/mailjet/mailjet-apiv3-nodejs/commits/122e4a5c7975773e891591cf4f3431a0e7cd77e1))
## [5.0.0](https://github.com/mailjet/mailjet-apiv3-nodejs/compare/v4.0.1...v5.0.0) (2022-06-24)
### Bug Fixes
* PreparePackage script ([57730b8](https://github.com/mailjet/mailjet-apiv3-nodejs/commits/57730b8ad1a6de8a0de51c4fae6c31d654ebea34))
### Breaking changes
* Replace superagent http client with axios ([54c06d0](https://github.com/mailjet/mailjet-apiv3-nodejs/commits/54c06d05b715e0d3493b03973156603e64f1e3d9))
### Added features
* Update "request" method signature in the class Request ([bbed64a](https://github.com/mailjet/mailjet-apiv3-nodejs/commits/bbed64aea20b5bf7326d301bedc743bc6d6b14d2))
### Tests
* Update integration tests ([39d4cb5](https://github.com/mailjet/mailjet-apiv3-nodejs/commits/39d4cb5544560d77079381f5e1ccba00f9ad4d9e))
* Update unit and integration tests after change Request.request method ([5362aa5](https://github.com/mailjet/mailjet-apiv3-nodejs/commits/5362aa532601d0f0512f175cb68e7e1dd5c53af9))
* Update unit tests for Client and Request ([87c456e](https://github.com/mailjet/mailjet-apiv3-nodejs/commits/87c456e27d728396b98d1a5cb8d6fceac719c459))
### Docs changes
* Update "sendmail" example ([0393327](https://github.com/mailjet/mailjet-apiv3-nodejs/commits/03933278088ef1cad840e8b2d4a561fda9f5b7f2))
* Update auto-generated TypeScript docs ([758d080](https://github.com/mailjet/mailjet-apiv3-nodejs/commits/758d0809296e63fcee2d1ec6c79e61debba812c2))
* Update auto-generated TypeScript docs after change Request.request method ([d0ee581](https://github.com/mailjet/mailjet-apiv3-nodejs/commits/d0ee581fbdc172694feadb208a372785754632db))
* Update example for browser ([024484b](https://github.com/mailjet/mailjet-apiv3-nodejs/commits/024484bd593ca12814aede3d22a8c1e012e3e385))
* Update example for NodeJS ([34a449a](https://github.com/mailjet/mailjet-apiv3-nodejs/commits/34a449adc1c2adb609d032fe3f83a2a933f545a5))
* Update example for ReactJS ([bc120ba](https://github.com/mailjet/mailjet-apiv3-nodejs/commits/bc120bac988e2ec2a0c7843500dbf2b43ea00e30))
* Update examples after change Request.request method ([578a59c](https://github.com/mailjet/mailjet-apiv3-nodejs/commits/578a59c8fb99d9801339939bd79ccabcefa64e4a))
* Update README ([6eb525d](https://github.com/mailjet/mailjet-apiv3-nodejs/commits/6eb525dfdea6c4af53af7980efc46838efc3d6ad))
* Update README after change Request.request method ([35df465](https://github.com/mailjet/mailjet-apiv3-nodejs/commits/35df465a9602c8c072ca1fee8db4dc7415921b3f))
### Build changes
* Move PreparePackage script to scripts folder ([41b07f1](https://github.com/mailjet/mailjet-apiv3-nodejs/commits/41b07f100dea92c62bb6461ff817a1da679e9639))
* Update library bundle ([5d40aa7](https://github.com/mailjet/mailjet-apiv3-nodejs/commits/5d40aa74c8046cfd44098fcd304e1fd9303f903e))
* Update library bundle after change Request.request method ([34e85e0](https://github.com/mailjet/mailjet-apiv3-nodejs/commits/34e85e0a757b34eea71612c1492871ac9a7fd6bb))
### [4.0.1](https://github.com/mailjet/mailjet-apiv3-nodejs/compare/v4.0.0...v4.0.1) (2022-06-14)
### Bug Fixes
* Typo in readme ([80a2902](https://github.com/mailjet/mailjet-apiv3-nodejs/commits/80a2902fd9184c002821d53d9fc8c63b1e9f4468))
## [4.0.0](https://github.com/mailjet/mailjet-apiv3-nodejs/compare/3.4.1...v4.0.0) (2022-06-10)
### Bug Fixes
* Package init script ([92ab6e2](https://github.com/mailjet/mailjet-apiv3-nodejs/commits/92ab6e29de41ddaaae03d7480f211d7e3f651f3c))
* Prepare package script ([e4cea3a](https://github.com/mailjet/mailjet-apiv3-nodejs/commits/e4cea3af61d3170f595d4946e0e05a0c5150da01))
### Other changes
* Add commitlint ([8ef0b9e](https://github.com/mailjet/mailjet-apiv3-nodejs/commits/8ef0b9eca2eff8e5669612d2bd48d436dfbb4339))
* Add husky ([a707dee](https://github.com/mailjet/mailjet-apiv3-nodejs/commits/a707dee5fc601e967ee9097e739e9ec90b32de5b))
* Add init and link scripts to package scripts ([52a149d](https://github.com/mailjet/mailjet-apiv3-nodejs/commits/52a149dd841919816b59cd175e83ae3e95ff6a7d))
* Add standard-version to auto-generate changelog file ([487e580](https://github.com/mailjet/mailjet-apiv3-nodejs/commits/487e5803775679ce15628811b12dc6fa2bf31a4b))
### Added features
* Add public methods for accessing private properties in Client ([1410adc](https://github.com/mailjet/mailjet-apiv3-nodejs/commits/1410adc61cb096ce4b4d5559a298ca7cb21a02ce))
* Add TypeScript class access modificators in Request ([f7c8974](https://github.com/mailjet/mailjet-apiv3-nodejs/commits/f7c897493897a84cfe2b7e37698e49077a944345))
### Tests
* Update Unit and Integration test after updated Client ([b9783f2](https://github.com/mailjet/mailjet-apiv3-nodejs/commits/b9783f2714f62b63a71aac95790ce2be7c85dc6c))
### Docs changes
* Update auto-generated TypeScript docs ([612145f](https://github.com/mailjet/mailjet-apiv3-nodejs/commits/612145fcfefe569bed2185909a2230052d59c704))
* Update main README; Update README for browser-side examples ([f39112f](https://github.com/mailjet/mailjet-apiv3-nodejs/commits/f39112f896427f28a2b28a091d7eb6e5c78e8f54))
* Update README ([41aae6a](https://github.com/mailjet/mailjet-apiv3-nodejs/commits/41aae6afeb2034ab6ea596005e76633ef1decce3))
* Update README for node example ([efa90ff](https://github.com/mailjet/mailjet-apiv3-nodejs/commits/efa90ff73734fef042db1882e5664b4771520555))
* Update README for react example ([c98e61c](https://github.com/mailjet/mailjet-apiv3-nodejs/commits/c98e61c6d96c6bd8115935cf48b62130bd27543c))
### Build changes
* Update dist with applied changes from Client and changed TS types ([eb4dfdf](https://github.com/mailjet/mailjet-apiv3-nodejs/commits/eb4dfdf1cff30546b7f5acfee449a745dbdd38da))

22
scripts/production/node_modules/node-mailjet/LICENSE generated vendored Normal file
View File

@ -0,0 +1,22 @@
The MIT License (MIT)
Copyright (c) 2015 Mailjet
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.

1073
scripts/production/node_modules/node-mailjet/README.md generated vendored Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1 @@
6.0.6

View File

@ -0,0 +1,8 @@
import { RequestOptions, RequestConfig } from '../request/Request';
export interface ClientParams {
apiKey?: string;
apiSecret?: string;
apiToken?: string;
options?: null | RequestOptions;
config?: null | Partial<RequestConfig>;
}

View File

@ -0,0 +1,149 @@
import { ClientParams } from './Client';
import { RequestConfig, RequestOptions, RequestConstructorConfig } from '../request/Request';
import Request from '../request';
export declare type ClientConnectParams = Pick<ClientParams, 'config' | 'options'>;
declare class Client {
private version;
private config;
private options;
private apiKey?;
private apiSecret?;
private apiToken?;
constructor(params: ClientParams);
getPackageVersion(): string;
getAPIKey(): string | undefined;
getAPISecret(): string | undefined;
getAPIToken(): string | undefined;
getConfig(): {
host: string;
version: string;
output: import("axios").ResponseType;
};
getOptions(): RequestOptions;
get(resource: string, config?: RequestConstructorConfig): Request;
post(resource: string, config?: RequestConstructorConfig): Request;
put(resource: string, config?: RequestConstructorConfig): Request;
delete(resource: string, config?: RequestConstructorConfig): Request;
private init;
private cloneParams;
private setConfig;
private setOptions;
private tokenConnectStrategy;
private basicConnectStrategy;
static apiConnect(apiKey: string, apiSecret: string, params?: ClientConnectParams): Client;
static smsConnect(apiToken: string, params?: ClientConnectParams): Client;
static config: Readonly<RequestConfig>;
static packageJSON: Readonly<{
readonly name: string;
readonly version: string;
readonly main: string;
readonly browser: string;
readonly types: string;
readonly description: string;
readonly author: string;
readonly license: string;
readonly private: boolean;
readonly keywords: string[];
readonly engines: {
node: string;
npm: string;
};
readonly files: string[];
readonly directories: {
lib: string;
docs: string;
};
readonly typescript: {
definition: string;
};
readonly scripts: {
test: string;
"test:int": string;
"test:unit": string;
"test:watch": string;
cover: string;
"cover:int": string;
"cover:unit": string;
"cover:expandable": string;
build: string;
"build:dev": string;
"build:release": string;
"build:prepublish": string;
"build:watch": string;
lint: string;
"lint:fix": string;
"lint:errors": string;
"ts:run": string;
"ts:watch": string;
"ts:mocha": string;
"ts:patch": string;
init: string;
"pkg:link": string;
"pkg:prepare": string;
"pkg:precommit": string;
release: string;
"release:dry": string;
"release:quiet": string;
"release:minor": string;
"release:patch": string;
"release:major": string;
docs: string;
};
readonly dependencies: {
axios: string;
"json-bigint": string;
"url-join": string;
};
readonly devDependencies: {
"@babel/core": string;
"@babel/preset-env": string;
"@commitlint/cli": string;
"@commitlint/config-conventional": string;
"@types/chai": string;
"@types/json-bigint": string;
"@types/mocha": string;
"@types/node": string;
"@types/qs": string;
"@types/superagent": string;
"@types/url-join": string;
"@typescript-eslint/eslint-plugin": string;
"@typescript-eslint/parser": string;
"babel-loader": string;
chai: string;
eslint: string;
"eslint-config-airbnb-base": string;
"eslint-import-resolver-typescript": string;
"eslint-plugin-import": string;
"eslint-plugin-tsdoc": string;
husky: string;
mocha: string;
nock: string;
nyc: string;
qs: string;
"standard-version": string;
"terser-webpack-plugin": string;
"ts-loader": string;
"ts-node": string;
"ts-node-dev": string;
"ts-patch": string;
"tsconfig-paths": string;
"tsconfig-paths-webpack-plugin": string;
typedoc: string;
typescript: string;
"typescript-transform-paths": string;
webpack: string;
"webpack-cli": string;
"webpack-merge": string;
};
readonly homepage: string;
readonly repository: {
type: string;
url: string;
};
readonly bugs: {
url: string;
};
readonly contributors: string[];
}>;
}
export default Client;

View File

@ -0,0 +1,11 @@
import HttpMethods from './request/HttpMethods';
import Request from './request/index';
import Client from './client/index';
declare class Mailjet extends Client {
static Request: typeof Request;
static HttpMethods: typeof HttpMethods;
static Client: typeof Client;
}
export * from './types/api';
export { Client, Request, HttpMethods };
export default Mailjet;

View File

@ -0,0 +1,7 @@
declare enum HttpMethods {
Get = "get",
Post = "post",
Put = "put",
Delete = "delete"
}
export default HttpMethods;

View File

@ -0,0 +1,19 @@
import { AxiosProxyConfig, AxiosRequestConfig, RawAxiosRequestHeaders, ResponseType } from 'axios';
import { TObject } from '../types';
export interface RequestConfig {
host: string;
version: string;
output: ResponseType;
}
export interface RequestOptions {
timeout?: number;
proxy?: AxiosProxyConfig;
headers?: RawAxiosRequestHeaders;
maxBodyLength?: number;
maxContentLength?: number;
}
export declare type SubPath = 'REST' | 'DATA' | '';
export declare type RequestData = string | TObject.UnknownRec;
export declare type RequestParams = TObject.UnknownRec;
export declare type RequestConstructorConfig = null | Partial<RequestConfig>;
export declare type RequestAxiosConfig = Required<Pick<AxiosRequestConfig, 'url' | 'data' | 'params' | 'method' | 'headers' | 'responseType' | 'transformResponse'>> & Pick<AxiosRequestConfig, 'auth' | 'timeout' | 'proxy' | 'maxBodyLength' | 'maxContentLength'>;

View File

@ -0,0 +1,36 @@
import { TObject } from '../types';
import { LibraryResponse, LibraryLocalResponse } from '../types/api';
import HttpMethods from './HttpMethods';
import { RequestData, RequestParams, RequestConstructorConfig } from './Request';
import Client from '../client';
declare type UnknownRec = TObject.UnknownRec;
declare class Request {
private readonly client;
private readonly method;
private readonly config;
private readonly resource;
private url;
private subPath;
private actionPath;
constructor(client: Client, method: HttpMethods, resource: string, config?: RequestConstructorConfig);
getUserAgent(): string;
getCredentials(): {
apiToken: string | undefined;
apiKey: string | undefined;
apiSecret: string | undefined;
};
private getContentType;
private getRequestBody;
private buildFullUrl;
private buildSubPath;
private makeRequest;
private setBaseURL;
id(value: string | number): this;
action(name: string): this;
request<Body extends RequestData>(data?: RequestData, params?: RequestParams, performAPICall?: true): Promise<LibraryResponse<Body>>;
request<Body extends RequestData, Params extends UnknownRec>(data?: Body, params?: Params, performAPICall?: false): Promise<LibraryLocalResponse<Body, Params>>;
static protocol: "https://";
static parseToJSONb(text: string): any;
static isBrowser(): boolean;
}
export default Request;

View File

@ -0,0 +1,188 @@
import { Common } from './Common';
export declare namespace DraftCampaign {
export enum EditMode {
Tool2 = "tool2",
HTML2 = "html2",
MJML = "mjml"
}
export enum CampaignDraftStatus {
AXCanceled = -3,
Deleted = -2,
Archived = -1,
Draft = 0,
Programmed = 1,
Sent = 2,
AXTested = 3,
AXSelected = 4
}
export enum CampaignDraftSendingStatus {
AXCancelled = "AXCancelled",
Deleted = "Deleted",
Archived = "Archived",
Draft = "Draft",
Programmed = "Programmed",
Sent = "Sent",
AXTested = "AXTested",
AXSelected = "AXSelected"
}
export interface Recipient {
Email: string;
Name?: string;
}
export interface CampaignDraft<AXTesting = Common.UnknownRec> {
ID: number;
AXFraction: number;
AXFractionName: string;
AXTesting: AXTesting;
Current: number;
EditMode: EditMode;
IsStarred: boolean;
IsTextPartIncluded: boolean;
ReplyEmail: string;
SenderName: string;
TemplateID: number;
Title: string;
CampaignID: number;
ContactsListID: number;
CreatedAt: string;
DeliveredAt: string;
Locale: string;
ModifiedAt: string;
Preset: string;
SegmentationID: number;
Sender: string;
SenderEmail: string;
Status: CampaignDraftStatus;
Subject: string;
Url: string;
Used: boolean;
}
export interface CampaignDraftDetailContent<Headers = Common.UnknownRec> {
Headers: Headers;
'Html-part': string;
'Text-part': string;
MJMLContent: string;
}
export interface CampaignDraftSchedule {
Date: string;
Status: string;
}
export type PostCampaignDraftBody<AXTesting = Common.UnknownRec> = {
Locale: string;
Subject: string;
AXFraction?: number;
AXFractionName?: string;
AXTesting?: AXTesting;
Current?: number;
EditMode?: EditMode;
IsStarred?: boolean;
IsTextPartIncluded?: boolean;
ReplyEmail?: string;
SenderName?: string;
TemplateID?: number;
Title?: string;
ContactsListID?: number;
ContactsListAlt?: string;
SegmentationID?: number;
SegmentationAlt?: string;
Sender?: string;
SenderEmail?: string;
};
export type PutCampaignDraftBody<AXTesting = Common.UnknownRec> = Omit<Partial<PostCampaignDraftBody<AXTesting>>, 'ContactsListAlt'> & {
Status?: CampaignDraftStatus;
};
export type GetCampaignDraftQueryParams = Partial<Common.Pagination> & {
AXTesting?: number;
Campaign?: number;
ContactsList?: number;
DeliveredAt?: string;
EditMode?: EditMode;
IsArchived?: boolean;
IsCampaign?: boolean;
IsDeleted?: boolean;
IsHandled?: boolean;
IsStarred?: boolean;
Modified?: boolean;
NewsLetterTemplate?: number;
Status?: CampaignDraftStatus;
Subject?: string;
Template?: number;
};
export type PostCampaignDraftDetailContentBody<Headers = Common.UnknownRec> = Partial<CampaignDraftDetailContent<Headers>>;
export type PostCampaignDraftScheduleBody = {
Date: string;
};
export type PutCampaignDraftScheduleBody = Partial<PostCampaignDraftScheduleBody>;
export type PostCampaignDraftTestBody = {
Recipients: Recipient[];
};
type CampaignDraftResponse = Common.Response<CampaignDraft[]>;
type CampaignDraftScheduleResponse = Common.Response<CampaignDraftSchedule[]>;
type CampaignDraftDetailContentResponse<Headers = Common.UnknownRec> = Common.Response<Array<CampaignDraftDetailContent<Headers>>>;
type CampaignDraftStatusResponse = Common.Response<Array<{
Status: CampaignDraftSendingStatus;
}>>;
export type PostCampaignDraftResponse = CampaignDraftResponse;
export type PutCampaignDraftResponse = CampaignDraftResponse;
export type GetCampaignDraftResponse = CampaignDraftResponse;
export type PostCampaignDraftScheduleResponse = CampaignDraftScheduleResponse;
export type PutCampaignDraftScheduleResponse = CampaignDraftScheduleResponse;
export type GetCampaignDraftScheduleResponse = CampaignDraftScheduleResponse;
export type PostCampaignDraftDetailContentResponse<Headers = Common.UnknownRec> = CampaignDraftDetailContentResponse<Headers>;
export type GetCampaignDraftDetailContentResponse<Headers = Common.UnknownRec> = CampaignDraftDetailContentResponse<Headers>;
export type PostCampaignDraftSend = CampaignDraftStatusResponse;
export type PostCampaignDraftTest = CampaignDraftStatusResponse;
export type GetCampaignDraftStatus = CampaignDraftStatusResponse;
export {};
}
export declare namespace SentCampaign {
export enum CampaignType {
Transactional = 1,
Marketing = 2,
Unknown = 3
}
export interface Campaign {
ID: number;
IsDeleted: boolean;
IsStarred: boolean;
CampaignType: CampaignType;
CreatedAt: string;
CustomValue: string;
FirstMessageID: number;
FromEmail: string;
FromID: number;
FromName: string;
HasHtmlCount: number;
HasTxtCount: number;
ListID: number;
NewsLetterID: number;
SegmentationID: number;
SendEndAt: string;
SendStartAt: string;
SpamassScore: number;
Subject: string;
WorkflowID: number;
}
export type PutCampaignBody = {
IsDeleted?: boolean;
IsStarred?: boolean;
};
export type GetCampaignQueryParams = Partial<Common.TimestampPeriod> & Partial<Common.Pagination> & {
CampaignID?: number;
ContactsListID?: number;
CustomCampaign?: string;
From?: string;
FromDomain?: string;
FromID?: number;
FromType?: CampaignType;
IsDeleted?: boolean;
IsNewsletterTool?: boolean;
IsStarred?: boolean;
Period?: Common.Period;
WorkflowID?: number;
};
type CampaignResponse = Common.Response<Campaign[]>;
export type PutCampaignResponse = CampaignResponse;
export type GetCampaignResponse = CampaignResponse;
export {};
}

View File

@ -0,0 +1,24 @@
export declare namespace Common {
type UnknownRec = Record<string, unknown>;
interface Pagination {
countOnly: boolean;
Limit: number;
Offset: number;
Sort: string;
}
interface TimestampPeriod {
FromTS: string | number;
ToTS: string | number;
}
type Response<Entity> = {
Count: number;
Total: number;
Data: Entity;
};
enum Period {
Day = "Day",
Week = "Week",
Month = "Month",
Year = "Year"
}
}

View File

@ -0,0 +1,344 @@
import { Common } from './Common';
export declare namespace Contact {
export interface Contact {
ID: number;
IsExcludedFromCampaigns: boolean;
Name: string;
CreatedAt: string;
DeliveredCount: number;
Email: string;
ExclusionFromCampaignsUpdatedAt: string;
IsOptInPending: boolean;
IsSpamComplaining: boolean;
LastActivityAt: string;
LastUpdateAt: string;
}
export type PostContactBody = {
Email: string;
IsExcludedFromCampaigns?: boolean;
Name?: string;
};
export type PutContactBody = Omit<PostContactBody, 'Email'>;
export type GetContactQueryParams = Partial<Common.Pagination> & {
Campaign?: number;
ContactsList?: number;
IsExcludedFromCampaigns?: boolean;
};
type ContactResponse = {
Count: number;
Total: number;
Data: Contact[];
};
export type PostContactResponse = ContactResponse;
export type PutContactResponse = ContactResponse;
export type GetContactResponse = ContactResponse;
export {};
}
export declare namespace ContactList {
export interface ContactList {
ID: number;
IsDeleted: boolean;
Name: string;
Address: string;
CreatedAt: string;
SubscriberCount: number;
}
export type PostContactListBody = {
Name: string;
IsDeleted?: boolean;
};
export type PutContactListBody = Partial<PostContactListBody>;
export type GetContactListQueryParams = Partial<Common.Pagination> & {
Address?: string;
ExcludeID?: number;
IsDeleted?: boolean;
Name?: string;
};
type ContactListResponse = Common.Response<ContactList[]>;
export type PostContactListResponse = ContactListResponse;
export type PutContactListResponse = ContactListResponse;
export type GetContactListResponse = ContactListResponse;
export {};
}
export declare namespace BulkContactManagement {
export enum ManageContactsAction {
AddForce = "addforce",
AddNoForce = "addnoforce",
Remove = "remove",
UnSub = "unsub"
}
export enum ImportListAction {
AddForce = "addforce",
AddNoForce = "addnoforce",
UnSub = "unsub",
DuplicateOverride = "duplicate-override",
DuplicateNoOverride = "duplicate-no-override"
}
export enum ImportCSVMethod {
AddForce = "addforce",
AddNoForce = "addnoforce",
Remove = "remove",
UnSub = "unsub",
ExcludeMarketing = "excludemarketing",
IncludeMarketing = "includemarketing"
}
export enum CSVImportStatus {
Upload = "Upload",
Completed = "Completed",
Abort = "Abort"
}
export enum JobStatus {
Completed = "Completed",
InProgress = "In Progress",
Error = "Error"
}
export interface Job {
JobID: number;
}
export interface CSVImport {
ID: number;
ErrTreshold: number;
ImportOptions: string;
Method: ImportCSVMethod;
AliveAt: string;
ContactsListID: number;
Count: number;
Current: number;
DataID: number;
Errcount: number;
JobEnd: string;
JobStart: string;
RequestAt: string;
Status: CSVImportStatus;
}
export interface ContactList {
ListID: number;
Action: ManageContactsAction;
}
export interface ContactManageManyContacts {
ContactsLists: ContactList[];
Count: number;
Error: string;
ErrorFile: string;
JobEnd: string;
JobStart: string;
Status: JobStatus;
}
export interface ContactsListImportList {
JobID: number;
Action: ImportListAction;
ListID: number;
}
export type ContactBody<Properties = Common.UnknownRec> = {
Email: string;
Name?: string;
IsExcludedFromCampaigns?: boolean;
Properties?: Properties;
};
export type PostContactManageManyContactsBody<Properties = Common.UnknownRec> = {
Contacts: Array<ContactBody<Properties>>;
ContactsLists?: ContactList[];
};
export type PostContactsListImportListBody = {
Action: ImportListAction;
ListID: number;
};
export type PostContactsListManageManyContactsBody<Properties = Common.UnknownRec> = {
Action: ManageContactsAction;
Contacts: Array<ContactBody<Properties>>;
};
export type PostCSVImportBody = {
ContactsListID: number;
DataID: number;
ErrTreshold?: number;
ImportOptions?: string;
Method?: ImportCSVMethod;
};
export type PutCSVImportBody = Partial<PostCSVImportBody> & {
Status?: CSVImportStatus;
};
export type GetCSVImportQueryParams = Partial<Common.Pagination>;
type JobResponse = Common.Response<Job[]>;
type CSVImportResponse = Common.Response<CSVImport[]>;
type ContactManageManyContactsResponse = Common.Response<ContactManageManyContacts[]>;
export type PostContactManageManyContactsResponse = JobResponse;
export type GetContactManageManyContactsResponse = ContactManageManyContactsResponse;
export type PostContactsListImportListResponse = JobResponse;
export type GetContactsListImportListResponse = Common.Response<ContactsListImportList[]>;
export type PostContactsListManageManyContactsResponse = JobResponse;
export type GetContactsListManageManyContactsResponse = ContactManageManyContactsResponse;
export type PostCSVImportResponse = CSVImportResponse;
export type PutCSVImportResponse = CSVImportResponse;
export type GetCSVImportResponse = CSVImportResponse;
export {};
}
export declare namespace ContactProperties {
export enum DataType {
Str = "str",
Int = "int",
Float = "float",
Bool = "bool",
DateTime = "datetime"
}
export enum NameSpace {
Static = "static",
Historic = "historic"
}
export interface ContactProperty {
Name: string;
Value: string;
}
export interface ContactData {
ID: number;
ContactID: number;
Data: ContactProperty[];
}
export interface ContactMetaData {
ID: number;
Datatype: DataType;
Name: string;
NameSpace: NameSpace;
}
export type PostContactMetaDataBody = {
Name: string;
Datatype?: DataType;
NameSpace?: NameSpace;
};
export type PutContactMetaDataBody = {
Name?: string;
Datatype?: DataType;
};
export type GetContactMetaDataQueryParams = Partial<Common.Pagination> & {
DataType?: DataType;
Namespace?: NameSpace;
};
export type PutContactDataBody = {
Data: ContactProperty[];
};
export type GetContactDataQueryParams = Partial<Common.Pagination> & {
Campaign?: number;
ContactEmail?: string;
ContactsList?: number;
Fields?: string;
LastActivityAt?: string;
};
type ContactDataResponse = Common.Response<ContactData[]>;
type ContactMetaDataResponse = Common.Response<ContactMetaData[]>;
export type PostContactMetaDataResponse = ContactMetaDataResponse;
export type PutContactMetaDataResponse = ContactMetaDataResponse;
export type GetContactMetaDataResponse = ContactMetaDataResponse;
export type PutContactDataResponse = ContactDataResponse;
export type GetContactDataResponse = ContactDataResponse;
export {};
}
export declare namespace ContactSubscription {
export interface ManageContacts<Properties = Common.UnknownRec> {
Email: string;
Action: BulkContactManagement.ManageContactsAction;
Name: string;
Properties: Properties;
}
export interface ListRecipient {
ID: number;
IsUnsubscribed: boolean;
ContactID: number;
ListID: number;
ListName: string;
SubscribedAt: string;
UnsubscribedAt: string;
}
export interface ContactsList {
ListID: number;
IsUnsub: boolean;
SubscribedAt: string;
}
export interface ContactsListSignup {
ID: number;
ConfirmAt: number;
ConfirmIp: string;
ContactID: number;
Email: string;
ListID: number;
SignupAt: number;
SignupIp: string;
SignupKey: string;
SourceId: number;
Source: string;
}
export type PostContactManageContactsListsBody = {
ContactsLists: BulkContactManagement.ContactList[];
};
export type PostContactsListManageContactBody<Properties = Common.UnknownRec> = {
Email: string;
Action: BulkContactManagement.ManageContactsAction;
Name?: string;
Properties?: Properties;
};
export type PostListRecipientBody = {
IsUnsubscribed?: boolean;
ContactID: number;
ContactAlt?: string;
ListID: number;
ListAlt?: string;
};
export type PutListRecipientBody = {
IsUnsubscribed?: boolean;
};
export type GetListRecipientQueryParams = Partial<Common.Pagination> & {
Blocked?: boolean;
Contact?: number;
ContactEmail?: string;
ContactsList?: number;
IgnoreDeleted?: boolean;
IsExcludedFromCampaigns?: boolean;
LastActivityAt?: string;
ListName?: string;
Opened?: boolean;
Unsub?: boolean;
};
export type GetContactsListSignupQueryParams = Partial<Common.Pagination> & {
Contact?: number;
ContactsList?: number;
Domain?: string;
Email?: string;
LocalPart?: string;
MaxConfirmAt?: number;
MinConfirmAt?: number;
MaxSignupAt?: number;
MinSignupAt?: number;
SignupIp?: string;
Source?: string;
SourceID?: number;
};
type ListRecipientResponse = Common.Response<ListRecipient[]>;
export type PostContactManageContactsListsResponse = Common.Response<Array<{
ContactsLists: BulkContactManagement.ContactList[];
}>>;
export type PostContactsListManageContactResponse<Properties = Common.UnknownRec> = Common.Response<Array<ManageContacts<Properties>>>;
export type PostListRecipientResponse = ListRecipientResponse;
export type PutListRecipientResponse = ListRecipientResponse;
export type GetListRecipientResponse = ListRecipientResponse;
export type GetContactGetContactsListsResponse = Common.Response<ContactsList[]>;
export type GetContactsListSignupResponse = Common.Response<ContactsListSignup[]>;
export {};
}
export declare namespace ContactVerification {
interface VerificationSummary<Result = Common.UnknownRec, Risk = Common.UnknownRec> {
result: Result;
risk: Risk;
}
interface ContactsListVerification<Result = Common.UnknownRec, Risk = Common.UnknownRec> {
Akid: number;
ContactListID: number;
Count: number;
Error: string;
ID: number;
JobEnd: string;
JobStart: string;
Method: string;
ResponseURL: string;
Status: string;
Summary: VerificationSummary<Result, Risk>;
}
type GetContactsListVerifyResponse<Result = Common.UnknownRec, Risk = Common.UnknownRec> = Common.Response<Array<ContactsListVerification<Result, Risk>>>;
}

View File

@ -0,0 +1,10 @@
import { AxiosResponse } from 'axios';
export interface LibraryResponse<Body> {
response: AxiosResponse<Body>;
body: Body;
}
export interface LibraryLocalResponse<Data, Params> {
body: Data;
params: Params;
url: string;
}

View File

@ -0,0 +1,149 @@
import { Common } from './Common';
export declare namespace Message {
enum MessageState {
UserUnknown = 1,
MailboxInactive = 2,
QuotaExceeded = 3,
InvalidDomain = 4,
NoMailHost = 5,
RelayOrAccessDenied = 6,
SenderBlocked = 7,
ContentBlocked = 8,
PolicyIssue = 9,
SystemIssue = 10,
ProtocolIssue = 11,
ConnectionIssue = 12,
GreyListed = 13,
PreBlocked = 14,
DuplicateInCampaign = 15,
SpamPreBlocked = 16,
BadOrEmptyTemplate = 17,
ErrorInTemplateLanguage = 18,
TypoFix = 19,
BlackListed = 20,
SpamReporter = 21
}
enum FromType {
Transactional = 1,
Marketing = 2,
Unknown = 3
}
enum MessageStatus {
Processed = 0,
Queued = 1,
Sent = 2,
Opened = 3,
Clicked = 4,
Bounce = 5,
Spam = 6,
Unsub = 7,
Blocked = 8,
SoftBounce = 9,
HardBounce = 10,
Deferred = 11
}
enum CurrentMessageStatus {
Unknown = "unknown",
Queued = "queued",
Sent = "sent",
Opened = "opened",
Clicked = "clicked",
Bounce = "bounce",
Spam = "spam",
Unsub = "unsub",
Blocked = "blocked",
HardBounced = "hardbounced",
SoftBounced = "softbounced",
Deferred = "deferred"
}
enum EventType {
Sent = "sent",
Opened = "opened",
Clicked = "clicked",
Bounced = "bounced",
Blocked = "blocked",
Unsub = "unsub",
Spam = "spam"
}
interface MessageTracked {
IsClickTracked: boolean;
IsHTMLPartIncluded: boolean;
IsOpenTracked: boolean;
IsTextPartIncluded: boolean;
IsUnsubTracked: boolean;
}
interface Message extends MessageTracked {
ID: number;
ArrivedAt: string;
AttachmentCount: number;
AttemptCount: number;
CampaignID: number;
ContactAlt: string;
ContactID: number;
Delay: number;
DestinationID: number;
FilterTime: number;
MessageSize: number;
SenderID: number;
SpamassassinScore: number;
SpamassRules: string;
StateID: MessageState;
StatePermanent: boolean;
Status: CurrentMessageStatus;
Subject: string;
UUID: string;
}
interface MessageHistory {
Comment: string;
EventAt: number;
EventType: EventType;
State: string;
Useragent: string;
UseragentID: number;
}
interface MessageInformation<Rules = Common.UnknownRec> {
ID: number;
CampaignID: number;
ClickTrackedCount: number;
ContactID: number;
CreatedAt: string;
MessageSize: number;
OpenTrackedCount: number;
QueuedCount: number;
SendEndAt: string;
SentCount: number;
SpamAssassinRules: Rules;
SpamAssassinScore: number;
}
type GetMessageQueryParams = Partial<Common.TimestampPeriod> & Partial<Common.Pagination> & {
Campaign?: number;
Contact?: number;
CustomID?: string;
Destination?: number;
FromType?: FromType;
MessageState?: MessageState;
MessageStatus?: MessageStatus;
PlanSubscription?: number;
SenderID?: number;
ShowContactAlt?: boolean;
ShowCustomID?: boolean;
ShowSubject?: boolean;
};
type GetMessageInformationQueryParams = Partial<Common.TimestampPeriod> & Partial<Common.Pagination> & {
CampaignID?: number;
ContactsList?: number;
CustomCampaign?: string;
From?: string;
FromDomain?: string;
FromID?: number;
FromType?: FromType;
IsDeleted?: boolean;
IsNewsletterTool?: boolean;
IsStarred?: boolean;
MessageStatus?: MessageStatus;
Period?: Common.Period;
};
type GetMessagesResponse = Common.Response<Message[]>;
type GetMessageHistoryResponse = Common.Response<MessageHistory[]>;
type GetMessageInformationResponse<Rules = Common.UnknownRec> = Common.Response<Array<MessageInformation<Rules>>>;
}

View File

@ -0,0 +1,71 @@
import { Message } from './Message';
import { Common } from './Common';
export declare namespace MessageEvent {
interface BounceStatistic {
ID: number;
BouncedAt: string;
CampaignID: number;
ContactID: number;
IsBlocked: boolean;
IsStatePermanent: boolean;
StateID: Message.MessageState;
}
interface ClickStatistic {
ID: number;
ClickedAt: string;
ClickedDelay: number;
ContactID: number;
MessageID: number;
Url: string;
UserAgentID: number;
}
interface OpenInformation {
ArrivedAt: string;
CampaignID: number;
ContactID: number;
MessageID: number;
OpenedAt: string;
UserAgentFull: string;
UserAgentID: number;
}
type GetBounceStatisticsQueryParams = Partial<Common.TimestampPeriod> & Partial<Common.Pagination> & {
CampaignID?: number;
ContactsList?: number;
EventFromTs?: string;
EventToTs?: string;
Period?: Common.Period;
};
type GetClickStatisticsQueryParams = Partial<Common.TimestampPeriod> & Partial<Common.Pagination> & {
CampaignID?: number;
ContactsList?: number;
CustomCampaign?: string;
EventFromTs?: string;
EventToTs?: string;
From?: string;
FromDomain?: string;
FromID?: number;
FromType?: Message.FromType;
IsDeleted?: boolean;
IsNewsletterTool?: boolean;
MessageID?: number;
MessageStatus?: Message.MessageStatus;
Period?: Common.Period;
};
type GetOpenInformationQueryParams = Partial<Common.TimestampPeriod> & Partial<Common.Pagination> & {
CampaignID?: number;
ContactsList?: number;
CustomCampaign?: string;
EventFromTs?: string;
EventToTs?: string;
From?: string;
FromDomain?: string;
FromID?: number;
FromType?: Message.FromType;
IsDeleted?: boolean;
MessageStatus?: Message.MessageStatus;
Period?: Common.Period;
};
type GetBounceStatisticsResponse = Common.Response<BounceStatistic[]>;
type GetClickStatisticsResponse = Common.Response<ClickStatistic[]>;
type GetOpenInformationResponse = Common.Response<OpenInformation[]>;
}

View File

@ -0,0 +1,21 @@
import { Common } from './Common';
export declare namespace Parse {
export interface ParseRoute {
ID: number;
APIKeyID: number;
Email: string;
Url: string;
}
export type PostParseRouteBody = {
Url: string;
APIKeyID?: number;
Email?: string;
};
export type PutParseRouteBody = Partial<PostParseRouteBody>;
export type GetParseRouteQueryParams = Partial<Common.Pagination>;
type ParseRouteResponse = Common.Response<ParseRoute[]>;
export type PostParseRouteResponse = ParseRouteResponse;
export type PutParseRouteResponse = ParseRouteResponse;
export type GetParseRouteResponse = ParseRouteResponse;
export {};
}

View File

@ -0,0 +1,39 @@
import { SendMessage } from './SendMessage';
import { Common } from './Common';
export declare namespace SMSMessage {
type SMS = {
From: string;
To: string;
MessageID: string | number;
SMSCount: number;
CreationTS: number;
SentTS: number;
Cost: SendMessage.Cost;
Status: SendMessage.SendStatus;
};
type SMSExport = {
ID: number;
URL: string;
Status: SendMessage.SendStatus;
CreationTS: number;
ExpirationTS: number;
};
type PostSMSExportBody = Common.TimestampPeriod;
type GetSMSQueryParams = Partial<Common.TimestampPeriod> & Partial<Pick<Common.Pagination, 'Limit' | 'Offset'>> & {
StatusCode?: Array<string>;
To?: string;
IDs?: string;
};
type GetSMSCountQueryParams = Partial<Common.TimestampPeriod> & {
StatusCode?: Array<string>;
To?: string;
};
type PostSMSExportResponse = SMSExport;
type GetSMSExportResponse = SMSExport;
type GetSMSResponse = {
Data: SMS[];
};
type GetSMSCountResponse = {
Count: number;
};
}

View File

@ -0,0 +1,32 @@
import { Common } from './Common';
export declare namespace Segmentation {
export enum SegmentStatus {
Used = "used",
UnUsed = "unused",
Deleted = "deleted"
}
export interface ContactFilter {
ID: number;
Description: string;
Expression: string;
Name: string;
Status: SegmentStatus;
}
export type PostContactFilterBody = {
Name: string;
Expression: string;
Description?: string;
};
export type PutContactFilterBody = Partial<PostContactFilterBody> & {
Status?: SegmentStatus;
};
export type GetContactFilterQueryParams = Partial<Common.Pagination> & {
ShowDeleted?: boolean;
Status?: SegmentStatus;
};
type ContactFilterResponse = Common.Response<ContactFilter[]>;
export type PostContactFilterResponse = ContactFilterResponse;
export type PutContactFilterResponse = ContactFilterResponse;
export type GetContactFilterResponse = ContactFilterResponse;
export {};
}

View File

@ -0,0 +1,147 @@
import { Common } from './Common';
export declare namespace SendEmailV3 {
type MjTemplateErrorDeliver = '0' | 'deliver';
type MjDeduplicateCampaign = 0 | 1;
type MjTrackOpen = 0 | 1 | 2;
interface Recipient {
Email: string;
Name?: string;
Vars?: string;
}
interface Attachment {
Filename: string;
Content: string;
'Content-type': string;
}
type BodyMj = {
'Mj-TemplateID'?: number;
'Mj-TemplateLanguage'?: boolean;
'Mj-TemplateErrorReporting'?: string;
'Mj-TemplateErrorDeliver'?: MjTemplateErrorDeliver;
'Mj-prio'?: number;
'Mj-campaign'?: string;
'Mj-deduplicatecampaign'?: MjDeduplicateCampaign;
'Mj-trackopen'?: MjTrackOpen;
'Mj-CustomID'?: string;
'Mj-EventPayload'?: string;
};
type Body<Headers = Common.UnknownRec, Vars = Common.UnknownRec> = BodyMj & {
FromEmail?: string;
FromName?: string;
Recipients?: Recipient[];
Sender?: boolean;
Subject?: string;
'Text-part'?: string;
'Html-part'?: string;
To?: string;
Cc?: string;
Bcc?: string;
Attachments?: Attachment[];
Inline_attachments?: Attachment[];
Headers?: Headers;
Vars?: Vars;
};
interface ResponseSent {
Email: string;
MessageID: number;
MessageUUID: string;
}
type Response = {
Sent: ResponseSent[];
};
}
export declare namespace SendEmailV3_1 {
enum TrackOpens {
AccountDefault = "account_default",
Disabled = "disabled",
Enabled = "enabled"
}
enum TrackClicks {
AccountDefault = "account_default",
Disabled = "disabled",
Enabled = "enabled"
}
interface EmailAddressTo {
Email: string;
Name?: string;
}
interface Attachment {
Filename: string;
ContentType: string;
Base64Content: string;
}
interface InlinedAttachment extends Attachment {
ContentID?: string;
}
interface Message<Headers = Common.UnknownRec, Variables = Common.UnknownRec> {
From: EmailAddressTo;
Sender?: EmailAddressTo;
To: EmailAddressTo[];
Cc?: EmailAddressTo[];
Bcc?: EmailAddressTo[];
ReplyTo?: EmailAddressTo;
Subject?: string;
TextPart?: string;
HTMLPart?: string;
TemplateID?: number;
TemplateLanguage?: boolean;
TemplateErrorReporting?: EmailAddressTo;
TemplateErrorDeliver?: boolean;
Attachments?: Attachment[];
InlinedAttachments?: InlinedAttachment[];
Priority?: number;
CustomCampaign?: string;
DeduplicateCampaign?: boolean;
TrackOpens?: TrackOpens;
TrackClicks?: TrackClicks;
CustomID?: string;
EventPayload?: string;
URLTags?: string;
Headers?: Headers;
Variables?: Variables;
}
enum ResponseStatus {
Success = "success",
Error = "error"
}
interface ResponseError {
ErrorIdentifier: string;
ErrorCode: string;
StatusCode: number;
ErrorMessage: string;
ErrorRelatedTo: Array<string>;
}
interface ResponseEmailAddressTo {
Email: string;
MessageUUID: string;
MessageID: number;
MessageHref: string;
}
type Body<Headers = Common.UnknownRec, Variables = Common.UnknownRec, Globals = Common.UnknownRec> = {
Messages: Array<Message<Headers, Variables>>;
SandboxMode?: boolean;
AdvanceErrorHandling?: boolean;
Globals?: Globals;
} | {
Messages: Array<Omit<Message<Headers, Variables>, 'From'> & {
From?: string;
}>;
SandboxMode?: boolean;
AdvanceErrorHandling?: boolean;
Globals: {
From: EmailAddressTo;
[key: string]: unknown;
};
};
interface ResponseMessage {
Status: ResponseStatus;
Errors: ResponseError[];
CustomID: string;
To: ResponseEmailAddressTo[];
Cc: ResponseEmailAddressTo[];
Bcc: ResponseEmailAddressTo[];
}
type Response = {
Messages: ResponseMessage[];
};
}

View File

@ -0,0 +1,27 @@
export declare namespace SendMessage {
interface Cost {
Value: number;
Currency: string;
}
interface SendStatus {
Code: number;
Name: string;
Description: string;
}
type Body = {
From: string;
To: string;
Text: string;
};
type Response = {
From: string;
To: string;
Text: string;
MessageID: string | number;
SMSCount: number;
CreationTS: number;
SentTS: number;
Cost: Cost;
Status: SendStatus;
};
}

View File

@ -0,0 +1,126 @@
import { Common } from './Common';
export declare namespace Sender {
export enum EmailType {
Transactional = "transactional",
Bulk = "bulk",
Unknown = "unknown"
}
export enum SenderStatus {
Inactive = "Inactive",
Active = "Active",
Deleted = "Deleted"
}
export interface Sender {
ID: number;
EmailType: EmailType;
IsDefaultSender: boolean;
Name: string;
CreatedAt: string;
DNSID: number;
Email: string;
Filename: string;
Status: SenderStatus;
}
export interface SenderValidate {
ValidationMethod: string;
Errors: string;
GlobalError: string;
}
export type PostSenderBody = {
Email: string;
EmailType?: EmailType;
IsDefaultSender?: boolean;
Name?: string;
};
export type PutSenderBody = Omit<PostSenderBody, 'Email'>;
export type GetSenderQueryParams = Partial<Common.Pagination> & {
DnsID?: number;
Domain?: string;
Email?: string;
IsDomainSender?: boolean;
LocalPart?: string;
ShowDeleted?: boolean;
Status?: SenderStatus;
};
type SenderResponse = Common.Response<Sender[]>;
export type PostSenderResponse = SenderResponse;
export type PutSenderResponse = SenderResponse;
export type GetSenderResponse = SenderResponse;
export type PostSenderValidateResponse = Common.Response<SenderValidate[]>;
export {};
}
export declare namespace Metasender {
export interface MetaSender {
ID: number;
Description: string;
CreatedAt: string;
Email: string;
Filename: string;
IsEnabled: boolean;
}
export type PostMetaSenderBody = {
Email: string;
Description?: string;
};
export type PutMetaSenderBody = Omit<PostMetaSenderBody, 'Email'>;
export type GetMetaSenderQueryParams = Partial<Common.Pagination> & {
DNS?: number;
};
type MetaSenderResponse = Common.Response<MetaSender[]>;
export type PostMetaSenderResponse = MetaSenderResponse;
export type PutMetaSenderResponse = MetaSenderResponse;
export type GetMetaSenderResponse = MetaSenderResponse;
export {};
}
export declare namespace DNS {
enum DKIMConfigurationCheckStatus {
OK = "OK",
Error = "Error",
NotChecked = "Not checked"
}
enum DKIMConfigurationStatus {
OK = "OK",
Error = "Error"
}
enum SPFConfigurationCheckStatus {
OK = "OK",
Error = "Error",
NotChecked = "Not checked",
NotFound = "Not found"
}
enum SPFConfigurationStatus {
OK = "OK",
Error = "Error"
}
interface DNS {
ID: number;
DKIMRecordName: string;
DKIMRecordValue: string;
DKIMStatus: DKIMConfigurationCheckStatus;
Domain: string;
IsCheckInProgress: boolean;
LastCheckAt: string;
OwnerShipToken: string;
OwnerShipTokenRecordName: string;
SPFRecordValue: string;
SPFStatus: SPFConfigurationCheckStatus;
}
interface DNSCheck {
DKIMErrors: string;
DKIMRecordCurrentValue: string;
DKIMStatus: DKIMConfigurationStatus;
SPFErrors: string;
SPFRecordCurrentValue: string;
SPFStatus: SPFConfigurationStatus;
}
type GetDNSQueryParams = Partial<Common.Pagination> & {
IsCheckInProgress?: boolean;
IsSenderIdentified?: boolean;
IsYahooFBL?: boolean;
MaxLastCheckAt?: string;
MinLastCheckAt?: string;
SPFStatus?: SPFConfigurationCheckStatus;
};
type GetDNSResponse = Common.Response<DNS[]>;
type PostDNSCheckResponse = Common.Response<DNSCheck[]>;
}

View File

@ -0,0 +1,87 @@
import { Common } from './Common';
export declare namespace APIKeyConfiguration {
export enum RunLevel {
Normal = "Normal",
SoftLock = "Softlock",
HardLock = "Hardlock"
}
export interface ApiKey {
ID: number;
ACL: string;
IsActive: boolean;
APIKey: string;
CreatedAt: string;
IsMaster: boolean;
Name: string;
QuarantineValue: number;
Runlevel: RunLevel;
SecretKey: string;
TrackHost: string;
UserID: number;
}
export type PostApiKeyBody = {
Name: string;
ACL?: string;
IsActive?: boolean;
};
export type PutApiKeyBody = Partial<PostApiKeyBody>;
export type GetApiKeyQueryParams = Partial<Common.Pagination> & {
APIKey?: string;
IsActive?: boolean;
IsMaster?: boolean;
Name?: string;
};
type ApiKeyResponse = Common.Response<ApiKey[]>;
export type PostApiKeyResponse = ApiKeyResponse;
export type PutApiKeyResponse = ApiKeyResponse;
export type GetApiKeyResponse = ApiKeyResponse;
export {};
}
export declare namespace AccountSetting {
export interface MyProfile {
ID: number;
AddressCity: string;
AddressCountry: string;
AddressPostalCode: string;
AddressState: string;
AddressStreet: string;
BillingEmail: string;
BirthdayAt: string;
CompanyName: string;
CompanyNumOfEmployees: string;
ContactPhone: string;
EstimatedVolume: number;
Features: string;
Firstname: string;
Industry: number;
JobTitle: string;
Lastname: string;
VATNumber: string;
Website: string;
VAT: number;
UserID: number;
}
export interface User {
ID: number;
ACL: string;
Email: string;
LastLoginAt: string;
Locale: string;
Timezone: string;
CreatedAt: string;
FirstIp: string;
LastIp: string;
MaxAllowedAPIKeys: number;
Username: string;
WarnedRatelimitAt: string;
}
export type PutMyProfileBody = Partial<Omit<MyProfile, 'ID' | 'VAT' | 'UserID'>>;
export type PutUserBody = Partial<Omit<User, 'ID' | 'CreatedAt' | 'FirstIp' | 'MaxAllowedAPIKeys' | 'WarnedRatelimitAt'>>;
type MyProfileResponse = Common.Response<MyProfile[]>;
type UserResponse = Common.Response<User[]>;
export type PutMyProfileResponse = MyProfileResponse;
export type GetMyProfileResponse = MyProfileResponse;
export type PutUserResponse = UserResponse;
export type GetUserResponse = UserResponse;
export {};
}

View File

@ -0,0 +1,272 @@
import { Common } from './Common';
import { Message } from './Message';
export declare namespace Statistic {
enum CampaignOverviewIDType {
SentCampaign = "Campaign",
ABTesting = "AX",
Draft = "NL"
}
enum CampaignOverviewEditMode {
Tool = "tool",
HTML = "html",
Tool2 = "tool2",
HTML2 = "html2",
MJML = "mjml"
}
enum CampaignOverviewEditType {
Full = "full",
Unknown = "unknown"
}
enum CounterSource {
Campaign = "Campaign",
APIKey = "APIKey",
List = "List",
Sender = "Sender"
}
enum CounterResolution {
Highest = "Highest",
Hour = "Hour",
Day = "Day",
Lifetime = "Lifetime"
}
enum CounterTiming {
Message = "Message",
Event = "Event"
}
enum EmailEvent {
Open = "open",
Click = "click"
}
interface CampaignOverview {
ClickedCount: number;
DeliveredCount: number;
EditMode: CampaignOverviewEditMode;
EditType: CampaignOverviewEditType;
ID: number;
IDType: CampaignOverviewIDType;
OpenedCount: number;
ProcessedCount: number;
SendTimeStart: number;
Starred: boolean;
Subject: string;
Title: string;
}
interface ContactStatistic {
BlockedCount: number;
BouncedCount: number;
ClickedCount: number;
ContactID: number;
DeferredCount: number;
DeliveredCount: number;
HardbouncedCount: number;
LastActivityAt: string;
MarketingContacts: number;
OpenedCount: number;
ProcessedCount: number;
QueuedCount: number;
SoftbouncedCount: number;
SpamComplaintCount: number;
UnsubscribedCount: number;
UserMarketingContacts: number;
WorkFlowExitedCount: number;
}
interface GEOStatistic {
ClickedCount: number;
OpenedCount: number;
Country: string;
}
interface ListRecipientStatistic<Data = Array<unknown>> {
BlockedCount: number;
BouncedCount: number;
ClickedCount: number;
Data: Data;
DeferredCount: number;
DeliveredCount: number;
HardbouncedCount: number;
LastActivityAt: string;
ListRecipientID: number;
OpenedCount: number;
PreQueuedCount: number;
ProcessedCount: number;
QueuedCount: number;
SoftbouncedCount: number;
SpamComplaintCount: number;
UnsubscribedCount: number;
WorkFlowExitedCount: number;
}
interface StatCounter {
APIKeyID: number;
EventClickDelay: number;
EventClickedCount: number;
EventOpenDelay: number;
EventOpenedCount: number;
EventSpamCount: number;
EventUnsubscribedCount: number;
EventWorkflowExitedCount: number;
MessageBlockedCount: number;
MessageClickedCount: number;
MessageDeferredCount: number;
MessageHardBouncedCount: number;
MessageOpenedCount: number;
MessageQueuedCount: number;
MessageSentCount: number;
MessageSoftBouncedCount: number;
MessageSpamCount: number;
MessageUnsubscribedCount: number;
MessageWorkFlowExitedCount: number;
SourceID: number;
Timeslice: string;
Total: number;
}
interface LinkClickStatistic {
ClickedEventsCount: number;
ClickedMessagesCount: number;
PositionIndex: number;
URL: string;
}
interface RecipientESPStatistic {
AttemptedMessagesCount?: number;
ClickedMessagesCount?: number;
DeferredMessagesCount?: number;
DeliveredMessagesCount?: number;
HardBouncedMessagesCount?: number;
ESPName?: string;
OpenedMessagesCount?: number;
SoftBouncedMessagesCount?: number;
SpamReportsCount?: number;
UnsubscribedMessagesCount?: number;
OpenRate?: number;
ClickThroughRate?: number;
SoftBouncedRate?: number;
HardBouncedRate?: number;
UnsubscribedRate?: number;
SpamReportsRate?: number;
DeferredRate?: number;
}
interface TopLinkClicked {
ClickedCount: number;
LinkId: number;
Url: string;
}
interface UserAgentStatistic {
Count: number;
DistinctCount: number;
Platform: string;
UserAgent: string;
}
type GetCampaignOverviewQueryParams = Partial<Common.Pagination> & {
All?: boolean;
Archived?: boolean;
Drafts?: boolean;
ID?: number;
IDType?: CampaignOverviewIDType;
Programmed?: boolean;
Sent?: boolean;
Starred?: boolean;
Subject?: string;
};
type GetContactStatisticsQueryParams = Partial<Common.Pagination> & {
Blocked?: boolean;
Bounced?: boolean;
Click?: boolean;
Deferred?: boolean;
Hardbounced?: boolean;
LastActivityAt?: string;
MaxLastActivityAt?: string;
MinLastActivityAt?: string;
Open?: boolean;
Queued?: boolean;
Sent?: boolean;
Spam?: boolean;
Softbounced?: boolean;
Unsubscribed?: boolean;
};
type GetGEOStatisticsQueryParams = Partial<Common.TimestampPeriod> & Partial<Common.Pagination> & {
CampaignID?: number;
ContactsList?: number;
CustomCampaign?: string;
From?: string;
FromDomain?: string;
FromID?: number;
FromType?: Message.FromType;
IsDeleted?: boolean;
IsNewsletterTool?: boolean;
IsStarred?: boolean;
MessageStatus?: Message.MessageStatus;
Period?: Common.Period;
};
type GetListRecipientStatisticsQueryParams = Partial<Common.Pagination> & {
Blocked?: boolean;
Bounced?: boolean;
Click?: boolean;
Contact?: number;
ContactsList?: number;
IsExcludedFromCampaigns?: boolean;
IsUnsubscribed?: boolean;
LastActivityAt?: string;
MaxLastActivityAt?: string;
MinLastActivityAt?: string;
MaxUnsubscribedAt?: string;
MinUnsubscribedAt?: string;
Open?: boolean;
Queued?: boolean;
Sent?: boolean;
ShowExtraData?: boolean;
Spam?: boolean;
TimeZone?: string;
Unsubscribed?: boolean;
};
type GetStatCountersQueryParams = Partial<Common.TimestampPeriod> & Partial<Common.Pagination> & {
CounterSource: CounterSource;
CounterResolution: CounterResolution;
CounterTiming: CounterTiming;
SourceID?: number;
};
type GetLinkClickStatisticsQueryParams = Partial<Common.Pagination> & {
CampaignID: number;
};
type GetRecipientESPStatisticsQueryParams = GetLinkClickStatisticsQueryParams & {
ESP_Name?: number;
};
type GetTopLinkClickedQueryParams = Partial<Common.TimestampPeriod> & Partial<Common.Pagination> & {
ActualClicks?: boolean;
CampaignID?: number;
Contact?: number;
ContactsList?: number;
CustomCampaign?: string;
From?: string;
FromDomain?: string;
FromID?: number;
FromType?: Message.FromType;
IsDeleted?: boolean;
IsNewsletterTool?: boolean;
IsStarred?: boolean;
Message?: number;
Period?: Common.Period;
};
type GetUserAgentStatisticsQueryParams = Partial<Common.TimestampPeriod> & Partial<Common.Pagination> & {
CampaignID?: number;
ContactsList?: number;
CustomCampaign?: string;
Event?: EmailEvent;
ExcludePlatform?: string;
From?: string;
FromDomain?: string;
FromID?: number;
FromType?: Message.FromType;
IsDeleted?: boolean;
IsNewsletterTool?: boolean;
IsStarred?: boolean;
Period?: Common.Period;
Platform?: string;
};
type GetCampaignOverviewResponse = Common.Response<CampaignOverview[]>;
type GetContactStatisticsResponse = Common.Response<ContactStatistic[]>;
type GetGEOStatisticsResponse = Common.Response<GEOStatistic[]>;
type GetListRecipientStatisticsResponse<Data = Array<unknown>> = Common.Response<Array<ListRecipientStatistic<Data>>>;
type GetStatCountersResponse = Common.Response<StatCounter[]>;
type GetLinkClickStatisticsResponse = Common.Response<LinkClickStatistic[]>;
type GetRecipientESPStatisticsResponse = Common.Response<RecipientESPStatistic[]>;
type GetTopLinkClickedResponse = Common.Response<TopLinkClicked[]>;
type GetUserAgentStatisticsResponse = Common.Response<UserAgentStatistic[]>;
}

View File

@ -0,0 +1,101 @@
import { Common } from './Common';
export declare namespace Template {
export enum Categories {
Full = "full",
Basic = "basic",
NewsLetter = "newsletter",
ECommerce = "e-commerce",
Events = "events",
Travel = "travel",
Sports = "sports",
Welcome = "welcome",
ContactPropertyUpdate = "contact-property-update",
Support = "support",
Invoice = "invoice",
Anniversary = "anniversary",
Account = "account",
Activation = "activation"
}
export enum CategoriesSelectionMethod {
ContainsAny = "containsany",
ContainsAll = "containsall",
IsSubSet = "issubset"
}
export enum EditMode {
DragAndDropBuilder = 1,
HTMLBuilder = 2,
SavedSectionBuilder = 3,
MJMLBuilder = 4
}
export enum OwnerType {
ApiKey = "apikey",
User = "user",
Global = "global"
}
export enum Purposes {
Marketing = "marketing",
Transactional = "transactional",
Automation = "automation"
}
export enum PurposesSelectionMethod {
ContainsAny = "containsany",
ContainsAll = "containsall",
IsSubSet = "issubset"
}
export interface Headers {
From: string;
Subject: string;
'Reply-to': string;
}
export interface Template {
Author: string;
Categories: Categories;
Copyright: string;
Description: string;
EditMode: EditMode;
IsStarred: boolean;
IsTextPartGenerationEnabled: boolean;
Locale: string;
Name: string;
OwnerType: OwnerType;
Presets: string;
Purposes: Purposes;
ID: number;
OwnerId: number;
Previews: string;
CreatedAt: string;
LastUpdatedAt: string;
}
export type TemplateDetailContent = {
Headers: Headers;
'Html-part': string;
'Text-part': string;
MJMLContent: string;
};
export type PostTemplateBody = Partial<Omit<Template, 'Name' | 'ID' | 'OwnerId' | 'Previews' | 'CreatedAt' | 'LastUpdatedAt'>> & {
Name: string;
};
export type PutTemplateBody = Partial<PostTemplateBody>;
export type GetTemplateQueryParams = Partial<Common.Pagination> & {
Categories?: string;
CategoriesSelectionMethod?: CategoriesSelectionMethod;
EditMode?: EditMode;
Name?: string;
OwnerType?: OwnerType;
Purposes?: Purposes;
PurposesSelectionMethod?: PurposesSelectionMethod;
};
export type PostTemplateDetailContentBody = Partial<Omit<TemplateDetailContent, 'Headers'>> & {
Headers?: Partial<Headers>;
};
export type PutTemplateDetailContentBody = PostTemplateDetailContentBody;
type TemplateResponse = Common.Response<Template[]>;
type TemplateDetailContentResponse = Common.Response<TemplateDetailContent[]>;
export type PostTemplateResponse = TemplateResponse;
export type PutTemplateResponse = TemplateResponse;
export type GetTemplateResponse = TemplateResponse;
export type PostTemplateDetailContentResponse = TemplateDetailContentResponse;
export type PutTemplateDetailContentResponse = TemplateDetailContentResponse;
export type GetTemplateDetailContentResponse = TemplateDetailContentResponse;
export {};
}

View File

@ -0,0 +1,57 @@
import { Common } from './Common';
export declare namespace Webhook {
export enum EventType {
Open = "open",
Click = "click",
Bounce = "bounce",
Spam = "spam",
Blocked = "blocked",
UnSub = "unsub",
Sent = "sent"
}
export enum EventTypeValue {
Click = 1,
Bounce = 2,
Spam = 3,
Blocked = 4,
Unsubscribe = 5,
Open = 6,
Sent = 7
}
export enum Status {
Dead = "dead",
Alive = "alive"
}
export type Version = 1 | 2;
export interface EventCallbackUrl {
ID: number;
EventType: EventType;
IsBackup: boolean;
Status: Status;
APIKeyID: number;
Version: Version;
Url: string;
}
export type PostEventCallbackUrlBody = {
Url: string;
EventType?: EventType;
IsBackup?: boolean;
Status?: Status;
};
export type PutEventCallbackUrlBody = Partial<PostEventCallbackUrlBody>;
export type GetEventCallbackUrlQueryParams = Partial<Common.Pagination> & {
Backup?: boolean;
EventType?: EventTypeValue;
Status?: string;
Version?: Version;
};
type EventCallbackUrlResponse = {
Count: number;
Total: number;
Data: EventCallbackUrl[];
};
export type PostEventCallbackUrlResponse = EventCallbackUrlResponse;
export type PutEventCallbackUrlResponse = EventCallbackUrlResponse;
export type GetEventCallbackUrlResponse = EventCallbackUrlResponse;
export {};
}

View File

@ -0,0 +1,16 @@
export { LibraryResponse, LibraryLocalResponse } from './LibraryResponse';
export { Common } from './Common';
export { SendEmailV3, SendEmailV3_1, } from './SendEmail';
export { Message } from './Message';
export { Contact, ContactList, BulkContactManagement, ContactProperties, ContactSubscription, ContactVerification, } from './Contact';
export { DraftCampaign, SentCampaign, } from './Campaign';
export { Segmentation } from './Segmentation';
export { Template } from './Template';
export { Statistic } from './Statistic';
export { MessageEvent } from './MessageEvent';
export { Webhook } from './Webhook';
export { Parse } from './Parse';
export { Sender, Metasender, DNS, } from './SenderAddressAndDomain';
export { APIKeyConfiguration, AccountSetting, } from './Setting';
export { SendMessage } from './SendMessage';
export { SMSMessage } from './SMSMessage';

View File

@ -0,0 +1,25 @@
export declare namespace TFunction {
type Args<T> = T extends (...args: infer U) => unknown ? U : never;
type Arg0<T> = T extends (arg1: infer U) => unknown ? U : never;
}
export declare namespace TObject {
type TKeys<T> = Array<keyof T>;
type TValues<TObj> = TObj extends Record<string, infer TKey> ? Array<TKey> : never;
type MakeOptional<T, K extends keyof T> = Omit<T, K> & Partial<T>;
type MakeRequired<T, K extends keyof T> = Omit<T, K> & Required<Pick<T, K>>;
type MakeNil<T extends Record<string, unknown>, TObjKeys extends keyof T> = {
[TKey in TObjKeys]?: T[TKey] | null;
};
type MakeNilAll<T extends Record<string, unknown>> = {
[TKey in keyof T]?: T[TKey] | null;
};
type UnknownRec = Record<string, unknown>;
}
export declare namespace TArray {
type TKeys<T extends Array<unknown>> = Array<Exclude<keyof T, keyof Array<unknown>>>;
type TValues<T extends Array<unknown>> = Array<T[number]>;
type SingleType<TValue> = TValue extends Array<infer TSingle> ? TSingle : TValue;
type PossibleArray<TValue> = TValue | Array<TValue>;
type Pair<T, K> = [T, K];
type Pairs<T, K> = Pair<T, K>[];
}

View File

@ -0,0 +1,6 @@
import isNil from './isNil';
import isNull from './isNull';
import isUndefined from './isUndefined';
import isPureObject from './isPureObject';
import setValueIfNotNil from './setValueIfNotNil';
export { isNil, isNull, isUndefined, isPureObject, setValueIfNotNil, };

View File

@ -0,0 +1,2 @@
declare function isNil(value: unknown): boolean;
export default isNil;

View File

@ -0,0 +1,2 @@
declare function isNull(value: unknown): value is null;
export default isNull;

View File

@ -0,0 +1,2 @@
declare function isPureObject(value: unknown): boolean;
export default isPureObject;

View File

@ -0,0 +1,2 @@
declare function isUndefined(value: unknown): value is undefined;
export default isUndefined;

View File

@ -0,0 +1,3 @@
import { TObject } from '../types';
declare function setValueIfNotNil(targetObject: TObject.UnknownRec, path: string, value: unknown): void;
export default setValueIfNotNil;

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,15 @@
/*!
* mime-db
* Copyright(c) 2014 Jonathan Ong
* Copyright(c) 2015-2022 Douglas Christopher Wilson
* MIT Licensed
*/
/*!
* mime-types
* Copyright(c) 2014 Jonathan Ong
* Copyright(c) 2015 Douglas Christopher Wilson
* MIT Licensed
*/
/*! node-mailjet v6.0.6 */

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
/*! node-mailjet v6.0.6 */

View File

@ -0,0 +1,46 @@
{
"name": "node-mailjet",
"version": "6.0.6",
"main": "./mailjet.node.js",
"browser": "./mailjet.web.js",
"types": "./declarations/index.d.ts",
"description": "Mailjet API client",
"author": "Mailjet",
"license": "MIT",
"private": false,
"keywords": [
"email",
"sms",
"node",
"mail",
"mailjet"
],
"engines": {
"node": ">= 12.0.0",
"npm": ">= 6.9.0"
},
"files": [
"*"
],
"typescript": {
"definition": "./declarations/index.d.ts"
},
"dependencies": {
"axios": "1.7.4",
"json-bigint": "^1.0.0",
"url-join": "^4.0.0"
},
"homepage": "https://github.com/mailjet/mailjet-apiv3-nodejs#readme",
"repository": {
"type": "git",
"url": "git+https://github.com/mailjet/mailjet-apiv3-nodejs.git"
},
"bugs": {
"url": "https://github.com/mailjet/mailjet-apiv3-nodejs/issues"
},
"contributors": [
"Arnaud Breton <arnaud@mailjet.com> (https://github.com/arnaudbreton)",
"Nicholas Smith <nicksmith.biz@gmail.com> (https://github.com/safani)",
"Jérémie Parker <jeremie@vizeat.com> (https://github.com/p-j)"
]
}