@resolution/organizations-api-client 0.15.7 → 0.15.9
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/lib/openapi/organizations/BaseOrganizationsApiClient.d.ts +5 -5
- package/lib/openapi/organizations/BaseOrganizationsApiClient.js +15 -1
- package/lib/openapi/organizations/BaseOrganizationsApiClient.js.map +1 -1
- package/lib/openapi/organizations/models/common.d.ts +39 -4
- package/lib/openapi/organizations/models/common.js +6 -2
- package/lib/openapi/organizations/models/common.js.map +1 -1
- package/lib/openapi/organizations/models/directory.d.ts +0 -203
- package/lib/openapi/organizations/models/directory.js +0 -59
- package/lib/openapi/organizations/models/directory.js.map +1 -1
- package/lib/openapi/organizations/models/groups.d.ts +68 -5
- package/lib/openapi/organizations/models/groups.js +18 -1
- package/lib/openapi/organizations/models/groups.js.map +1 -1
- package/lib/openapi/organizations/models/users.d.ts +337 -5
- package/lib/openapi/organizations/models/users.js +87 -2
- package/lib/openapi/organizations/models/users.js.map +1 -1
- package/lib/openapi/organizations/services/DirectoryService.d.ts +3 -607
- package/lib/openapi/organizations/services/DirectoryService.js +0 -550
- package/lib/openapi/organizations/services/DirectoryService.js.map +1 -1
- package/lib/openapi/organizations/services/DomainsService.d.ts +4 -4
- package/lib/openapi/organizations/services/EventsService.d.ts +8 -8
- package/lib/openapi/organizations/services/GroupsService.d.ts +605 -17
- package/lib/openapi/organizations/services/GroupsService.js +466 -0
- package/lib/openapi/organizations/services/GroupsService.js.map +1 -1
- package/lib/openapi/organizations/services/OrgsService.d.ts +2 -2
- package/lib/openapi/organizations/services/PoliciesService.d.ts +18 -18
- package/lib/openapi/organizations/services/UsersService.d.ts +542 -26
- package/lib/openapi/organizations/services/UsersService.js +488 -8
- package/lib/openapi/organizations/services/UsersService.js.map +1 -1
- package/lib/openapi/organizations/services/ValidateService.d.ts +2 -2
- package/lib/openapi/organizations/services/WorkspacesService.d.ts +2 -2
- package/package.json +3 -3
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import * as commonHttpClient from "../core/CommonHttpClient";
|
|
2
2
|
import { CommonHttpService } from "../core/CommonHttpService";
|
|
3
|
-
import type { ApplicationError, ErrorCdenPolicyValidationFailedModel, ErrorInternalErrorModel, ErrorInvalidPageCursorModel, ErrorOrgNotFoundModel, Errors, ErrorsApplicationErrorsModel, LinkPageCursor, LinkPageModel, LinkSelfCursor, LinkSelfModel, ProxyError, ResourceId, ResourceOwner, RoleIds } from "./models/common";
|
|
4
|
-
import type {
|
|
3
|
+
import type { ApplicationError, ErrorCdenPolicyValidationFailedModel, ErrorInternalErrorModel, ErrorInvalidPageCursorModel, ErrorOrgNotFoundModel, Errors, ErrorsApplicationErrorsModel, LinkPageCursor, LinkPageModel, LinkSelfCursor, LinkSelfModel, ProxyError, ResourceId, ResourceOwner, RoleAssociation, RoleIds } from "./models/common";
|
|
4
|
+
import type { MultiDirectoryUserDirectory, MultiDirectoryUserDirectoryPage } from "./models/directory";
|
|
5
5
|
import type { Domain, DomainModel, DomainPage, ErrorDomainNotFoundModel, ErrorNoPermsModel } from "./models/domains";
|
|
6
6
|
import type { ErrorEventNotFoundModel, ErrorInvalidQueryCountModel, ErrorInvalidRequestSyntaxModel, ErrorInvalidSearchTimeDateModel, Event, EventActionModel, EventActions, EventActorModel, EventLocationModel, EventMessageModel, EventModel, EventObjectModel, EventPage, LinkAltModel, LinkSelfAltModel, PollingEventModel, PollingEventPage } from "./models/events";
|
|
7
|
-
import type { GroupCounts, GroupNames, GroupsSearchPage, GroupsSearchRequest, GroupTotalCounts, GroupType, GroupTypeCounts, ManagementAccess, MultiDirectoryGroup, MultiDirectoryGroupDetails, MultiDirectoryGroupPage, MultiDirectoryGroupRoleAssignment, MultiDirectoryGroupRoleAssignmentPage, MultiDirectoryGroupStats, PublicGroup, RoleAssignment } from "./models/groups";
|
|
7
|
+
import type { AddGroupMembershipInput, CreateGroupInput, Error, GroupCounts, GroupNames, GroupRoleAssignmentInput, GroupsSearchPage, GroupsSearchRequest, GroupTotalCounts, GroupType, GroupTypeCounts, ManagementAccess, MultiDirectoryGroup, MultiDirectoryGroupDetails, MultiDirectoryGroupPage, MultiDirectoryGroupRoleAssignment, MultiDirectoryGroupRoleAssignmentPage, MultiDirectoryGroupStats, PublicGroup, RoleAssignment } from "./models/groups";
|
|
8
8
|
import type { LinkRelatedModel, Org, OrgModel, OrgPage } from "./models/orgs";
|
|
9
9
|
import type { AllowIfContainedRule, ErrorInvalidResourceModel, ErrorPolicyNotFoundModel, ErrorPolicyResourceNotFoundModel, Links, Meta, Policy, PolicyCreateInput, PolicyCreateModel, PolicyModel, PolicyPage, PolicyUpdateInput, PolicyUpdateModel, Resource, ResourceInput, ResourceUpdateInput } from "./models/policies";
|
|
10
|
-
import type { AccountStatus, AccountStatusCounts, AccountType, ClaimStatus, EmailDomains, EmailUsernames, MembershipStatus, MultiDirectoryUser, MultiDirectoryUserPage, MultiDirectoryUserRoleAssignment, MultiDirectoryUserRoleAssignmentPage, MultiDirectoryUserStats, NamesOrNicknames, PlatformRole, Product, PublicUser, RoleIdCounts, Status, User, UserCounts, UserPage, UsersSearchPage, UsersSearchRequest } from "./models/users";
|
|
10
|
+
import type { AccountStatus, AccountStatusCounts, AccountType, AdminInviteResponse, ApiError, ApiErrorResponse, ClaimStatus, CursorNextPageModel, EmailDomains, EmailUsernames, GroupAssignmentResult, InviteApiRequest, MembershipStatus, MultidirectoryInviteApiRequest, MultidirectoryInviteRoleAssociation, MultidirectoryInviteSuccessResponse, MultiDirectoryMembershipStatus, MultiDirectoryUser, MultiDirectoryUserPage, MultiDirectoryUserRoleAssignment, MultiDirectoryUserRoleAssignmentPage, MultiDirectoryUserStats, NamesOrNicknames, OrganizationLevelRoleApiRequest, PlatformRole, Product, PublicUser, RoleApiRequest, RoleAssignmentResult, RoleIdCounts, SingleAdminInviteResult, Status, User, UserCounts, UserPage, UserProductAccessActivityPage, UserProductAccessModel, UserProductLastActive, UsersSearchPage, UsersSearchRequest } from "./models/users";
|
|
11
11
|
import type { AndOperator, EntitlementModelV2, FeatureFilter, FeatureModelV2, FieldOperand, MetaV2, NorOperator, PageDataResponseV2, PolicyFilter, PolicyModelV2, QueryVariants, Sandbox, SearchWorkspacesOperand, SearchWorkspacesRequestV2, SortField, WorkspaceModel } from "./models/workspaces";
|
|
12
12
|
import { DirectoryService } from "./services/DirectoryService";
|
|
13
13
|
import { DomainsService } from "./services/DomainsService";
|
|
@@ -91,4 +91,4 @@ export declare class BaseOrganizationsApiClient extends CommonHttpService {
|
|
|
91
91
|
get workspaces(): WorkspacesService;
|
|
92
92
|
constructor(options?: BaseOrganizationsApiClientOptions);
|
|
93
93
|
}
|
|
94
|
-
export type { AccountStatus, AccountStatusCounts, AccountType, ClaimStatus, EmailDomains, EmailUsernames, MembershipStatus, MultiDirectoryUser, MultiDirectoryUserPage, MultiDirectoryUserRoleAssignment, MultiDirectoryUserRoleAssignmentPage, MultiDirectoryUserStats, NamesOrNicknames, PlatformRole, Product, PublicUser, RoleIdCounts, Status, User, UserCounts, UserPage, UsersSearchPage, UsersSearchRequest, AddGroupMembershipInput,
|
|
94
|
+
export type { AccountStatus, AccountStatusCounts, AccountType, AdminInviteResponse, ApiError, ApiErrorResponse, ClaimStatus, CursorNextPageModel, EmailDomains, EmailUsernames, GroupAssignmentResult, InviteApiRequest, MembershipStatus, MultidirectoryInviteApiRequest, MultidirectoryInviteRoleAssociation, MultidirectoryInviteSuccessResponse, MultiDirectoryMembershipStatus, MultiDirectoryUser, MultiDirectoryUserPage, MultiDirectoryUserRoleAssignment, MultiDirectoryUserRoleAssignmentPage, MultiDirectoryUserStats, NamesOrNicknames, OrganizationLevelRoleApiRequest, PlatformRole, Product, PublicUser, RoleApiRequest, RoleAssignmentResult, RoleIdCounts, SingleAdminInviteResult, Status, User, UserCounts, UserPage, UserProductAccessActivityPage, UserProductAccessModel, UserProductLastActive, UsersSearchPage, UsersSearchRequest, AddGroupMembershipInput, CreateGroupInput, Error, GroupCounts, GroupNames, GroupRoleAssignmentInput, GroupsSearchPage, GroupsSearchRequest, GroupTotalCounts, GroupType, GroupTypeCounts, ManagementAccess, MultiDirectoryGroup, MultiDirectoryGroupDetails, MultiDirectoryGroupPage, MultiDirectoryGroupRoleAssignment, MultiDirectoryGroupRoleAssignmentPage, MultiDirectoryGroupStats, PublicGroup, RoleAssignment, AllowIfContainedRule, ErrorInvalidResourceModel, ErrorPolicyNotFoundModel, ErrorPolicyResourceNotFoundModel, Links, Meta, Policy, PolicyCreateInput, PolicyCreateModel, PolicyModel, PolicyPage, PolicyUpdateInput, PolicyUpdateModel, Resource, ResourceInput, ResourceUpdateInput, AndOperator, EntitlementModelV2, FeatureFilter, FeatureModelV2, FieldOperand, MetaV2, NorOperator, PageDataResponseV2, PolicyFilter, PolicyModelV2, QueryVariants, Sandbox, SearchWorkspacesOperand, SearchWorkspacesRequestV2, SortField, WorkspaceModel, ApplicationError, ErrorCdenPolicyValidationFailedModel, ErrorInternalErrorModel, ErrorInvalidPageCursorModel, ErrorOrgNotFoundModel, Errors, ErrorsApplicationErrorsModel, LinkPageCursor, LinkPageModel, LinkSelfCursor, LinkSelfModel, ProxyError, ResourceId, ResourceOwner, RoleAssociation, RoleIds, Domain, DomainModel, DomainPage, ErrorDomainNotFoundModel, ErrorNoPermsModel, ErrorEventNotFoundModel, ErrorInvalidQueryCountModel, ErrorInvalidRequestSyntaxModel, ErrorInvalidSearchTimeDateModel, Event, EventActionModel, EventActions, EventActorModel, EventLocationModel, EventMessageModel, EventModel, EventObjectModel, EventPage, LinkAltModel, LinkSelfAltModel, PollingEventModel, PollingEventPage, LinkRelatedModel, Org, OrgModel, OrgPage, MultiDirectoryUserDirectory, MultiDirectoryUserDirectoryPage };
|
|
@@ -116,7 +116,21 @@ class BaseOrganizationsApiClient extends CommonHttpService_1.CommonHttpService {
|
|
|
116
116
|
apiClientClassName: (_a = this.constructor.name) !== null && _a !== void 0 ? _a : "name",
|
|
117
117
|
baseUrl: "https://api.atlassian.com/admin",
|
|
118
118
|
binaryResponseType: "blob",
|
|
119
|
-
errorClass: BaseOrganizationsApiClientError
|
|
119
|
+
errorClass: BaseOrganizationsApiClientError,
|
|
120
|
+
deprecatedOperations: {
|
|
121
|
+
"POST /v1/orgs/{orgId}/directory/groups": "groups.postV1OrgsOrgIdDirectoryGroups",
|
|
122
|
+
"DELETE /v1/orgs/{orgId}/directory/groups/{groupId}": "groups.deleteV1OrgsOrgIdDirectoryGroupsGroupId",
|
|
123
|
+
"POST /v1/orgs/{orgId}/directory/groups/{groupId}/memberships": "groups.postV1OrgsOrgIdDirectoryGroupsGroupIdMemberships",
|
|
124
|
+
"DELETE /v1/orgs/{orgId}/directory/groups/{groupId}/memberships/{accountId}": "groups.deleteV1OrgsOrgIdDirectoryGroupsGroupIdMembershipsAccountId",
|
|
125
|
+
"POST /v1/orgs/{orgId}/directory/groups/{groupId}/roles/assign": "groups.assignRoleToGroup",
|
|
126
|
+
"POST /v1/orgs/{orgId}/directory/groups/{groupId}/roles/revoke": "groups.revokeRoleToGroup",
|
|
127
|
+
"POST /v1/orgs/{orgId}/groups/search": "groups.searchGroups",
|
|
128
|
+
"DELETE /v1/orgs/{orgId}/directory/users/{accountId}": "users.deleteV1OrgsOrgIdDirectoryUsersAccountId",
|
|
129
|
+
"POST /v1/orgs/{orgId}/directory/users/{accountId}/restore-access": "users.postV1OrgsOrgIdDirectoryUsersAccountIdRestoreAccess",
|
|
130
|
+
"POST /v1/orgs/{orgId}/directory/users/{accountId}/suspend-access": "users.postV1OrgsOrgIdDirectoryUsersAccountIdSuspendAccess",
|
|
131
|
+
"POST /v1/orgs/{orgId}/users/invite": "users.postV1OrgsOrgIdUsersInvite",
|
|
132
|
+
"POST /v1/orgs/{orgId}/users/search": "users.searchUsers"
|
|
133
|
+
}
|
|
120
134
|
});
|
|
121
135
|
this.getClient = () => this.client;
|
|
122
136
|
this.client.setOptions(Object.assign(Object.assign({}, this.client.getOptions()), options));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseOrganizationsApiClient.js","sourceRoot":"","sources":["../../../src/openapi/organizations/BaseOrganizationsApiClient.ts"],"names":[],"mappings":";;;AAAA,eAAe;AACf,wDAAwD;AACxD,gDAAgD;AAChD,6DAA6D;AAC7D,iEAA8D;AAU9D,kEAA+D;AAC/D,8DAA2D;AAC3D,4DAAyD;AACzD,4DAAyD;AACzD,wDAAqD;AACrD,gEAA6D;AAC7D,0DAAuD;AACvD,gEAA6D;AAC7D,oEAAiE;AACjE,uEAAoE;AAEpE,gCAAgC;AAChC,MAAM,+BAAgC,SAAQ,gBAAgB,CAAC,qBAAqB;IAApF;;QACE,SAAI,GAAG,iCAAiC,CAAC;IAC3C,CAAC;CAAA;AACD;;;;;GAKG;AACH,MAAa,0BAA2B,SAAQ,qCAAiB;
|
|
1
|
+
{"version":3,"file":"BaseOrganizationsApiClient.js","sourceRoot":"","sources":["../../../src/openapi/organizations/BaseOrganizationsApiClient.ts"],"names":[],"mappings":";;;AAAA,eAAe;AACf,wDAAwD;AACxD,gDAAgD;AAChD,6DAA6D;AAC7D,iEAA8D;AAU9D,kEAA+D;AAC/D,8DAA2D;AAC3D,4DAAyD;AACzD,4DAAyD;AACzD,wDAAqD;AACrD,gEAA6D;AAC7D,0DAAuD;AACvD,gEAA6D;AAC7D,oEAAiE;AACjE,uEAAoE;AAEpE,gCAAgC;AAChC,MAAM,+BAAgC,SAAQ,gBAAgB,CAAC,qBAAqB;IAApF;;QACE,SAAI,GAAG,iCAAiC,CAAC;IAC3C,CAAC;CAAA;AACD;;;;;GAKG;AACH,MAAa,0BAA2B,SAAQ,qCAAiB;IAsB/D;;;;;OAKG;IACH,IAAI,SAAS;QACX,OAAO,IAAI,CAAC,kBAAkB,CAAC,mCAAgB,CAAC,CAAC;IACnD,CAAC;IACD;;;;;OAKG;IACH,IAAI,OAAO;QACT,OAAO,IAAI,CAAC,kBAAkB,CAAC,+BAAc,CAAC,CAAC;IACjD,CAAC;IACD;;;;;OAKG;IACH,IAAI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AAE,gDAAgD;gBACvG,kEAAkE,EAAE,2DAA2D;gBAC/H,kEAAkE,EAAE,2DAA2D;gBAC/H,oCAAoC,EAAE,kCAAkC;gBACxE,oCAAoC,EAAE,mBAAmB;aAC1D;SACF,CAAC,CAAC;QACO,cAAS,GAAG,GAAG,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC;QAkFtC,IAAI,CAAC,MAAM,CAAC,UAAU,iCACjB,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE,GACxB,OAAO,EACV,CAAC;IACL,CAAC;CACF;AA5GD,gEA4GC;AACD,iDAAuB,CAAC,aAAa,CAAC,+BAA+B,CAAC,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { CommonValidationSchemaStorage } from "../../core/CommonValidationSchemaStorage";
|
|
2
|
-
import { type Error } from "./
|
|
2
|
+
import { type Error } from "./groups";
|
|
3
3
|
import { type ZodTypeAny } from "zod";
|
|
4
4
|
/** @category Models */
|
|
5
5
|
export interface ApplicationError extends Record<string, unknown> {
|
|
@@ -206,15 +206,50 @@ export type ResourceId = string;
|
|
|
206
206
|
* @category Models
|
|
207
207
|
*/
|
|
208
208
|
export type ResourceOwner = string;
|
|
209
|
+
/** @category Models */
|
|
210
|
+
export interface RoleAssociation extends Record<string, unknown> {
|
|
211
|
+
/**
|
|
212
|
+
* Use the [Get Workspaces
|
|
213
|
+
* API](https://developer.atlassian.com/cloud/admin/organization/rest/api-group-workspaces/#api-v2-orgs-orgid-workspaces-post)
|
|
214
|
+
* to get an id.
|
|
215
|
+
* Only the following resources are valid:
|
|
216
|
+
* - avp
|
|
217
|
+
* - beacon
|
|
218
|
+
* - bitbucket
|
|
219
|
+
* - compass
|
|
220
|
+
* - confluence
|
|
221
|
+
* - jira-admin
|
|
222
|
+
* - jira-core
|
|
223
|
+
* - jira-software
|
|
224
|
+
* - jira-servicedesk
|
|
225
|
+
* - jira-product-discovery
|
|
226
|
+
* - loom
|
|
227
|
+
* - mercury
|
|
228
|
+
* - opsgenie
|
|
229
|
+
* - platform
|
|
230
|
+
* - statuspage
|
|
231
|
+
* - townsquare
|
|
232
|
+
* - trello
|
|
233
|
+
* - unified-help
|
|
234
|
+
*
|
|
235
|
+
* @example
|
|
236
|
+
* ```
|
|
237
|
+
* ari:cloud:jira::site/70ef3a32-d0da-4e09-b35e-0109f91969c3
|
|
238
|
+
* ```
|
|
239
|
+
*/
|
|
240
|
+
resource: string;
|
|
241
|
+
/** Role to assign to a resource */
|
|
242
|
+
role: "atlassian/user" | "atlassian/admin" | "atlassian/guest" | "atlassian/customer" | "atlassian/contributor" | "atlassian/basic" | "atlassian/stakeholder";
|
|
243
|
+
}
|
|
209
244
|
/**
|
|
210
|
-
*
|
|
211
|
-
* permissions of the user against resources within the organization.
|
|
245
|
+
* The roles assigned to the resource ID.
|
|
212
246
|
*
|
|
213
247
|
* @example
|
|
214
248
|
* ```
|
|
215
249
|
* [
|
|
216
250
|
* "atlassian/org-admin",
|
|
217
|
-
* "atlassian/site-admin"
|
|
251
|
+
* "atlassian/site-admin",
|
|
252
|
+
* "atlassian/user-access-admin"
|
|
218
253
|
* ]
|
|
219
254
|
* ```
|
|
220
255
|
* @category Models
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.registerCommonValidationSchemas = void 0;
|
|
4
|
-
const
|
|
4
|
+
const groups_1 = require("./groups");
|
|
5
5
|
const zod_1 = require("zod");
|
|
6
6
|
function registerCommonValidationSchemas(validationSchemaStorage) {
|
|
7
7
|
validationSchemaStorage.register("ApplicationError", zod_1.z.object({
|
|
@@ -59,8 +59,12 @@ function registerCommonValidationSchemas(validationSchemaStorage) {
|
|
|
59
59
|
}).catchall(zod_1.z.unknown()).describe("ProxyError"));
|
|
60
60
|
validationSchemaStorage.register("ResourceId", zod_1.z.string().describe("ResourceId"));
|
|
61
61
|
validationSchemaStorage.register("ResourceOwner", zod_1.z.string().describe("ResourceOwner"));
|
|
62
|
+
validationSchemaStorage.register("RoleAssociation", zod_1.z.object({
|
|
63
|
+
resource: zod_1.z.string(),
|
|
64
|
+
role: zod_1.z.enum(["atlassian/user", "atlassian/admin", "atlassian/guest", "atlassian/customer", "atlassian/contributor", "atlassian/basic", "atlassian/stakeholder"])
|
|
65
|
+
}).catchall(zod_1.z.unknown()).describe("RoleAssociation"));
|
|
62
66
|
validationSchemaStorage.register("RoleIds", zod_1.z.array(zod_1.z.string()).describe("RoleIds"));
|
|
63
|
-
validationSchemaStorage.registerOnce([
|
|
67
|
+
validationSchemaStorage.registerOnce([groups_1.registerGroupsValidationSchemas]);
|
|
64
68
|
}
|
|
65
69
|
exports.registerCommonValidationSchemas = registerCommonValidationSchemas;
|
|
66
70
|
//# sourceMappingURL=common.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.js","sourceRoot":"","sources":["../../../../src/openapi/organizations/models/common.ts"],"names":[],"mappings":";;;AAIA,
|
|
1
|
+
{"version":3,"file":"common.js","sourceRoot":"","sources":["../../../../src/openapi/organizations/models/common.ts"],"names":[],"mappings":";;;AAIA,qCAAuE;AACvE,6BAAyC;AA+PzC,SAAgB,+BAA+B,CAAC,uBAAkE;IAChH,uBAAuB,CAAC,QAAQ,CAAC,kBAAkB,EAAE,OAAC,CAAC,MAAM,CAAC;QAC5D,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QACzB,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QAC7B,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QAC3B,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QAC5B,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;KAC9B,CAAC,CAAC,QAAQ,CAAC,OAAC,CAAC,OAAO,EAAE,CAAC,CAAC,QAAQ,C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CommonValidationS
|
|
|
2
2
|
import { type LinkPageCursor } from "./common";
|
|
3
3
|
import { type ZodTypeAny } from "zod";
|
|
4
4
|
/** @category Models */
|
|
5
|
-
export interface AddGroupMembershipInput extends Record<string, unknown> {
|
|
6
|
-
/**
|
|
7
|
-
* Unique ID of the user's account that you are adding to the group.
|
|
8
|
-
* Use the [Jira User Search
|
|
9
|
-
* API](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-users/#api-rest-api-3-users-search-get)
|
|
10
|
-
* to get the accountId (if Jira is available for your Organization). **Jira APIs
|
|
11
|
-
* use a different [authentication method
|
|
12
|
-
* ](https://developer.atlassian.com/cloud/jira/platform/basic-auth-for-rest-apis/).**
|
|
13
|
-
* If you don’t have Jira, export a .csv of the user list. Learn how to [export
|
|
14
|
-
* users from a
|
|
15
|
-
* site](https://support.atlassian.com/organization-administration/docs/export-users-from-a-site/).
|
|
16
|
-
*/
|
|
17
|
-
account_id: string;
|
|
18
|
-
}
|
|
19
|
-
/** @category Models */
|
|
20
|
-
export interface ApiError extends Record<string, unknown> {
|
|
21
|
-
/** A unique identifier for this particular occurrence of the error. */
|
|
22
|
-
id?: string;
|
|
23
|
-
/**
|
|
24
|
-
* The code of the error. It can be one of the following values: -
|
|
25
|
-
* ADMIN-UAM-400-1: Bad Request - ADMIN-UAM-400-2: Inactive user -
|
|
26
|
-
* ADMIN-UAM-400-3: Invalid Role for Resource - ADMIN-UAM-400-4: Product not
|
|
27
|
-
* licensed - ADMIN-UAM-401-1: Unauthenticated - ADMIN-UAM-401-2: Unauthorized -
|
|
28
|
-
* ADMIN-UAM-402-1: Payment Required - ADMIN-UAM-403-1: Forbidden -
|
|
29
|
-
* ADMIN-UAM-403-2: Not allowed to manage the org - ADMIN-UAM-404-1: Unknown
|
|
30
|
-
* Resource - ADMIN-UAM-404-2: Organization not found - ADMIN-UAM-404-3: Group Not
|
|
31
|
-
* Found - ADMIN-UAM-405-1: Method Not Supported - ADMIN-UAM-409-1: Cannot create
|
|
32
|
-
* default group - ADMIN-UAM-409-2: Resource Conflicts - ADMIN-UAM-409-3: Product
|
|
33
|
-
* License Limit Exceeded - ADMIN-UAM-415-1: Unsupported Media Type -
|
|
34
|
-
* ADMIN-UAM-500-1: Internal Error
|
|
35
|
-
*/
|
|
36
|
-
code?: string;
|
|
37
|
-
/** The HTTP status code applicable to this error. */
|
|
38
|
-
status?: string;
|
|
39
|
-
/** Human-readable summary of the error. */
|
|
40
|
-
title?: string;
|
|
41
|
-
/**
|
|
42
|
-
* Human-readable explanation specific to this occurrence of the error, and a
|
|
43
|
-
* suggested action to resolve it.
|
|
44
|
-
*/
|
|
45
|
-
detail?: string | null;
|
|
46
|
-
}
|
|
47
|
-
/** @category Models */
|
|
48
|
-
export interface ApiErrorResponse extends Record<string, unknown> {
|
|
49
|
-
errors?: ApiError[];
|
|
50
|
-
}
|
|
51
|
-
/** @category Models */
|
|
52
|
-
export interface CreateGroupInput extends Record<string, unknown> {
|
|
53
|
-
/** The name of the group. */
|
|
54
|
-
name: string;
|
|
55
|
-
/** The description of the group. */
|
|
56
|
-
description?: string;
|
|
57
|
-
}
|
|
58
|
-
/**
|
|
59
|
-
* Cursors for REST API pagination
|
|
60
|
-
*
|
|
61
|
-
* @category Models
|
|
62
|
-
*/
|
|
63
|
-
export interface CursorNextPageModel extends Record<string, unknown> {
|
|
64
|
-
/** Cursor to fetch next page */
|
|
65
|
-
next?: string;
|
|
66
|
-
}
|
|
67
|
-
/** @category Models */
|
|
68
|
-
export interface Error extends Record<string, unknown> {
|
|
69
|
-
/**
|
|
70
|
-
* @example
|
|
71
|
-
* ```
|
|
72
|
-
* <string>
|
|
73
|
-
* ```
|
|
74
|
-
*/
|
|
75
|
-
id?: string;
|
|
76
|
-
/**
|
|
77
|
-
* @example
|
|
78
|
-
* ```
|
|
79
|
-
* <string>
|
|
80
|
-
* ```
|
|
81
|
-
*/
|
|
82
|
-
status?: string;
|
|
83
|
-
/**
|
|
84
|
-
* @example
|
|
85
|
-
* ```
|
|
86
|
-
* <string>
|
|
87
|
-
* ```
|
|
88
|
-
*/
|
|
89
|
-
code?: string;
|
|
90
|
-
/**
|
|
91
|
-
* @example
|
|
92
|
-
* ```
|
|
93
|
-
* <string>
|
|
94
|
-
* ```
|
|
95
|
-
*/
|
|
96
|
-
title?: string;
|
|
97
|
-
/**
|
|
98
|
-
* @example
|
|
99
|
-
* ```
|
|
100
|
-
* <string>
|
|
101
|
-
* ```
|
|
102
|
-
*/
|
|
103
|
-
detail?: string;
|
|
104
|
-
}
|
|
105
|
-
/** @category Models */
|
|
106
|
-
export interface GroupRoleAssignmentInput extends Record<string, unknown> {
|
|
107
|
-
roleAssociations: RoleAssociation[];
|
|
108
|
-
}
|
|
109
|
-
/** @category Models */
|
|
110
|
-
export interface InviteApiRequest extends Record<string, unknown> {
|
|
111
|
-
email: string;
|
|
112
|
-
permissionRule?: RoleAssociation;
|
|
113
|
-
sendNotification?: boolean;
|
|
114
|
-
notificationText?: string;
|
|
115
|
-
}
|
|
116
|
-
/** @category Models */
|
|
117
5
|
export interface MultiDirectoryUserDirectory extends Record<string, unknown> {
|
|
118
6
|
/**
|
|
119
7
|
* Unique directory identifier.
|
|
@@ -168,95 +56,4 @@ export interface MultiDirectoryUserDirectoryPage extends Record<string, unknown>
|
|
|
168
56
|
/** Links for a paginated response, for use in a cursor parameter. */
|
|
169
57
|
links?: LinkPageCursor;
|
|
170
58
|
}
|
|
171
|
-
/** @category Models */
|
|
172
|
-
export interface RoleApiRequest extends Record<string, unknown> {
|
|
173
|
-
/** Role to assign/revoke for a user */
|
|
174
|
-
role: "atlassian/user" | "atlassian/user-access-admin" | "atlassian/admin" | "atlassian/guest" | "atlassian/contributor" | "atlassian/customer" | "atlassian/basic" | "atlassian/stakeholder" | "atlassian/site-admin" | "atlassian/org-admin";
|
|
175
|
-
/**
|
|
176
|
-
* Use the [Get Workspaces
|
|
177
|
-
* API](https://developer.atlassian.com/cloud/admin/organization/rest/api-group-workspaces/#api-v2-orgs-orgid-workspaces-post)
|
|
178
|
-
* to get an id.
|
|
179
|
-
* Resource is required for all roles other than org-admin. Any resource passed
|
|
180
|
-
* for org-admin shall be ignored
|
|
181
|
-
*
|
|
182
|
-
* @example
|
|
183
|
-
* ```
|
|
184
|
-
* ari:cloud:platform::site/70ef3a32-d0da-4e09-b35e-0109f91969c3
|
|
185
|
-
* ```
|
|
186
|
-
*/
|
|
187
|
-
resource?: string;
|
|
188
|
-
}
|
|
189
|
-
/** @category Models */
|
|
190
|
-
export interface RoleAssociation extends Record<string, unknown> {
|
|
191
|
-
/**
|
|
192
|
-
* Use the [Get Workspaces
|
|
193
|
-
* API](https://developer.atlassian.com/cloud/admin/organization/rest/api-group-workspaces/#api-v2-orgs-orgid-workspaces-post)
|
|
194
|
-
* to get an id.
|
|
195
|
-
* Only the following resources are valid:
|
|
196
|
-
* - avp
|
|
197
|
-
* - beacon
|
|
198
|
-
* - bitbucket
|
|
199
|
-
* - compass
|
|
200
|
-
* - confluence
|
|
201
|
-
* - jira-admin
|
|
202
|
-
* - jira-core
|
|
203
|
-
* - jira-software
|
|
204
|
-
* - jira-servicedesk
|
|
205
|
-
* - jira-product-discovery
|
|
206
|
-
* - loom
|
|
207
|
-
* - mercury
|
|
208
|
-
* - opsgenie
|
|
209
|
-
* - platform
|
|
210
|
-
* - statuspage
|
|
211
|
-
* - townsquare
|
|
212
|
-
* - trello
|
|
213
|
-
* - unified-help
|
|
214
|
-
*
|
|
215
|
-
* @example
|
|
216
|
-
* ```
|
|
217
|
-
* ari:cloud:jira::site/70ef3a32-d0da-4e09-b35e-0109f91969c3
|
|
218
|
-
* ```
|
|
219
|
-
*/
|
|
220
|
-
resource: string;
|
|
221
|
-
/** Role to assign to a resource */
|
|
222
|
-
role: "atlassian/user" | "atlassian/admin" | "atlassian/guest" | "atlassian/customer" | "atlassian/contributor" | "atlassian/basic" | "atlassian/stakeholder";
|
|
223
|
-
}
|
|
224
|
-
/** @category Models */
|
|
225
|
-
export interface UserProductAccessActivityPage extends Record<string, unknown> {
|
|
226
|
-
data?: UserProductAccessModel;
|
|
227
|
-
/** Cursors for REST API pagination */
|
|
228
|
-
links?: CursorNextPageModel;
|
|
229
|
-
}
|
|
230
|
-
/** @category Models */
|
|
231
|
-
export interface UserProductAccessModel extends Record<string, unknown> {
|
|
232
|
-
/** Products accessed by the user */
|
|
233
|
-
product_access: UserProductLastActive[];
|
|
234
|
-
/**
|
|
235
|
-
* Date the user was added to the organization in ISO 8601 format (UTC), with the
|
|
236
|
-
* format yyyy-MM-dd.
|
|
237
|
-
*/
|
|
238
|
-
added_to_org?: string | null;
|
|
239
|
-
/**
|
|
240
|
-
* Date and timestamp the user was added to the organization in ISO 8601 format
|
|
241
|
-
* (UTC), with the format yyyy-MM-dd'T'HH:mm:ss'Z'.
|
|
242
|
-
*/
|
|
243
|
-
added_to_org_timestamp?: string | null;
|
|
244
|
-
}
|
|
245
|
-
/** @category Models */
|
|
246
|
-
export interface UserProductLastActive extends Record<string, unknown> {
|
|
247
|
-
/** Unique ID of the Product instance */
|
|
248
|
-
id: string;
|
|
249
|
-
/** Unique key of the Product */
|
|
250
|
-
key: "jira-software" | "jira-service-desk" | "jira-core" | "jira-ops" | "stride" | "hipchat" | "confluence" | "bitbucket" | "trello" | "opsgenie" | "statuspage";
|
|
251
|
-
/**
|
|
252
|
-
* Last active date for a product in ISO 8601 format (UTC), with the format
|
|
253
|
-
* yyyy-MM-dd.
|
|
254
|
-
*/
|
|
255
|
-
last_active?: string;
|
|
256
|
-
/**
|
|
257
|
-
* Last active timestamp for a product in ISO 8601 format (UTC), with the format
|
|
258
|
-
* yyyy-MM-dd'T'HH:mm:ss'Z'.
|
|
259
|
-
*/
|
|
260
|
-
last_active_timestamp?: string;
|
|
261
|
-
}
|
|
262
59
|
export declare function registerDirectoryValidationSchemas(validationSchemaStorage: CommonValidationSchemaStorage<ZodTypeAny>): void;
|
|
@@ -4,42 +4,6 @@ exports.registerDirectoryValidationSchemas = void 0;
|
|
|
4
4
|
const common_1 = require("./common");
|
|
5
5
|
const zod_1 = require("zod");
|
|
6
6
|
function registerDirectoryValidationSchemas(validationSchemaStorage) {
|
|
7
|
-
validationSchemaStorage.register("AddGroupMembershipInput", zod_1.z.object({
|
|
8
|
-
account_id: zod_1.z.string()
|
|
9
|
-
}).catchall(zod_1.z.unknown()).describe("AddGroupMembershipInput"));
|
|
10
|
-
validationSchemaStorage.register("ApiError", zod_1.z.object({
|
|
11
|
-
id: zod_1.z.string().optional(),
|
|
12
|
-
code: zod_1.z.string().optional(),
|
|
13
|
-
status: zod_1.z.string().optional(),
|
|
14
|
-
title: zod_1.z.string().optional(),
|
|
15
|
-
detail: zod_1.z.nullable(zod_1.z.string()).optional()
|
|
16
|
-
}).catchall(zod_1.z.unknown()).describe("ApiError"));
|
|
17
|
-
validationSchemaStorage.register("ApiErrorResponse", zod_1.z.object({
|
|
18
|
-
errors: zod_1.z.array(validationSchemaStorage.lazy("ApiError")).optional()
|
|
19
|
-
}).catchall(zod_1.z.unknown()).describe("ApiErrorResponse"));
|
|
20
|
-
validationSchemaStorage.register("CreateGroupInput", zod_1.z.object({
|
|
21
|
-
name: zod_1.z.string(),
|
|
22
|
-
description: zod_1.z.string().optional()
|
|
23
|
-
}).catchall(zod_1.z.unknown()).describe("CreateGroupInput"));
|
|
24
|
-
validationSchemaStorage.register("CursorNextPageModel", zod_1.z.object({
|
|
25
|
-
next: zod_1.z.string().optional()
|
|
26
|
-
}).catchall(zod_1.z.unknown()).describe("CursorNextPageModel"));
|
|
27
|
-
validationSchemaStorage.register("Error", zod_1.z.object({
|
|
28
|
-
id: zod_1.z.string().optional(),
|
|
29
|
-
status: zod_1.z.string().optional(),
|
|
30
|
-
code: zod_1.z.string().optional(),
|
|
31
|
-
title: zod_1.z.string().optional(),
|
|
32
|
-
detail: zod_1.z.string().optional()
|
|
33
|
-
}).catchall(zod_1.z.unknown()).describe("Error"));
|
|
34
|
-
validationSchemaStorage.register("GroupRoleAssignmentInput", zod_1.z.object({
|
|
35
|
-
roleAssociations: zod_1.z.array(validationSchemaStorage.lazy("RoleAssociation"))
|
|
36
|
-
}).catchall(zod_1.z.unknown()).describe("GroupRoleAssignmentInput"));
|
|
37
|
-
validationSchemaStorage.register("InviteApiRequest", zod_1.z.object({
|
|
38
|
-
email: zod_1.z.string(),
|
|
39
|
-
permissionRule: validationSchemaStorage.lazy("RoleAssociation").optional(),
|
|
40
|
-
sendNotification: zod_1.z.boolean().optional(),
|
|
41
|
-
notificationText: zod_1.z.string().optional()
|
|
42
|
-
}).catchall(zod_1.z.unknown()).describe("InviteApiRequest"));
|
|
43
7
|
validationSchemaStorage.register("MultiDirectoryUserDirectory", zod_1.z.object({
|
|
44
8
|
directoryId: zod_1.z.string().optional(),
|
|
45
9
|
name: zod_1.z.string().optional(),
|
|
@@ -49,29 +13,6 @@ function registerDirectoryValidationSchemas(validationSchemaStorage) {
|
|
|
49
13
|
data: zod_1.z.array(validationSchemaStorage.lazy("MultiDirectoryUserDirectory")).optional(),
|
|
50
14
|
links: validationSchemaStorage.lazy("LinkPageCursor").optional()
|
|
51
15
|
}).catchall(zod_1.z.unknown()).describe("MultiDirectoryUserDirectoryPage"));
|
|
52
|
-
validationSchemaStorage.register("RoleApiRequest", zod_1.z.object({
|
|
53
|
-
role: zod_1.z.enum(["atlassian/user", "atlassian/user-access-admin", "atlassian/admin", "atlassian/guest", "atlassian/contributor", "atlassian/customer", "atlassian/basic", "atlassian/stakeholder", "atlassian/site-admin", "atlassian/org-admin"]),
|
|
54
|
-
resource: zod_1.z.string().optional()
|
|
55
|
-
}).catchall(zod_1.z.unknown()).describe("RoleApiRequest"));
|
|
56
|
-
validationSchemaStorage.register("RoleAssociation", zod_1.z.object({
|
|
57
|
-
resource: zod_1.z.string(),
|
|
58
|
-
role: zod_1.z.enum(["atlassian/user", "atlassian/admin", "atlassian/guest", "atlassian/customer", "atlassian/contributor", "atlassian/basic", "atlassian/stakeholder"])
|
|
59
|
-
}).catchall(zod_1.z.unknown()).describe("RoleAssociation"));
|
|
60
|
-
validationSchemaStorage.register("UserProductAccessActivityPage", zod_1.z.object({
|
|
61
|
-
data: validationSchemaStorage.lazy("UserProductAccessModel").optional(),
|
|
62
|
-
links: validationSchemaStorage.lazy("CursorNextPageModel").optional()
|
|
63
|
-
}).catchall(zod_1.z.unknown()).describe("UserProductAccessActivityPage"));
|
|
64
|
-
validationSchemaStorage.register("UserProductAccessModel", zod_1.z.object({
|
|
65
|
-
product_access: zod_1.z.array(validationSchemaStorage.lazy("UserProductLastActive")),
|
|
66
|
-
added_to_org: zod_1.z.nullable(zod_1.z.string()).optional(),
|
|
67
|
-
added_to_org_timestamp: zod_1.z.nullable(zod_1.z.string()).optional()
|
|
68
|
-
}).catchall(zod_1.z.unknown()).describe("UserProductAccessModel"));
|
|
69
|
-
validationSchemaStorage.register("UserProductLastActive", zod_1.z.object({
|
|
70
|
-
id: zod_1.z.string(),
|
|
71
|
-
key: zod_1.z.enum(["jira-software", "jira-service-desk", "jira-core", "jira-ops", "stride", "hipchat", "confluence", "bitbucket", "trello", "opsgenie", "statuspage"]),
|
|
72
|
-
last_active: zod_1.z.string().optional(),
|
|
73
|
-
last_active_timestamp: zod_1.z.string().optional()
|
|
74
|
-
}).catchall(zod_1.z.unknown()).describe("UserProductLastActive"));
|
|
75
16
|
validationSchemaStorage.registerOnce([common_1.registerCommonValidationSchemas]);
|
|
76
17
|
}
|
|
77
18
|
exports.registerDirectoryValidationSchemas = registerDirectoryValidationSchemas;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"directory.js","sourceRoot":"","sources":["../../../../src/openapi/organizations/models/directory.ts"],"names":[],"mappings":";;;AAIA,qCAAgF;AAChF,6BAAyC;
|
|
1
|
+
{"version":3,"file":"directory.js","sourceRoot":"","sources":["../../../../src/openapi/organizations/models/directory.ts"],"names":[],"mappings":";;;AAIA,qCAAgF;AAChF,6BAAyC;AAwDzC,SAAgB,kCAAkC,CAAC,uBAAkE;IACnH,uBAAuB,CAAC,QAAQ,CAAC,6BAA6B,EAAE,OAAC,CAAC,MAAM,CAAC;QACvE,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QAClC,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QAC3B,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;KAC5B,CAAC,CAAC,QAAQ,CAAC,OAAC,CAAC,OAAO,EAAE,CAAC,CAAC,QAAQ,CAAC,6BAA6B,CAAC,CAAC,CAAC;IAClE,uBAAuB,CAAC,QAAQ,CAAC,iCAAiC,EAAE,OAAC,CAAC,MAAM,CAAC;QAC3E,IAAI,EAAE,OAAC,CAAC,KAAK,CAAC,uBAAuB,CAAC,IAAI,CAAC,6BAA6B,CAAC,CAAC,CAAC,QAAQ,EAAE;QACrF,KAAK,EAAE,uBAAuB,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,QAAQ,EAAE;KACjE,CAAC,CAAC,QAAQ,CAAC,OAAC,CAAC,OAAO,EAAE,CAAC,CAAC,QAAQ,CAAC,iCAAiC,CAAC,CAAC,CAAC;IACtE,uBAAuB,CAAC,YAAY,CAAC,CAAC,wCAA+B,CAAC,CAAC,CAAC;AAC1E,CAAC;AAXD,gFAWC"}
|
|
@@ -1,6 +1,66 @@
|
|
|
1
1
|
import type { CommonValidationSchemaStorage } from "../../core/CommonValidationSchemaStorage";
|
|
2
|
-
import { type LinkPageModel, type LinkSelfCursor, type LinkPageCursor, type ResourceId, type ResourceOwner, type RoleIds } from "./common";
|
|
2
|
+
import { type RoleAssociation, type LinkPageModel, type LinkSelfCursor, type LinkPageCursor, type ResourceId, type ResourceOwner, type RoleIds } from "./common";
|
|
3
3
|
import { type ZodTypeAny } from "zod";
|
|
4
|
+
/** @category Models */
|
|
5
|
+
export interface AddGroupMembershipInput extends Record<string, unknown> {
|
|
6
|
+
/**
|
|
7
|
+
* Unique ID of the user's account that you are adding to the group.
|
|
8
|
+
* Use the [Jira User Search
|
|
9
|
+
* API](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-users/#api-rest-api-3-users-search-get)
|
|
10
|
+
* to get the accountId (if Jira is available for your Organization). **Jira APIs
|
|
11
|
+
* use a different [authentication method
|
|
12
|
+
* ](https://developer.atlassian.com/cloud/jira/platform/basic-auth-for-rest-apis/).**
|
|
13
|
+
* If you don’t have Jira, export a .csv of the user list. Learn how to [export
|
|
14
|
+
* users from a
|
|
15
|
+
* site](https://support.atlassian.com/organization-administration/docs/export-users-from-a-site/).
|
|
16
|
+
*/
|
|
17
|
+
account_id: string;
|
|
18
|
+
}
|
|
19
|
+
/** @category Models */
|
|
20
|
+
export interface CreateGroupInput extends Record<string, unknown> {
|
|
21
|
+
/** The name of the group. */
|
|
22
|
+
name: string;
|
|
23
|
+
/** The description of the group. */
|
|
24
|
+
description?: string;
|
|
25
|
+
}
|
|
26
|
+
/** @category Models */
|
|
27
|
+
export interface Error extends Record<string, unknown> {
|
|
28
|
+
/**
|
|
29
|
+
* @example
|
|
30
|
+
* ```
|
|
31
|
+
* <string>
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
34
|
+
id?: string;
|
|
35
|
+
/**
|
|
36
|
+
* @example
|
|
37
|
+
* ```
|
|
38
|
+
* <string>
|
|
39
|
+
* ```
|
|
40
|
+
*/
|
|
41
|
+
status?: string;
|
|
42
|
+
/**
|
|
43
|
+
* @example
|
|
44
|
+
* ```
|
|
45
|
+
* <string>
|
|
46
|
+
* ```
|
|
47
|
+
*/
|
|
48
|
+
code?: string;
|
|
49
|
+
/**
|
|
50
|
+
* @example
|
|
51
|
+
* ```
|
|
52
|
+
* <string>
|
|
53
|
+
* ```
|
|
54
|
+
*/
|
|
55
|
+
title?: string;
|
|
56
|
+
/**
|
|
57
|
+
* @example
|
|
58
|
+
* ```
|
|
59
|
+
* <string>
|
|
60
|
+
* ```
|
|
61
|
+
*/
|
|
62
|
+
detail?: string;
|
|
63
|
+
}
|
|
4
64
|
/**
|
|
5
65
|
* The number of objects associated with the group.
|
|
6
66
|
*
|
|
@@ -30,6 +90,10 @@ export interface GroupNames extends Record<string, unknown> {
|
|
|
30
90
|
contains?: string;
|
|
31
91
|
}
|
|
32
92
|
/** @category Models */
|
|
93
|
+
export interface GroupRoleAssignmentInput extends Record<string, unknown> {
|
|
94
|
+
roleAssociations: RoleAssociation[];
|
|
95
|
+
}
|
|
96
|
+
/** @category Models */
|
|
33
97
|
export interface GroupsSearchPage extends Record<string, unknown> {
|
|
34
98
|
data: PublicGroup[];
|
|
35
99
|
/** Links for a Paginated response */
|
|
@@ -304,19 +368,18 @@ export interface MultiDirectoryGroupRoleAssignment extends Record<string, unknow
|
|
|
304
368
|
*/
|
|
305
369
|
defaultRole?: string | null;
|
|
306
370
|
/**
|
|
307
|
-
*
|
|
371
|
+
* The roles assigned to the resource ID.
|
|
308
372
|
*
|
|
309
373
|
* @example
|
|
310
374
|
* ```
|
|
311
375
|
* [
|
|
312
376
|
* "atlassian/org-admin",
|
|
313
377
|
* "atlassian/site-admin",
|
|
314
|
-
* "atlassian/user-access-admin"
|
|
315
|
-
* "atlassian/ai-access"
|
|
378
|
+
* "atlassian/user-access-admin"
|
|
316
379
|
* ]
|
|
317
380
|
* ```
|
|
318
381
|
*/
|
|
319
|
-
roles?: RoleIds
|
|
382
|
+
roles?: RoleIds;
|
|
320
383
|
}
|
|
321
384
|
/** @category Models */
|
|
322
385
|
export interface MultiDirectoryGroupRoleAssignmentPage extends Record<string, unknown> {
|
|
@@ -4,6 +4,20 @@ exports.registerGroupsValidationSchemas = void 0;
|
|
|
4
4
|
const common_1 = require("./common");
|
|
5
5
|
const zod_1 = require("zod");
|
|
6
6
|
function registerGroupsValidationSchemas(validationSchemaStorage) {
|
|
7
|
+
validationSchemaStorage.register("AddGroupMembershipInput", zod_1.z.object({
|
|
8
|
+
account_id: zod_1.z.string()
|
|
9
|
+
}).catchall(zod_1.z.unknown()).describe("AddGroupMembershipInput"));
|
|
10
|
+
validationSchemaStorage.register("CreateGroupInput", zod_1.z.object({
|
|
11
|
+
name: zod_1.z.string(),
|
|
12
|
+
description: zod_1.z.string().optional()
|
|
13
|
+
}).catchall(zod_1.z.unknown()).describe("CreateGroupInput"));
|
|
14
|
+
validationSchemaStorage.register("Error", zod_1.z.object({
|
|
15
|
+
id: zod_1.z.string().optional(),
|
|
16
|
+
status: zod_1.z.string().optional(),
|
|
17
|
+
code: zod_1.z.string().optional(),
|
|
18
|
+
title: zod_1.z.string().optional(),
|
|
19
|
+
detail: zod_1.z.string().optional()
|
|
20
|
+
}).catchall(zod_1.z.unknown()).describe("Error"));
|
|
7
21
|
validationSchemaStorage.register("GroupCounts", zod_1.z.object({
|
|
8
22
|
users: zod_1.z.number().int().optional(),
|
|
9
23
|
resources: zod_1.z.number().int().optional()
|
|
@@ -20,6 +34,9 @@ function registerGroupsValidationSchemas(validationSchemaStorage) {
|
|
|
20
34
|
}).optional(),
|
|
21
35
|
contains: zod_1.z.string().optional()
|
|
22
36
|
}).catchall(zod_1.z.unknown()).describe("GroupNames"));
|
|
37
|
+
validationSchemaStorage.register("GroupRoleAssignmentInput", zod_1.z.object({
|
|
38
|
+
roleAssociations: zod_1.z.array(validationSchemaStorage.lazy("RoleAssociation"))
|
|
39
|
+
}).catchall(zod_1.z.unknown()).describe("GroupRoleAssignmentInput"));
|
|
23
40
|
validationSchemaStorage.register("GroupsSearchPage", zod_1.z.object({
|
|
24
41
|
data: zod_1.z.array(validationSchemaStorage.lazy("PublicGroup")),
|
|
25
42
|
links: validationSchemaStorage.lazy("LinkPageModel").optional()
|
|
@@ -94,7 +111,7 @@ function registerGroupsValidationSchemas(validationSchemaStorage) {
|
|
|
94
111
|
resourceId: validationSchemaStorage.lazy("ResourceId").optional(),
|
|
95
112
|
resourceOwner: validationSchemaStorage.lazy("ResourceOwner").optional(),
|
|
96
113
|
defaultRole: zod_1.z.nullable(zod_1.z.string()).optional(),
|
|
97
|
-
roles:
|
|
114
|
+
roles: validationSchemaStorage.lazy("RoleIds").optional()
|
|
98
115
|
}).catchall(zod_1.z.unknown()).describe("MultiDirectoryGroupRoleAssignment"));
|
|
99
116
|
validationSchemaStorage.register("MultiDirectoryGroupRoleAssignmentPage", zod_1.z.object({
|
|
100
117
|
data: zod_1.z.array(validationSchemaStorage.lazy("MultiDirectoryGroupRoleAssignment")).optional(),
|