@arrowsphere/api-client 3.408.0 → 3.409.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/CHANGELOG.md +4 -0
- package/build/catalog/catalogPlanClient.d.ts +32 -0
- package/build/catalog/catalogPlanClient.js +56 -0
- package/build/catalog/index.d.ts +2 -0
- package/build/catalog/index.js +2 -0
- package/build/catalog/types/catalogPlan.d.ts +50 -0
- package/build/catalog/types/catalogPlan.js +3 -0
- package/build/publicApiClient.d.ts +2 -1
- package/build/publicApiClient.js +5 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,10 @@
|
|
|
3
3
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
4
4
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
5
5
|
|
|
6
|
+
## [3.409.0] - 2026.10.07
|
|
7
|
+
### Added
|
|
8
|
+
- [catalog] Add `CatalogPlanClient` (`/catalog/plans`): list, get, create, update and delete catalog plans
|
|
9
|
+
|
|
6
10
|
## [3.408.0] - 2026.10.02
|
|
7
11
|
### Added
|
|
8
12
|
- [Orders] provide partner's acronym on Order
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { AbstractRestfulClient, Parameters } from '../abstractRestfulClient';
|
|
2
|
+
import { CreateCatalogPlanPayload, CreateCatalogPlanResponse, GetCatalogPlanResponse, ListCatalogPlansResponse, UpdateCatalogPlanPayload } from './types/catalogPlan';
|
|
3
|
+
export declare class CatalogPlanClient extends AbstractRestfulClient {
|
|
4
|
+
/**
|
|
5
|
+
* The base path of the API
|
|
6
|
+
*/
|
|
7
|
+
protected basePath: string;
|
|
8
|
+
/**
|
|
9
|
+
* Lists the catalog plans of the logged-in reseller
|
|
10
|
+
*/
|
|
11
|
+
listCatalogPlans(parameters?: Parameters): Promise<ListCatalogPlansResponse>;
|
|
12
|
+
/**
|
|
13
|
+
* Gets a single catalog plan by name
|
|
14
|
+
*/
|
|
15
|
+
getCatalogPlan(planName: string, parameters?: Parameters): Promise<GetCatalogPlanResponse>;
|
|
16
|
+
/**
|
|
17
|
+
* Creates a new catalog plan
|
|
18
|
+
*/
|
|
19
|
+
createCatalogPlan(payload: CreateCatalogPlanPayload, parameters?: Parameters): Promise<CreateCatalogPlanResponse>;
|
|
20
|
+
/**
|
|
21
|
+
* Partially updates a catalog plan (name, customersRef and/or programs)
|
|
22
|
+
*/
|
|
23
|
+
updateCatalogPlan(planName: string, payload: UpdateCatalogPlanPayload, parameters?: Parameters): Promise<void>;
|
|
24
|
+
/**
|
|
25
|
+
* Deletes a catalog plan
|
|
26
|
+
*/
|
|
27
|
+
deleteCatalogPlan(planName: string, parameters?: Parameters): Promise<void>;
|
|
28
|
+
/**
|
|
29
|
+
* Plan names may contain spaces, so they must be encoded in the URL path
|
|
30
|
+
*/
|
|
31
|
+
private planPath;
|
|
32
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CatalogPlanClient = void 0;
|
|
4
|
+
const abstractRestfulClient_1 = require("../abstractRestfulClient");
|
|
5
|
+
class CatalogPlanClient extends abstractRestfulClient_1.AbstractRestfulClient {
|
|
6
|
+
constructor() {
|
|
7
|
+
super(...arguments);
|
|
8
|
+
/**
|
|
9
|
+
* The base path of the API
|
|
10
|
+
*/
|
|
11
|
+
this.basePath = '/catalog/plans';
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Lists the catalog plans of the logged-in reseller
|
|
15
|
+
*/
|
|
16
|
+
async listCatalogPlans(parameters = {}) {
|
|
17
|
+
this.path = '';
|
|
18
|
+
return this.get(parameters, {}, { returnAxiosData: true });
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Gets a single catalog plan by name
|
|
22
|
+
*/
|
|
23
|
+
async getCatalogPlan(planName, parameters = {}) {
|
|
24
|
+
this.path = this.planPath(planName);
|
|
25
|
+
return this.get(parameters, {}, { returnAxiosData: true });
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Creates a new catalog plan
|
|
29
|
+
*/
|
|
30
|
+
async createCatalogPlan(payload, parameters = {}) {
|
|
31
|
+
this.path = '';
|
|
32
|
+
return this.post(payload, parameters, {}, { returnAxiosData: true });
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Partially updates a catalog plan (name, customersRef and/or programs)
|
|
36
|
+
*/
|
|
37
|
+
async updateCatalogPlan(planName, payload, parameters = {}) {
|
|
38
|
+
this.path = this.planPath(planName);
|
|
39
|
+
return this.patch(payload, parameters, {}, { returnAxiosData: true });
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Deletes a catalog plan
|
|
43
|
+
*/
|
|
44
|
+
async deleteCatalogPlan(planName, parameters = {}) {
|
|
45
|
+
this.path = this.planPath(planName);
|
|
46
|
+
return this.delete(parameters);
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Plan names may contain spaces, so they must be encoded in the URL path
|
|
50
|
+
*/
|
|
51
|
+
planPath(planName) {
|
|
52
|
+
return `/${encodeURIComponent(planName)}`;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
exports.CatalogPlanClient = CatalogPlanClient;
|
|
56
|
+
//# sourceMappingURL=catalogPlanClient.js.map
|
package/build/catalog/index.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export * from './catalogGraphQLClient';
|
|
2
2
|
export * from './catalogClient';
|
|
3
|
+
export * from './catalogPlanClient';
|
|
4
|
+
export * from './types/catalogPlan';
|
|
3
5
|
export * from './types/catalogGraphQLTypes';
|
|
4
6
|
export * from './entities/program';
|
|
5
7
|
export * from './entities/programs';
|
package/build/catalog/index.js
CHANGED
|
@@ -16,6 +16,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./catalogGraphQLClient"), exports);
|
|
18
18
|
__exportStar(require("./catalogClient"), exports);
|
|
19
|
+
__exportStar(require("./catalogPlanClient"), exports);
|
|
20
|
+
__exportStar(require("./types/catalogPlan"), exports);
|
|
19
21
|
__exportStar(require("./types/catalogGraphQLTypes"), exports);
|
|
20
22
|
__exportStar(require("./entities/program"), exports);
|
|
21
23
|
__exportStar(require("./entities/programs"), exports);
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { PaginationData } from '../../pagination';
|
|
2
|
+
export declare type CatalogPlanBillingLabel = {
|
|
3
|
+
label: string;
|
|
4
|
+
value: number;
|
|
5
|
+
};
|
|
6
|
+
export declare type CatalogPlanProgramRulesType = {
|
|
7
|
+
cycles?: CatalogPlanBillingLabel[];
|
|
8
|
+
marketSegments?: string[];
|
|
9
|
+
terms?: CatalogPlanBillingLabel[];
|
|
10
|
+
};
|
|
11
|
+
export declare type CatalogPlanProgramType = {
|
|
12
|
+
offerSku?: string[];
|
|
13
|
+
programName: string;
|
|
14
|
+
rules?: CatalogPlanProgramRulesType;
|
|
15
|
+
};
|
|
16
|
+
export declare type CatalogPlanType = {
|
|
17
|
+
customersRef: string[];
|
|
18
|
+
name: string;
|
|
19
|
+
offers: string[];
|
|
20
|
+
programs: CatalogPlanProgramType[];
|
|
21
|
+
};
|
|
22
|
+
export declare type CatalogPlanProgramRulesPayload = {
|
|
23
|
+
cycles?: number[];
|
|
24
|
+
marketSegments?: string[];
|
|
25
|
+
terms?: number[];
|
|
26
|
+
};
|
|
27
|
+
export declare type CatalogPlanProgramPayload = {
|
|
28
|
+
offerSku?: string[];
|
|
29
|
+
programName: string;
|
|
30
|
+
rules?: CatalogPlanProgramRulesPayload;
|
|
31
|
+
};
|
|
32
|
+
export declare type CreateCatalogPlanPayload = {
|
|
33
|
+
customersRef?: string[];
|
|
34
|
+
name: string;
|
|
35
|
+
programs?: CatalogPlanProgramPayload[];
|
|
36
|
+
};
|
|
37
|
+
export declare type UpdateCatalogPlanPayload = Partial<CreateCatalogPlanPayload>;
|
|
38
|
+
export declare type ListCatalogPlansResponse = {
|
|
39
|
+
data: CatalogPlanType[];
|
|
40
|
+
pagination: PaginationData;
|
|
41
|
+
status: number;
|
|
42
|
+
};
|
|
43
|
+
export declare type GetCatalogPlanResponse = {
|
|
44
|
+
data: CatalogPlanType;
|
|
45
|
+
status: number;
|
|
46
|
+
};
|
|
47
|
+
export declare type CreateCatalogPlanResponse = {
|
|
48
|
+
data: CatalogPlanType;
|
|
49
|
+
status: number;
|
|
50
|
+
};
|
|
@@ -10,7 +10,7 @@ import { ConsumptionClient } from './consumption';
|
|
|
10
10
|
import { WellArchitectedRegisterClient, WellArchitectedStandardsClient } from './wellArchitected';
|
|
11
11
|
import { CartClient } from './cart/cartClient';
|
|
12
12
|
import { SupportCenterClient } from './supportCenter';
|
|
13
|
-
import { CatalogClient } from './catalog';
|
|
13
|
+
import { CatalogClient, CatalogPlanClient } from './catalog';
|
|
14
14
|
import { UserClient } from './user';
|
|
15
15
|
import { NotificationsClient } from './notifications';
|
|
16
16
|
import { RegisterClient, StandardsClient } from './security';
|
|
@@ -104,6 +104,7 @@ export declare class PublicApiClient extends AbstractRestfulClient {
|
|
|
104
104
|
getCartClient(configuration?: ConfigurationsClient): CartClient;
|
|
105
105
|
getSupportCenterClient(configuration?: ConfigurationsClient): SupportCenterClient;
|
|
106
106
|
getCatalogClient(configuration?: ConfigurationsClient): CatalogClient;
|
|
107
|
+
getCatalogPlanClient(configuration?: ConfigurationsClient): CatalogPlanClient;
|
|
107
108
|
getUserClient(configuration?: ConfigurationsClient): UserClient;
|
|
108
109
|
getNotificationsClient(configuration?: ConfigurationsClient): NotificationsClient;
|
|
109
110
|
getOrganizationUnitClient(configuration?: ConfigurationsClient): OrganizationUnitClient;
|
package/build/publicApiClient.js
CHANGED
|
@@ -196,6 +196,11 @@ class PublicApiClient extends abstractRestfulClient_1.AbstractRestfulClient {
|
|
|
196
196
|
this.applyConfig(client);
|
|
197
197
|
return client;
|
|
198
198
|
}
|
|
199
|
+
getCatalogPlanClient(configuration) {
|
|
200
|
+
const client = new catalog_1.CatalogPlanClient(configuration);
|
|
201
|
+
this.applyConfig(client);
|
|
202
|
+
return client;
|
|
203
|
+
}
|
|
199
204
|
getUserClient(configuration) {
|
|
200
205
|
const client = new user_1.UserClient(configuration);
|
|
201
206
|
this.applyConfig(client);
|
package/package.json
CHANGED