@arrowsphere/api-client 3.128.0-rc.bdj.1 → 3.128.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,6 +3,11 @@
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.128.0] - 2024.07.30
7
+
8
+ ### Added
9
+ - [graphql-api] Add endpoint request for quote
10
+
6
11
  ## [3.127.0] - 2024.07.16
7
12
 
8
13
  ### Modified
@@ -1,12 +1,9 @@
1
- import { PartnerType } from './company';
2
1
  import { SpecialPriceRateType } from './specialPriceRate';
3
2
  export declare type OrdersType = {
4
3
  id?: number;
5
4
  items?: OrderItemsType[];
6
- partner?: PartnerType;
7
5
  };
8
6
  export declare type OrderItemsType = {
9
7
  id?: number;
10
- order?: OrdersType;
11
8
  priceRates?: SpecialPriceRateType[];
12
9
  };
@@ -1,5 +1,4 @@
1
1
  import { CompanyTypeType } from './company';
2
- import { OrderItemsType } from './order';
3
2
  export declare type SpecialPriceRateType = {
4
3
  id?: number;
5
4
  createdAt?: string;
@@ -7,7 +6,6 @@ export declare type SpecialPriceRateType = {
7
6
  rate?: number;
8
7
  startedAt?: string;
9
8
  companyType?: CompanyTypeType;
10
- orderItem?: OrderItemsType;
11
9
  type?: SubscriptionRateType;
12
10
  };
13
11
  export declare type SubscriptionRateType = {
@@ -4,7 +4,6 @@ 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';
8
7
  import { SubscriptionType } from './entities/subscription';
9
8
  import { UserHistoryType, UserType } from './entities/user';
10
9
  import { WorkgroupType } from './entities/workgroup';
@@ -121,7 +120,6 @@ export declare enum SelectDataField {
121
120
  PARTNER = "partner",
122
121
  PARTNERTAG = "partnertag",
123
122
  QUOTE = "quote",
124
- SPECIAL_PRICE_RATE = "specialPriceRate",
125
123
  SUBSCRIBED_PROGRAM = "subscribedProgram",
126
124
  SUBSCRIPTION = "subscription",
127
125
  USER = "user",
@@ -144,7 +142,6 @@ export declare type SelectAllResponseDataType = {
144
142
  [SelectDataField.PARTNER]?: PartnerType[];
145
143
  [SelectDataField.PARTNERTAG]?: PartnertagType[];
146
144
  [SelectDataField.QUOTE]?: QuoteType[];
147
- [SelectDataField.SPECIAL_PRICE_RATE]?: SpecialPriceRateType[];
148
145
  [SelectDataField.SUBSCRIBED_PROGRAM]?: SubscribedProgramType[];
149
146
  [SelectDataField.SUBSCRIPTION]?: SubscriptionType[];
150
147
  [SelectDataField.USER]?: UserType[];
@@ -193,7 +190,6 @@ export declare type SelectOneResponseDataType = {
193
190
  [SelectDataField.PARTNER]?: PartnerType;
194
191
  [SelectDataField.PARTNERTAG]?: PartnertagType;
195
192
  [SelectDataField.QUOTE]?: QuoteType;
196
- [SelectDataField.SPECIAL_PRICE_RATE]?: SpecialPriceRateType;
197
193
  [SelectDataField.SUBSCRIBED_PROGRAM]?: SubscribedProgramType;
198
194
  [SelectDataField.SUBSCRIPTION]?: SubscriptionType;
199
195
  [SelectDataField.USER]?: UserType;
@@ -98,7 +98,6 @@ var SelectDataField;
98
98
  SelectDataField["PARTNER"] = "partner";
99
99
  SelectDataField["PARTNERTAG"] = "partnertag";
100
100
  SelectDataField["QUOTE"] = "quote";
101
- SelectDataField["SPECIAL_PRICE_RATE"] = "specialPriceRate";
102
101
  SelectDataField["SUBSCRIBED_PROGRAM"] = "subscribedProgram";
103
102
  SelectDataField["SUBSCRIPTION"] = "subscription";
104
103
  SelectDataField["USER"] = "user";
@@ -102,7 +102,6 @@ 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;
106
105
  [SelectDataField.SUBSCRIBED_PROGRAM]?: SubscribedProgramSchema;
107
106
  [SelectDataField.SUBSCRIPTION]?: SubscriptionSchema;
108
107
  [SelectDataField.USER]?: UserSchema;
@@ -122,7 +121,6 @@ export declare type SelectOneResponseDataSchema = {
122
121
  [SelectDataField.PARTNER]?: PartnerSchema;
123
122
  [SelectDataField.PARTNERTAG]?: PartnertagSchema;
124
123
  [SelectDataField.QUOTE]?: QuoteSchema;
125
- [SelectDataField.SPECIAL_PRICE_RATE]?: SpecialPriceRateSchema;
126
124
  [SelectDataField.SUBSCRIBED_PROGRAM]?: SubscribedProgramSchema;
127
125
  [SelectDataField.SUBSCRIPTION]?: SubscriptionSchema;
128
126
  [SelectDataField.USER]?: UserSchema;
@@ -29,7 +29,7 @@ class QuoteRequest extends abstractEntity_1.AbstractEntity {
29
29
  }
30
30
  toJSON() {
31
31
  return {
32
- [QuoteRequestFields.MESSAGE]: __classPrivateFieldGet(this, _QuoteRequest_message, "f"),
32
+ [QuoteRequestFields.MESSAGE]: this.message,
33
33
  };
34
34
  }
35
35
  }
@@ -4,7 +4,7 @@ import { QuoteRequest } from './entities/QuoteRequest';
4
4
  export declare type RequestQuoteRequestType = {
5
5
  agreeToReceiveCommunications: boolean;
6
6
  agreeSharingInformation: boolean;
7
- comments: string;
7
+ comments?: string;
8
8
  company: string;
9
9
  country: string;
10
10
  email: string;
@@ -14,8 +14,13 @@ export declare type RequestQuoteRequestType = {
14
14
  sku: string;
15
15
  vendor: string;
16
16
  };
17
+ export declare type RequestQuoteIbmRequestType = {
18
+ endCustomerRef?: string;
19
+ reference?: string;
20
+ };
17
21
  export declare class QuotesClient extends AbstractRestfulClient {
18
22
  protected basePath: string;
19
23
  requestQuote(postData: RequestQuoteRequestType, parameters?: Parameters): Promise<GetResult<QuoteRequest>>;
24
+ requestQuoteForVendor(vendor: string, postData: RequestQuoteIbmRequestType, parameters?: Parameters): Promise<GetResult<QuoteRequest>>;
20
25
  deleteQuote(quoteReference: string, parameters?: Parameters): Promise<void>;
21
26
  }
@@ -13,6 +13,10 @@ class QuotesClient extends abstractRestfulClient_1.AbstractRestfulClient {
13
13
  this.path = '/request';
14
14
  return new getResult_1.GetResult(QuoteRequest_1.QuoteRequest, await this.post(postData, parameters));
15
15
  }
16
+ async requestQuoteForVendor(vendor, postData, parameters = {}) {
17
+ this.path = `/request/${vendor}`;
18
+ return new getResult_1.GetResult(QuoteRequest_1.QuoteRequest, await this.post(postData, parameters));
19
+ }
16
20
  async deleteQuote(quoteReference, parameters = {}) {
17
21
  this.path = `/${quoteReference}`;
18
22
  return await this.delete(parameters);
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.128.0-rc.bdj.1",
7
+ "version": "3.128.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",
@@ -1 +0,0 @@
1
- export {};
@@ -1,40 +0,0 @@
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
@@ -1 +0,0 @@
1
- export {};
@@ -1,40 +0,0 @@
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