@resolution/confluence-api-client 0.4.5 → 0.5.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 +22 -0
- package/README.md +64 -3
- package/lib/openapi/v1/BaseConfluenceApiV1Client.d.ts +32 -33
- package/lib/openapi/v1/BaseConfluenceApiV1Client.js +151 -88
- package/lib/openapi/v1/BaseConfluenceApiV1Client.js.map +1 -1
- package/lib/openapi/v1/core/CommonHttpService.d.ts +2 -0
- package/lib/openapi/v1/core/CommonHttpService.js +9 -0
- package/lib/openapi/v1/core/CommonHttpService.js.map +1 -1
- package/lib/openapi/v2/BaseConfluenceApiV2Client.d.ts +23 -24
- package/lib/openapi/v2/BaseConfluenceApiV2Client.js +92 -47
- package/lib/openapi/v2/BaseConfluenceApiV2Client.js.map +1 -1
- package/lib/openapi/v2/core/CommonHttpService.d.ts +2 -0
- package/lib/openapi/v2/core/CommonHttpService.js +9 -0
- package/lib/openapi/v2/core/CommonHttpService.js.map +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,28 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [0.5.0](https://bitbucket.org/resolutiongmbh/atlassian-api-clients/compare/v0.4.6...v0.5.0) (2024-06-20)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* first version of Jira Service Management API ([67634ea](https://bitbucket.org/resolutiongmbh/atlassian-api-clients/commits/67634ea9bfe37adf30a7d2b124b59f52c4f1ccda))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## [0.4.6](https://bitbucket.org/resolutiongmbh/atlassian-api-clients/compare/v0.4.5...v0.4.6) (2024-06-14)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Bug Fixes
|
|
21
|
+
|
|
22
|
+
* use more optimized / lightweight api client version ([8c628d3](https://bitbucket.org/resolutiongmbh/atlassian-api-clients/commits/8c628d3c80ca6c89572eb003ae6f7cb5c634b4d5))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
6
28
|
## [0.4.5](https://bitbucket.org/resolutiongmbh/atlassian-api-clients/compare/v0.4.4...v0.4.5) (2024-06-14)
|
|
7
29
|
|
|
8
30
|
|
package/README.md
CHANGED
|
@@ -11,16 +11,18 @@ Compatible with the following request/fetch Atlassian libraries:
|
|
|
11
11
|
|
|
12
12
|
## Installation
|
|
13
13
|
|
|
14
|
+
Note that this package requires `zod` as a peer dependency.
|
|
15
|
+
|
|
14
16
|
Install using npm
|
|
15
17
|
|
|
16
18
|
```bash
|
|
17
|
-
npm add @resolution/confluence-api-client
|
|
19
|
+
npm add @resolution/confluence-api-client zod
|
|
18
20
|
```
|
|
19
21
|
|
|
20
22
|
Or using yarn
|
|
21
23
|
|
|
22
24
|
```bash
|
|
23
|
-
yarn add @resolution/confluence-api-client
|
|
25
|
+
yarn add @resolution/confluence-api-client zod
|
|
24
26
|
```
|
|
25
27
|
|
|
26
28
|
## Usage
|
|
@@ -57,7 +59,11 @@ const ace = atlassianConnectExpress(app);
|
|
|
57
59
|
app.use(ace.authenticate());
|
|
58
60
|
|
|
59
61
|
app.get('/current-user', async () => {
|
|
60
|
-
const confluenceApiV1 = new ConfluenceApiV1({
|
|
62
|
+
const confluenceApiV1 = new ConfluenceApiV1({
|
|
63
|
+
ace,
|
|
64
|
+
clientKey: req.context.clientKey,
|
|
65
|
+
userAccountId: req.context.userAccountId
|
|
66
|
+
});
|
|
61
67
|
const currentUser = await confluenceApiV1.users.getCurrentUser();
|
|
62
68
|
res.status(200).send(currentUser);
|
|
63
69
|
});
|
|
@@ -128,6 +134,61 @@ export const handler = async ({ payload }) => {
|
|
|
128
134
|
}
|
|
129
135
|
```
|
|
130
136
|
|
|
137
|
+
### Impersonalization
|
|
138
|
+
|
|
139
|
+
When using API on the server side, you can impersonalize the API client.
|
|
140
|
+
This is useful when you need to access API resources on behalf of a different user or app.
|
|
141
|
+
|
|
142
|
+
### `atlassian-connect-express`
|
|
143
|
+
|
|
144
|
+
By default, `atlassian-connect-express` makes requests on behalf of the app.
|
|
145
|
+
To impersonalize the API client, you need to provide the `userAccountId` to the API client:
|
|
146
|
+
|
|
147
|
+
```typescript
|
|
148
|
+
// ...
|
|
149
|
+
app.get('/current-user', async () => {
|
|
150
|
+
const confluenceApiV1 = new ConfluenceApiV1({
|
|
151
|
+
ace,
|
|
152
|
+
clientKey: req.context.clientKey,
|
|
153
|
+
userAccountId: req.context.userAccountId
|
|
154
|
+
});
|
|
155
|
+
const currentUser = await confluenceApiV1.users.getCurrentUser();
|
|
156
|
+
res.status(200).send(currentUser);
|
|
157
|
+
});
|
|
158
|
+
// ...
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
This can also be achieved by calling `asUser` method on the API client:
|
|
162
|
+
|
|
163
|
+
```typescript
|
|
164
|
+
const confluenceApiV1 = new ConfluenceApiV1({
|
|
165
|
+
ace,
|
|
166
|
+
clientKey: req.context.clientKey
|
|
167
|
+
});
|
|
168
|
+
const currentUser = await confluenceApiV1.asUser(req.context.userAccountId).users.getCurrentUser();
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
### `@forge/api`
|
|
172
|
+
|
|
173
|
+
By default, `@forge/api` makes requests on behalf of the current user.
|
|
174
|
+
To perform requests on behalf of the app, you need to provide the `asApp` to the API client:
|
|
175
|
+
|
|
176
|
+
```typescript
|
|
177
|
+
// ...
|
|
178
|
+
export const handler = async ({ payload }) => {
|
|
179
|
+
const confluenceApiV2 = new ConfluenceApiV2({ forgeApi, asApp: true });
|
|
180
|
+
const spaces = await confluenceApiV2.space.getSpaces({ keys: [payload.spaceKey] });
|
|
181
|
+
return spaces.results[0];
|
|
182
|
+
};
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
This can also be achieved by calling `asApp` method on the API client:
|
|
186
|
+
|
|
187
|
+
```typescript
|
|
188
|
+
const confluenceApiV2 = new ConfluenceApiV2({ forgeApi });
|
|
189
|
+
const spaces = await confluenceApiV2.asApp().space.getSpaces({ keys: ["SPACE"] });
|
|
190
|
+
```
|
|
191
|
+
|
|
131
192
|
## References
|
|
132
193
|
|
|
133
194
|
* [Confluence API V1](https://developer.atlassian.com/cloud/confluence/rest/v1/intro/)
|
|
@@ -85,49 +85,49 @@ export declare class BaseConfluenceApiV1Client extends CommonHttpService {
|
|
|
85
85
|
client: commonHttpClient.CommonHttpClient;
|
|
86
86
|
getClient: () => commonHttpClient.CommonHttpClient;
|
|
87
87
|
/** @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-analytics */
|
|
88
|
-
analytics: AnalyticsService;
|
|
88
|
+
get analytics(): AnalyticsService;
|
|
89
89
|
/** @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-audit */
|
|
90
|
-
audit: AuditService;
|
|
90
|
+
get audit(): AuditService;
|
|
91
91
|
/** @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content-attachments */
|
|
92
|
-
contentAttachments: ContentAttachmentsService;
|
|
92
|
+
get contentAttachments(): ContentAttachmentsService;
|
|
93
93
|
/** @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content-body */
|
|
94
|
-
contentBody: ContentBodyService;
|
|
94
|
+
get contentBody(): ContentBodyService;
|
|
95
95
|
/** @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content-children-and-descendants */
|
|
96
|
-
contentChildrenAndDescendants: ContentChildrenAndDescendantsService;
|
|
96
|
+
get contentChildrenAndDescendants(): ContentChildrenAndDescendantsService;
|
|
97
97
|
/**
|
|
98
98
|
* @deprecated
|
|
99
99
|
* @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content-comments
|
|
100
100
|
*/
|
|
101
|
-
contentComments: ContentCommentsService;
|
|
101
|
+
get contentComments(): ContentCommentsService;
|
|
102
102
|
/** @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content-labels */
|
|
103
|
-
contentLabels: ContentLabelsService;
|
|
103
|
+
get contentLabels(): ContentLabelsService;
|
|
104
104
|
/** @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content-macro-body */
|
|
105
|
-
contentMacroBody: ContentMacroBodyService;
|
|
105
|
+
get contentMacroBody(): ContentMacroBodyService;
|
|
106
106
|
/** @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content-permissions */
|
|
107
|
-
contentPermissions: ContentPermissionsService;
|
|
107
|
+
get contentPermissions(): ContentPermissionsService;
|
|
108
108
|
/**
|
|
109
109
|
* @deprecated
|
|
110
110
|
* @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content-properties
|
|
111
111
|
*/
|
|
112
|
-
contentProperties: ContentPropertiesService;
|
|
112
|
+
get contentProperties(): ContentPropertiesService;
|
|
113
113
|
/** @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content-restrictions */
|
|
114
|
-
contentRestrictions: ContentRestrictionsService;
|
|
114
|
+
get contentRestrictions(): ContentRestrictionsService;
|
|
115
115
|
/** @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content */
|
|
116
|
-
content: ContentService;
|
|
116
|
+
get content(): ContentService;
|
|
117
117
|
/** @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content-states */
|
|
118
|
-
contentStates: ContentStatesService;
|
|
118
|
+
get contentStates(): ContentStatesService;
|
|
119
119
|
/** @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content-versions */
|
|
120
|
-
contentVersions: ContentVersionsService;
|
|
120
|
+
get contentVersions(): ContentVersionsService;
|
|
121
121
|
/** @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content-watches */
|
|
122
|
-
contentWatches: ContentWatchesService;
|
|
122
|
+
get contentWatches(): ContentWatchesService;
|
|
123
123
|
/** @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-dynamic-modules */
|
|
124
|
-
dynamicModules: DynamicModulesService;
|
|
124
|
+
get dynamicModules(): DynamicModulesService;
|
|
125
125
|
/**
|
|
126
126
|
* APIs in this section can change without any prior deprecation notice.
|
|
127
127
|
*
|
|
128
128
|
* @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-experimental
|
|
129
129
|
*/
|
|
130
|
-
experimental: ExperimentalService;
|
|
130
|
+
get experimental(): ExperimentalService;
|
|
131
131
|
/**
|
|
132
132
|
* **[WARNING](https://support.atlassian.com/user-management/docs/create-and-update-groups/)
|
|
133
133
|
* The standard Atlassian group names are default names only and can be edited or
|
|
@@ -136,42 +136,41 @@ export declare class BaseConfluenceApiV1Client extends CommonHttpService {
|
|
|
136
136
|
*
|
|
137
137
|
* @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-group
|
|
138
138
|
*/
|
|
139
|
-
group: GroupService;
|
|
139
|
+
get group(): GroupService;
|
|
140
140
|
/**
|
|
141
141
|
* @deprecated
|
|
142
142
|
* @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-inline-tasks
|
|
143
143
|
*/
|
|
144
|
-
inlineTasks: InlineTasksService;
|
|
144
|
+
get inlineTasks(): InlineTasksService;
|
|
145
145
|
/** @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-label-info */
|
|
146
|
-
labelInfo: LabelInfoService;
|
|
146
|
+
get labelInfo(): LabelInfoService;
|
|
147
147
|
/** @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-long-running-task */
|
|
148
|
-
longRunningTask: LongRunningTaskService;
|
|
148
|
+
get longRunningTask(): LongRunningTaskService;
|
|
149
149
|
/** @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-relation */
|
|
150
|
-
relation: RelationService;
|
|
150
|
+
get relation(): RelationService;
|
|
151
151
|
/** @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-search */
|
|
152
|
-
search: SearchService;
|
|
152
|
+
get search(): SearchService;
|
|
153
153
|
/** @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-settings */
|
|
154
|
-
settings: SettingsService;
|
|
154
|
+
get settings(): SettingsService;
|
|
155
155
|
/** @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-space-permissions */
|
|
156
|
-
spacePermissions: SpacePermissionsService;
|
|
156
|
+
get spacePermissions(): SpacePermissionsService;
|
|
157
157
|
/**
|
|
158
158
|
* @deprecated
|
|
159
159
|
* @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-space-properties
|
|
160
160
|
*/
|
|
161
|
-
spaceProperties: SpacePropertiesService;
|
|
161
|
+
get spaceProperties(): SpacePropertiesService;
|
|
162
162
|
/** @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-space */
|
|
163
|
-
space: SpaceService;
|
|
163
|
+
get space(): SpaceService;
|
|
164
164
|
/** @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-space-settings */
|
|
165
|
-
spaceSettings: SpaceSettingsService;
|
|
165
|
+
get spaceSettings(): SpaceSettingsService;
|
|
166
166
|
/** @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-template */
|
|
167
|
-
template: TemplateService;
|
|
167
|
+
get template(): TemplateService;
|
|
168
168
|
/** @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-themes */
|
|
169
|
-
themes: ThemesService;
|
|
169
|
+
get themes(): ThemesService;
|
|
170
170
|
/** @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-user-properties */
|
|
171
|
-
userProperties: UserPropertiesService;
|
|
171
|
+
get userProperties(): UserPropertiesService;
|
|
172
172
|
/** @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-users */
|
|
173
|
-
users: UsersService;
|
|
173
|
+
get users(): UsersService;
|
|
174
174
|
constructor(options?: BaseConfluenceApiV1ClientOptions);
|
|
175
|
-
static createClientWithServices: typeof commonHttpClient.createClientWithServices;
|
|
176
175
|
}
|
|
177
176
|
export type { AccountId, GroupName, AccountIdEmailRecord, AccountIdEmailRecordArray, BulkUserLookup, BulkUserLookupArray, UserAnonymous, AffectedObject, AuditRecord, AuditRecordArray, AuditRecordCreate, ChangedValue, RetentionPeriod, AsyncContentBody, AsyncId, Container, Content, ContentArray, ContentBody, ContentBodyCreate, ContentChildren, ContentId, ContentRestriction, EmbeddedContent, GenericAccountId, GenericLinks, GenericUserKey, GenericUserName, Group, GroupArrayWithLinks, IconV1, LabelArray, LabelCreate, LabelV1, LongTask, LookAndFeel, Message, OperationCheckResult, Space, SpaceSettings, Theme, UserArray, UserDetails, UserV1, VersionV1, WebResourceDependencies, AttachmentPropertiesUpdateBody, AvailableContentStates, ContentState, ContentStateBulkSetTaskUpdate, ContentStateFailure, ContentStateResponse, ContentStateRestInput, ContentStateSettings, BlueprintTemplate, BlueprintTemplateArray, ContentTemplate, ContentTemplateArray, ContentTemplateBody, ContentTemplateBodyCreate, ContentTemplateCreate, ContentTemplateUpdate, Breadcrumb, ContainerSummary, SearchPageResponseSearchResult, SearchResult, ButtonLookAndFeel, ContainerLookAndFeel, ContentBlueprintDraft, ContentBodyCreateStorage, ContentChildType, ContentCreate, ContentHistory, ContentLookAndFeel, ContentMetadata, ContentUpdate, Embeddable, GlobalSpaceIdentifier, GroupArray, HeaderLookAndFeel, HorizontalHeaderLookAndFeel, MenusLookAndFeel, NavigationLookAndFeel, ScreenLookAndFeel, SearchFieldLookAndFeel, SpaceDescriptionV1, SpacePermissionV1, SuperBatchWebResources, TopNavigationLookAndFeel, UsersUserKeys, ConnectModule, ConnectModules, DynamicModulesErrorMessage, ContentPermissionRequest, PermissionCheckResponse, PermissionSubjectWithGroupId, ContentPropertyArray, ContentPropertyCreate, ContentPropertyCreateNoKey, ContentPropertyUpdate, ContentPropertyV1, ContentRestrictionAddOrUpdateArray, ContentRestrictionArray, ContentRestrictionUpdate, CopyPageHierarchyRequest, CopyPageHierarchyTitleOptions, CopyPageRequest, CopyPageRequestDestination, GroupCreate, SpaceArray, SpaceCreate, SpaceDescriptionCreate, SpacePermissionCreate, SpaceUpdate, LabelCreateArray, LabelDetails, LabeledContent, LabeledContentPageResponse, LabeledContentType, LongTaskStatus, LongTaskStatusArray, LongTaskStatusWithLinks, LookAndFeelSelection, LookAndFeelSettings, LookAndFeelWithLinks, SystemInfoEntity, MacroInstance, PermissionSubject, SpacePermissionCustomContent, SpacePermissionRequest, SpacePermissionV2, PropertyValue, SpacePropertyArray, SpacePropertyCreate, SpacePropertyCreateNoKey, SpacePropertyUpdate, SpacePropertyV1, Relation, RelationArray, RelationData, SpaceSettingsUpdate, SpaceWatch, SpaceWatchArray, UserWatch, Watch, WatchArray, WatchUser, TaskPageResponse, TaskStatusUpdate, TaskV1, ThemeArray, ThemeNoLinks, ThemeUpdate, UserProperty, UserPropertyCreate, UserPropertyKeyArray, UserPropertyUpdate, VersionArray, VersionRestore, };
|
|
@@ -62,6 +62,157 @@ exports.BaseConfluenceApiV1ClientError = BaseConfluenceApiV1ClientError;
|
|
|
62
62
|
* @version 1.0.0
|
|
63
63
|
*/
|
|
64
64
|
class BaseConfluenceApiV1Client extends CommonHttpService_1.CommonHttpService {
|
|
65
|
+
/** @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-analytics */
|
|
66
|
+
get analytics() {
|
|
67
|
+
return this.getServiceInstance(AnalyticsService_1.AnalyticsService);
|
|
68
|
+
}
|
|
69
|
+
/** @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-audit */
|
|
70
|
+
get audit() {
|
|
71
|
+
return this.getServiceInstance(AuditService_1.AuditService);
|
|
72
|
+
}
|
|
73
|
+
/** @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content-attachments */
|
|
74
|
+
get contentAttachments() {
|
|
75
|
+
return this.getServiceInstance(ContentAttachmentsService_1.ContentAttachmentsService);
|
|
76
|
+
}
|
|
77
|
+
/** @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content-body */
|
|
78
|
+
get contentBody() {
|
|
79
|
+
return this.getServiceInstance(ContentBodyService_1.ContentBodyService);
|
|
80
|
+
}
|
|
81
|
+
/** @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content-children-and-descendants */
|
|
82
|
+
get contentChildrenAndDescendants() {
|
|
83
|
+
return this.getServiceInstance(ContentChildrenAndDescendantsService_1.ContentChildrenAndDescendantsService);
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* @deprecated
|
|
87
|
+
* @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content-comments
|
|
88
|
+
*/
|
|
89
|
+
get contentComments() {
|
|
90
|
+
return this.getServiceInstance(ContentCommentsService_1.ContentCommentsService);
|
|
91
|
+
}
|
|
92
|
+
/** @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content-labels */
|
|
93
|
+
get contentLabels() {
|
|
94
|
+
return this.getServiceInstance(ContentLabelsService_1.ContentLabelsService);
|
|
95
|
+
}
|
|
96
|
+
/** @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content-macro-body */
|
|
97
|
+
get contentMacroBody() {
|
|
98
|
+
return this.getServiceInstance(ContentMacroBodyService_1.ContentMacroBodyService);
|
|
99
|
+
}
|
|
100
|
+
/** @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content-permissions */
|
|
101
|
+
get contentPermissions() {
|
|
102
|
+
return this.getServiceInstance(ContentPermissionsService_1.ContentPermissionsService);
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* @deprecated
|
|
106
|
+
* @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content-properties
|
|
107
|
+
*/
|
|
108
|
+
get contentProperties() {
|
|
109
|
+
return this.getServiceInstance(ContentPropertiesService_1.ContentPropertiesService);
|
|
110
|
+
}
|
|
111
|
+
/** @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content-restrictions */
|
|
112
|
+
get contentRestrictions() {
|
|
113
|
+
return this.getServiceInstance(ContentRestrictionsService_1.ContentRestrictionsService);
|
|
114
|
+
}
|
|
115
|
+
/** @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content */
|
|
116
|
+
get content() {
|
|
117
|
+
return this.getServiceInstance(ContentService_1.ContentService);
|
|
118
|
+
}
|
|
119
|
+
/** @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content-states */
|
|
120
|
+
get contentStates() {
|
|
121
|
+
return this.getServiceInstance(ContentStatesService_1.ContentStatesService);
|
|
122
|
+
}
|
|
123
|
+
/** @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content-versions */
|
|
124
|
+
get contentVersions() {
|
|
125
|
+
return this.getServiceInstance(ContentVersionsService_1.ContentVersionsService);
|
|
126
|
+
}
|
|
127
|
+
/** @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content-watches */
|
|
128
|
+
get contentWatches() {
|
|
129
|
+
return this.getServiceInstance(ContentWatchesService_1.ContentWatchesService);
|
|
130
|
+
}
|
|
131
|
+
/** @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-dynamic-modules */
|
|
132
|
+
get dynamicModules() {
|
|
133
|
+
return this.getServiceInstance(DynamicModulesService_1.DynamicModulesService);
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* APIs in this section can change without any prior deprecation notice.
|
|
137
|
+
*
|
|
138
|
+
* @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-experimental
|
|
139
|
+
*/
|
|
140
|
+
get experimental() {
|
|
141
|
+
return this.getServiceInstance(ExperimentalService_1.ExperimentalService);
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* **[WARNING](https://support.atlassian.com/user-management/docs/create-and-update-groups/)
|
|
145
|
+
* The standard Atlassian group names are default names only and can be edited or
|
|
146
|
+
* deleted.** For example, an admin or Atlassian support could delete the default
|
|
147
|
+
* group jira-software-users or rename it to jsw-users at any point.
|
|
148
|
+
*
|
|
149
|
+
* @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-group
|
|
150
|
+
*/
|
|
151
|
+
get group() {
|
|
152
|
+
return this.getServiceInstance(GroupService_1.GroupService);
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* @deprecated
|
|
156
|
+
* @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-inline-tasks
|
|
157
|
+
*/
|
|
158
|
+
get inlineTasks() {
|
|
159
|
+
return this.getServiceInstance(InlineTasksService_1.InlineTasksService);
|
|
160
|
+
}
|
|
161
|
+
/** @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-label-info */
|
|
162
|
+
get labelInfo() {
|
|
163
|
+
return this.getServiceInstance(LabelInfoService_1.LabelInfoService);
|
|
164
|
+
}
|
|
165
|
+
/** @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-long-running-task */
|
|
166
|
+
get longRunningTask() {
|
|
167
|
+
return this.getServiceInstance(LongRunningTaskService_1.LongRunningTaskService);
|
|
168
|
+
}
|
|
169
|
+
/** @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-relation */
|
|
170
|
+
get relation() {
|
|
171
|
+
return this.getServiceInstance(RelationService_1.RelationService);
|
|
172
|
+
}
|
|
173
|
+
/** @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-search */
|
|
174
|
+
get search() {
|
|
175
|
+
return this.getServiceInstance(SearchService_1.SearchService);
|
|
176
|
+
}
|
|
177
|
+
/** @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-settings */
|
|
178
|
+
get settings() {
|
|
179
|
+
return this.getServiceInstance(SettingsService_1.SettingsService);
|
|
180
|
+
}
|
|
181
|
+
/** @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-space-permissions */
|
|
182
|
+
get spacePermissions() {
|
|
183
|
+
return this.getServiceInstance(SpacePermissionsService_1.SpacePermissionsService);
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
* @deprecated
|
|
187
|
+
* @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-space-properties
|
|
188
|
+
*/
|
|
189
|
+
get spaceProperties() {
|
|
190
|
+
return this.getServiceInstance(SpacePropertiesService_1.SpacePropertiesService);
|
|
191
|
+
}
|
|
192
|
+
/** @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-space */
|
|
193
|
+
get space() {
|
|
194
|
+
return this.getServiceInstance(SpaceService_1.SpaceService);
|
|
195
|
+
}
|
|
196
|
+
/** @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-space-settings */
|
|
197
|
+
get spaceSettings() {
|
|
198
|
+
return this.getServiceInstance(SpaceSettingsService_1.SpaceSettingsService);
|
|
199
|
+
}
|
|
200
|
+
/** @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-template */
|
|
201
|
+
get template() {
|
|
202
|
+
return this.getServiceInstance(TemplateService_1.TemplateService);
|
|
203
|
+
}
|
|
204
|
+
/** @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-themes */
|
|
205
|
+
get themes() {
|
|
206
|
+
return this.getServiceInstance(ThemesService_1.ThemesService);
|
|
207
|
+
}
|
|
208
|
+
/** @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-user-properties */
|
|
209
|
+
get userProperties() {
|
|
210
|
+
return this.getServiceInstance(UserPropertiesService_1.UserPropertiesService);
|
|
211
|
+
}
|
|
212
|
+
/** @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-users */
|
|
213
|
+
get users() {
|
|
214
|
+
return this.getServiceInstance(UsersService_1.UsersService);
|
|
215
|
+
}
|
|
65
216
|
constructor(options) {
|
|
66
217
|
super(() => this.client);
|
|
67
218
|
this.client = new commonHttpClient.CommonHttpClient({
|
|
@@ -70,97 +221,9 @@ class BaseConfluenceApiV1Client extends CommonHttpService_1.CommonHttpService {
|
|
|
70
221
|
errorClass: BaseConfluenceApiV1ClientError,
|
|
71
222
|
});
|
|
72
223
|
this.getClient = () => this.client;
|
|
73
|
-
/** @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-analytics */
|
|
74
|
-
this.analytics = new AnalyticsService_1.AnalyticsService(this.getClient);
|
|
75
|
-
/** @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-audit */
|
|
76
|
-
this.audit = new AuditService_1.AuditService(this.getClient);
|
|
77
|
-
/** @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content-attachments */
|
|
78
|
-
this.contentAttachments = new ContentAttachmentsService_1.ContentAttachmentsService(this.getClient);
|
|
79
|
-
/** @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content-body */
|
|
80
|
-
this.contentBody = new ContentBodyService_1.ContentBodyService(this.getClient);
|
|
81
|
-
/** @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content-children-and-descendants */
|
|
82
|
-
this.contentChildrenAndDescendants = new ContentChildrenAndDescendantsService_1.ContentChildrenAndDescendantsService(this.getClient);
|
|
83
|
-
/**
|
|
84
|
-
* @deprecated
|
|
85
|
-
* @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content-comments
|
|
86
|
-
*/
|
|
87
|
-
this.contentComments = new ContentCommentsService_1.ContentCommentsService(this.getClient);
|
|
88
|
-
/** @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content-labels */
|
|
89
|
-
this.contentLabels = new ContentLabelsService_1.ContentLabelsService(this.getClient);
|
|
90
|
-
/** @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content-macro-body */
|
|
91
|
-
this.contentMacroBody = new ContentMacroBodyService_1.ContentMacroBodyService(this.getClient);
|
|
92
|
-
/** @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content-permissions */
|
|
93
|
-
this.contentPermissions = new ContentPermissionsService_1.ContentPermissionsService(this.getClient);
|
|
94
|
-
/**
|
|
95
|
-
* @deprecated
|
|
96
|
-
* @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content-properties
|
|
97
|
-
*/
|
|
98
|
-
this.contentProperties = new ContentPropertiesService_1.ContentPropertiesService(this.getClient);
|
|
99
|
-
/** @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content-restrictions */
|
|
100
|
-
this.contentRestrictions = new ContentRestrictionsService_1.ContentRestrictionsService(this.getClient);
|
|
101
|
-
/** @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content */
|
|
102
|
-
this.content = new ContentService_1.ContentService(this.getClient);
|
|
103
|
-
/** @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content-states */
|
|
104
|
-
this.contentStates = new ContentStatesService_1.ContentStatesService(this.getClient);
|
|
105
|
-
/** @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content-versions */
|
|
106
|
-
this.contentVersions = new ContentVersionsService_1.ContentVersionsService(this.getClient);
|
|
107
|
-
/** @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content-watches */
|
|
108
|
-
this.contentWatches = new ContentWatchesService_1.ContentWatchesService(this.getClient);
|
|
109
|
-
/** @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-dynamic-modules */
|
|
110
|
-
this.dynamicModules = new DynamicModulesService_1.DynamicModulesService(this.getClient);
|
|
111
|
-
/**
|
|
112
|
-
* APIs in this section can change without any prior deprecation notice.
|
|
113
|
-
*
|
|
114
|
-
* @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-experimental
|
|
115
|
-
*/
|
|
116
|
-
this.experimental = new ExperimentalService_1.ExperimentalService(this.getClient);
|
|
117
|
-
/**
|
|
118
|
-
* **[WARNING](https://support.atlassian.com/user-management/docs/create-and-update-groups/)
|
|
119
|
-
* The standard Atlassian group names are default names only and can be edited or
|
|
120
|
-
* deleted.** For example, an admin or Atlassian support could delete the default
|
|
121
|
-
* group jira-software-users or rename it to jsw-users at any point.
|
|
122
|
-
*
|
|
123
|
-
* @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-group
|
|
124
|
-
*/
|
|
125
|
-
this.group = new GroupService_1.GroupService(this.getClient);
|
|
126
|
-
/**
|
|
127
|
-
* @deprecated
|
|
128
|
-
* @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-inline-tasks
|
|
129
|
-
*/
|
|
130
|
-
this.inlineTasks = new InlineTasksService_1.InlineTasksService(this.getClient);
|
|
131
|
-
/** @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-label-info */
|
|
132
|
-
this.labelInfo = new LabelInfoService_1.LabelInfoService(this.getClient);
|
|
133
|
-
/** @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-long-running-task */
|
|
134
|
-
this.longRunningTask = new LongRunningTaskService_1.LongRunningTaskService(this.getClient);
|
|
135
|
-
/** @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-relation */
|
|
136
|
-
this.relation = new RelationService_1.RelationService(this.getClient);
|
|
137
|
-
/** @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-search */
|
|
138
|
-
this.search = new SearchService_1.SearchService(this.getClient);
|
|
139
|
-
/** @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-settings */
|
|
140
|
-
this.settings = new SettingsService_1.SettingsService(this.getClient);
|
|
141
|
-
/** @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-space-permissions */
|
|
142
|
-
this.spacePermissions = new SpacePermissionsService_1.SpacePermissionsService(this.getClient);
|
|
143
|
-
/**
|
|
144
|
-
* @deprecated
|
|
145
|
-
* @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-space-properties
|
|
146
|
-
*/
|
|
147
|
-
this.spaceProperties = new SpacePropertiesService_1.SpacePropertiesService(this.getClient);
|
|
148
|
-
/** @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-space */
|
|
149
|
-
this.space = new SpaceService_1.SpaceService(this.getClient);
|
|
150
|
-
/** @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-space-settings */
|
|
151
|
-
this.spaceSettings = new SpaceSettingsService_1.SpaceSettingsService(this.getClient);
|
|
152
|
-
/** @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-template */
|
|
153
|
-
this.template = new TemplateService_1.TemplateService(this.getClient);
|
|
154
|
-
/** @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-themes */
|
|
155
|
-
this.themes = new ThemesService_1.ThemesService(this.getClient);
|
|
156
|
-
/** @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-user-properties */
|
|
157
|
-
this.userProperties = new UserPropertiesService_1.UserPropertiesService(this.getClient);
|
|
158
|
-
/** @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-users */
|
|
159
|
-
this.users = new UsersService_1.UsersService(this.getClient);
|
|
160
224
|
this.client.setOptions(Object.assign(Object.assign({}, this.client.getOptions()), options));
|
|
161
225
|
}
|
|
162
226
|
}
|
|
163
227
|
exports.BaseConfluenceApiV1Client = BaseConfluenceApiV1Client;
|
|
164
|
-
BaseConfluenceApiV1Client.createClientWithServices = commonHttpClient.createClientWithServices;
|
|
165
228
|
validationSchemaStorage_1.validationSchemaStorage.setErrorClass(BaseConfluenceApiV1ClientError);
|
|
166
229
|
//# sourceMappingURL=BaseConfluenceApiV1Client.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseConfluenceApiV1Client.js","sourceRoot":"","sources":["../../../src/openapi/v1/BaseConfluenceApiV1Client.ts"],"names":[],"mappings":";;;AAAA,eAAe;AACf,wDAAwD;AACxD,gDAAgD;AAChD,4DAA4D;AAC5D,gEAA6D;AAoM7D,kEAA+D;AAC/D,0DAAuD;AACvD,oFAAiF;AACjF,sEAAmE;AACnE,0GAAuG;AACvG,8EAA2E;AAC3E,0EAAuE;AACvE,gFAA6E;AAC7E,oFAAiF;AACjF,kFAA+E;AAC/E,sFAAmF;AACnF,8DAA2D;AAC3D,0EAAuE;AACvE,8EAA2E;AAC3E,4EAAyE;AACzE,4EAAyE;AACzE,wEAAqE;AACrE,0DAAuD;AACvD,sEAAmE;AACnE,kEAA+D;AAC/D,8EAA2E;AAC3E,gEAA6D;AAC7D,4DAAyD;AACzD,gEAA6D;AAC7D,gFAA6E;AAC7E,8EAA2E;AAC3E,0DAAuD;AACvD,0EAAuE;AACvE,gEAA6D;AAC7D,4DAAyD;AACzD,4EAAyE;AACzE,0DAAuD;AACvD,uEAAoE;AAGpE,MAAa,8BAA+B,SAAQ,gBAAgB,CAAC,qBAAqB;IAA1F;;QACE,SAAI,GAAG,gCAAgC,CAAC;IAC1C,CAAC;CAAA;AAFD,wEAEC;AACD;;;;;;;;;;;;;;GAcG;AACH,MAAa,yBAA0B,SAAQ,qCAAiB;
|
|
1
|
+
{"version":3,"file":"BaseConfluenceApiV1Client.js","sourceRoot":"","sources":["../../../src/openapi/v1/BaseConfluenceApiV1Client.ts"],"names":[],"mappings":";;;AAAA,eAAe;AACf,wDAAwD;AACxD,gDAAgD;AAChD,4DAA4D;AAC5D,gEAA6D;AAoM7D,kEAA+D;AAC/D,0DAAuD;AACvD,oFAAiF;AACjF,sEAAmE;AACnE,0GAAuG;AACvG,8EAA2E;AAC3E,0EAAuE;AACvE,gFAA6E;AAC7E,oFAAiF;AACjF,kFAA+E;AAC/E,sFAAmF;AACnF,8DAA2D;AAC3D,0EAAuE;AACvE,8EAA2E;AAC3E,4EAAyE;AACzE,4EAAyE;AACzE,wEAAqE;AACrE,0DAAuD;AACvD,sEAAmE;AACnE,kEAA+D;AAC/D,8EAA2E;AAC3E,gEAA6D;AAC7D,4DAAyD;AACzD,gEAA6D;AAC7D,gFAA6E;AAC7E,8EAA2E;AAC3E,0DAAuD;AACvD,0EAAuE;AACvE,gEAA6D;AAC7D,4DAAyD;AACzD,4EAAyE;AACzE,0DAAuD;AACvD,uEAAoE;AAGpE,MAAa,8BAA+B,SAAQ,gBAAgB,CAAC,qBAAqB;IAA1F;;QACE,SAAI,GAAG,gCAAgC,CAAC;IAC1C,CAAC;CAAA;AAFD,wEAEC;AACD;;;;;;;;;;;;;;GAcG;AACH,MAAa,yBAA0B,SAAQ,qCAAiB;IAO9D,wFAAwF;IACxF,IAAI,SAAS;QACX,OAAO,IAAI,CAAC,kBAAkB,CAAC,mCAAgB,CAAC,CAAC;IACnD,CAAC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
|
|
1
1
|
import type * as commonHttpClient from "./CommonHttpClient";
|
|
2
2
|
export declare class CommonHttpService {
|
|
3
|
+
protected serviceInstancesMap: Map<new (getClientInstance: () => commonHttpClient.CommonHttpClient) => CommonHttpService, CommonHttpService>;
|
|
4
|
+
protected getServiceInstance<T extends CommonHttpService>(serviceClass: new (getClientInstance: () => commonHttpClient.CommonHttpClient) => T): T;
|
|
3
5
|
protected getClientInstance: () => commonHttpClient.CommonHttpClient;
|
|
4
6
|
constructor(getClientInstance: () => commonHttpClient.CommonHttpClient);
|
|
5
7
|
protected static initialized: boolean | undefined;
|
|
@@ -2,7 +2,16 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.CommonHttpService = void 0;
|
|
4
4
|
class CommonHttpService {
|
|
5
|
+
getServiceInstance(serviceClass) {
|
|
6
|
+
let serviceInstance = this.serviceInstancesMap.get(serviceClass);
|
|
7
|
+
if (!serviceInstance) {
|
|
8
|
+
serviceInstance = new serviceClass(this.getClientInstance);
|
|
9
|
+
this.serviceInstancesMap.set(serviceClass, serviceInstance);
|
|
10
|
+
}
|
|
11
|
+
return serviceInstance;
|
|
12
|
+
}
|
|
5
13
|
constructor(getClientInstance) {
|
|
14
|
+
this.serviceInstancesMap = new Map();
|
|
6
15
|
this.getClientInstance = () => {
|
|
7
16
|
const classInstance = this.constructor;
|
|
8
17
|
if (classInstance.initialized !== true) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CommonHttpService.js","sourceRoot":"","sources":["../../../../src/openapi/v1/core/CommonHttpService.ts"],"names":[],"mappings":";;;AAIA,MAAa,iBAAiB;
|
|
1
|
+
{"version":3,"file":"CommonHttpService.js","sourceRoot":"","sources":["../../../../src/openapi/v1/core/CommonHttpService.ts"],"names":[],"mappings":";;;AAIA,MAAa,iBAAiB;IAOlB,kBAAkB,CAC1B,YAEM;QAEN,IAAI,eAAe,GAAG,IAAI,CAAC,mBAAmB,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;QACjE,IAAI,CAAC,eAAe,EAAE,CAAC;YACrB,eAAe,GAAG,IAAI,YAAY,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC;YAC3D,IAAI,CAAC,mBAAmB,CAAC,GAAG,CAAC,YAAY,EAAE,eAAe,CAAC,CAAC;QAC9D,CAAC;QACD,OAAO,eAAoB,CAAC;IAC9B,CAAC;IAED,YAAY,iBAA0D;QAnB5D,wBAAmB,GAKzB,IAAI,GAAG,EAAE,CAAC;QAeZ,IAAI,CAAC,iBAAiB,GAAG,GAAG,EAAE;YAC5B,MAAM,aAAa,GAAG,IAAI,CAAC,WAAuC,CAAC;YACnE,IAAI,aAAa,CAAC,WAAW,KAAK,IAAI,EAAE,CAAC;gBACvC,aAAa,CAAC,WAAW,GAAG,IAAI,CAAC;gBACjC,IAAI,aAAa,CAAC,UAAU,KAAK,SAAS,EAAE,CAAC;oBAC3C,aAAa,CAAC,UAAU,EAAE,CAAC;gBAC7B,CAAC;YACH,CAAC;YACD,IAAI,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;YAC3C,OAAO,iBAAiB,EAAE,CAAC;QAC7B,CAAC,CAAC;IACJ,CAAC;CAGF;AAnCD,8CAmCC"}
|
|
@@ -61,52 +61,51 @@ export declare class BaseConfluenceApiV2Client extends CommonHttpService {
|
|
|
61
61
|
client: commonHttpClient.CommonHttpClient;
|
|
62
62
|
getClient: () => commonHttpClient.CommonHttpClient;
|
|
63
63
|
/** @see https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-ancestors */
|
|
64
|
-
ancestors: AncestorsService;
|
|
64
|
+
get ancestors(): AncestorsService;
|
|
65
65
|
/** @see https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-attachment */
|
|
66
|
-
attachment: AttachmentService;
|
|
66
|
+
get attachment(): AttachmentService;
|
|
67
67
|
/** @see https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-blog-post */
|
|
68
|
-
blogPost: BlogPostService;
|
|
68
|
+
get blogPost(): BlogPostService;
|
|
69
69
|
/** @see https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-children */
|
|
70
|
-
children: ChildrenService;
|
|
70
|
+
get children(): ChildrenService;
|
|
71
71
|
/** @see https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-classification-level */
|
|
72
|
-
classificationLevel: ClassificationLevelService;
|
|
72
|
+
get classificationLevel(): ClassificationLevelService;
|
|
73
73
|
/** @see https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-comment */
|
|
74
|
-
comment: CommentService;
|
|
74
|
+
get comment(): CommentService;
|
|
75
75
|
/** @see https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-content-properties */
|
|
76
|
-
contentProperties: ContentPropertiesService;
|
|
76
|
+
get contentProperties(): ContentPropertiesService;
|
|
77
77
|
/** @see https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-content */
|
|
78
|
-
content: ContentService;
|
|
78
|
+
get content(): ContentService;
|
|
79
79
|
/** @see https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-custom-content */
|
|
80
|
-
customContent: CustomContentService;
|
|
80
|
+
get customContent(): CustomContentService;
|
|
81
81
|
/** @see https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-database */
|
|
82
|
-
database: DatabaseService;
|
|
82
|
+
get database(): DatabaseService;
|
|
83
83
|
/** @see https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-data-policies */
|
|
84
|
-
dataPolicies: DataPoliciesService;
|
|
84
|
+
get dataPolicies(): DataPoliciesService;
|
|
85
85
|
/** @see https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-label */
|
|
86
|
-
label: LabelService;
|
|
86
|
+
get label(): LabelService;
|
|
87
87
|
/** @see https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-like */
|
|
88
|
-
like: LikeService;
|
|
88
|
+
get like(): LikeService;
|
|
89
89
|
/** @see https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-operation */
|
|
90
|
-
operation: OperationService;
|
|
90
|
+
get operation(): OperationService;
|
|
91
91
|
/** @see https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-page */
|
|
92
|
-
page: PageService;
|
|
92
|
+
get page(): PageService;
|
|
93
93
|
/** @see https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-smart-link */
|
|
94
|
-
smartLink: SmartLinkService;
|
|
94
|
+
get smartLink(): SmartLinkService;
|
|
95
95
|
/** @see https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-space-permissions */
|
|
96
|
-
spacePermissions: SpacePermissionsService;
|
|
96
|
+
get spacePermissions(): SpacePermissionsService;
|
|
97
97
|
/** @see https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-space-properties */
|
|
98
|
-
spaceProperties: SpacePropertiesService;
|
|
98
|
+
get spaceProperties(): SpacePropertiesService;
|
|
99
99
|
/** @see https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-space */
|
|
100
|
-
space: SpaceService;
|
|
100
|
+
get space(): SpaceService;
|
|
101
101
|
/** @see https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-task */
|
|
102
|
-
task: TaskService;
|
|
102
|
+
get task(): TaskService;
|
|
103
103
|
/** @see https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-user */
|
|
104
|
-
user: UserService;
|
|
104
|
+
get user(): UserService;
|
|
105
105
|
/** @see https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-version */
|
|
106
|
-
version: VersionService;
|
|
106
|
+
get version(): VersionService;
|
|
107
107
|
/** @see https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-whiteboard */
|
|
108
|
-
whiteboard: WhiteboardService;
|
|
108
|
+
get whiteboard(): WhiteboardService;
|
|
109
109
|
constructor(options?: BaseConfluenceApiV2ClientOptions);
|
|
110
|
-
static createClientWithServices: typeof commonHttpClient.createClientWithServices;
|
|
111
110
|
}
|
|
112
111
|
export type { AbstractPageLinks, BodyBulk, BodySingle, BodyType, ContentProperty, ContentStatus, CustomContentBodyRepresentation, Label, Like, MultiEntityLinks, Operation, OptionalFieldLinks, OptionalFieldMeta, ParentContentType, PrimaryBodyRepresentation, PrimaryBodyRepresentationSingle, SpaceDescription, SpaceIcon, SpaceLinks, SpacePermission, SpaceProperty, SpaceSortOrder, Version, AccountStatus, AccountType, Icon, User, Ancestor, AncestorType, AttachmentBulk, AttachmentLinks, AttachmentSingle, AttachmentSortOrder, AttachmentCommentModel, BlogPostCommentModel, BlogPostInlineCommentModel, ChildrenCommentModel, CommentBodyWrite, CommentLinks, CommentNestedBodyWrite, CommentSortOrder, CreateFooterCommentModel, CreateInlineCommentModel, CustomContentCommentModel, FooterCommentModel, InlineCommentChildrenModel, InlineCommentModel, InlineCommentProperties, InlineCommentResolutionStatus, PageCommentModel, PageInlineCommentModel, UpdateFooterCommentModel, UpdateInlineCommentModel, AttachmentVersion, BlogPostVersion, CommentVersion, CustomContentVersion, DetailedVersion, PageVersion, VersionedEntity, VersionSortOrder, BlogPostBodyWrite, BlogPostBulk, BlogPostContentStatus, BlogPostNestedBodyWrite, BlogPostSingle, BlogPostSortOrder, ChildCustomContent, ChildPage, OnlyArchivedAndCurrentContentStatus, ClassificationLevel, ClassificationLevelColor, ClassificationLevelStatus, ContentIdToContentTypeResponse, ContentPropertyCreateRequest, ContentPropertySortOrder, ContentPropertyUpdateRequest, CustomContentBodyBulk, CustomContentBodyRepresentationSingle, CustomContentBodySingle, CustomContentBodyWrite, CustomContentBulk, CustomContentLinks, CustomContentNestedBodyWrite, CustomContentSingle, CustomContentSortOrder, DatabaseLinks, DatabaseSingle, DataPolicyMetadata, DataPolicySpace, PageBodyWrite, PageBulk, PageNestedBodyWrite, PageSingle, PageSortOrder, PermittedOperationsResponse, SmartLinkLinks, SmartLinkSingle, SpaceBulk, SpaceDescriptionBodyRepresentation, SpaceSingle, SpaceStatus, SpaceType, SpacePropertyCreateRequest, SpacePropertyUpdateRequest, Task, TaskBodySingle, WhiteboardLinks, WhiteboardSingle, };
|
|
@@ -47,6 +47,98 @@ exports.BaseConfluenceApiV2ClientError = BaseConfluenceApiV2ClientError;
|
|
|
47
47
|
* @version 2.0.0
|
|
48
48
|
*/
|
|
49
49
|
class BaseConfluenceApiV2Client extends CommonHttpService_1.CommonHttpService {
|
|
50
|
+
/** @see https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-ancestors */
|
|
51
|
+
get ancestors() {
|
|
52
|
+
return this.getServiceInstance(AncestorsService_1.AncestorsService);
|
|
53
|
+
}
|
|
54
|
+
/** @see https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-attachment */
|
|
55
|
+
get attachment() {
|
|
56
|
+
return this.getServiceInstance(AttachmentService_1.AttachmentService);
|
|
57
|
+
}
|
|
58
|
+
/** @see https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-blog-post */
|
|
59
|
+
get blogPost() {
|
|
60
|
+
return this.getServiceInstance(BlogPostService_1.BlogPostService);
|
|
61
|
+
}
|
|
62
|
+
/** @see https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-children */
|
|
63
|
+
get children() {
|
|
64
|
+
return this.getServiceInstance(ChildrenService_1.ChildrenService);
|
|
65
|
+
}
|
|
66
|
+
/** @see https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-classification-level */
|
|
67
|
+
get classificationLevel() {
|
|
68
|
+
return this.getServiceInstance(ClassificationLevelService_1.ClassificationLevelService);
|
|
69
|
+
}
|
|
70
|
+
/** @see https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-comment */
|
|
71
|
+
get comment() {
|
|
72
|
+
return this.getServiceInstance(CommentService_1.CommentService);
|
|
73
|
+
}
|
|
74
|
+
/** @see https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-content-properties */
|
|
75
|
+
get contentProperties() {
|
|
76
|
+
return this.getServiceInstance(ContentPropertiesService_1.ContentPropertiesService);
|
|
77
|
+
}
|
|
78
|
+
/** @see https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-content */
|
|
79
|
+
get content() {
|
|
80
|
+
return this.getServiceInstance(ContentService_1.ContentService);
|
|
81
|
+
}
|
|
82
|
+
/** @see https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-custom-content */
|
|
83
|
+
get customContent() {
|
|
84
|
+
return this.getServiceInstance(CustomContentService_1.CustomContentService);
|
|
85
|
+
}
|
|
86
|
+
/** @see https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-database */
|
|
87
|
+
get database() {
|
|
88
|
+
return this.getServiceInstance(DatabaseService_1.DatabaseService);
|
|
89
|
+
}
|
|
90
|
+
/** @see https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-data-policies */
|
|
91
|
+
get dataPolicies() {
|
|
92
|
+
return this.getServiceInstance(DataPoliciesService_1.DataPoliciesService);
|
|
93
|
+
}
|
|
94
|
+
/** @see https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-label */
|
|
95
|
+
get label() {
|
|
96
|
+
return this.getServiceInstance(LabelService_1.LabelService);
|
|
97
|
+
}
|
|
98
|
+
/** @see https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-like */
|
|
99
|
+
get like() {
|
|
100
|
+
return this.getServiceInstance(LikeService_1.LikeService);
|
|
101
|
+
}
|
|
102
|
+
/** @see https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-operation */
|
|
103
|
+
get operation() {
|
|
104
|
+
return this.getServiceInstance(OperationService_1.OperationService);
|
|
105
|
+
}
|
|
106
|
+
/** @see https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-page */
|
|
107
|
+
get page() {
|
|
108
|
+
return this.getServiceInstance(PageService_1.PageService);
|
|
109
|
+
}
|
|
110
|
+
/** @see https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-smart-link */
|
|
111
|
+
get smartLink() {
|
|
112
|
+
return this.getServiceInstance(SmartLinkService_1.SmartLinkService);
|
|
113
|
+
}
|
|
114
|
+
/** @see https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-space-permissions */
|
|
115
|
+
get spacePermissions() {
|
|
116
|
+
return this.getServiceInstance(SpacePermissionsService_1.SpacePermissionsService);
|
|
117
|
+
}
|
|
118
|
+
/** @see https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-space-properties */
|
|
119
|
+
get spaceProperties() {
|
|
120
|
+
return this.getServiceInstance(SpacePropertiesService_1.SpacePropertiesService);
|
|
121
|
+
}
|
|
122
|
+
/** @see https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-space */
|
|
123
|
+
get space() {
|
|
124
|
+
return this.getServiceInstance(SpaceService_1.SpaceService);
|
|
125
|
+
}
|
|
126
|
+
/** @see https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-task */
|
|
127
|
+
get task() {
|
|
128
|
+
return this.getServiceInstance(TaskService_1.TaskService);
|
|
129
|
+
}
|
|
130
|
+
/** @see https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-user */
|
|
131
|
+
get user() {
|
|
132
|
+
return this.getServiceInstance(UserService_1.UserService);
|
|
133
|
+
}
|
|
134
|
+
/** @see https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-version */
|
|
135
|
+
get version() {
|
|
136
|
+
return this.getServiceInstance(VersionService_1.VersionService);
|
|
137
|
+
}
|
|
138
|
+
/** @see https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-whiteboard */
|
|
139
|
+
get whiteboard() {
|
|
140
|
+
return this.getServiceInstance(WhiteboardService_1.WhiteboardService);
|
|
141
|
+
}
|
|
50
142
|
constructor(options) {
|
|
51
143
|
super(() => this.client);
|
|
52
144
|
this.client = new commonHttpClient.CommonHttpClient({
|
|
@@ -55,56 +147,9 @@ class BaseConfluenceApiV2Client extends CommonHttpService_1.CommonHttpService {
|
|
|
55
147
|
errorClass: BaseConfluenceApiV2ClientError,
|
|
56
148
|
});
|
|
57
149
|
this.getClient = () => this.client;
|
|
58
|
-
/** @see https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-ancestors */
|
|
59
|
-
this.ancestors = new AncestorsService_1.AncestorsService(this.getClient);
|
|
60
|
-
/** @see https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-attachment */
|
|
61
|
-
this.attachment = new AttachmentService_1.AttachmentService(this.getClient);
|
|
62
|
-
/** @see https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-blog-post */
|
|
63
|
-
this.blogPost = new BlogPostService_1.BlogPostService(this.getClient);
|
|
64
|
-
/** @see https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-children */
|
|
65
|
-
this.children = new ChildrenService_1.ChildrenService(this.getClient);
|
|
66
|
-
/** @see https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-classification-level */
|
|
67
|
-
this.classificationLevel = new ClassificationLevelService_1.ClassificationLevelService(this.getClient);
|
|
68
|
-
/** @see https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-comment */
|
|
69
|
-
this.comment = new CommentService_1.CommentService(this.getClient);
|
|
70
|
-
/** @see https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-content-properties */
|
|
71
|
-
this.contentProperties = new ContentPropertiesService_1.ContentPropertiesService(this.getClient);
|
|
72
|
-
/** @see https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-content */
|
|
73
|
-
this.content = new ContentService_1.ContentService(this.getClient);
|
|
74
|
-
/** @see https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-custom-content */
|
|
75
|
-
this.customContent = new CustomContentService_1.CustomContentService(this.getClient);
|
|
76
|
-
/** @see https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-database */
|
|
77
|
-
this.database = new DatabaseService_1.DatabaseService(this.getClient);
|
|
78
|
-
/** @see https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-data-policies */
|
|
79
|
-
this.dataPolicies = new DataPoliciesService_1.DataPoliciesService(this.getClient);
|
|
80
|
-
/** @see https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-label */
|
|
81
|
-
this.label = new LabelService_1.LabelService(this.getClient);
|
|
82
|
-
/** @see https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-like */
|
|
83
|
-
this.like = new LikeService_1.LikeService(this.getClient);
|
|
84
|
-
/** @see https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-operation */
|
|
85
|
-
this.operation = new OperationService_1.OperationService(this.getClient);
|
|
86
|
-
/** @see https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-page */
|
|
87
|
-
this.page = new PageService_1.PageService(this.getClient);
|
|
88
|
-
/** @see https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-smart-link */
|
|
89
|
-
this.smartLink = new SmartLinkService_1.SmartLinkService(this.getClient);
|
|
90
|
-
/** @see https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-space-permissions */
|
|
91
|
-
this.spacePermissions = new SpacePermissionsService_1.SpacePermissionsService(this.getClient);
|
|
92
|
-
/** @see https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-space-properties */
|
|
93
|
-
this.spaceProperties = new SpacePropertiesService_1.SpacePropertiesService(this.getClient);
|
|
94
|
-
/** @see https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-space */
|
|
95
|
-
this.space = new SpaceService_1.SpaceService(this.getClient);
|
|
96
|
-
/** @see https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-task */
|
|
97
|
-
this.task = new TaskService_1.TaskService(this.getClient);
|
|
98
|
-
/** @see https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-user */
|
|
99
|
-
this.user = new UserService_1.UserService(this.getClient);
|
|
100
|
-
/** @see https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-version */
|
|
101
|
-
this.version = new VersionService_1.VersionService(this.getClient);
|
|
102
|
-
/** @see https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-whiteboard */
|
|
103
|
-
this.whiteboard = new WhiteboardService_1.WhiteboardService(this.getClient);
|
|
104
150
|
this.client.setOptions(Object.assign(Object.assign({}, this.client.getOptions()), options));
|
|
105
151
|
}
|
|
106
152
|
}
|
|
107
153
|
exports.BaseConfluenceApiV2Client = BaseConfluenceApiV2Client;
|
|
108
|
-
BaseConfluenceApiV2Client.createClientWithServices = commonHttpClient.createClientWithServices;
|
|
109
154
|
validationSchemaStorage_1.validationSchemaStorage.setErrorClass(BaseConfluenceApiV2ClientError);
|
|
110
155
|
//# sourceMappingURL=BaseConfluenceApiV2Client.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseConfluenceApiV2Client.js","sourceRoot":"","sources":["../../../src/openapi/v2/BaseConfluenceApiV2Client.ts"],"names":[],"mappings":";;;AAAA,eAAe;AACf,wDAAwD;AACxD,gDAAgD;AAChD,4DAA4D;AAC5D,gEAA6D;AAgI7D,kEAA+D;AAC/D,oEAAiE;AACjE,gEAA6D;AAC7D,gEAA6D;AAC7D,sFAAmF;AACnF,8DAA2D;AAC3D,kFAA+E;AAC/E,8DAA2D;AAC3D,0EAAuE;AACvE,gEAA6D;AAC7D,wEAAqE;AACrE,0DAAuD;AACvD,wDAAqD;AACrD,kEAA+D;AAC/D,wDAAqD;AACrD,kEAA+D;AAC/D,gFAA6E;AAC7E,8EAA2E;AAC3E,0DAAuD;AACvD,wDAAqD;AACrD,wDAAqD;AACrD,8DAA2D;AAC3D,oEAAiE;AACjE,uEAAoE;AAGpE,MAAa,8BAA+B,SAAQ,gBAAgB,CAAC,qBAAqB;IAA1F;;QACE,SAAI,GAAG,gCAAgC,CAAC;IAC1C,CAAC;CAAA;AAFD,wEAEC;AACD;;;;;;;;GAQG;AACH,MAAa,yBAA0B,SAAQ,qCAAiB;
|
|
1
|
+
{"version":3,"file":"BaseConfluenceApiV2Client.js","sourceRoot":"","sources":["../../../src/openapi/v2/BaseConfluenceApiV2Client.ts"],"names":[],"mappings":";;;AAAA,eAAe;AACf,wDAAwD;AACxD,gDAAgD;AAChD,4DAA4D;AAC5D,gEAA6D;AAgI7D,kEAA+D;AAC/D,oEAAiE;AACjE,gEAA6D;AAC7D,gEAA6D;AAC7D,sFAAmF;AACnF,8DAA2D;AAC3D,kFAA+E;AAC/E,8DAA2D;AAC3D,0EAAuE;AACvE,gEAA6D;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,OAAO,IAAI,CAAC,kBAAkB,CAAC,yBAAW,CAAC,CAAC;IAC9C,CAAC;IACD,sFAAsF;IACtF,IAAI,OAAO;QACT,OAAO,IAAI,CAAC,kBAAkB,CAAC,+BAAc,CAAC,CAAC;IACjD,CAAC;IACD,yFAAyF;IACzF,IAAI,UAAU;QACZ,OAAO,IAAI,CAAC,kBAAkB,CAAC,qCAAiB,CAAC,CAAC;IACpD,CAAC;IACD,YAAY,OAA0C;QACpD,KAAK,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAnG3B,WAAM,GAAG,IAAI,gBAAgB,CAAC,gBAAgB,CAAC;YAC7C,OAAO,EAAE,mCAAmC;YAC5C,kBAAkB,EAAE,MAAM;YAC1B,UAAU,EAAE,8BAA8B;SAC3C,CAAC,CAAC;QACH,cAAS,GAAG,GAAG,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC;QA+F5B,IAAI,CAAC,MAAM,CAAC,UAAU,iCACjB,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE,GACxB,OAAO,EACV,CAAC;IACL,CAAC;CACF;AA1GD,8DA0GC;AACD,iDAAuB,CAAC,aAAa,CAAC,8BAA8B,CAAC,CAAC"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import type * as commonHttpClient from "./CommonHttpClient";
|
|
2
2
|
export declare class CommonHttpService {
|
|
3
|
+
protected serviceInstancesMap: Map<new (getClientInstance: () => commonHttpClient.CommonHttpClient) => CommonHttpService, CommonHttpService>;
|
|
4
|
+
protected getServiceInstance<T extends CommonHttpService>(serviceClass: new (getClientInstance: () => commonHttpClient.CommonHttpClient) => T): T;
|
|
3
5
|
protected getClientInstance: () => commonHttpClient.CommonHttpClient;
|
|
4
6
|
constructor(getClientInstance: () => commonHttpClient.CommonHttpClient);
|
|
5
7
|
protected static initialized: boolean | undefined;
|
|
@@ -2,7 +2,16 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.CommonHttpService = void 0;
|
|
4
4
|
class CommonHttpService {
|
|
5
|
+
getServiceInstance(serviceClass) {
|
|
6
|
+
let serviceInstance = this.serviceInstancesMap.get(serviceClass);
|
|
7
|
+
if (!serviceInstance) {
|
|
8
|
+
serviceInstance = new serviceClass(this.getClientInstance);
|
|
9
|
+
this.serviceInstancesMap.set(serviceClass, serviceInstance);
|
|
10
|
+
}
|
|
11
|
+
return serviceInstance;
|
|
12
|
+
}
|
|
5
13
|
constructor(getClientInstance) {
|
|
14
|
+
this.serviceInstancesMap = new Map();
|
|
6
15
|
this.getClientInstance = () => {
|
|
7
16
|
const classInstance = this.constructor;
|
|
8
17
|
if (classInstance.initialized !== true) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CommonHttpService.js","sourceRoot":"","sources":["../../../../src/openapi/v2/core/CommonHttpService.ts"],"names":[],"mappings":";;;AAIA,MAAa,iBAAiB;
|
|
1
|
+
{"version":3,"file":"CommonHttpService.js","sourceRoot":"","sources":["../../../../src/openapi/v2/core/CommonHttpService.ts"],"names":[],"mappings":";;;AAIA,MAAa,iBAAiB;IAOlB,kBAAkB,CAC1B,YAEM;QAEN,IAAI,eAAe,GAAG,IAAI,CAAC,mBAAmB,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;QACjE,IAAI,CAAC,eAAe,EAAE,CAAC;YACrB,eAAe,GAAG,IAAI,YAAY,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC;YAC3D,IAAI,CAAC,mBAAmB,CAAC,GAAG,CAAC,YAAY,EAAE,eAAe,CAAC,CAAC;QAC9D,CAAC;QACD,OAAO,eAAoB,CAAC;IAC9B,CAAC;IAED,YAAY,iBAA0D;QAnB5D,wBAAmB,GAKzB,IAAI,GAAG,EAAE,CAAC;QAeZ,IAAI,CAAC,iBAAiB,GAAG,GAAG,EAAE;YAC5B,MAAM,aAAa,GAAG,IAAI,CAAC,WAAuC,CAAC;YACnE,IAAI,aAAa,CAAC,WAAW,KAAK,IAAI,EAAE,CAAC;gBACvC,aAAa,CAAC,WAAW,GAAG,IAAI,CAAC;gBACjC,IAAI,aAAa,CAAC,UAAU,KAAK,SAAS,EAAE,CAAC;oBAC3C,aAAa,CAAC,UAAU,EAAE,CAAC;gBAC7B,CAAC;YACH,CAAC;YACD,IAAI,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;YAC3C,OAAO,iBAAiB,EAAE,CAAC;QAC7B,CAAC,CAAC;IACJ,CAAC;CAGF;AAnCD,8CAmCC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@resolution/confluence-api-client",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "Confluence API Client based on OpenAPI Schema from Atlassian.",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -36,10 +36,10 @@
|
|
|
36
36
|
},
|
|
37
37
|
"homepage": "https://bitbucket.org/resolutiongmbh/atlassian-api-clients#readme",
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@resolution/atlassian-api-common": "^0.
|
|
39
|
+
"@resolution/atlassian-api-common": "^0.5.0"
|
|
40
40
|
},
|
|
41
41
|
"publishConfig": {
|
|
42
42
|
"access": "public"
|
|
43
43
|
},
|
|
44
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "191b97ebdd6570a60258d3b5a4ac17dfa5377be5"
|
|
45
45
|
}
|