@arrowsphere/api-client 3.120.0-rc.bdj.1 → 3.120.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,12 @@
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.120.0] - 2024.06.11
7
+
8
+ ### Added
9
+ - [customers] Adds endpoint migration
10
+ - Added a Makefile to manage build, install, clean and test/test-unit commands
11
+
6
12
  ## [3.119.0] - 2024.06.10
7
13
 
8
14
  ### Added
package/Makefile ADDED
@@ -0,0 +1,14 @@
1
+ install:
2
+ yarn install
3
+
4
+ build:
5
+ yarn build
6
+
7
+ clean:
8
+ rm -rf build \
9
+ node_modules
10
+
11
+ test: test-unit
12
+
13
+ test-unit:
14
+ yarn test
@@ -7,6 +7,22 @@ import { CustomerContactList } from './entities/customers/customerContact/custom
7
7
  import { CustomerContact, CustomerContactRoleType, CustomerContactTypeType } from './entities/customers/customerContact/customerContact';
8
8
  import { CustomerFields, CustomerType } from './entities/customers/customer';
9
9
  import { ContactFields } from './entities/customers/contact/contact';
10
+ export declare enum CustomerMigrationAttributeFields {
11
+ NAME = "name",
12
+ VALUE = "value"
13
+ }
14
+ export declare enum CustomerMigrationPayloadFields {
15
+ PROGRAM = "program",
16
+ ATTRIBUTES = "attributes"
17
+ }
18
+ export declare type PostCustomerMigrationAttribute = {
19
+ [CustomerMigrationAttributeFields.NAME]: string;
20
+ [CustomerMigrationAttributeFields.VALUE]: string;
21
+ };
22
+ export declare type PostCustomerMigrationPayload = {
23
+ [CustomerMigrationPayloadFields.PROGRAM]: string;
24
+ [CustomerMigrationPayloadFields.ATTRIBUTES]?: PostCustomerMigrationAttribute[];
25
+ };
10
26
  export declare enum CustomerContactPayloadFields {
11
27
  COLUMN_FIRST_NAME = "firstName",
12
28
  COLUMN_LAST_NAME = "lastName",
@@ -76,6 +92,9 @@ export declare type APIResponseCustomerUpdated = {
76
92
  customers: CustomerType[];
77
93
  };
78
94
  };
95
+ export declare type APIResponseCustomerMigration = {
96
+ status: number;
97
+ };
79
98
  export interface APIResponseError {
80
99
  status: number;
81
100
  error: string;
@@ -100,4 +119,5 @@ export declare class CustomersClient extends AbstractRestfulClient {
100
119
  createCustomer(payload: PostCustomerPayload, parameters?: Parameters, returnAxiosData?: boolean): Promise<APIResponseResourceCreated | APIResponseError>;
101
120
  updateCustomer(customerReference: string, payload: Partial<PostCustomerPayload>, parameters?: Parameters, returnAxiosData?: boolean): Promise<APIResponseCustomerUpdated | APIResponseError>;
102
121
  postCustomerInvitation(payload: PostCustomerInvitation, parameters?: Parameters): Promise<GetResult<DataInvitation>>;
122
+ postCustomerMigration(customerReference: string, payload: PostCustomerMigrationPayload, parameters?: Parameters, returnAxiosData?: boolean): Promise<APIResponseCustomerMigration | APIResponseError>;
103
123
  }
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CustomersClient = exports.PostCustomerInvitationFields = exports.CustomerContactPayloadFields = void 0;
3
+ exports.CustomersClient = exports.PostCustomerInvitationFields = exports.CustomerContactPayloadFields = exports.CustomerMigrationPayloadFields = exports.CustomerMigrationAttributeFields = void 0;
4
4
  const abstractRestfulClient_1 = require("../abstractRestfulClient");
5
5
  const getResult_1 = require("../getResult");
6
6
  const dataCustomers_1 = require("./entities/dataCustomers");
@@ -10,6 +10,16 @@ const customerContactList_1 = require("./entities/customers/customerContact/cust
10
10
  const customerContact_1 = require("./entities/customers/customerContact/customerContact");
11
11
  const customer_1 = require("./entities/customers/customer");
12
12
  const contact_1 = require("./entities/customers/contact/contact");
13
+ var CustomerMigrationAttributeFields;
14
+ (function (CustomerMigrationAttributeFields) {
15
+ CustomerMigrationAttributeFields["NAME"] = "name";
16
+ CustomerMigrationAttributeFields["VALUE"] = "value";
17
+ })(CustomerMigrationAttributeFields = exports.CustomerMigrationAttributeFields || (exports.CustomerMigrationAttributeFields = {}));
18
+ var CustomerMigrationPayloadFields;
19
+ (function (CustomerMigrationPayloadFields) {
20
+ CustomerMigrationPayloadFields["PROGRAM"] = "program";
21
+ CustomerMigrationPayloadFields["ATTRIBUTES"] = "attributes";
22
+ })(CustomerMigrationPayloadFields = exports.CustomerMigrationPayloadFields || (exports.CustomerMigrationPayloadFields = {}));
13
23
  var CustomerContactPayloadFields;
14
24
  (function (CustomerContactPayloadFields) {
15
25
  CustomerContactPayloadFields["COLUMN_FIRST_NAME"] = "firstName";
@@ -84,6 +94,10 @@ class CustomersClient extends abstractRestfulClient_1.AbstractRestfulClient {
84
94
  this.path = `/invitations`;
85
95
  return new getResult_1.GetResult(dataInvitation_1.DataInvitation, await this.post(payload, parameters));
86
96
  }
97
+ async postCustomerMigration(customerReference, payload, parameters = {}, returnAxiosData = false) {
98
+ this.path = `/${customerReference}/migration`;
99
+ return await this.post(payload, parameters, {}, { returnAxiosData });
100
+ }
87
101
  }
88
102
  exports.CustomersClient = CustomersClient;
89
103
  //# sourceMappingURL=customersClient.js.map
@@ -3,13 +3,10 @@ export * from './types/graphqlApiSchemas';
3
3
  export * from './types/entities/contact';
4
4
  export * from './types/entities/company';
5
5
  export * from './types/entities/country';
6
- export * from './types/entities/currency';
7
6
  export * from './types/entities/licenseBudget';
8
7
  export * from './types/entities/order';
9
8
  export * from './types/entities/organizationUnit';
10
9
  export * from './types/entities/partnertag';
11
- export * from './types/entities/program';
12
- export * from './types/entities/quote';
13
10
  export * from './types/entities/subscription';
14
11
  export * from './types/entities/specialPriceRate';
15
12
  export * from './types/entities/user';
@@ -19,13 +19,10 @@ __exportStar(require("./types/graphqlApiSchemas"), exports);
19
19
  __exportStar(require("./types/entities/contact"), exports);
20
20
  __exportStar(require("./types/entities/company"), exports);
21
21
  __exportStar(require("./types/entities/country"), exports);
22
- __exportStar(require("./types/entities/currency"), exports);
23
22
  __exportStar(require("./types/entities/licenseBudget"), exports);
24
23
  __exportStar(require("./types/entities/order"), exports);
25
24
  __exportStar(require("./types/entities/organizationUnit"), exports);
26
25
  __exportStar(require("./types/entities/partnertag"), exports);
27
- __exportStar(require("./types/entities/program"), exports);
28
- __exportStar(require("./types/entities/quote"), exports);
29
26
  __exportStar(require("./types/entities/subscription"), exports);
30
27
  __exportStar(require("./types/entities/specialPriceRate"), exports);
31
28
  __exportStar(require("./types/entities/user"), exports);
@@ -1,6 +1,5 @@
1
1
  import { ContactsType } from './contact';
2
2
  import { CountryType } from './country';
3
- import { CurrencyType } from './currency';
4
3
  import { OrdersType } from './order';
5
4
  import { PartnertagType } from './partnertag';
6
5
  import { SubscribedProgramType } from './program';
@@ -56,7 +55,6 @@ export declare type CompanyExtraInformation = {
56
55
  export declare type PartnerType = BaseCompanyType & {
57
56
  contactsCount?: CountableType;
58
57
  country?: CountryType;
59
- currency?: CurrencyType;
60
58
  customersCount?: CountableType;
61
59
  ordersCount?: CountableType;
62
60
  ordersNeedCount?: CountableType;
@@ -1,7 +1,7 @@
1
1
  import { PartnerType } from './company';
2
2
  import { SubscriptionType } from './subscription';
3
3
  import { VendorsType } from './vendor';
4
- export declare type GraphqlApiProgramType = {
4
+ export declare type ProgramType = {
5
5
  id?: number;
6
6
  internalName?: string;
7
7
  name?: string;
@@ -15,7 +15,7 @@ export declare type SubscribedProgramType = {
15
15
  internalName?: string;
16
16
  subscriptionEndedAt?: string;
17
17
  partner?: PartnerType;
18
- program?: GraphqlApiProgramType;
18
+ program?: ProgramType;
19
19
  subscription?: SubscriptionType;
20
20
  vendor?: VendorsType;
21
21
  vendorCode?: string;
@@ -1,9 +1,9 @@
1
1
  import { PartnerType } from './company';
2
2
  import { ContactsType } from './contact';
3
- import { GraphqlApiProgramType } from './program';
3
+ import { ProgramType } from './program';
4
4
  export declare type SubscriptionType = {
5
5
  id?: number;
6
6
  company?: PartnerType;
7
7
  localContact?: ContactsType;
8
- program?: GraphqlApiProgramType;
8
+ program?: ProgramType;
9
9
  };
@@ -3,10 +3,8 @@ import { ContinentType, CountryType } from './entities/country';
3
3
  import { LicenseBudgetType } from './entities/licenseBudget';
4
4
  import { PartnertagType } from './entities/partnertag';
5
5
  import { SubscribedProgramType } from './entities/program';
6
- import { QuoteType } from './entities/quote';
7
6
  import { SubscriptionType } from './entities/subscription';
8
7
  import { UserHistoryType, UserType } from './entities/user';
9
- import { VendorsType } from './entities/vendor';
10
8
  import { WorkgroupType } from './entities/workgroup';
11
9
  import { ErrorsSchema, PageSchema, SelectAllResponseDataSchema, SelectOneResponseDataSchema } from './graphqlApiSchemas';
12
10
  /**
@@ -120,12 +118,10 @@ export declare enum SelectDataField {
120
118
  LICENSE_BUDGET = "licenseBudget",
121
119
  PARTNER = "partner",
122
120
  PARTNERTAG = "partnertag",
123
- QUOTE = "quote",
124
121
  SUBSCRIBED_PROGRAM = "subscribedProgram",
125
122
  SUBSCRIPTION = "subscription",
126
123
  USER = "user",
127
124
  USER_HISTORY = "userHistory",
128
- VENDOR = "vendor",
129
125
  WORKGROUP = "workgroup"
130
126
  }
131
127
  export declare type SelectAllResultType = {
@@ -143,12 +139,10 @@ export declare type SelectAllResponseDataType = {
143
139
  [SelectDataField.LICENSE_BUDGET]?: LicenseBudgetType[];
144
140
  [SelectDataField.PARTNER]?: PartnerType[];
145
141
  [SelectDataField.PARTNERTAG]?: PartnertagType[];
146
- [SelectDataField.QUOTE]?: QuoteType[];
147
142
  [SelectDataField.SUBSCRIBED_PROGRAM]?: SubscribedProgramType[];
148
143
  [SelectDataField.SUBSCRIPTION]?: SubscriptionType[];
149
144
  [SelectDataField.USER]?: UserType[];
150
145
  [SelectDataField.USER_HISTORY]?: UserHistoryType[];
151
- [SelectDataField.VENDOR]?: VendorsType[];
152
146
  [SelectDataField.WORKGROUP]?: WorkgroupType[];
153
147
  };
154
148
  export declare enum ErrorsField {
@@ -192,12 +186,10 @@ export declare type SelectOneResponseDataType = {
192
186
  [SelectDataField.LICENSE_BUDGET]?: LicenseBudgetType;
193
187
  [SelectDataField.PARTNER]?: PartnerType;
194
188
  [SelectDataField.PARTNERTAG]?: PartnertagType;
195
- [SelectDataField.QUOTE]?: QuoteType;
196
189
  [SelectDataField.SUBSCRIBED_PROGRAM]?: SubscribedProgramType;
197
190
  [SelectDataField.SUBSCRIPTION]?: SubscriptionType;
198
191
  [SelectDataField.USER]?: UserType;
199
192
  [SelectDataField.USER_HISTORY]?: UserHistoryType;
200
- [SelectDataField.VENDOR]?: VendorsType;
201
193
  [SelectDataField.WORKGROUP]?: WorkgroupType;
202
194
  };
203
195
  export declare enum QueryVariablesField {
@@ -97,12 +97,10 @@ var SelectDataField;
97
97
  SelectDataField["LICENSE_BUDGET"] = "licenseBudget";
98
98
  SelectDataField["PARTNER"] = "partner";
99
99
  SelectDataField["PARTNERTAG"] = "partnertag";
100
- SelectDataField["QUOTE"] = "quote";
101
100
  SelectDataField["SUBSCRIBED_PROGRAM"] = "subscribedProgram";
102
101
  SelectDataField["SUBSCRIPTION"] = "subscription";
103
102
  SelectDataField["USER"] = "user";
104
103
  SelectDataField["USER_HISTORY"] = "userHistory";
105
- SelectDataField["VENDOR"] = "vendor";
106
104
  SelectDataField["WORKGROUP"] = "workgroup";
107
105
  })(SelectDataField = exports.SelectDataField || (exports.SelectDataField = {}));
108
106
  var ErrorsField;
@@ -14,12 +14,9 @@ import { SubscribedProgramType } from './entities/program';
14
14
  import { LicenseBudgetNotificationType, LicenseBudgetType } from './entities/licenseBudget';
15
15
  import { UserHistoryType, UserType } from './entities/user';
16
16
  import { OrganizationUnitsType } from './entities/organizationUnit';
17
- import { CurrencyType } from './entities/currency';
18
- import { QuoteItemType, QuoteType } from './entities/quote';
19
17
  export declare type PartnertagSchema = Schema<PartnertagType, boolean>;
20
18
  declare type MissingFieldsOfCompanySchema = {
21
19
  contacts?: ContactsSchema;
22
- currency?: CurrencySchema;
23
20
  extraInformations?: CompanyExtraInformationSchema;
24
21
  orders?: OrdersSchema;
25
22
  partnerTags?: PartnertagSchema;
@@ -54,17 +51,6 @@ declare type MissingFieldsOfUserSchema = {
54
51
  declare type MissingFieldsOfLicenseBudgetSchema = {
55
52
  notifications?: LicenseBudgetNotificationSchema;
56
53
  };
57
- declare type MissingFieldsOfQuoteSchema = {
58
- arrowCompany?: ArrowCompanySchema;
59
- endCustomer?: EndCustomerSchema;
60
- items?: QuoteItemSchema;
61
- partner?: PartnerSchema;
62
- };
63
- declare type MissingFieldsOfQuoteItemSchema = {
64
- program?: LicenseBudgetNotificationSchema;
65
- };
66
- export declare type QuoteItemSchema = Merge<Schema<QuoteItemType, boolean>, MissingFieldsOfQuoteItemSchema>;
67
- export declare type QuoteSchema = Merge<Schema<QuoteType, boolean>, MissingFieldsOfQuoteSchema>;
68
54
  export declare type ContactsSchema = Merge<Schema<ContactsType, boolean>, MissingFieldsOfContactSchema>;
69
55
  export declare type UserSchema = Merge<Schema<UserType, boolean>, MissingFieldsOfUserSchema>;
70
56
  export declare type LicenseBudgetSchema = Merge<Schema<LicenseBudgetType, boolean>, MissingFieldsOfLicenseBudgetSchema>;
@@ -76,7 +62,6 @@ export declare type ArrowCompanySchema = Merge<Schema<ArrowCompanyType, boolean>
76
62
  export declare type CompanyExtraInformationSchema = Schema<CompanyExtraInformation, boolean>;
77
63
  export declare type ContinentSchema = Schema<ContinentType, boolean>;
78
64
  export declare type CountrySchema = Schema<CountryType, boolean>;
79
- export declare type CurrencySchema = Schema<CurrencyType, boolean>;
80
65
  export declare type ErrorsSchema = Schema<ErrorsType, boolean>;
81
66
  export declare type LicenseBudgetNotificationSchema = Schema<LicenseBudgetNotificationType, boolean>;
82
67
  export declare type OrganizationUnitSchema = Schema<OrganizationUnitsType, boolean>;
@@ -101,12 +86,10 @@ export declare type SelectAllResponseDataSchema = {
101
86
  [SelectDataField.LICENSE_BUDGET]?: LicenseBudgetSchema;
102
87
  [SelectDataField.PARTNER]?: PartnerSchema;
103
88
  [SelectDataField.PARTNERTAG]?: PartnertagSchema;
104
- [SelectDataField.QUOTE]?: QuoteSchema;
105
89
  [SelectDataField.SUBSCRIBED_PROGRAM]?: SubscribedProgramSchema;
106
90
  [SelectDataField.SUBSCRIPTION]?: SubscriptionSchema;
107
91
  [SelectDataField.USER]?: UserSchema;
108
92
  [SelectDataField.USER_HISTORY]?: UserHistorySchema;
109
- [SelectDataField.VENDOR]?: VendorSchema;
110
93
  [SelectDataField.WORKGROUP]?: WorkgroupSchema;
111
94
  };
112
95
  export declare type SelectOneResultSchema = {
@@ -121,12 +104,10 @@ export declare type SelectOneResponseDataSchema = {
121
104
  [SelectDataField.LICENSE_BUDGET]?: LicenseBudgetSchema;
122
105
  [SelectDataField.PARTNER]?: PartnerSchema;
123
106
  [SelectDataField.PARTNERTAG]?: PartnertagSchema;
124
- [SelectDataField.QUOTE]?: QuoteSchema;
125
107
  [SelectDataField.SUBSCRIBED_PROGRAM]?: SubscribedProgramSchema;
126
108
  [SelectDataField.SUBSCRIPTION]?: SubscriptionSchema;
127
109
  [SelectDataField.USER]?: UserSchema;
128
110
  [SelectDataField.USER_HISTORY]?: UserHistorySchema;
129
- [SelectDataField.VENDOR]?: VendorSchema;
130
111
  [SelectDataField.WORKGROUP]?: WorkgroupSchema;
131
112
  };
132
113
  export declare type SelectAllQuerySchema = {
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.120.0-rc.bdj.1",
7
+ "version": "3.120.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,5 +0,0 @@
1
- export declare type CurrencyType = {
2
- id?: number;
3
- name?: string;
4
- symbol?: string;
5
- };
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=currency.js.map
@@ -1,27 +0,0 @@
1
- import { ArrowCompanyType, EndCustomerType, PartnerType } from './company';
2
- import { GraphqlApiProgramType } from './program';
3
- export declare type EavType = {
4
- value?: string;
5
- };
6
- export declare type QuoteType = {
7
- id?: number;
8
- arrowCompany?: ArrowCompanyType;
9
- commitmentAmountTotal?: number;
10
- createdAt?: string;
11
- endCustomer?: EndCustomerType;
12
- items?: QuoteItemType[];
13
- partner?: PartnerType;
14
- promotionCode?: string;
15
- reference?: string;
16
- status?: string;
17
- totalRecurringPrice?: number;
18
- updatedAt?: string;
19
- };
20
- export declare type QuoteItemType = {
21
- id?: number;
22
- name?: string;
23
- program?: GraphqlApiProgramType;
24
- reference?: string;
25
- vendorName?: string;
26
- vendorNamesSerialized?: string;
27
- };
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=quote.js.map