@resolution/organizations-api-client 0.14.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.
Files changed (75) hide show
  1. package/LICENSE.md +19 -0
  2. package/README.md +110 -0
  3. package/lib/index.d.ts +39 -0
  4. package/lib/index.js +46 -0
  5. package/lib/index.js.map +1 -0
  6. package/lib/openapi/core/CommonHttpClient.d.ts +316 -0
  7. package/lib/openapi/core/CommonHttpClient.js +639 -0
  8. package/lib/openapi/core/CommonHttpClient.js.map +1 -0
  9. package/lib/openapi/core/CommonHttpService.d.ts +26 -0
  10. package/lib/openapi/core/CommonHttpService.js +40 -0
  11. package/lib/openapi/core/CommonHttpService.js.map +1 -0
  12. package/lib/openapi/core/CommonValidationSchemaStorage.d.ts +35 -0
  13. package/lib/openapi/core/CommonValidationSchemaStorage.js +63 -0
  14. package/lib/openapi/core/CommonValidationSchemaStorage.js.map +1 -0
  15. package/lib/openapi/organizations/BaseOrganizationsApiClient.d.ts +94 -0
  16. package/lib/openapi/organizations/BaseOrganizationsApiClient.js +127 -0
  17. package/lib/openapi/organizations/BaseOrganizationsApiClient.js.map +1 -0
  18. package/lib/openapi/organizations/models/common.d.ts +222 -0
  19. package/lib/openapi/organizations/models/common.js +66 -0
  20. package/lib/openapi/organizations/models/common.js.map +1 -0
  21. package/lib/openapi/organizations/models/directory.d.ts +151 -0
  22. package/lib/openapi/organizations/models/directory.js +58 -0
  23. package/lib/openapi/organizations/models/directory.js.map +1 -0
  24. package/lib/openapi/organizations/models/domains.d.ts +52 -0
  25. package/lib/openapi/organizations/models/domains.js +35 -0
  26. package/lib/openapi/organizations/models/domains.js.map +1 -0
  27. package/lib/openapi/organizations/models/events.d.ts +280 -0
  28. package/lib/openapi/organizations/models/events.js +129 -0
  29. package/lib/openapi/organizations/models/events.js.map +1 -0
  30. package/lib/openapi/organizations/models/groups.d.ts +297 -0
  31. package/lib/openapi/organizations/models/groups.js +114 -0
  32. package/lib/openapi/organizations/models/groups.js.map +1 -0
  33. package/lib/openapi/organizations/models/orgs.d.ts +52 -0
  34. package/lib/openapi/organizations/models/orgs.js +36 -0
  35. package/lib/openapi/organizations/models/orgs.js.map +1 -0
  36. package/lib/openapi/organizations/models/policies.d.ts +169 -0
  37. package/lib/openapi/organizations/models/policies.js +101 -0
  38. package/lib/openapi/organizations/models/policies.js.map +1 -0
  39. package/lib/openapi/organizations/models/users.d.ts +477 -0
  40. package/lib/openapi/organizations/models/users.js +178 -0
  41. package/lib/openapi/organizations/models/users.js.map +1 -0
  42. package/lib/openapi/organizations/models/workspaces.d.ts +200 -0
  43. package/lib/openapi/organizations/models/workspaces.js +106 -0
  44. package/lib/openapi/organizations/models/workspaces.js.map +1 -0
  45. package/lib/openapi/organizations/services/DirectoryService.d.ts +637 -0
  46. package/lib/openapi/organizations/services/DirectoryService.js +599 -0
  47. package/lib/openapi/organizations/services/DirectoryService.js.map +1 -0
  48. package/lib/openapi/organizations/services/DomainsService.d.ts +51 -0
  49. package/lib/openapi/organizations/services/DomainsService.js +89 -0
  50. package/lib/openapi/organizations/services/DomainsService.js.map +1 -0
  51. package/lib/openapi/organizations/services/EventsService.d.ts +142 -0
  52. package/lib/openapi/organizations/services/EventsService.js +187 -0
  53. package/lib/openapi/organizations/services/EventsService.js.map +1 -0
  54. package/lib/openapi/organizations/services/GroupsService.d.ts +268 -0
  55. package/lib/openapi/organizations/services/GroupsService.js +210 -0
  56. package/lib/openapi/organizations/services/GroupsService.js.map +1 -0
  57. package/lib/openapi/organizations/services/OrgsService.d.ts +38 -0
  58. package/lib/openapi/organizations/services/OrgsService.js +79 -0
  59. package/lib/openapi/organizations/services/OrgsService.js.map +1 -0
  60. package/lib/openapi/organizations/services/PoliciesService.d.ts +172 -0
  61. package/lib/openapi/organizations/services/PoliciesService.js +272 -0
  62. package/lib/openapi/organizations/services/PoliciesService.js.map +1 -0
  63. package/lib/openapi/organizations/services/UsersService.d.ts +310 -0
  64. package/lib/openapi/organizations/services/UsersService.js +214 -0
  65. package/lib/openapi/organizations/services/UsersService.js.map +1 -0
  66. package/lib/openapi/organizations/services/ValidateService.d.ts +25 -0
  67. package/lib/openapi/organizations/services/ValidateService.js +38 -0
  68. package/lib/openapi/organizations/services/ValidateService.js.map +1 -0
  69. package/lib/openapi/organizations/services/WorkspacesService.d.ts +78 -0
  70. package/lib/openapi/organizations/services/WorkspacesService.js +63 -0
  71. package/lib/openapi/organizations/services/WorkspacesService.js.map +1 -0
  72. package/lib/openapi/organizations/validationSchemaStorage.d.ts +3 -0
  73. package/lib/openapi/organizations/validationSchemaStorage.js +134 -0
  74. package/lib/openapi/organizations/validationSchemaStorage.js.map +1 -0
  75. package/package.json +47 -0
@@ -0,0 +1,51 @@
1
+ import { CommonHttpService } from "../../core/CommonHttpService";
2
+ import { type DomainPage, type Domain } from "../models/domains";
3
+ /**
4
+ * Domain APIs
5
+ *
6
+ * @see https://developer.atlassian.com/cloud/admin/organization/rest/api-group-domains
7
+ * @category Services
8
+ */
9
+ export declare class DomainsService extends CommonHttpService {
10
+ /**
11
+ * Returns information about a single verified domain by ID.
12
+ *
13
+ * #### Scopes
14
+ * **[OAuth 2.0 scopes](/cloud/admin/scopes/) required:** `read:domains:admin`
15
+ *
16
+ * @returns Successful operation
17
+ * @path GET `/v1/orgs/{orgId}/domains/{domainId}`
18
+ * @see https://developer.atlassian.com/cloud/admin/organization/rest/api-group-domains#api-v1-orgs-orgid-domains-domainid-get
19
+ * @param params
20
+ */
21
+ getDomainById: ({ orgId, domainId }: {
22
+ /**
23
+ * Your organization is identified by a Unique ID. You get your organization ID
24
+ * and Organization API key simultaneously.
25
+ */
26
+ orgId: string;
27
+ /** ID of the domain to return */
28
+ domainId: string;
29
+ }) => Promise<Domain>;
30
+ /**
31
+ * Returns a list of domains in an organization one page at a time.
32
+ *
33
+ * #### Scopes
34
+ * **[OAuth 2.0 scopes](/cloud/admin/scopes/) required:** `read:domains:admin`
35
+ *
36
+ * @returns Successful operation
37
+ * @path GET `/v1/orgs/{orgId}/domains`
38
+ * @see https://developer.atlassian.com/cloud/admin/organization/rest/api-group-domains#api-v1-orgs-orgid-domains-get
39
+ * @param params
40
+ */
41
+ getDomains: ({ orgId, cursor }: {
42
+ /**
43
+ * Your organization is identified by a Unique ID. You get your organization ID
44
+ * and Organization API key simultaneously.
45
+ */
46
+ orgId: string;
47
+ /** Sets the starting point for the page of results to return. */
48
+ cursor?: string | undefined;
49
+ }) => Promise<DomainPage>;
50
+ protected static initialize(): void;
51
+ }
@@ -0,0 +1,89 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DomainsService = void 0;
4
+ // DO NOT EDIT!
5
+ // This file is generated by "api-typescript-generator".
6
+ // To update this file run "yarn build:openapi".
7
+ const commonHttpClient = require("../../core/CommonHttpClient");
8
+ const CommonHttpService_1 = require("../../core/CommonHttpService");
9
+ const domains_1 = require("../models/domains");
10
+ const validationSchemaStorage_1 = require("../validationSchemaStorage");
11
+ const zod_1 = require("zod");
12
+ /**
13
+ * Domain APIs
14
+ *
15
+ * @see https://developer.atlassian.com/cloud/admin/organization/rest/api-group-domains
16
+ * @category Services
17
+ */
18
+ class DomainsService extends CommonHttpService_1.CommonHttpService {
19
+ constructor() {
20
+ super(...arguments);
21
+ /**
22
+ * Returns information about a single verified domain by ID.
23
+ *
24
+ * #### Scopes
25
+ * **[OAuth 2.0 scopes](/cloud/admin/scopes/) required:** `read:domains:admin`
26
+ *
27
+ * @returns Successful operation
28
+ * @path GET `/v1/orgs/{orgId}/domains/{domainId}`
29
+ * @see https://developer.atlassian.com/cloud/admin/organization/rest/api-group-domains#api-v1-orgs-orgid-domains-domainid-get
30
+ * @param params
31
+ */
32
+ this.getDomainById = ({ orgId, domainId }) => {
33
+ return this.getClientInstance().request({
34
+ path: "/v1/orgs/{orgId}/domains/{domainId}",
35
+ method: "GET",
36
+ pathParams: {
37
+ orgId,
38
+ domainId
39
+ }
40
+ }).then(this.getClientInstance().responseHandler({
41
+ 200: {
42
+ "application/json": "json"
43
+ }
44
+ })).then(commonHttpClient.castResponse()).then(this.getClientInstance().validation(validationSchemaStorage_1.validationSchemaStorage.validator("DomainsService.getDomainById.response"))).then(commonHttpClient.getBody);
45
+ };
46
+ /**
47
+ * Returns a list of domains in an organization one page at a time.
48
+ *
49
+ * #### Scopes
50
+ * **[OAuth 2.0 scopes](/cloud/admin/scopes/) required:** `read:domains:admin`
51
+ *
52
+ * @returns Successful operation
53
+ * @path GET `/v1/orgs/{orgId}/domains`
54
+ * @see https://developer.atlassian.com/cloud/admin/organization/rest/api-group-domains#api-v1-orgs-orgid-domains-get
55
+ * @param params
56
+ */
57
+ this.getDomains = ({ orgId, cursor }) => {
58
+ return this.getClientInstance().request({
59
+ path: "/v1/orgs/{orgId}/domains",
60
+ method: "GET",
61
+ pathParams: {
62
+ orgId
63
+ },
64
+ query: {
65
+ cursor
66
+ }
67
+ }).then(this.getClientInstance().responseHandler({
68
+ 200: {
69
+ "application/json": "json"
70
+ }
71
+ })).then(commonHttpClient.castResponse()).then(this.getClientInstance().validation(validationSchemaStorage_1.validationSchemaStorage.validator("DomainsService.getDomains.response"))).then(commonHttpClient.getBody);
72
+ };
73
+ }
74
+ static initialize() {
75
+ validationSchemaStorage_1.validationSchemaStorage.registerExtensible("DomainsService.getDomains.response", zod_1.z.object({
76
+ status: zod_1.z.literal(200),
77
+ mediaType: zod_1.z.literal("application/json"),
78
+ body: validationSchemaStorage_1.validationSchemaStorage.lazy("DomainPage")
79
+ }).describe("DomainsService.getDomains.response"));
80
+ validationSchemaStorage_1.validationSchemaStorage.registerExtensible("DomainsService.getDomainById.response", zod_1.z.object({
81
+ status: zod_1.z.literal(200),
82
+ mediaType: zod_1.z.literal("application/json"),
83
+ body: validationSchemaStorage_1.validationSchemaStorage.lazy("Domain")
84
+ }).describe("DomainsService.getDomainById.response"));
85
+ validationSchemaStorage_1.validationSchemaStorage.registerOnce([domains_1.registerDomainsValidationSchemas]);
86
+ }
87
+ }
88
+ exports.DomainsService = DomainsService;
89
+ //# sourceMappingURL=DomainsService.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DomainsService.js","sourceRoot":"","sources":["../../../../src/openapi/organizations/services/DomainsService.ts"],"names":[],"mappings":";;;AAAA,eAAe;AACf,wDAAwD;AACxD,gDAAgD;AAChD,gEAAgE;AAChE,oEAAiE;AACjE,+CAAmG;AACnG,wEAAqE;AACrE,6BAAwB;AACxB;;;;;GAKG;AACH,MAAa,cAAe,SAAQ,qCAAiB;IAArD;;QACE;;;;;;;;;;WAUG;QACH,kBAAa,GAAG,CAAC,EACf,KAAK,EACL,QAAQ,EAST,EAAmB,EAAE;YACpB,OAAO,IAAI,CAAC,iBAAiB,EAAE,CAAC,OAAO,CAAC;gBACtC,IAAI,EAAE,qCAAqC;gBAC3C,MAAM,EAAE,KAAK;gBACb,UAAU,EAAE;oBACV,KAAK;oBACL,QAAQ;iBACT;aACF,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,iBAAiB,EAAE,CAAC,eAAe,CAAC;gBAC/C,GAAG,EAAE;oBACH,kBAAkB,EAAE,MAAM;iBAC3B;aACF,CAAC,CAAC,CAAC,IAAI,CAAC,gBAAgB,CAAC,YAAY,EAIlC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,iBAAiB,EAAE,CAAC,UAAU,CAAC,iDAAuB,CAAC,SAAS,CAAC,uCAAuC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC;QAC7J,CAAC,CAAC;QACF;;;;;;;;;;WAUG;QACH,eAAU,GAAG,CAAC,EACZ,KAAK,EACL,MAAM,EASP,EAAuB,EAAE;YACxB,OAAO,IAAI,CAAC,iBAAiB,EAAE,CAAC,OAAO,CAAC;gBACtC,IAAI,EAAE,0BAA0B;gBAChC,MAAM,EAAE,KAAK;gBACb,UAAU,EAAE;oBACV,KAAK;iBACN;gBACD,KAAK,EAAE;oBACL,MAAM;iBACP;aACF,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,iBAAiB,EAAE,CAAC,eAAe,CAAC;gBAC/C,GAAG,EAAE;oBACH,kBAAkB,EAAE,MAAM;iBAC3B;aACF,CAAC,CAAC,CAAC,IAAI,CAAC,gBAAgB,CAAC,YAAY,EAIlC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,iBAAiB,EAAE,CAAC,UAAU,CAAC,iDAAuB,CAAC,SAAS,CAAC,oCAAoC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC;QAC1J,CAAC,CAAC;IAcJ,CAAC;IAbW,MAAM,CAAC,UAAU;QACzB,iDAAuB,CAAC,kBAAkB,CAAC,oCAAoC,EAAE,OAAC,CAAC,MAAM,CAAC;YACxF,MAAM,EAAE,OAAC,CAAC,OAAO,CAAC,GAAG,CAAC;YACtB,SAAS,EAAE,OAAC,CAAC,OAAO,CAAC,kBAAkB,CAAC;YACxC,IAAI,EAAE,iDAAuB,CAAC,IAAI,CAAC,YAAY,CAAC;SACjD,CAAC,CAAC,QAAQ,CAAC,oCAAoC,CAAC,CAAC,CAAC;QACnD,iDAAuB,CAAC,kBAAkB,CAAC,uCAAuC,EAAE,OAAC,CAAC,MAAM,CAAC;YAC3F,MAAM,EAAE,OAAC,CAAC,OAAO,CAAC,GAAG,CAAC;YACtB,SAAS,EAAE,OAAC,CAAC,OAAO,CAAC,kBAAkB,CAAC;YACxC,IAAI,EAAE,iDAAuB,CAAC,IAAI,CAAC,QAAQ,CAAC;SAC7C,CAAC,CAAC,QAAQ,CAAC,uCAAuC,CAAC,CAAC,CAAC;QACtD,iDAAuB,CAAC,YAAY,CAAC,CAAC,0CAAgC,CAAC,CAAC,CAAC;IAC3E,CAAC;CACF;AAhGD,wCAgGC"}
@@ -0,0 +1,142 @@
1
+ import { CommonHttpService } from "../../core/CommonHttpService";
2
+ import { type EventActions, type EventPage, type PollingEventPage, type Event } from "../models/events";
3
+ /**
4
+ * Events APIs
5
+ *
6
+ * @see https://developer.atlassian.com/cloud/admin/organization/rest/api-group-events
7
+ * @category Services
8
+ */
9
+ export declare class EventsService extends CommonHttpService {
10
+ /**
11
+ * Returns information localized event actions
12
+ *
13
+ * @returns Successful operation
14
+ * @path GET `/v1/orgs/{orgId}/event-actions`
15
+ * @see https://developer.atlassian.com/cloud/admin/organization/rest/api-group-events#api-v1-orgs-orgid-event-actions-get
16
+ * @param params
17
+ */
18
+ getEventActions: ({ orgId }: {
19
+ /**
20
+ * Your organization is identified by a Unique ID. You get your organization ID
21
+ * and Organization API key simultaneously.
22
+ */
23
+ orgId: string;
24
+ }) => Promise<EventActions>;
25
+ /**
26
+ * Returns information about a single event by ID.
27
+ *
28
+ * @returns Successful operation
29
+ * @path GET `/v1/orgs/{orgId}/events/{eventId}`
30
+ * @see https://developer.atlassian.com/cloud/admin/organization/rest/api-group-events#api-v1-orgs-orgid-events-eventid-get
31
+ * @param params
32
+ */
33
+ getEventById: ({ orgId, eventId }: {
34
+ /**
35
+ * Your organization is identified by a Unique ID. You get your organization ID
36
+ * and Organization API key simultaneously.
37
+ */
38
+ orgId: string;
39
+ /** ID of the event to return */
40
+ eventId: string;
41
+ }) => Promise<Event>;
42
+ /**
43
+ * Returns a filtered list of audit log events for an organization. Use this
44
+ * endpoint for more granular and detailed querying.
45
+ * If you simply need to paginate through all events, consider using the
46
+ * [/events-stream](https://developer.atlassian.com/cloud/admin/organization/rest/api-group-events/#api-v1-orgs-orgid-events-stream-get)
47
+ * endpoint.
48
+ * These rate limits for this endpoint be lowered effective end of May 2025 as
49
+ * follows:
50
+ * - *Rate limit per user*: *10* requests per minute
51
+ * - *Rate limit per API path*: *10* requests per minute
52
+ *
53
+ * Please migrate to the polling API to guarantee uninterrupted service for use
54
+ * cases involving a high request rate.
55
+ *
56
+ * #### Scopes
57
+ * **[OAuth 2.0 scopes](/cloud/admin/scopes/) required:** **`Not supported (use
58
+ * API Key without scopes)`**
59
+ *
60
+ * @returns Successful operation
61
+ * @path GET `/v1/orgs/{orgId}/events`
62
+ * @see https://developer.atlassian.com/cloud/admin/organization/rest/api-group-events#api-v1-orgs-orgid-events-get
63
+ * @param params
64
+ */
65
+ getEvents: ({ orgId, cursor, q, from, to, action, actor, ip, product, location, limit }: {
66
+ /**
67
+ * Your organization is identified by a Unique ID. You get your organization ID
68
+ * and Organization API key simultaneously.
69
+ */
70
+ orgId: string;
71
+ /** Sets the starting point for the page of results to return */
72
+ cursor?: string | undefined;
73
+ /** Single query term for searching events. */
74
+ q?: string | undefined;
75
+ /**
76
+ * The earliest date and time of the event represented as a UNIX epoch time in
77
+ * milliseconds.
78
+ */
79
+ from?: string | undefined;
80
+ /**
81
+ * The latest date and time of the event represented as a UNIX epoch time in
82
+ * milliseconds.
83
+ */
84
+ to?: string | undefined;
85
+ /** A query filter that returns events of a specific action type. */
86
+ action?: string | undefined;
87
+ /** A query filter that returns events by one or more specific actors. */
88
+ actor?: string[] | undefined;
89
+ /** A query filter that returns events by one or more specific ip addresses. */
90
+ ip?: string[] | undefined;
91
+ /** A query filter that returns events by one or more specific products. */
92
+ product?: ("jira" | "confluence" | "bitbucket" | "guard_detect" | "loom")[] | undefined;
93
+ /**
94
+ * A query filter that returns events by one or more specific locations. Of
95
+ * format: `[ { "city": "<CityName>", "countryName": "<CountryName>" }, ... ]`
96
+ */
97
+ location?: string | undefined;
98
+ /** The maximum number of events to return per page. */
99
+ limit?: number | undefined;
100
+ }) => Promise<EventPage>;
101
+ /**
102
+ * Returns a paginated list of audit logs events for an organization. Use this
103
+ * endpoint if you want to retrieve events in a simple, paginated manner with
104
+ * time-based filtering.
105
+ * If you need more advanced filtering, refer to the
106
+ * [/events](https://developer.atlassian.com/cloud/admin/organization/rest/api-group-events/#api-v1-orgs-orgid-events-get)
107
+ * endpoint.
108
+ *
109
+ * @returns Successful operation
110
+ * @path GET `/v1/orgs/{orgId}/events-stream`
111
+ * @see https://developer.atlassian.com/cloud/admin/organization/rest/api-group-events#api-v1-orgs-orgid-events-stream-get
112
+ * @param params
113
+ */
114
+ pollEvents: ({ orgId, cursor, from, to, limit, sortOrder }: {
115
+ /**
116
+ * Your organization is identified by a Unique ID. You get your organization ID
117
+ * and Organization API key simultaneously.
118
+ */
119
+ orgId: string;
120
+ /**
121
+ * Sets the starting point for the page of results to return. Can be used when
122
+ * last page is reached to poll for new events. The sort order is maintained in
123
+ * the cursor across requests.
124
+ */
125
+ cursor?: string | undefined;
126
+ /**
127
+ * The earliest date and time of the event represented as a UNIX epoch time in
128
+ * milliseconds.
129
+ */
130
+ from?: string | undefined;
131
+ /**
132
+ * The latest date and time of the event represented as a UNIX epoch time in
133
+ * milliseconds.
134
+ */
135
+ to?: string | undefined;
136
+ /** The maximum number of events to return per page. */
137
+ limit?: number | undefined;
138
+ /** The order used to sort events by processing time. Defaults to ascending. */
139
+ sortOrder?: "desc" | "asc" | undefined;
140
+ }) => Promise<PollingEventPage>;
141
+ protected static initialize(): void;
142
+ }
@@ -0,0 +1,187 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EventsService = void 0;
4
+ // DO NOT EDIT!
5
+ // This file is generated by "api-typescript-generator".
6
+ // To update this file run "yarn build:openapi".
7
+ const commonHttpClient = require("../../core/CommonHttpClient");
8
+ const CommonHttpService_1 = require("../../core/CommonHttpService");
9
+ const events_1 = require("../models/events");
10
+ const validationSchemaStorage_1 = require("../validationSchemaStorage");
11
+ const zod_1 = require("zod");
12
+ /**
13
+ * Events APIs
14
+ *
15
+ * @see https://developer.atlassian.com/cloud/admin/organization/rest/api-group-events
16
+ * @category Services
17
+ */
18
+ class EventsService extends CommonHttpService_1.CommonHttpService {
19
+ constructor() {
20
+ super(...arguments);
21
+ /**
22
+ * Returns information localized event actions
23
+ *
24
+ * @returns Successful operation
25
+ * @path GET `/v1/orgs/{orgId}/event-actions`
26
+ * @see https://developer.atlassian.com/cloud/admin/organization/rest/api-group-events#api-v1-orgs-orgid-event-actions-get
27
+ * @param params
28
+ */
29
+ this.getEventActions = ({ orgId }) => {
30
+ return this.getClientInstance().request({
31
+ path: "/v1/orgs/{orgId}/event-actions",
32
+ method: "GET",
33
+ pathParams: {
34
+ orgId
35
+ }
36
+ }).then(this.getClientInstance().responseHandler({
37
+ 200: {
38
+ "application/json": "json"
39
+ }
40
+ })).then(commonHttpClient.castResponse()).then(this.getClientInstance().validation(validationSchemaStorage_1.validationSchemaStorage.validator("EventsService.getEventActions.response"))).then(commonHttpClient.getBody);
41
+ };
42
+ /**
43
+ * Returns information about a single event by ID.
44
+ *
45
+ * @returns Successful operation
46
+ * @path GET `/v1/orgs/{orgId}/events/{eventId}`
47
+ * @see https://developer.atlassian.com/cloud/admin/organization/rest/api-group-events#api-v1-orgs-orgid-events-eventid-get
48
+ * @param params
49
+ */
50
+ this.getEventById = ({ orgId, eventId }) => {
51
+ return this.getClientInstance().request({
52
+ path: "/v1/orgs/{orgId}/events/{eventId}",
53
+ method: "GET",
54
+ pathParams: {
55
+ orgId,
56
+ eventId
57
+ }
58
+ }).then(this.getClientInstance().responseHandler({
59
+ 200: {
60
+ "application/json": "json"
61
+ }
62
+ })).then(commonHttpClient.castResponse()).then(this.getClientInstance().validation(validationSchemaStorage_1.validationSchemaStorage.validator("EventsService.getEventById.response"))).then(commonHttpClient.getBody);
63
+ };
64
+ /**
65
+ * Returns a filtered list of audit log events for an organization. Use this
66
+ * endpoint for more granular and detailed querying.
67
+ * If you simply need to paginate through all events, consider using the
68
+ * [/events-stream](https://developer.atlassian.com/cloud/admin/organization/rest/api-group-events/#api-v1-orgs-orgid-events-stream-get)
69
+ * endpoint.
70
+ * These rate limits for this endpoint be lowered effective end of May 2025 as
71
+ * follows:
72
+ * - *Rate limit per user*: *10* requests per minute
73
+ * - *Rate limit per API path*: *10* requests per minute
74
+ *
75
+ * Please migrate to the polling API to guarantee uninterrupted service for use
76
+ * cases involving a high request rate.
77
+ *
78
+ * #### Scopes
79
+ * **[OAuth 2.0 scopes](/cloud/admin/scopes/) required:** **`Not supported (use
80
+ * API Key without scopes)`**
81
+ *
82
+ * @returns Successful operation
83
+ * @path GET `/v1/orgs/{orgId}/events`
84
+ * @see https://developer.atlassian.com/cloud/admin/organization/rest/api-group-events#api-v1-orgs-orgid-events-get
85
+ * @param params
86
+ */
87
+ this.getEvents = ({ orgId, cursor, q, from, to, action, actor, ip, product, location, limit }) => {
88
+ return this.getClientInstance().request({
89
+ path: "/v1/orgs/{orgId}/events",
90
+ method: "GET",
91
+ pathParams: {
92
+ orgId
93
+ },
94
+ query: {
95
+ cursor,
96
+ q,
97
+ from,
98
+ to,
99
+ action,
100
+ actor,
101
+ ip,
102
+ product,
103
+ location,
104
+ limit
105
+ },
106
+ parameters: {
107
+ query: {
108
+ actor: {
109
+ explode: false
110
+ },
111
+ ip: {
112
+ explode: false
113
+ },
114
+ product: {
115
+ explode: false
116
+ },
117
+ location: {
118
+ explode: false
119
+ }
120
+ }
121
+ }
122
+ }).then(this.getClientInstance().responseHandler({
123
+ 200: {
124
+ "application/json": "json"
125
+ }
126
+ })).then(commonHttpClient.castResponse()).then(this.getClientInstance().validation(validationSchemaStorage_1.validationSchemaStorage.validator("EventsService.getEvents.response"))).then(commonHttpClient.getBody);
127
+ };
128
+ /**
129
+ * Returns a paginated list of audit logs events for an organization. Use this
130
+ * endpoint if you want to retrieve events in a simple, paginated manner with
131
+ * time-based filtering.
132
+ * If you need more advanced filtering, refer to the
133
+ * [/events](https://developer.atlassian.com/cloud/admin/organization/rest/api-group-events/#api-v1-orgs-orgid-events-get)
134
+ * endpoint.
135
+ *
136
+ * @returns Successful operation
137
+ * @path GET `/v1/orgs/{orgId}/events-stream`
138
+ * @see https://developer.atlassian.com/cloud/admin/organization/rest/api-group-events#api-v1-orgs-orgid-events-stream-get
139
+ * @param params
140
+ */
141
+ this.pollEvents = ({ orgId, cursor, from, to, limit, sortOrder }) => {
142
+ return this.getClientInstance().request({
143
+ path: "/v1/orgs/{orgId}/events-stream",
144
+ method: "GET",
145
+ pathParams: {
146
+ orgId
147
+ },
148
+ query: {
149
+ cursor,
150
+ from,
151
+ to,
152
+ limit,
153
+ sortOrder
154
+ }
155
+ }).then(this.getClientInstance().responseHandler({
156
+ 200: {
157
+ "application/json": "json"
158
+ }
159
+ })).then(commonHttpClient.castResponse()).then(this.getClientInstance().validation(validationSchemaStorage_1.validationSchemaStorage.validator("EventsService.pollEvents.response"))).then(commonHttpClient.getBody);
160
+ };
161
+ }
162
+ static initialize() {
163
+ validationSchemaStorage_1.validationSchemaStorage.registerExtensible("EventsService.getEventActions.response", zod_1.z.object({
164
+ status: zod_1.z.literal(200),
165
+ mediaType: zod_1.z.literal("application/json"),
166
+ body: validationSchemaStorage_1.validationSchemaStorage.lazy("EventActions")
167
+ }).describe("EventsService.getEventActions.response"));
168
+ validationSchemaStorage_1.validationSchemaStorage.registerExtensible("EventsService.getEvents.response", zod_1.z.object({
169
+ status: zod_1.z.literal(200),
170
+ mediaType: zod_1.z.literal("application/json"),
171
+ body: validationSchemaStorage_1.validationSchemaStorage.lazy("EventPage")
172
+ }).describe("EventsService.getEvents.response"));
173
+ validationSchemaStorage_1.validationSchemaStorage.registerExtensible("EventsService.pollEvents.response", zod_1.z.object({
174
+ status: zod_1.z.literal(200),
175
+ mediaType: zod_1.z.literal("application/json"),
176
+ body: validationSchemaStorage_1.validationSchemaStorage.lazy("PollingEventPage")
177
+ }).describe("EventsService.pollEvents.response"));
178
+ validationSchemaStorage_1.validationSchemaStorage.registerExtensible("EventsService.getEventById.response", zod_1.z.object({
179
+ status: zod_1.z.literal(200),
180
+ mediaType: zod_1.z.literal("application/json"),
181
+ body: validationSchemaStorage_1.validationSchemaStorage.lazy("Event")
182
+ }).describe("EventsService.getEventById.response"));
183
+ validationSchemaStorage_1.validationSchemaStorage.registerOnce([events_1.registerEventsValidationSchemas]);
184
+ }
185
+ }
186
+ exports.EventsService = EventsService;
187
+ //# sourceMappingURL=EventsService.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EventsService.js","sourceRoot":"","sources":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