@salespark/mailerlite-api 1.0.3 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/@types/index.d.ts
CHANGED
package/dist/api/campaigns.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { AxiosInstance } from 'axios';
|
|
2
2
|
import { CampaignAction, CampaignContent, CampaignData, CampaignQuery, CampaignSendData, CampaignStatus } from '../@types';
|
|
3
3
|
export default function (client: AxiosInstance): {
|
|
4
|
-
actOnCampaign(campaignId: number, action: CampaignAction, data?: CampaignSendData): Promise<import("axios").AxiosResponse<any, any>>;
|
|
5
|
-
getCampaigns(status?: CampaignStatus, params?: CampaignQuery): Promise<import("axios").AxiosResponse<any, any>>;
|
|
4
|
+
actOnCampaign(campaignId: number, action: CampaignAction, data?: CampaignSendData): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
5
|
+
getCampaigns(status?: CampaignStatus, params?: CampaignQuery): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
6
6
|
getCampaignCount(status?: CampaignStatus): Promise<number>;
|
|
7
|
-
createCampaign(campaign: CampaignData): Promise<import("axios").AxiosResponse<any, any>>;
|
|
8
|
-
removeCampaign(campaignId: number): Promise<import("axios").AxiosResponse<any, any>>;
|
|
9
|
-
setCampaignContent(campaignId: number, content: CampaignContent): Promise<import("axios").AxiosResponse<any, any>>;
|
|
7
|
+
createCampaign(campaign: CampaignData): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
8
|
+
removeCampaign(campaignId: number): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
9
|
+
setCampaignContent(campaignId: number, content: CampaignContent): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
10
10
|
};
|
package/dist/api/fields.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { AxiosInstance } from 'axios';
|
|
2
2
|
import { FieldData, FieldUpdate } from '../@types';
|
|
3
3
|
export default function (client: AxiosInstance): {
|
|
4
|
-
getFields(): Promise<import("axios").AxiosResponse<any, any>>;
|
|
5
|
-
createField(field: FieldData): Promise<import("axios").AxiosResponse<any, any>>;
|
|
6
|
-
updateField(fieldId: number, fieldUpdate: FieldUpdate): Promise<import("axios").AxiosResponse<any, any>>;
|
|
7
|
-
removeField(fieldId: number): Promise<import("axios").AxiosResponse<any, any>>;
|
|
4
|
+
getFields(): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
5
|
+
createField(field: FieldData): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
6
|
+
updateField(fieldId: number, fieldUpdate: FieldUpdate): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
7
|
+
removeField(fieldId: number): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
8
8
|
};
|
package/dist/api/groups.d.ts
CHANGED
|
@@ -21,17 +21,17 @@ export default function (client: AxiosInstance): {
|
|
|
21
21
|
searchGroups(groupName: GroupSearchQuery["group_name"]): Promise<MailerLiteGroup[]>;
|
|
22
22
|
getGroup(groupId: number): Promise<MailerLiteGroup>;
|
|
23
23
|
createGroup(group: GroupData): Promise<MailerLiteGroup>;
|
|
24
|
-
updateGroup(groupId: number, groupUpdate: GroupData): Promise<import("axios").AxiosResponse<any, any>>;
|
|
24
|
+
updateGroup(groupId: number, groupUpdate: GroupData): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
25
25
|
removeGroup(groupId: number): Promise<{
|
|
26
26
|
success: boolean;
|
|
27
27
|
}>;
|
|
28
|
-
addSubscriberToGroup(groupId: number, subscriber: GroupSubscriberData): Promise<import("axios").AxiosResponse<any, any>>;
|
|
29
|
-
addSubscribersToGroup(groupId: number, subscribers: GroupSubscriberData[], importOptions?: GroupSubscriberFlags): Promise<import("axios").AxiosResponse<any, any>>;
|
|
30
|
-
getSubscribersGroupImport(groupId: number, importId: number): Promise<import("axios").AxiosResponse<any, any>>;
|
|
31
|
-
getGroupSubscriber(groupId: number, subscriberId: number): Promise<import("axios").AxiosResponse<any, any>>;
|
|
32
|
-
getGroupSubscribers(groupId: number, params?: SubscriberGroupQuery): Promise<import("axios").AxiosResponse<any, any>>;
|
|
28
|
+
addSubscriberToGroup(groupId: number, subscriber: GroupSubscriberData): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
29
|
+
addSubscribersToGroup(groupId: number, subscribers: GroupSubscriberData[], importOptions?: GroupSubscriberFlags): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
30
|
+
getSubscribersGroupImport(groupId: number, importId: number): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
31
|
+
getGroupSubscriber(groupId: number, subscriberId: number): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
32
|
+
getGroupSubscribers(groupId: number, params?: SubscriberGroupQuery): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
33
33
|
getGroupSubscriberCount(groupId: number): Promise<number>;
|
|
34
|
-
getGroupSubscribersByType(groupId: number, subscriberType: SubscriberType, params?: GroupQuery): Promise<import("axios").AxiosResponse<any, any>>;
|
|
34
|
+
getGroupSubscribersByType(groupId: number, subscriberType: SubscriberType, params?: GroupQuery): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
35
35
|
getGroupSubscribersCountByType(groupId: number, subscriberType: SubscriberType): Promise<number>;
|
|
36
36
|
removeGroupSubscriber(groupId: number, subscriberIdentifier: number | string): Promise<string>;
|
|
37
37
|
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { AxiosInstance } from 'axios';
|
|
2
2
|
import { SubscriberQuery, SubscriberData, SubscriberDataUpdate, SubscriberSearchQuery, SubscriberActivityType } from '../@types';
|
|
3
3
|
export default function (client: AxiosInstance): {
|
|
4
|
-
getSubscribers(params?: SubscriberQuery): Promise<import("axios").AxiosResponse<any, any>>;
|
|
5
|
-
addSubscriber(subscriber: SubscriberData): Promise<import("axios").AxiosResponse<any, any>>;
|
|
6
|
-
getSubscriber(identifier: number | string): Promise<import("axios").AxiosResponse<any, any>>;
|
|
7
|
-
updateSubscriber(identifier: number | string, subscriber: SubscriberDataUpdate): Promise<import("axios").AxiosResponse<any, any>>;
|
|
8
|
-
searchSubscribers(params?: SubscriberSearchQuery): Promise<import("axios").AxiosResponse<any, any>>;
|
|
9
|
-
getSubscriberActivity(identifier: number | string): Promise<import("axios").AxiosResponse<any, any>>;
|
|
10
|
-
getSubscriberActivityByType(identifier: number | string, activityType: SubscriberActivityType): Promise<import("axios").AxiosResponse<any, any>>;
|
|
11
|
-
getSubscriberGroups(identifier: number | string): Promise<import("axios").AxiosResponse<any, any>>;
|
|
12
|
-
removeSubscriber(identifier: number | string): Promise<import("axios").AxiosResponse<any, any>>;
|
|
4
|
+
getSubscribers(params?: SubscriberQuery): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
5
|
+
addSubscriber(subscriber: SubscriberData): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
6
|
+
getSubscriber(identifier: number | string): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
7
|
+
updateSubscriber(identifier: number | string, subscriber: SubscriberDataUpdate): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
8
|
+
searchSubscribers(params?: SubscriberSearchQuery): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
9
|
+
getSubscriberActivity(identifier: number | string): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
10
|
+
getSubscriberActivityByType(identifier: number | string, activityType: SubscriberActivityType): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
11
|
+
getSubscriberGroups(identifier: number | string): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
12
|
+
removeSubscriber(identifier: number | string): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
13
13
|
};
|
package/dist/api/webhooks.d.ts
CHANGED
|
@@ -4,8 +4,8 @@ export default function (client: AxiosInstance): {
|
|
|
4
4
|
getWebhooks(): Promise<any[]>;
|
|
5
5
|
getWebhooksCount(): Promise<number>;
|
|
6
6
|
getWebhooksRaw(): Promise<WebhooksResponse>;
|
|
7
|
-
getWebhook(webhookId: number): Promise<import("axios").AxiosResponse<any, any>>;
|
|
8
|
-
createWebhook(webhook: WebhookData): Promise<import("axios").AxiosResponse<any, any>>;
|
|
9
|
-
updateWebhook(webhookId: number, webhook: WebhookData): Promise<import("axios").AxiosResponse<any, any>>;
|
|
10
|
-
removeWebhook(webhookId: number): Promise<import("axios").AxiosResponse<any, any>>;
|
|
7
|
+
getWebhook(webhookId: number): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
8
|
+
createWebhook(webhook: WebhookData): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
9
|
+
updateWebhook(webhookId: number, webhook: WebhookData): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
10
|
+
removeWebhook(webhookId: number): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
11
11
|
};
|
package/package.json
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salespark/mailerlite-api",
|
|
3
3
|
"description": "MailerLite API v2 Node.js SDK. It is mostly a thin wrapper on axios that provides authentication, response/request camelCase transformations, Typescript type definitions and some handy shorthand methods.",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.4",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"scripts": {
|
|
8
8
|
"lint": "npx eslint ./src --ext .ts,.tsx",
|
|
9
9
|
"clean": "rimraf dist",
|
|
10
10
|
"lint:fix": "npx eslint ./src --fix --ext .ts,.tsx",
|
|
11
|
+
"test": "jest",
|
|
11
12
|
"build": "tsc && cp -r src/@types dist",
|
|
12
13
|
"prepare": "npm run build",
|
|
13
14
|
"prepublishOnly": "yarn run clean && yarn run build"
|
|
@@ -15,23 +16,31 @@
|
|
|
15
16
|
"author": "SalesPark",
|
|
16
17
|
"license": "MIT",
|
|
17
18
|
"dependencies": {
|
|
18
|
-
"axios": "^1.
|
|
19
|
+
"axios": "^1.13.6",
|
|
19
20
|
"camelcase-keys": "^9.1.3",
|
|
20
21
|
"snakecase-keys": "^8.0.1"
|
|
21
22
|
},
|
|
22
23
|
"devDependencies": {
|
|
23
24
|
"@types/node": "^24.0.6",
|
|
25
|
+
"@types/jest": "^29.5.14",
|
|
26
|
+
"@babel/core": "^7.26.10",
|
|
27
|
+
"@babel/preset-env": "^7.26.10",
|
|
24
28
|
"@typescript-eslint/eslint-plugin": "^8.35.0",
|
|
25
29
|
"@typescript-eslint/parser": "^8.35.0",
|
|
26
30
|
"eslint": "^9.30.0",
|
|
27
31
|
"eslint-config-standard": "^17.1.0",
|
|
28
32
|
"eslint-config-standard-with-typescript": "^43.0.1",
|
|
29
33
|
"eslint-plugin-import": "^2.24.2",
|
|
34
|
+
"eslint-plugin-n": "^17.17.0",
|
|
30
35
|
"eslint-plugin-node": "^11.1.0",
|
|
31
36
|
"eslint-plugin-promise": "^7.2.1",
|
|
32
37
|
"eslint-plugin-standard": "^5.0.0",
|
|
33
|
-
"
|
|
34
|
-
"
|
|
38
|
+
"babel-jest": "^29.7.0",
|
|
39
|
+
"jest": "^29.7.0",
|
|
40
|
+
"jest-extended": "^4.0.2",
|
|
41
|
+
"rimraf": "^6.0.1",
|
|
42
|
+
"ts-jest": "^29.2.5",
|
|
43
|
+
"typescript": "^5.3.3"
|
|
35
44
|
},
|
|
36
45
|
"homepage": "https://salespark.io",
|
|
37
46
|
"repository": {
|