Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [3.187.0] - 2025.04.22
### Added
- [Licenses] add endDate to LicenseGetData type and LicenseGetResult class

## [3.186.0] - 2025.04.15

### Added
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"type": "git",
"url": "https://github.com/ArrowSphere/nodejs-api-client.git"
},
"version": "3.186.0",
"version": "3.187.0",
"description": "Node.js client for ArrowSphere's public API",
"main": "build/index.js",
"types": "build/index.d.ts",
Expand Down
1 change: 1 addition & 0 deletions src/licenses/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,7 @@ A license is managed by the `LicenseGet` entity.
| associatedSubscriptionProgram | ```string``` | MSCSP | Program associated to the license in ArrowSphere format |
| price | ```LicensePriceGetData``` | [LicensePriceGetResult](#LicensePriceGetResult) | |
| arrowSubCategories | ```array``` | ['nce'] | Arrow sub categories |
| endDate | ```string``` | 2025-10-28T00:00:00+00:00 | end date of the license |

### ActiveSeatsGetResult

Expand Down
12 changes: 11 additions & 1 deletion src/licenses/entities/getLicense/licenseGetResult.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ export enum LicenseGetFields {
COLUMN_MARKET_SEGMENT = 'marketSegment',
COLUMN_CONFIGS = 'configs',
COLUMN_WARNINGS = 'warnings',
COLUMN_END_DATE = 'end_date',
}

export type LicenseGetData = {
Expand Down Expand Up @@ -136,6 +137,7 @@ export type LicenseGetData = {
[LicenseGetFields.COLUMN_MARKET_SEGMENT]?: string | null;
[LicenseGetFields.COLUMN_CONFIGS]?: Array<ConfigFindResultData> | null;
[LicenseGetFields.COLUMN_WARNINGS]?: Array<WarningFindResultData> | null;
[LicenseGetFields.COLUMN_END_DATE]: string;
};

export class LicenseGetResult extends AbstractEntity<LicenseGetData> {
Expand Down Expand Up @@ -189,6 +191,7 @@ export class LicenseGetResult extends AbstractEntity<LicenseGetData> {
readonly #marketSegment?: string | null;
readonly #configs?: Array<ConfigFindResult> | null;
readonly #warnings?: Array<WarningFindResult> | null;
readonly #endDate: string;

public constructor(licenseGetDataInput: LicenseGetData) {
super(licenseGetDataInput);
Expand Down Expand Up @@ -318,6 +321,8 @@ export class LicenseGetResult extends AbstractEntity<LicenseGetData> {
(warningData: WarningFindResultData): WarningFindResult =>
new WarningFindResult(warningData),
);

this.#endDate = licenseGetDataInput[LicenseGetFields.COLUMN_END_DATE] ?? '';
}

public get classification(): string {
Expand Down Expand Up @@ -523,6 +528,10 @@ export class LicenseGetResult extends AbstractEntity<LicenseGetData> {
return this.#warnings;
}

public get endDate(): string {
return this.#endDate;
}

public toJSON(): LicenseGetData {
return {
[LicenseGetFields.COLUMN_ADDITIONAL_INFORMATION]: this
Expand All @@ -545,7 +554,7 @@ export class LicenseGetResult extends AbstractEntity<LicenseGetData> {
[LicenseGetFields.COLUMN_ACTIVATION_DATETIME]: this.activationDatetime,
[LicenseGetFields.COLUMN_EXPIRY_DATETIME]: this.expiryDatetime,
[LicenseGetFields.COLUMN_AUTO_RENEW]: this.autoRenew,
[LicenseGetFields.COLUMN_MARKETPLACE]: this.#marketplace,
[LicenseGetFields.COLUMN_MARKETPLACE]: this.marketplace,
[LicenseGetFields.COLUMN_MESSAGE]: this.message,
[LicenseGetFields.COLUMN_ACTIONS]: this.actions?.toJSON(),
[LicenseGetFields.COLUMN_ACTION_MESSAGES]: this.actionMessages?.map(
Expand Down Expand Up @@ -587,6 +596,7 @@ export class LicenseGetResult extends AbstractEntity<LicenseGetData> {
[LicenseGetFields.COLUMN_WARNINGS]: this.warnings?.map(
(warning: WarningFindResult) => warning.toJSON(),
),
[LicenseGetFields.COLUMN_END_DATE]: this.endDate,
};
}
}
2 changes: 2 additions & 0 deletions tests/licenses/licenses.mocks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ export const PAYLOAD_SCHEMA_LICENSE: GetData<GetLicenseResultData> = {
data: {
license: {
[LicenseGetFields.COLUMN_CLASSIFICATION]: 'SaaS',
[LicenseGetFields.COLUMN_END_DATE]: '2025-04-22',
[LicenseGetFields.COLUMN_LICENSE_ID]: '123456',
[LicenseGetFields.COLUMN_PARENT_LICENSE_ID]: 'parent_license_id',
[LicenseGetFields.COLUMN_FRIENDLY_NAME]: 'friendly_name',
Expand Down Expand Up @@ -190,6 +191,7 @@ export const PAYLOAD_SCHEMA_LICENSE_WITHOUT_OPTIONAL_FIELDS: GetData<GetLicenseR
data: {
license: {
[LicenseGetFields.COLUMN_CLASSIFICATION]: 'SaaS',
[LicenseGetFields.COLUMN_END_DATE]: '2025-04-22',
[LicenseGetFields.COLUMN_LICENSE_ID]: '123456',
[LicenseGetFields.COLUMN_PARENT_LICENSE_ID]: 'parent_license_id',
[LicenseGetFields.COLUMN_FRIENDLY_NAME]: 'friendly_name',
Expand Down
Loading