@arrowsphere/api-client 3.70.0-rc.fdi.1 → 3.70.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 +2 -2
- package/build/graphqlApi/graphqlApiClient.d.ts +5 -5
- package/build/graphqlApi/graphqlApiClient.js +37 -24
- package/build/graphqlApi/index.d.ts +2 -0
- package/build/graphqlApi/index.js +2 -0
- package/build/graphqlApi/types/entities/company.d.ts +14 -8
- package/build/graphqlApi/types/entities/contact.d.ts +26 -0
- package/build/graphqlApi/types/entities/contact.js +3 -0
- package/build/graphqlApi/types/entities/program.d.ts +5 -0
- package/build/graphqlApi/types/entities/program.js +3 -0
- package/build/graphqlApi/types/entities/subscription.d.ts +9 -0
- package/build/graphqlApi/types/entities/subscription.js +3 -0
- package/build/graphqlApi/types/graphqlApiQueries.d.ts +5 -1
- package/build/graphqlApi/types/graphqlApiQueries.js +1 -0
- package/build/graphqlApi/types/graphqlApiSchemas.d.ts +15 -1
- package/build/index.d.ts +0 -1
- package/build/index.js +0 -1
- package/build/publicApiClient.d.ts +0 -2
- package/build/publicApiClient.js +0 -6
- package/package.json +1 -1
- package/build/organisationUnit/entities/organizationUnit.d.ts +0 -25
- package/build/organisationUnit/entities/organizationUnit.js +0 -67
- package/build/organisationUnit/entities/organizationUnitList.d.ts +0 -9
- package/build/organisationUnit/entities/organizationUnitList.js +0 -33
- package/build/organisationUnit/index.d.ts +0 -3
- package/build/organisationUnit/index.js +0 -20
- package/build/organisationUnit/organizationUnitClient.d.ts +0 -18
- package/build/organisationUnit/organizationUnitClient.js +0 -39
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AbstractGraphQLClient } from '../abstractGraphQLClient';
|
|
2
2
|
import { ArrowCompanyType, EndCustomerType, PartnerType } from './types/entities/company';
|
|
3
|
-
import { SelectAllQueryType, SelectAllResultType, SelectOneQueryType, SelectOneResultType } from './types/graphqlApiQueries';
|
|
3
|
+
import { InputPaginationType, SelectAllQueryType, SelectAllResultType, SelectOneQueryType, SelectOneResultType } from './types/graphqlApiQueries';
|
|
4
4
|
import { ArrowCompanySchema, EndCustomerSchema, PartnerSchema, SelectOneResponseDataSchema } from './types/graphqlApiSchemas';
|
|
5
5
|
export declare class GraphqlApiClient extends AbstractGraphQLClient {
|
|
6
6
|
/**
|
|
@@ -10,8 +10,8 @@ export declare class GraphqlApiClient extends AbstractGraphQLClient {
|
|
|
10
10
|
find<GraphQLResponseTypes>(request: string): Promise<GraphQLResponseTypes | null>;
|
|
11
11
|
selectAll(query: SelectAllQueryType): Promise<SelectAllResultType | null>;
|
|
12
12
|
selectOne(query: SelectOneQueryType): Promise<SelectOneResultType | null>;
|
|
13
|
-
findOneById<T>(id: number, fieldSchema: SelectOneResponseDataSchema): Promise<T | null>;
|
|
14
|
-
findEndCustomerById(id: number, fields: EndCustomerSchema): Promise<EndCustomerType | null>;
|
|
15
|
-
findPartnerById(id: number, fields: PartnerSchema): Promise<PartnerType | null>;
|
|
16
|
-
findArrowCompanyById(id: number, fields: ArrowCompanySchema): Promise<ArrowCompanyType | null>;
|
|
13
|
+
findOneById<T>(id: number, fieldSchema: SelectOneResponseDataSchema, pagination?: InputPaginationType): Promise<T | null>;
|
|
14
|
+
findEndCustomerById(id: number, fields: EndCustomerSchema, pagination?: InputPaginationType): Promise<EndCustomerType | null>;
|
|
15
|
+
findPartnerById(id: number, fields: PartnerSchema, pagination?: InputPaginationType): Promise<PartnerType | null>;
|
|
16
|
+
findArrowCompanyById(id: number, fields: ArrowCompanySchema, pagination?: InputPaginationType): Promise<ArrowCompanyType | null>;
|
|
17
17
|
}
|
|
@@ -30,30 +30,43 @@ class GraphqlApiClient extends abstractGraphQLClient_1.AbstractGraphQLClient {
|
|
|
30
30
|
const result = await this.find(queryStr);
|
|
31
31
|
return result;
|
|
32
32
|
}
|
|
33
|
-
async findOneById(id, fieldSchema) {
|
|
34
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
33
|
+
async findOneById(id, fieldSchema, pagination) {
|
|
34
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
35
35
|
const keys = Object.keys(fieldSchema);
|
|
36
36
|
if (keys.length === 0) {
|
|
37
37
|
return null;
|
|
38
38
|
}
|
|
39
39
|
const type = keys[0];
|
|
40
|
-
const
|
|
41
|
-
[graphqlApiQueries_1.
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
[graphqlApiQueries_1.
|
|
40
|
+
const queryArguments = {
|
|
41
|
+
[graphqlApiQueries_1.QueryVariablesField.FILTERS]: {
|
|
42
|
+
[graphqlApiQueries_1.InputSearchFilterField.GROUPS]: [
|
|
43
|
+
{
|
|
44
|
+
[graphqlApiQueries_1.InputFiltersField.ITEMS]: [
|
|
45
45
|
{
|
|
46
|
-
[graphqlApiQueries_1.
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
[graphqlApiQueries_1.InputFilterValueField.OPERATOR]: graphqlApiQueries_1.ComparisonOperator.EQUALS,
|
|
50
|
-
[graphqlApiQueries_1.InputFilterValueField.VALUE]: [`${id}`],
|
|
51
|
-
},
|
|
52
|
-
],
|
|
46
|
+
[graphqlApiQueries_1.InputFilterValueField.NAME]: 'id',
|
|
47
|
+
[graphqlApiQueries_1.InputFilterValueField.OPERATOR]: graphqlApiQueries_1.ComparisonOperator.EQUALS,
|
|
48
|
+
[graphqlApiQueries_1.InputFilterValueField.VALUE]: [`${id}`],
|
|
53
49
|
},
|
|
54
50
|
],
|
|
55
51
|
},
|
|
56
|
-
|
|
52
|
+
],
|
|
53
|
+
},
|
|
54
|
+
};
|
|
55
|
+
if ((pagination === null || pagination === void 0 ? void 0 : pagination[graphqlApiQueries_1.InputPaginationField.PER_PAGE]) ||
|
|
56
|
+
(pagination === null || pagination === void 0 ? void 0 : pagination[graphqlApiQueries_1.InputPaginationField.PAGE])) {
|
|
57
|
+
queryArguments[graphqlApiQueries_1.QueryVariablesField.PAGINATION] = {
|
|
58
|
+
[graphqlApiQueries_1.InputPaginationField.PAGE]: (_a = pagination === null || pagination === void 0 ? void 0 : pagination[graphqlApiQueries_1.InputPaginationField.PAGE]) !== null && _a !== void 0 ? _a : 1,
|
|
59
|
+
};
|
|
60
|
+
if (pagination === null || pagination === void 0 ? void 0 : pagination[graphqlApiQueries_1.InputPaginationField.PER_PAGE]) {
|
|
61
|
+
queryArguments[graphqlApiQueries_1.QueryVariablesField.PAGINATION] = {
|
|
62
|
+
...queryArguments[graphqlApiQueries_1.QueryVariablesField.PAGINATION],
|
|
63
|
+
[graphqlApiQueries_1.InputPaginationField.PER_PAGE]: pagination === null || pagination === void 0 ? void 0 : pagination[graphqlApiQueries_1.InputPaginationField.PER_PAGE],
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
const query = {
|
|
68
|
+
[graphqlApiQueries_1.Queries.SELECT_ONE]: {
|
|
69
|
+
__args: queryArguments,
|
|
57
70
|
[graphqlApiQueries_1.SelectableField.DATA]: fieldSchema,
|
|
58
71
|
[graphqlApiQueries_1.SelectableField.ERRORS]: {
|
|
59
72
|
[graphqlApiQueries_1.ErrorsField.MESSAGE]: true,
|
|
@@ -62,25 +75,25 @@ class GraphqlApiClient extends abstractGraphQLClient_1.AbstractGraphQLClient {
|
|
|
62
75
|
};
|
|
63
76
|
const queryStr = this.stringifyQuery(query);
|
|
64
77
|
const result = await this.find(queryStr);
|
|
65
|
-
if ((
|
|
66
|
-
throw new Error((
|
|
78
|
+
if ((_d = (_c = (_b = result === null || result === void 0 ? void 0 : result[graphqlApiQueries_1.Queries.SELECT_ONE]) === null || _b === void 0 ? void 0 : _b[graphqlApiQueries_1.SelectableField.ERRORS]) === null || _c === void 0 ? void 0 : _c[graphqlApiQueries_1.ErrorsField.MESSAGE]) === null || _d === void 0 ? void 0 : _d.length) {
|
|
79
|
+
throw new Error((_f = (_e = result === null || result === void 0 ? void 0 : result[graphqlApiQueries_1.Queries.SELECT_ONE]) === null || _e === void 0 ? void 0 : _e[graphqlApiQueries_1.SelectableField.ERRORS]) === null || _f === void 0 ? void 0 : _f[graphqlApiQueries_1.ErrorsField.MESSAGE]);
|
|
67
80
|
}
|
|
68
|
-
return (
|
|
81
|
+
return (_h = (_g = result === null || result === void 0 ? void 0 : result[graphqlApiQueries_1.Queries.SELECT_ONE]) === null || _g === void 0 ? void 0 : _g[graphqlApiQueries_1.SelectableField.DATA]) === null || _h === void 0 ? void 0 : _h[type];
|
|
69
82
|
}
|
|
70
|
-
async findEndCustomerById(id, fields) {
|
|
83
|
+
async findEndCustomerById(id, fields, pagination) {
|
|
71
84
|
return await this.findOneById(id, {
|
|
72
85
|
[graphqlApiQueries_1.SelectDataField.END_CUSTOMER]: fields,
|
|
73
|
-
});
|
|
86
|
+
}, pagination);
|
|
74
87
|
}
|
|
75
|
-
async findPartnerById(id, fields) {
|
|
88
|
+
async findPartnerById(id, fields, pagination) {
|
|
76
89
|
return await this.findOneById(id, {
|
|
77
90
|
[graphqlApiQueries_1.SelectDataField.PARTNER]: fields,
|
|
78
|
-
});
|
|
91
|
+
}, pagination);
|
|
79
92
|
}
|
|
80
|
-
async findArrowCompanyById(id, fields) {
|
|
93
|
+
async findArrowCompanyById(id, fields, pagination) {
|
|
81
94
|
return await this.findOneById(id, {
|
|
82
95
|
[graphqlApiQueries_1.SelectDataField.ARROW_COMPANY]: fields,
|
|
83
|
-
});
|
|
96
|
+
}, pagination);
|
|
84
97
|
}
|
|
85
98
|
}
|
|
86
99
|
exports.GraphqlApiClient = GraphqlApiClient;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
export * from './types/graphqlApiQueries';
|
|
2
2
|
export * from './types/graphqlApiSchemas';
|
|
3
|
+
export * from './types/entities/contact';
|
|
3
4
|
export * from './types/entities/company';
|
|
4
5
|
export * from './types/entities/country';
|
|
5
6
|
export * from './types/entities/partnertag';
|
|
7
|
+
export * from './types/entities/subscription';
|
|
6
8
|
export * from './types/entities/workgroup';
|
|
7
9
|
export * from './graphqlApiClient';
|
|
@@ -16,9 +16,11 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./types/graphqlApiQueries"), exports);
|
|
18
18
|
__exportStar(require("./types/graphqlApiSchemas"), exports);
|
|
19
|
+
__exportStar(require("./types/entities/contact"), exports);
|
|
19
20
|
__exportStar(require("./types/entities/company"), exports);
|
|
20
21
|
__exportStar(require("./types/entities/country"), exports);
|
|
21
22
|
__exportStar(require("./types/entities/partnertag"), exports);
|
|
23
|
+
__exportStar(require("./types/entities/subscription"), exports);
|
|
22
24
|
__exportStar(require("./types/entities/workgroup"), exports);
|
|
23
25
|
__exportStar(require("./graphqlApiClient"), exports);
|
|
24
26
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import { ContactsType } from './contact';
|
|
1
2
|
import { CountryType } from './country';
|
|
2
3
|
import { PartnertagType } from './partnertag';
|
|
4
|
+
import { SubscriptionType } from './subscription';
|
|
3
5
|
import { WorkgroupType } from './workgroup';
|
|
4
6
|
export declare type CompanyTypeType = {
|
|
5
7
|
id?: number;
|
|
@@ -11,6 +13,7 @@ declare type BaseCompanyType = {
|
|
|
11
13
|
address2?: string;
|
|
12
14
|
billingId?: string;
|
|
13
15
|
city?: string;
|
|
16
|
+
contacts?: ContactsType[];
|
|
14
17
|
createdAt?: string;
|
|
15
18
|
deletedAt?: string;
|
|
16
19
|
enabled?: boolean;
|
|
@@ -25,6 +28,7 @@ declare type BaseCompanyType = {
|
|
|
25
28
|
resellerId?: number;
|
|
26
29
|
state?: string;
|
|
27
30
|
vatNumber?: string;
|
|
31
|
+
workgroup?: WorkgroupType;
|
|
28
32
|
zip?: string;
|
|
29
33
|
};
|
|
30
34
|
export declare type EndCustomerType = BaseCompanyType & {
|
|
@@ -35,16 +39,18 @@ declare type CountableType = {
|
|
|
35
39
|
total?: number;
|
|
36
40
|
};
|
|
37
41
|
export declare type PartnerType = BaseCompanyType & {
|
|
42
|
+
contactsCount?: CountableType;
|
|
38
43
|
country?: CountryType;
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
subscriptionsPendingCount?: CountableType;
|
|
42
|
-
subscriptionsCount?: CountableType;
|
|
44
|
+
customersCount?: CountableType;
|
|
45
|
+
ordersCount?: CountableType;
|
|
43
46
|
ordersNeedCount?: CountableType;
|
|
44
47
|
reportsCount?: CountableType;
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
+
subscriptions?: SubscriptionType[];
|
|
49
|
+
subscriptionsCount?: CountableType;
|
|
50
|
+
subscriptionsPendingCount?: CountableType;
|
|
51
|
+
type?: CompanyTypeType;
|
|
52
|
+
};
|
|
53
|
+
export declare type ArrowCompanyType = Omit<BaseCompanyType, 'partnerTags'> & {
|
|
54
|
+
subscriptions?: SubscriptionType[];
|
|
48
55
|
};
|
|
49
|
-
export declare type ArrowCompanyType = Omit<BaseCompanyType, 'partnerTags'>;
|
|
50
56
|
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export declare type ContactsType = {
|
|
2
|
+
id?: number;
|
|
3
|
+
active?: boolean;
|
|
4
|
+
communicationEmail?: string;
|
|
5
|
+
effectiveDate?: string;
|
|
6
|
+
email?: string;
|
|
7
|
+
erpId?: string;
|
|
8
|
+
firstname?: string;
|
|
9
|
+
lastname?: string;
|
|
10
|
+
locked?: boolean;
|
|
11
|
+
phone?: string;
|
|
12
|
+
status?: string;
|
|
13
|
+
tseAccountStatus?: string;
|
|
14
|
+
username?: string;
|
|
15
|
+
type?: ContactTypeType;
|
|
16
|
+
role?: ContactRole;
|
|
17
|
+
};
|
|
18
|
+
declare type ContactRole = {
|
|
19
|
+
id?: number;
|
|
20
|
+
name?: string;
|
|
21
|
+
};
|
|
22
|
+
declare type ContactTypeType = {
|
|
23
|
+
id?: number;
|
|
24
|
+
name?: string;
|
|
25
|
+
};
|
|
26
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { PartnerType } from './company';
|
|
2
|
+
import { ContactsType } from './contact';
|
|
3
|
+
import { ProgramType } from './program';
|
|
4
|
+
export declare type SubscriptionType = {
|
|
5
|
+
id?: number;
|
|
6
|
+
company?: PartnerType;
|
|
7
|
+
localContact?: ContactsType;
|
|
8
|
+
program?: ProgramType;
|
|
9
|
+
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ArrowCompanyType, EndCustomerType, PartnerType } from './entities/company';
|
|
2
2
|
import { ContinentType, CountryType } from './entities/country';
|
|
3
3
|
import { PartnertagType } from './entities/partnertag';
|
|
4
|
+
import { SubscriptionType } from './entities/subscription';
|
|
4
5
|
import { WorkgroupType } from './entities/workgroup';
|
|
5
6
|
import { ErrorsSchema, PageSchema, SelectAllResponseDataSchema, SelectOneResponseDataSchema } from './graphqlApiSchemas';
|
|
6
7
|
/**
|
|
@@ -113,6 +114,7 @@ export declare enum SelectDataField {
|
|
|
113
114
|
END_CUSTOMER = "endCustomer",
|
|
114
115
|
PARTNER = "partner",
|
|
115
116
|
PARTNERTAG = "partnertag",
|
|
117
|
+
SUBSCRIPTION = "subscription",
|
|
116
118
|
WORKGROUP = "workgroup"
|
|
117
119
|
}
|
|
118
120
|
export declare type SelectAllResultType = {
|
|
@@ -129,6 +131,7 @@ export declare type SelectAllResponseDataType = {
|
|
|
129
131
|
[SelectDataField.END_CUSTOMER]?: EndCustomerType[];
|
|
130
132
|
[SelectDataField.PARTNER]?: PartnerType[];
|
|
131
133
|
[SelectDataField.PARTNERTAG]?: PartnertagType[];
|
|
134
|
+
[SelectDataField.SUBSCRIPTION]?: SubscriptionType[];
|
|
132
135
|
[SelectDataField.WORKGROUP]?: WorkgroupType[];
|
|
133
136
|
};
|
|
134
137
|
export declare enum ErrorsField {
|
|
@@ -170,6 +173,7 @@ export declare type SelectOneResponseDataType = {
|
|
|
170
173
|
[SelectDataField.END_CUSTOMER]?: EndCustomerType;
|
|
171
174
|
[SelectDataField.PARTNER]?: PartnerType;
|
|
172
175
|
[SelectDataField.PARTNERTAG]?: PartnertagType;
|
|
176
|
+
[SelectDataField.SUBSCRIPTION]?: SubscriptionType;
|
|
173
177
|
[SelectDataField.WORKGROUP]?: WorkgroupType;
|
|
174
178
|
};
|
|
175
179
|
export declare enum QueryVariablesField {
|
|
@@ -196,7 +200,7 @@ export declare enum Queries {
|
|
|
196
200
|
}
|
|
197
201
|
export declare type SelectOneQueryType = {
|
|
198
202
|
[Queries.SELECT_ONE]: {
|
|
199
|
-
__args?:
|
|
203
|
+
__args?: QueryVariablesType;
|
|
200
204
|
[SelectableField.DATA]: SelectOneResponseDataSchema;
|
|
201
205
|
[SelectableField.ERRORS]?: ErrorsSchema;
|
|
202
206
|
};
|
|
@@ -96,6 +96,7 @@ var SelectDataField;
|
|
|
96
96
|
SelectDataField["END_CUSTOMER"] = "endCustomer";
|
|
97
97
|
SelectDataField["PARTNER"] = "partner";
|
|
98
98
|
SelectDataField["PARTNERTAG"] = "partnertag";
|
|
99
|
+
SelectDataField["SUBSCRIPTION"] = "subscription";
|
|
99
100
|
SelectDataField["WORKGROUP"] = "workgroup";
|
|
100
101
|
})(SelectDataField = exports.SelectDataField || (exports.SelectDataField = {}));
|
|
101
102
|
var ErrorsField;
|
|
@@ -4,21 +4,33 @@ import { PartnertagType } from './entities/partnertag';
|
|
|
4
4
|
import { ContinentType, CountryType } from './entities/country';
|
|
5
5
|
import { WorkgroupType } from './entities/workgroup';
|
|
6
6
|
import { ErrorsType, PageType, Queries, SelectDataField, SelectableField } from './graphqlApiQueries';
|
|
7
|
+
import { ContactsType } from './entities/contact';
|
|
8
|
+
import { ProgramType } from '../../catalog';
|
|
9
|
+
import { SubscriptionType } from './entities/subscription';
|
|
7
10
|
export declare type PartnertagSchema = Schema<PartnertagType, boolean>;
|
|
8
11
|
declare type MissingFieldsOfCompanySchema = {
|
|
12
|
+
contacts?: ContactsSchema;
|
|
9
13
|
partnerTags?: PartnertagSchema;
|
|
14
|
+
subscriptions?: SubscriptionSchema;
|
|
15
|
+
};
|
|
16
|
+
declare type MissingFieldsOfArrowCompanySchema = {
|
|
17
|
+
subscriptions?: SubscriptionSchema;
|
|
10
18
|
};
|
|
11
19
|
declare type MissingFieldsOfEndCustomerSchema = {
|
|
20
|
+
contacts?: ContactsSchema;
|
|
12
21
|
partnerTags?: PartnertagSchema;
|
|
13
22
|
partner?: PartnerSchema;
|
|
14
23
|
};
|
|
15
24
|
export declare type EndCustomerSchema = Merge<Schema<EndCustomerType, boolean>, MissingFieldsOfEndCustomerSchema>;
|
|
16
25
|
export declare type PartnerSchema = Merge<Schema<PartnerType, boolean>, MissingFieldsOfCompanySchema>;
|
|
17
|
-
export declare type ArrowCompanySchema = Schema<ArrowCompanyType, boolean>;
|
|
26
|
+
export declare type ArrowCompanySchema = Merge<Schema<ArrowCompanyType, boolean>, MissingFieldsOfArrowCompanySchema>;
|
|
27
|
+
export declare type ContactsSchema = Schema<ContactsType, boolean>;
|
|
18
28
|
export declare type ContinentSchema = Schema<ContinentType, boolean>;
|
|
19
29
|
export declare type CountrySchema = Schema<CountryType, boolean>;
|
|
20
30
|
export declare type ErrorsSchema = Schema<ErrorsType, boolean>;
|
|
21
31
|
export declare type PageSchema = Schema<PageType, boolean>;
|
|
32
|
+
export declare type ProgramSchema = Schema<ProgramType, boolean>;
|
|
33
|
+
export declare type SubscriptionSchema = Schema<SubscriptionType, boolean>;
|
|
22
34
|
export declare type WorkgroupSchema = Schema<WorkgroupType, boolean>;
|
|
23
35
|
export declare type SelectAllResultSchema = {
|
|
24
36
|
[SelectableField.DATA]?: SelectAllResponseDataSchema;
|
|
@@ -32,6 +44,7 @@ export declare type SelectAllResponseDataSchema = {
|
|
|
32
44
|
[SelectDataField.END_CUSTOMER]?: EndCustomerSchema;
|
|
33
45
|
[SelectDataField.PARTNER]?: PartnerSchema;
|
|
34
46
|
[SelectDataField.PARTNERTAG]?: PartnertagSchema;
|
|
47
|
+
[SelectDataField.SUBSCRIPTION]?: SubscriptionSchema;
|
|
35
48
|
[SelectDataField.WORKGROUP]?: WorkgroupSchema;
|
|
36
49
|
};
|
|
37
50
|
export declare type SelectOneResultSchema = {
|
|
@@ -45,6 +58,7 @@ export declare type SelectOneResponseDataSchema = {
|
|
|
45
58
|
[SelectDataField.END_CUSTOMER]?: EndCustomerSchema;
|
|
46
59
|
[SelectDataField.PARTNER]?: PartnerSchema;
|
|
47
60
|
[SelectDataField.PARTNERTAG]?: PartnertagSchema;
|
|
61
|
+
[SelectDataField.SUBSCRIPTION]?: SubscriptionSchema;
|
|
48
62
|
[SelectDataField.WORKGROUP]?: WorkgroupSchema;
|
|
49
63
|
};
|
|
50
64
|
export declare type SelectAllQuerySchema = {
|
package/build/index.d.ts
CHANGED
|
@@ -15,7 +15,6 @@ export * from './pagination';
|
|
|
15
15
|
export * from './licenses/';
|
|
16
16
|
export * from './notifications/';
|
|
17
17
|
export * from './orders/';
|
|
18
|
-
export * from './organisationUnit/';
|
|
19
18
|
export * from './partner';
|
|
20
19
|
export * from './publicApiClient';
|
|
21
20
|
export * from './publicGraphQLClient';
|
package/build/index.js
CHANGED
|
@@ -44,7 +44,6 @@ __exportStar(require("./pagination"), exports);
|
|
|
44
44
|
__exportStar(require("./licenses/"), exports);
|
|
45
45
|
__exportStar(require("./notifications/"), exports);
|
|
46
46
|
__exportStar(require("./orders/"), exports);
|
|
47
|
-
__exportStar(require("./organisationUnit/"), exports);
|
|
48
47
|
__exportStar(require("./partner"), exports);
|
|
49
48
|
__exportStar(require("./publicApiClient"), exports);
|
|
50
49
|
__exportStar(require("./publicGraphQLClient"), exports);
|
|
@@ -15,7 +15,6 @@ import { UserClient } from './user';
|
|
|
15
15
|
import { NotificationsClient } from './notifications';
|
|
16
16
|
import { RegisterClient, StandardsClient } from './security';
|
|
17
17
|
import { PartnerClient } from './partner';
|
|
18
|
-
import { OrganizationUnitClient } from './organisationUnit';
|
|
19
18
|
/**
|
|
20
19
|
* Public API Client class, should be the main entry point for your calls
|
|
21
20
|
*/
|
|
@@ -90,6 +89,5 @@ export declare class PublicApiClient extends AbstractRestfulClient {
|
|
|
90
89
|
getCatalogClient(configuration?: ConfigurationsClient): CatalogClient;
|
|
91
90
|
getUserClient(configuration?: ConfigurationsClient): UserClient;
|
|
92
91
|
getNotificationsClient(configuration?: ConfigurationsClient): NotificationsClient;
|
|
93
|
-
getOrganizationUnitClient(configuration?: ConfigurationsClient): OrganizationUnitClient;
|
|
94
92
|
}
|
|
95
93
|
export default PublicApiClient;
|
package/build/publicApiClient.js
CHANGED
|
@@ -18,7 +18,6 @@ const user_1 = require("./user");
|
|
|
18
18
|
const notifications_1 = require("./notifications");
|
|
19
19
|
const security_1 = require("./security");
|
|
20
20
|
const partner_1 = require("./partner");
|
|
21
|
-
const organisationUnit_1 = require("./organisationUnit");
|
|
22
21
|
/**
|
|
23
22
|
* Public API Client class, should be the main entry point for your calls
|
|
24
23
|
*/
|
|
@@ -182,11 +181,6 @@ class PublicApiClient extends abstractRestfulClient_1.AbstractRestfulClient {
|
|
|
182
181
|
this.applyConfig(client);
|
|
183
182
|
return client;
|
|
184
183
|
}
|
|
185
|
-
getOrganizationUnitClient(configuration) {
|
|
186
|
-
const client = new organisationUnit_1.OrganizationUnitClient(configuration);
|
|
187
|
-
this.applyConfig(client);
|
|
188
|
-
return client;
|
|
189
|
-
}
|
|
190
184
|
}
|
|
191
185
|
exports.PublicApiClient = PublicApiClient;
|
|
192
186
|
exports.default = PublicApiClient;
|
package/package.json
CHANGED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { AbstractEntity } from '../../abstractEntity';
|
|
2
|
-
export declare enum OrganizationUnitFields {
|
|
3
|
-
COLUMN_ORGANIZATION_UNIT_REF = "organizationUnitRef",
|
|
4
|
-
COLUMN_COMPANY_REF = "companyRef",
|
|
5
|
-
COLUMN_NAME = "name",
|
|
6
|
-
COLUMN_COUNT_USERS = "countUsers",
|
|
7
|
-
COLUMN_COUNT_CUSTOMERS = "countCustomers"
|
|
8
|
-
}
|
|
9
|
-
export declare type OrganizationUnitType = {
|
|
10
|
-
[OrganizationUnitFields.COLUMN_ORGANIZATION_UNIT_REF]: string;
|
|
11
|
-
[OrganizationUnitFields.COLUMN_COMPANY_REF]: string;
|
|
12
|
-
[OrganizationUnitFields.COLUMN_NAME]: string;
|
|
13
|
-
[OrganizationUnitFields.COLUMN_COUNT_USERS]?: number;
|
|
14
|
-
[OrganizationUnitFields.COLUMN_COUNT_CUSTOMERS]?: number;
|
|
15
|
-
};
|
|
16
|
-
export declare class OrganizationUnit extends AbstractEntity<OrganizationUnitType> {
|
|
17
|
-
#private;
|
|
18
|
-
constructor(organizationUnitInput: OrganizationUnitType);
|
|
19
|
-
get organizationUnitRef(): string;
|
|
20
|
-
get companyRef(): string;
|
|
21
|
-
get name(): string;
|
|
22
|
-
get countUsers(): number | undefined;
|
|
23
|
-
get countCustomers(): number | undefined;
|
|
24
|
-
toJSON(): OrganizationUnitType;
|
|
25
|
-
}
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
3
|
-
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
4
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
5
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
6
|
-
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
7
|
-
};
|
|
8
|
-
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
9
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
10
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
11
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
12
|
-
};
|
|
13
|
-
var _OrganizationUnit_organizationUnitRef, _OrganizationUnit_companyRef, _OrganizationUnit_name, _OrganizationUnit_countUsers, _OrganizationUnit_countCustomers;
|
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.OrganizationUnit = exports.OrganizationUnitFields = void 0;
|
|
16
|
-
const abstractEntity_1 = require("../../abstractEntity");
|
|
17
|
-
var OrganizationUnitFields;
|
|
18
|
-
(function (OrganizationUnitFields) {
|
|
19
|
-
OrganizationUnitFields["COLUMN_ORGANIZATION_UNIT_REF"] = "organizationUnitRef";
|
|
20
|
-
OrganizationUnitFields["COLUMN_COMPANY_REF"] = "companyRef";
|
|
21
|
-
OrganizationUnitFields["COLUMN_NAME"] = "name";
|
|
22
|
-
OrganizationUnitFields["COLUMN_COUNT_USERS"] = "countUsers";
|
|
23
|
-
OrganizationUnitFields["COLUMN_COUNT_CUSTOMERS"] = "countCustomers";
|
|
24
|
-
})(OrganizationUnitFields = exports.OrganizationUnitFields || (exports.OrganizationUnitFields = {}));
|
|
25
|
-
class OrganizationUnit extends abstractEntity_1.AbstractEntity {
|
|
26
|
-
constructor(organizationUnitInput) {
|
|
27
|
-
super(organizationUnitInput);
|
|
28
|
-
_OrganizationUnit_organizationUnitRef.set(this, void 0);
|
|
29
|
-
_OrganizationUnit_companyRef.set(this, void 0);
|
|
30
|
-
_OrganizationUnit_name.set(this, void 0);
|
|
31
|
-
_OrganizationUnit_countUsers.set(this, void 0);
|
|
32
|
-
_OrganizationUnit_countCustomers.set(this, void 0);
|
|
33
|
-
__classPrivateFieldSet(this, _OrganizationUnit_organizationUnitRef, organizationUnitInput[OrganizationUnitFields.COLUMN_ORGANIZATION_UNIT_REF], "f");
|
|
34
|
-
__classPrivateFieldSet(this, _OrganizationUnit_companyRef, organizationUnitInput[OrganizationUnitFields.COLUMN_COMPANY_REF], "f");
|
|
35
|
-
__classPrivateFieldSet(this, _OrganizationUnit_name, organizationUnitInput[OrganizationUnitFields.COLUMN_NAME], "f");
|
|
36
|
-
__classPrivateFieldSet(this, _OrganizationUnit_countUsers, organizationUnitInput[OrganizationUnitFields.COLUMN_COUNT_USERS], "f");
|
|
37
|
-
__classPrivateFieldSet(this, _OrganizationUnit_countCustomers, organizationUnitInput[OrganizationUnitFields.COLUMN_COUNT_CUSTOMERS], "f");
|
|
38
|
-
}
|
|
39
|
-
get organizationUnitRef() {
|
|
40
|
-
return __classPrivateFieldGet(this, _OrganizationUnit_organizationUnitRef, "f");
|
|
41
|
-
}
|
|
42
|
-
get companyRef() {
|
|
43
|
-
return __classPrivateFieldGet(this, _OrganizationUnit_companyRef, "f");
|
|
44
|
-
}
|
|
45
|
-
get name() {
|
|
46
|
-
return __classPrivateFieldGet(this, _OrganizationUnit_name, "f");
|
|
47
|
-
}
|
|
48
|
-
get countUsers() {
|
|
49
|
-
return __classPrivateFieldGet(this, _OrganizationUnit_countUsers, "f");
|
|
50
|
-
}
|
|
51
|
-
get countCustomers() {
|
|
52
|
-
return __classPrivateFieldGet(this, _OrganizationUnit_countCustomers, "f");
|
|
53
|
-
}
|
|
54
|
-
toJSON() {
|
|
55
|
-
return {
|
|
56
|
-
[OrganizationUnitFields.COLUMN_ORGANIZATION_UNIT_REF]: this
|
|
57
|
-
.organizationUnitRef,
|
|
58
|
-
[OrganizationUnitFields.COLUMN_COMPANY_REF]: this.companyRef,
|
|
59
|
-
[OrganizationUnitFields.COLUMN_NAME]: this.name,
|
|
60
|
-
[OrganizationUnitFields.COLUMN_COUNT_USERS]: this.countUsers,
|
|
61
|
-
[OrganizationUnitFields.COLUMN_COUNT_CUSTOMERS]: this.countCustomers,
|
|
62
|
-
};
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
exports.OrganizationUnit = OrganizationUnit;
|
|
66
|
-
_OrganizationUnit_organizationUnitRef = new WeakMap(), _OrganizationUnit_companyRef = new WeakMap(), _OrganizationUnit_name = new WeakMap(), _OrganizationUnit_countUsers = new WeakMap(), _OrganizationUnit_countCustomers = new WeakMap();
|
|
67
|
-
//# sourceMappingURL=organizationUnit.js.map
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { OrganizationUnit, OrganizationUnitType } from './organizationUnit';
|
|
2
|
-
import { AbstractEntity } from '../../abstractEntity';
|
|
3
|
-
export declare type OrganizationUnitListType = Array<OrganizationUnitType>;
|
|
4
|
-
export declare class OrganizationUnitList extends AbstractEntity<OrganizationUnitListType> {
|
|
5
|
-
#private;
|
|
6
|
-
constructor(organizationUnitsDataInput: OrganizationUnitListType);
|
|
7
|
-
get organizationUnitList(): Array<OrganizationUnit>;
|
|
8
|
-
toJSON(): OrganizationUnitListType;
|
|
9
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
3
|
-
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
4
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
5
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
6
|
-
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
7
|
-
};
|
|
8
|
-
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
9
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
10
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
11
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
12
|
-
};
|
|
13
|
-
var _OrganizationUnitList_organizationUnitList;
|
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.OrganizationUnitList = void 0;
|
|
16
|
-
const organizationUnit_1 = require("./organizationUnit");
|
|
17
|
-
const abstractEntity_1 = require("../../abstractEntity");
|
|
18
|
-
class OrganizationUnitList extends abstractEntity_1.AbstractEntity {
|
|
19
|
-
constructor(organizationUnitsDataInput) {
|
|
20
|
-
super(organizationUnitsDataInput);
|
|
21
|
-
_OrganizationUnitList_organizationUnitList.set(this, void 0);
|
|
22
|
-
__classPrivateFieldSet(this, _OrganizationUnitList_organizationUnitList, organizationUnitsDataInput.map((organizationUnit) => new organizationUnit_1.OrganizationUnit(organizationUnit)), "f");
|
|
23
|
-
}
|
|
24
|
-
get organizationUnitList() {
|
|
25
|
-
return __classPrivateFieldGet(this, _OrganizationUnitList_organizationUnitList, "f");
|
|
26
|
-
}
|
|
27
|
-
toJSON() {
|
|
28
|
-
return this.organizationUnitList.map((organizationUnit) => organizationUnit.toJSON());
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
exports.OrganizationUnitList = OrganizationUnitList;
|
|
32
|
-
_OrganizationUnitList_organizationUnitList = new WeakMap();
|
|
33
|
-
//# sourceMappingURL=organizationUnitList.js.map
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./entities/organizationUnitList"), exports);
|
|
18
|
-
__exportStar(require("./entities/organizationUnit"), exports);
|
|
19
|
-
__exportStar(require("./organizationUnitClient"), exports);
|
|
20
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { AbstractRestfulClient, Parameters } from '../abstractRestfulClient';
|
|
2
|
-
import { GetResult } from '../getResult';
|
|
3
|
-
import { OrganizationUnit } from './entities/organizationUnit';
|
|
4
|
-
import { OrganizationUnitList } from './entities/organizationUnitList';
|
|
5
|
-
export declare enum OrganisationUnitPayloadFields {
|
|
6
|
-
COLUMN_NAME = "name"
|
|
7
|
-
}
|
|
8
|
-
export declare type OrganisationUnitPayloadType = {
|
|
9
|
-
[OrganisationUnitPayloadFields.COLUMN_NAME]: string;
|
|
10
|
-
};
|
|
11
|
-
export declare class OrganizationUnitClient extends AbstractRestfulClient {
|
|
12
|
-
protected basePath: string;
|
|
13
|
-
getList(perPage?: number, page?: number, parameters?: Parameters): Promise<GetResult<OrganizationUnitList>>;
|
|
14
|
-
create(payload: OrganisationUnitPayloadType, parameters?: Parameters): Promise<GetResult<OrganizationUnit>>;
|
|
15
|
-
getOne(organisationUnitRef: string, parameters?: Parameters): Promise<GetResult<OrganizationUnit>>;
|
|
16
|
-
update(organisationUnitRef: string, payload: OrganisationUnitPayloadType, parameters?: Parameters): Promise<GetResult<OrganizationUnit>>;
|
|
17
|
-
deleteOne(organisationUnitRef: string, parameters?: Parameters): Promise<void>;
|
|
18
|
-
}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.OrganizationUnitClient = exports.OrganisationUnitPayloadFields = void 0;
|
|
4
|
-
const abstractRestfulClient_1 = require("../abstractRestfulClient");
|
|
5
|
-
const getResult_1 = require("../getResult");
|
|
6
|
-
const organizationUnit_1 = require("./entities/organizationUnit");
|
|
7
|
-
const organizationUnitList_1 = require("./entities/organizationUnitList");
|
|
8
|
-
var OrganisationUnitPayloadFields;
|
|
9
|
-
(function (OrganisationUnitPayloadFields) {
|
|
10
|
-
OrganisationUnitPayloadFields["COLUMN_NAME"] = "name";
|
|
11
|
-
})(OrganisationUnitPayloadFields = exports.OrganisationUnitPayloadFields || (exports.OrganisationUnitPayloadFields = {}));
|
|
12
|
-
class OrganizationUnitClient extends abstractRestfulClient_1.AbstractRestfulClient {
|
|
13
|
-
constructor() {
|
|
14
|
-
super(...arguments);
|
|
15
|
-
this.basePath = '/partners/organisationUnits';
|
|
16
|
-
}
|
|
17
|
-
async getList(perPage = 25, page = 1, parameters = {}) {
|
|
18
|
-
this.setPage(page);
|
|
19
|
-
this.setPerPage(perPage);
|
|
20
|
-
return new getResult_1.GetResult(organizationUnitList_1.OrganizationUnitList, await this.get(parameters));
|
|
21
|
-
}
|
|
22
|
-
async create(payload, parameters = {}) {
|
|
23
|
-
return new getResult_1.GetResult(organizationUnit_1.OrganizationUnit, await this.post(payload, parameters));
|
|
24
|
-
}
|
|
25
|
-
async getOne(organisationUnitRef, parameters = {}) {
|
|
26
|
-
this.path = `/${organisationUnitRef}`;
|
|
27
|
-
return new getResult_1.GetResult(organizationUnit_1.OrganizationUnit, await this.get(parameters));
|
|
28
|
-
}
|
|
29
|
-
async update(organisationUnitRef, payload, parameters = {}) {
|
|
30
|
-
this.path = `/${organisationUnitRef}`;
|
|
31
|
-
return new getResult_1.GetResult(organizationUnit_1.OrganizationUnit, await this.patch(payload, parameters));
|
|
32
|
-
}
|
|
33
|
-
async deleteOne(organisationUnitRef, parameters = {}) {
|
|
34
|
-
this.path = `/${organisationUnitRef}`;
|
|
35
|
-
return await this.delete(parameters);
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
exports.OrganizationUnitClient = OrganizationUnitClient;
|
|
39
|
-
//# sourceMappingURL=organizationUnitClient.js.map
|