crisp-api 9.13.0 → 10.0.3
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/CHANGELOG.md +12 -0
- package/README.md +2 -2
- package/dist/crisp.d.ts +179 -0
- package/dist/crisp.js +773 -0
- package/dist/resources/BaseResource.d.ts +21 -0
- package/dist/resources/BaseResource.js +26 -0
- package/dist/resources/BucketURL.d.ts +37 -0
- package/dist/resources/BucketURL.js +35 -0
- package/dist/resources/MediaAnimation.d.ts +20 -0
- package/dist/resources/MediaAnimation.js +40 -0
- package/dist/resources/PluginConnect.d.ts +59 -0
- package/dist/resources/PluginConnect.js +79 -0
- package/dist/resources/PluginSubscription.d.ts +112 -0
- package/dist/resources/PluginSubscription.js +130 -0
- package/dist/resources/WebsiteAnalytics.d.ts +20 -0
- package/dist/resources/WebsiteAnalytics.js +37 -0
- package/dist/resources/WebsiteAvailability.d.ts +40 -0
- package/dist/resources/WebsiteAvailability.js +46 -0
- package/dist/resources/WebsiteBase.d.ts +69 -0
- package/dist/resources/WebsiteBase.js +77 -0
- package/dist/resources/WebsiteBatch.d.ts +61 -0
- package/dist/resources/WebsiteBatch.js +76 -0
- package/dist/resources/WebsiteCampaign.d.ts +208 -0
- package/dist/resources/WebsiteCampaign.js +201 -0
- package/dist/resources/WebsiteConversation.d.ts +710 -0
- package/dist/resources/WebsiteConversation.js +607 -0
- package/dist/resources/WebsiteHelpdesk.d.ts +356 -0
- package/dist/resources/WebsiteHelpdesk.js +593 -0
- package/dist/resources/WebsiteOperator.d.ts +88 -0
- package/dist/resources/WebsiteOperator.js +99 -0
- package/dist/resources/WebsitePeople.d.ts +257 -0
- package/dist/resources/WebsitePeople.js +282 -0
- package/dist/resources/WebsiteSettings.d.ts +168 -0
- package/dist/resources/WebsiteSettings.js +42 -0
- package/dist/resources/WebsiteVerify.d.ts +47 -0
- package/dist/resources/WebsiteVerify.js +56 -0
- package/dist/resources/WebsiteVisitors.d.ts +122 -0
- package/dist/resources/WebsiteVisitors.js +98 -0
- package/dist/resources/index.d.ts +20 -0
- package/dist/resources/index.js +42 -0
- package/dist/services/bucket.d.ts +19 -0
- package/dist/services/bucket.js +31 -0
- package/dist/services/media.d.ts +19 -0
- package/dist/services/media.js +31 -0
- package/dist/services/plugin.d.ts +20 -0
- package/dist/services/plugin.js +33 -0
- package/dist/services/website.d.ts +30 -0
- package/dist/services/website.js +53 -0
- package/eslint.config.mjs +208 -0
- package/lib/crisp.ts +1006 -0
- package/lib/resources/BaseResource.ts +37 -0
- package/lib/resources/BucketURL.ts +58 -0
- package/lib/resources/MediaAnimation.ts +44 -0
- package/lib/resources/PluginConnect.ts +135 -0
- package/lib/resources/PluginSubscription.ts +236 -0
- package/lib/resources/WebsiteAnalytics.ts +41 -0
- package/lib/resources/WebsiteAvailability.ts +74 -0
- package/lib/resources/WebsiteBase.ts +119 -0
- package/lib/resources/WebsiteBatch.ts +116 -0
- package/lib/resources/WebsiteCampaign.ts +432 -0
- package/lib/resources/WebsiteConversation.ts +1507 -0
- package/lib/resources/WebsiteHelpdesk.ts +1024 -0
- package/lib/resources/WebsiteOperator.ts +183 -0
- package/lib/resources/WebsitePeople.ts +568 -0
- package/lib/resources/WebsiteSettings.ts +207 -0
- package/lib/resources/WebsiteVerify.ts +90 -0
- package/lib/resources/WebsiteVisitors.ts +219 -0
- package/lib/resources/index.ts +28 -0
- package/lib/services/bucket.ts +36 -0
- package/lib/services/media.ts +36 -0
- package/lib/services/plugin.ts +40 -0
- package/lib/services/website.ts +70 -0
- package/package.json +16 -11
- package/tsconfig.json +12 -5
- package/lib/crisp.js +0 -1171
- package/lib/resources/BucketURL.js +0 -34
- package/lib/resources/MediaAnimation.js +0 -41
- package/lib/resources/PluginConnect.js +0 -119
- package/lib/resources/PluginSubscription.js +0 -234
- package/lib/resources/WebsiteAnalytics.js +0 -37
- package/lib/resources/WebsiteAvailability.js +0 -48
- package/lib/resources/WebsiteBase.js +0 -100
- package/lib/resources/WebsiteBatch.js +0 -92
- package/lib/resources/WebsiteCampaign.js +0 -396
- package/lib/resources/WebsiteConversation.js +0 -1261
- package/lib/resources/WebsiteHelpdesk.js +0 -1198
- package/lib/resources/WebsiteOperator.js +0 -167
- package/lib/resources/WebsitePeople.js +0 -516
- package/lib/resources/WebsiteSettings.js +0 -50
- package/lib/resources/WebsiteVerify.js +0 -79
- package/lib/resources/WebsiteVisitors.js +0 -148
- package/lib/services/Bucket.js +0 -28
- package/lib/services/Media.js +0 -28
- package/lib/services/Plugin.js +0 -29
- package/lib/services/Website.js +0 -39
- package/types/crisp.d.ts +0 -151
- package/types/resources/BucketURL.d.ts +0 -15
- package/types/resources/MediaAnimation.d.ts +0 -15
- package/types/resources/PluginConnect.d.ts +0 -15
- package/types/resources/PluginSubscription.d.ts +0 -15
- package/types/resources/WebsiteAnalytics.d.ts +0 -15
- package/types/resources/WebsiteAvailability.d.ts +0 -15
- package/types/resources/WebsiteBase.d.ts +0 -15
- package/types/resources/WebsiteBatch.d.ts +0 -15
- package/types/resources/WebsiteCampaign.d.ts +0 -15
- package/types/resources/WebsiteConversation.d.ts +0 -15
- package/types/resources/WebsiteHelpdesk.d.ts +0 -15
- package/types/resources/WebsiteOperator.d.ts +0 -15
- package/types/resources/WebsitePeople.d.ts +0 -15
- package/types/resources/WebsiteSettings.d.ts +0 -15
- package/types/resources/WebsiteVerify.d.ts +0 -15
- package/types/resources/WebsiteVisitors.d.ts +0 -15
- package/types/services/Bucket.d.ts +0 -14
- package/types/services/Media.d.ts +0 -14
- package/types/services/Plugin.d.ts +0 -14
- package/types/services/Website.d.ts +0 -14
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* node-crisp-api
|
|
3
|
+
*
|
|
4
|
+
* Copyright 2022, Crisp IM SAS
|
|
5
|
+
* Author: Baptiste Jamin <baptiste@crisp.chat>
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
/**************************************************************************
|
|
9
|
+
* IMPORTS
|
|
10
|
+
***************************************************************************/
|
|
11
|
+
|
|
12
|
+
// PROJECT: RESOURCES
|
|
13
|
+
import WebsiteBase from "@/resources/WebsiteBase";
|
|
14
|
+
import WebsiteAnalytics from "@/resources/WebsiteAnalytics";
|
|
15
|
+
import WebsiteAvailability from "@/resources/WebsiteAvailability";
|
|
16
|
+
import WebsiteBatch from "@/resources/WebsiteBatch";
|
|
17
|
+
import WebsiteCampaign from "@/resources/WebsiteCampaign";
|
|
18
|
+
import WebsiteConversation from "@/resources/WebsiteConversation";
|
|
19
|
+
import WebsiteOperator from "@/resources/WebsiteOperator";
|
|
20
|
+
import WebsitePeople from "@/resources/WebsitePeople";
|
|
21
|
+
import WebsiteHelpdesk from "@/resources/WebsiteHelpdesk";
|
|
22
|
+
import WebsiteSettings from "@/resources/WebsiteSettings";
|
|
23
|
+
import WebsiteVerify from "@/resources/WebsiteVerify";
|
|
24
|
+
import WebsiteVisitors from "@/resources/WebsiteVisitors";
|
|
25
|
+
|
|
26
|
+
/**************************************************************************
|
|
27
|
+
* CLASSES
|
|
28
|
+
***************************************************************************/
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Website Service
|
|
32
|
+
*/
|
|
33
|
+
class WebsiteService {
|
|
34
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
35
|
+
public __resources: any[] = [
|
|
36
|
+
WebsiteBase,
|
|
37
|
+
WebsiteAnalytics,
|
|
38
|
+
WebsiteAvailability,
|
|
39
|
+
WebsiteBatch,
|
|
40
|
+
WebsiteCampaign,
|
|
41
|
+
WebsiteConversation,
|
|
42
|
+
WebsiteOperator,
|
|
43
|
+
WebsitePeople,
|
|
44
|
+
WebsiteHelpdesk,
|
|
45
|
+
WebsiteSettings,
|
|
46
|
+
WebsiteVerify,
|
|
47
|
+
WebsiteVisitors
|
|
48
|
+
];
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**************************************************************************
|
|
52
|
+
* EXPORTS
|
|
53
|
+
***************************************************************************/
|
|
54
|
+
|
|
55
|
+
export interface WebsiteServiceInterface extends
|
|
56
|
+
WebsiteBase,
|
|
57
|
+
WebsiteAnalytics,
|
|
58
|
+
WebsiteAvailability,
|
|
59
|
+
WebsiteBatch,
|
|
60
|
+
WebsiteCampaign,
|
|
61
|
+
WebsiteConversation,
|
|
62
|
+
WebsiteOperator,
|
|
63
|
+
WebsitePeople,
|
|
64
|
+
WebsiteHelpdesk,
|
|
65
|
+
WebsiteSettings,
|
|
66
|
+
WebsiteVerify,
|
|
67
|
+
WebsiteVisitors {
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export default WebsiteService;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "crisp-api",
|
|
3
3
|
"description": "Crisp API wrapper for Node - official, maintained by Crisp",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "10.0.3",
|
|
5
5
|
"homepage": "https://github.com/crisp-im/node-crisp-api",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"author": {
|
|
@@ -34,23 +34,28 @@
|
|
|
34
34
|
"url": "https://github.com/crisp-im/node-crisp-api/blob/master/LICENSE"
|
|
35
35
|
}
|
|
36
36
|
],
|
|
37
|
-
"main": "
|
|
38
|
-
"types": "
|
|
37
|
+
"main": "dist/crisp.js",
|
|
38
|
+
"types": "dist/crisp.d.ts",
|
|
39
39
|
"engines": {
|
|
40
|
-
"node": ">=
|
|
40
|
+
"node": ">= 16.0.0"
|
|
41
41
|
},
|
|
42
42
|
"scripts": {
|
|
43
|
-
"test": "
|
|
44
|
-
"
|
|
43
|
+
"test": "eslint lib",
|
|
44
|
+
"build": "npx tsc && npx tsc-alias && node -e \"const fs=require('fs');const f='dist/crisp.js';const v=require('./package.json').version;fs.writeFileSync(f, fs.readFileSync(f,'utf8').replace(/__PKG_VERSION_PLACEHOLDER__/g,v));\""
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
|
-
"
|
|
48
|
-
"
|
|
47
|
+
"@typescript-eslint/eslint-plugin": "8.39.1",
|
|
48
|
+
"tsc-alias": "1.8.16",
|
|
49
|
+
"typescript": "5.9.2",
|
|
50
|
+
"eslint": "9.29.0",
|
|
51
|
+
"eslint-plugin-crisp": "1.1.13",
|
|
52
|
+
"eslint-plugin-jsdoc": "^54.1.0",
|
|
53
|
+
"globals": "15.15.0"
|
|
49
54
|
},
|
|
50
55
|
"dependencies": {
|
|
51
|
-
"
|
|
52
|
-
"
|
|
53
|
-
"
|
|
56
|
+
"mitt": "3.0.1",
|
|
57
|
+
"got": "11.8.5",
|
|
58
|
+
"socket.io-client": "4.7.2"
|
|
54
59
|
},
|
|
55
60
|
"keywords": [
|
|
56
61
|
"crisp",
|
package/tsconfig.json
CHANGED
|
@@ -1,10 +1,17 @@
|
|
|
1
1
|
{
|
|
2
|
-
"include": ["lib/**/*.
|
|
3
|
-
|
|
2
|
+
"include": ["lib/**/*.ts"],
|
|
4
3
|
"compilerOptions": {
|
|
5
|
-
"allowJs": true,
|
|
6
4
|
"declaration": true,
|
|
7
|
-
"
|
|
8
|
-
"
|
|
5
|
+
"outDir": "dist/",
|
|
6
|
+
"module": "commonjs",
|
|
7
|
+
"target": "es6",
|
|
8
|
+
"esModuleInterop": true,
|
|
9
|
+
"skipLibCheck": true,
|
|
10
|
+
"forceConsistentCasingInFileNames": true,
|
|
11
|
+
"moduleResolution": "Node",
|
|
12
|
+
"baseUrl": ".",
|
|
13
|
+
"paths": {
|
|
14
|
+
"@/*": ["lib/*"]
|
|
15
|
+
},
|
|
9
16
|
}
|
|
10
17
|
}
|