@code.store/arcxp-sdk-ts 1.0.0 → 1.1.0
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/.eslintrc.js +1 -1
- package/package.json +3 -4
- package/src/api/index.ts +2 -0
- package/src/api/websked/index.ts +13 -0
- package/src/api/websked/types.ts +7 -0
- package/scripts/publish.js +0 -24
package/.eslintrc.js
CHANGED
package/package.json
CHANGED
|
@@ -1,18 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@code.store/arcxp-sdk-ts",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./src/index.ts",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"build": "tsc",
|
|
8
8
|
"lint": "tsc --noEmit && TIMING=1 eslint \"src/**/*.ts*\"",
|
|
9
|
-
"start": "dotenv -e .env -- node ./dist/server.js",
|
|
10
9
|
"test": "vitest",
|
|
11
|
-
"publish": "
|
|
10
|
+
"publish": "npm publish --access public"
|
|
12
11
|
},
|
|
13
12
|
"keywords": [],
|
|
14
13
|
"author": "code.store",
|
|
15
|
-
"license": "
|
|
14
|
+
"license": "MIT",
|
|
16
15
|
"dependencies": {
|
|
17
16
|
"axios": "^1.4.0",
|
|
18
17
|
"axios-rate-limit": "^1.3.0",
|
package/src/api/index.ts
CHANGED
|
@@ -6,6 +6,7 @@ import { ArcIFX } from './ifx';
|
|
|
6
6
|
import { ArcMigrationCenter } from './migration-center';
|
|
7
7
|
import { ArcSales } from './sales';
|
|
8
8
|
import { ArcSite } from './site';
|
|
9
|
+
import { ArcWebsked } from './websked';
|
|
9
10
|
import WsClient from './ws.client';
|
|
10
11
|
|
|
11
12
|
export const ArcAPI = (options: ArcAPIOptions) => {
|
|
@@ -17,6 +18,7 @@ export const ArcAPI = (options: ArcAPIOptions) => {
|
|
|
17
18
|
MigrationCenter: new ArcMigrationCenter(options),
|
|
18
19
|
Sales: new ArcSales(options),
|
|
19
20
|
Site: new ArcSite(options),
|
|
21
|
+
Websked: new ArcWebsked(options),
|
|
20
22
|
};
|
|
21
23
|
|
|
22
24
|
return {
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ArcAbstractAPI, ArcAPIOptions } from '../abstract-api';
|
|
2
|
+
import { ReportStatusChangePayload } from './types';
|
|
3
|
+
|
|
4
|
+
export class ArcWebsked extends ArcAbstractAPI {
|
|
5
|
+
constructor(options: ArcAPIOptions) {
|
|
6
|
+
super({ ...options, apiPath: 'websked' });
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
async reportStatusChange(payload: ReportStatusChangePayload) {
|
|
10
|
+
const { data } = await this.client.post('/tasks/workflowStatusChange', payload);
|
|
11
|
+
return data;
|
|
12
|
+
}
|
|
13
|
+
}
|
package/scripts/publish.js
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
const { exec } = require('child_process');
|
|
2
|
-
|
|
3
|
-
const packageJson = require('../package.json');
|
|
4
|
-
const packageName = packageJson.name;
|
|
5
|
-
const packageVersion = packageJson.version;
|
|
6
|
-
const optCode = '947810';
|
|
7
|
-
|
|
8
|
-
// Publish the package
|
|
9
|
-
function publish() {
|
|
10
|
-
console.log(`Publishing ${packageName}@${packageVersion}...`);
|
|
11
|
-
|
|
12
|
-
const publishProcess = exec(`npm publish --access public --otp=${optCode}`, (error, stdout, stderr) => {
|
|
13
|
-
if (error) {
|
|
14
|
-
console.error(`Error publishing ${packageName}@${packageVersion}: ${error.message}`);
|
|
15
|
-
} else {
|
|
16
|
-
console.log(`Successfully published ${packageName}@${packageVersion}`);
|
|
17
|
-
}
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
publishProcess.stdout.pipe(process.stdout);
|
|
21
|
-
publishProcess.stderr.pipe(process.stderr);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
publish();
|