@arrowsphere/api-client 3.132.0 → 3.134.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,16 @@
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.134.0] - 2024.08.13
7
+
8
+ ### Added
9
+ - [quotes] Add validate quote endpoint
10
+
11
+ ## [3.133.0] - 2024.08.13
12
+
13
+ ### Added
14
+ - [quotes] Add lastVersion and version in quotes
15
+
6
16
  ## [3.132.0] - 2024.08.12
7
17
 
8
18
  ### Added
@@ -16,3 +16,4 @@ export * from './types/entities/user';
16
16
  export * from './types/entities/vendor';
17
17
  export * from './types/entities/workgroup';
18
18
  export * from './graphqlApiClient';
19
+ export * from './types/entities/quoteVersion';
@@ -32,4 +32,5 @@ __exportStar(require("./types/entities/user"), exports);
32
32
  __exportStar(require("./types/entities/vendor"), exports);
33
33
  __exportStar(require("./types/entities/workgroup"), exports);
34
34
  __exportStar(require("./graphqlApiClient"), exports);
35
+ __exportStar(require("./types/entities/quoteVersion"), exports);
35
36
  //# sourceMappingURL=index.js.map
@@ -37,6 +37,7 @@ declare type BaseCompanyType = {
37
37
  zip?: string;
38
38
  };
39
39
  export declare type EndCustomerType = BaseCompanyType & {
40
+ country?: CountryType;
40
41
  partner?: PartnerType;
41
42
  };
42
43
  declare type CountableType = {
@@ -1,5 +1,6 @@
1
1
  import { ArrowCompanyType, EndCustomerType, PartnerType } from './company';
2
2
  import { GraphqlApiProgramType } from './program';
3
+ import { QuoteVersion } from './quoteVersion';
3
4
  export declare type EavType = {
4
5
  value?: string;
5
6
  };
@@ -11,20 +12,22 @@ export declare type QuoteType = {
11
12
  endCustomer?: EndCustomerType;
12
13
  items?: QuoteItemType[];
13
14
  partner?: PartnerType;
15
+ versions?: QuoteVersion[];
14
16
  promotionCode?: string;
15
17
  reference?: string;
16
18
  status?: string;
17
19
  totalRecurringPrice?: number;
18
20
  updatedAt?: string;
21
+ lastVersion?: QuoteVersion;
19
22
  };
20
23
  export declare type QuoteItemType = {
21
24
  id?: number;
25
+ itemData?: ItemData;
22
26
  name?: string;
23
27
  program?: GraphqlApiProgramType;
24
28
  reference?: string;
25
29
  vendorName?: string;
26
30
  vendorNamesSerialized?: string;
27
- itemData?: ItemData;
28
31
  };
29
32
  export declare type ItemData = {
30
33
  id?: string;
@@ -0,0 +1,8 @@
1
+ import { QuoteItemType } from './quote';
2
+ export declare type QuoteVersion = {
3
+ createdAt?: string;
4
+ id?: number;
5
+ items?: QuoteItemType[];
6
+ updatedAt?: string;
7
+ version?: string;
8
+ };
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=quoteVersion.js.map
@@ -16,6 +16,7 @@ import { UserHistoryType, UserType } from './entities/user';
16
16
  import { OrganizationUnitsType } from './entities/organizationUnit';
17
17
  import { CurrencyType } from './entities/currency';
18
18
  import { ItemData, QuoteItemType, QuoteType } from './entities/quote';
19
+ import { QuoteVersion } from './entities/quoteVersion';
19
20
  export declare type PartnertagSchema = Schema<PartnertagType, boolean>;
20
21
  declare type MissingFieldsOfCompanySchema = {
21
22
  contacts?: ContactsSchema;
@@ -37,6 +38,7 @@ declare type MissingFieldsOfEndCustomerSchema = {
37
38
  orders?: OrdersSchema;
38
39
  partnerTags?: PartnertagSchema;
39
40
  partner?: PartnerSchema;
41
+ country?: CountrySchema;
40
42
  };
41
43
  declare type MissingFieldsOfOrderItemSchema = {
42
44
  priceRates?: SpecialPriceRateSchema;
@@ -59,12 +61,21 @@ declare type MissingFieldsOfQuoteSchema = {
59
61
  endCustomer?: EndCustomerSchema;
60
62
  items?: QuoteItemSchema;
61
63
  partner?: PartnerSchema;
64
+ versions?: QuoteVersionSchema;
65
+ lastVersion?: QuoteVersionSchema;
62
66
  };
63
67
  declare type MissingFieldsOfQuoteItemSchema = {
64
68
  program?: LicenseBudgetNotificationSchema;
65
69
  itemData?: ItemDataSchema;
66
70
  };
67
71
  export declare type QuoteItemSchema = Merge<Schema<QuoteItemType, boolean>, MissingFieldsOfQuoteItemSchema>;
72
+ export declare type QuoteVersionSchema = Merge<Schema<QuoteVersion, boolean>, MissingFieldsOfQuoteVersionSchema>;
73
+ declare type MissingFieldsOfQuoteVersionSchema = {
74
+ items?: QuoteItemSchema;
75
+ };
76
+ declare type MissingFieldsOfCountrySchema = {
77
+ continent?: ContinentSchema;
78
+ };
68
79
  export declare type ItemDataSchema = Schema<ItemData, boolean>;
69
80
  export declare type QuoteSchema = Merge<Schema<QuoteType, boolean>, MissingFieldsOfQuoteSchema>;
70
81
  export declare type ContactsSchema = Merge<Schema<ContactsType, boolean>, MissingFieldsOfContactSchema>;
@@ -77,7 +88,7 @@ export declare type PartnerSchema = Merge<Schema<PartnerType, boolean>, MissingF
77
88
  export declare type ArrowCompanySchema = Merge<Schema<ArrowCompanyType, boolean>, MissingFieldsOfArrowCompanySchema>;
78
89
  export declare type CompanyExtraInformationSchema = Schema<CompanyExtraInformation, boolean>;
79
90
  export declare type ContinentSchema = Schema<ContinentType, boolean>;
80
- export declare type CountrySchema = Schema<CountryType, boolean>;
91
+ export declare type CountrySchema = Merge<Schema<CountryType, boolean>, MissingFieldsOfCountrySchema>;
81
92
  export declare type CurrencySchema = Schema<CurrencyType, boolean>;
82
93
  export declare type ErrorsSchema = Schema<ErrorsType, boolean>;
83
94
  export declare type LicenseBudgetNotificationSchema = Schema<LicenseBudgetNotificationType, boolean>;
@@ -0,0 +1,19 @@
1
+ import { AbstractEntity } from '../../abstractEntity';
2
+ export declare enum ValidateQuoteResultFields {
3
+ COLUMN_LINK = "link",
4
+ COLUMN_REFERENCE = "reference",
5
+ COLUMN_STATUS = "status"
6
+ }
7
+ export declare type ValidateQuoteResultType = {
8
+ [ValidateQuoteResultFields.COLUMN_LINK]: string;
9
+ [ValidateQuoteResultFields.COLUMN_REFERENCE]: string;
10
+ [ValidateQuoteResultFields.COLUMN_STATUS]: string;
11
+ };
12
+ export declare class ValidateQuoteResult extends AbstractEntity<ValidateQuoteResultType> {
13
+ #private;
14
+ constructor(quoteRequestResponse: ValidateQuoteResultType);
15
+ get link(): string;
16
+ get reference(): string;
17
+ get status(): string;
18
+ toJSON(): ValidateQuoteResultType;
19
+ }
@@ -0,0 +1,52 @@
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 _ValidateQuoteResult_link, _ValidateQuoteResult_reference, _ValidateQuoteResult_status;
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.ValidateQuoteResult = exports.ValidateQuoteResultFields = void 0;
16
+ const abstractEntity_1 = require("../../abstractEntity");
17
+ var ValidateQuoteResultFields;
18
+ (function (ValidateQuoteResultFields) {
19
+ ValidateQuoteResultFields["COLUMN_LINK"] = "link";
20
+ ValidateQuoteResultFields["COLUMN_REFERENCE"] = "reference";
21
+ ValidateQuoteResultFields["COLUMN_STATUS"] = "status";
22
+ })(ValidateQuoteResultFields = exports.ValidateQuoteResultFields || (exports.ValidateQuoteResultFields = {}));
23
+ class ValidateQuoteResult extends abstractEntity_1.AbstractEntity {
24
+ constructor(quoteRequestResponse) {
25
+ super(quoteRequestResponse);
26
+ _ValidateQuoteResult_link.set(this, void 0);
27
+ _ValidateQuoteResult_reference.set(this, void 0);
28
+ _ValidateQuoteResult_status.set(this, void 0);
29
+ __classPrivateFieldSet(this, _ValidateQuoteResult_link, quoteRequestResponse[ValidateQuoteResultFields.COLUMN_LINK], "f");
30
+ __classPrivateFieldSet(this, _ValidateQuoteResult_status, quoteRequestResponse[ValidateQuoteResultFields.COLUMN_STATUS], "f");
31
+ __classPrivateFieldSet(this, _ValidateQuoteResult_reference, quoteRequestResponse[ValidateQuoteResultFields.COLUMN_REFERENCE], "f");
32
+ }
33
+ get link() {
34
+ return __classPrivateFieldGet(this, _ValidateQuoteResult_link, "f");
35
+ }
36
+ get reference() {
37
+ return __classPrivateFieldGet(this, _ValidateQuoteResult_reference, "f");
38
+ }
39
+ get status() {
40
+ return __classPrivateFieldGet(this, _ValidateQuoteResult_status, "f");
41
+ }
42
+ toJSON() {
43
+ return {
44
+ [ValidateQuoteResultFields.COLUMN_LINK]: this.link,
45
+ [ValidateQuoteResultFields.COLUMN_REFERENCE]: this.reference,
46
+ [ValidateQuoteResultFields.COLUMN_STATUS]: this.status,
47
+ };
48
+ }
49
+ }
50
+ exports.ValidateQuoteResult = ValidateQuoteResult;
51
+ _ValidateQuoteResult_link = new WeakMap(), _ValidateQuoteResult_reference = new WeakMap(), _ValidateQuoteResult_status = new WeakMap();
52
+ //# sourceMappingURL=ValidateQuoteResult.js.map
@@ -1,6 +1,7 @@
1
1
  import { AbstractRestfulClient, Parameters } from '../abstractRestfulClient';
2
2
  import { GetResult } from '../getResult';
3
3
  import { QuoteRequest } from './entities/QuoteRequest';
4
+ import { ValidateQuoteResult } from './entities/ValidateQuoteResult';
4
5
  export declare type RequestQuoteRequestType = {
5
6
  agreeToReceiveCommunications: boolean;
6
7
  agreeSharingInformation: boolean;
@@ -23,4 +24,5 @@ export declare class QuotesClient extends AbstractRestfulClient {
23
24
  requestQuote(postData: RequestQuoteRequestType, parameters?: Parameters): Promise<GetResult<QuoteRequest>>;
24
25
  requestQuoteForVendor(vendor: string, postData: RequestQuoteIbmRequestType, parameters?: Parameters): Promise<void>;
25
26
  deleteQuote(quoteReference: string, parameters?: Parameters): Promise<void>;
27
+ validateQuote(quoteReference: string, parameters?: Parameters): Promise<GetResult<ValidateQuoteResult>>;
26
28
  }
@@ -4,6 +4,7 @@ exports.QuotesClient = void 0;
4
4
  const abstractRestfulClient_1 = require("../abstractRestfulClient");
5
5
  const getResult_1 = require("../getResult");
6
6
  const QuoteRequest_1 = require("./entities/QuoteRequest");
7
+ const ValidateQuoteResult_1 = require("./entities/ValidateQuoteResult");
7
8
  class QuotesClient extends abstractRestfulClient_1.AbstractRestfulClient {
8
9
  constructor() {
9
10
  super(...arguments);
@@ -21,6 +22,10 @@ class QuotesClient extends abstractRestfulClient_1.AbstractRestfulClient {
21
22
  this.path = `/${quoteReference}`;
22
23
  return await this.delete(parameters);
23
24
  }
25
+ async validateQuote(quoteReference, parameters = {}) {
26
+ this.path = `/request/${quoteReference}/validate`;
27
+ return new getResult_1.GetResult(ValidateQuoteResult_1.ValidateQuoteResult, await this.get(parameters));
28
+ }
24
29
  }
25
30
  exports.QuotesClient = QuotesClient;
26
31
  //# sourceMappingURL=quotesClient.js.map
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.132.0",
7
+ "version": "3.134.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",