@arrowsphere/api-client 3.127.0 → 3.128.0-rc.bdj.1
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/build/customers/testAddCustomer.d.ts +1 -0
- package/build/customers/testAddCustomer.js +40 -0
- package/build/customers/testUpdateCustomer.d.ts +1 -0
- package/build/customers/testUpdateCustomer.js +40 -0
- package/build/graphqlApi/types/entities/order.d.ts +3 -0
- package/build/graphqlApi/types/entities/specialPriceRate.d.ts +2 -0
- package/build/graphqlApi/types/graphqlApiQueries.d.ts +4 -0
- package/build/graphqlApi/types/graphqlApiQueries.js +1 -0
- package/build/graphqlApi/types/graphqlApiSchemas.d.ts +2 -0
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const publicApiClient_1 = __importDefault(require("../publicApiClient"));
|
|
7
|
+
const contact_1 = require("./entities/customers/contact/contact");
|
|
8
|
+
const customer_1 = require("./entities/customers/customer");
|
|
9
|
+
const customerContact_1 = require("./entities/customers/customerContact/customerContact");
|
|
10
|
+
const publicApiClient = new publicApiClient_1.default();
|
|
11
|
+
const customersClient = publicApiClient.getCustomersClient();
|
|
12
|
+
customersClient
|
|
13
|
+
.setUrl('https://dev2.arrowxsp.com/index.php/api')
|
|
14
|
+
.setApiKey('FvyZsYPSPafxZcPcN4Qj2vlYbqZvt4MU')
|
|
15
|
+
.setHeaders({ partnerRef: 'XSP17727' });
|
|
16
|
+
const i = 7;
|
|
17
|
+
const payload = {
|
|
18
|
+
[customer_1.CustomerFields.COLUMN_COMPANY_NAME]: ``,
|
|
19
|
+
[customer_1.CustomerFields.COLUMN_ADDRESS_LINE_1]: '175 Av de Lattre de Tassigny',
|
|
20
|
+
[customer_1.CustomerFields.COLUMN_ZIP]: '93800',
|
|
21
|
+
[customer_1.CustomerFields.COLUMN_CITY]: 'EPINAY SUR SEINE',
|
|
22
|
+
[customer_1.CustomerFields.COLUMN_COUNTRY_CODE]: 'FR',
|
|
23
|
+
[customer_1.CustomerFields.COLUMN_RECEPTION_PHONE]: '0175831253',
|
|
24
|
+
[customer_1.CustomerFields.COLUMN_WEBSITE_URL]: 'www.adyl-it.com',
|
|
25
|
+
[customer_1.CustomerFields.COLUMN_EMAIL_CONTACT]: `baiss${i}@adyl-it.com`,
|
|
26
|
+
[customer_1.CustomerFields.COLUMN_CONTACT]: {
|
|
27
|
+
[contact_1.ContactFields.COLUMN_FIRSTNAME]: `Baiss ${i}`,
|
|
28
|
+
[contact_1.ContactFields.COLUMN_LASTNAME]: `Djo ${i}`,
|
|
29
|
+
[contact_1.ContactFields.COLUMN_EMAIL]: `baiss${i}@adyl-it.com`,
|
|
30
|
+
[contact_1.ContactFields.COLUMN_PHONE]: `0175831253`,
|
|
31
|
+
[contact_1.ContactFields.COLUMN_TYPE]: customerContact_1.CustomerContactTypeEnum.OPERATIONS,
|
|
32
|
+
[contact_1.ContactFields.COLUMN_ROLE]: customerContact_1.CustomerContactRoleEnum.PRIMARY,
|
|
33
|
+
},
|
|
34
|
+
};
|
|
35
|
+
const handler = async () => {
|
|
36
|
+
const response = await customersClient.createCustomer(payload);
|
|
37
|
+
console.log(response);
|
|
38
|
+
};
|
|
39
|
+
(async () => await handler())();
|
|
40
|
+
//# sourceMappingURL=testAddCustomer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const publicApiClient_1 = __importDefault(require("../publicApiClient"));
|
|
7
|
+
const contact_1 = require("./entities/customers/contact/contact");
|
|
8
|
+
const customer_1 = require("./entities/customers/customer");
|
|
9
|
+
const customerContact_1 = require("./entities/customers/customerContact/customerContact");
|
|
10
|
+
const publicApiClient = new publicApiClient_1.default();
|
|
11
|
+
const customersClient = publicApiClient.getCustomersClient();
|
|
12
|
+
customersClient
|
|
13
|
+
.setUrl('https://dev2.arrowxsp.com/index.php/api')
|
|
14
|
+
.setApiKey('FvyZsYPSPafxZcPcN4Qj2vlYbqZvt4MU')
|
|
15
|
+
.setHeaders({ partnerRef: 'XSP17727' });
|
|
16
|
+
const i = 3;
|
|
17
|
+
const payload = {
|
|
18
|
+
[customer_1.CustomerFields.COLUMN_COMPANY_NAME]: `Company Test ${i}`,
|
|
19
|
+
[customer_1.CustomerFields.COLUMN_ADDRESS_LINE_1]: '175 Av de Lattre de Tassigny',
|
|
20
|
+
[customer_1.CustomerFields.COLUMN_ZIP]: '93800',
|
|
21
|
+
[customer_1.CustomerFields.COLUMN_CITY]: 'EPINAY SUR SEINE',
|
|
22
|
+
[customer_1.CustomerFields.COLUMN_COUNTRY_CODE]: 'FR',
|
|
23
|
+
[customer_1.CustomerFields.COLUMN_RECEPTION_PHONE]: '0175831253',
|
|
24
|
+
[customer_1.CustomerFields.COLUMN_WEBSITE_URL]: 'www.adyl-it.com',
|
|
25
|
+
[customer_1.CustomerFields.COLUMN_EMAIL_CONTACT]: `baiss${i}@adyl-it.com`,
|
|
26
|
+
[customer_1.CustomerFields.COLUMN_CONTACT]: {
|
|
27
|
+
[contact_1.ContactFields.COLUMN_FIRSTNAME]: `Baiss ${i}`,
|
|
28
|
+
[contact_1.ContactFields.COLUMN_LASTNAME]: `Djo ${i}`,
|
|
29
|
+
[contact_1.ContactFields.COLUMN_EMAIL]: `baiss${i}@adyl-it.com`,
|
|
30
|
+
[contact_1.ContactFields.COLUMN_PHONE]: `0175831253`,
|
|
31
|
+
[contact_1.ContactFields.COLUMN_TYPE]: customerContact_1.CustomerContactTypeEnum.OPERATIONS,
|
|
32
|
+
[contact_1.ContactFields.COLUMN_ROLE]: customerContact_1.CustomerContactRoleEnum.PRIMARY,
|
|
33
|
+
},
|
|
34
|
+
};
|
|
35
|
+
const handler = async () => {
|
|
36
|
+
const response = await customersClient.updateCustomer('XSP1175402', payload);
|
|
37
|
+
console.log(response);
|
|
38
|
+
};
|
|
39
|
+
(async () => await handler())();
|
|
40
|
+
//# sourceMappingURL=testUpdateCustomer.js.map
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
+
import { PartnerType } from './company';
|
|
1
2
|
import { SpecialPriceRateType } from './specialPriceRate';
|
|
2
3
|
export declare type OrdersType = {
|
|
3
4
|
id?: number;
|
|
4
5
|
items?: OrderItemsType[];
|
|
6
|
+
partner?: PartnerType;
|
|
5
7
|
};
|
|
6
8
|
export declare type OrderItemsType = {
|
|
7
9
|
id?: number;
|
|
10
|
+
order?: OrdersType;
|
|
8
11
|
priceRates?: SpecialPriceRateType[];
|
|
9
12
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { CompanyTypeType } from './company';
|
|
2
|
+
import { OrderItemsType } from './order';
|
|
2
3
|
export declare type SpecialPriceRateType = {
|
|
3
4
|
id?: number;
|
|
4
5
|
createdAt?: string;
|
|
@@ -6,6 +7,7 @@ export declare type SpecialPriceRateType = {
|
|
|
6
7
|
rate?: number;
|
|
7
8
|
startedAt?: string;
|
|
8
9
|
companyType?: CompanyTypeType;
|
|
10
|
+
orderItem?: OrderItemsType;
|
|
9
11
|
type?: SubscriptionRateType;
|
|
10
12
|
};
|
|
11
13
|
export declare type SubscriptionRateType = {
|
|
@@ -4,6 +4,7 @@ import { LicenseBudgetType } from './entities/licenseBudget';
|
|
|
4
4
|
import { PartnertagType } from './entities/partnertag';
|
|
5
5
|
import { SubscribedProgramType } from './entities/program';
|
|
6
6
|
import { QuoteType } from './entities/quote';
|
|
7
|
+
import { SpecialPriceRateType } from './entities/specialPriceRate';
|
|
7
8
|
import { SubscriptionType } from './entities/subscription';
|
|
8
9
|
import { UserHistoryType, UserType } from './entities/user';
|
|
9
10
|
import { WorkgroupType } from './entities/workgroup';
|
|
@@ -120,6 +121,7 @@ export declare enum SelectDataField {
|
|
|
120
121
|
PARTNER = "partner",
|
|
121
122
|
PARTNERTAG = "partnertag",
|
|
122
123
|
QUOTE = "quote",
|
|
124
|
+
SPECIAL_PRICE_RATE = "specialPriceRate",
|
|
123
125
|
SUBSCRIBED_PROGRAM = "subscribedProgram",
|
|
124
126
|
SUBSCRIPTION = "subscription",
|
|
125
127
|
USER = "user",
|
|
@@ -142,6 +144,7 @@ export declare type SelectAllResponseDataType = {
|
|
|
142
144
|
[SelectDataField.PARTNER]?: PartnerType[];
|
|
143
145
|
[SelectDataField.PARTNERTAG]?: PartnertagType[];
|
|
144
146
|
[SelectDataField.QUOTE]?: QuoteType[];
|
|
147
|
+
[SelectDataField.SPECIAL_PRICE_RATE]?: SpecialPriceRateType[];
|
|
145
148
|
[SelectDataField.SUBSCRIBED_PROGRAM]?: SubscribedProgramType[];
|
|
146
149
|
[SelectDataField.SUBSCRIPTION]?: SubscriptionType[];
|
|
147
150
|
[SelectDataField.USER]?: UserType[];
|
|
@@ -190,6 +193,7 @@ export declare type SelectOneResponseDataType = {
|
|
|
190
193
|
[SelectDataField.PARTNER]?: PartnerType;
|
|
191
194
|
[SelectDataField.PARTNERTAG]?: PartnertagType;
|
|
192
195
|
[SelectDataField.QUOTE]?: QuoteType;
|
|
196
|
+
[SelectDataField.SPECIAL_PRICE_RATE]?: SpecialPriceRateType;
|
|
193
197
|
[SelectDataField.SUBSCRIBED_PROGRAM]?: SubscribedProgramType;
|
|
194
198
|
[SelectDataField.SUBSCRIPTION]?: SubscriptionType;
|
|
195
199
|
[SelectDataField.USER]?: UserType;
|
|
@@ -98,6 +98,7 @@ var SelectDataField;
|
|
|
98
98
|
SelectDataField["PARTNER"] = "partner";
|
|
99
99
|
SelectDataField["PARTNERTAG"] = "partnertag";
|
|
100
100
|
SelectDataField["QUOTE"] = "quote";
|
|
101
|
+
SelectDataField["SPECIAL_PRICE_RATE"] = "specialPriceRate";
|
|
101
102
|
SelectDataField["SUBSCRIBED_PROGRAM"] = "subscribedProgram";
|
|
102
103
|
SelectDataField["SUBSCRIPTION"] = "subscription";
|
|
103
104
|
SelectDataField["USER"] = "user";
|
|
@@ -102,6 +102,7 @@ export declare type SelectAllResponseDataSchema = {
|
|
|
102
102
|
[SelectDataField.PARTNER]?: PartnerSchema;
|
|
103
103
|
[SelectDataField.PARTNERTAG]?: PartnertagSchema;
|
|
104
104
|
[SelectDataField.QUOTE]?: QuoteSchema;
|
|
105
|
+
[SelectDataField.SPECIAL_PRICE_RATE]?: SpecialPriceRateSchema;
|
|
105
106
|
[SelectDataField.SUBSCRIBED_PROGRAM]?: SubscribedProgramSchema;
|
|
106
107
|
[SelectDataField.SUBSCRIPTION]?: SubscriptionSchema;
|
|
107
108
|
[SelectDataField.USER]?: UserSchema;
|
|
@@ -121,6 +122,7 @@ export declare type SelectOneResponseDataSchema = {
|
|
|
121
122
|
[SelectDataField.PARTNER]?: PartnerSchema;
|
|
122
123
|
[SelectDataField.PARTNERTAG]?: PartnertagSchema;
|
|
123
124
|
[SelectDataField.QUOTE]?: QuoteSchema;
|
|
125
|
+
[SelectDataField.SPECIAL_PRICE_RATE]?: SpecialPriceRateSchema;
|
|
124
126
|
[SelectDataField.SUBSCRIBED_PROGRAM]?: SubscribedProgramSchema;
|
|
125
127
|
[SelectDataField.SUBSCRIPTION]?: SubscriptionSchema;
|
|
126
128
|
[SelectDataField.USER]?: UserSchema;
|
package/package.json
CHANGED