@sonoransoftware/sonoran.js 1.0.17 → 1.0.19
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.
|
@@ -5,7 +5,6 @@ const events_1 = require("events");
|
|
|
5
5
|
const RequestManager_1 = require("./RequestManager");
|
|
6
6
|
const constants_1 = require("./utils/constants");
|
|
7
7
|
const constants_2 = require("../../../../constants");
|
|
8
|
-
const utils_1 = require("./utils/utils");
|
|
9
8
|
class REST extends events_1.EventEmitter {
|
|
10
9
|
constructor(_instance, _manager, _product, options) {
|
|
11
10
|
super();
|
|
@@ -48,8 +47,7 @@ class REST extends events_1.EventEmitter {
|
|
|
48
47
|
}
|
|
49
48
|
if (!communityId || !apiKey)
|
|
50
49
|
throw new Error(`Community ID or API Key could not be found for request. P${apiType.product}`);
|
|
51
|
-
if (apiType.minVersion > this.manager.version)
|
|
52
|
-
throw new Error(`[${type}] Subscription version too low for this API type request. Current Version: ${(0, utils_1.convertSubNumToName)(this.manager.version)} Needed Version: ${(0, utils_1.convertSubNumToName)(apiType.minVersion)}`);
|
|
50
|
+
// if (apiType.minVersion > this.manager.version) throw new Error(`[${type}] Subscription version too low for this API type request. Current Version: ${convertSubNumToName(this.manager.version)} Needed Version: ${convertSubNumToName(apiType.minVersion)}`); // Verifies API Subscription Level Requirement which is deprecated currently
|
|
53
51
|
const formattedData = this.formatDataArguments(apiType.type, args);
|
|
54
52
|
const options = {
|
|
55
53
|
id: communityId,
|
|
@@ -351,6 +351,18 @@ exports.GeneralCMSAPITypes = [
|
|
|
351
351
|
path: 'general/clock_in_out',
|
|
352
352
|
method: 'POST',
|
|
353
353
|
minVersion: 3
|
|
354
|
+
},
|
|
355
|
+
{
|
|
356
|
+
type: 'KICK_ACCOUNT',
|
|
357
|
+
path: 'general/kick_account',
|
|
358
|
+
method: 'POST',
|
|
359
|
+
minVersion: 3
|
|
360
|
+
},
|
|
361
|
+
{
|
|
362
|
+
type: 'BAN_ACCOUNT',
|
|
363
|
+
path: 'general/ban_account',
|
|
364
|
+
method: 'POST',
|
|
365
|
+
minVersion: 3
|
|
354
366
|
}
|
|
355
367
|
];
|
|
356
368
|
exports.ServersCMSAPITypes = [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sonoransoftware/sonoran.js",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.19",
|
|
4
4
|
"description": "Sonoran.js is a library that allows you to interact with the Sonoran CAD and Sonoran CMS API. Based off of and utilizes several Discord.js library techniques for ease of use.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -13,7 +13,6 @@ import type { RequestInit, Response } from 'node-fetch';
|
|
|
13
13
|
// import type Collection from '@discordjs/collection';
|
|
14
14
|
import { Instance } from '../../../../instance/Instance';
|
|
15
15
|
import { CADManager } from '../../../../managers/CADManager';
|
|
16
|
-
import { convertSubNumToName } from './utils/utils';
|
|
17
16
|
import { CMSManager } from '../../../../managers/CMSManager';
|
|
18
17
|
|
|
19
18
|
/**
|
|
@@ -153,7 +152,7 @@ export class REST extends EventEmitter {
|
|
|
153
152
|
}
|
|
154
153
|
}
|
|
155
154
|
if (!communityId || !apiKey) throw new Error(`Community ID or API Key could not be found for request. P${apiType.product}`);
|
|
156
|
-
if (apiType.minVersion > this.manager.version) throw new Error(`[${type}] Subscription version too low for this API type request. Current Version: ${convertSubNumToName(this.manager.version)} Needed Version: ${convertSubNumToName(apiType.minVersion)}`);
|
|
155
|
+
// if (apiType.minVersion > this.manager.version) throw new Error(`[${type}] Subscription version too low for this API type request. Current Version: ${convertSubNumToName(this.manager.version)} Needed Version: ${convertSubNumToName(apiType.minVersion)}`); // Verifies API Subscription Level Requirement which is deprecated currently
|
|
157
156
|
const formattedData = this.formatDataArguments(apiType.type, args);
|
|
158
157
|
const options: InternalRequestData = {
|
|
159
158
|
id: communityId,
|
|
@@ -382,6 +382,18 @@ export const GeneralCMSAPITypes: APITypeData[] = [
|
|
|
382
382
|
path: 'general/clock_in_out',
|
|
383
383
|
method: 'POST',
|
|
384
384
|
minVersion: 3
|
|
385
|
+
},
|
|
386
|
+
{
|
|
387
|
+
type: 'KICK_ACCOUNT',
|
|
388
|
+
path: 'general/kick_account',
|
|
389
|
+
method: 'POST',
|
|
390
|
+
minVersion: 3
|
|
391
|
+
},
|
|
392
|
+
{
|
|
393
|
+
type: 'BAN_ACCOUNT',
|
|
394
|
+
path: 'general/ban_account',
|
|
395
|
+
method: 'POST',
|
|
396
|
+
minVersion: 3
|
|
385
397
|
}
|
|
386
398
|
];
|
|
387
399
|
|
package/tsconfig.json
CHANGED
|
@@ -5,16 +5,16 @@
|
|
|
5
5
|
/* Basic Options */
|
|
6
6
|
// "incremental": true, /* Enable incremental compilation */
|
|
7
7
|
"target": "ES2019" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */,
|
|
8
|
-
"module": "commonjs"
|
|
8
|
+
"module": "commonjs" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */,
|
|
9
9
|
// "lib": [], /* Specify library files to be included in the compilation. */
|
|
10
10
|
// "allowJs": true, /* Allow javascript files to be compiled. */
|
|
11
11
|
// "checkJs": true, /* Report errors in .js files. */
|
|
12
12
|
// "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */
|
|
13
|
-
"declaration": true
|
|
13
|
+
"declaration": true /* Generates corresponding '.d.ts' file. */,
|
|
14
14
|
// "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */
|
|
15
15
|
// "sourceMap": true, /* Generates corresponding '.map' file. */
|
|
16
16
|
// "outFile": "./", /* Concatenate and emit output to single file. */
|
|
17
|
-
"outDir": "./dist"
|
|
17
|
+
"outDir": "./dist" /* Redirect output structure to the directory. */,
|
|
18
18
|
// "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
|
|
19
19
|
// "composite": true, /* Enable project compilation */
|
|
20
20
|
// "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */
|
|
@@ -35,10 +35,10 @@
|
|
|
35
35
|
// "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */
|
|
36
36
|
|
|
37
37
|
/* Additional Checks */
|
|
38
|
-
"noUnusedLocals": true
|
|
39
|
-
"noUnusedParameters": true
|
|
40
|
-
"noImplicitReturns": true
|
|
41
|
-
"noFallthroughCasesInSwitch": true
|
|
38
|
+
"noUnusedLocals": true /* Report errors on unused locals. */,
|
|
39
|
+
"noUnusedParameters": true /* Report errors on unused parameters. */,
|
|
40
|
+
"noImplicitReturns": true /* Report error when not all code paths in function return a value. */,
|
|
41
|
+
"noFallthroughCasesInSwitch": true /* Report errors for fallthrough cases in switch statement. */,
|
|
42
42
|
|
|
43
43
|
/* Module Resolution Options */
|
|
44
44
|
"moduleResolution": "node" /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */,
|
|
@@ -64,8 +64,8 @@
|
|
|
64
64
|
// "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */
|
|
65
65
|
|
|
66
66
|
/* Advanced Options */
|
|
67
|
-
|
|
67
|
+
"skipLibCheck": true /* Skip type checking of declaration files. */
|
|
68
68
|
// "forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */
|
|
69
69
|
},
|
|
70
70
|
"include": ["src/**/**/*"]
|
|
71
|
-
}
|
|
71
|
+
}
|