Skip to content

Commit

Permalink
Updates
Browse files Browse the repository at this point in the history
  • Loading branch information
MrRefactoring committed May 7, 2023
1 parent 3c76cf3 commit ee21d55
Show file tree
Hide file tree
Showing 14 changed files with 75 additions and 89 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
# Jira.js changelog

### UNRELEASED

- Version 2, Version 3:
- `jqlFunctionsApps` API added.

### 2.18.0

- Agile
- `Fields` model added for `Issue` Model.
- Version 3:
- Support simple string body (comment) was added to `addComment` method of `issueComments` API.
- Support simple string body (comment) was added to `addComment` method of `issueComments` API. Thanks to [Michael "Mike" Ferris](https://github.com/Cellule) for releasing feature.
- Version 2, Version 3:
- `putAddonProperty` method fixed. Now you can provide property for set.

Expand Down
12 changes: 7 additions & 5 deletions src/version2/appProperties.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export class AppProperties {
* from](https://developer.atlassian.com/platform/forge/build-a-connect-on-forge-app/).
*/
async getAddonProperties<T = Models.PropertyKeys>(
parameters: Parameters.GetAddonProperties,
parameters: Parameters.GetAddonProperties | string,
callback: Callback<T>,
): Promise<void>;
/**
Expand All @@ -28,15 +28,17 @@ export class AppProperties {
* from](https://developer.atlassian.com/platform/forge/build-a-connect-on-forge-app/).
*/
async getAddonProperties<T = Models.PropertyKeys>(
parameters: Parameters.GetAddonProperties,
parameters: Parameters.GetAddonProperties | string,
callback?: never,
): Promise<T>;
async getAddonProperties<T = Models.PropertyKeys>(
parameters: Parameters.GetAddonProperties,
parameters: Parameters.GetAddonProperties | string,
callback?: Callback<T>,
): Promise<void | T> {
const addonKey = typeof parameters === 'string' ? parameters : parameters.addonKey;

const config: RequestConfig = {
url: `/rest/atlassian-connect/1/addons/${parameters.addonKey}/properties`,
url: `/rest/atlassian-connect/1/addons/${addonKey}/properties`,
method: 'GET',
};

Expand Down Expand Up @@ -112,7 +114,7 @@ export class AppProperties {
const config: RequestConfig = {
url: `/rest/atlassian-connect/1/addons/${parameters.addonKey}/properties/${parameters.propertyKey}`,
method: 'PUT',
data: parameters.propertyValue,
data: parameters.propertyValue ?? parameters.property,
};

return this.client.sendRequest(config, callback);
Expand Down
2 changes: 1 addition & 1 deletion src/version2/models/addSecuritySchemeLevelsRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ import { SecuritySchemeLevel } from './securitySchemeLevel';

export interface AddSecuritySchemeLevelsRequest {
/** The list of scheme levels which should be added to the security scheme. */
levels?: SecuritySchemeLevel[];
levels: SecuritySchemeLevel[];
}
24 changes: 12 additions & 12 deletions src/version2/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ export * from './actorsMap';
export * from './addField';
export * from './addGroup';
export * from './addNotificationsDetails';
export * from './addSecuritySchemeLevelsRequest';
export * from './announcementBannerConfiguration';
export * from './announcementBannerConfigurationUpdate';
export * from './application';
Expand All @@ -20,18 +21,6 @@ export * from './attachmentMetadata';
export * from './attachmentSettings';
export * from './auditRecord';
export * from './auditRecords';
export * from './securitySchemeLevelMember';
export * from './securitySchemeMembersRequest';
export * from './updateIssueSecurityLevelDetails';
export * from './addSecuritySchemeLevelsRequest';
export * from './updateIssueSecuritySchemeRequest';
export * from './pageSecuritySchemeWithProjects';
export * from './pageIssueSecuritySchemeToProjectMapping';
export * from './pageSecurityLevelMember';
export * from './setDefaultLevelsRequest';
export * from './pageSecurityLevel';
export * from './securitySchemeId';
export * from './createIssueSecuritySchemeDetails';
export * from './autoCompleteSuggestion';
export * from './autoCompleteSuggestions';
export * from './availableDashboardGadget';
Expand Down Expand Up @@ -78,6 +67,7 @@ export * from './createCustomFieldContext';
export * from './createdIssue';
export * from './createdIssues';
export * from './createIssueAdjustmentDetails';
export * from './createIssueSecuritySchemeDetails';
export * from './createNotificationSchemeDetails';
export * from './createPriorityDetails';
export * from './createProjectDetails';
Expand Down Expand Up @@ -326,6 +316,7 @@ export * from './pageGroupDetails';
export * from './pageIssueAdjustmentDetails';
export * from './pageIssueFieldOption';
export * from './pageIssueSecurityLevelMember';
export * from './pageIssueSecuritySchemeToProjectMapping';
export * from './pageIssueTypeScheme';
export * from './pageIssueTypeSchemeMapping';
export * from './pageIssueTypeSchemeProjects';
Expand All @@ -347,6 +338,9 @@ export * from './pageResolution';
export * from './pageScreen';
export * from './pageScreenScheme';
export * from './pageScreenWithTab';
export * from './pageSecurityLevel';
export * from './pageSecurityLevelMember';
export * from './pageSecuritySchemeWithProjects';
export * from './pageString';
export * from './pageUiModificationDetails';
export * from './pageUser';
Expand Down Expand Up @@ -438,8 +432,12 @@ export * from './searchRequest';
export * from './searchResults';
export * from './securityLevel';
export * from './securityScheme';
export * from './securitySchemeId';
export * from './securitySchemeLevelMember';
export * from './securitySchemeMembersRequest';
export * from './securitySchemes';
export * from './serverInformation';
export * from './setDefaultLevelsRequest';
export * from './setDefaultPriorityRequest';
export * from './setDefaultResolutionRequest';
export * from './sharePermission';
Expand Down Expand Up @@ -480,6 +478,8 @@ export * from './updateDefaultScreenScheme';
export * from './updatedProjectCategory';
export * from './updateFieldConfigurationSchemeDetails';
export * from './updateIssueAdjustmentDetails';
export * from './updateIssueSecurityLevelDetails';
export * from './updateIssueSecuritySchemeRequest';
export * from './updateNotificationSchemeDetails';
export * from './updatePriorityDetails';
export * from './updateProjectDetails';
Expand Down
4 changes: 2 additions & 2 deletions src/version2/models/issueSecuritySchemeToProjectMapping.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/** Details about a project using security scheme mapping. */
export interface IssueSecuritySchemeToProjectMapping {
issueSecuritySchemeId?: string;
projectId?: string;
issueSecuritySchemeId: string;
projectId: string;
}
12 changes: 6 additions & 6 deletions src/version2/models/pageIssueSecuritySchemeToProjectMapping.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@ import { IssueSecuritySchemeToProjectMapping } from './issueSecuritySchemeToProj
/** A page of items. */
export interface PageIssueSecuritySchemeToProjectMapping {
/** Whether this is the last page. */
isLast?: boolean;
isLast: boolean;
/** The maximum number of items that could be returned. */
maxResults?: number;
maxResults: number;
/** If there is another page of results, the URL of the next page. */
nextPage?: string;
/** The URL of the page. */
self?: string;
self: string;
/** The index of the first item returned. */
startAt?: number;
startAt: number;
/** The number of items returned. */
total?: number;
total: number;
/** The list of items. */
values?: IssueSecuritySchemeToProjectMapping[];
values: IssueSecuritySchemeToProjectMapping[];
}
12 changes: 6 additions & 6 deletions src/version2/models/pageSecurityLevel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@ import { SecurityLevel } from './securityLevel';
/** A page of items. */
export interface PageSecurityLevel {
/** Whether this is the last page. */
isLast?: boolean;
isLast: boolean;
/** The maximum number of items that could be returned. */
maxResults?: number;
maxResults: number;
/** If there is another page of results, the URL of the next page. */
nextPage?: string;
/** The URL of the page. */
self?: string;
self: string;
/** The index of the first item returned. */
startAt?: number;
startAt: number;
/** The number of items returned. */
total?: number;
total: number;
/** The list of items. */
values?: SecurityLevel[];
values: SecurityLevel[];
}
12 changes: 6 additions & 6 deletions src/version2/models/pageSecurityLevelMember.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@ import { SecurityLevelMember } from './securityLevelMember';
/** A page of items. */
export interface PageSecurityLevelMember {
/** Whether this is the last page. */
isLast?: boolean;
isLast: boolean;
/** The maximum number of items that could be returned. */
maxResults?: number;
maxResults: number;
/** If there is another page of results, the URL of the next page. */
nextPage?: string;
/** The URL of the page. */
self?: string;
self: string;
/** The index of the first item returned. */
startAt?: number;
startAt: number;
/** The number of items returned. */
total?: number;
total: number;
/** The list of items. */
values?: SecurityLevelMember[];
values: SecurityLevelMember[];
}
12 changes: 6 additions & 6 deletions src/version2/models/pageSecuritySchemeWithProjects.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@ import { SecuritySchemeWithProjects } from './securitySchemeWithProjects';
/** A page of items. */
export interface PageSecuritySchemeWithProjects {
/** Whether this is the last page. */
isLast?: boolean;
isLast: boolean;
/** The maximum number of items that could be returned. */
maxResults?: number;
maxResults: number;
/** If there is another page of results, the URL of the next page. */
nextPage?: string;
/** The URL of the page. */
self?: string;
self: string;
/** The index of the first item returned. */
startAt?: number;
startAt: number;
/** The number of items returned. */
total?: number;
total: number;
/** The list of items. */
values?: SecuritySchemeWithProjects[];
values: SecuritySchemeWithProjects[];
}
8 changes: 4 additions & 4 deletions src/version2/models/securityLevel.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/** Details of an issue level security item. */
export interface SecurityLevel {
/** The URL of the issue level security item. */
self?: string;
self: string;
/** The ID of the issue level security item. */
id?: string;
id: string;
/** The description of the issue level security item. */
description?: string;
description: string;
/** The name of the issue level security item. */
name?: string;
name: string;
}
2 changes: 1 addition & 1 deletion src/version2/models/securitySchemeMembersRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ import { SecuritySchemeLevelMember } from './securitySchemeLevelMember';
/** Details of issue security scheme level new members. */
export interface SecuritySchemeMembersRequest {
/** The list of level members which should be added to the issue security scheme level. */
members?: SecuritySchemeLevelMember[];
members: SecuritySchemeLevelMember[];
}
30 changes: 15 additions & 15 deletions src/version2/parameters/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,9 @@ export * from './addNotifications';
export * from './addProjectRoleActorsToRole';
export * from './addScreenTab';
export * from './addScreenTabField';
export * from './addSharePermission';
export * from './removeMemberFromSecurityLevel';
export * from './addSecurityLevelMembers';
export * from './removeLevel';
export * from './updateSecurityLevel';
export * from './addSecurityLevel';
export * from './deleteSecurityScheme';
export * from './updateIssueSecurityScheme';
export * from './searchSecuritySchemes';
export * from './searchProjectsUsingSecuritySchemes';
export * from './getSecurityLevelMembers';
export * from './setDefaultLevels';
export * from './getSecurityLevels';
export * from './createIssueSecurityScheme';
export * from './deleteAppProperty';
export * from './putAppProperty';
export * from './addSecurityLevelMembers';
export * from './addSharePermission';
export * from './addUserToGroup';
export * from './addVote';
export * from './addWatcher';
Expand Down Expand Up @@ -65,6 +52,7 @@ export * from './createIssueAdjustment';
export * from './createIssueFieldOption';
export * from './createIssueLinkType';
export * from './createIssues';
export * from './createIssueSecurityScheme';
export * from './createIssueType';
export * from './createIssueTypeAvatar';
export * from './createIssueTypeScheme';
Expand Down Expand Up @@ -92,6 +80,7 @@ export * from './createWorkflowTransitionProperty';
export * from './deleteActor';
export * from './deleteAddonProperty';
export * from './deleteAndReplaceVersion';
export * from './deleteAppProperty';
export * from './deleteAvatar';
export * from './deleteComment';
export * from './deleteCommentProperty';
Expand Down Expand Up @@ -135,6 +124,7 @@ export * from './deleteResolution';
export * from './deleteScreen';
export * from './deleteScreenScheme';
export * from './deleteScreenTab';
export * from './deleteSecurityScheme';
export * from './deleteSharePermission';
export * from './deleteStatusesById';
export * from './deleteUiModification';
Expand Down Expand Up @@ -308,6 +298,8 @@ export * from './getResolution';
export * from './getScreens';
export * from './getScreenSchemes';
export * from './getScreensForField';
export * from './getSecurityLevelMembers';
export * from './getSecurityLevels';
export * from './getSecurityLevelsForProject';
export * from './getSelectableIssueFieldOptions';
export * from './getSharePermission';
Expand Down Expand Up @@ -362,6 +354,7 @@ export * from './parseJqlQueries';
export * from './partialUpdateProjectRole';
export * from './publishDraftWorkflowScheme';
export * from './putAddonProperty';
export * from './putAppProperty';
export * from './refreshWebhooks';
export * from './registerDynamicWebhooks';
export * from './registerModules';
Expand All @@ -372,7 +365,9 @@ export * from './removeGroup';
export * from './removeIssueTypeFromIssueTypeScheme';
export * from './removeIssueTypesFromContext';
export * from './removeIssueTypesFromGlobalFieldConfigurationScheme';
export * from './removeLevel';
export * from './removeMappingsFromIssueTypeScreenScheme';
export * from './removeMemberFromSecurityLevel';
export * from './removeModules';
export * from './removeNotificationFromNotificationScheme';
export * from './removePreference';
Expand All @@ -396,14 +391,17 @@ export * from './searchForIssuesUsingJql';
export * from './searchForIssuesUsingJqlPost';
export * from './searchPriorities';
export * from './searchProjects';
export * from './searchProjectsUsingSecuritySchemes';
export * from './searchResolutions';
export * from './searchSecuritySchemes';
export * from './selectTimeTrackingImplementation';
export * from './setActors';
export * from './setApplicationProperty';
export * from './setBanner';
export * from './setColumns';
export * from './setCommentProperty';
export * from './setDashboardItemProperty';
export * from './setDefaultLevels';
export * from './setDefaultPriority';
export * from './setDefaultResolution';
export * from './setDefaultShareScope';
Expand Down Expand Up @@ -448,6 +446,7 @@ export * from './updateIssueAdjustment';
export * from './updateIssueFieldOption';
export * from './updateIssueFields';
export * from './updateIssueLinkType';
export * from './updateIssueSecurityScheme';
export * from './updateIssueType';
export * from './updateIssueTypeScheme';
export * from './updateIssueTypeScreenScheme';
Expand All @@ -465,6 +464,7 @@ export * from './updateRemoteIssueLink';
export * from './updateResolution';
export * from './updateScreen';
export * from './updateScreenScheme';
export * from './updateSecurityLevel';
export * from './updateStatuses';
export * from './updateUiModification';
export * from './updateVersion';
Expand Down
3 changes: 3 additions & 0 deletions src/version2/parameters/putAddonProperty.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,7 @@ export interface PutAddonProperty {
/** The key of the property. */
propertyKey: string;
propertyValue: any;

/** @deprecated */
property: any;
}
Loading

0 comments on commit ee21d55

Please sign in to comment.