@coveo/platform-client 37.10.0 → 37.11.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 (64) hide show
  1. package/dist/APICore.js +6 -2
  2. package/dist/APICore.js.map +1 -1
  3. package/dist/definitions/APICore.d.ts +1 -1
  4. package/dist/definitions/resources/BaseInterfaces.d.ts +1 -1
  5. package/dist/definitions/resources/Pipelines/MLAssociations/MLAssociations.d.ts +2 -1
  6. package/dist/definitions/resources/Pipelines/MLAssociations/MLAssociationsInterfaces.d.ts +3 -0
  7. package/dist/definitions/resources/Pipelines/PipelinesInterfaces.d.ts +1 -1
  8. package/dist/definitions/resources/UsageAnalytics/Read/Administration/Administration.d.ts +13 -2
  9. package/dist/definitions/resources/UsageAnalytics/Read/Administration/AdministrationInterfaces.d.ts +5 -6
  10. package/dist/definitions/resources/UsageAnalytics/Read/CommonParamParts.d.ts +118 -0
  11. package/dist/definitions/resources/UsageAnalytics/Read/DataShare/DataShare.d.ts +15 -3
  12. package/dist/definitions/resources/UsageAnalytics/Read/Dimensions/Dimensions.d.ts +65 -2
  13. package/dist/definitions/resources/UsageAnalytics/Read/Dimensions/DimensionsInterfaces.d.ts +20 -19
  14. package/dist/definitions/resources/UsageAnalytics/Read/Exports/Exports.d.ts +60 -2
  15. package/dist/definitions/resources/UsageAnalytics/Read/Exports/ExportsInterfaces.d.ts +28 -23
  16. package/dist/definitions/resources/UsageAnalytics/Read/Filters/Filters.d.ts +44 -26
  17. package/dist/definitions/resources/UsageAnalytics/Read/ReadServiceResource.d.ts +16 -0
  18. package/dist/definitions/resources/UsageAnalytics/Read/Reports/Reports.d.ts +35 -17
  19. package/dist/definitions/resources/UsageAnalytics/Read/Reports/ReportsInterfaces.d.ts +13 -14
  20. package/dist/definitions/resources/UsageAnalytics/Read/Snowflake/Snowflake.d.ts +41 -2
  21. package/dist/definitions/resources/UsageAnalytics/Read/Snowflake/SnowflakeInterfaces.d.ts +8 -16
  22. package/dist/definitions/resources/UsageAnalytics/Read/Statistics/Statistics.d.ts +55 -4
  23. package/dist/definitions/resources/UsageAnalytics/Read/Statistics/StatisticsInterfaces.d.ts +71 -93
  24. package/dist/definitions/resources/UsageAnalytics/Read/Users/Users.d.ts +33 -2
  25. package/dist/definitions/resources/UsageAnalytics/Read/Users/UsersInterfaces.d.ts +11 -9
  26. package/dist/definitions/resources/UsageAnalytics/Read/index.d.ts +1 -0
  27. package/dist/definitions/resources/UsageAnalytics/UsageAnalytics.d.ts +5 -5
  28. package/dist/definitions/utils/normalizePaginatedOptions.d.ts +1 -1
  29. package/dist/resources/Activities/Activities.js +2 -2
  30. package/dist/resources/Activities/Activities.js.map +1 -1
  31. package/dist/resources/Pipelines/MLAssociations/MLAssociations.js +4 -0
  32. package/dist/resources/Pipelines/MLAssociations/MLAssociations.js.map +1 -1
  33. package/dist/resources/ResourceSnapshots/ResourceSnapshots.js +1 -1
  34. package/dist/resources/ResourceSnapshots/ResourceSnapshots.js.map +1 -1
  35. package/dist/resources/UsageAnalytics/Read/Administration/Administration.js +16 -5
  36. package/dist/resources/UsageAnalytics/Read/Administration/Administration.js.map +1 -1
  37. package/dist/resources/UsageAnalytics/Read/CommonParamParts.js +3 -0
  38. package/dist/resources/UsageAnalytics/Read/CommonParamParts.js.map +1 -0
  39. package/dist/resources/UsageAnalytics/Read/DataShare/DataShare.js +19 -7
  40. package/dist/resources/UsageAnalytics/Read/DataShare/DataShare.js.map +1 -1
  41. package/dist/resources/UsageAnalytics/Read/Dimensions/Dimensions.js +76 -13
  42. package/dist/resources/UsageAnalytics/Read/Dimensions/Dimensions.js.map +1 -1
  43. package/dist/resources/UsageAnalytics/Read/Exports/Exports.js +73 -15
  44. package/dist/resources/UsageAnalytics/Read/Exports/Exports.js.map +1 -1
  45. package/dist/resources/UsageAnalytics/Read/Filters/Filters.js +58 -40
  46. package/dist/resources/UsageAnalytics/Read/Filters/Filters.js.map +1 -1
  47. package/dist/resources/UsageAnalytics/Read/ReadServiceResource.js +28 -0
  48. package/dist/resources/UsageAnalytics/Read/ReadServiceResource.js.map +1 -0
  49. package/dist/resources/UsageAnalytics/Read/Reports/Reports.js +48 -38
  50. package/dist/resources/UsageAnalytics/Read/Reports/Reports.js.map +1 -1
  51. package/dist/resources/UsageAnalytics/Read/Reports/ReportsInterfaces.js.map +1 -1
  52. package/dist/resources/UsageAnalytics/Read/Snowflake/Snowflake.js +52 -13
  53. package/dist/resources/UsageAnalytics/Read/Snowflake/Snowflake.js.map +1 -1
  54. package/dist/resources/UsageAnalytics/Read/Statistics/Statistics.js +66 -13
  55. package/dist/resources/UsageAnalytics/Read/Statistics/Statistics.js.map +1 -1
  56. package/dist/resources/UsageAnalytics/Read/Users/Users.js +38 -7
  57. package/dist/resources/UsageAnalytics/Read/Users/Users.js.map +1 -1
  58. package/dist/resources/UsageAnalytics/Read/index.js +1 -0
  59. package/dist/resources/UsageAnalytics/Read/index.js.map +1 -1
  60. package/dist/resources/UsageAnalytics/UsageAnalytics.js +5 -5
  61. package/dist/resources/UsageAnalytics/UsageAnalytics.js.map +1 -1
  62. package/dist/utils/normalizePaginatedOptions.js +1 -1
  63. package/dist/utils/normalizePaginatedOptions.js.map +1 -1
  64. package/package.json +6 -6
@@ -1,71 +1,89 @@
1
- import Resource from '../../../Resource';
1
+ import ReadServiceResource from '../ReadServiceResource';
2
2
  import { CreatePermissionsFilterModel, CreatePermissionsFilterResponse, CreateReportingFilterModel, CreateReportingFilterResponse, FilterResponse, FilterServiceHealthResponse, FilterServiceStatusResponse, FilterTargetsModel, FilterTargetsResponse, ListFiltersResponse, PermissionsFilterUser, UpdatePermissionsFilterModel, UpdateReportingFilterModel } from './FiltersInterfaces';
3
- export default class Filters extends Resource {
3
+ export default class Filters extends ReadServiceResource {
4
4
  static baseUrl: string;
5
5
  static reportingBaseUrl: string;
6
6
  static permissionsBaseUrl: string;
7
7
  /**
8
- * Get all reporting filters
8
+ * Get all reporting filters.
9
9
  */
10
10
  listReportFilters(): Promise<ListFiltersResponse>;
11
11
  /**
12
- * Get a reporting filter
12
+ * Get a reporting filter.
13
+ *
14
+ * @param filterId The unique identifier of a filter. This id is generated by the server when creating a filter.
13
15
  */
14
- getReportFilter(id: string): Promise<FilterResponse>;
16
+ getReportFilter(filterId: string): Promise<FilterResponse>;
15
17
  /**
16
- * Create a reporting filter
18
+ * Create a reporting filter.
17
19
  */
18
20
  createReportFilter(filter: CreateReportingFilterModel): Promise<CreateReportingFilterResponse>;
19
21
  /**
20
22
  * Update a reporting filter
23
+ *
24
+ * @param filterId The unique identifier of a filter. This id is generated by the server when creating a filter.
21
25
  */
22
- updateReportFilter(id: string, filter: UpdateReportingFilterModel): Promise<CreateReportingFilterResponse>;
26
+ updateReportFilter(filterId: string, filter: UpdateReportingFilterModel): Promise<CreateReportingFilterResponse>;
23
27
  /**
24
28
  * Delete a reporting filter
29
+ *
30
+ * @param filterId The unique identifier of a filter. This id is generated by the server when creating a filter.
25
31
  */
26
- deleteReportFilter(id: string): Promise<Record<string, unknown>>;
32
+ deleteReportFilter(filterId: string): Promise<Record<string, unknown>>;
27
33
  /**
28
- * Get all permission filters
34
+ * Get all permission filters.
29
35
  */
30
36
  listPermissionFilters(): Promise<ListFiltersResponse>;
31
37
  /**
32
- * Get a permission filter
38
+ * Get a permission filter.
33
39
  */
34
- getPermissionFilter(id: string): Promise<FilterResponse>;
40
+ getPermissionFilter(filterId: string): Promise<FilterResponse>;
35
41
  /**
36
- * Create a permission filter
42
+ * Create a permission filter.
37
43
  */
38
44
  createPermissionFilter(filter: CreatePermissionsFilterModel): Promise<CreatePermissionsFilterResponse>;
39
45
  /**
40
- * Update a permission filter
46
+ * Update a permission filter.
47
+ *
48
+ * @param filterId The unique identifier of a filter. This id is generated by the server when creating a filter.
41
49
  */
42
- updatePermissionFilter(id: string, filter: UpdatePermissionsFilterModel): Promise<CreatePermissionsFilterResponse>;
50
+ updatePermissionFilter(filterId: string, filter: UpdatePermissionsFilterModel): Promise<CreatePermissionsFilterResponse>;
43
51
  /**
44
- * Delete a permission filter
52
+ * Delete a permission filter.
53
+ *
54
+ * @param filterId The unique identifier of a filter. This id is generated by the server when creating a filter.
45
55
  */
46
- deletePermissionFilter(id: string): Promise<Record<string, unknown>>;
56
+ deletePermissionFilter(filterId: string): Promise<Record<string, unknown>>;
47
57
  /**
48
- * Get the users of a permission filters
58
+ * Get the users of a permission filters.
59
+ *
60
+ * @param filterId The unique identifier of a filter. This id is generated by the server when creating a filter.
49
61
  */
50
- getPermissionFilterUsers(id: string): Promise<PermissionsFilterUser[]>;
62
+ getPermissionFilterUsers(filterId: string): Promise<PermissionsFilterUser[]>;
51
63
  /**
52
- * Set the users of a permission filter
64
+ * Set the users of a permission filter.
65
+ *
66
+ * @param filterId The unique identifier of a filter. This id is generated by the server when creating a filter.
53
67
  */
54
- updatePermissionFilterUsers(id: string, users: string[]): Promise<Record<string, unknown>>;
68
+ updatePermissionFilterUsers(filterId: string, users: string[]): Promise<Record<string, unknown>>;
55
69
  /**
56
- * Get the targets of a permission filters
70
+ * Get the targets of a permission filters.
71
+ *
72
+ * @param filterId The unique identifier of a filter. This id is generated by the server when creating a filter.
57
73
  */
58
- getPermissionFilterTargets(id: string): Promise<FilterTargetsResponse[]>;
74
+ getPermissionFilterTargets(filterId: string): Promise<FilterTargetsResponse[]>;
59
75
  /**
60
- * Set the targets of a permission filter
76
+ * Set the targets of a permission filter.
77
+ *
78
+ * @param filterId The unique identifier of a filter. This id is generated by the server when creating a filter.
61
79
  */
62
- updatePermissionFilterTargets(id: string, targets: FilterTargetsModel): Promise<Record<string, unknown>>;
80
+ updatePermissionFilterTargets(filterId: string, targets: FilterTargetsModel): Promise<Record<string, unknown>>;
63
81
  /**
64
- * Health check for the filter service
82
+ * Health check for the filter service.
65
83
  */
66
84
  healthcheck(): Promise<FilterServiceHealthResponse>;
67
85
  /**
68
- * Get the filter service status
86
+ * Get the filter service status.
69
87
  */
70
88
  status(): Promise<FilterServiceStatusResponse>;
71
89
  }
@@ -0,0 +1,16 @@
1
+ import Resource from '../../Resource';
2
+ /**
3
+ * Extends Resource with a `buildPathWithOrg` method, that will fill in the optional `org` query parameter by default.
4
+ * It still allows "overriding" the org by specifying it explicitly in the parameters.
5
+ */
6
+ export default class ReadServiceResource extends Resource {
7
+ /**
8
+ * Build the request path, handling the optional `org` query parameter.
9
+ *
10
+ * @param route The path part of the request.
11
+ * @param queryParams Optional query parameters object.
12
+ * If this object contains an `org` property, it will override the value from the configuration.
13
+ * @returns The request path including formatted query parameters.
14
+ */
15
+ protected buildPathWithOrg(route: string, queryParams?: any): string;
16
+ }
@@ -1,42 +1,56 @@
1
1
  import { ReportType } from '../../../Enums';
2
- import Resource from '../../../Resource';
2
+ import ReadServiceResource from '../ReadServiceResource';
3
3
  import { CreateReportModel, CreateReportResponse, GetReportOptions, GetReportTemplateOptions, ListReportsOptions, ListReportsResponse, ReportAccessRequest, ReportAccessResponse, ReportModel, TemplateResponse, ReportUsersResponse, StatusResponse, TemplateMetadataResponse, UpdateReportModel } from './ReportsInterfaces';
4
- export default class Reports extends Resource {
4
+ export default class Reports extends ReadServiceResource {
5
5
  static baseUrl: string;
6
6
  /**
7
- * Get the persisted reports of one or all types
7
+ * Get the persisted reports of one or all types.
8
8
  */
9
9
  list(options?: ListReportsOptions): Promise<ListReportsResponse>;
10
10
  /**
11
- * Get a report
11
+ * Get a report.
12
+ *
13
+ * @param reportId The unique identifier of a report. This id is generated by the server when creating a report.
12
14
  */
13
- get(id: string, options?: GetReportOptions): Promise<ReportModel>;
15
+ get(reportId: string, options?: GetReportOptions): Promise<ReportModel>;
14
16
  /**
15
- * Create a report
17
+ * Create a report.
16
18
  */
17
19
  create(report: CreateReportModel): Promise<CreateReportResponse>;
18
20
  /**
19
- * Update a report
21
+ * Update a report.
22
+ *
23
+ * @param reportId The unique identifier of a report. This id is generated by the server when creating a report.
20
24
  */
21
- update(id: string, report: UpdateReportModel): Promise<CreateReportModel>;
25
+ update(reportId: string, report: UpdateReportModel): Promise<CreateReportModel>;
22
26
  /**
23
- * Delete a report
27
+ * Delete a report.
28
+ *
29
+ * @param reportId The unique identifier of a report. This id is generated by the server when creating a report.
24
30
  */
25
- delete(id: string): Promise<Record<string, unknown>>;
31
+ delete(reportId: string): Promise<Record<string, unknown>>;
26
32
  /**
27
- * Get the users and groups who can view a report
33
+ * Get the users and groups who can view a report.
34
+ *
35
+ * @param reportId The unique identifier of a report. This id is generated by the server when creating a report.
28
36
  */
29
37
  getAccess(reportId: string): Promise<ReportAccessResponse>;
30
38
  /**
31
- * Set the users and groups who are allowed to view a report
39
+ * Set the users and groups who are allowed to view a report.
40
+ *
41
+ * @param reportId The unique identifier of a report. This id is generated by the server when creating a report.
32
42
  */
33
43
  setAccess(reportId: string, reportAccess: ReportAccessRequest): Promise<Record<string, unknown>>;
34
44
  /**
35
- * Get the users who can view a report
45
+ * Get the users who can view a report.
46
+ *
47
+ * @param reportId The unique identifier of a report. This id is generated by the server when creating a report.
36
48
  */
37
49
  getUsers(reportId: string): Promise<ReportUsersResponse>;
38
50
  /**
39
- * Set the users who are allowed to view a report
51
+ * Set the users who are allowed to view a report.
52
+ *
53
+ * @param reportId The unique identifier of a report. This id is generated by the server when creating a report.
40
54
  */
41
55
  setUsers(reportId: string, userIds: string[]): Promise<Record<string, unknown>>;
42
56
  /**
@@ -44,15 +58,19 @@ export default class Reports extends Resource {
44
58
  */
45
59
  healthcheck(): Promise<StatusResponse>;
46
60
  /**
47
- * Get a report template
61
+ * Get a report template.
62
+ *
63
+ * @param templateId The unique identifier of a template.
48
64
  */
49
65
  getReportTemplate(templateId: string, options?: GetReportTemplateOptions): Promise<TemplateResponse[]>;
50
66
  /**
51
- * Get metadata about available report templates
67
+ * Get metadata about available report templates.
68
+ *
69
+ * @param type The type of the report. Must be either 'explorer' or 'dashboard'.
52
70
  */
53
71
  listReportTemplates(type: ReportType, options?: GetReportTemplateOptions): Promise<TemplateMetadataResponse[]>;
54
72
  /**
55
- * Get the reports service status
73
+ * Get the reports service status.
56
74
  */
57
75
  getServiceStatus(): Promise<StatusResponse>;
58
76
  }
@@ -1,10 +1,11 @@
1
1
  import { ReportType } from '../../../Enums';
2
+ import { TimeZoneParamParts } from '../CommonParamParts';
2
3
  export interface ReportModel {
3
- /** The report id */
4
+ /** The report id. */
4
5
  id: string;
5
- /** The report account */
6
+ /** The report account. */
6
7
  account: string;
7
- /** The display name of the report */
8
+ /** The display name of the report. */
8
9
  displayName: string;
9
10
  /** The type of the report. Must be either 'explorer' or 'dashboard'. */
10
11
  type: ReportType;
@@ -17,9 +18,7 @@ export interface ReportModel {
17
18
  }
18
19
  export type CreateReportModel = Omit<ReportModel, 'id' | 'account'>;
19
20
  export type CreateReportResponse = Pick<ReportModel, 'id'>;
20
- export interface GetReportOptions {
21
- /** Timezone used for calculations. */
22
- tz?: string;
21
+ export interface GetReportOptions extends TimeZoneParamParts {
23
22
  }
24
23
  export type UpdateReportModel = CreateReportModel;
25
24
  export type UpdateReportResponse = CreateReportResponse;
@@ -30,7 +29,7 @@ export interface ListReportsOptions {
30
29
  includeConfig?: boolean;
31
30
  }
32
31
  export interface ListReportsResponse {
33
- /** A collection of report configurations */
32
+ /** A collection of report configurations. */
34
33
  reports: ReportModel[];
35
34
  }
36
35
  export declare enum ReportAccessType {
@@ -38,7 +37,7 @@ export declare enum ReportAccessType {
38
37
  Private = "PRIVATE"
39
38
  }
40
39
  export interface ReportAccessResponse {
41
- /** The access type of the report. Can be PUBLIC or PRIVATE. */
40
+ /** The access type of the report. Can be 'PUBLIC' or 'PRIVATE'. */
42
41
  accessType: ReportAccessType;
43
42
  /** The users allowed to access the specified report. */
44
43
  allowedUsers: UserResponse[];
@@ -60,26 +59,26 @@ export interface ReportUsersResponse {
60
59
  allowedUsers: UserResponse[];
61
60
  }
62
61
  interface AccountMetaModel {
63
- /** The filters that are applied to the user */
62
+ /** The filters that are applied to the user. */
64
63
  filters: string[];
65
64
  /** The reports the user can view. */
66
65
  reports: string[];
67
66
  }
68
67
  export interface UserResponse extends AccountMetaModel {
69
- /** The user id */
68
+ /** The user id. */
70
69
  userId: string;
71
- /** The user account */
70
+ /** The user account. */
72
71
  account: string;
73
72
  }
74
73
  export interface GroupResponse extends AccountMetaModel {
75
- /** The group id */
74
+ /** The group id. */
76
75
  groupId: string;
77
- /** The group account */
76
+ /** The group account. */
78
77
  account: string;
79
78
  }
80
79
  export type StatusResponse = Record<string, unknown>;
81
80
  export interface GetReportTemplateOptions {
82
- /** Whether to include metadata about the report template */
81
+ /** Whether to include metadata about the report template. */
83
82
  includeMetadata?: boolean;
84
83
  }
85
84
  export interface TemplateMetadataResponse {
@@ -1,16 +1,55 @@
1
- import Resource from '../../../Resource';
1
+ import ReadServiceResource from '../ReadServiceResource';
2
2
  import { GetCreditUsageParams, SnowflakeCreditUsageModel, SnowflakeNetworkPolicyModel, SnowflakeReaderAccountEndpointModel, SnowflakeReaderAccountStatusModel, SnowflakeUserModel, SnowflakeUsersModel } from './SnowflakeInterfaces';
3
- export default class Snowflake extends Resource {
3
+ export default class Snowflake extends ReadServiceResource {
4
4
  static baseUrl: string;
5
+ /**
6
+ * Get the details for all users from a Snowflake reader account.
7
+ */
5
8
  listUsers(): Promise<SnowflakeUsersModel>;
9
+ /**
10
+ * Create a new user within a Snowflake reader account.
11
+ */
6
12
  createUser(model: SnowflakeUserModel): Promise<SnowflakeUserModel>;
13
+ /**
14
+ * Delete a user from a Snowflake reader account.
15
+ *
16
+ * @param snowflakeUser The login name for the Snowflake user.
17
+ */
7
18
  deleteUser(snowflakeUser: string): Promise<void>;
19
+ /**
20
+ * Get the details for a specific user from a Snowflake reader account.
21
+ *
22
+ * @param snowflakeUser The login name for the Snowflake user.
23
+ */
8
24
  getUser(snowflakeUser: string): Promise<SnowflakeUserModel>;
25
+ /**
26
+ * Reset a user's password in a Snowflake reader account.
27
+ *
28
+ * @param snowflakeUser The login name for the Snowflake user.
29
+ */
9
30
  resetPassword(snowflakeUser: string): Promise<void>;
31
+ /**
32
+ * Get the details of the active network policy for a Snowflake reader account.
33
+ */
10
34
  getNetworkPolicy(): Promise<SnowflakeNetworkPolicyModel>;
35
+ /**
36
+ * Set the details of the active network policy for a Snowflake reader account.
37
+ */
11
38
  updateNetworkPolicy(model: SnowflakeNetworkPolicyModel): Promise<void>;
39
+ /**
40
+ * Get the amount of compute credits used by a Snowflake reader account within a date range.
41
+ */
12
42
  getCreditUsage(params: GetCreditUsageParams): Promise<SnowflakeCreditUsageModel>;
43
+ /**
44
+ * Retrieve Snowflake reader account state.
45
+ */
13
46
  getSnowflakeReaderAccount(): Promise<SnowflakeReaderAccountStatusModel>;
47
+ /**
48
+ * Retrieve Snowflake reader account endpoint.
49
+ */
14
50
  getSnowflakeReaderAccountEndpoint(): Promise<SnowflakeReaderAccountEndpointModel>;
51
+ /**
52
+ * Create a reader account.
53
+ */
15
54
  createSnowflakeReaderAccount(): Promise<void>;
16
55
  }
@@ -1,18 +1,20 @@
1
1
  import { SnowflakeReaderAccountStatus } from '../../../Enums';
2
+ import { TimeRangeParamParts } from '../CommonParamParts';
2
3
  export interface SnowflakeUsersModel {
3
4
  snowflakeUsers: SnowflakeUserModel[];
4
5
  }
5
6
  export interface SnowflakeUserModel {
6
7
  /**
7
- * The username of the user
8
+ * The username of the user.
8
9
  */
9
10
  username: string;
10
11
  /**
11
- * The email of the user
12
+ * The email of the user.
12
13
  */
13
14
  email: string;
14
15
  /**
15
- * The number of days that the user has access to the reader account, ranging from 0 (indefinitely) to 90 days)
16
+ * The number of days that the user has access to the reader account.
17
+ * Ranging from 0 (indefinitely) to 90 days.
16
18
  */
17
19
  daysToExpiry?: number;
18
20
  }
@@ -20,30 +22,20 @@ export interface SnowflakeNetworkPolicyModel {
20
22
  allowedIpAddresses: string[];
21
23
  blockedIpAddresses: string[];
22
24
  }
23
- export interface GetCreditUsageParams {
24
- /**
25
- * The beginning date of the date range.
26
- * ISO8601 format 'YYYY-MM-DDThh:mm:ss.sssZ'
27
- */
28
- from: string;
29
- /**
30
- * The end date of the date range.
31
- * ISO8601 format 'YYYY-MM-DDThh:mm:ss.sssZ'
32
- */
33
- to: string;
25
+ export interface GetCreditUsageParams extends TimeRangeParamParts {
34
26
  }
35
27
  export interface SnowflakeCreditUsageModel {
36
28
  creditsUsed: number;
37
29
  }
38
30
  export interface SnowflakeReaderAccountStatusModel {
39
31
  /**
40
- * The status of the create reader account request
32
+ * The status of the create reader account request.
41
33
  */
42
34
  snowflakeReaderAccountStatus: SnowflakeReaderAccountStatus;
43
35
  }
44
36
  export interface SnowflakeReaderAccountEndpointModel {
45
37
  /**
46
- * The endpoint of the reader account
38
+ * The endpoint of the reader account.
47
39
  */
48
40
  endpoint: string;
49
41
  }
@@ -1,18 +1,69 @@
1
- import Resource from '../../../Resource';
2
- import { CombinedDataModel, CombinedDataOptions, DeleteQueryOptions, GlobalDataOptions, GraphDataPointsModel, GraphDataPointsOptions, IncoherentEventsModel, IncoherentEventsOptions, MetricsModel, MonitoringHealthModel, ServiceStatus, TrendsModel, TrendsOptions, VisitsGraphDataPointsOptions, VisitsMetricsOptions, VisitsStatisticsModel, VisitsStatisticsOptions, VisitViewOptions } from './StatisticsInterfaces';
3
- export default class Statistics extends Resource {
1
+ import ReadServiceResource from '../ReadServiceResource';
2
+ import { CombinedDataModel, CombinedDataOptions, CancelQueryOptions, GlobalDataOptions, GraphDataPointsModel, GraphDataPointsOptions, IncoherentEventsModel, IncoherentEventsOptions, MetricsModel, MonitoringHealthModel, ServiceStatus, TrendsModel, TrendsOptions, VisitsGraphDataPointsOptions, VisitsMetricsOptions, VisitsStatisticsModel, VisitsStatisticsOptions, VisitViewOptions, DeleteQueryOptions } from './StatisticsInterfaces';
3
+ export default class Statistics extends ReadServiceResource {
4
4
  static baseUrl: string;
5
+ /**
6
+ * Get the statistics service status.
7
+ */
5
8
  status(): Promise<ServiceStatus>;
9
+ /**
10
+ * Get the incoherent events for a date range.
11
+ */
6
12
  listIncoherentEvents(options: IncoherentEventsOptions): Promise<IncoherentEventsModel>;
13
+ /**
14
+ * Get graph data points for the metrics for a date range.
15
+ */
7
16
  listGraphDataPoints(options: GraphDataPointsOptions): Promise<GraphDataPointsModel>;
17
+ /**
18
+ * Get global data for each metric for a date range.
19
+ */
8
20
  listGlobalData(options: GlobalDataOptions): Promise<MetricsModel>;
21
+ /**
22
+ * Get trends of a metric combined with dimensions for a date range.
23
+ */
9
24
  listTrends(options: TrendsOptions): Promise<TrendsModel>;
25
+ /**
26
+ * Get the metrics based on the visits matching the specified criteria.
27
+ */
10
28
  listVisitsMetrics(options: VisitsMetricsOptions): Promise<MetricsModel>;
29
+ /**
30
+ * Get graph data points for visit based metrics for a date range.
31
+ */
11
32
  listVisitsGraphDataPoints(options: VisitsGraphDataPointsOptions): Promise<GraphDataPointsModel>;
33
+ /**
34
+ * Cancel the execution of a query.
35
+ * This is a best effort; there is no guarantee that the query will be cancelled.
36
+ * If the query is cancelled, the sender of the now cancelled query will receive a 409 Conflict.
37
+ *
38
+ * @param queryId The id of the query to cancel.
39
+ */
40
+ cancelQuery(queryId: string, options: CancelQueryOptions): Promise<Record<string, unknown>>;
41
+ /**
42
+ * Please use {@link cancelQuery} instead.
43
+ *
44
+ * @deprecated
45
+ */
12
46
  delete(queryId: string, options: DeleteQueryOptions): Promise<Record<string, unknown>>;
47
+ /**
48
+ * Get metrics combined with dimensions for a date range.
49
+ */
13
50
  listCombinedData(options: CombinedDataOptions): Promise<CombinedDataModel>;
51
+ /**
52
+ * This call no longer exists on the API, it will be removed.
53
+ *
54
+ * @deprecated
55
+ */
14
56
  listTopQueries(): Promise<string[]>;
57
+ /**
58
+ * Health check for the statistics service.
59
+ */
15
60
  getMonitoringHealth(): Promise<MonitoringHealthModel>;
61
+ /**
62
+ * Get the details of the visits matching the specified criteria.
63
+ */
16
64
  listVisits(options: VisitsStatisticsOptions): Promise<VisitsStatisticsModel>;
17
- updateVisitView(orgId: VisitViewOptions): Promise<Record<string, unknown>>;
65
+ /**
66
+ * Force a visit view update.
67
+ */
68
+ updateVisitView(options: VisitViewOptions): Promise<Record<string, unknown>>;
18
69
  }