@incident-io/sdk 2.15.0 → 2.17.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 (37) hide show
  1. package/dist/cjs/apis/OnCallNotificationPausesV2Api.d.ts +71 -0
  2. package/dist/cjs/apis/OnCallNotificationPausesV2Api.js +150 -0
  3. package/dist/cjs/apis/index.d.ts +1 -0
  4. package/dist/cjs/apis/index.js +1 -0
  5. package/dist/cjs/models/AuditLogTelemetryDataSourceAccessPolicyChangedMetadataV2V2.d.ts +50 -0
  6. package/dist/cjs/models/AuditLogTelemetryDataSourceAccessPolicyChangedMetadataV2V2.js +64 -0
  7. package/dist/cjs/models/AuditLogsTelemetryDataSourceAccessPolicyChangedV2.d.ts +58 -0
  8. package/dist/cjs/models/AuditLogsTelemetryDataSourceAccessPolicyChangedV2.js +79 -0
  9. package/dist/cjs/models/OnCallNotificationPauseV2.d.ts +54 -0
  10. package/dist/cjs/models/OnCallNotificationPauseV2.js +73 -0
  11. package/dist/cjs/models/OnCallNotificationPausesListResultV2.d.ts +36 -0
  12. package/dist/cjs/models/OnCallNotificationPausesListResultV2.js +56 -0
  13. package/dist/cjs/models/OnCallNotificationPausesShowResultV2.d.ts +31 -0
  14. package/dist/cjs/models/OnCallNotificationPausesShowResultV2.js +51 -0
  15. package/dist/cjs/models/index.d.ts +5 -0
  16. package/dist/cjs/models/index.js +5 -0
  17. package/dist/cjs/version.d.ts +1 -1
  18. package/dist/cjs/version.js +1 -1
  19. package/dist/esm/apis/OnCallNotificationPausesV2Api.d.ts +71 -0
  20. package/dist/esm/apis/OnCallNotificationPausesV2Api.js +113 -0
  21. package/dist/esm/apis/index.d.ts +1 -0
  22. package/dist/esm/apis/index.js +1 -0
  23. package/dist/esm/models/AuditLogTelemetryDataSourceAccessPolicyChangedMetadataV2V2.d.ts +50 -0
  24. package/dist/esm/models/AuditLogTelemetryDataSourceAccessPolicyChangedMetadataV2V2.js +57 -0
  25. package/dist/esm/models/AuditLogsTelemetryDataSourceAccessPolicyChangedV2.d.ts +58 -0
  26. package/dist/esm/models/AuditLogsTelemetryDataSourceAccessPolicyChangedV2.js +72 -0
  27. package/dist/esm/models/OnCallNotificationPauseV2.d.ts +54 -0
  28. package/dist/esm/models/OnCallNotificationPauseV2.js +66 -0
  29. package/dist/esm/models/OnCallNotificationPausesListResultV2.d.ts +36 -0
  30. package/dist/esm/models/OnCallNotificationPausesListResultV2.js +49 -0
  31. package/dist/esm/models/OnCallNotificationPausesShowResultV2.d.ts +31 -0
  32. package/dist/esm/models/OnCallNotificationPausesShowResultV2.js +44 -0
  33. package/dist/esm/models/index.d.ts +5 -0
  34. package/dist/esm/models/index.js +5 -0
  35. package/dist/esm/version.d.ts +1 -1
  36. package/dist/esm/version.js +1 -1
  37. package/package.json +1 -1
@@ -0,0 +1,71 @@
1
+ /**
2
+ * incident.io
3
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import * as runtime from '../runtime.js';
13
+ import { type OnCallNotificationPausesListResultV2 } from '../models/OnCallNotificationPausesListResultV2.js';
14
+ import { type OnCallNotificationPausesShowResultV2 } from '../models/OnCallNotificationPausesShowResultV2.js';
15
+ export interface OnCallNotificationPausesV2ListRequest {
16
+ /**
17
+ * Only return pauses that end after this time. Defaults to now, so by default only active and upcoming pauses are returned.
18
+ */
19
+ from?: Date;
20
+ /**
21
+ * Only return pauses that start before this time
22
+ */
23
+ to?: Date;
24
+ /**
25
+ * Integer number of records to return
26
+ */
27
+ page_size?: number;
28
+ /**
29
+ * A pause's ID. This endpoint will return a list of pauses after this ID in relation to the API response order.
30
+ */
31
+ after?: string;
32
+ }
33
+ export interface OnCallNotificationPausesV2ShowRequest {
34
+ /**
35
+ * The pause's ID
36
+ */
37
+ id: string;
38
+ }
39
+ /**
40
+ *
41
+ */
42
+ export declare class OnCallNotificationPausesV2Api extends runtime.BaseAPI {
43
+ /**
44
+ * Creates request options for onCallNotificationPausesV2List without sending the request
45
+ */
46
+ onCallNotificationPausesV2ListRequestOpts(requestParameters: OnCallNotificationPausesV2ListRequest): Promise<runtime.RequestOpts>;
47
+ /**
48
+ * List on-call notification pauses across the organisation. By default this returns pauses that are active now or scheduled for the future. Cancelled pauses are never returned, and pauses that were resumed early have ends_at set to when they were resumed.
49
+ * List On-call Notification Pauses V2
50
+ */
51
+ onCallNotificationPausesV2ListRaw(requestParameters: OnCallNotificationPausesV2ListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<OnCallNotificationPausesListResultV2>>;
52
+ /**
53
+ * List on-call notification pauses across the organisation. By default this returns pauses that are active now or scheduled for the future. Cancelled pauses are never returned, and pauses that were resumed early have ends_at set to when they were resumed.
54
+ * List On-call Notification Pauses V2
55
+ */
56
+ onCallNotificationPausesV2List(requestParameters?: OnCallNotificationPausesV2ListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OnCallNotificationPausesListResultV2>;
57
+ /**
58
+ * Creates request options for onCallNotificationPausesV2Show without sending the request
59
+ */
60
+ onCallNotificationPausesV2ShowRequestOpts(requestParameters: OnCallNotificationPausesV2ShowRequest): Promise<runtime.RequestOpts>;
61
+ /**
62
+ * Show a single on-call notification pause. Cancelled pauses are not found.
63
+ * Show On-call Notification Pauses V2
64
+ */
65
+ onCallNotificationPausesV2ShowRaw(requestParameters: OnCallNotificationPausesV2ShowRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<OnCallNotificationPausesShowResultV2>>;
66
+ /**
67
+ * Show a single on-call notification pause. Cancelled pauses are not found.
68
+ * Show On-call Notification Pauses V2
69
+ */
70
+ onCallNotificationPausesV2Show(requestParameters: OnCallNotificationPausesV2ShowRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OnCallNotificationPausesShowResultV2>;
71
+ }
@@ -0,0 +1,150 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * incident.io
6
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
+ *
8
+ * The version of the OpenAPI document: 1.0.0
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
16
+ if (k2 === undefined) k2 = k;
17
+ var desc = Object.getOwnPropertyDescriptor(m, k);
18
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
19
+ desc = { enumerable: true, get: function() { return m[k]; } };
20
+ }
21
+ Object.defineProperty(o, k2, desc);
22
+ }) : (function(o, m, k, k2) {
23
+ if (k2 === undefined) k2 = k;
24
+ o[k2] = m[k];
25
+ }));
26
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
27
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
28
+ }) : function(o, v) {
29
+ o["default"] = v;
30
+ });
31
+ var __importStar = (this && this.__importStar) || (function () {
32
+ var ownKeys = function(o) {
33
+ ownKeys = Object.getOwnPropertyNames || function (o) {
34
+ var ar = [];
35
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
36
+ return ar;
37
+ };
38
+ return ownKeys(o);
39
+ };
40
+ return function (mod) {
41
+ if (mod && mod.__esModule) return mod;
42
+ var result = {};
43
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
44
+ __setModuleDefault(result, mod);
45
+ return result;
46
+ };
47
+ })();
48
+ Object.defineProperty(exports, "__esModule", { value: true });
49
+ exports.OnCallNotificationPausesV2Api = void 0;
50
+ const runtime = __importStar(require("../runtime.js"));
51
+ const OnCallNotificationPausesListResultV2_js_1 = require("../models/OnCallNotificationPausesListResultV2.js");
52
+ const OnCallNotificationPausesShowResultV2_js_1 = require("../models/OnCallNotificationPausesShowResultV2.js");
53
+ /**
54
+ *
55
+ */
56
+ class OnCallNotificationPausesV2Api extends runtime.BaseAPI {
57
+ /**
58
+ * Creates request options for onCallNotificationPausesV2List without sending the request
59
+ */
60
+ async onCallNotificationPausesV2ListRequestOpts(requestParameters) {
61
+ const queryParameters = {};
62
+ if (requestParameters['from'] != null) {
63
+ queryParameters['from'] = runtime.serializeDateTime(requestParameters['from']);
64
+ }
65
+ if (requestParameters['to'] != null) {
66
+ queryParameters['to'] = runtime.serializeDateTime(requestParameters['to']);
67
+ }
68
+ if (requestParameters['page_size'] != null) {
69
+ queryParameters['page_size'] = requestParameters['page_size'];
70
+ }
71
+ if (requestParameters['after'] != null) {
72
+ queryParameters['after'] = requestParameters['after'];
73
+ }
74
+ const headerParameters = {};
75
+ if (this.configuration && this.configuration.accessToken) {
76
+ const token = this.configuration.accessToken;
77
+ const tokenString = await token("BearerAuth", []);
78
+ if (tokenString) {
79
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
80
+ }
81
+ }
82
+ let urlPath = `/v2/on_call_notification_pauses`;
83
+ return {
84
+ path: urlPath,
85
+ method: 'GET',
86
+ headers: headerParameters,
87
+ query: queryParameters,
88
+ };
89
+ }
90
+ /**
91
+ * List on-call notification pauses across the organisation. By default this returns pauses that are active now or scheduled for the future. Cancelled pauses are never returned, and pauses that were resumed early have ends_at set to when they were resumed.
92
+ * List On-call Notification Pauses V2
93
+ */
94
+ async onCallNotificationPausesV2ListRaw(requestParameters, initOverrides) {
95
+ const requestOptions = await this.onCallNotificationPausesV2ListRequestOpts(requestParameters);
96
+ const response = await this.request(requestOptions, initOverrides);
97
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, OnCallNotificationPausesListResultV2_js_1.OnCallNotificationPausesListResultV2FromJSON)(jsonValue));
98
+ }
99
+ /**
100
+ * List on-call notification pauses across the organisation. By default this returns pauses that are active now or scheduled for the future. Cancelled pauses are never returned, and pauses that were resumed early have ends_at set to when they were resumed.
101
+ * List On-call Notification Pauses V2
102
+ */
103
+ async onCallNotificationPausesV2List(requestParameters = {}, initOverrides) {
104
+ const response = await this.onCallNotificationPausesV2ListRaw(requestParameters, initOverrides);
105
+ return await response.value();
106
+ }
107
+ /**
108
+ * Creates request options for onCallNotificationPausesV2Show without sending the request
109
+ */
110
+ async onCallNotificationPausesV2ShowRequestOpts(requestParameters) {
111
+ if (requestParameters['id'] == null) {
112
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling onCallNotificationPausesV2Show().');
113
+ }
114
+ const queryParameters = {};
115
+ const headerParameters = {};
116
+ if (this.configuration && this.configuration.accessToken) {
117
+ const token = this.configuration.accessToken;
118
+ const tokenString = await token("BearerAuth", []);
119
+ if (tokenString) {
120
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
121
+ }
122
+ }
123
+ let urlPath = `/v2/on_call_notification_pauses/{id}`;
124
+ urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
125
+ return {
126
+ path: urlPath,
127
+ method: 'GET',
128
+ headers: headerParameters,
129
+ query: queryParameters,
130
+ };
131
+ }
132
+ /**
133
+ * Show a single on-call notification pause. Cancelled pauses are not found.
134
+ * Show On-call Notification Pauses V2
135
+ */
136
+ async onCallNotificationPausesV2ShowRaw(requestParameters, initOverrides) {
137
+ const requestOptions = await this.onCallNotificationPausesV2ShowRequestOpts(requestParameters);
138
+ const response = await this.request(requestOptions, initOverrides);
139
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, OnCallNotificationPausesShowResultV2_js_1.OnCallNotificationPausesShowResultV2FromJSON)(jsonValue));
140
+ }
141
+ /**
142
+ * Show a single on-call notification pause. Cancelled pauses are not found.
143
+ * Show On-call Notification Pauses V2
144
+ */
145
+ async onCallNotificationPausesV2Show(requestParameters, initOverrides) {
146
+ const response = await this.onCallNotificationPausesV2ShowRaw(requestParameters, initOverrides);
147
+ return await response.value();
148
+ }
149
+ }
150
+ exports.OnCallNotificationPausesV2Api = OnCallNotificationPausesV2Api;
@@ -44,6 +44,7 @@ export * from './IncidentUpdatesV2Api.js';
44
44
  export * from './IncidentsV1Api.js';
45
45
  export * from './IncidentsV2Api.js';
46
46
  export * from './MaintenanceWindowsV1Api.js';
47
+ export * from './OnCallNotificationPausesV2Api.js';
47
48
  export * from './PayConfigsV2Api.js';
48
49
  export * from './PayReportsV2Api.js';
49
50
  export * from './PoliciesV2Api.js';
@@ -62,6 +62,7 @@ __exportStar(require("./IncidentUpdatesV2Api.js"), exports);
62
62
  __exportStar(require("./IncidentsV1Api.js"), exports);
63
63
  __exportStar(require("./IncidentsV2Api.js"), exports);
64
64
  __exportStar(require("./MaintenanceWindowsV1Api.js"), exports);
65
+ __exportStar(require("./OnCallNotificationPausesV2Api.js"), exports);
65
66
  __exportStar(require("./PayConfigsV2Api.js"), exports);
66
67
  __exportStar(require("./PayReportsV2Api.js"), exports);
67
68
  __exportStar(require("./PoliciesV2Api.js"), exports);
@@ -0,0 +1,50 @@
1
+ /**
2
+ * incident.io
3
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ *
14
+ * @export
15
+ * @interface AuditLogTelemetryDataSourceAccessPolicyChangedMetadataV2V2
16
+ */
17
+ export interface AuditLogTelemetryDataSourceAccessPolicyChangedMetadataV2V2 {
18
+ /**
19
+ * The policy after the change, as JSON
20
+ */
21
+ after: string;
22
+ /**
23
+ * The policy before the change, as JSON; empty when the connector had no access policy
24
+ */
25
+ before: string;
26
+ /**
27
+ * Shared by every entry the same save produced, so the decision that changed and the access it reached can be read together
28
+ */
29
+ change_id: string;
30
+ /**
31
+ * The default notification channels after the change, as JSON; absent when they did not change, empty when there are none
32
+ */
33
+ notification_channels_after?: string;
34
+ /**
35
+ * The default notification channels before the change, as JSON; absent when they did not change, empty when there were none
36
+ */
37
+ notification_channels_before?: string;
38
+ /**
39
+ * ID of the user who saved the policy, absent when staff tooling saved it
40
+ */
41
+ set_by?: string;
42
+ }
43
+ /**
44
+ * Check if a given object implements the AuditLogTelemetryDataSourceAccessPolicyChangedMetadataV2V2 interface.
45
+ */
46
+ export declare function instanceOfAuditLogTelemetryDataSourceAccessPolicyChangedMetadataV2V2(value: object): value is AuditLogTelemetryDataSourceAccessPolicyChangedMetadataV2V2;
47
+ export declare function AuditLogTelemetryDataSourceAccessPolicyChangedMetadataV2V2FromJSON(json: any): AuditLogTelemetryDataSourceAccessPolicyChangedMetadataV2V2;
48
+ export declare function AuditLogTelemetryDataSourceAccessPolicyChangedMetadataV2V2FromJSONTyped(json: any, ignoreDiscriminator: boolean): AuditLogTelemetryDataSourceAccessPolicyChangedMetadataV2V2;
49
+ export declare function AuditLogTelemetryDataSourceAccessPolicyChangedMetadataV2V2ToJSON(json: any): AuditLogTelemetryDataSourceAccessPolicyChangedMetadataV2V2;
50
+ export declare function AuditLogTelemetryDataSourceAccessPolicyChangedMetadataV2V2ToJSONTyped(value?: AuditLogTelemetryDataSourceAccessPolicyChangedMetadataV2V2 | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,64 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * incident.io
6
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
+ *
8
+ * The version of the OpenAPI document: 1.0.0
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.instanceOfAuditLogTelemetryDataSourceAccessPolicyChangedMetadataV2V2 = instanceOfAuditLogTelemetryDataSourceAccessPolicyChangedMetadataV2V2;
17
+ exports.AuditLogTelemetryDataSourceAccessPolicyChangedMetadataV2V2FromJSON = AuditLogTelemetryDataSourceAccessPolicyChangedMetadataV2V2FromJSON;
18
+ exports.AuditLogTelemetryDataSourceAccessPolicyChangedMetadataV2V2FromJSONTyped = AuditLogTelemetryDataSourceAccessPolicyChangedMetadataV2V2FromJSONTyped;
19
+ exports.AuditLogTelemetryDataSourceAccessPolicyChangedMetadataV2V2ToJSON = AuditLogTelemetryDataSourceAccessPolicyChangedMetadataV2V2ToJSON;
20
+ exports.AuditLogTelemetryDataSourceAccessPolicyChangedMetadataV2V2ToJSONTyped = AuditLogTelemetryDataSourceAccessPolicyChangedMetadataV2V2ToJSONTyped;
21
+ /**
22
+ * Check if a given object implements the AuditLogTelemetryDataSourceAccessPolicyChangedMetadataV2V2 interface.
23
+ */
24
+ function instanceOfAuditLogTelemetryDataSourceAccessPolicyChangedMetadataV2V2(value) {
25
+ if (!('after' in value) || value['after'] === undefined)
26
+ return false;
27
+ if (!('before' in value) || value['before'] === undefined)
28
+ return false;
29
+ if (!('change_id' in value) || value['change_id'] === undefined)
30
+ return false;
31
+ return true;
32
+ }
33
+ function AuditLogTelemetryDataSourceAccessPolicyChangedMetadataV2V2FromJSON(json) {
34
+ return AuditLogTelemetryDataSourceAccessPolicyChangedMetadataV2V2FromJSONTyped(json, false);
35
+ }
36
+ function AuditLogTelemetryDataSourceAccessPolicyChangedMetadataV2V2FromJSONTyped(json, ignoreDiscriminator) {
37
+ if (json == null) {
38
+ return json;
39
+ }
40
+ return {
41
+ 'after': json['after'],
42
+ 'before': json['before'],
43
+ 'change_id': json['change_id'],
44
+ 'notification_channels_after': json['notification_channels_after'] == null ? undefined : json['notification_channels_after'],
45
+ 'notification_channels_before': json['notification_channels_before'] == null ? undefined : json['notification_channels_before'],
46
+ 'set_by': json['set_by'] == null ? undefined : json['set_by'],
47
+ };
48
+ }
49
+ function AuditLogTelemetryDataSourceAccessPolicyChangedMetadataV2V2ToJSON(json) {
50
+ return AuditLogTelemetryDataSourceAccessPolicyChangedMetadataV2V2ToJSONTyped(json, false);
51
+ }
52
+ function AuditLogTelemetryDataSourceAccessPolicyChangedMetadataV2V2ToJSONTyped(value, ignoreDiscriminator = false) {
53
+ if (value == null) {
54
+ return value;
55
+ }
56
+ return {
57
+ 'after': value['after'],
58
+ 'before': value['before'],
59
+ 'change_id': value['change_id'],
60
+ 'notification_channels_after': value['notification_channels_after'],
61
+ 'notification_channels_before': value['notification_channels_before'],
62
+ 'set_by': value['set_by'],
63
+ };
64
+ }
@@ -0,0 +1,58 @@
1
+ /**
2
+ * incident.io
3
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import type { AuditLogActorV2 } from './AuditLogActorV2.js';
13
+ import type { AuditLogTelemetryDataSourceAccessPolicyChangedMetadataV2V2 } from './AuditLogTelemetryDataSourceAccessPolicyChangedMetadataV2V2.js';
14
+ import type { AuditLogEntryContextV2 } from './AuditLogEntryContextV2.js';
15
+ import type { AuditLogTargetV2 } from './AuditLogTargetV2.js';
16
+ /**
17
+ *
18
+ * @export
19
+ * @interface AuditLogsTelemetryDataSourceAccessPolicyChangedV2
20
+ */
21
+ export interface AuditLogsTelemetryDataSourceAccessPolicyChangedV2 {
22
+ /**
23
+ * The type of log entry that this is
24
+ */
25
+ action: string;
26
+ /**
27
+ *
28
+ */
29
+ actor: AuditLogActorV2;
30
+ /**
31
+ *
32
+ */
33
+ context: AuditLogEntryContextV2;
34
+ /**
35
+ *
36
+ */
37
+ metadata: AuditLogTelemetryDataSourceAccessPolicyChangedMetadataV2V2;
38
+ /**
39
+ * When the entry occurred
40
+ */
41
+ occurred_at: Date;
42
+ /**
43
+ * The custom field that was created
44
+ */
45
+ targets: Array<AuditLogTargetV2>;
46
+ /**
47
+ * Which version the event is
48
+ */
49
+ version: number;
50
+ }
51
+ /**
52
+ * Check if a given object implements the AuditLogsTelemetryDataSourceAccessPolicyChangedV2 interface.
53
+ */
54
+ export declare function instanceOfAuditLogsTelemetryDataSourceAccessPolicyChangedV2(value: object): value is AuditLogsTelemetryDataSourceAccessPolicyChangedV2;
55
+ export declare function AuditLogsTelemetryDataSourceAccessPolicyChangedV2FromJSON(json: any): AuditLogsTelemetryDataSourceAccessPolicyChangedV2;
56
+ export declare function AuditLogsTelemetryDataSourceAccessPolicyChangedV2FromJSONTyped(json: any, ignoreDiscriminator: boolean): AuditLogsTelemetryDataSourceAccessPolicyChangedV2;
57
+ export declare function AuditLogsTelemetryDataSourceAccessPolicyChangedV2ToJSON(json: any): AuditLogsTelemetryDataSourceAccessPolicyChangedV2;
58
+ export declare function AuditLogsTelemetryDataSourceAccessPolicyChangedV2ToJSONTyped(value?: AuditLogsTelemetryDataSourceAccessPolicyChangedV2 | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,79 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * incident.io
6
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
+ *
8
+ * The version of the OpenAPI document: 1.0.0
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.instanceOfAuditLogsTelemetryDataSourceAccessPolicyChangedV2 = instanceOfAuditLogsTelemetryDataSourceAccessPolicyChangedV2;
17
+ exports.AuditLogsTelemetryDataSourceAccessPolicyChangedV2FromJSON = AuditLogsTelemetryDataSourceAccessPolicyChangedV2FromJSON;
18
+ exports.AuditLogsTelemetryDataSourceAccessPolicyChangedV2FromJSONTyped = AuditLogsTelemetryDataSourceAccessPolicyChangedV2FromJSONTyped;
19
+ exports.AuditLogsTelemetryDataSourceAccessPolicyChangedV2ToJSON = AuditLogsTelemetryDataSourceAccessPolicyChangedV2ToJSON;
20
+ exports.AuditLogsTelemetryDataSourceAccessPolicyChangedV2ToJSONTyped = AuditLogsTelemetryDataSourceAccessPolicyChangedV2ToJSONTyped;
21
+ const runtime_js_1 = require("../runtime.js");
22
+ const AuditLogActorV2_js_1 = require("./AuditLogActorV2.js");
23
+ const AuditLogTelemetryDataSourceAccessPolicyChangedMetadataV2V2_js_1 = require("./AuditLogTelemetryDataSourceAccessPolicyChangedMetadataV2V2.js");
24
+ const AuditLogEntryContextV2_js_1 = require("./AuditLogEntryContextV2.js");
25
+ const AuditLogTargetV2_js_1 = require("./AuditLogTargetV2.js");
26
+ /**
27
+ * Check if a given object implements the AuditLogsTelemetryDataSourceAccessPolicyChangedV2 interface.
28
+ */
29
+ function instanceOfAuditLogsTelemetryDataSourceAccessPolicyChangedV2(value) {
30
+ if (!('action' in value) || value['action'] === undefined)
31
+ return false;
32
+ if (!('actor' in value) || value['actor'] === undefined)
33
+ return false;
34
+ if (!('context' in value) || value['context'] === undefined)
35
+ return false;
36
+ if (!('metadata' in value) || value['metadata'] === undefined)
37
+ return false;
38
+ if (!('occurred_at' in value) || value['occurred_at'] === undefined)
39
+ return false;
40
+ if (!('targets' in value) || value['targets'] === undefined)
41
+ return false;
42
+ if (!('version' in value) || value['version'] === undefined)
43
+ return false;
44
+ return true;
45
+ }
46
+ function AuditLogsTelemetryDataSourceAccessPolicyChangedV2FromJSON(json) {
47
+ return AuditLogsTelemetryDataSourceAccessPolicyChangedV2FromJSONTyped(json, false);
48
+ }
49
+ function AuditLogsTelemetryDataSourceAccessPolicyChangedV2FromJSONTyped(json, ignoreDiscriminator) {
50
+ if (json == null) {
51
+ return json;
52
+ }
53
+ return {
54
+ 'action': json['action'],
55
+ 'actor': (0, AuditLogActorV2_js_1.AuditLogActorV2FromJSON)(json['actor']),
56
+ 'context': (0, AuditLogEntryContextV2_js_1.AuditLogEntryContextV2FromJSON)(json['context']),
57
+ 'metadata': (0, AuditLogTelemetryDataSourceAccessPolicyChangedMetadataV2V2_js_1.AuditLogTelemetryDataSourceAccessPolicyChangedMetadataV2V2FromJSON)(json['metadata']),
58
+ 'occurred_at': (json['occurred_at'] == null ? json['occurred_at'] : (0, runtime_js_1.parseDateTime)(json['occurred_at'])),
59
+ 'targets': (json['targets'].map(AuditLogTargetV2_js_1.AuditLogTargetV2FromJSON)),
60
+ 'version': json['version'],
61
+ };
62
+ }
63
+ function AuditLogsTelemetryDataSourceAccessPolicyChangedV2ToJSON(json) {
64
+ return AuditLogsTelemetryDataSourceAccessPolicyChangedV2ToJSONTyped(json, false);
65
+ }
66
+ function AuditLogsTelemetryDataSourceAccessPolicyChangedV2ToJSONTyped(value, ignoreDiscriminator = false) {
67
+ if (value == null) {
68
+ return value;
69
+ }
70
+ return {
71
+ 'action': value['action'],
72
+ 'actor': (0, AuditLogActorV2_js_1.AuditLogActorV2ToJSON)(value['actor']),
73
+ 'context': (0, AuditLogEntryContextV2_js_1.AuditLogEntryContextV2ToJSON)(value['context']),
74
+ 'metadata': (0, AuditLogTelemetryDataSourceAccessPolicyChangedMetadataV2V2_js_1.AuditLogTelemetryDataSourceAccessPolicyChangedMetadataV2V2ToJSON)(value['metadata']),
75
+ 'occurred_at': value['occurred_at'] == null ? value['occurred_at'] : (0, runtime_js_1.serializeDateTime)(value['occurred_at']),
76
+ 'targets': (value['targets'].map(AuditLogTargetV2_js_1.AuditLogTargetV2ToJSON)),
77
+ 'version': value['version'],
78
+ };
79
+ }
@@ -0,0 +1,54 @@
1
+ /**
2
+ * incident.io
3
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ * A window in which a user's on-call notifications are paused: while it's active, escalations skip the user instead of paging them.
14
+ * @export
15
+ * @interface OnCallNotificationPauseV2
16
+ */
17
+ export interface OnCallNotificationPauseV2 {
18
+ /**
19
+ *
20
+ */
21
+ created_at: Date;
22
+ /**
23
+ * When notifications resume
24
+ */
25
+ ends_at: Date;
26
+ /**
27
+ * Unique identifier for this notification pause
28
+ */
29
+ id: string;
30
+ /**
31
+ * Free text reason for why notifications are paused, shown to teammates
32
+ */
33
+ reason?: string;
34
+ /**
35
+ * When notifications stop being sent to the user
36
+ */
37
+ starts_at: Date;
38
+ /**
39
+ *
40
+ */
41
+ updated_at: Date;
42
+ /**
43
+ * The user whose on-call notifications are paused in this time window
44
+ */
45
+ user_id: string;
46
+ }
47
+ /**
48
+ * Check if a given object implements the OnCallNotificationPauseV2 interface.
49
+ */
50
+ export declare function instanceOfOnCallNotificationPauseV2(value: object): value is OnCallNotificationPauseV2;
51
+ export declare function OnCallNotificationPauseV2FromJSON(json: any): OnCallNotificationPauseV2;
52
+ export declare function OnCallNotificationPauseV2FromJSONTyped(json: any, ignoreDiscriminator: boolean): OnCallNotificationPauseV2;
53
+ export declare function OnCallNotificationPauseV2ToJSON(json: any): OnCallNotificationPauseV2;
54
+ export declare function OnCallNotificationPauseV2ToJSONTyped(value?: OnCallNotificationPauseV2 | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,73 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * incident.io
6
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
+ *
8
+ * The version of the OpenAPI document: 1.0.0
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.instanceOfOnCallNotificationPauseV2 = instanceOfOnCallNotificationPauseV2;
17
+ exports.OnCallNotificationPauseV2FromJSON = OnCallNotificationPauseV2FromJSON;
18
+ exports.OnCallNotificationPauseV2FromJSONTyped = OnCallNotificationPauseV2FromJSONTyped;
19
+ exports.OnCallNotificationPauseV2ToJSON = OnCallNotificationPauseV2ToJSON;
20
+ exports.OnCallNotificationPauseV2ToJSONTyped = OnCallNotificationPauseV2ToJSONTyped;
21
+ const runtime_js_1 = require("../runtime.js");
22
+ /**
23
+ * Check if a given object implements the OnCallNotificationPauseV2 interface.
24
+ */
25
+ function instanceOfOnCallNotificationPauseV2(value) {
26
+ if (!('created_at' in value) || value['created_at'] === undefined)
27
+ return false;
28
+ if (!('ends_at' in value) || value['ends_at'] === undefined)
29
+ return false;
30
+ if (!('id' in value) || value['id'] === undefined)
31
+ return false;
32
+ if (!('starts_at' in value) || value['starts_at'] === undefined)
33
+ return false;
34
+ if (!('updated_at' in value) || value['updated_at'] === undefined)
35
+ return false;
36
+ if (!('user_id' in value) || value['user_id'] === undefined)
37
+ return false;
38
+ return true;
39
+ }
40
+ function OnCallNotificationPauseV2FromJSON(json) {
41
+ return OnCallNotificationPauseV2FromJSONTyped(json, false);
42
+ }
43
+ function OnCallNotificationPauseV2FromJSONTyped(json, ignoreDiscriminator) {
44
+ if (json == null) {
45
+ return json;
46
+ }
47
+ return {
48
+ 'created_at': (json['created_at'] == null ? json['created_at'] : (0, runtime_js_1.parseDateTime)(json['created_at'])),
49
+ 'ends_at': (json['ends_at'] == null ? json['ends_at'] : (0, runtime_js_1.parseDateTime)(json['ends_at'])),
50
+ 'id': json['id'],
51
+ 'reason': json['reason'] == null ? undefined : json['reason'],
52
+ 'starts_at': (json['starts_at'] == null ? json['starts_at'] : (0, runtime_js_1.parseDateTime)(json['starts_at'])),
53
+ 'updated_at': (json['updated_at'] == null ? json['updated_at'] : (0, runtime_js_1.parseDateTime)(json['updated_at'])),
54
+ 'user_id': json['user_id'],
55
+ };
56
+ }
57
+ function OnCallNotificationPauseV2ToJSON(json) {
58
+ return OnCallNotificationPauseV2ToJSONTyped(json, false);
59
+ }
60
+ function OnCallNotificationPauseV2ToJSONTyped(value, ignoreDiscriminator = false) {
61
+ if (value == null) {
62
+ return value;
63
+ }
64
+ return {
65
+ 'created_at': value['created_at'] == null ? value['created_at'] : (0, runtime_js_1.serializeDateTime)(value['created_at']),
66
+ 'ends_at': value['ends_at'] == null ? value['ends_at'] : (0, runtime_js_1.serializeDateTime)(value['ends_at']),
67
+ 'id': value['id'],
68
+ 'reason': value['reason'],
69
+ 'starts_at': value['starts_at'] == null ? value['starts_at'] : (0, runtime_js_1.serializeDateTime)(value['starts_at']),
70
+ 'updated_at': value['updated_at'] == null ? value['updated_at'] : (0, runtime_js_1.serializeDateTime)(value['updated_at']),
71
+ 'user_id': value['user_id'],
72
+ };
73
+ }
@@ -0,0 +1,36 @@
1
+ /**
2
+ * incident.io
3
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import type { OnCallNotificationPauseV2 } from './OnCallNotificationPauseV2.js';
13
+ import type { PaginationMetaResultV2 } from './PaginationMetaResultV2.js';
14
+ /**
15
+ *
16
+ * @export
17
+ * @interface OnCallNotificationPausesListResultV2
18
+ */
19
+ export interface OnCallNotificationPausesListResultV2 {
20
+ /**
21
+ * Pauses ordered by when they start
22
+ */
23
+ on_call_notification_pauses: Array<OnCallNotificationPauseV2>;
24
+ /**
25
+ *
26
+ */
27
+ pagination_meta: PaginationMetaResultV2;
28
+ }
29
+ /**
30
+ * Check if a given object implements the OnCallNotificationPausesListResultV2 interface.
31
+ */
32
+ export declare function instanceOfOnCallNotificationPausesListResultV2(value: object): value is OnCallNotificationPausesListResultV2;
33
+ export declare function OnCallNotificationPausesListResultV2FromJSON(json: any): OnCallNotificationPausesListResultV2;
34
+ export declare function OnCallNotificationPausesListResultV2FromJSONTyped(json: any, ignoreDiscriminator: boolean): OnCallNotificationPausesListResultV2;
35
+ export declare function OnCallNotificationPausesListResultV2ToJSON(json: any): OnCallNotificationPausesListResultV2;
36
+ export declare function OnCallNotificationPausesListResultV2ToJSONTyped(value?: OnCallNotificationPausesListResultV2 | null, ignoreDiscriminator?: boolean): any;