@dynatrace-sdk/client-query 1.0.0 → 1.0.5

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 (40) hide show
  1. package/CHANGELOG.md +37 -0
  2. package/cjs/index.js +1639 -181
  3. package/docs/DOCS.md +31 -225
  4. package/dynatrace-metadata.json +5 -2
  5. package/esm/index.js +1639 -181
  6. package/package.json +2 -2
  7. package/types/packages/client/query/src/lib/apis/query-execution-api.d.ts +27 -221
  8. package/types/packages/client/query/src/lib/models/autocomplete-request.d.ts +4 -2
  9. package/types/packages/client/query/src/lib/models/autocomplete-response.d.ts +4 -2
  10. package/types/packages/client/query/src/lib/models/autocomplete-suggestion-part.d.ts +4 -2
  11. package/types/packages/client/query/src/lib/models/autocomplete-suggestion.d.ts +4 -2
  12. package/types/packages/client/query/src/lib/models/dql-alternative-node.d.ts +4 -2
  13. package/types/packages/client/query/src/lib/models/dql-container-node.d.ts +4 -2
  14. package/types/packages/client/query/src/lib/models/dql-node.d.ts +6 -5
  15. package/types/packages/client/query/src/lib/models/dql-terminal-node.d.ts +4 -2
  16. package/types/packages/client/query/src/lib/models/error-envelope.d.ts +5 -3
  17. package/types/packages/client/query/src/lib/models/error-response-details.d.ts +4 -2
  18. package/types/packages/client/query/src/lib/models/error-response.d.ts +4 -2
  19. package/types/packages/client/query/src/lib/models/execute-request.d.ts +5 -3
  20. package/types/packages/client/query/src/lib/models/field-type.d.ts +4 -2
  21. package/types/packages/client/query/src/lib/models/geo-point.d.ts +4 -2
  22. package/types/packages/client/query/src/lib/models/grail-metadata.d.ts +4 -2
  23. package/types/packages/client/query/src/lib/models/metadata-notification.d.ts +4 -2
  24. package/types/packages/client/query/src/lib/models/metadata.d.ts +4 -2
  25. package/types/packages/client/query/src/lib/models/metric-metadata.d.ts +4 -2
  26. package/types/packages/client/query/src/lib/models/parse-request.d.ts +4 -2
  27. package/types/packages/client/query/src/lib/models/position-info.d.ts +4 -2
  28. package/types/packages/client/query/src/lib/models/query-poll-response.d.ts +4 -2
  29. package/types/packages/client/query/src/lib/models/query-result.d.ts +4 -2
  30. package/types/packages/client/query/src/lib/models/query-start-response.d.ts +4 -2
  31. package/types/packages/client/query/src/lib/models/ranged-field-types-mappings.d.ts +4 -2
  32. package/types/packages/client/query/src/lib/models/ranged-field-types.d.ts +4 -2
  33. package/types/packages/client/query/src/lib/models/result-record-value.d.ts +17 -2
  34. package/types/packages/client/query/src/lib/models/result-record.d.ts +4 -2
  35. package/types/packages/client/query/src/lib/models/timeframe.d.ts +4 -2
  36. package/types/packages/client/query/src/lib/models/token-position.d.ts +5 -3
  37. package/types/packages/client/query/src/lib/models/verify-request.d.ts +4 -2
  38. package/types/packages/client/query/src/lib/models/verify-response.d.ts +4 -2
  39. package/types/packages/http-client/src/lib/platform/http-client-response-error-serializer.d.ts +2 -0
  40. package/types/packages/platform/error-handlers/src/lib/types/http-serialized-error.d.ts +1 -0
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@dynatrace-sdk/client-query",
3
- "version": "1.0.0",
3
+ "version": "1.0.5",
4
4
  "dependencies": {
5
- "@dynatrace-sdk/http-client": "^0.4.11"
5
+ "@dynatrace-sdk/http-client": "^1.0.1"
6
6
  },
7
7
  "license": "Apache-2.0",
8
8
  "main": "./cjs/index.js",
@@ -21,17 +21,7 @@ export declare class QueryExecutionClient {
21
21
  * Polls the status of a Grail query. Returns the status of the query, including the result if the query finished.
22
22
  *
23
23
  * ### The response format:
24
- * The response consists of:
25
- * * The state of the query.
26
- * * ttlSeconds until the query will be wiped
27
- * * If the query succeeded, also a result
28
- *
29
- * ```json
30
- * {
31
- * "state":"RUNNING",
32
- * "ttlSeconds":197
33
- * }
34
- * ```
24
+ * The json response will contain the state of the query. If the query succeeded, the result will be included.
35
25
  *
36
26
  * The result has two main sections:
37
27
  * * The 'records' section contains the individual records, where each record consists of a set of fields and their corresponding values.
@@ -56,109 +46,11 @@ export declare class QueryExecutionClient {
56
46
  * the new record field types will be placed.
57
47
  * It is guaranteed that every field of every record will have a corresponding type.
58
48
  * **Clients should always take the included types into account when consuming records!**
59
- *
60
- * As an example, the following response highlights a collision, where a field called "cancelled" was ingested both as a
61
- * boolean but also wrongly as a string. The first record contains the field "cancelled" as a string, but the very next record has the
62
- * field with the same name but of boolean type. The types section has two entries. One corresponds to first record that has
63
- * the field cancelled of type string. The second entry in the types section corresponds to the subsequent records which have
64
- * the boolean field type.
65
- *
66
- * ```json
67
- * {
68
- * "state":"SUCCEEDED",
69
- * "result": {
70
- * "records": [
71
- * {
72
- * "type": "user_event",
73
- * "order_id": "1ea34-2515-1515-fe1g",
74
- * "cancelled": "true"
75
- * },
76
- * {
77
- * "type": "user_event",
78
- * "order_id": "2ea34-2515-1515-fe1g",
79
- * "cancelled": false
80
- * },
81
- * {
82
- * "type": "user_event",
83
- * "order_id": "3ea34-2515-1515-fe1g",
84
- * "cancelled": true
85
- * },
86
- * {
87
- * "type": "user_event",
88
- * "order_id": "4ea34-2515-1515-fe1g",
89
- * "cancelled": false
90
- * }
91
- * ],
92
- * "types": [
93
- * {
94
- * "indexRange": [
95
- * 0,
96
- * 1
97
- * ],
98
- * "mappings": {
99
- * "type": {
100
- * "type": "string"
101
- * },
102
- * "order_id": {
103
- * "type": "string"
104
- * },
105
- * "cancelled": {
106
- * "type": "string"
107
- * }
108
- * }
109
- * },
110
- * {
111
- * "indexRange": [
112
- * 1,
113
- * 4
114
- * ],
115
- * "mappings": {
116
- * "type": {
117
- * "type": "string"
118
- * },
119
- * "order_id": {
120
- * "type": "string"
121
- * },
122
- * "cancelled": {
123
- * "type": "boolean"
124
- * }
125
- * }
126
- * }
127
- * ],
128
- * "metadata": {
129
- * "query": "fetch events | ...",
130
- * "dqlVersion": "V0_3",
131
- * "appliedTimeframe": {
132
- * "start": 1657624357056,
133
- * "end": 1657631557056
134
- * },
135
- * "timezone": "Z",
136
- * "locale": ""
137
- * }
138
- * }
139
- * }
140
- * ```
141
- *
142
- * The possible Grail types ened in the "types" section is limited to a list of well-defined types:
143
- * ```
144
- * BOOLEAN
145
- * STRING
146
- * DOUBLE
147
- * LONG
148
- * TIMESTAMP
149
- * TIMEFRAME
150
- * DURATION
151
- * BINARY
152
- * IP_ADDRESS
153
- * GEO_POINT
154
- * ARRAY
155
- * RECORD
156
- * ```
157
49
  * @returns The current status and results of the supplied query.
158
50
  */
159
51
  queryPoll(config: {
160
52
  /** The request-token of the query. */ requestToken: string;
161
- /** The request timeout in milliseconds. The response will be delayed for up to the specified time in milliseconds to wait for the result of the query. */ requestTimeoutMilliseconds?: number;
53
+ /** The time a client is willing to wait for the query result. In case the query finishes within the specified timeout, the query result is returned. Otherwise, the query status is returned. */ requestTimeoutMilliseconds?: number;
162
54
  /** If set additional data will be available in the metadata section. */ enrich?: string;
163
55
  abortSignal?: AbortSignal;
164
56
  }): Promise<QueryPollResponse>;
@@ -173,16 +65,32 @@ export declare class QueryExecutionClient {
173
65
  *
174
66
  * ### The response format:
175
67
  *
176
- * The json response will contain the state of the started query and a request token to reference it in future polling requests:
68
+ * The json response will contain the state of the started query. If the query succeeded, the result will be included. Otherwise the response will contain a request token to reference the query in future polling requests.
69
+ *
70
+ * The result has two main sections:
71
+ * * The 'records' section contains the individual records, where each record consists of a set of fields and their corresponding values.
72
+ * * The 'types' section describes the corresponding data types that a record field has.
73
+ *
74
+ * Every record has an implicit 'index' according to the position in the 'records' JSON array.
75
+ * The types section has a list of 1..N possible type 'buckets'. Each such bucket has an 'indexRange' which indicates which
76
+ * records will find their field types in which bucket. The index range has two values start & end and can be thought of as [startIndex, endIndex).
177
77
  *
178
- * ```json
179
- * {
180
- * "state":"RUNNING",
181
- * "requestToken":"5tCm27WbTHmyi+749/wGsw==",
182
- * "ttlSeconds":197
183
- * }
78
+ * A field part of a record with index 'i' will find its corresponding field type by first locating the bucket that satisfies:
79
+ *
80
+ * ```text
81
+ * startIndex <= i <= endIndex
184
82
  * ```
185
- * @returns The final status and results of the supplied query if it finished within a supplied request-timeout-milliseconds. | The status of the query to start.
83
+ *
84
+ * Once the bucket is found the 'mappings' object has an entry for all the fields that are part of that record with index 'i'.
85
+ *
86
+ *
87
+ * Since enforcement of a particular schema is absent at ingestion time, it is possible to have records that share the same
88
+ * field name but their values are of a different type. This phenomenon will hence forth be named as a **"collision"**.
89
+ * When a collision does occur, we will create a new type 'bucket' that will have a different index range where
90
+ * the new record field types will be placed.
91
+ * It is guaranteed that every field of every record will have a corresponding type.
92
+ * **Clients should always take the included types into account when consuming records!**
93
+ * @returns The final status and results of the supplied query if it finished within a supplied requestTimeoutMilliseconds. | The status of the query to start.
186
94
  */
187
95
  queryExecute(config: {
188
96
  body: ExecuteRequest;
@@ -207,7 +115,7 @@ export declare class QueryExecutionClient {
207
115
  * * the 'metadata' section contains information about the query like 'analysisTimeframe', 'timezone' or 'locale'.
208
116
  *
209
117
  * Every record has an implicit 'index' according to the position in the 'records' JSON array.
210
- * The types section has a list of 1..N possibhttps://dev.deus-dev.internal.dynatracelabs.com/query-frontend/docs/rest/swagger-ui/index.html?urls.primaryName=v0.5#/Query%20Execution/query%3Acancelle type 'buckets'. Each such bucket has an 'indexRange' which indicates which
118
+ * The types section has a list of 1..N possible type 'buckets'. Each such bucket has an 'indexRange' which indicates which
211
119
  * records will find their field types in which bucket. The index range has two values start & end and can be thought of as [startIndex, endIndex).
212
120
  *
213
121
  * A field part of a record with index 'i' will find its corresponding field type by first locating the bucket that satisfies:
@@ -225,108 +133,6 @@ export declare class QueryExecutionClient {
225
133
  * the new record field types will be placed.
226
134
  * It is guaranteed that every field of every record will have a corresponding type.
227
135
  * **Clients should always take the included types into account when consuming records!**
228
- *
229
- *
230
- * As an example, the following response highlights a collision, where a field called "cancelled" was ingested both as a
231
- * boolean but also wrongly as a string. The first record contains the field "cancelled" as a string, but the very next record has the
232
- * field with the same name but of boolean type. The types section has two entries. One corresponds to first record that has
233
- * the field cancelled of type string. The second entry in the types section corresponds to the subsequent records which have
234
- * the boolean field type.
235
- *
236
- * ```json
237
- * {
238
- * "state":"SUCCEEDED",
239
- * "ttlSeconds":197,
240
- * "result": {
241
- * "records": [
242
- * {
243
- * "type": "user_event",
244
- * "order_id": "1ea34-2515-1515-fe1g",
245
- * "cancelled": "true"
246
- * },
247
- * {
248
- * "type": "user_event",
249
- * "order_id": "2ea34-2515-1515-fe1g",
250
- * "cancelled": false
251
- * },
252
- * {
253
- * "type": "user_event",
254
- * "order_id": "3ea34-2515-1515-fe1g",
255
- * "cancelled": true
256
- * },
257
- * {
258
- * "type": "user_event",
259
- * "order_id": "4ea34-2515-1515-fe1g",
260
- * "cancelled": false
261
- * }
262
- * ],
263
- * "types": [
264
- * {
265
- * "indexRange": [
266
- * 0,
267
- * 1
268
- * ],
269
- * "mappings": {
270
- * "type": {
271
- * "type": "string"
272
- * },
273
- * "order_id": {
274
- * "type": "string"
275
- * },
276
- * "cancelled": {
277
- * "type": "string"
278
- * }
279
- * }
280
- * },
281
- * {
282
- * "indexRange": [
283
- * 1,
284
- * 4
285
- * ],
286
- * "mappings": {
287
- * "type": {
288
- * "type": "string"
289
- * },
290
- * "order_id": {
291
- * "type": "string"
292
- * },
293
- * "cancelled": {
294
- * "type": "boolean"
295
- * }
296
- * }
297
- * }
298
- * ],
299
- * "metadata": {
300
- * "query": "fetch events | ...",
301
- * "dqlVersion": "V0_3",
302
- * "appliedTimeframe": {
303
- * "start": 1657624357056,
304
- * "end": 1657631557056
305
- * },
306
- * "timezone": "Z",
307
- * "locale": ""
308
- * }
309
- * }
310
- * }
311
- * ```
312
- *
313
- * ### Field data types
314
- *
315
- * The possible Grail types encountered in the "types" section is limited to a list of well-defined types:
316
- * ```
317
- * BOOLEAN
318
- * STRING
319
- * DOUBLE
320
- * LONG
321
- * TIMESTAMP
322
- * TIMEFRAME
323
- * DURATION
324
- * BINARY
325
- * IP_ADDRESS
326
- * GEO_POINT
327
- * ARRAY
328
- * RECORD
329
- * ```
330
136
  * @returns The query already finished.
331
137
  */
332
138
  queryCancel(config: {
@@ -21,6 +21,8 @@ export declare namespace _AutocompleteRequestTransformation {
21
21
  timezone?: string;
22
22
  locale?: string;
23
23
  }
24
- function fromJson(model: AsJson): AutocompleteRequest;
25
- function toJson(model: AutocompleteRequest): AsJson;
24
+ function isAutocompleteRequest(value: any): value is AutocompleteRequest;
25
+ function isJson(value: any): value is AsJson;
26
+ function fromJson($model: AsJson): AutocompleteRequest;
27
+ function toJson($model: AutocompleteRequest): AsJson;
26
28
  }
@@ -23,6 +23,8 @@ export declare namespace _AutocompleteResponseTransformation {
23
23
  suggestions: _AutocompleteSuggestionTransformation.AsJson[];
24
24
  suggestedTtlSeconds?: number;
25
25
  }
26
- function fromJson(model: AsJson): AutocompleteResponse;
27
- function toJson(model: AutocompleteResponse): AsJson;
26
+ function isAutocompleteResponse(value: any): value is AutocompleteResponse;
27
+ function isJson(value: any): value is AsJson;
28
+ function fromJson($model: AsJson): AutocompleteResponse;
29
+ function toJson($model: AutocompleteResponse): AsJson;
28
30
  }
@@ -25,6 +25,8 @@ export declare namespace _AutocompleteSuggestionPartTransformation {
25
25
  synopsis?: string;
26
26
  suggestion: string;
27
27
  }
28
- function fromJson(model: AsJson): AutocompleteSuggestionPart;
29
- function toJson(model: AutocompleteSuggestionPart): AsJson;
28
+ function isAutocompleteSuggestionPart(value: any): value is AutocompleteSuggestionPart;
29
+ function isJson(value: any): value is AsJson;
30
+ function fromJson($model: AsJson): AutocompleteSuggestionPart;
31
+ function toJson($model: AutocompleteSuggestionPart): AsJson;
30
32
  }
@@ -23,6 +23,8 @@ export declare namespace _AutocompleteSuggestionTransformation {
23
23
  alreadyTypedCharacters: number;
24
24
  suggestion: string;
25
25
  }
26
- function fromJson(model: AsJson): AutocompleteSuggestion;
27
- function toJson(model: AutocompleteSuggestion): AsJson;
26
+ function isAutocompleteSuggestion(value: any): value is AutocompleteSuggestion;
27
+ function isJson(value: any): value is AsJson;
28
+ function fromJson($model: AsJson): AutocompleteSuggestion;
29
+ function toJson($model: AutocompleteSuggestion): AsJson;
28
30
  }
@@ -13,6 +13,8 @@ export declare namespace _DQLAlternativeNodeTransformation {
13
13
  interface AsJson extends _DQLNodeTransformation.AsJson {
14
14
  alternatives?: object;
15
15
  }
16
- function fromJson(model: AsJson): DQLAlternativeNode;
17
- function toJson(model: DQLAlternativeNode): AsJson;
16
+ function isDqlAlternativeNode(value: any): value is DQLAlternativeNode;
17
+ function isJson(value: any): value is AsJson;
18
+ function fromJson($model: AsJson): DQLAlternativeNode;
19
+ function toJson($model: DQLAlternativeNode): AsJson;
18
20
  }
@@ -18,6 +18,8 @@ export declare namespace _DQLContainerNodeTransformation {
18
18
  type?: string;
19
19
  children?: _DQLNodeTransformation.AsJson[];
20
20
  }
21
- function fromJson(model: AsJson): DQLContainerNode;
22
- function toJson(model: DQLContainerNode): AsJson;
21
+ function isDqlContainerNode(value: any): value is DQLContainerNode;
22
+ function isJson(value: any): value is AsJson;
23
+ function fromJson($model: AsJson): DQLContainerNode;
24
+ function toJson($model: DQLContainerNode): AsJson;
23
25
  }
@@ -16,14 +16,15 @@ export interface DQLNode {
16
16
  }
17
17
  /** @ignore */
18
18
  export declare namespace _DQLNodeTransformation {
19
- function isDqlTerminalNode(model: DQLNode): model is DQLTerminalNode;
20
- function isDqlContainerNode(model: DQLNode): model is DQLContainerNode;
21
- function isDqlAlternativeNode(model: DQLNode): model is DQLAlternativeNode;
19
+ function isDqlTerminalNode($model: DQLNode): $model is DQLTerminalNode;
20
+ function isDqlContainerNode($model: DQLNode): $model is DQLContainerNode;
21
+ function isDqlAlternativeNode($model: DQLNode): $model is DQLAlternativeNode;
22
22
  interface AsJson {
23
23
  nodeType: _DQLNodeNodeTypeTransformation.AsJson;
24
24
  tokenPosition?: _TokenPositionTransformation.AsJson;
25
25
  isOptional: boolean;
26
26
  }
27
- function fromJson(model: AsJson, includeChildProps?: boolean): DQLNode;
28
- function toJson(model: DQLNode, includeChildProps?: boolean): AsJson;
27
+ function isJson(value: any): value is AsJson;
28
+ function fromJson($model: AsJson, includeChildProps?: boolean): DQLNode;
29
+ function toJson($model: DQLNode, includeChildProps?: boolean): AsJson;
29
30
  }
@@ -21,6 +21,8 @@ export declare namespace _DQLTerminalNodeTransformation {
21
21
  isMandatoryOnUserOrder?: boolean;
22
22
  canonicalString?: string;
23
23
  }
24
- function fromJson(model: AsJson): DQLTerminalNode;
25
- function toJson(model: DQLTerminalNode): AsJson;
24
+ function isDqlTerminalNode(value: any): value is DQLTerminalNode;
25
+ function isJson(value: any): value is AsJson;
26
+ function fromJson($model: AsJson): DQLTerminalNode;
27
+ function toJson($model: DQLTerminalNode): AsJson;
26
28
  }
@@ -11,8 +11,10 @@ export declare namespace _ErrorEnvelopeTransformation {
11
11
  interface AsJson {
12
12
  error: _ErrorResponseTransformation.AsJson;
13
13
  }
14
- function fromJson(model: AsJson): ErrorEnvelope;
15
- function toJson(model: ErrorEnvelope): AsJson;
14
+ function isErrorEnvelope(value: any): value is ErrorEnvelope;
15
+ function isJson(value: any): value is AsJson;
16
+ function fromJson($model: AsJson): ErrorEnvelope;
17
+ function toJson($model: ErrorEnvelope): AsJson;
16
18
  function fromFormData(formData: FormDataResponseBody): ErrorEnvelope;
17
- function toFormData(model: ErrorEnvelope): FormDataRequestBody;
19
+ function toFormData($model: ErrorEnvelope): FormDataRequestBody;
18
20
  }
@@ -45,6 +45,8 @@ export declare namespace _ErrorResponseDetailsTransformation {
45
45
  errorMessageFormatSpecifierTypes: string[];
46
46
  errorMessageFormat: string;
47
47
  }
48
- function fromJson(model: AsJson): ErrorResponseDetails;
49
- function toJson(model: ErrorResponseDetails): AsJson;
48
+ function isErrorResponseDetails(value: any): value is ErrorResponseDetails;
49
+ function isJson(value: any): value is AsJson;
50
+ function fromJson($model: AsJson): ErrorResponseDetails;
51
+ function toJson($model: ErrorResponseDetails): AsJson;
50
52
  }
@@ -20,6 +20,8 @@ export declare namespace _ErrorResponseTransformation {
20
20
  details: _ErrorResponseDetailsTransformation.AsJson;
21
21
  code: number;
22
22
  }
23
- function fromJson(model: AsJson): ErrorResponse;
24
- function toJson(model: ErrorResponse): AsJson;
23
+ function isErrorResponse(value: any): value is ErrorResponse;
24
+ function isJson(value: any): value is AsJson;
25
+ function fromJson($model: AsJson): ErrorResponse;
26
+ function toJson($model: ErrorResponse): AsJson;
25
27
  }
@@ -32,7 +32,7 @@ export interface ExecuteRequest {
32
32
  */
33
33
  requestTimeoutMilliseconds?: number;
34
34
  /**
35
- * Request preview results. If a preview is available within the request-timeout-milliseconds, then it will be returned as part of the response.
35
+ * Request preview results. If a preview is available within the requestTimeoutMilliseconds, then it will be returned as part of the response.
36
36
  */
37
37
  enablePreview?: boolean;
38
38
  /**
@@ -59,6 +59,8 @@ export declare namespace _ExecuteRequestTransformation {
59
59
  defaultSamplingRatio?: number;
60
60
  defaultScanLimitGbytes?: number;
61
61
  }
62
- function fromJson(model: AsJson): ExecuteRequest;
63
- function toJson(model: ExecuteRequest): AsJson;
62
+ function isExecuteRequest(value: any): value is ExecuteRequest;
63
+ function isJson(value: any): value is AsJson;
64
+ function fromJson($model: AsJson): ExecuteRequest;
65
+ function toJson($model: ExecuteRequest): AsJson;
64
66
  }
@@ -13,6 +13,8 @@ export declare namespace _FieldTypeTransformation {
13
13
  type: _FieldTypeTypeTransformation.AsJson;
14
14
  types?: _RangedFieldTypesTransformation.AsJson[];
15
15
  }
16
- function fromJson(model: AsJson): FieldType;
17
- function toJson(model: FieldType): AsJson;
16
+ function isFieldType(value: any): value is FieldType;
17
+ function isJson(value: any): value is AsJson;
18
+ function fromJson($model: AsJson): FieldType;
19
+ function toJson($model: FieldType): AsJson;
18
20
  }
@@ -17,6 +17,8 @@ export declare namespace _GeoPointTransformation {
17
17
  latitude: number;
18
18
  longitude: number;
19
19
  }
20
- function fromJson(model: AsJson): GeoPoint;
21
- function toJson(model: GeoPoint): AsJson;
20
+ function isGeoPoint(value: any): value is GeoPoint;
21
+ function isJson(value: any): value is AsJson;
22
+ function fromJson($model: AsJson): GeoPoint;
23
+ function toJson($model: GeoPoint): AsJson;
22
24
  }
@@ -61,6 +61,8 @@ export declare namespace _GrailMetadataTransformation {
61
61
  notifications?: _MetadataNotificationTransformation.AsJson[];
62
62
  queryId?: string;
63
63
  }
64
- function fromJson(model: AsJson): GrailMetadata;
65
- function toJson(model: GrailMetadata): AsJson;
64
+ function isGrailMetadata(value: any): value is GrailMetadata;
65
+ function isJson(value: any): value is AsJson;
66
+ function fromJson($model: AsJson): GrailMetadata;
67
+ function toJson($model: GrailMetadata): AsJson;
66
68
  }
@@ -40,6 +40,8 @@ export declare namespace _MetadataNotificationTransformation {
40
40
  notificationType?: string;
41
41
  message?: string;
42
42
  }
43
- function fromJson(model: AsJson): MetadataNotification;
44
- function toJson(model: MetadataNotification): AsJson;
43
+ function isMetadataNotification(value: any): value is MetadataNotification;
44
+ function isJson(value: any): value is AsJson;
45
+ function fromJson($model: AsJson): MetadataNotification;
46
+ function toJson($model: MetadataNotification): AsJson;
45
47
  }
@@ -13,6 +13,8 @@ export declare namespace _MetadataTransformation {
13
13
  grail?: _GrailMetadataTransformation.AsJson;
14
14
  metrics?: _MetricMetadataTransformation.AsJson[];
15
15
  }
16
- function fromJson(model: AsJson): Metadata;
17
- function toJson(model: Metadata): AsJson;
16
+ function isMetadata(value: any): value is Metadata;
17
+ function isJson(value: any): value is AsJson;
18
+ function fromJson($model: AsJson): Metadata;
19
+ function toJson($model: Metadata): AsJson;
18
20
  }
@@ -27,6 +27,8 @@ export declare namespace _MetricMetadataTransformation {
27
27
  description?: string;
28
28
  unit?: string;
29
29
  }
30
- function fromJson(model: AsJson): MetricMetadata;
31
- function toJson(model: MetricMetadata): AsJson;
30
+ function isMetricMetadata(value: any): value is MetricMetadata;
31
+ function isJson(value: any): value is AsJson;
32
+ function fromJson($model: AsJson): MetricMetadata;
33
+ function toJson($model: MetricMetadata): AsJson;
32
34
  }
@@ -19,6 +19,8 @@ export declare namespace _ParseRequestTransformation {
19
19
  timezone?: string;
20
20
  locale?: string;
21
21
  }
22
- function fromJson(model: AsJson): ParseRequest;
23
- function toJson(model: ParseRequest): AsJson;
22
+ function isParseRequest(value: any): value is ParseRequest;
23
+ function isJson(value: any): value is AsJson;
24
+ function fromJson($model: AsJson): ParseRequest;
25
+ function toJson($model: ParseRequest): AsJson;
24
26
  }
@@ -22,6 +22,8 @@ export declare namespace _PositionInfoTransformation {
22
22
  index: number;
23
23
  line: number;
24
24
  }
25
- function fromJson(model: AsJson): PositionInfo;
26
- function toJson(model: PositionInfo): AsJson;
25
+ function isPositionInfo(value: any): value is PositionInfo;
26
+ function isJson(value: any): value is AsJson;
27
+ function fromJson($model: AsJson): PositionInfo;
28
+ function toJson($model: PositionInfo): AsJson;
27
29
  }
@@ -23,6 +23,8 @@ export declare namespace _QueryPollResponseTransformation {
23
23
  progress?: number;
24
24
  state: _QueryStateTransformation.AsJson;
25
25
  }
26
- function fromJson(model: AsJson): QueryPollResponse;
27
- function toJson(model: QueryPollResponse): AsJson;
26
+ function isQueryPollResponse(value: any): value is QueryPollResponse;
27
+ function isJson(value: any): value is AsJson;
28
+ function fromJson($model: AsJson): QueryPollResponse;
29
+ function toJson($model: QueryPollResponse): AsJson;
28
30
  }
@@ -22,6 +22,8 @@ export declare namespace _QueryResultTransformation {
22
22
  metadata: _MetadataTransformation.AsJson;
23
23
  types: _RangedFieldTypesTransformation.AsJson[];
24
24
  }
25
- function fromJson(model: AsJson): QueryResult;
26
- function toJson(model: QueryResult): AsJson;
25
+ function isQueryResult(value: any): value is QueryResult;
26
+ function isJson(value: any): value is AsJson;
27
+ function fromJson($model: AsJson): QueryResult;
28
+ function toJson($model: QueryResult): AsJson;
27
29
  }
@@ -28,6 +28,8 @@ export declare namespace _QueryStartResponseTransformation {
28
28
  requestToken?: string;
29
29
  state: _QueryStateTransformation.AsJson;
30
30
  }
31
- function fromJson(model: AsJson): QueryStartResponse;
32
- function toJson(model: QueryStartResponse): AsJson;
31
+ function isQueryStartResponse(value: any): value is QueryStartResponse;
32
+ function isJson(value: any): value is AsJson;
33
+ function fromJson($model: AsJson): QueryStartResponse;
34
+ function toJson($model: QueryStartResponse): AsJson;
33
35
  }
@@ -10,6 +10,8 @@ export declare namespace _RangedFieldTypesMappingsTransformation {
10
10
  interface AsJson {
11
11
  [propName: string]: _FieldTypeTransformation.AsJson | undefined;
12
12
  }
13
- function fromJson(model: AsJson): RangedFieldTypesMappings;
14
- function toJson(model: RangedFieldTypesMappings): AsJson;
13
+ function isRangedFieldTypesMappings(value: any): value is RangedFieldTypesMappings;
14
+ function isJson(value: any): value is AsJson;
15
+ function fromJson($model: AsJson): RangedFieldTypesMappings;
16
+ function toJson($model: RangedFieldTypesMappings): AsJson;
15
17
  }
@@ -15,6 +15,8 @@ export declare namespace _RangedFieldTypesTransformation {
15
15
  mappings: _RangedFieldTypesMappingsTransformation.AsJson;
16
16
  indexRange?: number[];
17
17
  }
18
- function fromJson(model: AsJson): RangedFieldTypes;
19
- function toJson(model: RangedFieldTypes): AsJson;
18
+ function isRangedFieldTypes(value: any): value is RangedFieldTypes;
19
+ function isJson(value: any): value is AsJson;
20
+ function fromJson($model: AsJson): RangedFieldTypes;
21
+ function toJson($model: RangedFieldTypes): AsJson;
20
22
  }