@arrowsphere/api-client 3.47.0-rc.rde.1 → 3.48.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 CHANGED
@@ -3,12 +3,18 @@
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.47.0] - 2023-07-18
6
+
7
+ ## [3.48.0] - 2023-08-01
7
8
 
8
9
  ### Changed
9
10
 
10
11
  - Fix notifications attributes types
11
12
 
13
+ ## [3.47.0] - 2023-08-01
14
+
15
+ ### Changed
16
+
17
+ - graphqlAPI Client
12
18
 
13
19
  ## [3.46.0] - 2023-07-18
14
20
 
@@ -0,0 +1,11 @@
1
+ import { AbstractGraphQLClient } from '../abstractGraphQLClient';
2
+ import { SelectAllQueryType, SelectAllResultType, SelectOneQueryType, SelectOneResultType } from './types/graphqlApiQueries';
3
+ export declare class GraphqlApiClient extends AbstractGraphQLClient {
4
+ /**
5
+ * The Path of graphql catalog API
6
+ */
7
+ private GRAPHQL;
8
+ find<GraphQLResponseTypes>(request: string): Promise<GraphQLResponseTypes | null>;
9
+ selectAll(query: SelectAllQueryType): Promise<SelectAllResultType | null>;
10
+ selectOne(query: SelectOneQueryType): Promise<SelectOneResultType | null>;
11
+ }
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GraphqlApiClient = void 0;
4
+ const abstractGraphQLClient_1 = require("../abstractGraphQLClient");
5
+ class GraphqlApiClient extends abstractGraphQLClient_1.AbstractGraphQLClient {
6
+ constructor() {
7
+ super(...arguments);
8
+ /**
9
+ * The Path of graphql catalog API
10
+ */
11
+ this.GRAPHQL = '';
12
+ }
13
+ async find(request) {
14
+ this.path = this.GRAPHQL;
15
+ try {
16
+ return await this.post(request);
17
+ }
18
+ catch (error) {
19
+ return null;
20
+ }
21
+ }
22
+ async selectAll(query) {
23
+ const queryStr = this.stringifyQuery(query);
24
+ const result = await this.find(queryStr);
25
+ return result;
26
+ }
27
+ async selectOne(query) {
28
+ const queryStr = this.stringifyQuery(query);
29
+ const result = await this.find(queryStr);
30
+ return result;
31
+ }
32
+ }
33
+ exports.GraphqlApiClient = GraphqlApiClient;
34
+ //# sourceMappingURL=graphqlApiClient.js.map
@@ -0,0 +1,7 @@
1
+ export * from './types/graphqlApiQueries';
2
+ export * from './types/graphqlApiSchemas';
3
+ export * from './types/entities/company';
4
+ export * from './types/entities/country';
5
+ export * from './types/entities/partnertag';
6
+ export * from './types/entities/workgroup';
7
+ export * from './graphqlApiClient';
@@ -0,0 +1,24 @@
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("./types/graphqlApiQueries"), exports);
18
+ __exportStar(require("./types/graphqlApiSchemas"), exports);
19
+ __exportStar(require("./types/entities/company"), exports);
20
+ __exportStar(require("./types/entities/country"), exports);
21
+ __exportStar(require("./types/entities/partnertag"), exports);
22
+ __exportStar(require("./types/entities/workgroup"), exports);
23
+ __exportStar(require("./graphqlApiClient"), exports);
24
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,49 @@
1
+ import { CountryType } from './country';
2
+ import { PartnertagType } from './partnertag';
3
+ import { WorkgroupType } from './workgroup';
4
+ export declare type CompanyTypeType = {
5
+ id?: number;
6
+ type?: string;
7
+ };
8
+ declare type BaseCompanyType = {
9
+ acronym?: string;
10
+ address1?: string;
11
+ address2?: string;
12
+ billingId?: string;
13
+ city?: string;
14
+ createdAt?: string;
15
+ deletedAt?: string;
16
+ enabled?: boolean;
17
+ erpId?: string;
18
+ id?: number;
19
+ internalReference?: string;
20
+ locked?: boolean;
21
+ name?: string;
22
+ partnerRef?: string;
23
+ partnerTags?: PartnertagType[];
24
+ phone?: string;
25
+ state?: string;
26
+ vatNumber?: string;
27
+ zip?: string;
28
+ };
29
+ export declare type EndCustomerType = BaseCompanyType & {
30
+ partner?: PartnerType;
31
+ };
32
+ declare type CountableType = {
33
+ id?: number;
34
+ total?: number;
35
+ };
36
+ export declare type PartnerType = BaseCompanyType & {
37
+ country?: CountryType;
38
+ type?: CompanyTypeType;
39
+ workgroup?: WorkgroupType;
40
+ subscriptionsPendingCount?: CountableType;
41
+ subscriptionsCount?: CountableType;
42
+ ordersNeedCount?: CountableType;
43
+ reportsCount?: CountableType;
44
+ ordersCount?: CountableType;
45
+ customersCount?: CountableType;
46
+ contactsCount?: CountableType;
47
+ };
48
+ export declare type ArrowCompanyType = Omit<BaseCompanyType, 'partnerTags'>;
49
+ export {};
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=company.js.map
@@ -0,0 +1,14 @@
1
+ export declare type ContinentType = {
2
+ id?: number;
3
+ name?: string;
4
+ };
5
+ export declare type CountryType = {
6
+ code2?: string;
7
+ code3?: string;
8
+ continent?: ContinentType;
9
+ id?: number;
10
+ lat?: number;
11
+ lng?: number;
12
+ name?: string;
13
+ phoneCode?: string;
14
+ };
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=country.js.map
@@ -0,0 +1,6 @@
1
+ export declare type PartnertagType = {
2
+ createdAt?: string;
3
+ description?: string;
4
+ id?: number;
5
+ label?: string;
6
+ };
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=partnertag.js.map
@@ -0,0 +1,7 @@
1
+ import { ArrowCompanyType } from './company';
2
+ export declare type WorkgroupType = {
3
+ arrowCompany?: ArrowCompanyType;
4
+ code?: string;
5
+ id?: number;
6
+ name?: string;
7
+ };
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=workgroup.js.map
@@ -0,0 +1,201 @@
1
+ import { ArrowCompanyType, EndCustomerType, PartnerType } from './entities/company';
2
+ import { ContinentType, CountryType } from './entities/country';
3
+ import { PartnertagType } from './entities/partnertag';
4
+ import { WorkgroupType } from './entities/workgroup';
5
+ import { ErrorsSchema, PageSchema, SelectAllResponseDataSchema } from './graphqlApiSchemas';
6
+ /**
7
+ * For field __args
8
+ */
9
+ export declare enum ComparisonOperator {
10
+ BETWEEN = "BETWEEN",
11
+ CONTAINS = "CONTAINS",
12
+ ENDS_WITH = "ENDS_WITH",
13
+ EQUALS = "EQUALS",
14
+ GREAT_THAN = "GREAT_THAN",
15
+ GREAT_THAN_OR_EQUALS = "GREAT_THAN_OR_EQUALS",
16
+ IS_NULL = "IS_NULL",
17
+ LESS_THAN = "LESS_THAN",
18
+ LESS_THAN_OR_EQUALS = "LESS_THAN_OR_EQUALS",
19
+ STARTS_WITH = "STARTS_WITH",
20
+ DIFFERENT = "DIFFERENT"
21
+ }
22
+ export declare enum LogicalOperator {
23
+ AND = "AND",
24
+ OR = "OR"
25
+ }
26
+ export declare enum QueryModifier {
27
+ ALL = "ALL",
28
+ DISTINCT = "DISTINCT",
29
+ DISTINCTROW = "DISTINCTROW",
30
+ HIGH_PRIORITY = "HIGH_PRIORITY",
31
+ SQL_BIG_RESULT = "SQL_BIG_RESULT",
32
+ SQL_BUFFER_RESULT = "SQL_BUFFER_RESULT",
33
+ SQL_CALC_FOUND_ROWS = "SQL_CALC_FOUND_ROWS",
34
+ SQL_NO_CACHE = "SQL_NO_CACHE",
35
+ SQL_SMALL_RESULT = "SQL_SMALL_RESULT",
36
+ STRAIGHT_JOIN = "STRAIGHT_JOIN"
37
+ }
38
+ export declare enum Direction {
39
+ ASC = "ASC",
40
+ DESC = "DESC",
41
+ asc = "asc",
42
+ desc = "desc"
43
+ }
44
+ export declare enum InputPaginationField {
45
+ PAGE = "page",
46
+ PER_PAGE = "perPage"
47
+ }
48
+ export declare type InputPaginationType = {
49
+ [InputPaginationField.PAGE]?: number;
50
+ [InputPaginationField.PER_PAGE]?: number;
51
+ };
52
+ export declare enum InputSortFilterField {
53
+ DIRECTION = "direction",
54
+ NAME = "name"
55
+ }
56
+ export declare type InputSortFilterType = {
57
+ [InputSortFilterField.DIRECTION]?: Direction;
58
+ [InputSortFilterField.NAME]?: string;
59
+ };
60
+ export declare enum InputSearchFilterField {
61
+ GROUPS = "groups",
62
+ LOGICAL_OPERATOR = "logicalOperator"
63
+ }
64
+ export declare type InputSearchFilterType = {
65
+ [InputSearchFilterField.GROUPS]?: InputFiltersType[];
66
+ [InputSearchFilterField.LOGICAL_OPERATOR]?: LogicalOperator;
67
+ };
68
+ export declare enum InputFiltersField {
69
+ ITEMS = "items",
70
+ LOGICAL_OPERATOR = "logicalOperator"
71
+ }
72
+ export declare type InputFiltersType = {
73
+ [InputFiltersField.ITEMS]?: InputFilterValueType[];
74
+ [InputFiltersField.LOGICAL_OPERATOR]?: LogicalOperator;
75
+ };
76
+ export declare enum InputFilterValueField {
77
+ NAME = "name",
78
+ OPERATOR = "operator",
79
+ VALUE = "value",
80
+ EXCLUSION = "exclusion"
81
+ }
82
+ export declare type InputFilterValueType = {
83
+ [InputFilterValueField.NAME]?: string;
84
+ [InputFilterValueField.OPERATOR]?: ComparisonOperator;
85
+ [InputFilterValueField.VALUE]?: string[];
86
+ [InputFilterValueField.EXCLUSION]?: boolean;
87
+ };
88
+ export declare enum InputQueryOptionsField {
89
+ SKIP_PARTITION = "skipPartition"
90
+ }
91
+ export declare type InputQueryOptionsType = {
92
+ [InputQueryOptionsField.SKIP_PARTITION]?: boolean;
93
+ };
94
+ export declare enum SelectableField {
95
+ DATA = "data",
96
+ ERRORS = "errors",
97
+ PAGINATION = "pagination"
98
+ }
99
+ export declare enum SelectDataField {
100
+ ARROW_COMPANY = "arrowCompany",
101
+ CONTINENT = "continent",
102
+ COUNTRY = "country",
103
+ END_CUSTOMER = "endCustomer",
104
+ PARTNER = "partner",
105
+ PARTNERTAG = "partnertag",
106
+ WORKGROUP = "workgroup"
107
+ }
108
+ export declare type SelectAllResultType = {
109
+ [Queries.SELECT_ALL]: {
110
+ [SelectableField.DATA]?: SelectAllResponseDataType;
111
+ [SelectableField.ERRORS]?: ErrorsType;
112
+ [SelectableField.PAGINATION]?: PageType;
113
+ };
114
+ };
115
+ export declare type SelectAllResponseDataType = {
116
+ [SelectDataField.ARROW_COMPANY]?: ArrowCompanyType[];
117
+ [SelectDataField.CONTINENT]?: ContinentType[];
118
+ [SelectDataField.COUNTRY]?: CountryType[];
119
+ [SelectDataField.END_CUSTOMER]?: EndCustomerType[];
120
+ [SelectDataField.PARTNER]?: PartnerType[];
121
+ [SelectDataField.PARTNERTAG]?: PartnertagType[];
122
+ [SelectDataField.WORKGROUP]?: WorkgroupType[];
123
+ };
124
+ export declare enum ErrorsField {
125
+ CODE = "code",
126
+ MESSAGE = "message"
127
+ }
128
+ export declare type ErrorsType = {
129
+ [ErrorsField.CODE]?: string;
130
+ [ErrorsField.MESSAGE]?: string;
131
+ };
132
+ export declare enum PaginationField {
133
+ CURRENT_PAGE = "currentPage",
134
+ NEXT = "next",
135
+ PER_PAGE = "perPage",
136
+ PREVIOUS = "previous",
137
+ TOTAL = "total",
138
+ TOTAL_PAGE = "totalPage",
139
+ TOTAL_PAGES = "totalPages"
140
+ }
141
+ export declare type PageType = {
142
+ [PaginationField.CURRENT_PAGE]?: number;
143
+ [PaginationField.NEXT]?: number;
144
+ [PaginationField.PER_PAGE]?: number;
145
+ [PaginationField.PREVIOUS]?: number;
146
+ [PaginationField.TOTAL]?: number;
147
+ [PaginationField.TOTAL_PAGE]?: number;
148
+ [PaginationField.TOTAL_PAGES]?: number;
149
+ };
150
+ export declare type SelectOneResultType = {
151
+ [Queries.SELECT_ONE]: {
152
+ [SelectableField.DATA]?: SelectOneResponseDataType;
153
+ [SelectableField.ERRORS]?: ErrorsType;
154
+ };
155
+ };
156
+ export declare type SelectOneResponseDataType = {
157
+ [SelectDataField.ARROW_COMPANY]?: ArrowCompanyType;
158
+ [SelectDataField.CONTINENT]?: ContinentType;
159
+ [SelectDataField.COUNTRY]?: CountryType;
160
+ [SelectDataField.END_CUSTOMER]?: EndCustomerType;
161
+ [SelectDataField.PARTNER]?: PartnerType;
162
+ [SelectDataField.PARTNERTAG]?: PartnertagType;
163
+ [SelectDataField.WORKGROUP]?: WorkgroupType;
164
+ };
165
+ export declare enum QueryVariablesField {
166
+ AGGREGATOR_FILTER = "aggregatorFilter",
167
+ EXCLUSION_FILTERS = "exclusionFilters",
168
+ FILTERS = "filters",
169
+ PAGINATION = "pagination",
170
+ QUERY_MODIFIER = "queryModifier",
171
+ SORT = "sort",
172
+ OPTIONS = "options"
173
+ }
174
+ export declare type QueryVariablesType = {
175
+ [QueryVariablesField.AGGREGATOR_FILTER]?: string[];
176
+ [QueryVariablesField.EXCLUSION_FILTERS]?: InputSearchFilterType;
177
+ [QueryVariablesField.FILTERS]?: InputSearchFilterType;
178
+ [QueryVariablesField.PAGINATION]?: InputPaginationType;
179
+ [QueryVariablesField.QUERY_MODIFIER]?: QueryModifier;
180
+ [QueryVariablesField.SORT]?: InputSortFilterType[];
181
+ [QueryVariablesField.OPTIONS]?: InputQueryOptionsType;
182
+ };
183
+ export declare enum Queries {
184
+ SELECT_ALL = "selectAll",
185
+ SELECT_ONE = "selectOne"
186
+ }
187
+ export declare type SelectOneQueryType = {
188
+ [Queries.SELECT_ONE]: {
189
+ __args?: Omit<QueryVariablesType, QueryVariablesField.PAGINATION>;
190
+ [SelectableField.DATA]: SelectAllResponseDataSchema;
191
+ [SelectableField.ERRORS]?: ErrorsSchema;
192
+ };
193
+ };
194
+ export declare type SelectAllQueryType = {
195
+ [Queries.SELECT_ALL]: {
196
+ __args?: QueryVariablesType;
197
+ [SelectableField.DATA]: SelectAllResponseDataSchema;
198
+ [SelectableField.ERRORS]?: ErrorsSchema;
199
+ [SelectableField.PAGINATION]?: PageSchema;
200
+ };
201
+ };
@@ -0,0 +1,123 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Queries = exports.QueryVariablesField = exports.PaginationField = exports.ErrorsField = exports.SelectDataField = exports.SelectableField = exports.InputQueryOptionsField = exports.InputFilterValueField = exports.InputFiltersField = exports.InputSearchFilterField = exports.InputSortFilterField = exports.InputPaginationField = exports.Direction = exports.QueryModifier = exports.LogicalOperator = exports.ComparisonOperator = void 0;
4
+ /**
5
+ * For field __args
6
+ */
7
+ var ComparisonOperator;
8
+ (function (ComparisonOperator) {
9
+ ComparisonOperator["BETWEEN"] = "BETWEEN";
10
+ ComparisonOperator["CONTAINS"] = "CONTAINS";
11
+ ComparisonOperator["ENDS_WITH"] = "ENDS_WITH";
12
+ ComparisonOperator["EQUALS"] = "EQUALS";
13
+ ComparisonOperator["GREAT_THAN"] = "GREAT_THAN";
14
+ ComparisonOperator["GREAT_THAN_OR_EQUALS"] = "GREAT_THAN_OR_EQUALS";
15
+ ComparisonOperator["IS_NULL"] = "IS_NULL";
16
+ ComparisonOperator["LESS_THAN"] = "LESS_THAN";
17
+ ComparisonOperator["LESS_THAN_OR_EQUALS"] = "LESS_THAN_OR_EQUALS";
18
+ ComparisonOperator["STARTS_WITH"] = "STARTS_WITH";
19
+ ComparisonOperator["DIFFERENT"] = "DIFFERENT";
20
+ })(ComparisonOperator = exports.ComparisonOperator || (exports.ComparisonOperator = {}));
21
+ var LogicalOperator;
22
+ (function (LogicalOperator) {
23
+ LogicalOperator["AND"] = "AND";
24
+ LogicalOperator["OR"] = "OR";
25
+ })(LogicalOperator = exports.LogicalOperator || (exports.LogicalOperator = {}));
26
+ var QueryModifier;
27
+ (function (QueryModifier) {
28
+ QueryModifier["ALL"] = "ALL";
29
+ QueryModifier["DISTINCT"] = "DISTINCT";
30
+ QueryModifier["DISTINCTROW"] = "DISTINCTROW";
31
+ QueryModifier["HIGH_PRIORITY"] = "HIGH_PRIORITY";
32
+ QueryModifier["SQL_BIG_RESULT"] = "SQL_BIG_RESULT";
33
+ QueryModifier["SQL_BUFFER_RESULT"] = "SQL_BUFFER_RESULT";
34
+ QueryModifier["SQL_CALC_FOUND_ROWS"] = "SQL_CALC_FOUND_ROWS";
35
+ QueryModifier["SQL_NO_CACHE"] = "SQL_NO_CACHE";
36
+ QueryModifier["SQL_SMALL_RESULT"] = "SQL_SMALL_RESULT";
37
+ QueryModifier["STRAIGHT_JOIN"] = "STRAIGHT_JOIN";
38
+ })(QueryModifier = exports.QueryModifier || (exports.QueryModifier = {}));
39
+ var Direction;
40
+ (function (Direction) {
41
+ Direction["ASC"] = "ASC";
42
+ Direction["DESC"] = "DESC";
43
+ Direction["asc"] = "asc";
44
+ Direction["desc"] = "desc";
45
+ })(Direction = exports.Direction || (exports.Direction = {}));
46
+ var InputPaginationField;
47
+ (function (InputPaginationField) {
48
+ InputPaginationField["PAGE"] = "page";
49
+ InputPaginationField["PER_PAGE"] = "perPage";
50
+ })(InputPaginationField = exports.InputPaginationField || (exports.InputPaginationField = {}));
51
+ var InputSortFilterField;
52
+ (function (InputSortFilterField) {
53
+ InputSortFilterField["DIRECTION"] = "direction";
54
+ InputSortFilterField["NAME"] = "name";
55
+ })(InputSortFilterField = exports.InputSortFilterField || (exports.InputSortFilterField = {}));
56
+ var InputSearchFilterField;
57
+ (function (InputSearchFilterField) {
58
+ InputSearchFilterField["GROUPS"] = "groups";
59
+ InputSearchFilterField["LOGICAL_OPERATOR"] = "logicalOperator";
60
+ })(InputSearchFilterField = exports.InputSearchFilterField || (exports.InputSearchFilterField = {}));
61
+ var InputFiltersField;
62
+ (function (InputFiltersField) {
63
+ InputFiltersField["ITEMS"] = "items";
64
+ InputFiltersField["LOGICAL_OPERATOR"] = "logicalOperator";
65
+ })(InputFiltersField = exports.InputFiltersField || (exports.InputFiltersField = {}));
66
+ var InputFilterValueField;
67
+ (function (InputFilterValueField) {
68
+ InputFilterValueField["NAME"] = "name";
69
+ InputFilterValueField["OPERATOR"] = "operator";
70
+ InputFilterValueField["VALUE"] = "value";
71
+ InputFilterValueField["EXCLUSION"] = "exclusion";
72
+ })(InputFilterValueField = exports.InputFilterValueField || (exports.InputFilterValueField = {}));
73
+ var InputQueryOptionsField;
74
+ (function (InputQueryOptionsField) {
75
+ InputQueryOptionsField["SKIP_PARTITION"] = "skipPartition";
76
+ })(InputQueryOptionsField = exports.InputQueryOptionsField || (exports.InputQueryOptionsField = {}));
77
+ var SelectableField;
78
+ (function (SelectableField) {
79
+ SelectableField["DATA"] = "data";
80
+ SelectableField["ERRORS"] = "errors";
81
+ SelectableField["PAGINATION"] = "pagination";
82
+ })(SelectableField = exports.SelectableField || (exports.SelectableField = {}));
83
+ var SelectDataField;
84
+ (function (SelectDataField) {
85
+ SelectDataField["ARROW_COMPANY"] = "arrowCompany";
86
+ SelectDataField["CONTINENT"] = "continent";
87
+ SelectDataField["COUNTRY"] = "country";
88
+ SelectDataField["END_CUSTOMER"] = "endCustomer";
89
+ SelectDataField["PARTNER"] = "partner";
90
+ SelectDataField["PARTNERTAG"] = "partnertag";
91
+ SelectDataField["WORKGROUP"] = "workgroup";
92
+ })(SelectDataField = exports.SelectDataField || (exports.SelectDataField = {}));
93
+ var ErrorsField;
94
+ (function (ErrorsField) {
95
+ ErrorsField["CODE"] = "code";
96
+ ErrorsField["MESSAGE"] = "message";
97
+ })(ErrorsField = exports.ErrorsField || (exports.ErrorsField = {}));
98
+ var PaginationField;
99
+ (function (PaginationField) {
100
+ PaginationField["CURRENT_PAGE"] = "currentPage";
101
+ PaginationField["NEXT"] = "next";
102
+ PaginationField["PER_PAGE"] = "perPage";
103
+ PaginationField["PREVIOUS"] = "previous";
104
+ PaginationField["TOTAL"] = "total";
105
+ PaginationField["TOTAL_PAGE"] = "totalPage";
106
+ PaginationField["TOTAL_PAGES"] = "totalPages";
107
+ })(PaginationField = exports.PaginationField || (exports.PaginationField = {}));
108
+ var QueryVariablesField;
109
+ (function (QueryVariablesField) {
110
+ QueryVariablesField["AGGREGATOR_FILTER"] = "aggregatorFilter";
111
+ QueryVariablesField["EXCLUSION_FILTERS"] = "exclusionFilters";
112
+ QueryVariablesField["FILTERS"] = "filters";
113
+ QueryVariablesField["PAGINATION"] = "pagination";
114
+ QueryVariablesField["QUERY_MODIFIER"] = "queryModifier";
115
+ QueryVariablesField["SORT"] = "sort";
116
+ QueryVariablesField["OPTIONS"] = "options";
117
+ })(QueryVariablesField = exports.QueryVariablesField || (exports.QueryVariablesField = {}));
118
+ var Queries;
119
+ (function (Queries) {
120
+ Queries["SELECT_ALL"] = "selectAll";
121
+ Queries["SELECT_ONE"] = "selectOne";
122
+ })(Queries = exports.Queries || (exports.Queries = {}));
123
+ //# sourceMappingURL=graphqlApiQueries.js.map
@@ -0,0 +1,56 @@
1
+ import { Merge, Schema } from 'type-fest';
2
+ import { ArrowCompanyType, EndCustomerType, PartnerType } from './entities/company';
3
+ import { PartnertagType } from './entities/partnertag';
4
+ import { ContinentType, CountryType } from './entities/country';
5
+ import { WorkgroupType } from './entities/workgroup';
6
+ import { ErrorsType, PageType, Queries, SelectDataField, SelectableField } from './graphqlApiQueries';
7
+ export declare type PartnertagSchema = Schema<PartnertagType, boolean>;
8
+ declare type MissingFieldsOfCompanySchema = {
9
+ partnerTags?: PartnertagSchema;
10
+ };
11
+ declare type MissingFieldsOfEndCustomerSchema = {
12
+ partnerTags?: PartnertagSchema;
13
+ partner?: PartnerSchema;
14
+ };
15
+ export declare type EndCustomerSchema = Merge<Schema<EndCustomerType, boolean>, MissingFieldsOfEndCustomerSchema>;
16
+ export declare type PartnerSchema = Merge<Schema<PartnerType, boolean>, MissingFieldsOfCompanySchema>;
17
+ export declare type ArrowCompanySchema = Schema<ArrowCompanyType, boolean>;
18
+ export declare type ContinentSchema = Schema<ContinentType, boolean>;
19
+ export declare type CountrySchema = Schema<CountryType, boolean>;
20
+ export declare type ErrorsSchema = Schema<ErrorsType, boolean>;
21
+ export declare type PageSchema = Schema<PageType, boolean>;
22
+ export declare type WorkgroupSchema = Schema<WorkgroupType, boolean>;
23
+ export declare type SelectAllResultSchema = {
24
+ [SelectableField.DATA]?: SelectAllResponseDataSchema;
25
+ [SelectableField.ERRORS]?: ErrorsSchema;
26
+ [SelectableField.PAGINATION]?: PageSchema;
27
+ };
28
+ export declare type SelectAllResponseDataSchema = {
29
+ [SelectDataField.ARROW_COMPANY]?: ArrowCompanySchema;
30
+ [SelectDataField.CONTINENT]?: ContinentSchema;
31
+ [SelectDataField.COUNTRY]?: CountrySchema;
32
+ [SelectDataField.END_CUSTOMER]?: EndCustomerSchema;
33
+ [SelectDataField.PARTNER]?: PartnerSchema;
34
+ [SelectDataField.PARTNERTAG]?: PartnertagSchema;
35
+ [SelectDataField.WORKGROUP]?: WorkgroupSchema;
36
+ };
37
+ export declare type SelectOneResultSchema = {
38
+ [SelectableField.DATA]?: SelectOneResponseDataSchema;
39
+ [SelectableField.ERRORS]?: ErrorsSchema;
40
+ };
41
+ export declare type SelectOneResponseDataSchema = {
42
+ [SelectDataField.ARROW_COMPANY]?: ArrowCompanySchema;
43
+ [SelectDataField.CONTINENT]?: ContinentSchema;
44
+ [SelectDataField.COUNTRY]?: CountrySchema;
45
+ [SelectDataField.END_CUSTOMER]?: EndCustomerSchema;
46
+ [SelectDataField.PARTNER]?: PartnerSchema;
47
+ [SelectDataField.PARTNERTAG]?: PartnertagSchema;
48
+ [SelectDataField.WORKGROUP]?: WorkgroupSchema;
49
+ };
50
+ export declare type SelectAllQuerySchema = {
51
+ [Queries.SELECT_ALL]?: SelectAllResultSchema;
52
+ };
53
+ export declare type SelectOneQuerySchema = {
54
+ [Queries.SELECT_ONE]?: SelectOneResultSchema;
55
+ };
56
+ export {};
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const graphqlApiQueries_1 = require("./graphqlApiQueries");
4
+ //# sourceMappingURL=graphqlApiSchemas.js.map
package/build/index.d.ts CHANGED
@@ -10,6 +10,7 @@ export * from './customers/';
10
10
  export * from './exception/';
11
11
  export * from './general/';
12
12
  export * from './getResult';
13
+ export * from './graphqlApi';
13
14
  export * from './pagination';
14
15
  export * from './licenses/';
15
16
  export * from './notifications/';
package/build/index.js CHANGED
@@ -39,6 +39,7 @@ __exportStar(require("./customers/"), exports);
39
39
  __exportStar(require("./exception/"), exports);
40
40
  __exportStar(require("./general/"), exports);
41
41
  __exportStar(require("./getResult"), exports);
42
+ __exportStar(require("./graphqlApi"), exports);
42
43
  __exportStar(require("./pagination"), exports);
43
44
  __exportStar(require("./licenses/"), exports);
44
45
  __exportStar(require("./notifications/"), exports);
@@ -1,7 +1,10 @@
1
1
  import { CatalogGraphQLClient } from './catalog/catalogGraphQLClient';
2
2
  import { AbstractGraphQLClient } from './abstractGraphQLClient';
3
3
  import { SecurityScoreGraphQLClient } from './securityScore';
4
+ import { GraphqlApiClient } from './graphqlApi';
4
5
  export declare class PublicGraphQLClient extends AbstractGraphQLClient {
5
6
  getCatalogGraphQLClient(): CatalogGraphQLClient;
6
7
  getSecurityScoreGraphQLClient(): SecurityScoreGraphQLClient;
8
+ getGraphqlApiClient(): GraphqlApiClient;
9
+ private applyConfig;
7
10
  }
@@ -4,21 +4,28 @@ exports.PublicGraphQLClient = void 0;
4
4
  const catalogGraphQLClient_1 = require("./catalog/catalogGraphQLClient");
5
5
  const abstractGraphQLClient_1 = require("./abstractGraphQLClient");
6
6
  const securityScore_1 = require("./securityScore");
7
+ const graphqlApi_1 = require("./graphqlApi");
7
8
  class PublicGraphQLClient extends abstractGraphQLClient_1.AbstractGraphQLClient {
8
9
  getCatalogGraphQLClient() {
9
- return new catalogGraphQLClient_1.CatalogGraphQLClient()
10
- .setUrl(this.url)
11
- .setToken(this.token)
12
- .setHeaders(this.headers)
13
- .setToken(this.token)
14
- .setHttpExceptionHandlers(this.httpExceptionHandlers);
10
+ const client = new catalogGraphQLClient_1.CatalogGraphQLClient();
11
+ this.applyConfig(client);
12
+ return client;
15
13
  }
16
14
  getSecurityScoreGraphQLClient() {
17
- return new securityScore_1.SecurityScoreGraphQLClient()
15
+ const client = new securityScore_1.SecurityScoreGraphQLClient();
16
+ this.applyConfig(client);
17
+ return client;
18
+ }
19
+ getGraphqlApiClient() {
20
+ const client = new graphqlApi_1.GraphqlApiClient();
21
+ this.applyConfig(client);
22
+ return client;
23
+ }
24
+ applyConfig(client) {
25
+ return client
18
26
  .setUrl(this.url)
19
- .setToken(this.token)
27
+ .setSecurity(this.security)
20
28
  .setHeaders(this.headers)
21
- .setToken(this.token)
22
29
  .setHttpExceptionHandlers(this.httpExceptionHandlers);
23
30
  }
24
31
  }
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "type": "git",
5
5
  "url": "https://github.com/ArrowSphere/nodejs-api-client.git"
6
6
  },
7
- "version": "3.47.0-rc.rde.1",
7
+ "version": "3.48.0",
8
8
  "description": "Node.js client for ArrowSphere's public API",
9
9
  "main": "build/index.js",
10
10
  "types": "build/index.d.ts",