@sassoftware/vi-api 0.0.29

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 (140) hide show
  1. package/alert-reps/index.d.ts +677 -0
  2. package/alert-reps/package.json +5 -0
  3. package/component/bindings.d.ts +85 -0
  4. package/component/bindings.js +1 -0
  5. package/component/index.d.ts +49 -0
  6. package/component/index.js +16 -0
  7. package/component/package.json +9 -0
  8. package/component/public-api.d.ts +1 -0
  9. package/component/public-api.js +1 -0
  10. package/config/config-api.d.ts +92 -0
  11. package/config/config-api.js +6 -0
  12. package/config/package.json +9 -0
  13. package/config/public-api.d.ts +1 -0
  14. package/config/public-api.js +1 -0
  15. package/control/control-api.d.ts +450 -0
  16. package/control/control-api.js +1 -0
  17. package/control/data-types.d.ts +9 -0
  18. package/control/data-types.js +1 -0
  19. package/control/events.d.ts +75 -0
  20. package/control/events.js +5 -0
  21. package/control/file.d.ts +14 -0
  22. package/control/file.js +1 -0
  23. package/control/image.d.ts +14 -0
  24. package/control/image.js +1 -0
  25. package/control/package.json +9 -0
  26. package/control/page.d.ts +55 -0
  27. package/control/page.js +1 -0
  28. package/control/public-api.d.ts +8 -0
  29. package/control/public-api.js +8 -0
  30. package/control/restrictions.d.ts +33 -0
  31. package/control/restrictions.js +1 -0
  32. package/control/toolbar-property-api.d.ts +16 -0
  33. package/control/toolbar-property-api.js +1 -0
  34. package/current-user/currentUser-api.d.ts +65 -0
  35. package/current-user/currentUser-api.js +11 -0
  36. package/current-user/package.json +9 -0
  37. package/current-user/public-api.d.ts +1 -0
  38. package/current-user/public-api.js +1 -0
  39. package/event/event-api.d.ts +57 -0
  40. package/event/event-api.js +26 -0
  41. package/event/package.json +9 -0
  42. package/event/public-api.d.ts +1 -0
  43. package/event/public-api.js +1 -0
  44. package/file/file-api.d.ts +44 -0
  45. package/file/file-api.js +1 -0
  46. package/file/package.json +9 -0
  47. package/file/public-api.d.ts +1 -0
  48. package/file/public-api.js +1 -0
  49. package/http/index.d.ts +364 -0
  50. package/http/index.js +45 -0
  51. package/http/package.json +9 -0
  52. package/http/public-api.d.ts +1 -0
  53. package/http/public-api.js +1 -0
  54. package/index.d.ts +65 -0
  55. package/index.js +1 -0
  56. package/localization/localization-api.d.ts +26 -0
  57. package/localization/localization-api.js +1 -0
  58. package/localization/package.json +9 -0
  59. package/localization/public-api.d.ts +1 -0
  60. package/localization/public-api.js +1 -0
  61. package/metadata/admin/admin-metadata-api.d.ts +18 -0
  62. package/metadata/admin/admin-metadata-api.js +1 -0
  63. package/metadata/metadata-api.d.ts +237 -0
  64. package/metadata/metadata-api.js +1 -0
  65. package/metadata/package.json +9 -0
  66. package/metadata/public-api.d.ts +2 -0
  67. package/metadata/public-api.js +2 -0
  68. package/object/object-api.d.ts +507 -0
  69. package/object/object-api.js +13 -0
  70. package/object/package.json +9 -0
  71. package/object/public-api.d.ts +1 -0
  72. package/object/public-api.js +1 -0
  73. package/package.json +14 -0
  74. package/page-admin/package.json +9 -0
  75. package/page-admin/page-admin-api.d.ts +29 -0
  76. package/page-admin/page-admin-api.js +11 -0
  77. package/page-admin/public-api.d.ts +1 -0
  78. package/page-admin/public-api.js +1 -0
  79. package/page-model/package.json +9 -0
  80. package/page-model/page-model-api.d.ts +126 -0
  81. package/page-model/page-model-api.js +11 -0
  82. package/page-model/public-api.d.ts +1 -0
  83. package/page-model/public-api.js +1 -0
  84. package/page-state/package.json +9 -0
  85. package/page-state/page-state-api.d.ts +59 -0
  86. package/page-state/page-state-api.js +1 -0
  87. package/page-state/public-api.d.ts +1 -0
  88. package/page-state/public-api.js +1 -0
  89. package/property/package.json +9 -0
  90. package/property/property-api.d.ts +46 -0
  91. package/property/property-api.js +17 -0
  92. package/property/public-api.d.ts +1 -0
  93. package/property/public-api.js +1 -0
  94. package/public-api.d.ts +1 -0
  95. package/public-api.js +1 -0
  96. package/reference-data/package.json +9 -0
  97. package/reference-data/public-api.d.ts +1 -0
  98. package/reference-data/public-api.js +1 -0
  99. package/reference-data/refData.d.ts +72 -0
  100. package/reference-data/refData.js +1 -0
  101. package/resource/package.json +9 -0
  102. package/resource/public-api.d.ts +1 -0
  103. package/resource/public-api.js +1 -0
  104. package/resource/resource-api.d.ts +17 -0
  105. package/resource/resource-api.js +1 -0
  106. package/score-reps/index.d.ts +133 -0
  107. package/score-reps/package.json +5 -0
  108. package/search/client/client-search-api.d.ts +159 -0
  109. package/search/client/client-search-api.js +14 -0
  110. package/search/package.json +9 -0
  111. package/search/public-api.d.ts +2 -0
  112. package/search/public-api.js +2 -0
  113. package/search/search-api.d.ts +72 -0
  114. package/search/search-api.js +1 -0
  115. package/sheet/package.json +9 -0
  116. package/sheet/public-api.d.ts +1 -0
  117. package/sheet/public-api.js +1 -0
  118. package/sheet/sheet-api.d.ts +184 -0
  119. package/sheet/sheet-api.js +1 -0
  120. package/svi-datahub/index.d.ts +4514 -0
  121. package/svi-datahub/package.json +5 -0
  122. package/svi-sand/index.d.ts +1057 -0
  123. package/svi-sand/package.json +5 -0
  124. package/tab/package.json +9 -0
  125. package/tab/public-api.d.ts +1 -0
  126. package/tab/public-api.js +1 -0
  127. package/tab/tab-api.d.ts +33 -0
  128. package/tab/tab-api.js +1 -0
  129. package/theme/package.json +9 -0
  130. package/theme/public-api.d.ts +1 -0
  131. package/theme/public-api.js +1 -0
  132. package/theme/theme-api.d.ts +35 -0
  133. package/theme/theme-api.js +17 -0
  134. package/time-slider/index.d.ts +35 -0
  135. package/time-slider/index.js +17 -0
  136. package/traversal/package.json +9 -0
  137. package/traversal/public-api.d.ts +1 -0
  138. package/traversal/public-api.js +1 -0
  139. package/traversal/traversal-api.d.ts +34 -0
  140. package/traversal/traversal-api.js +1 -0
@@ -0,0 +1,364 @@
1
+ export interface HttpResponse<R> {
2
+ body: R | null;
3
+ headers: Record<string, string | string[]>;
4
+ status: number;
5
+ statusText: string;
6
+ url: string | null;
7
+ }
8
+ /**
9
+ * This API provides functionality for making REST requests.
10
+ * Accessed from the window at window.sas.vi.http.
11
+ */
12
+ export interface HttpApi {
13
+ /**
14
+ * @method
15
+ * @description Constructs a GET request that interprets the body as a text stream and returns the full HttpResponse.
16
+ * @param url {string} Endpoint URL.
17
+ * @param [options] {HttpApi~StringRequestOptions} HTTP options to send with the request.
18
+ * @return A Promise of the HttpResponse for the request.
19
+ * The response body is a string.
20
+ */
21
+ get(url: string, options?: {
22
+ headers?: Record<string, string | string[]>;
23
+ params?: Record<string, string | string[]>;
24
+ responseType: "text";
25
+ }): Promise<HttpResponse<string>>;
26
+ /**
27
+ * @method
28
+ * @description Constructs a GET request that interprets the body as a JSON object and returns the full HttpResponse.
29
+ * @template R
30
+ * @param url {string} Endpoint URL.
31
+ * @param options {HttpApi~JsonRequestOptions} HTTP options to send with the request.
32
+ * @return A Promise of the HttpResponse for the request.
33
+ * The response body is an object of type {@link R}.
34
+ */
35
+ get<R>(url: string, options?: {
36
+ headers?: Record<string, string | string[]>;
37
+ params?: Record<string, string | string[]>;
38
+ responseType: "json";
39
+ }): Promise<HttpResponse<R>>;
40
+ /**
41
+ * @method
42
+ * @description Constructs a GET request that interprets the body as a Blob and returns the full HttpResponse.
43
+ * @template R
44
+ * @param url {string} Endpoint URL.
45
+ * @param options {HttpApi~BlobRequestOptions} HTTP options to send with the request.
46
+ * @return A Promise of the HttpResponse for the request.
47
+ * The response body is a Blob.
48
+ */
49
+ get(url: string, options?: {
50
+ headers?: Record<string, string | string[]>;
51
+ params?: Record<string, string | string[]>;
52
+ responseType: "blob";
53
+ }): Promise<HttpResponse<Blob>>;
54
+ /**
55
+ * @method
56
+ * @description Constructs a HEAD request that returns a null body and the full HttpResponse.
57
+ * @param url {string} Endpoint URL.
58
+ * @param options {HttpApi~HeadOptions} HTTP options to send with the request.
59
+ * @return A Promise of the HttpResponse for the request with the response body of null.
60
+ */
61
+ head(url: string, options?: {
62
+ headers?: Record<string, string | string[]>;
63
+ params?: Record<string, string | string[]>;
64
+ }): Promise<HttpResponse<null>>;
65
+ /**
66
+ * @method
67
+ * @description Constructs a POST request that interprets the body as a text stream and returns the full HttpResponse.
68
+ * @param url {string} Endpoint URL.
69
+ * @param body {(any|null)} Content to replace with current content.
70
+ * @param options {HttpApi~StringRequestOptions} HTTP options
71
+ * @return A Promise of the HttpResponse for the request.
72
+ * The response body is a string.
73
+ */
74
+ post(url: string, body: any | null, options?: {
75
+ headers?: Record<string, string | string[]>;
76
+ params?: Record<string, string | string[]>;
77
+ responseType: "text";
78
+ }): Promise<HttpResponse<string>>;
79
+ /**
80
+ * @method
81
+ * @template R
82
+ * @description Constructs a POST request that interprets the body as a JSON object and returns the full HttpResponse.
83
+ * @param url {string} Endpoint URL.
84
+ * @param body {(any|null)} Content to replace with current content.
85
+ * @param options {HttpApi~JsonRequestOptions} HTTP options
86
+ * @return A Promise of the HttpResponse for the request.
87
+ * The response body is an object of type {@link R}.
88
+ */
89
+ post<R>(url: string, body: any | null, options?: {
90
+ headers?: Record<string, string | string[]>;
91
+ params?: Record<string, string | string[]>;
92
+ responseType: "json";
93
+ }): Promise<HttpResponse<R>>;
94
+ /**
95
+ * @method
96
+ * @description Constructs a POST request that interprets the body as a Blob and returns the full HttpResponse.
97
+ * @param url {string} Endpoint URL.
98
+ * @param body {(any|null)} Content to replace with current content.
99
+ * @param options {HttpApi~BlobRequestOptions} HTTP options
100
+ * @return A Promise of the HttpResponse for the request.
101
+ * The response body is a Blob.
102
+ */
103
+ post(url: string, body: any | null, options?: {
104
+ headers?: Record<string, string | string[]>;
105
+ params?: Record<string, string | string[]>;
106
+ responseType: "blob";
107
+ }): Promise<HttpResponse<Blob>>;
108
+ /**
109
+ * @method
110
+ * @description Constructs a PUT request that interprets the body as a text stream and returns the full HttpResponse.
111
+ * @param url {string} Endpoint URL.
112
+ * @param body {(any|null)} Content to replace with current content.
113
+ * @param options {HttpApi~StringRequestOptions} HTTP options.
114
+ * @return A Promise of the HttpResponse for the request.
115
+ * The response body is a string.
116
+ */
117
+ put(url: string, body: any | null, options?: {
118
+ headers?: Record<string, string | string[]>;
119
+ params?: Record<string, string | string[]>;
120
+ responseType: "text";
121
+ }): Promise<HttpResponse<string>>;
122
+ /**
123
+ * @method
124
+ * @template R
125
+ * @description Constructs a PUT request that interprets the body as a JSON object and returns the full HttpResponse.
126
+ * @param url {string} Endpoint URL.
127
+ * @param body {(any|null)} Content to replace with current content.
128
+ * @param options {HttpApi~JsonRequestOptions} HTTP options.
129
+ * @return A Promise of the HttpResponse for the request.
130
+ * The response body is an object of type {@link R}.
131
+ */
132
+ put<R>(url: string, body: any | null, options?: {
133
+ headers?: Record<string, string | string[]>;
134
+ params?: Record<string, string | string[]>;
135
+ responseType: "json";
136
+ }): Promise<HttpResponse<R>>;
137
+ /**
138
+ * @method
139
+ * @description Constructs a PUT request that interprets the body as a Blob and returns the full HttpResponse.
140
+ * @param url {string} Endpoint URL.
141
+ * @param body {(any|null)} Content to replace with current content.
142
+ * @param options {HttpApi~BlobRequestOptions} HTTP options.
143
+ * @return A Promise of the HttpResponse for the request.
144
+ * The response body is a Blob.
145
+ */
146
+ put(url: string, body: any | null, options?: {
147
+ headers?: Record<string, string | string[]>;
148
+ params?: Record<string, string | string[]>;
149
+ responseType: "blob";
150
+ }): Promise<HttpResponse<Blob>>;
151
+ /**
152
+ * @method
153
+ * @description Constructs a PATCH request that interprets the body as a text stream and returns the full HttpResponse.
154
+ * @param url {string} Endpoint URL.
155
+ * @param body {(any|null)} Content to replace with current content.
156
+ * @param options {HttpApi~StringRequestOptions} HTTP options.
157
+ * @return A Promise of the HttpResponse for the request.
158
+ * The response body is a string.
159
+ */
160
+ patch(url: string, body: any | null, options?: {
161
+ headers?: Record<string, string | string[]>;
162
+ params?: Record<string, string | string[]>;
163
+ responseType: "text";
164
+ }): Promise<HttpResponse<string>>;
165
+ /**
166
+ * @method
167
+ * @template R
168
+ * @description Constructs a PATCH request that interprets the body as a JSON object and returns the full HttpResponse.
169
+ * @param url {string} Endpoint URL.
170
+ * @param body {(any|null)} Content to replace with current content.
171
+ * @param options {HttpApi~JsonRequestOptions} HTTP options.
172
+ * @return A Promise of the HttpResponse for the request.
173
+ * The response body is an object of type {@link R}.
174
+ */
175
+ patch<R>(url: string, body: any | null, options?: {
176
+ headers?: Record<string, string | string[]>;
177
+ params?: Record<string, string | string[]>;
178
+ responseType: "json";
179
+ }): Promise<HttpResponse<R>>;
180
+ /**
181
+ * @method
182
+ * @description Constructs a PATCH request that interprets the body as a Blob and returns the full HttpResponse.
183
+ * @param url {string} Endpoint URL.
184
+ * @param body {(any|null)} Content to replace with current content.
185
+ * @param options {HttpApi~BlobRequestOptions} HTTP options.
186
+ * @return A Promise of the HttpResponse for the request.
187
+ * The response body is a Blob.
188
+ */
189
+ patch(url: string, body: any | null, options?: {
190
+ headers?: Record<string, string | string[]>;
191
+ params?: Record<string, string | string[]>;
192
+ responseType: "blob";
193
+ }): Promise<HttpResponse<Blob>>;
194
+ /**
195
+ * @method
196
+ * @description Constructs a DELETE request that interprets the body as a text stream and returns the full HttpResponse.
197
+ * @param url {string} Endpoint URL.
198
+ * @param options {HttpApi~StringRequestOptions} HTTP options.
199
+ * @return A Promise of the HttpResponse for the request.
200
+ * The response body is a string.
201
+ */
202
+ delete(url: string, options?: {
203
+ headers?: Record<string, string | string[]>;
204
+ params?: Record<string, string | string[]>;
205
+ responseType: "text";
206
+ }): Promise<HttpResponse<string>>;
207
+ /**
208
+ * @method
209
+ * @template R
210
+ * @description Constructs a DELETE request that interprets the body as a JSON object and returns the full HttpResponse.
211
+ * @param url {string} Endpoint URL.
212
+ * @param options {HttpApi~JsonRequestOptions} HTTP options.
213
+ * @return A Promise of the HttpResponse for the request.
214
+ * The response body is an object of type {@link R}.
215
+ */
216
+ delete<R>(url: string, options?: {
217
+ headers?: Record<string, string | string[]>;
218
+ params?: Record<string, string | string[]>;
219
+ responseType: "json";
220
+ }): Promise<HttpResponse<R>>;
221
+ /**
222
+ * @method
223
+ * @description Constructs a DELETE request that interprets the body as a Blob and returns the full HttpResponse.
224
+ * @param url {string} Endpoint URL.
225
+ * @param options {HttpApi~BlobRequestOptions} HTTP options.
226
+ * @return A Promise of the HttpResponse for the request.
227
+ * The response body is a Blob.
228
+ */
229
+ delete(url: string, options?: {
230
+ headers?: Record<string, string | string[]>;
231
+ params?: Record<string, string | string[]>;
232
+ responseType: "blob";
233
+ }): Promise<HttpResponse<Blob>>;
234
+ /**
235
+ * @method
236
+ * @description Constructs an OPTIONS request that interprets the body as a text stream and returns the full HttpResponse.
237
+ * @param url {string} Endpoint URL.
238
+ * @param options {HttpApi~StringRequestOptions} HTTP options.
239
+ * @return A Promise of the HttpResponse for the request.
240
+ * The response body is a string.
241
+ */
242
+ options(url: string, options?: {
243
+ headers?: Record<string, string | string[]>;
244
+ params?: Record<string, string | string[]>;
245
+ responseType: "text";
246
+ }): Promise<HttpResponse<string>>;
247
+ /**
248
+ * @method
249
+ * @template R
250
+ * @description Constructs an OPTIONS request that interprets the body as a JSON object and returns the full HttpResponse.
251
+ * @param url {string} Endpoint URL.
252
+ * @param options {HttpApi~JsonRequestOptions} HTTP options.
253
+ * @return A Promise of the HttpResponse for the request.
254
+ * The response body is an object of type {@link R}.
255
+ */
256
+ options<R>(url: string, options?: {
257
+ headers?: Record<string, string | string[]>;
258
+ params?: Record<string, string | string[]>;
259
+ responseType: "json";
260
+ }): Promise<HttpResponse<R>>;
261
+ /**
262
+ * @method
263
+ * @description Constructs an OPTIONS request that interprets the body as a Blob and returns the full HttpResponse.
264
+ * @param url {string} Endpoint URL.
265
+ * @param options {HttpApi~BlobRequestOptions} HTTP options.
266
+ * @return A Promise of the HttpResponse for the request.
267
+ * The response body is a Blob.
268
+ */
269
+ options(url: string, options?: {
270
+ headers?: Record<string, string | string[]>;
271
+ params?: Record<string, string | string[]>;
272
+ responseType: "blob";
273
+ }): Promise<HttpResponse<Blob>>;
274
+ /**
275
+ * @method
276
+ * @description Constructs a request that interprets the body as a text stream and returns the full HttpResponse.
277
+ * @param method {string}
278
+ * @param url {string} Endpoint URL.
279
+ * @param options {HttpApi~StringGenericRequestOptions} HTTP options.
280
+ * @return A Promise of the HttpResponse for the request.
281
+ * The response body is a string.
282
+ */
283
+ request(method: string, url: string, options?: {
284
+ body?: any | null;
285
+ headers?: Record<string, string | string[]>;
286
+ params?: Record<string, string | string[]>;
287
+ responseType: "text";
288
+ }): Promise<HttpResponse<string>>;
289
+ /**
290
+ * @method
291
+ * @template R
292
+ * @description Constructs a request that interprets the body as a JSON object and returns the full HttpResponse.
293
+ * @param method {string}
294
+ * @param url {string} Endpoint URL.
295
+ * @param options {HttpApi~JsonGenericRequestOptions} HTTP options.
296
+ * @return A Promise of the HttpResponse for the request.
297
+ * The response body is an object of type {@link R}.
298
+ */
299
+ request<R>(method: string, url: string, options?: {
300
+ body?: any | null;
301
+ headers?: Record<string, string | string[]>;
302
+ params?: Record<string, string | string[]>;
303
+ responseType: "json";
304
+ }): Promise<HttpResponse<R>>;
305
+ /**
306
+ * @method
307
+ * @description Constructs a request that interprets the body as a Blob and returns the full HttpResponse.
308
+ * @param method {string}
309
+ * @param url {string} Endpoint URL.
310
+ * @param options {HttpApi~BlobGenericRequestOptions} HTTP options.
311
+ * @return A Promise of the HttpResponse for the request.
312
+ * The response body is a Blob.
313
+ */
314
+ request(method: string, url: string, options?: {
315
+ body?: any | null;
316
+ headers?: Record<string, string | string[]>;
317
+ params?: Record<string, string | string[]>;
318
+ responseType: "blob";
319
+ }): Promise<HttpResponse<Blob>>;
320
+ }
321
+ /**
322
+ * @typedef {Object} HttpApi~StringRequestOptions
323
+ * @property [headers] {Record<string, string | string[]>}
324
+ * @property [params] {Record<string, string | string[]>}
325
+ * @property responseType {"text"}
326
+ */
327
+ /**
328
+ * @typedef {Object} HttpApi~JsonRequestOptions
329
+ * @property [headers] {Record<string, string | string[]>}
330
+ * @property [params] {Record<string, string | string[]>}
331
+ * @property responseType {"json"}
332
+ */
333
+ /**
334
+ * @typedef {Object} HttpApi~BlobRequestOptions
335
+ * @property [headers] {Record<string, string | string[]>}
336
+ * @property [params] {Record<string, string | string[]>}
337
+ * @property responseType {"blob"}
338
+ */
339
+ /**
340
+ * @typedef {Object} HttpApi~HeadOptions
341
+ * @property [headers] {Record<string, string | string[]>}
342
+ * @property [params] {Record<string, string | string[]>}
343
+ */
344
+ /**
345
+ * @typedef {Object} HttpApi~StringGenericRequestOptions
346
+ * @property [body] {(any|null)}
347
+ * @property [headers] {Record<string, string | string[]>}
348
+ * @property [params] {Record<string, string | string[]>}
349
+ * @property [responseType] {"text"}
350
+ */
351
+ /**
352
+ * @typedef {Object} HttpApi~JsonGenericRequestOptions
353
+ * @property [body] {(any|null)}
354
+ * @property [headers] {Record<string, string | string[]>}
355
+ * @property [params] {Record<string, string | string[]>}
356
+ * @property [responseType] {"json"}
357
+ */
358
+ /**
359
+ * @typedef {Object} HttpApi~BlobGenericRequestOptions
360
+ * @property [body] {(any|null)}
361
+ * @property [headers] {Record<string, string | string[]>}
362
+ * @property [params] {Record<string, string | string[]>}
363
+ * @property [responseType] {"blob"}
364
+ */
package/http/index.js ADDED
@@ -0,0 +1,45 @@
1
+ export {};
2
+ /**
3
+ * @typedef {Object} HttpApi~StringRequestOptions
4
+ * @property [headers] {Record<string, string | string[]>}
5
+ * @property [params] {Record<string, string | string[]>}
6
+ * @property responseType {"text"}
7
+ */
8
+ /**
9
+ * @typedef {Object} HttpApi~JsonRequestOptions
10
+ * @property [headers] {Record<string, string | string[]>}
11
+ * @property [params] {Record<string, string | string[]>}
12
+ * @property responseType {"json"}
13
+ */
14
+ /**
15
+ * @typedef {Object} HttpApi~BlobRequestOptions
16
+ * @property [headers] {Record<string, string | string[]>}
17
+ * @property [params] {Record<string, string | string[]>}
18
+ * @property responseType {"blob"}
19
+ */
20
+ /**
21
+ * @typedef {Object} HttpApi~HeadOptions
22
+ * @property [headers] {Record<string, string | string[]>}
23
+ * @property [params] {Record<string, string | string[]>}
24
+ */
25
+ /**
26
+ * @typedef {Object} HttpApi~StringGenericRequestOptions
27
+ * @property [body] {(any|null)}
28
+ * @property [headers] {Record<string, string | string[]>}
29
+ * @property [params] {Record<string, string | string[]>}
30
+ * @property [responseType] {"text"}
31
+ */
32
+ /**
33
+ * @typedef {Object} HttpApi~JsonGenericRequestOptions
34
+ * @property [body] {(any|null)}
35
+ * @property [headers] {Record<string, string | string[]>}
36
+ * @property [params] {Record<string, string | string[]>}
37
+ * @property [responseType] {"json"}
38
+ */
39
+ /**
40
+ * @typedef {Object} HttpApi~BlobGenericRequestOptions
41
+ * @property [body] {(any|null)}
42
+ * @property [headers] {Record<string, string | string[]>}
43
+ * @property [params] {Record<string, string | string[]>}
44
+ * @property [responseType] {"blob"}
45
+ */
@@ -0,0 +1,9 @@
1
+ {
2
+ "name": "@sassoftware/vi-api/http",
3
+ "files": [
4
+ "**/*.d.ts",
5
+ "**/*.js"
6
+ ],
7
+ "main": "public-api.js",
8
+ "types": "public-api.d.ts"
9
+ }
@@ -0,0 +1 @@
1
+ export * from "./index";
@@ -0,0 +1 @@
1
+ export * from "./index";
package/index.d.ts ADDED
@@ -0,0 +1,65 @@
1
+ import { ComponentApi } from "./component";
2
+ import { ConfigApi } from "./config/config-api";
3
+ import { CurrentUserApi } from "./current-user/currentUser-api";
4
+ import { EventApi } from "./event/event-api";
5
+ import { FileApi } from "./file/file-api";
6
+ import { HttpApi } from "./http";
7
+ import { LocalizationApi } from "./localization/localization-api";
8
+ import { AdminMetadataApi } from "./metadata/admin/admin-metadata-api";
9
+ import { MetadataApi } from "./metadata/metadata-api";
10
+ import { ObjectApi } from "./object/object-api";
11
+ import { PageAdminApi } from "./page-admin/page-admin-api";
12
+ import { PageModelApi } from "./page-model/page-model-api";
13
+ import { PageStateApi } from "./page-state/page-state-api";
14
+ import { PropertyApi } from "./property/property-api";
15
+ import { RefDataApi } from "./reference-data/refData";
16
+ import { ResourceApi } from "./resource/resource-api";
17
+ import { ClientSearchApi } from "./search/client/client-search-api";
18
+ import { SearchApi } from "./search/search-api";
19
+ import { SheetApi } from "./sheet/sheet-api";
20
+ import { TabApi } from "./tab/tab-api";
21
+ import { ThemeApi } from "./theme/theme-api";
22
+ import { TraversalApi } from "./traversal/traversal-api";
23
+ /**
24
+ * Common API Functions
25
+ */
26
+ export interface SviCommonApi {
27
+ component: ComponentApi;
28
+ currentUser: CurrentUserApi;
29
+ event: EventApi;
30
+ file: FileApi;
31
+ http: HttpApi;
32
+ localization: LocalizationApi;
33
+ metadata: MetadataApi;
34
+ pageAdmin: PageAdminApi;
35
+ pageModel: PageModelApi;
36
+ pageState: PageStateApi;
37
+ property: PropertyApi;
38
+ refData: RefDataApi;
39
+ resource: ResourceApi;
40
+ search: SearchApi;
41
+ theme: ThemeApi;
42
+ traversal: TraversalApi;
43
+ config: ConfigApi;
44
+ }
45
+ /**
46
+ * The Client API.
47
+ */
48
+ export interface SviClientApi extends SviCommonApi {
49
+ object: ObjectApi;
50
+ search: ClientSearchApi;
51
+ sheet: SheetApi;
52
+ tab: TabApi;
53
+ }
54
+ /**
55
+ * The Admin API
56
+ */
57
+ export interface SviAdminApi extends SviCommonApi {
58
+ metadata: AdminMetadataApi;
59
+ }
60
+ export declare type SviApi = SviClientApi | SviAdminApi;
61
+ export declare type SviWindow = typeof window & {
62
+ sas: {
63
+ vi: SviApi;
64
+ };
65
+ };
package/index.js ADDED
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,26 @@
1
+ /**
2
+ * This API is used for the localization methods.
3
+ * Accessed from the window at window.sas.vi.localization.
4
+ */
5
+ export interface LocalizationApi {
6
+ /**
7
+ * @method
8
+ * @description Returns the MomentJS format string based on locale.
9
+ * @param [showTime=true] {boolean} Checks whether or not to include time (in 12 hour format).
10
+ * @returns The localized date time format as a string.
11
+ */
12
+ getLocalizedDateTimeFormat(showTime?: boolean): string;
13
+ /**
14
+ * @method
15
+ * @description Gets the application locale in BCP 47 format.
16
+ * @returns The current application locale.
17
+ */
18
+ getLocale(): string;
19
+ /**
20
+ * @method
21
+ * @description Gets the application display direction.
22
+ * This is either "ltr" for left-to-right display locales, or "rtl" for right-to-left locales.
23
+ * @returns The current application display direction.
24
+ */
25
+ getDirection(): "ltr" | "rtl";
26
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,9 @@
1
+ {
2
+ "name": "@sassoftware/vi-api/localization",
3
+ "files": [
4
+ "**/*.d.ts",
5
+ "**/*.js"
6
+ ],
7
+ "main": "public-api.js",
8
+ "types": "public-api.d.ts"
9
+ }
@@ -0,0 +1 @@
1
+ export * from "./localization-api";
@@ -0,0 +1 @@
1
+ export * from "./localization-api";
@@ -0,0 +1,18 @@
1
+ import { MetadataApi } from "../metadata-api";
2
+ export interface FieldTypeLabels {
3
+ [type: string]: string;
4
+ }
5
+ /**
6
+ * {@link MetadataApi} extension provides the functionality related to retrieval of metadata.
7
+ * Additional methods are available only in the SAS Visual Investigator Admin Application.
8
+ * Accessed from the window at window.sas.vi.metadata.
9
+ * @extends MetadataApi
10
+ */
11
+ export interface AdminMetadataApi extends MetadataApi {
12
+ /**
13
+ * @method
14
+ * @description Gets the field data type labels.
15
+ * @returns Object containing the field data type labels.
16
+ */
17
+ getFieldDataTypeLabels(): FieldTypeLabels;
18
+ }
@@ -0,0 +1 @@
1
+ export {};