crisp-api 9.12.1 → 10.0.2

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.
Files changed (116) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/README.md +6 -2
  3. package/dist/crisp.d.ts +167 -0
  4. package/dist/crisp.js +764 -0
  5. package/dist/resources/BaseResource.d.ts +15 -0
  6. package/dist/resources/BaseResource.js +20 -0
  7. package/dist/resources/BucketURL.d.ts +28 -0
  8. package/dist/resources/BucketURL.js +29 -0
  9. package/dist/resources/MediaAnimation.d.ts +14 -0
  10. package/dist/resources/MediaAnimation.js +32 -0
  11. package/dist/resources/PluginConnect.d.ts +50 -0
  12. package/dist/resources/PluginConnect.js +73 -0
  13. package/dist/resources/PluginSubscription.d.ts +103 -0
  14. package/dist/resources/PluginSubscription.js +122 -0
  15. package/dist/resources/WebsiteAnalytics.d.ts +14 -0
  16. package/dist/resources/WebsiteAnalytics.js +29 -0
  17. package/dist/resources/WebsiteAvailability.d.ts +31 -0
  18. package/dist/resources/WebsiteAvailability.js +36 -0
  19. package/dist/resources/WebsiteBase.d.ts +60 -0
  20. package/dist/resources/WebsiteBase.js +71 -0
  21. package/dist/resources/WebsiteBatch.d.ts +52 -0
  22. package/dist/resources/WebsiteBatch.js +70 -0
  23. package/dist/resources/WebsiteCampaign.d.ts +199 -0
  24. package/dist/resources/WebsiteCampaign.js +194 -0
  25. package/dist/resources/WebsiteConversation.d.ts +701 -0
  26. package/dist/resources/WebsiteConversation.js +595 -0
  27. package/dist/resources/WebsiteHelpdesk.d.ts +347 -0
  28. package/dist/resources/WebsiteHelpdesk.js +587 -0
  29. package/dist/resources/WebsiteOperator.d.ts +79 -0
  30. package/dist/resources/WebsiteOperator.js +93 -0
  31. package/dist/resources/WebsitePeople.d.ts +248 -0
  32. package/dist/resources/WebsitePeople.js +276 -0
  33. package/dist/resources/WebsiteSettings.d.ts +159 -0
  34. package/dist/resources/WebsiteSettings.js +36 -0
  35. package/dist/resources/WebsiteVerify.d.ts +38 -0
  36. package/dist/resources/WebsiteVerify.js +50 -0
  37. package/dist/resources/WebsiteVisitors.d.ts +113 -0
  38. package/dist/resources/WebsiteVisitors.js +88 -0
  39. package/dist/resources/index.d.ts +17 -0
  40. package/dist/resources/index.js +40 -0
  41. package/dist/services/bucket.d.ts +13 -0
  42. package/dist/services/bucket.js +28 -0
  43. package/dist/services/media.d.ts +13 -0
  44. package/dist/services/media.js +28 -0
  45. package/dist/services/plugin.d.ts +14 -0
  46. package/dist/services/plugin.js +30 -0
  47. package/dist/services/website.d.ts +24 -0
  48. package/dist/services/website.js +50 -0
  49. package/eslint.config.mjs +208 -0
  50. package/lib/crisp.ts +957 -0
  51. package/lib/resources/BaseResource.ts +29 -0
  52. package/lib/resources/BucketURL.ts +49 -0
  53. package/lib/resources/MediaAnimation.ts +34 -0
  54. package/lib/resources/PluginConnect.ts +128 -0
  55. package/lib/resources/PluginSubscription.ts +208 -0
  56. package/lib/resources/WebsiteAnalytics.ts +31 -0
  57. package/lib/resources/WebsiteAvailability.ts +54 -0
  58. package/lib/resources/WebsiteBase.ts +108 -0
  59. package/lib/resources/WebsiteBatch.ts +96 -0
  60. package/lib/resources/WebsiteCampaign.ts +399 -0
  61. package/lib/resources/WebsiteConversation.ts +1416 -0
  62. package/lib/resources/WebsiteHelpdesk.ts +982 -0
  63. package/lib/resources/WebsiteOperator.ts +161 -0
  64. package/lib/resources/WebsitePeople.ts +527 -0
  65. package/lib/resources/WebsiteSettings.ts +192 -0
  66. package/lib/resources/WebsiteVerify.ts +76 -0
  67. package/lib/resources/WebsiteVisitors.ts +196 -0
  68. package/lib/resources/index.ts +25 -0
  69. package/lib/services/bucket.ts +28 -0
  70. package/lib/services/media.ts +28 -0
  71. package/lib/services/plugin.ts +32 -0
  72. package/lib/services/website.ts +62 -0
  73. package/package.json +16 -11
  74. package/tsconfig.json +12 -5
  75. package/lib/crisp.js +0 -1168
  76. package/lib/resources/BucketURL.js +0 -34
  77. package/lib/resources/MediaAnimation.js +0 -41
  78. package/lib/resources/PluginConnect.js +0 -119
  79. package/lib/resources/PluginSubscription.js +0 -234
  80. package/lib/resources/WebsiteAnalytics.js +0 -37
  81. package/lib/resources/WebsiteAvailability.js +0 -48
  82. package/lib/resources/WebsiteBase.js +0 -100
  83. package/lib/resources/WebsiteBatch.js +0 -92
  84. package/lib/resources/WebsiteCampaign.js +0 -396
  85. package/lib/resources/WebsiteConversation.js +0 -1261
  86. package/lib/resources/WebsiteHelpdesk.js +0 -1198
  87. package/lib/resources/WebsiteOperator.js +0 -167
  88. package/lib/resources/WebsitePeople.js +0 -516
  89. package/lib/resources/WebsiteSettings.js +0 -50
  90. package/lib/resources/WebsiteVerify.js +0 -79
  91. package/lib/resources/WebsiteVisitors.js +0 -148
  92. package/lib/services/Bucket.js +0 -28
  93. package/lib/services/Media.js +0 -28
  94. package/lib/services/Plugin.js +0 -29
  95. package/lib/services/Website.js +0 -39
  96. package/types/crisp.d.ts +0 -151
  97. package/types/resources/BucketURL.d.ts +0 -15
  98. package/types/resources/MediaAnimation.d.ts +0 -15
  99. package/types/resources/PluginConnect.d.ts +0 -15
  100. package/types/resources/PluginSubscription.d.ts +0 -15
  101. package/types/resources/WebsiteAnalytics.d.ts +0 -15
  102. package/types/resources/WebsiteAvailability.d.ts +0 -15
  103. package/types/resources/WebsiteBase.d.ts +0 -15
  104. package/types/resources/WebsiteBatch.d.ts +0 -15
  105. package/types/resources/WebsiteCampaign.d.ts +0 -15
  106. package/types/resources/WebsiteConversation.d.ts +0 -15
  107. package/types/resources/WebsiteHelpdesk.d.ts +0 -15
  108. package/types/resources/WebsiteOperator.d.ts +0 -15
  109. package/types/resources/WebsitePeople.d.ts +0 -15
  110. package/types/resources/WebsiteSettings.d.ts +0 -15
  111. package/types/resources/WebsiteVerify.d.ts +0 -15
  112. package/types/resources/WebsiteVisitors.d.ts +0 -15
  113. package/types/services/Bucket.d.ts +0 -14
  114. package/types/services/Media.d.ts +0 -14
  115. package/types/services/Plugin.d.ts +0 -14
  116. package/types/services/Website.d.ts +0 -14
@@ -0,0 +1,24 @@
1
+ /**************************************************************************
2
+ * IMPORTS
3
+ ***************************************************************************/
4
+ import WebsiteBase from "../resources/WebsiteBase";
5
+ import WebsiteAnalytics from "../resources/WebsiteAnalytics";
6
+ import WebsiteAvailability from "../resources/WebsiteAvailability";
7
+ import WebsiteBatch from "../resources/WebsiteBatch";
8
+ import WebsiteCampaign from "../resources/WebsiteCampaign";
9
+ import WebsiteConversation from "../resources/WebsiteConversation";
10
+ import WebsiteOperator from "../resources/WebsiteOperator";
11
+ import WebsitePeople from "../resources/WebsitePeople";
12
+ import WebsiteHelpdesk from "../resources/WebsiteHelpdesk";
13
+ import WebsiteSettings from "../resources/WebsiteSettings";
14
+ import WebsiteVerify from "../resources/WebsiteVerify";
15
+ import WebsiteVisitors from "../resources/WebsiteVisitors";
16
+ /**
17
+ * Website Service
18
+ */
19
+ declare class WebsiteService {
20
+ __resources: any[];
21
+ }
22
+ export interface WebsiteServiceInterface extends WebsiteBase, WebsiteAnalytics, WebsiteAvailability, WebsiteBatch, WebsiteCampaign, WebsiteConversation, WebsiteOperator, WebsitePeople, WebsiteHelpdesk, WebsiteSettings, WebsiteVerify, WebsiteVisitors {
23
+ }
24
+ export default WebsiteService;
@@ -0,0 +1,50 @@
1
+ "use strict";
2
+ /*
3
+ * node-crisp-api
4
+ *
5
+ * Copyright 2022, Crisp IM SAS
6
+ * Author: Baptiste Jamin <baptiste@crisp.chat>
7
+ */
8
+ var __importDefault = (this && this.__importDefault) || function (mod) {
9
+ return (mod && mod.__esModule) ? mod : { "default": mod };
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ /**************************************************************************
13
+ * IMPORTS
14
+ ***************************************************************************/
15
+ // PROJECT: RESOURCES
16
+ const WebsiteBase_1 = __importDefault(require("../resources/WebsiteBase"));
17
+ const WebsiteAnalytics_1 = __importDefault(require("../resources/WebsiteAnalytics"));
18
+ const WebsiteAvailability_1 = __importDefault(require("../resources/WebsiteAvailability"));
19
+ const WebsiteBatch_1 = __importDefault(require("../resources/WebsiteBatch"));
20
+ const WebsiteCampaign_1 = __importDefault(require("../resources/WebsiteCampaign"));
21
+ const WebsiteConversation_1 = __importDefault(require("../resources/WebsiteConversation"));
22
+ const WebsiteOperator_1 = __importDefault(require("../resources/WebsiteOperator"));
23
+ const WebsitePeople_1 = __importDefault(require("../resources/WebsitePeople"));
24
+ const WebsiteHelpdesk_1 = __importDefault(require("../resources/WebsiteHelpdesk"));
25
+ const WebsiteSettings_1 = __importDefault(require("../resources/WebsiteSettings"));
26
+ const WebsiteVerify_1 = __importDefault(require("../resources/WebsiteVerify"));
27
+ const WebsiteVisitors_1 = __importDefault(require("../resources/WebsiteVisitors"));
28
+ /**
29
+ * Website Service
30
+ */
31
+ class WebsiteService {
32
+ constructor() {
33
+ /* eslint-disable @typescript-eslint/no-explicit-any */
34
+ this.__resources = [
35
+ WebsiteBase_1.default,
36
+ WebsiteAnalytics_1.default,
37
+ WebsiteAvailability_1.default,
38
+ WebsiteBatch_1.default,
39
+ WebsiteCampaign_1.default,
40
+ WebsiteConversation_1.default,
41
+ WebsiteOperator_1.default,
42
+ WebsitePeople_1.default,
43
+ WebsiteHelpdesk_1.default,
44
+ WebsiteSettings_1.default,
45
+ WebsiteVerify_1.default,
46
+ WebsiteVisitors_1.default
47
+ ];
48
+ }
49
+ }
50
+ exports.default = WebsiteService;
@@ -0,0 +1,208 @@
1
+ /*
2
+ * This file is part of node-crisp-api
3
+ *
4
+ * Copyright (c) 2025 Crisp IM SAS
5
+ * All rights belong to Crisp IM SAS
6
+ */
7
+
8
+ /**************************************************************************
9
+ * IMPORTS
10
+ ***************************************************************************/
11
+
12
+ // NPM
13
+ import globals from "globals";
14
+ import { defineConfig, globalIgnores } from "eslint/config";
15
+ import crisp from "eslint-plugin-crisp";
16
+ import tseslint from "@typescript-eslint/eslint-plugin";
17
+ import tsparser from "@typescript-eslint/parser";
18
+ import jsdoc from "eslint-plugin-jsdoc";
19
+
20
+ /**************************************************************************
21
+ * CONFIGURATION
22
+ ***************************************************************************/
23
+
24
+ export default defineConfig([
25
+ // Additional TypeScript configuration
26
+ {
27
+ files: ["lib/*.ts", "lib/**/*.ts"],
28
+ languageOptions: {
29
+ parser: tsparser,
30
+ sourceType: "module",
31
+ ecmaVersion: 2020,
32
+
33
+ globals: {
34
+ ...globals.browser,
35
+ ...globals.node
36
+ }
37
+ },
38
+ plugins: {
39
+ crisp: crisp,
40
+ "@typescript-eslint": tseslint,
41
+ jsdoc: jsdoc
42
+ },
43
+ rules: {
44
+ "@typescript-eslint/no-explicit-any": "error",
45
+
46
+ // General JS rules
47
+ "arrow-parens": ["error", "always"],
48
+ "brace-style": [
49
+ "error",
50
+ "1tbs",
51
+ {
52
+ "allowSingleLine": true
53
+ }
54
+ ],
55
+ "comma-dangle": ["error", "never"],
56
+ "comma-spacing": ["error", { "before": false, "after": true }],
57
+ "comma-style": ["error", "last"],
58
+ "curly": "error",
59
+ "computed-property-spacing": ["error", "never"],
60
+ "default-param-last": "error",
61
+ "default-case-last": "error",
62
+ "dot-notation": "error",
63
+ "eqeqeq": "error",
64
+ "eol-last": "error",
65
+ "for-direction": "error",
66
+ "indent": [
67
+ "error",
68
+ 2,
69
+ {
70
+ "SwitchCase": 1,
71
+ "FunctionDeclaration": {
72
+ "parameters": "off"
73
+ },
74
+ "FunctionExpression": {
75
+ "parameters": "off"
76
+ },
77
+ "CallExpression": {
78
+ "arguments": "off"
79
+ },
80
+ "VariableDeclarator": 1,
81
+ "outerIIFEBody": 0,
82
+ "ArrayExpression": 1,
83
+ "ObjectExpression": 1,
84
+ "ImportDeclaration": 1,
85
+ "flatTernaryExpressions": false,
86
+ "offsetTernaryExpressions": true
87
+ }
88
+ ],
89
+ "key-spacing": ["error", { "beforeColon": false, "afterColon": true }],
90
+ "keyword-spacing": "error",
91
+ "linebreak-style": ["error", "unix"],
92
+ "newline-per-chained-call": "error",
93
+ "no-console": "warn",
94
+ "no-debugger": "warn",
95
+ "no-eval": "error",
96
+ "no-implicit-coercion": "error",
97
+ "no-multi-str": "error",
98
+ "no-multiple-empty-lines": ["error", { max: 1 }],
99
+ "no-mixed-spaces-and-tabs": "error",
100
+ "no-restricted-syntax": [
101
+ "error",
102
+ {
103
+ "selector": "SwitchCase > *.consequent[type!='BlockStatement']",
104
+ "message": "Switch cases without braces are disallowed."
105
+ }
106
+ ],
107
+ "no-tabs": "error",
108
+ "no-trailing-spaces": "error",
109
+ "no-undef": "error",
110
+ "no-unused-vars": "warn",
111
+ "no-unsafe-optional-chaining": "error",
112
+ "object-curly-newline": [
113
+ "error",
114
+ {
115
+ "multiline": true, "consistent": true
116
+ }
117
+ ],
118
+ "object-curly-spacing": ["error", "always"],
119
+ "padded-blocks": ["error", "never"],
120
+ "padding-line-between-statements": [
121
+ "error",
122
+ { "blankLine": "always", "prev": "let", "next": "*" },
123
+ { "blankLine": "any", "prev": "let", "next": "let" },
124
+ { "blankLine": "always", "prev": "const", "next": "*" },
125
+ { "blankLine": "any", "prev": "const", "next": "const" },
126
+ { "blankLine": "always", "prev": "block-like", "next": "*" },
127
+ { "blankLine": "always", "prev": "*", "next": "break" },
128
+ { "blankLine": "any", "prev": "empty", "next": "break" },
129
+ { "blankLine": "always", "prev": "*", "next": "block-like" },
130
+ { "blankLine": "any", "prev": "case", "next": "case" },
131
+ { "blankLine": "always", "prev": "continue", "next": "*" },
132
+ { "blankLine": "always", "prev": "break", "next": "*" }
133
+ ],
134
+ "prefer-arrow-callback": "error",
135
+ "quotes": [
136
+ "error",
137
+ "double",
138
+ {
139
+ "avoidEscape": true, "allowTemplateLiterals": true
140
+ }
141
+ ],
142
+ "quote-props": ["error", "as-needed"],
143
+ "semi": ["error", "always"],
144
+ "semi-style": ["error", "last"],
145
+ "semi-spacing": ["error", { "before": false, "after": true }],
146
+ "space-before-blocks": "error",
147
+ "space-in-parens": ["error", "never"],
148
+ "space-infix-ops": "error",
149
+
150
+ // Crisp JS rules
151
+ "crisp/align-comments": "error",
152
+ "crisp/enforce-optional": "error",
153
+ "crisp/header-check": "error",
154
+ "crisp/header-comments-check": "error",
155
+ "crisp/import-group-comment": "error",
156
+ "crisp/import-group-order": "error",
157
+ "crisp/methods-naming": "error",
158
+ "crisp/methods-ordering": "error",
159
+ "crisp/multiline-comment-end-backslash": "error",
160
+ "crisp/newline-after-switch-case": "error",
161
+ "crisp/no-async": "off",
162
+ "crisp/no-extra-line-within-function": "error",
163
+ "crisp/no-short-parameters": [
164
+ "error",
165
+ {
166
+ "exceptions": ["_", "$", "x", "y"]
167
+ }
168
+ ],
169
+ "crisp/no-snake-case": "error",
170
+ "crisp/no-useless-template-literals": "error",
171
+ "crisp/no-var-in-blocks": "error",
172
+ "crisp/one-space-after-operator": [
173
+ "error",
174
+ {
175
+ "checkColon": false
176
+ }
177
+ ],
178
+ "crisp/regex-in-constructor": "error",
179
+ "crisp/ternary-parenthesis": "error",
180
+
181
+ // General JSDoc rules
182
+ "jsdoc/require-description": "error",
183
+ "jsdoc/require-param-description": "off",
184
+ "jsdoc/require-property-description": "off",
185
+ "jsdoc/require-jsdoc": [
186
+ "error",
187
+ {
188
+ "require": {
189
+ "FunctionDeclaration": true,
190
+ "MethodDefinition": true,
191
+ "ClassDeclaration": true,
192
+ "ArrowFunctionExpression": false,
193
+ "FunctionExpression": false
194
+ },
195
+ "contexts": [
196
+ "Property[key.name=\"getters\"] > ObjectExpression > Property",
197
+ "Property[key.name=\"methods\"] > ObjectExpression > Property"
198
+ ]
199
+ }
200
+ ]
201
+ }
202
+ },
203
+
204
+ globalIgnores([
205
+ "dist/*",
206
+ "node_modules/*"
207
+ ])
208
+ ]);