@extrahorizon/javascript-sdk 8.2.0 → 8.2.1-dev-49-61b4511

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 (152) hide show
  1. package/CHANGELOG.md +1182 -1161
  2. package/README.md +108 -119
  3. package/build/index.cjs.js +1 -1
  4. package/build/index.mjs +1 -1
  5. package/build/types/btoa.d.ts +6 -6
  6. package/build/types/client.d.ts +136 -136
  7. package/build/types/constants.d.ts +15 -15
  8. package/build/types/errorHandler.d.ts +2 -2
  9. package/build/types/errors.d.ts +332 -332
  10. package/build/types/http/client.d.ts +2 -2
  11. package/build/types/http/index.d.ts +4 -4
  12. package/build/types/http/interceptors.d.ts +9 -9
  13. package/build/types/http/oAuth1Signature.d.ts +14 -14
  14. package/build/types/http/oauth1.d.ts +3 -3
  15. package/build/types/http/oauth2.d.ts +3 -3
  16. package/build/types/http/proxy.d.ts +3 -3
  17. package/build/types/http/types.d.ts +331 -331
  18. package/build/types/http/utils.d.ts +21 -21
  19. package/build/types/index.d.ts +9 -9
  20. package/build/types/mock.d.ts +43 -43
  21. package/build/types/mockType.d.ts +1547 -1511
  22. package/build/types/parseStoredCredentials.d.ts +11 -11
  23. package/build/types/rql/index.d.ts +16 -16
  24. package/build/types/rql/parser.d.ts +1 -1
  25. package/build/types/rql/types.d.ts +168 -168
  26. package/build/types/services/auth/applications/index.d.ts +5 -5
  27. package/build/types/services/auth/applications/types.d.ts +260 -190
  28. package/build/types/services/auth/index.d.ts +3 -3
  29. package/build/types/services/auth/oauth1/index.d.ts +5 -5
  30. package/build/types/services/auth/oauth1/types.d.ts +63 -63
  31. package/build/types/services/auth/oauth2/index.d.ts +5 -5
  32. package/build/types/services/auth/oauth2/types.d.ts +52 -52
  33. package/build/types/services/auth/oidc/index.d.ts +5 -5
  34. package/build/types/services/auth/oidc/loginAttempts/index.d.ts +5 -5
  35. package/build/types/services/auth/oidc/loginAttempts/types.d.ts +67 -67
  36. package/build/types/services/auth/oidc/providers/index.d.ts +5 -5
  37. package/build/types/services/auth/oidc/providers/types.d.ts +144 -144
  38. package/build/types/services/auth/oidc/types.d.ts +40 -40
  39. package/build/types/services/auth/types.d.ts +39 -39
  40. package/build/types/services/auth/users/index.d.ts +5 -5
  41. package/build/types/services/auth/users/types.d.ts +121 -121
  42. package/build/types/services/configurations/general.d.ts +5 -5
  43. package/build/types/services/configurations/groups.d.ts +5 -5
  44. package/build/types/services/configurations/index.d.ts +10 -10
  45. package/build/types/services/configurations/patients.d.ts +5 -5
  46. package/build/types/services/configurations/staff.d.ts +5 -5
  47. package/build/types/services/configurations/types.d.ts +222 -222
  48. package/build/types/services/configurations/users.d.ts +5 -5
  49. package/build/types/services/data/comments.d.ts +5 -5
  50. package/build/types/services/data/documents.d.ts +5 -5
  51. package/build/types/services/data/index.d.ts +13 -13
  52. package/build/types/services/data/indexes.d.ts +5 -5
  53. package/build/types/services/data/infrastructure.d.ts +10 -10
  54. package/build/types/services/data/json-schema.d.ts +121 -121
  55. package/build/types/services/data/properties.d.ts +5 -5
  56. package/build/types/services/data/schemas.d.ts +5 -5
  57. package/build/types/services/data/statuses.d.ts +5 -5
  58. package/build/types/services/data/transitions.d.ts +5 -5
  59. package/build/types/services/data/types.d.ts +899 -899
  60. package/build/types/services/dispatchers/actions/index.d.ts +5 -5
  61. package/build/types/services/dispatchers/actions/types.d.ts +78 -78
  62. package/build/types/services/dispatchers/dispatchers/index.d.ts +5 -5
  63. package/build/types/services/dispatchers/dispatchers/types.d.ts +111 -111
  64. package/build/types/services/dispatchers/index.d.ts +7 -7
  65. package/build/types/services/dispatchers/types.d.ts +2 -2
  66. package/build/types/services/events/events.d.ts +5 -5
  67. package/build/types/services/events/health.d.ts +9 -9
  68. package/build/types/services/events/index.d.ts +6 -6
  69. package/build/types/services/events/subscriptions.d.ts +5 -5
  70. package/build/types/services/events/types.d.ts +90 -90
  71. package/build/types/services/files/files.d.ts +5 -5
  72. package/build/types/services/files/formHelpers.d.ts +3 -3
  73. package/build/types/services/files/index.d.ts +6 -6
  74. package/build/types/services/files/settings/index.d.ts +5 -5
  75. package/build/types/services/files/settings/types.d.ts +38 -38
  76. package/build/types/services/files/tokens.d.ts +5 -5
  77. package/build/types/services/files/types.d.ts +185 -185
  78. package/build/types/services/helpers.d.ts +7 -7
  79. package/build/types/services/http-client.d.ts +22 -22
  80. package/build/types/services/index.d.ts +15 -15
  81. package/build/types/services/localizations/countries.d.ts +5 -5
  82. package/build/types/services/localizations/health.d.ts +9 -9
  83. package/build/types/services/localizations/index.d.ts +4 -4
  84. package/build/types/services/localizations/languages.d.ts +5 -5
  85. package/build/types/services/localizations/localizations.d.ts +5 -5
  86. package/build/types/services/localizations/types.d.ts +145 -145
  87. package/build/types/services/logs/access/index.d.ts +5 -5
  88. package/build/types/services/logs/access/types.d.ts +41 -41
  89. package/build/types/services/logs/index.d.ts +3 -3
  90. package/build/types/services/logs/types.d.ts +4 -4
  91. package/build/types/services/mails/index.d.ts +3 -3
  92. package/build/types/services/mails/mails.d.ts +5 -5
  93. package/build/types/services/mails/types.d.ts +141 -141
  94. package/build/types/services/notifications/health.d.ts +9 -9
  95. package/build/types/services/notifications/index.d.ts +7 -7
  96. package/build/types/services/notifications/notifications.d.ts +5 -5
  97. package/build/types/services/notifications/settings.d.ts +5 -5
  98. package/build/types/services/notifications/types.d.ts +222 -222
  99. package/build/types/services/payments/appStore.d.ts +5 -5
  100. package/build/types/services/payments/appStoreSubscriptions.d.ts +5 -5
  101. package/build/types/services/payments/health.d.ts +9 -9
  102. package/build/types/services/payments/index.d.ts +15 -15
  103. package/build/types/services/payments/orders.d.ts +5 -5
  104. package/build/types/services/payments/playStore.d.ts +5 -5
  105. package/build/types/services/payments/playStoreHistory.d.ts +5 -5
  106. package/build/types/services/payments/playStoreSubscriptions.d.ts +5 -5
  107. package/build/types/services/payments/products.d.ts +5 -5
  108. package/build/types/services/payments/stripe.d.ts +5 -5
  109. package/build/types/services/payments/subscriptions.d.ts +5 -5
  110. package/build/types/services/payments/types.d.ts +1189 -1189
  111. package/build/types/services/profiles/groups.d.ts +5 -5
  112. package/build/types/services/profiles/health.d.ts +9 -9
  113. package/build/types/services/profiles/index.d.ts +9 -9
  114. package/build/types/services/profiles/logs.d.ts +5 -5
  115. package/build/types/services/profiles/profiles.d.ts +5 -5
  116. package/build/types/services/profiles/types.d.ts +370 -369
  117. package/build/types/services/tasks/api/index.d.ts +5 -5
  118. package/build/types/services/tasks/api/types.d.ts +146 -146
  119. package/build/types/services/tasks/apiRequests/index.d.ts +5 -5
  120. package/build/types/services/tasks/apiRequests/logs/index.d.ts +5 -5
  121. package/build/types/services/tasks/apiRequests/logs/types.d.ts +25 -25
  122. package/build/types/services/tasks/apiRequests/types.d.ts +83 -83
  123. package/build/types/services/tasks/functions/index.d.ts +5 -5
  124. package/build/types/services/tasks/functions/types.d.ts +27 -27
  125. package/build/types/services/tasks/index.d.ts +15 -15
  126. package/build/types/services/tasks/logs/index.d.ts +5 -5
  127. package/build/types/services/tasks/logs/types.d.ts +28 -28
  128. package/build/types/services/tasks/schedules/index.d.ts +5 -5
  129. package/build/types/services/tasks/schedules/types.d.ts +88 -88
  130. package/build/types/services/tasks/tasks.d.ts +5 -5
  131. package/build/types/services/tasks/types.d.ts +107 -107
  132. package/build/types/services/templates/index.d.ts +3 -3
  133. package/build/types/services/templates/templates.d.ts +5 -5
  134. package/build/types/services/templates/types.d.ts +202 -202
  135. package/build/types/services/types.d.ts +77 -77
  136. package/build/types/services/users/activationRequests/index.d.ts +4 -4
  137. package/build/types/services/users/activationRequests/types.d.ts +70 -70
  138. package/build/types/services/users/forgotPasswordRequests/index.d.ts +4 -4
  139. package/build/types/services/users/forgotPasswordRequests/types.d.ts +70 -70
  140. package/build/types/services/users/globalRoles.d.ts +5 -5
  141. package/build/types/services/users/groupRoles.d.ts +5 -5
  142. package/build/types/services/users/health.d.ts +9 -9
  143. package/build/types/services/users/index.d.ts +16 -16
  144. package/build/types/services/users/settings/index.d.ts +4 -4
  145. package/build/types/services/users/settings/types.d.ts +47 -47
  146. package/build/types/services/users/types.d.ts +1202 -1055
  147. package/build/types/services/users/users.d.ts +5 -5
  148. package/build/types/sha1.d.ts +11 -11
  149. package/build/types/types.d.ts +102 -102
  150. package/build/types/utils.d.ts +4 -4
  151. package/build/types/version.d.ts +1 -1
  152. package/package.json +62 -62
@@ -1,11 +1,11 @@
1
- import { decodeType } from 'typescript-json-decoder';
2
- export declare type ExHCredentials = decodeType<typeof exhCredentialsDecoder>;
3
- declare const exhCredentialsDecoder: import("typescript-json-decoder").DecoderFunction<{
4
- API_HOST?: string;
5
- API_OAUTH_CONSUMER_KEY?: string;
6
- API_OAUTH_CONSUMER_SECRET?: string;
7
- API_OAUTH_TOKEN?: string;
8
- API_OAUTH_TOKEN_SECRET?: string;
9
- }>;
10
- export declare const parseStoredCredentials: (fileContent: string) => ExHCredentials;
11
- export {};
1
+ import { decodeType } from 'typescript-json-decoder';
2
+ export declare type ExHCredentials = decodeType<typeof exhCredentialsDecoder>;
3
+ declare const exhCredentialsDecoder: import("typescript-json-decoder").DecoderFunction<{
4
+ API_HOST?: string;
5
+ API_OAUTH_CONSUMER_KEY?: string;
6
+ API_OAUTH_CONSUMER_SECRET?: string;
7
+ API_OAUTH_TOKEN?: string;
8
+ API_OAUTH_TOKEN_SECRET?: string;
9
+ }>;
10
+ export declare const parseStoredCredentials: (fileContent: string) => ExHCredentials;
11
+ export {};
@@ -1,16 +1,16 @@
1
- import { RqlBuilderFactory, RQLString } from './types';
2
- export * from './types';
3
- /**
4
- * rqlParser accepts a regular string and returns a valid RQLString if it's valid.
5
- * @see https://developers.extrahorizon.io/guide/rql.html
6
- * @returns {RQLString}
7
- * @throws {URIError}
8
- * @throws {Error}
9
- */
10
- export declare function rqlParser(rql: string): RQLString;
11
- /**
12
- * RQL is a Resource Query Language designed for use in URIs with object data structures. RQL can be thought as basically a set of nestable named operators which each have a set of arguments written in a query string.
13
- * @see https://developers.extrahorizon.io/guide/rql.html
14
- * @returns
15
- */
16
- export declare const rqlBuilder: RqlBuilderFactory;
1
+ import { RqlBuilderFactory, RQLString } from './types';
2
+ export * from './types';
3
+ /**
4
+ * rqlParser accepts a regular string and returns a valid RQLString if it's valid.
5
+ * @see https://developers.extrahorizon.io/guide/rql.html
6
+ * @returns {RQLString}
7
+ * @throws {URIError}
8
+ * @throws {Error}
9
+ */
10
+ export declare function rqlParser(rql: string): RQLString;
11
+ /**
12
+ * RQL is a Resource Query Language designed for use in URIs with object data structures. RQL can be thought as basically a set of nestable named operators which each have a set of arguments written in a query string.
13
+ * @see https://developers.extrahorizon.io/guide/rql.html
14
+ * @returns
15
+ */
16
+ export declare const rqlBuilder: RqlBuilderFactory;
@@ -1 +1 @@
1
- export default function parse(query?: any, parameters?: any): any;
1
+ export default function parse(query?: any, parameters?: any): any;
@@ -1,168 +1,168 @@
1
- declare type NotAnRQLStringError = 'Please use rqlBuilder to construct valid RQL. See README for an example.';
2
- declare type RQLCheck<T> = T extends any ? NotAnRQLStringError : T;
3
- export declare type RQLString = RQLCheck<string>;
4
- declare type RQLBuilderString = RQLString | string;
5
- export declare type RQLBuilderOptions = {
6
- doubleEncodeValues?: boolean;
7
- rql?: RQLBuilderString;
8
- };
9
- export declare type RQLBuilderInput = RQLBuilderString | RQLBuilderOptions;
10
- export interface RqlBuilderFactory {
11
- /**
12
- * @deprecated this property is only meant to be used for backwards compatibility when upgrading to v8.0.0
13
- *
14
- * **Previous behaviour:**
15
- * - RQL values could be provided as double encoded to an rql builder
16
- * - `rqlBuilder.doubleEncodeValues` could be set to `true` to enable double encoding of values for all rql builders
17
- * - `rqlBuilder({ doubleEncodeValues: true })...` could enable automatic double encoding of values for an rql builder
18
- *
19
- *
20
- * **New behaviour:**
21
- * - RQL values are automatically double encoded when using an rql builder
22
- *
23
- * **How to upgrade to 8.0.0:**
24
- * - Update any RQL values to no longer be encoded manually or using methods such as `encodeURIComponent()`
25
- * - old value: 'Hypertension%2520%252D%2520STAGE%25201'
26
- * - new value: 'Hypertension - STAGE 1'
27
- *
28
- * **Alternatively**:
29
- * - `rqlBuilder.doubleEncodeValues` can be set to `false` to disable double encoding of values for all rql builders
30
- * - `rqlBuilder({ doubleEncodeValues: true })...` enables automatic double encoding of values for an rql builder
31
- *
32
- */
33
- doubleEncodeValues?: boolean;
34
- (input?: RQLBuilderInput): RQLBuilder;
35
- }
36
- export interface RQLBuilder {
37
- /**
38
- * Trims each object down to the set of properties defined in the arguments
39
- * - Only return field1 and field2 from the records: select(field1, field2)
40
- */
41
- select: (fields: string | string[]) => RQLBuilder;
42
- /**
43
- * - Only return 1 record: limit(1)
44
- * - Only return 10 records and skip the first 50: limit(10, 50)
45
- */
46
- limit: (limit: number, offset?: number) => RQLBuilder;
47
- /**
48
- * Sorts by the given property in order specified by the prefix
49
- * - \+ for ascending
50
- * - \- for descending
51
- */
52
- sort: (fields: string | string[]) => RQLBuilder;
53
- /**
54
- * Filters for objects where the specified property's value is not in the provided array
55
- */
56
- out: (field: string, values: string[]) => RQLBuilder;
57
- /**
58
- * Filters for objects where the specified property's value is in the provided array
59
- */
60
- in: (field: string, values: string[]) => RQLBuilder;
61
- /**
62
- * Filters for objects where the specified property's value is greater than or equal to the provided value
63
- */
64
- ge: (field: string, value: string) => RQLBuilder;
65
- /**
66
- * Filters for objects where the specified property's value is equal to the provided value
67
- */
68
- eq: (field: string, value: string) => RQLBuilder;
69
- /**
70
- * Filters for objects where the specified property's value is less than or equal to the provided value
71
- */
72
- le: (field: string, value: string) => RQLBuilder;
73
- /**
74
- * Filters for objects where the specified property's value is not equal to the provided value
75
- */
76
- ne: (field: string, value: string) => RQLBuilder;
77
- /**
78
- * Filters for objects where the specified string field contains the substring provided in the value.
79
- */
80
- like: (field: string, value: string) => RQLBuilder;
81
- /**
82
- * Filters for objects where the specified property's value is less than the provided value
83
- */
84
- lt: (field: string, value: string) => RQLBuilder;
85
- /**
86
- * Filters for objects where the specified property's value is greater than the provided value
87
- */
88
- gt: (field: string, value: string) => RQLBuilder;
89
- /**
90
- * Allows combining results of 2 or more queries with the logical AND operator.
91
- */
92
- and: (...conditions: RQLString[]) => RQLBuilder;
93
- /**
94
- * Allows combining results of 2 or more queries with the logical OR operator.
95
- */
96
- or: (...conditions: RQLString[]) => RQLBuilder;
97
- /**
98
- * @description `contains(field)` only returns records having this field as property
99
- * @example
100
- * await exh.data.documents.find(
101
- * schemaId,
102
- * { rql: rqlBuilder().contains('data.indicator').build()
103
- * });
104
- * @returns returns documents containing the `data.indicator` field
105
- *
106
- * @description Filters for objects where the specified property's value is an array and the array contains
107
- * any value that equals the provided value or satisfies the provided condition.
108
- * `contains(field, itemField > 30)` only returns records having a property `field` which have a prop `itemField` for which the condition is valid
109
- * `contains` with a single property is not strictly needed. This can be replaced with `gt(field.itemField,30)`.
110
- * @example
111
- * await exh.data.documents.find(schemaId, {
112
- * rql: rqlBuilder()
113
- * .contains(
114
- * "data",
115
- * rqlBuilder().gt("heartrate", "60").intermediate(),
116
- * rqlBuilder().lt("heartrate", "90").intermediate()
117
- * )
118
- * .build();
119
- * });
120
- * @return Only returns documents with a data object containing `heartrate > 60` and `heartrate > 90`
121
- */
122
- contains: (field: string, ...conditions: RQLString[]) => RQLBuilder;
123
- /**
124
- * @description `excludes(field)` only returns records not having this field as property
125
- * @example
126
- * await exh.data.documents.find(
127
- * schemaId,
128
- * { rql: rqlBuilder().excludes('data.indicator').build()
129
- * });
130
- * @returns returns documents not containing the `data.indicator` field
131
- *
132
- * @description Filters for objects where the specified property's value is an array and the array excludes
133
- * any value that equals the provided value or satisfies the provided condition.
134
- * `excludes(field, itemField > 30)` only returns records having a property `field` which have a prop `itemField` for which the condition is invalid
135
- * @example
136
- * await exh.data.documents.find(schemaId, {
137
- * rql: rqlBuilder()
138
- * .excludes("data", rqlBuilder().gt("heartrate", "60").intermediate())
139
- * .build(),
140
- * });
141
- * @return Only returns documents excluding documents where `data.heartrate > 60`
142
- */
143
- excludes: (field: string, ...conditions: RQLString[]) => RQLBuilder;
144
- /**
145
- * @description skipCount() Skips the record counting step of a request to increase performance.
146
- *
147
- * As a result, the page object in a response will not include the total field.
148
- *
149
- * @example
150
- * await exh.data.documents.find(schemaId, {
151
- * rql: rqlBuilder()
152
- * .skipCount()
153
- * .build(),
154
- * });
155
- */
156
- skipCount: () => RQLBuilder;
157
- /**
158
- * Returns a valid rqlString
159
- * @returns valid rqlString
160
- */
161
- build: () => RQLString;
162
- /**
163
- * Returns an intermediate rqlString you can combine in or/and statements
164
- * @returns valid rqlString
165
- */
166
- intermediate: () => RQLString;
167
- }
168
- export {};
1
+ declare type NotAnRQLStringError = 'Please use rqlBuilder to construct valid RQL. See README for an example.';
2
+ declare type RQLCheck<T> = T extends any ? NotAnRQLStringError : T;
3
+ export declare type RQLString = RQLCheck<string>;
4
+ declare type RQLBuilderString = RQLString | string;
5
+ export declare type RQLBuilderOptions = {
6
+ doubleEncodeValues?: boolean;
7
+ rql?: RQLBuilderString;
8
+ };
9
+ export declare type RQLBuilderInput = RQLBuilderString | RQLBuilderOptions;
10
+ export interface RqlBuilderFactory {
11
+ /**
12
+ * @deprecated this property is only meant to be used for backwards compatibility when upgrading to v8.0.0
13
+ *
14
+ * **Previous behaviour:**
15
+ * - RQL values could be provided as double encoded to an rql builder
16
+ * - `rqlBuilder.doubleEncodeValues` could be set to `true` to enable double encoding of values for all rql builders
17
+ * - `rqlBuilder({ doubleEncodeValues: true })...` could enable automatic double encoding of values for an rql builder
18
+ *
19
+ *
20
+ * **New behaviour:**
21
+ * - RQL values are automatically double encoded when using an rql builder
22
+ *
23
+ * **How to upgrade to 8.0.0:**
24
+ * - Update any RQL values to no longer be encoded manually or using methods such as `encodeURIComponent()`
25
+ * - old value: 'Hypertension%2520%252D%2520STAGE%25201'
26
+ * - new value: 'Hypertension - STAGE 1'
27
+ *
28
+ * **Alternatively**:
29
+ * - `rqlBuilder.doubleEncodeValues` can be set to `false` to disable double encoding of values for all rql builders
30
+ * - `rqlBuilder({ doubleEncodeValues: true })...` enables automatic double encoding of values for an rql builder
31
+ *
32
+ */
33
+ doubleEncodeValues?: boolean;
34
+ (input?: RQLBuilderInput): RQLBuilder;
35
+ }
36
+ export interface RQLBuilder {
37
+ /**
38
+ * Trims each object down to the set of properties defined in the arguments
39
+ * - Only return field1 and field2 from the records: select(field1, field2)
40
+ */
41
+ select: (fields: string | string[]) => RQLBuilder;
42
+ /**
43
+ * - Only return 1 record: limit(1)
44
+ * - Only return 10 records and skip the first 50: limit(10, 50)
45
+ */
46
+ limit: (limit: number, offset?: number) => RQLBuilder;
47
+ /**
48
+ * Sorts by the given property in order specified by the prefix
49
+ * - \+ for ascending
50
+ * - \- for descending
51
+ */
52
+ sort: (fields: string | string[]) => RQLBuilder;
53
+ /**
54
+ * Filters for objects where the specified property's value is not in the provided array
55
+ */
56
+ out: (field: string, values: string[]) => RQLBuilder;
57
+ /**
58
+ * Filters for objects where the specified property's value is in the provided array
59
+ */
60
+ in: (field: string, values: string[]) => RQLBuilder;
61
+ /**
62
+ * Filters for objects where the specified property's value is greater than or equal to the provided value
63
+ */
64
+ ge: (field: string, value: string) => RQLBuilder;
65
+ /**
66
+ * Filters for objects where the specified property's value is equal to the provided value
67
+ */
68
+ eq: (field: string, value: string) => RQLBuilder;
69
+ /**
70
+ * Filters for objects where the specified property's value is less than or equal to the provided value
71
+ */
72
+ le: (field: string, value: string) => RQLBuilder;
73
+ /**
74
+ * Filters for objects where the specified property's value is not equal to the provided value
75
+ */
76
+ ne: (field: string, value: string) => RQLBuilder;
77
+ /**
78
+ * Filters for objects where the specified string field contains the substring provided in the value.
79
+ */
80
+ like: (field: string, value: string) => RQLBuilder;
81
+ /**
82
+ * Filters for objects where the specified property's value is less than the provided value
83
+ */
84
+ lt: (field: string, value: string) => RQLBuilder;
85
+ /**
86
+ * Filters for objects where the specified property's value is greater than the provided value
87
+ */
88
+ gt: (field: string, value: string) => RQLBuilder;
89
+ /**
90
+ * Allows combining results of 2 or more queries with the logical AND operator.
91
+ */
92
+ and: (...conditions: RQLString[]) => RQLBuilder;
93
+ /**
94
+ * Allows combining results of 2 or more queries with the logical OR operator.
95
+ */
96
+ or: (...conditions: RQLString[]) => RQLBuilder;
97
+ /**
98
+ * @description `contains(field)` only returns records having this field as property
99
+ * @example
100
+ * await exh.data.documents.find(
101
+ * schemaId,
102
+ * { rql: rqlBuilder().contains('data.indicator').build()
103
+ * });
104
+ * @returns returns documents containing the `data.indicator` field
105
+ *
106
+ * @description Filters for objects where the specified property's value is an array and the array contains
107
+ * any value that equals the provided value or satisfies the provided condition.
108
+ * `contains(field, itemField > 30)` only returns records having a property `field` which have a prop `itemField` for which the condition is valid
109
+ * `contains` with a single property is not strictly needed. This can be replaced with `gt(field.itemField,30)`.
110
+ * @example
111
+ * await exh.data.documents.find(schemaId, {
112
+ * rql: rqlBuilder()
113
+ * .contains(
114
+ * "data",
115
+ * rqlBuilder().gt("heartrate", "60").intermediate(),
116
+ * rqlBuilder().lt("heartrate", "90").intermediate()
117
+ * )
118
+ * .build();
119
+ * });
120
+ * @return Only returns documents with a data object containing `heartrate > 60` and `heartrate > 90`
121
+ */
122
+ contains: (field: string, ...conditions: RQLString[]) => RQLBuilder;
123
+ /**
124
+ * @description `excludes(field)` only returns records not having this field as property
125
+ * @example
126
+ * await exh.data.documents.find(
127
+ * schemaId,
128
+ * { rql: rqlBuilder().excludes('data.indicator').build()
129
+ * });
130
+ * @returns returns documents not containing the `data.indicator` field
131
+ *
132
+ * @description Filters for objects where the specified property's value is an array and the array excludes
133
+ * any value that equals the provided value or satisfies the provided condition.
134
+ * `excludes(field, itemField > 30)` only returns records having a property `field` which have a prop `itemField` for which the condition is invalid
135
+ * @example
136
+ * await exh.data.documents.find(schemaId, {
137
+ * rql: rqlBuilder()
138
+ * .excludes("data", rqlBuilder().gt("heartrate", "60").intermediate())
139
+ * .build(),
140
+ * });
141
+ * @return Only returns documents excluding documents where `data.heartrate > 60`
142
+ */
143
+ excludes: (field: string, ...conditions: RQLString[]) => RQLBuilder;
144
+ /**
145
+ * @description skipCount() Skips the record counting step of a request to increase performance.
146
+ *
147
+ * As a result, the page object in a response will not include the total field.
148
+ *
149
+ * @example
150
+ * await exh.data.documents.find(schemaId, {
151
+ * rql: rqlBuilder()
152
+ * .skipCount()
153
+ * .build(),
154
+ * });
155
+ */
156
+ skipCount: () => RQLBuilder;
157
+ /**
158
+ * Returns a valid rqlString
159
+ * @returns valid rqlString
160
+ */
161
+ build: () => RQLString;
162
+ /**
163
+ * Returns an intermediate rqlString you can combine in or/and statements
164
+ * @returns valid rqlString
165
+ */
166
+ intermediate: () => RQLString;
167
+ }
168
+ export {};
@@ -1,5 +1,5 @@
1
- import type { HttpInstance } from '../../../types';
2
- import { HttpClient } from '../../http-client';
3
- import type { AuthApplicationsService } from '../types';
4
- declare const _default: (client: HttpClient, httpWithAuth: HttpInstance) => AuthApplicationsService;
5
- export default _default;
1
+ import type { HttpInstance } from '../../../types';
2
+ import { HttpClient } from '../../http-client';
3
+ import type { AuthApplicationsService } from '../types';
4
+ declare const _default: (client: HttpClient, httpWithAuth: HttpInstance) => AuthApplicationsService;
5
+ export default _default;