@arrowsphere/api-client 3.172.0 → 3.173.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.173.0] - 2025.02.13
7
+
8
+ ### Updated
9
+ - [campaign] add program dependencies to allow subscription
10
+
11
+ ## [3.172.1] - 2025.02.12
12
+
13
+ ### Updated
14
+ - [campaign] update field dateAgg to DateAggType instead of DateAggType[] in CategoryType schema
15
+
6
16
  ## [3.172.0] - 2025.02.11
7
17
 
8
18
  ### Updated
@@ -5,13 +5,13 @@ export declare enum CategoryEnumFields {
5
5
  COLUMN_NAME = "name"
6
6
  }
7
7
  export declare type CategoryType = {
8
- [CategoryEnumFields.COLUMN_DATE_AGG]: DateAggType[];
8
+ [CategoryEnumFields.COLUMN_DATE_AGG]: DateAggType;
9
9
  [CategoryEnumFields.COLUMN_NAME]: string;
10
10
  };
11
11
  export declare class Category extends AbstractEntity<CategoryType> {
12
12
  #private;
13
13
  constructor(data: CategoryType);
14
- get dateAgg(): DateAgg[];
14
+ get dateAgg(): DateAgg;
15
15
  get name(): string;
16
16
  toJSON(): CategoryType;
17
17
  }
@@ -25,7 +25,7 @@ class Category extends abstractEntity_1.AbstractEntity {
25
25
  super(data);
26
26
  _Category_dateAgg.set(this, void 0);
27
27
  _Category_name.set(this, void 0);
28
- __classPrivateFieldSet(this, _Category_dateAgg, data.dateAgg.map((dateAgg) => new dateAgg_1.DateAgg(dateAgg)), "f");
28
+ __classPrivateFieldSet(this, _Category_dateAgg, new dateAgg_1.DateAgg(data.dateAgg), "f");
29
29
  __classPrivateFieldSet(this, _Category_name, data.name, "f");
30
30
  }
31
31
  get dateAgg() {
@@ -36,7 +36,7 @@ class Category extends abstractEntity_1.AbstractEntity {
36
36
  }
37
37
  toJSON() {
38
38
  return {
39
- [CategoryEnumFields.COLUMN_DATE_AGG]: this.dateAgg.map((dateAgg) => dateAgg.toJSON()),
39
+ [CategoryEnumFields.COLUMN_DATE_AGG]: this.dateAgg.toJSON(),
40
40
  [CategoryEnumFields.COLUMN_NAME]: this.name,
41
41
  };
42
42
  }
@@ -4,8 +4,13 @@ import { VendorsType } from './vendor';
4
4
  export declare type GraphqlApiProgramType = {
5
5
  id?: number;
6
6
  bypassReport?: number;
7
+ description?: string;
7
8
  internalName?: string;
9
+ introduction?: string;
10
+ levels?: ProgramLevelType[];
8
11
  name?: string;
12
+ subscriptionExtraFields?: SubscriptionExtraFieldType[];
13
+ url?: string;
9
14
  vendor?: VendorsType;
10
15
  type?: GraphqlApiProgramTypeType;
11
16
  };
@@ -20,6 +25,41 @@ export declare type GraphqlApiProgramLevelType = {
20
25
  internalName?: string;
21
26
  name?: string;
22
27
  };
28
+ export declare type SubscriptionExtraFieldType = {
29
+ name?: string;
30
+ key?: string;
31
+ isMandatory?: boolean;
32
+ type?: string;
33
+ rule?: string;
34
+ description?: string;
35
+ };
36
+ export declare type ProgramLevelOptionGroupType = {
37
+ name?: string;
38
+ notAvailable?: boolean;
39
+ sku?: string;
40
+ programLevelOptions?: ProgramLevelOptionType[];
41
+ };
42
+ export declare type ProgramLevelOptionType = {
43
+ id?: number;
44
+ description?: string;
45
+ typeId?: number;
46
+ };
47
+ export declare type ProgramLevelType = {
48
+ internalName?: string;
49
+ name?: string;
50
+ benefits?: ProgramBenefitType[];
51
+ requirements?: ProgramRequirementType[];
52
+ programLevelOptionGroups?: ProgramLevelOptionGroupType[];
53
+ };
54
+ export declare type ProgramBenefitType = {
55
+ id?: number;
56
+ title?: string;
57
+ description?: string;
58
+ };
59
+ export declare type ProgramRequirementType = {
60
+ title?: string;
61
+ description?: string;
62
+ };
23
63
  export declare type SubscribedProgramType = {
24
64
  id?: number;
25
65
  availabilityEndedAt?: string;
@@ -1,10 +1,21 @@
1
+ import { CountryType } from './country';
1
2
  export declare type VendorsType = {
2
3
  id?: number;
3
4
  identifier?: string;
4
5
  licenseUrl?: string;
6
+ location?: VendorLocationType;
5
7
  logoLarge?: string;
6
8
  logoSmall?: string;
7
9
  logoStandard?: string;
8
10
  name?: string;
9
11
  url?: string;
10
12
  };
13
+ export declare type VendorLocationType = {
14
+ name?: string;
15
+ address1?: string;
16
+ address2?: string;
17
+ city?: string;
18
+ state?: string;
19
+ zipCode?: string;
20
+ country?: CountryType;
21
+ };
@@ -3,7 +3,7 @@ import { ContactsType } from './entities/contact';
3
3
  import { ContinentType, CountryType } from './entities/country';
4
4
  import { LicenseBudgetType } from './entities/licenseBudget';
5
5
  import { PartnertagType } from './entities/partnertag';
6
- import { GraphqlApiProgramType, SubscribedProgramType } from './entities/program';
6
+ import { GraphqlApiProgramType, ProgramLevelOptionGroupType, SubscribedProgramType } from './entities/program';
7
7
  import { QuoteType } from './entities/quote';
8
8
  import { GraphqlApiReportStatusType, GraphqlApiReportType } from './entities/report';
9
9
  import { SpecialPriceRateType } from './entities/specialPriceRate';
@@ -124,6 +124,7 @@ export declare enum SelectDataField {
124
124
  PARTNER = "partner",
125
125
  PARTNERTAG = "partnertag",
126
126
  PROGRAM = "program",
127
+ PROGRAM_LEVEL_OPTION_GROUP = "programLevelOptionGroup",
127
128
  QUOTE = "quote",
128
129
  REPORT = "report",
129
130
  REPORT_STATUS = "reportStatus",
@@ -150,6 +151,7 @@ export declare type SelectAllResponseDataType = {
150
151
  [SelectDataField.PARTNER]?: PartnerType[];
151
152
  [SelectDataField.PARTNERTAG]?: PartnertagType[];
152
153
  [SelectDataField.PROGRAM]?: GraphqlApiProgramType[];
154
+ [SelectDataField.PROGRAM_LEVEL_OPTION_GROUP]?: ProgramLevelOptionGroupType[];
153
155
  [SelectDataField.QUOTE]?: QuoteType[];
154
156
  [SelectDataField.REPORT]?: GraphqlApiReportType[];
155
157
  [SelectDataField.REPORT_STATUS]?: GraphqlApiReportStatusType[];
@@ -225,6 +227,7 @@ export declare type SelectOneResponseDataType = {
225
227
  [SelectDataField.PARTNER]?: PartnerType;
226
228
  [SelectDataField.PARTNERTAG]?: PartnertagType;
227
229
  [SelectDataField.PROGRAM]?: GraphqlApiProgramType;
230
+ [SelectDataField.PROGRAM_LEVEL_OPTION_GROUP]?: ProgramLevelOptionGroupType;
228
231
  [SelectDataField.QUOTE]?: QuoteType;
229
232
  [SelectDataField.REPORT]?: GraphqlApiReportType;
230
233
  [SelectDataField.REPORT_STATUS]?: GraphqlApiReportStatusType;
@@ -99,6 +99,7 @@ var SelectDataField;
99
99
  SelectDataField["PARTNER"] = "partner";
100
100
  SelectDataField["PARTNERTAG"] = "partnertag";
101
101
  SelectDataField["PROGRAM"] = "program";
102
+ SelectDataField["PROGRAM_LEVEL_OPTION_GROUP"] = "programLevelOptionGroup";
102
103
  SelectDataField["QUOTE"] = "quote";
103
104
  SelectDataField["REPORT"] = "report";
104
105
  SelectDataField["REPORT_STATUS"] = "reportStatus";
@@ -8,8 +8,7 @@ import { ContactsType } from './entities/contact';
8
8
  import { SubscriptionType } from './entities/subscription';
9
9
  import { SpecialPriceRateType } from './entities/specialPriceRate';
10
10
  import { OrderItemsType, OrdersType } from './entities/order';
11
- import { VendorsType } from './entities/vendor';
12
- import { GraphqlApiProgramType, SubscribedProgramType } from './entities/program';
11
+ import { GraphqlApiProgramType, ProgramBenefitType, ProgramLevelType, ProgramRequirementType, ProgramLevelOptionGroupType, ProgramLevelOptionType, SubscribedProgramType, SubscriptionExtraFieldType } from './entities/program';
13
12
  import { LicenseBudgetNotificationType, LicenseBudgetType } from './entities/licenseBudget';
14
13
  import { UserHistoryType, UserType } from './entities/user';
15
14
  import { OrganizationUnitsType } from './entities/organizationUnit';
@@ -103,13 +102,30 @@ export declare type ErrorsSchema = Schema<ErrorsType, boolean>;
103
102
  export declare type LicenseBudgetNotificationSchema = Schema<LicenseBudgetNotificationType, boolean>;
104
103
  export declare type OrganizationUnitSchema = Schema<OrganizationUnitsType, boolean>;
105
104
  export declare type PageSchema = Schema<PageType, boolean>;
106
- export declare type GraphqlApiProgramSchema = Schema<GraphqlApiProgramType, boolean>;
105
+ export declare type ProgramBenefitSchema = Schema<ProgramBenefitType, boolean>;
106
+ export declare type ProgramLevelOptionSchema = Schema<ProgramLevelOptionType, boolean>;
107
+ export declare type ProgramRequirementSchema = Schema<ProgramRequirementType, boolean>;
108
+ export declare type ProgramLevelSchema = Schema<ProgramLevelType, boolean>;
109
+ declare type MissingFieldsOfProgramLevelOptionGroupSchema = {
110
+ programLevelOptions?: ProgramLevelOptionSchema;
111
+ };
112
+ export declare type ProgramLevelOptionGroupSchema = Merge<Schema<ProgramLevelOptionGroupType, boolean>, MissingFieldsOfProgramLevelOptionGroupSchema>;
113
+ export declare type SubscriptionExtraFieldSchema = Schema<SubscriptionExtraFieldType, boolean>;
114
+ export declare type MissingFieldsOfLevelSchema = {
115
+ benefits?: ProgramBenefitSchema;
116
+ programLevelOptionGroups?: ProgramLevelOptionGroupSchema;
117
+ requirements?: ProgramRequirementSchema;
118
+ };
119
+ export declare type MissingFieldsOfProgramSchema = {
120
+ levels?: Merge<Schema<ProgramLevelSchema, boolean>, MissingFieldsOfLevelSchema>;
121
+ subscriptionExtraFields?: SubscriptionExtraFieldSchema;
122
+ };
123
+ export declare type GraphqlApiProgramSchema = Merge<Schema<GraphqlApiProgramType, boolean>, MissingFieldsOfProgramSchema>;
107
124
  export declare type ReportStatusSchema = Schema<GraphqlApiReportStatusType, boolean>;
108
125
  export declare type SpecialPriceRateSchema = Schema<SpecialPriceRateType, boolean>;
109
126
  export declare type SubscribedProgramSchema = Schema<SubscribedProgramType, boolean>;
110
127
  export declare type SubscriptionSchema = Schema<SubscriptionType, boolean>;
111
128
  export declare type UserHistorySchema = Schema<UserHistoryType, boolean>;
112
- export declare type VendorSchema = Schema<VendorsType, boolean>;
113
129
  export declare type WorkgroupSchema = Schema<WorkgroupType, boolean>;
114
130
  export declare type SelectAllResultSchema = {
115
131
  [SelectableField.DATA]?: SelectAllResponseDataSchema;
@@ -125,6 +141,7 @@ export declare type SelectAllResponseDataSchema = {
125
141
  [SelectDataField.PARTNER]?: PartnerSchema;
126
142
  [SelectDataField.PARTNERTAG]?: PartnertagSchema;
127
143
  [SelectDataField.PROGRAM]?: GraphqlApiProgramSchema;
144
+ [SelectDataField.PROGRAM_LEVEL_OPTION_GROUP]?: ProgramLevelOptionGroupSchema;
128
145
  [SelectDataField.QUOTE]?: QuoteSchema;
129
146
  [SelectDataField.REPORT]?: ReportSchema;
130
147
  [SelectDataField.REPORT_STATUS]?: ReportStatusSchema;
@@ -29,6 +29,16 @@ export declare type SubscriptionsListData = {
29
29
  previous: string;
30
30
  };
31
31
  };
32
+ export declare type SubscriptionCreationData = {
33
+ name: string;
34
+ level: string;
35
+ sku: string;
36
+ extraInformation?: {
37
+ programs: {
38
+ [programName: string]: Record<string, string>;
39
+ };
40
+ };
41
+ };
32
42
  export declare class SubscriptionsClient extends AbstractRestfulClient {
33
43
  /**
34
44
  * The base path of the API
@@ -62,4 +72,5 @@ export declare class SubscriptionsClient extends AbstractRestfulClient {
62
72
  *
63
73
  */
64
74
  list(postData?: SubscriptionsListPayload, perPage?: number, page?: number): Promise<SubscriptionsListResult>;
75
+ addSubscription(postData: SubscriptionCreationData): Promise<void>;
65
76
  }
@@ -50,6 +50,9 @@ class SubscriptionsClient extends abstractRestfulClient_1.AbstractRestfulClient
50
50
  const response = await this.listRaw(postData);
51
51
  return new subscriptionsListResult_1.SubscriptionsListResult(response, this, postData);
52
52
  }
53
+ async addSubscription(postData) {
54
+ return this.post(postData);
55
+ }
53
56
  }
54
57
  exports.SubscriptionsClient = SubscriptionsClient;
55
58
  //# sourceMappingURL=subscriptionsClient.js.map
@@ -2,6 +2,7 @@ import { AbstractEntity } from '../../abstractEntity';
2
2
  export declare enum CompleteWhoAmICompanyFields {
3
3
  COLUMN_COMPANY_RESTRICTED = "companyRestricted",
4
4
  COLUMN_COUNTRY_CODE = "countryCode",
5
+ COLUMN_ERP_ID = "erpId",
5
6
  COLUMN_HAS_ACCESS_TO_XCM = "hasAccessToXcm",
6
7
  COLUMN_HAS_ACCESS_TO_XCP = "hasAccessToXcp",
7
8
  COLUMN_IS_PROTECTED = "isProtected",
@@ -18,6 +19,7 @@ export declare type CompanyUnit = {
18
19
  export declare type CompleteWhoAmICompanyData = {
19
20
  [CompleteWhoAmICompanyFields.COLUMN_COMPANY_RESTRICTED]: boolean;
20
21
  [CompleteWhoAmICompanyFields.COLUMN_COUNTRY_CODE]: string;
22
+ [CompleteWhoAmICompanyFields.COLUMN_ERP_ID]: string;
21
23
  [CompleteWhoAmICompanyFields.COLUMN_HAS_ACCESS_TO_XCM]: boolean;
22
24
  [CompleteWhoAmICompanyFields.COLUMN_HAS_ACCESS_TO_XCP]: boolean;
23
25
  [CompleteWhoAmICompanyFields.COLUMN_IS_PROTECTED]: boolean;
@@ -32,6 +34,7 @@ export declare class CompleteWhoAmICompany extends AbstractEntity<CompleteWhoAmI
32
34
  constructor(data: CompleteWhoAmICompanyData);
33
35
  get companyRestricted(): boolean;
34
36
  get countryCode(): string;
37
+ get erpId(): string;
35
38
  get hasAccessToXcm(): boolean;
36
39
  get hasAccessToXcp(): boolean;
37
40
  get isProtected(): boolean;
@@ -10,7 +10,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
10
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
11
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
12
12
  };
13
- var _CompleteWhoAmICompany_companyRestricted, _CompleteWhoAmICompany_countryCode, _CompleteWhoAmICompany_hasAccessToXcm, _CompleteWhoAmICompany_hasAccessToXcp, _CompleteWhoAmICompany_isProtected, _CompleteWhoAmICompany_marketplace, _CompleteWhoAmICompany_name, _CompleteWhoAmICompany_reference, _CompleteWhoAmICompany_tags, _CompleteWhoAmICompany_unit;
13
+ var _CompleteWhoAmICompany_companyRestricted, _CompleteWhoAmICompany_countryCode, _CompleteWhoAmICompany_erpId, _CompleteWhoAmICompany_hasAccessToXcm, _CompleteWhoAmICompany_hasAccessToXcp, _CompleteWhoAmICompany_isProtected, _CompleteWhoAmICompany_marketplace, _CompleteWhoAmICompany_name, _CompleteWhoAmICompany_reference, _CompleteWhoAmICompany_tags, _CompleteWhoAmICompany_unit;
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
15
  exports.CompleteWhoAmICompany = exports.CompleteWhoAmICompanyFields = void 0;
16
16
  const abstractEntity_1 = require("../../abstractEntity");
@@ -18,6 +18,7 @@ var CompleteWhoAmICompanyFields;
18
18
  (function (CompleteWhoAmICompanyFields) {
19
19
  CompleteWhoAmICompanyFields["COLUMN_COMPANY_RESTRICTED"] = "companyRestricted";
20
20
  CompleteWhoAmICompanyFields["COLUMN_COUNTRY_CODE"] = "countryCode";
21
+ CompleteWhoAmICompanyFields["COLUMN_ERP_ID"] = "erpId";
21
22
  CompleteWhoAmICompanyFields["COLUMN_HAS_ACCESS_TO_XCM"] = "hasAccessToXcm";
22
23
  CompleteWhoAmICompanyFields["COLUMN_HAS_ACCESS_TO_XCP"] = "hasAccessToXcp";
23
24
  CompleteWhoAmICompanyFields["COLUMN_IS_PROTECTED"] = "isProtected";
@@ -32,6 +33,7 @@ class CompleteWhoAmICompany extends abstractEntity_1.AbstractEntity {
32
33
  super(data);
33
34
  _CompleteWhoAmICompany_companyRestricted.set(this, void 0);
34
35
  _CompleteWhoAmICompany_countryCode.set(this, void 0);
36
+ _CompleteWhoAmICompany_erpId.set(this, void 0);
35
37
  _CompleteWhoAmICompany_hasAccessToXcm.set(this, void 0);
36
38
  _CompleteWhoAmICompany_hasAccessToXcp.set(this, void 0);
37
39
  _CompleteWhoAmICompany_isProtected.set(this, void 0);
@@ -42,6 +44,7 @@ class CompleteWhoAmICompany extends abstractEntity_1.AbstractEntity {
42
44
  _CompleteWhoAmICompany_unit.set(this, void 0);
43
45
  __classPrivateFieldSet(this, _CompleteWhoAmICompany_companyRestricted, data[CompleteWhoAmICompanyFields.COLUMN_COMPANY_RESTRICTED], "f");
44
46
  __classPrivateFieldSet(this, _CompleteWhoAmICompany_countryCode, data[CompleteWhoAmICompanyFields.COLUMN_COUNTRY_CODE], "f");
47
+ __classPrivateFieldSet(this, _CompleteWhoAmICompany_erpId, data[CompleteWhoAmICompanyFields.COLUMN_ERP_ID], "f");
45
48
  __classPrivateFieldSet(this, _CompleteWhoAmICompany_hasAccessToXcm, data[CompleteWhoAmICompanyFields.COLUMN_HAS_ACCESS_TO_XCM], "f");
46
49
  __classPrivateFieldSet(this, _CompleteWhoAmICompany_hasAccessToXcp, data[CompleteWhoAmICompanyFields.COLUMN_HAS_ACCESS_TO_XCP], "f");
47
50
  __classPrivateFieldSet(this, _CompleteWhoAmICompany_isProtected, data[CompleteWhoAmICompanyFields.COLUMN_IS_PROTECTED], "f");
@@ -57,6 +60,9 @@ class CompleteWhoAmICompany extends abstractEntity_1.AbstractEntity {
57
60
  get countryCode() {
58
61
  return __classPrivateFieldGet(this, _CompleteWhoAmICompany_countryCode, "f");
59
62
  }
63
+ get erpId() {
64
+ return __classPrivateFieldGet(this, _CompleteWhoAmICompany_erpId, "f");
65
+ }
60
66
  get hasAccessToXcm() {
61
67
  return __classPrivateFieldGet(this, _CompleteWhoAmICompany_hasAccessToXcm, "f");
62
68
  }
@@ -86,6 +92,7 @@ class CompleteWhoAmICompany extends abstractEntity_1.AbstractEntity {
86
92
  [CompleteWhoAmICompanyFields.COLUMN_COMPANY_RESTRICTED]: this
87
93
  .companyRestricted,
88
94
  [CompleteWhoAmICompanyFields.COLUMN_COUNTRY_CODE]: this.countryCode,
95
+ [CompleteWhoAmICompanyFields.COLUMN_ERP_ID]: this.erpId,
89
96
  [CompleteWhoAmICompanyFields.COLUMN_HAS_ACCESS_TO_XCM]: this
90
97
  .hasAccessToXcm,
91
98
  [CompleteWhoAmICompanyFields.COLUMN_HAS_ACCESS_TO_XCP]: this
@@ -100,5 +107,5 @@ class CompleteWhoAmICompany extends abstractEntity_1.AbstractEntity {
100
107
  }
101
108
  }
102
109
  exports.CompleteWhoAmICompany = CompleteWhoAmICompany;
103
- _CompleteWhoAmICompany_companyRestricted = new WeakMap(), _CompleteWhoAmICompany_countryCode = new WeakMap(), _CompleteWhoAmICompany_hasAccessToXcm = new WeakMap(), _CompleteWhoAmICompany_hasAccessToXcp = new WeakMap(), _CompleteWhoAmICompany_isProtected = new WeakMap(), _CompleteWhoAmICompany_marketplace = new WeakMap(), _CompleteWhoAmICompany_name = new WeakMap(), _CompleteWhoAmICompany_reference = new WeakMap(), _CompleteWhoAmICompany_tags = new WeakMap(), _CompleteWhoAmICompany_unit = new WeakMap();
110
+ _CompleteWhoAmICompany_companyRestricted = new WeakMap(), _CompleteWhoAmICompany_countryCode = new WeakMap(), _CompleteWhoAmICompany_erpId = new WeakMap(), _CompleteWhoAmICompany_hasAccessToXcm = new WeakMap(), _CompleteWhoAmICompany_hasAccessToXcp = new WeakMap(), _CompleteWhoAmICompany_isProtected = new WeakMap(), _CompleteWhoAmICompany_marketplace = new WeakMap(), _CompleteWhoAmICompany_name = new WeakMap(), _CompleteWhoAmICompany_reference = new WeakMap(), _CompleteWhoAmICompany_tags = new WeakMap(), _CompleteWhoAmICompany_unit = new WeakMap();
104
111
  //# sourceMappingURL=CompleteWhoAmICompany.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.172.0",
7
+ "version": "3.173.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",