1 |
|
2 | import { Cluster } from './cluster';
|
3 | import { CppManagementAnalyticsCouchbaseRemoteLink, CppManagementAnalyticsS3ExternalLink, CppManagementAnalyticsAzureBlobExternalLink } from './binding';
|
4 | import { NodeCallback } from './utilities';
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 | export declare enum AnalyticsLinkType {
|
11 | |
12 |
|
13 |
|
14 | S3External = "s3",
|
15 | |
16 |
|
17 |
|
18 | AzureBlobExternal = "azureblob",
|
19 | |
20 |
|
21 |
|
22 | CouchbaseRemote = "couchbase"
|
23 | }
|
24 |
|
25 |
|
26 |
|
27 |
|
28 |
|
29 | export declare enum AnalyticsEncryptionLevel {
|
30 | |
31 |
|
32 |
|
33 | None = "none",
|
34 | |
35 |
|
36 |
|
37 | Half = "half",
|
38 | |
39 |
|
40 |
|
41 | Full = "full"
|
42 | }
|
43 |
|
44 |
|
45 |
|
46 |
|
47 |
|
48 | export declare class AnalyticsDataset {
|
49 | |
50 |
|
51 |
|
52 | name: string;
|
53 | |
54 |
|
55 |
|
56 | dataverseName: string;
|
57 | |
58 |
|
59 |
|
60 | linkName: string;
|
61 | |
62 |
|
63 |
|
64 | bucketName: string;
|
65 | |
66 |
|
67 |
|
68 | constructor(data: AnalyticsDataset);
|
69 | }
|
70 | /**
|
71 | * Contains a specific index configuration for the analytics service.
|
72 | *
|
73 | * @category Management
|
74 | */
|
75 | export declare class AnalyticsIndex {
|
76 | |
77 |
|
78 |
|
79 | name: string;
|
80 | |
81 |
|
82 |
|
83 | datasetName: string;
|
84 | |
85 |
|
86 |
|
87 | dataverseName: string;
|
88 | |
89 |
|
90 |
|
91 | isPrimary: boolean;
|
92 | |
93 |
|
94 |
|
95 | constructor(data: AnalyticsIndex);
|
96 | }
|
97 | /**
|
98 | * Specifies encryption options for an analytics remote link.
|
99 | */
|
100 | export interface ICouchbaseAnalyticsEncryptionSettings {
|
101 | |
102 |
|
103 |
|
104 | encryptionLevel: AnalyticsEncryptionLevel;
|
105 | |
106 |
|
107 |
|
108 |
|
109 | certificate?: Buffer;
|
110 | |
111 |
|
112 |
|
113 |
|
114 | clientCertificate?: Buffer;
|
115 | |
116 |
|
117 |
|
118 |
|
119 | clientKey?: Buffer;
|
120 | }
|
121 |
|
122 |
|
123 |
|
124 | export declare class CouchbaseAnalyticsEncryptionSettings implements ICouchbaseAnalyticsEncryptionSettings {
|
125 | |
126 |
|
127 |
|
128 | encryptionLevel: AnalyticsEncryptionLevel;
|
129 | |
130 |
|
131 |
|
132 |
|
133 | certificate?: Buffer;
|
134 | |
135 |
|
136 |
|
137 |
|
138 | clientCertificate?: Buffer;
|
139 | |
140 |
|
141 |
|
142 |
|
143 | clientKey?: Buffer;
|
144 | |
145 |
|
146 |
|
147 | constructor(data: CouchbaseAnalyticsEncryptionSettings);
|
148 | }
|
149 | /**
|
150 | * Provides a base class for specifying options for an analytics link.
|
151 | *
|
152 | * @category Management
|
153 | */
|
154 | export interface IAnalyticsLink {
|
155 | |
156 |
|
157 |
|
158 | linkType: AnalyticsLinkType;
|
159 | |
160 |
|
161 |
|
162 | dataverse: string;
|
163 | |
164 |
|
165 |
|
166 | name: string;
|
167 | }
|
168 |
|
169 |
|
170 |
|
171 | export declare abstract class AnalyticsLink implements IAnalyticsLink {
|
172 | |
173 |
|
174 |
|
175 | constructor();
|
176 | /**
|
177 | * Specifies what type of analytics link this represents.
|
178 | */
|
179 | linkType: AnalyticsLinkType;
|
180 | /**
|
181 | * The dataverse that this link belongs to.
|
182 | */
|
183 | dataverse: string;
|
184 | /**
|
185 | * The name of this link.
|
186 | */
|
187 | name: string;
|
188 | /**
|
189 | * Validates the link.
|
190 | */
|
191 | abstract validate(): void;
|
192 | /**
|
193 | * @internal
|
194 | */
|
195 | static _toHttpData(data: IAnalyticsLink): any;
|
196 | /**
|
197 | * @internal
|
198 | */
|
199 | static _fromHttpData(data: any): AnalyticsLink;
|
200 | }
|
201 | /**
|
202 | * Provides options for configuring an analytics remote couchbase cluster link.
|
203 | */
|
204 | export interface ICouchbaseRemoteAnalyticsLink extends IAnalyticsLink {
|
205 | |
206 |
|
207 |
|
208 | linkType: AnalyticsLinkType.CouchbaseRemote;
|
209 | |
210 |
|
211 |
|
212 | dataverse: string;
|
213 | |
214 |
|
215 |
|
216 | name: string;
|
217 | |
218 |
|
219 |
|
220 | hostname: string;
|
221 | |
222 |
|
223 |
|
224 | encryption?: ICouchbaseAnalyticsEncryptionSettings;
|
225 | |
226 |
|
227 |
|
228 |
|
229 |
|
230 | username?: string;
|
231 | |
232 |
|
233 |
|
234 |
|
235 |
|
236 | password?: string;
|
237 | }
|
238 |
|
239 |
|
240 |
|
241 | export declare class CouchbaseRemoteAnalyticsLink extends AnalyticsLink implements ICouchbaseRemoteAnalyticsLink {
|
242 | |
243 |
|
244 |
|
245 | linkType: AnalyticsLinkType.CouchbaseRemote;
|
246 | |
247 |
|
248 |
|
249 | dataverse: string;
|
250 | |
251 |
|
252 |
|
253 | name: string;
|
254 | |
255 |
|
256 |
|
257 | hostname: string;
|
258 | |
259 |
|
260 |
|
261 | encryption?: CouchbaseAnalyticsEncryptionSettings;
|
262 | |
263 |
|
264 |
|
265 |
|
266 |
|
267 | username?: string;
|
268 | |
269 |
|
270 |
|
271 |
|
272 |
|
273 | password?: string;
|
274 | |
275 |
|
276 |
|
277 | validate(): void;
|
278 | |
279 |
|
280 |
|
281 | constructor(data: ICouchbaseRemoteAnalyticsLink);
|
282 | /**
|
283 | * @internal
|
284 | */
|
285 | static _toCppData(data: CouchbaseRemoteAnalyticsLink): CppManagementAnalyticsCouchbaseRemoteLink;
|
286 | /**
|
287 | * @internal
|
288 | */
|
289 | static _fromCppData(data: CppManagementAnalyticsCouchbaseRemoteLink): CouchbaseRemoteAnalyticsLink;
|
290 | }
|
291 | /**
|
292 | * Provides options for configuring an analytics remote S3 link.
|
293 | */
|
294 | export interface IS3ExternalAnalyticsLink extends IAnalyticsLink {
|
295 | |
296 |
|
297 |
|
298 | linkType: AnalyticsLinkType.S3External;
|
299 | |
300 |
|
301 |
|
302 | dataverse: string;
|
303 | |
304 |
|
305 |
|
306 | name: string;
|
307 | |
308 |
|
309 |
|
310 | accessKeyId: string;
|
311 | |
312 |
|
313 |
|
314 | secretAccessKey?: string;
|
315 | |
316 |
|
317 |
|
318 |
|
319 | sessionToken?: string;
|
320 | |
321 |
|
322 |
|
323 | region: string;
|
324 | |
325 |
|
326 |
|
327 | serviceEndpoint?: string;
|
328 | }
|
329 |
|
330 |
|
331 |
|
332 | export declare class S3ExternalAnalyticsLink extends AnalyticsLink implements IS3ExternalAnalyticsLink {
|
333 | |
334 |
|
335 |
|
336 | linkType: AnalyticsLinkType.S3External;
|
337 | |
338 |
|
339 |
|
340 | dataverse: string;
|
341 | |
342 |
|
343 |
|
344 | name: string;
|
345 | |
346 |
|
347 |
|
348 | accessKeyId: string;
|
349 | |
350 |
|
351 |
|
352 | secretAccessKey?: string;
|
353 | |
354 |
|
355 |
|
356 |
|
357 | sessionToken?: string;
|
358 | |
359 |
|
360 |
|
361 | region: string;
|
362 | |
363 |
|
364 |
|
365 | serviceEndpoint?: string;
|
366 | |
367 |
|
368 |
|
369 | constructor(data: IS3ExternalAnalyticsLink);
|
370 | /**
|
371 | * Validates the S3ExternalAnalyticsLink.
|
372 | */
|
373 | validate(): void;
|
374 | /**
|
375 | * @internal
|
376 | */
|
377 | static _toCppData(data: S3ExternalAnalyticsLink): CppManagementAnalyticsS3ExternalLink;
|
378 | /**
|
379 | * @internal
|
380 | */
|
381 | static _fromCppData(data: CppManagementAnalyticsS3ExternalLink): S3ExternalAnalyticsLink;
|
382 | }
|
383 | /**
|
384 | * Provides options for configuring an analytics remote Azure link.
|
385 | */
|
386 | export interface IAzureExternalAnalyticsLink extends IAnalyticsLink {
|
387 | |
388 |
|
389 |
|
390 | linkType: AnalyticsLinkType.AzureBlobExternal;
|
391 | |
392 |
|
393 |
|
394 | dataverse: string;
|
395 | |
396 |
|
397 |
|
398 | name: string;
|
399 | |
400 |
|
401 |
|
402 | connectionString?: string;
|
403 | |
404 |
|
405 |
|
406 | accountName?: string;
|
407 | |
408 |
|
409 |
|
410 | accountKey?: string;
|
411 | |
412 |
|
413 |
|
414 | sharedAccessSignature?: string;
|
415 | |
416 |
|
417 |
|
418 | blobEndpoint?: string;
|
419 | |
420 |
|
421 |
|
422 | endpointSuffix?: string;
|
423 | }
|
424 |
|
425 |
|
426 |
|
427 | export declare class AzureExternalAnalyticsLink extends AnalyticsLink implements IAzureExternalAnalyticsLink {
|
428 | |
429 |
|
430 |
|
431 | linkType: AnalyticsLinkType.AzureBlobExternal;
|
432 | |
433 |
|
434 |
|
435 | dataverse: string;
|
436 | |
437 |
|
438 |
|
439 | name: string;
|
440 | |
441 |
|
442 |
|
443 | connectionString?: string;
|
444 | |
445 |
|
446 |
|
447 | accountName?: string;
|
448 | |
449 |
|
450 |
|
451 | accountKey?: string;
|
452 | |
453 |
|
454 |
|
455 | sharedAccessSignature?: string;
|
456 | |
457 |
|
458 |
|
459 | blobEndpoint?: string;
|
460 | |
461 |
|
462 |
|
463 | endpointSuffix?: string;
|
464 | |
465 |
|
466 |
|
467 | constructor(data: IAzureExternalAnalyticsLink);
|
468 | /**
|
469 | * Validates the AzureExternalAnalyticsLink.
|
470 | */
|
471 | validate(): void;
|
472 | /**
|
473 | * @internal
|
474 | */
|
475 | static _toCppData(data: AzureExternalAnalyticsLink): CppManagementAnalyticsAzureBlobExternalLink;
|
476 | /**
|
477 | * @internal
|
478 | */
|
479 | static _fromCppData(data: CppManagementAnalyticsAzureBlobExternalLink): AzureExternalAnalyticsLink;
|
480 | }
|
481 | /**
|
482 | * @category Management
|
483 | */
|
484 | export interface CreateAnalyticsDataverseOptions {
|
485 | |
486 |
|
487 |
|
488 |
|
489 | ignoreIfExists?: boolean;
|
490 | |
491 |
|
492 |
|
493 | timeout?: number;
|
494 | }
|
495 |
|
496 |
|
497 |
|
498 | export interface DropAnalyticsDataverseOptions {
|
499 | |
500 |
|
501 |
|
502 |
|
503 | ignoreIfNotExists?: boolean;
|
504 | |
505 |
|
506 |
|
507 | timeout?: number;
|
508 | }
|
509 |
|
510 |
|
511 |
|
512 | export interface CreateAnalyticsDatasetOptions {
|
513 | |
514 |
|
515 |
|
516 |
|
517 | ignoreIfExists?: boolean;
|
518 | |
519 |
|
520 |
|
521 | dataverseName?: string;
|
522 | |
523 |
|
524 |
|
525 | condition?: string;
|
526 | |
527 |
|
528 |
|
529 | timeout?: number;
|
530 | }
|
531 |
|
532 |
|
533 |
|
534 | export interface DropAnalyticsDatasetOptions {
|
535 | |
536 |
|
537 |
|
538 |
|
539 | ignoreIfNotExists?: boolean;
|
540 | |
541 |
|
542 |
|
543 | dataverseName?: string;
|
544 | |
545 |
|
546 |
|
547 | timeout?: number;
|
548 | }
|
549 |
|
550 |
|
551 |
|
552 | export interface GetAllAnalyticsDatasetsOptions {
|
553 | |
554 |
|
555 |
|
556 | timeout?: number;
|
557 | }
|
558 |
|
559 |
|
560 |
|
561 | export interface CreateAnalyticsIndexOptions {
|
562 | |
563 |
|
564 |
|
565 |
|
566 | ignoreIfExists?: boolean;
|
567 | |
568 |
|
569 |
|
570 | dataverseName?: string;
|
571 | |
572 |
|
573 |
|
574 | timeout?: number;
|
575 | }
|
576 |
|
577 |
|
578 |
|
579 | export interface DropAnalyticsIndexOptions {
|
580 | |
581 |
|
582 |
|
583 |
|
584 | ignoreIfNotExists?: boolean;
|
585 | |
586 |
|
587 |
|
588 | dataverseName?: string;
|
589 | |
590 |
|
591 |
|
592 | timeout?: number;
|
593 | }
|
594 |
|
595 |
|
596 |
|
597 | export interface GetAllAnalyticsIndexesOptions {
|
598 | |
599 |
|
600 |
|
601 | timeout?: number;
|
602 | }
|
603 |
|
604 |
|
605 |
|
606 | export interface ConnectAnalyticsLinkOptions {
|
607 | |
608 |
|
609 |
|
610 | force?: boolean;
|
611 | |
612 |
|
613 |
|
614 | dataverseName?: string;
|
615 | |
616 |
|
617 |
|
618 | linkName?: string;
|
619 | |
620 |
|
621 |
|
622 | timeout?: number;
|
623 | }
|
624 |
|
625 |
|
626 |
|
627 | export interface DisconnectAnalyticsLinkOptions {
|
628 | |
629 |
|
630 |
|
631 | dataverseName?: string;
|
632 | |
633 |
|
634 |
|
635 | linkName?: string;
|
636 | |
637 |
|
638 |
|
639 | timeout?: number;
|
640 | }
|
641 |
|
642 |
|
643 |
|
644 | export interface GetPendingAnalyticsMutationsOptions {
|
645 | |
646 |
|
647 |
|
648 | timeout?: number;
|
649 | }
|
650 |
|
651 |
|
652 |
|
653 | export interface CreateAnalyticsLinkOptions {
|
654 | |
655 |
|
656 |
|
657 | timeout?: number;
|
658 | }
|
659 |
|
660 |
|
661 |
|
662 | export interface ReplaceAnalyticsLinkOptions {
|
663 | |
664 |
|
665 |
|
666 | timeout?: number;
|
667 | }
|
668 |
|
669 |
|
670 |
|
671 | export interface DropAnalyticsLinkOptions {
|
672 | |
673 |
|
674 |
|
675 | timeout?: number;
|
676 | }
|
677 |
|
678 |
|
679 |
|
680 | export interface GetAllAnalyticsLinksOptions {
|
681 | |
682 |
|
683 |
|
684 | dataverse?: string;
|
685 | |
686 |
|
687 |
|
688 | name?: string;
|
689 | |
690 |
|
691 |
|
692 | linkType?: AnalyticsLinkType;
|
693 | |
694 |
|
695 |
|
696 | timeout?: number;
|
697 | }
|
698 |
|
699 |
|
700 |
|
701 |
|
702 |
|
703 |
|
704 | export declare class AnalyticsIndexManager {
|
705 | private _cluster;
|
706 | |
707 |
|
708 |
|
709 | constructor(cluster: Cluster);
|
710 | /**
|
711 | * Creates a new dataverse.
|
712 | *
|
713 | * @param dataverseName The name of the dataverse to create.
|
714 | * @param options Optional parameters for this operation.
|
715 | * @param callback A node-style callback to be invoked after execution.
|
716 | */
|
717 | createDataverse(dataverseName: string, options?: CreateAnalyticsDataverseOptions, callback?: NodeCallback<void>): Promise<void>;
|
718 | /**
|
719 | * Drops a previously created dataverse.
|
720 | *
|
721 | * @param dataverseName The name of the dataverse to drop.
|
722 | * @param options Optional parameters for this operation.
|
723 | * @param callback A node-style callback to be invoked after execution.
|
724 | */
|
725 | dropDataverse(dataverseName: string, options?: DropAnalyticsDataverseOptions, callback?: NodeCallback<void>): Promise<void>;
|
726 | /**
|
727 | * Creates a new dataset.
|
728 | *
|
729 | * @param bucketName The name of the bucket to create this dataset of.
|
730 | * @param datasetName The name of the new dataset.
|
731 | * @param options Optional parameters for this operation.
|
732 | * @param callback A node-style callback to be invoked after execution.
|
733 | */
|
734 | createDataset(bucketName: string, datasetName: string, options?: CreateAnalyticsDatasetOptions, callback?: NodeCallback<void>): Promise<void>;
|
735 | /**
|
736 | * Drops a previously created dataset.
|
737 | *
|
738 | * @param datasetName The name of the dataset to drop.
|
739 | * @param options Optional parameters for this operation.
|
740 | * @param callback A node-style callback to be invoked after execution.
|
741 | */
|
742 | dropDataset(datasetName: string, options?: DropAnalyticsDatasetOptions, callback?: NodeCallback<void>): Promise<void>;
|
743 | /**
|
744 | * Returns a list of all existing datasets.
|
745 | *
|
746 | * @param options Optional parameters for this operation.
|
747 | * @param callback A node-style callback to be invoked after execution.
|
748 | */
|
749 | getAllDatasets(options?: GetAllAnalyticsDatasetsOptions, callback?: NodeCallback<AnalyticsDataset[]>): Promise<AnalyticsDataset[]>;
|
750 | /**
|
751 | * Creates a new index.
|
752 | *
|
753 | * @param datasetName The name of the dataset to create this index on.
|
754 | * @param indexName The name of index to create.
|
755 | * @param fields A map of fields that the index should contain.
|
756 | * @param options Optional parameters for this operation.
|
757 | * @param callback A node-style callback to be invoked after execution.
|
758 | */
|
759 | createIndex(datasetName: string, indexName: string, fields: {
|
760 | [key: string]: string;
|
761 | }, options?: CreateAnalyticsIndexOptions, callback?: NodeCallback<void>): Promise<void>;
|
762 | /**
|
763 | * Drops a previously created index.
|
764 | *
|
765 | * @param datasetName The name of the dataset containing the index to drop.
|
766 | * @param indexName The name of the index to drop.
|
767 | * @param options Optional parameters for this operation.
|
768 | * @param callback A node-style callback to be invoked after execution.
|
769 | */
|
770 | dropIndex(datasetName: string, indexName: string, options?: DropAnalyticsIndexOptions, callback?: NodeCallback<void>): Promise<void>;
|
771 | /**
|
772 | * Returns a list of all existing indexes.
|
773 | *
|
774 | * @param options Optional parameters for this operation.
|
775 | * @param callback A node-style callback to be invoked after execution.
|
776 | */
|
777 | getAllIndexes(options?: GetAllAnalyticsIndexesOptions, callback?: NodeCallback<AnalyticsIndex[]>): Promise<AnalyticsIndex[]>;
|
778 | /**
|
779 | * Connects a not yet connected link.
|
780 | *
|
781 | * @param linkStr The name of the link to connect.
|
782 | * @param options Optional parameters for this operation.
|
783 | * @param callback A node-style callback to be invoked after execution.
|
784 | * @deprecated Use the other overload instead.
|
785 | */
|
786 | connectLink(linkStr: string, options?: ConnectAnalyticsLinkOptions, callback?: NodeCallback<void>): Promise<void>;
|
787 | /**
|
788 | * Connects a not yet connected link.
|
789 | *
|
790 | * @param options Optional parameters for this operation.
|
791 | * @param callback A node-style callback to be invoked after execution.
|
792 | */
|
793 | connectLink(options?: ConnectAnalyticsLinkOptions, callback?: NodeCallback<void>): Promise<void>;
|
794 | /**
|
795 | * @internal
|
796 | */
|
797 | _connectLinkDeprecated(linkStr: string, options?: ConnectAnalyticsLinkOptions, callback?: NodeCallback<void>): Promise<void>;
|
798 | /**
|
799 | * @internal
|
800 | */
|
801 | _connectLink(options?: ConnectAnalyticsLinkOptions, callback?: NodeCallback<void>): Promise<void>;
|
802 | /**
|
803 | * Disconnects a previously connected link.
|
804 | *
|
805 | * @param linkStr The name of the link to disconnect.
|
806 | * @param options Optional parameters for this operation.
|
807 | * @param callback A node-style callback to be invoked after execution.
|
808 | * @deprecated Use the other overload instead.
|
809 | */
|
810 | disconnectLink(linkStr: string, options?: DisconnectAnalyticsLinkOptions, callback?: NodeCallback<void>): Promise<void>;
|
811 | /**
|
812 | * Disconnects a previously connected link.
|
813 | *
|
814 | * @param options Optional parameters for this operation.
|
815 | * @param callback A node-style callback to be invoked after execution.
|
816 | */
|
817 | disconnectLink(options?: DisconnectAnalyticsLinkOptions, callback?: NodeCallback<void>): Promise<void>;
|
818 | /**
|
819 | * @internal
|
820 | */
|
821 | _disconnectLinkDeprecated(linkStr: string, options?: DisconnectAnalyticsLinkOptions, callback?: NodeCallback<void>): Promise<void>;
|
822 | /**
|
823 | * @internal
|
824 | */
|
825 | _disconnectLink(options?: DisconnectAnalyticsLinkOptions, callback?: NodeCallback<void>): Promise<void>;
|
826 | /**
|
827 | * Returns a list of all pending mutations.
|
828 | *
|
829 | * @param options Optional parameters for this operation.
|
830 | * @param callback A node-style callback to be invoked after execution.
|
831 | */
|
832 | getPendingMutations(options?: GetPendingAnalyticsMutationsOptions, callback?: NodeCallback<{
|
833 | [k: string]: {
|
834 | [k: string]: number;
|
835 | };
|
836 | }>): Promise<{
|
837 | [k: string]: {
|
838 | [k: string]: number;
|
839 | };
|
840 | }>;
|
841 | |
842 |
|
843 |
|
844 |
|
845 |
|
846 |
|
847 |
|
848 | createLink(link: IAnalyticsLink, options?: CreateAnalyticsLinkOptions, callback?: NodeCallback<void>): Promise<void>;
|
849 | |
850 |
|
851 |
|
852 |
|
853 |
|
854 |
|
855 |
|
856 | replaceLink(link: IAnalyticsLink, options?: ReplaceAnalyticsLinkOptions, callback?: NodeCallback<void>): Promise<void>;
|
857 | |
858 |
|
859 |
|
860 |
|
861 |
|
862 |
|
863 |
|
864 |
|
865 | dropLink(linkName: string, dataverseName: string, options?: DropAnalyticsLinkOptions, callback?: NodeCallback<void>): Promise<void>;
|
866 | |
867 |
|
868 |
|
869 |
|
870 |
|
871 |
|
872 | getAllLinks(options?: GetAllAnalyticsLinksOptions, callback?: NodeCallback<AnalyticsLink[]>): Promise<AnalyticsLink[]>;
|
873 | }
|