@code.store/arcxp-sdk-ts 4.14.2 → 4.15.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/README.md +10 -5
- package/dist/api/global-settings/index.d.ts +7 -0
- package/dist/api/global-settings/index.js +19 -0
- package/dist/api/global-settings/index.js.map +1 -0
- package/dist/api/global-settings/types.d.ts +37 -0
- package/dist/api/global-settings/types.js +3 -0
- package/dist/api/global-settings/types.js.map +1 -0
- package/dist/api/index.d.ts +2 -0
- package/dist/api/index.js +2 -0
- package/dist/api/index.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -16,15 +16,20 @@ npm i @code.store/arcxp-sdk-ts
|
|
|
16
16
|
|
|
17
17
|
#### API
|
|
18
18
|
|
|
19
|
+
- Author
|
|
19
20
|
- Draft
|
|
20
|
-
- Site
|
|
21
|
-
- Websked
|
|
22
21
|
- Identity
|
|
23
|
-
- Sales
|
|
24
|
-
- Retail Events (WebSockets)
|
|
25
|
-
- Author
|
|
26
22
|
- IFX
|
|
23
|
+
- Redirect
|
|
27
24
|
- Migration Center
|
|
25
|
+
- Sales
|
|
26
|
+
- Site
|
|
27
|
+
- Websked
|
|
28
|
+
- Retail Events (WebSockets)
|
|
29
|
+
- Content
|
|
30
|
+
- Signing Service
|
|
31
|
+
- PhotoCenter
|
|
32
|
+
- Global Settings
|
|
28
33
|
|
|
29
34
|
##### Usage example
|
|
30
35
|
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ArcAbstractAPI, ArcAPIOptions } from '../abstract-api';
|
|
2
|
+
import { Distributor, GetDistributorsParams, GetDistributorsResponse, CreateDistributorPayload } from './types';
|
|
3
|
+
export declare class GlobalSettings extends ArcAbstractAPI {
|
|
4
|
+
constructor(options: ArcAPIOptions);
|
|
5
|
+
getDistributors(params?: GetDistributorsParams): Promise<GetDistributorsResponse>;
|
|
6
|
+
createDistributors(payload: CreateDistributorPayload): Promise<Distributor>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GlobalSettings = void 0;
|
|
4
|
+
const abstract_api_1 = require("../abstract-api");
|
|
5
|
+
class GlobalSettings extends abstract_api_1.ArcAbstractAPI {
|
|
6
|
+
constructor(options) {
|
|
7
|
+
super({ ...options, apiPath: 'settings/v1' });
|
|
8
|
+
}
|
|
9
|
+
async getDistributors(params) {
|
|
10
|
+
const { data } = await this.client.get(`/distributor`, { params });
|
|
11
|
+
return data;
|
|
12
|
+
}
|
|
13
|
+
async createDistributors(payload) {
|
|
14
|
+
const { data } = await this.client.post(`/distributor`, payload);
|
|
15
|
+
return data;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
exports.GlobalSettings = GlobalSettings;
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api/global-settings/index.ts"],"names":[],"mappings":";;;AAAA,kDAAgE;AAGhE,MAAa,cAAe,SAAQ,6BAAc;IAChD,YAAY,OAAsB;QAChC,KAAK,CAAC,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,CAAC,CAAC;IAChD,CAAC;IAED,KAAK,CAAC,eAAe,CAAC,MAA8B;QAClD,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,GAAG,CAA0B,cAAc,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;QAE5F,OAAO,IAAI,CAAC;IACd,CAAC;IAED,KAAK,CAAC,kBAAkB,CAAC,OAAiC;QACxD,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,cAAc,EAAE,OAAO,CAAC,CAAC;QAEjE,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AAhBD,wCAgBC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export type Distributor = {
|
|
2
|
+
id: string;
|
|
3
|
+
name: string;
|
|
4
|
+
description: string;
|
|
5
|
+
organizationId: string;
|
|
6
|
+
archived: boolean;
|
|
7
|
+
category: string;
|
|
8
|
+
subcategory: string;
|
|
9
|
+
allowAll: boolean;
|
|
10
|
+
createdAt: string;
|
|
11
|
+
createdBy: string;
|
|
12
|
+
modifiedAt: string;
|
|
13
|
+
modifiedBy: string;
|
|
14
|
+
organization_id: string;
|
|
15
|
+
organization: DistributorOrganization;
|
|
16
|
+
contentTypes: DistributorContentType[];
|
|
17
|
+
restrictions: DistributorRestriction[];
|
|
18
|
+
};
|
|
19
|
+
export type DistributorOrganization = {
|
|
20
|
+
id: string;
|
|
21
|
+
name: string;
|
|
22
|
+
};
|
|
23
|
+
export type DistributorContentType = {
|
|
24
|
+
name: string;
|
|
25
|
+
};
|
|
26
|
+
export type DistributorRestriction = unknown;
|
|
27
|
+
export type GetDistributorsParams = Partial<{
|
|
28
|
+
archived: boolean;
|
|
29
|
+
order: string;
|
|
30
|
+
limit: number;
|
|
31
|
+
offset: number;
|
|
32
|
+
}>;
|
|
33
|
+
export type GetDistributorsResponse = {
|
|
34
|
+
rows: Distributor[];
|
|
35
|
+
count?: number;
|
|
36
|
+
};
|
|
37
|
+
export type CreateDistributorPayload = Partial<Omit<Distributor, 'id'>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/api/global-settings/types.ts"],"names":[],"mappings":""}
|
package/dist/api/index.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ import { ArcSigningService } from './signing-service';
|
|
|
12
12
|
import { ArcSite } from './site';
|
|
13
13
|
import { ArcWebsked } from './websked';
|
|
14
14
|
import { WsClient } from './ws.client';
|
|
15
|
+
import { GlobalSettings } from './global-settings';
|
|
15
16
|
export declare const ArcAPI: (options: ArcAPIOptions) => {
|
|
16
17
|
setMaxRPS: (rps: number) => void;
|
|
17
18
|
RetailEvents: (index?: '0' | '1' | 'string') => WsClient;
|
|
@@ -27,4 +28,5 @@ export declare const ArcAPI: (options: ArcAPIOptions) => {
|
|
|
27
28
|
Content: ArcContent;
|
|
28
29
|
SigningService: ArcSigningService;
|
|
29
30
|
PhotoCenter: ArcProtoCenter;
|
|
31
|
+
GlobalSettings: GlobalSettings;
|
|
30
32
|
};
|
package/dist/api/index.js
CHANGED
|
@@ -14,6 +14,7 @@ const signing_service_1 = require("./signing-service");
|
|
|
14
14
|
const site_1 = require("./site");
|
|
15
15
|
const websked_1 = require("./websked");
|
|
16
16
|
const ws_client_1 = require("./ws.client");
|
|
17
|
+
const global_settings_1 = require("./global-settings");
|
|
17
18
|
const ArcAPI = (options) => {
|
|
18
19
|
const API = {
|
|
19
20
|
Author: new author_1.ArcAuthor(options),
|
|
@@ -28,6 +29,7 @@ const ArcAPI = (options) => {
|
|
|
28
29
|
Content: new content_1.ArcContent(options),
|
|
29
30
|
SigningService: new signing_service_1.ArcSigningService(options),
|
|
30
31
|
PhotoCenter: new photo_center_1.ArcProtoCenter(options),
|
|
32
|
+
GlobalSettings: new global_settings_1.GlobalSettings(options),
|
|
31
33
|
};
|
|
32
34
|
return {
|
|
33
35
|
...API,
|
package/dist/api/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":";;;AACA,qCAAqC;AACrC,uCAAuC;AACvC,mCAAmC;AACnC,yCAAyC;AACzC,+BAA+B;AAC/B,yCAAyC;AACzC,yDAAwD;AACxD,iDAAgD;AAChD,mCAAmC;AACnC,uDAAsD;AACtD,iCAAiC;AACjC,uCAAuC;AACvC,2CAAuC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":";;;AACA,qCAA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AAO,CAAC,WAAW,CAAC,gBAAgB,iDAAiD,KAAK,EAAE,CAAC;YAC1H,MAAM,OAAO,GAAG;gBACd,aAAa,EAAE,UAAU,OAAO,CAAC,WAAW,CAAC,WAAW,EAAE;aAC3D,CAAC;YACF,OAAO,IAAI,oBAAQ,CAAC,OAAO,EAAE,EAAE,OAAO,EAAE,CAAC,CAAC;QAC5C,CAAC;KACF,CAAC;AACJ,CAAC,CAAC;AA9BW,QAAA,MAAM,UA8BjB"}
|
package/dist/index.d.ts
CHANGED
|
@@ -13,4 +13,5 @@ export * from './api/sales/types';
|
|
|
13
13
|
export * from './api/websked/types';
|
|
14
14
|
export * from './api/content/types';
|
|
15
15
|
export * from './api/photo-center/types';
|
|
16
|
+
export * from './api/global-settings/types';
|
|
16
17
|
export { ArcAPI, WsClient, ContentElement, ContentElementType, ArcTypes, ArcError };
|
package/dist/index.js
CHANGED
|
@@ -47,4 +47,5 @@ __exportStar(require("./api/sales/types"), exports);
|
|
|
47
47
|
__exportStar(require("./api/websked/types"), exports);
|
|
48
48
|
__exportStar(require("./api/content/types"), exports);
|
|
49
49
|
__exportStar(require("./api/photo-center/types"), exports);
|
|
50
|
+
__exportStar(require("./api/global-settings/types"), exports);
|
|
50
51
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+BAA+B;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+BAA+B;AAkBtB,uFAlBA,YAAM,OAkBA;AAjBf,yDAAwE;AAiB7C,+FAjBlB,iCAAc,OAiBkB;AAhBzC,+CAA2C;AAgB1B,yFAhBR,oBAAQ,OAgBQ;AAfzB,uCAAuC;AAekC,yFAfhE,gBAAQ,OAegE;AAdjF,kDAAoC;AAc2B,4BAAQ;AAZvE,uDAAqC;AACrC,oDAAkC;AAClC,mDAAiC;AACjC,kDAAgC;AAChC,uDAAqC;AACrC,+DAA6C;AAC7C,oDAAkC;AAClC,sDAAoC;AACpC,sDAAoC;AACpC,2DAAyC;AACzC,8DAA4C"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@code.store/arcxp-sdk-ts",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.15.0",
|
|
4
4
|
"description": "A strongly typed set of ArcXP API's and utilities reduce the amount of work required to develop with ArcXP, starting with reducing the boilerplate code you have to write.",
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"main": "./dist/index.js",
|