@incident-io/sdk 2.24.0 → 2.25.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 (57) hide show
  1. package/dist/cjs/apis/GlossaryEntriesV2Api.d.ts +157 -0
  2. package/dist/cjs/apis/GlossaryEntriesV2Api.js +327 -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/GlossaryEntriesCreatePayloadV2.d.ts +38 -0
  6. package/dist/cjs/models/GlossaryEntriesCreatePayloadV2.js +56 -0
  7. package/dist/cjs/models/GlossaryEntriesCreateResultV2.d.ts +31 -0
  8. package/dist/cjs/models/GlossaryEntriesCreateResultV2.js +51 -0
  9. package/dist/cjs/models/GlossaryEntriesListResultV2.d.ts +36 -0
  10. package/dist/cjs/models/GlossaryEntriesListResultV2.js +54 -0
  11. package/dist/cjs/models/GlossaryEntriesShowResultV2.d.ts +31 -0
  12. package/dist/cjs/models/GlossaryEntriesShowResultV2.js +51 -0
  13. package/dist/cjs/models/GlossaryEntriesUpdatePayloadV2.d.ts +34 -0
  14. package/dist/cjs/models/GlossaryEntriesUpdatePayloadV2.js +54 -0
  15. package/dist/cjs/models/GlossaryEntriesUpdateRanksPayloadV2.d.ts +31 -0
  16. package/dist/cjs/models/GlossaryEntriesUpdateRanksPayloadV2.js +51 -0
  17. package/dist/cjs/models/GlossaryEntriesUpdateRanksResultV2.d.ts +31 -0
  18. package/dist/cjs/models/GlossaryEntriesUpdateRanksResultV2.js +51 -0
  19. package/dist/cjs/models/GlossaryEntriesUpdateResultV2.d.ts +31 -0
  20. package/dist/cjs/models/GlossaryEntriesUpdateResultV2.js +51 -0
  21. package/dist/cjs/models/GlossaryEntryRankUpdateV2.d.ts +34 -0
  22. package/dist/cjs/models/GlossaryEntryRankUpdateV2.js +54 -0
  23. package/dist/cjs/models/GlossaryEntryV2.d.ts +55 -0
  24. package/dist/cjs/models/GlossaryEntryV2.js +71 -0
  25. package/dist/cjs/models/index.d.ts +10 -0
  26. package/dist/cjs/models/index.js +10 -0
  27. package/dist/cjs/version.d.ts +1 -1
  28. package/dist/cjs/version.js +1 -1
  29. package/dist/esm/apis/GlossaryEntriesV2Api.d.ts +157 -0
  30. package/dist/esm/apis/GlossaryEntriesV2Api.js +290 -0
  31. package/dist/esm/apis/index.d.ts +1 -0
  32. package/dist/esm/apis/index.js +1 -0
  33. package/dist/esm/models/GlossaryEntriesCreatePayloadV2.d.ts +38 -0
  34. package/dist/esm/models/GlossaryEntriesCreatePayloadV2.js +49 -0
  35. package/dist/esm/models/GlossaryEntriesCreateResultV2.d.ts +31 -0
  36. package/dist/esm/models/GlossaryEntriesCreateResultV2.js +44 -0
  37. package/dist/esm/models/GlossaryEntriesListResultV2.d.ts +36 -0
  38. package/dist/esm/models/GlossaryEntriesListResultV2.js +47 -0
  39. package/dist/esm/models/GlossaryEntriesShowResultV2.d.ts +31 -0
  40. package/dist/esm/models/GlossaryEntriesShowResultV2.js +44 -0
  41. package/dist/esm/models/GlossaryEntriesUpdatePayloadV2.d.ts +34 -0
  42. package/dist/esm/models/GlossaryEntriesUpdatePayloadV2.js +47 -0
  43. package/dist/esm/models/GlossaryEntriesUpdateRanksPayloadV2.d.ts +31 -0
  44. package/dist/esm/models/GlossaryEntriesUpdateRanksPayloadV2.js +44 -0
  45. package/dist/esm/models/GlossaryEntriesUpdateRanksResultV2.d.ts +31 -0
  46. package/dist/esm/models/GlossaryEntriesUpdateRanksResultV2.js +44 -0
  47. package/dist/esm/models/GlossaryEntriesUpdateResultV2.d.ts +31 -0
  48. package/dist/esm/models/GlossaryEntriesUpdateResultV2.js +44 -0
  49. package/dist/esm/models/GlossaryEntryRankUpdateV2.d.ts +34 -0
  50. package/dist/esm/models/GlossaryEntryRankUpdateV2.js +47 -0
  51. package/dist/esm/models/GlossaryEntryV2.d.ts +55 -0
  52. package/dist/esm/models/GlossaryEntryV2.js +64 -0
  53. package/dist/esm/models/index.d.ts +10 -0
  54. package/dist/esm/models/index.js +10 -0
  55. package/dist/esm/version.d.ts +1 -1
  56. package/dist/esm/version.js +1 -1
  57. package/package.json +1 -1
@@ -0,0 +1,55 @@
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 glossary entry is one term an organisation has coined — an acronym, a
14
+ * service name, or a piece of internal jargon — and the description of what it means.
15
+ *
16
+ * AI features use the glossary, in rank order, so they understand those terms. Lower
17
+ * ranks come first. Deleting an entry archives it, which frees the term so it can be
18
+ * coined again as a new entry.
19
+ * @export
20
+ * @interface GlossaryEntryV2
21
+ */
22
+ export interface GlossaryEntryV2 {
23
+ /**
24
+ * When the entry was created
25
+ */
26
+ created_at: Date;
27
+ /**
28
+ * What the term means
29
+ */
30
+ description: string;
31
+ /**
32
+ * Unique identifier for this glossary entry
33
+ */
34
+ id: string;
35
+ /**
36
+ * The term, e.g. an acronym or service name
37
+ */
38
+ item: string;
39
+ /**
40
+ * The entry's position in the glossary
41
+ */
42
+ rank: number;
43
+ /**
44
+ * When the entry was last updated
45
+ */
46
+ updated_at: Date;
47
+ }
48
+ /**
49
+ * Check if a given object implements the GlossaryEntryV2 interface.
50
+ */
51
+ export declare function instanceOfGlossaryEntryV2(value: object): value is GlossaryEntryV2;
52
+ export declare function GlossaryEntryV2FromJSON(json: any): GlossaryEntryV2;
53
+ export declare function GlossaryEntryV2FromJSONTyped(json: any, ignoreDiscriminator: boolean): GlossaryEntryV2;
54
+ export declare function GlossaryEntryV2ToJSON(json: any): GlossaryEntryV2;
55
+ export declare function GlossaryEntryV2ToJSONTyped(value?: GlossaryEntryV2 | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,71 @@
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.instanceOfGlossaryEntryV2 = instanceOfGlossaryEntryV2;
17
+ exports.GlossaryEntryV2FromJSON = GlossaryEntryV2FromJSON;
18
+ exports.GlossaryEntryV2FromJSONTyped = GlossaryEntryV2FromJSONTyped;
19
+ exports.GlossaryEntryV2ToJSON = GlossaryEntryV2ToJSON;
20
+ exports.GlossaryEntryV2ToJSONTyped = GlossaryEntryV2ToJSONTyped;
21
+ const runtime_js_1 = require("../runtime.js");
22
+ /**
23
+ * Check if a given object implements the GlossaryEntryV2 interface.
24
+ */
25
+ function instanceOfGlossaryEntryV2(value) {
26
+ if (!('created_at' in value) || value['created_at'] === undefined)
27
+ return false;
28
+ if (!('description' in value) || value['description'] === undefined)
29
+ return false;
30
+ if (!('id' in value) || value['id'] === undefined)
31
+ return false;
32
+ if (!('item' in value) || value['item'] === undefined)
33
+ return false;
34
+ if (!('rank' in value) || value['rank'] === undefined)
35
+ return false;
36
+ if (!('updated_at' in value) || value['updated_at'] === undefined)
37
+ return false;
38
+ return true;
39
+ }
40
+ function GlossaryEntryV2FromJSON(json) {
41
+ return GlossaryEntryV2FromJSONTyped(json, false);
42
+ }
43
+ function GlossaryEntryV2FromJSONTyped(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
+ 'description': json['description'],
50
+ 'id': json['id'],
51
+ 'item': json['item'],
52
+ 'rank': json['rank'],
53
+ 'updated_at': (json['updated_at'] == null ? json['updated_at'] : (0, runtime_js_1.parseDateTime)(json['updated_at'])),
54
+ };
55
+ }
56
+ function GlossaryEntryV2ToJSON(json) {
57
+ return GlossaryEntryV2ToJSONTyped(json, false);
58
+ }
59
+ function GlossaryEntryV2ToJSONTyped(value, ignoreDiscriminator = false) {
60
+ if (value == null) {
61
+ return value;
62
+ }
63
+ return {
64
+ 'created_at': value['created_at'] == null ? value['created_at'] : (0, runtime_js_1.serializeDateTime)(value['created_at']),
65
+ 'description': value['description'],
66
+ 'id': value['id'],
67
+ 'item': value['item'],
68
+ 'rank': value['rank'],
69
+ 'updated_at': value['updated_at'] == null ? value['updated_at'] : (0, runtime_js_1.serializeDateTime)(value['updated_at']),
70
+ };
71
+ }
@@ -745,6 +745,16 @@ export * from './FollowUpsUpdatePayloadV2.js';
745
745
  export * from './FollowUpsUpdatePayloadV3.js';
746
746
  export * from './FollowUpsUpdateResultV2.js';
747
747
  export * from './FollowUpsUpdateResultV3.js';
748
+ export * from './GlossaryEntriesCreatePayloadV2.js';
749
+ export * from './GlossaryEntriesCreateResultV2.js';
750
+ export * from './GlossaryEntriesListResultV2.js';
751
+ export * from './GlossaryEntriesShowResultV2.js';
752
+ export * from './GlossaryEntriesUpdatePayloadV2.js';
753
+ export * from './GlossaryEntriesUpdateRanksPayloadV2.js';
754
+ export * from './GlossaryEntriesUpdateRanksResultV2.js';
755
+ export * from './GlossaryEntriesUpdateResultV2.js';
756
+ export * from './GlossaryEntryRankUpdateV2.js';
757
+ export * from './GlossaryEntryV2.js';
748
758
  export * from './GroupingKeyV2.js';
749
759
  export * from './GroupingKeyV3.js';
750
760
  export * from './GroupingSettingsV3.js';
@@ -763,6 +763,16 @@ __exportStar(require("./FollowUpsUpdatePayloadV2.js"), exports);
763
763
  __exportStar(require("./FollowUpsUpdatePayloadV3.js"), exports);
764
764
  __exportStar(require("./FollowUpsUpdateResultV2.js"), exports);
765
765
  __exportStar(require("./FollowUpsUpdateResultV3.js"), exports);
766
+ __exportStar(require("./GlossaryEntriesCreatePayloadV2.js"), exports);
767
+ __exportStar(require("./GlossaryEntriesCreateResultV2.js"), exports);
768
+ __exportStar(require("./GlossaryEntriesListResultV2.js"), exports);
769
+ __exportStar(require("./GlossaryEntriesShowResultV2.js"), exports);
770
+ __exportStar(require("./GlossaryEntriesUpdatePayloadV2.js"), exports);
771
+ __exportStar(require("./GlossaryEntriesUpdateRanksPayloadV2.js"), exports);
772
+ __exportStar(require("./GlossaryEntriesUpdateRanksResultV2.js"), exports);
773
+ __exportStar(require("./GlossaryEntriesUpdateResultV2.js"), exports);
774
+ __exportStar(require("./GlossaryEntryRankUpdateV2.js"), exports);
775
+ __exportStar(require("./GlossaryEntryV2.js"), exports);
766
776
  __exportStar(require("./GroupingKeyV2.js"), exports);
767
777
  __exportStar(require("./GroupingKeyV3.js"), exports);
768
778
  __exportStar(require("./GroupingSettingsV3.js"), exports);
@@ -1 +1 @@
1
- export declare const VERSION = "2.24.0";
1
+ export declare const VERSION = "2.25.0";
@@ -2,4 +2,4 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
4
  // Written by `make build` from package.json. Do not edit.
5
- exports.VERSION = "2.24.0";
5
+ exports.VERSION = "2.25.0";
@@ -0,0 +1,157 @@
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 GlossaryEntriesCreatePayloadV2 } from '../models/GlossaryEntriesCreatePayloadV2.js';
14
+ import { type GlossaryEntriesCreateResultV2 } from '../models/GlossaryEntriesCreateResultV2.js';
15
+ import { type GlossaryEntriesListResultV2 } from '../models/GlossaryEntriesListResultV2.js';
16
+ import { type GlossaryEntriesShowResultV2 } from '../models/GlossaryEntriesShowResultV2.js';
17
+ import { type GlossaryEntriesUpdatePayloadV2 } from '../models/GlossaryEntriesUpdatePayloadV2.js';
18
+ import { type GlossaryEntriesUpdateRanksPayloadV2 } from '../models/GlossaryEntriesUpdateRanksPayloadV2.js';
19
+ import { type GlossaryEntriesUpdateRanksResultV2 } from '../models/GlossaryEntriesUpdateRanksResultV2.js';
20
+ import { type GlossaryEntriesUpdateResultV2 } from '../models/GlossaryEntriesUpdateResultV2.js';
21
+ export interface GlossaryEntriesV2CreateRequest {
22
+ /**
23
+ *
24
+ */
25
+ body: GlossaryEntriesCreatePayloadV2;
26
+ }
27
+ export interface GlossaryEntriesV2DestroyRequest {
28
+ /**
29
+ * Unique identifier for this glossary entry
30
+ */
31
+ id: string;
32
+ }
33
+ export interface GlossaryEntriesV2ListRequest {
34
+ /**
35
+ * Number of glossary entries to return per page
36
+ */
37
+ page_size?: number;
38
+ /**
39
+ * A glossary entry's ID. This endpoint returns entries after this one. Without search, that is later in rank order. With search, it is the next hit after this entry.
40
+ */
41
+ after?: string;
42
+ /**
43
+ * Filter to entries whose term or description contains this value (case-insensitive)
44
+ */
45
+ search?: string;
46
+ }
47
+ export interface GlossaryEntriesV2ShowRequest {
48
+ /**
49
+ * Unique identifier for this glossary entry
50
+ */
51
+ id: string;
52
+ }
53
+ export interface GlossaryEntriesV2UpdateRequest {
54
+ /**
55
+ * Unique identifier for this glossary entry
56
+ */
57
+ id: string;
58
+ /**
59
+ *
60
+ */
61
+ body: GlossaryEntriesUpdatePayloadV2;
62
+ }
63
+ export interface GlossaryEntriesV2UpdateRanksRequest {
64
+ /**
65
+ *
66
+ */
67
+ body: GlossaryEntriesUpdateRanksPayloadV2;
68
+ }
69
+ /**
70
+ *
71
+ */
72
+ export declare class GlossaryEntriesV2Api extends runtime.BaseAPI {
73
+ /**
74
+ * Creates request options for glossaryEntriesV2Create without sending the request
75
+ */
76
+ glossaryEntriesV2CreateRequestOpts(requestParameters: GlossaryEntriesV2CreateRequest): Promise<runtime.RequestOpts>;
77
+ /**
78
+ * Create a glossary entry. It is appended to the end of the glossary unless after names an existing entry to insert it after.
79
+ * Create Glossary Entries V2
80
+ */
81
+ glossaryEntriesV2CreateRaw(requestParameters: GlossaryEntriesV2CreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GlossaryEntriesCreateResultV2>>;
82
+ /**
83
+ * Create a glossary entry. It is appended to the end of the glossary unless after names an existing entry to insert it after.
84
+ * Create Glossary Entries V2
85
+ */
86
+ glossaryEntriesV2Create(requestParameters: GlossaryEntriesV2CreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GlossaryEntriesCreateResultV2>;
87
+ /**
88
+ * Creates request options for glossaryEntriesV2Destroy without sending the request
89
+ */
90
+ glossaryEntriesV2DestroyRequestOpts(requestParameters: GlossaryEntriesV2DestroyRequest): Promise<runtime.RequestOpts>;
91
+ /**
92
+ * Delete a glossary entry. The entry is archived, which frees its term so the same item can be added again later.
93
+ * Destroy Glossary Entries V2
94
+ */
95
+ glossaryEntriesV2DestroyRaw(requestParameters: GlossaryEntriesV2DestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
96
+ /**
97
+ * Delete a glossary entry. The entry is archived, which frees its term so the same item can be added again later.
98
+ * Destroy Glossary Entries V2
99
+ */
100
+ glossaryEntriesV2Destroy(requestParameters: GlossaryEntriesV2DestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
101
+ /**
102
+ * Creates request options for glossaryEntriesV2List without sending the request
103
+ */
104
+ glossaryEntriesV2ListRequestOpts(requestParameters: GlossaryEntriesV2ListRequest): Promise<runtime.RequestOpts>;
105
+ /**
106
+ * List glossary entries for this organisation, in rank order.
107
+ * List Glossary Entries V2
108
+ */
109
+ glossaryEntriesV2ListRaw(requestParameters: GlossaryEntriesV2ListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GlossaryEntriesListResultV2>>;
110
+ /**
111
+ * List glossary entries for this organisation, in rank order.
112
+ * List Glossary Entries V2
113
+ */
114
+ glossaryEntriesV2List(requestParameters?: GlossaryEntriesV2ListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GlossaryEntriesListResultV2>;
115
+ /**
116
+ * Creates request options for glossaryEntriesV2Show without sending the request
117
+ */
118
+ glossaryEntriesV2ShowRequestOpts(requestParameters: GlossaryEntriesV2ShowRequest): Promise<runtime.RequestOpts>;
119
+ /**
120
+ * Get a single glossary entry.
121
+ * Show Glossary Entries V2
122
+ */
123
+ glossaryEntriesV2ShowRaw(requestParameters: GlossaryEntriesV2ShowRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GlossaryEntriesShowResultV2>>;
124
+ /**
125
+ * Get a single glossary entry.
126
+ * Show Glossary Entries V2
127
+ */
128
+ glossaryEntriesV2Show(requestParameters: GlossaryEntriesV2ShowRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GlossaryEntriesShowResultV2>;
129
+ /**
130
+ * Creates request options for glossaryEntriesV2Update without sending the request
131
+ */
132
+ glossaryEntriesV2UpdateRequestOpts(requestParameters: GlossaryEntriesV2UpdateRequest): Promise<runtime.RequestOpts>;
133
+ /**
134
+ * Update a glossary entry\'s term or description. Rank is unchanged; use the reorder action for that.
135
+ * Update Glossary Entries V2
136
+ */
137
+ glossaryEntriesV2UpdateRaw(requestParameters: GlossaryEntriesV2UpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GlossaryEntriesUpdateResultV2>>;
138
+ /**
139
+ * Update a glossary entry\'s term or description. Rank is unchanged; use the reorder action for that.
140
+ * Update Glossary Entries V2
141
+ */
142
+ glossaryEntriesV2Update(requestParameters: GlossaryEntriesV2UpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GlossaryEntriesUpdateResultV2>;
143
+ /**
144
+ * Creates request options for glossaryEntriesV2UpdateRanks without sending the request
145
+ */
146
+ glossaryEntriesV2UpdateRanksRequestOpts(requestParameters: GlossaryEntriesV2UpdateRanksRequest): Promise<runtime.RequestOpts>;
147
+ /**
148
+ * Reorder glossary entries. Every live entry must be included exactly once.
149
+ * UpdateRanks Glossary Entries V2
150
+ */
151
+ glossaryEntriesV2UpdateRanksRaw(requestParameters: GlossaryEntriesV2UpdateRanksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GlossaryEntriesUpdateRanksResultV2>>;
152
+ /**
153
+ * Reorder glossary entries. Every live entry must be included exactly once.
154
+ * UpdateRanks Glossary Entries V2
155
+ */
156
+ glossaryEntriesV2UpdateRanks(requestParameters: GlossaryEntriesV2UpdateRanksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GlossaryEntriesUpdateRanksResultV2>;
157
+ }
@@ -0,0 +1,290 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * incident.io
5
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+ import * as runtime from '../runtime.js';
15
+ import { GlossaryEntriesCreatePayloadV2ToJSON, } from '../models/GlossaryEntriesCreatePayloadV2.js';
16
+ import { GlossaryEntriesCreateResultV2FromJSON, } from '../models/GlossaryEntriesCreateResultV2.js';
17
+ import { GlossaryEntriesListResultV2FromJSON, } from '../models/GlossaryEntriesListResultV2.js';
18
+ import { GlossaryEntriesShowResultV2FromJSON, } from '../models/GlossaryEntriesShowResultV2.js';
19
+ import { GlossaryEntriesUpdatePayloadV2ToJSON, } from '../models/GlossaryEntriesUpdatePayloadV2.js';
20
+ import { GlossaryEntriesUpdateRanksPayloadV2ToJSON, } from '../models/GlossaryEntriesUpdateRanksPayloadV2.js';
21
+ import { GlossaryEntriesUpdateRanksResultV2FromJSON, } from '../models/GlossaryEntriesUpdateRanksResultV2.js';
22
+ import { GlossaryEntriesUpdateResultV2FromJSON, } from '../models/GlossaryEntriesUpdateResultV2.js';
23
+ /**
24
+ *
25
+ */
26
+ export class GlossaryEntriesV2Api extends runtime.BaseAPI {
27
+ /**
28
+ * Creates request options for glossaryEntriesV2Create without sending the request
29
+ */
30
+ async glossaryEntriesV2CreateRequestOpts(requestParameters) {
31
+ if (requestParameters['body'] == null) {
32
+ throw new runtime.RequiredError('body', 'Required parameter "body" was null or undefined when calling glossaryEntriesV2Create().');
33
+ }
34
+ const queryParameters = {};
35
+ const headerParameters = {};
36
+ headerParameters['Content-Type'] = 'application/json';
37
+ if (this.configuration && this.configuration.accessToken) {
38
+ const token = this.configuration.accessToken;
39
+ const tokenString = await token("BearerAuth", []);
40
+ if (tokenString) {
41
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
42
+ }
43
+ }
44
+ let urlPath = `/v2/glossary_entries`;
45
+ return {
46
+ path: urlPath,
47
+ method: 'POST',
48
+ headers: headerParameters,
49
+ query: queryParameters,
50
+ body: GlossaryEntriesCreatePayloadV2ToJSON(requestParameters['body']),
51
+ };
52
+ }
53
+ /**
54
+ * Create a glossary entry. It is appended to the end of the glossary unless after names an existing entry to insert it after.
55
+ * Create Glossary Entries V2
56
+ */
57
+ async glossaryEntriesV2CreateRaw(requestParameters, initOverrides) {
58
+ const requestOptions = await this.glossaryEntriesV2CreateRequestOpts(requestParameters);
59
+ const response = await this.request(requestOptions, initOverrides);
60
+ return new runtime.JSONApiResponse(response, (jsonValue) => GlossaryEntriesCreateResultV2FromJSON(jsonValue));
61
+ }
62
+ /**
63
+ * Create a glossary entry. It is appended to the end of the glossary unless after names an existing entry to insert it after.
64
+ * Create Glossary Entries V2
65
+ */
66
+ async glossaryEntriesV2Create(requestParameters, initOverrides) {
67
+ const response = await this.glossaryEntriesV2CreateRaw(requestParameters, initOverrides);
68
+ return await response.value();
69
+ }
70
+ /**
71
+ * Creates request options for glossaryEntriesV2Destroy without sending the request
72
+ */
73
+ async glossaryEntriesV2DestroyRequestOpts(requestParameters) {
74
+ if (requestParameters['id'] == null) {
75
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling glossaryEntriesV2Destroy().');
76
+ }
77
+ const queryParameters = {};
78
+ const headerParameters = {};
79
+ if (this.configuration && this.configuration.accessToken) {
80
+ const token = this.configuration.accessToken;
81
+ const tokenString = await token("BearerAuth", []);
82
+ if (tokenString) {
83
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
84
+ }
85
+ }
86
+ let urlPath = `/v2/glossary_entries/{id}`;
87
+ urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
88
+ return {
89
+ path: urlPath,
90
+ method: 'DELETE',
91
+ headers: headerParameters,
92
+ query: queryParameters,
93
+ };
94
+ }
95
+ /**
96
+ * Delete a glossary entry. The entry is archived, which frees its term so the same item can be added again later.
97
+ * Destroy Glossary Entries V2
98
+ */
99
+ async glossaryEntriesV2DestroyRaw(requestParameters, initOverrides) {
100
+ const requestOptions = await this.glossaryEntriesV2DestroyRequestOpts(requestParameters);
101
+ const response = await this.request(requestOptions, initOverrides);
102
+ return new runtime.VoidApiResponse(response);
103
+ }
104
+ /**
105
+ * Delete a glossary entry. The entry is archived, which frees its term so the same item can be added again later.
106
+ * Destroy Glossary Entries V2
107
+ */
108
+ async glossaryEntriesV2Destroy(requestParameters, initOverrides) {
109
+ await this.glossaryEntriesV2DestroyRaw(requestParameters, initOverrides);
110
+ }
111
+ /**
112
+ * Creates request options for glossaryEntriesV2List without sending the request
113
+ */
114
+ async glossaryEntriesV2ListRequestOpts(requestParameters) {
115
+ const queryParameters = {};
116
+ if (requestParameters['page_size'] != null) {
117
+ queryParameters['page_size'] = requestParameters['page_size'];
118
+ }
119
+ if (requestParameters['after'] != null) {
120
+ queryParameters['after'] = requestParameters['after'];
121
+ }
122
+ if (requestParameters['search'] != null) {
123
+ queryParameters['search'] = requestParameters['search'];
124
+ }
125
+ const headerParameters = {};
126
+ if (this.configuration && this.configuration.accessToken) {
127
+ const token = this.configuration.accessToken;
128
+ const tokenString = await token("BearerAuth", []);
129
+ if (tokenString) {
130
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
131
+ }
132
+ }
133
+ let urlPath = `/v2/glossary_entries`;
134
+ return {
135
+ path: urlPath,
136
+ method: 'GET',
137
+ headers: headerParameters,
138
+ query: queryParameters,
139
+ };
140
+ }
141
+ /**
142
+ * List glossary entries for this organisation, in rank order.
143
+ * List Glossary Entries V2
144
+ */
145
+ async glossaryEntriesV2ListRaw(requestParameters, initOverrides) {
146
+ const requestOptions = await this.glossaryEntriesV2ListRequestOpts(requestParameters);
147
+ const response = await this.request(requestOptions, initOverrides);
148
+ return new runtime.JSONApiResponse(response, (jsonValue) => GlossaryEntriesListResultV2FromJSON(jsonValue));
149
+ }
150
+ /**
151
+ * List glossary entries for this organisation, in rank order.
152
+ * List Glossary Entries V2
153
+ */
154
+ async glossaryEntriesV2List(requestParameters = {}, initOverrides) {
155
+ const response = await this.glossaryEntriesV2ListRaw(requestParameters, initOverrides);
156
+ return await response.value();
157
+ }
158
+ /**
159
+ * Creates request options for glossaryEntriesV2Show without sending the request
160
+ */
161
+ async glossaryEntriesV2ShowRequestOpts(requestParameters) {
162
+ if (requestParameters['id'] == null) {
163
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling glossaryEntriesV2Show().');
164
+ }
165
+ const queryParameters = {};
166
+ const headerParameters = {};
167
+ if (this.configuration && this.configuration.accessToken) {
168
+ const token = this.configuration.accessToken;
169
+ const tokenString = await token("BearerAuth", []);
170
+ if (tokenString) {
171
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
172
+ }
173
+ }
174
+ let urlPath = `/v2/glossary_entries/{id}`;
175
+ urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
176
+ return {
177
+ path: urlPath,
178
+ method: 'GET',
179
+ headers: headerParameters,
180
+ query: queryParameters,
181
+ };
182
+ }
183
+ /**
184
+ * Get a single glossary entry.
185
+ * Show Glossary Entries V2
186
+ */
187
+ async glossaryEntriesV2ShowRaw(requestParameters, initOverrides) {
188
+ const requestOptions = await this.glossaryEntriesV2ShowRequestOpts(requestParameters);
189
+ const response = await this.request(requestOptions, initOverrides);
190
+ return new runtime.JSONApiResponse(response, (jsonValue) => GlossaryEntriesShowResultV2FromJSON(jsonValue));
191
+ }
192
+ /**
193
+ * Get a single glossary entry.
194
+ * Show Glossary Entries V2
195
+ */
196
+ async glossaryEntriesV2Show(requestParameters, initOverrides) {
197
+ const response = await this.glossaryEntriesV2ShowRaw(requestParameters, initOverrides);
198
+ return await response.value();
199
+ }
200
+ /**
201
+ * Creates request options for glossaryEntriesV2Update without sending the request
202
+ */
203
+ async glossaryEntriesV2UpdateRequestOpts(requestParameters) {
204
+ if (requestParameters['id'] == null) {
205
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling glossaryEntriesV2Update().');
206
+ }
207
+ if (requestParameters['body'] == null) {
208
+ throw new runtime.RequiredError('body', 'Required parameter "body" was null or undefined when calling glossaryEntriesV2Update().');
209
+ }
210
+ const queryParameters = {};
211
+ const headerParameters = {};
212
+ headerParameters['Content-Type'] = 'application/json';
213
+ if (this.configuration && this.configuration.accessToken) {
214
+ const token = this.configuration.accessToken;
215
+ const tokenString = await token("BearerAuth", []);
216
+ if (tokenString) {
217
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
218
+ }
219
+ }
220
+ let urlPath = `/v2/glossary_entries/{id}`;
221
+ urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
222
+ return {
223
+ path: urlPath,
224
+ method: 'PUT',
225
+ headers: headerParameters,
226
+ query: queryParameters,
227
+ body: GlossaryEntriesUpdatePayloadV2ToJSON(requestParameters['body']),
228
+ };
229
+ }
230
+ /**
231
+ * Update a glossary entry\'s term or description. Rank is unchanged; use the reorder action for that.
232
+ * Update Glossary Entries V2
233
+ */
234
+ async glossaryEntriesV2UpdateRaw(requestParameters, initOverrides) {
235
+ const requestOptions = await this.glossaryEntriesV2UpdateRequestOpts(requestParameters);
236
+ const response = await this.request(requestOptions, initOverrides);
237
+ return new runtime.JSONApiResponse(response, (jsonValue) => GlossaryEntriesUpdateResultV2FromJSON(jsonValue));
238
+ }
239
+ /**
240
+ * Update a glossary entry\'s term or description. Rank is unchanged; use the reorder action for that.
241
+ * Update Glossary Entries V2
242
+ */
243
+ async glossaryEntriesV2Update(requestParameters, initOverrides) {
244
+ const response = await this.glossaryEntriesV2UpdateRaw(requestParameters, initOverrides);
245
+ return await response.value();
246
+ }
247
+ /**
248
+ * Creates request options for glossaryEntriesV2UpdateRanks without sending the request
249
+ */
250
+ async glossaryEntriesV2UpdateRanksRequestOpts(requestParameters) {
251
+ if (requestParameters['body'] == null) {
252
+ throw new runtime.RequiredError('body', 'Required parameter "body" was null or undefined when calling glossaryEntriesV2UpdateRanks().');
253
+ }
254
+ const queryParameters = {};
255
+ const headerParameters = {};
256
+ headerParameters['Content-Type'] = 'application/json';
257
+ if (this.configuration && this.configuration.accessToken) {
258
+ const token = this.configuration.accessToken;
259
+ const tokenString = await token("BearerAuth", []);
260
+ if (tokenString) {
261
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
262
+ }
263
+ }
264
+ let urlPath = `/v2/glossary_entries/actions/update_ranks`;
265
+ return {
266
+ path: urlPath,
267
+ method: 'PUT',
268
+ headers: headerParameters,
269
+ query: queryParameters,
270
+ body: GlossaryEntriesUpdateRanksPayloadV2ToJSON(requestParameters['body']),
271
+ };
272
+ }
273
+ /**
274
+ * Reorder glossary entries. Every live entry must be included exactly once.
275
+ * UpdateRanks Glossary Entries V2
276
+ */
277
+ async glossaryEntriesV2UpdateRanksRaw(requestParameters, initOverrides) {
278
+ const requestOptions = await this.glossaryEntriesV2UpdateRanksRequestOpts(requestParameters);
279
+ const response = await this.request(requestOptions, initOverrides);
280
+ return new runtime.JSONApiResponse(response, (jsonValue) => GlossaryEntriesUpdateRanksResultV2FromJSON(jsonValue));
281
+ }
282
+ /**
283
+ * Reorder glossary entries. Every live entry must be included exactly once.
284
+ * UpdateRanks Glossary Entries V2
285
+ */
286
+ async glossaryEntriesV2UpdateRanks(requestParameters, initOverrides) {
287
+ const response = await this.glossaryEntriesV2UpdateRanksRaw(requestParameters, initOverrides);
288
+ return await response.value();
289
+ }
290
+ }
@@ -23,6 +23,7 @@ export * from './EscalationPathTemplatesV2Api.js';
23
23
  export * from './EscalationsV2Api.js';
24
24
  export * from './FollowUpsV2Api.js';
25
25
  export * from './FollowUpsV3Api.js';
26
+ export * from './GlossaryEntriesV2Api.js';
26
27
  export * from './HeartbeatV2Api.js';
27
28
  export * from './IPAllowlistsV1Api.js';
28
29
  export * from './IncidentActivityLogEntriesV2Api.js';
@@ -25,6 +25,7 @@ export * from './EscalationPathTemplatesV2Api.js';
25
25
  export * from './EscalationsV2Api.js';
26
26
  export * from './FollowUpsV2Api.js';
27
27
  export * from './FollowUpsV3Api.js';
28
+ export * from './GlossaryEntriesV2Api.js';
28
29
  export * from './HeartbeatV2Api.js';
29
30
  export * from './IPAllowlistsV1Api.js';
30
31
  export * from './IncidentActivityLogEntriesV2Api.js';