@datadog/openfeature-node-server 2.6.0 → 2.8.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.
- package/README.md +220 -1
- package/cjs/configuration/client-fingerprint.d.ts +3 -0
- package/cjs/configuration/client-fingerprint.d.ts.map +1 -0
- package/cjs/configuration/client-fingerprint.js +30 -0
- package/cjs/configuration/client-fingerprint.js.map +1 -0
- package/cjs/configuration/configuration-fetch.d.ts +21 -0
- package/cjs/configuration/configuration-fetch.d.ts.map +1 -0
- package/cjs/configuration/configuration-fetch.js +125 -0
- package/cjs/configuration/configuration-fetch.js.map +1 -0
- package/cjs/configuration/evaluation.d.ts +1 -1
- package/cjs/configuration/evaluation.d.ts.map +1 -1
- package/cjs/configuration/evaluation.js +2 -2
- package/cjs/configuration/evaluation.js.map +1 -1
- package/cjs/configuration/fetch-precomputed-configuration.d.ts +28 -0
- package/cjs/configuration/fetch-precomputed-configuration.d.ts.map +1 -0
- package/cjs/configuration/fetch-precomputed-configuration.js +192 -0
- package/cjs/configuration/fetch-precomputed-configuration.js.map +1 -0
- package/cjs/configuration/fetch-rules-configuration.d.ts +3 -9
- package/cjs/configuration/fetch-rules-configuration.d.ts.map +1 -1
- package/cjs/configuration/fetch-rules-configuration.js +65 -126
- package/cjs/configuration/fetch-rules-configuration.js.map +1 -1
- package/cjs/configuration/flag-selection.d.ts +17 -0
- package/cjs/configuration/flag-selection.d.ts.map +1 -0
- package/cjs/configuration/flag-selection.js +29 -0
- package/cjs/configuration/flag-selection.js.map +1 -0
- package/cjs/configuration/precompute-configuration.d.ts +10 -0
- package/cjs/configuration/precompute-configuration.d.ts.map +1 -0
- package/cjs/configuration/precompute-configuration.js +38 -0
- package/cjs/configuration/precompute-configuration.js.map +1 -0
- package/cjs/experimentation-opt-out.d.ts +6 -0
- package/cjs/experimentation-opt-out.d.ts.map +1 -0
- package/cjs/experimentation-opt-out.js +17 -0
- package/cjs/experimentation-opt-out.js.map +1 -0
- package/cjs/index.d.ts +6 -0
- package/cjs/index.d.ts.map +1 -1
- package/cjs/index.js +12 -1
- package/cjs/index.js.map +1 -1
- package/cjs/provider.d.ts +59 -2
- package/cjs/provider.d.ts.map +1 -1
- package/cjs/provider.js +334 -34
- package/cjs/provider.js.map +1 -1
- package/cjs/rules-based.d.ts +4 -2
- package/cjs/rules-based.d.ts.map +1 -1
- package/cjs/rules-based.js +6 -1
- package/cjs/rules-based.js.map +1 -1
- package/cjs/sdk-diagnostics.d.ts +65 -0
- package/cjs/sdk-diagnostics.d.ts.map +1 -0
- package/cjs/sdk-diagnostics.js +123 -0
- package/cjs/sdk-diagnostics.js.map +1 -0
- package/esm/configuration/client-fingerprint.d.ts +3 -0
- package/esm/configuration/client-fingerprint.d.ts.map +1 -0
- package/esm/configuration/client-fingerprint.js +27 -0
- package/esm/configuration/client-fingerprint.js.map +1 -0
- package/esm/configuration/configuration-fetch.d.ts +21 -0
- package/esm/configuration/configuration-fetch.d.ts.map +1 -0
- package/esm/configuration/configuration-fetch.js +117 -0
- package/esm/configuration/configuration-fetch.js.map +1 -0
- package/esm/configuration/evaluation.d.ts +1 -1
- package/esm/configuration/evaluation.d.ts.map +1 -1
- package/esm/configuration/evaluation.js +1 -1
- package/esm/configuration/evaluation.js.map +1 -1
- package/esm/configuration/fetch-precomputed-configuration.d.ts +28 -0
- package/esm/configuration/fetch-precomputed-configuration.d.ts.map +1 -0
- package/esm/configuration/fetch-precomputed-configuration.js +189 -0
- package/esm/configuration/fetch-precomputed-configuration.js.map +1 -0
- package/esm/configuration/fetch-rules-configuration.d.ts +3 -9
- package/esm/configuration/fetch-rules-configuration.d.ts.map +1 -1
- package/esm/configuration/fetch-rules-configuration.js +56 -117
- package/esm/configuration/fetch-rules-configuration.js.map +1 -1
- package/esm/configuration/flag-selection.d.ts +17 -0
- package/esm/configuration/flag-selection.d.ts.map +1 -0
- package/esm/configuration/flag-selection.js +25 -0
- package/esm/configuration/flag-selection.js.map +1 -0
- package/esm/configuration/precompute-configuration.d.ts +10 -0
- package/esm/configuration/precompute-configuration.d.ts.map +1 -0
- package/esm/configuration/precompute-configuration.js +35 -0
- package/esm/configuration/precompute-configuration.js.map +1 -0
- package/esm/experimentation-opt-out.d.ts +6 -0
- package/esm/experimentation-opt-out.d.ts.map +1 -0
- package/esm/experimentation-opt-out.js +13 -0
- package/esm/experimentation-opt-out.js.map +1 -0
- package/esm/index.d.ts +6 -0
- package/esm/index.d.ts.map +1 -1
- package/esm/index.js +5 -1
- package/esm/index.js.map +1 -1
- package/esm/provider.d.ts +59 -2
- package/esm/provider.d.ts.map +1 -1
- package/esm/provider.js +333 -34
- package/esm/provider.js.map +1 -1
- package/esm/rules-based.d.ts +4 -2
- package/esm/rules-based.d.ts.map +1 -1
- package/esm/rules-based.js +3 -1
- package/esm/rules-based.js.map +1 -1
- package/esm/sdk-diagnostics.d.ts +65 -0
- package/esm/sdk-diagnostics.d.ts.map +1 -0
- package/esm/sdk-diagnostics.js +119 -0
- package/esm/sdk-diagnostics.js.map +1 -0
- package/index.d.ts +1172 -9
- package/package.json +2 -2
- package/rules-based.d.ts +248 -8
package/index.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { Channel } from 'node:diagnostics_channel';
|
|
2
2
|
|
|
3
|
+
/** Opaque SDK identity and capabilities. Forward unchanged; this is not user or device identity. */
|
|
4
|
+
export type ClientFingerprint = string;
|
|
3
5
|
type Metadata = Record<string, string>;
|
|
4
6
|
type Paradigm = "server" | "client";
|
|
5
7
|
type PrimitiveValue = null | boolean | string | number;
|
|
@@ -419,6 +421,854 @@ interface BaseHook<T extends FlagValue = FlagValue, TData = Record<string, unkno
|
|
|
419
421
|
*/
|
|
420
422
|
finally?(hookContext: Readonly<HookContext<T, TData>>, evaluationDetails: EvaluationDetails<T>, hookHints?: HookHints): HooksReturn;
|
|
421
423
|
}
|
|
424
|
+
type TimeStamp = number & {
|
|
425
|
+
t: "Epoch time";
|
|
426
|
+
};
|
|
427
|
+
declare const SCHEME = "flag-key-sha256-v1";
|
|
428
|
+
declare const DEPENDENCY_KEY_ENCRYPTION_SCHEME = "dependency-key-hkdf-sha256-aes-256-gcm-v1";
|
|
429
|
+
type FlagKeyObfuscation = {
|
|
430
|
+
scheme: typeof SCHEME;
|
|
431
|
+
salt: string;
|
|
432
|
+
dependencyKeyEncryption?: {
|
|
433
|
+
scheme: typeof DEPENDENCY_KEY_ENCRYPTION_SCHEME;
|
|
434
|
+
};
|
|
435
|
+
};
|
|
436
|
+
declare enum WireType {
|
|
437
|
+
/**
|
|
438
|
+
* Used for int32, int64, uint32, uint64, sint32, sint64, bool, enum
|
|
439
|
+
*/
|
|
440
|
+
Varint = 0,
|
|
441
|
+
/**
|
|
442
|
+
* Used for fixed64, sfixed64, double.
|
|
443
|
+
* Always 8 bytes with little-endian byte order.
|
|
444
|
+
*/
|
|
445
|
+
Bit64 = 1,
|
|
446
|
+
/**
|
|
447
|
+
* Used for string, bytes, embedded messages, packed repeated fields
|
|
448
|
+
*
|
|
449
|
+
* Only repeated numeric types (types which use the varint, 32-bit,
|
|
450
|
+
* or 64-bit wire types) can be packed. In proto3, such fields are
|
|
451
|
+
* packed by default.
|
|
452
|
+
*/
|
|
453
|
+
LengthDelimited = 2,
|
|
454
|
+
/**
|
|
455
|
+
* Start of a tag-delimited aggregate, such as a proto2 group, or a message
|
|
456
|
+
* in editions with message_encoding = DELIMITED.
|
|
457
|
+
*/
|
|
458
|
+
StartGroup = 3,
|
|
459
|
+
/**
|
|
460
|
+
* End of a tag-delimited aggregate.
|
|
461
|
+
*/
|
|
462
|
+
EndGroup = 4,
|
|
463
|
+
/**
|
|
464
|
+
* Used for fixed32, sfixed32, float.
|
|
465
|
+
* Always 4 bytes with little-endian byte order.
|
|
466
|
+
*/
|
|
467
|
+
Bit32 = 5
|
|
468
|
+
}
|
|
469
|
+
type Message<TypeName extends string = string> = {
|
|
470
|
+
/**
|
|
471
|
+
* The fully qualified Protobuf type-name of the message.
|
|
472
|
+
*/
|
|
473
|
+
readonly $typeName: TypeName;
|
|
474
|
+
/**
|
|
475
|
+
* Unknown fields and extensions stored on the message.
|
|
476
|
+
*/
|
|
477
|
+
$unknown?: UnknownField[] | undefined;
|
|
478
|
+
};
|
|
479
|
+
type UnknownField = {
|
|
480
|
+
readonly no: number;
|
|
481
|
+
readonly wireType: WireType;
|
|
482
|
+
readonly data: Uint8Array;
|
|
483
|
+
};
|
|
484
|
+
type Timestamp = Message<"google.protobuf.Timestamp"> & {
|
|
485
|
+
/**
|
|
486
|
+
* Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must
|
|
487
|
+
* be between -62135596800 and 253402300799 inclusive (which corresponds to
|
|
488
|
+
* 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z).
|
|
489
|
+
*
|
|
490
|
+
* @generated from field: int64 seconds = 1;
|
|
491
|
+
*/
|
|
492
|
+
seconds: bigint;
|
|
493
|
+
/**
|
|
494
|
+
* Non-negative fractions of a second at nanosecond resolution. This field is
|
|
495
|
+
* the nanosecond portion of the duration, not an alternative to seconds.
|
|
496
|
+
* Negative second values with fractions must still have non-negative nanos
|
|
497
|
+
* values that count forward in time. Must be between 0 and 999,999,999
|
|
498
|
+
* inclusive.
|
|
499
|
+
*
|
|
500
|
+
* @generated from field: int32 nanos = 2;
|
|
501
|
+
*/
|
|
502
|
+
nanos: number;
|
|
503
|
+
};
|
|
504
|
+
type Empty = Message<"google.protobuf.Empty"> & {};
|
|
505
|
+
type FlagsConfiguration = Message<"datadog.ffe.flagging.ufc.v1.FlagsConfiguration"> & {
|
|
506
|
+
/**
|
|
507
|
+
* @generated from field: google.protobuf.Timestamp created_at = 1;
|
|
508
|
+
*/
|
|
509
|
+
createdAt?: Timestamp | undefined;
|
|
510
|
+
/**
|
|
511
|
+
* @generated from field: string environment_name = 2;
|
|
512
|
+
*/
|
|
513
|
+
environmentName: string;
|
|
514
|
+
/**
|
|
515
|
+
* @generated from field: map<string, datadog.ffe.flagging.ufc.v1.Flag> flags = 3;
|
|
516
|
+
*/
|
|
517
|
+
flags: {
|
|
518
|
+
[key: string]: Flag;
|
|
519
|
+
};
|
|
520
|
+
/**
|
|
521
|
+
* Interned data referenced by zero-based indexes in conditions. An index must
|
|
522
|
+
* refer to an element in its corresponding list.
|
|
523
|
+
*
|
|
524
|
+
* @generated from field: repeated datadog.ffe.flagging.ufc.v1.AttributeReference attributes = 4;
|
|
525
|
+
*/
|
|
526
|
+
attributes: AttributeReference[];
|
|
527
|
+
/**
|
|
528
|
+
* @generated from field: repeated string strings = 5;
|
|
529
|
+
*/
|
|
530
|
+
strings: string[];
|
|
531
|
+
/**
|
|
532
|
+
* @generated from field: repeated string regexes = 6;
|
|
533
|
+
*/
|
|
534
|
+
regexes: string[];
|
|
535
|
+
/**
|
|
536
|
+
* @generated from field: repeated datadog.ffe.flagging.ufc.v1.Version versions = 7;
|
|
537
|
+
*/
|
|
538
|
+
versions: Version[];
|
|
539
|
+
/**
|
|
540
|
+
* Interned JSON variation values, each a serialized JSON document. Indexed
|
|
541
|
+
* by Variation.json_string_index.
|
|
542
|
+
*
|
|
543
|
+
* JSON values are stored as strings because for some SDKs, our
|
|
544
|
+
* users want to override the JSON parser or get the variant as a
|
|
545
|
+
* string they can parse on their own.
|
|
546
|
+
*
|
|
547
|
+
* @generated from field: repeated string json_strings = 8;
|
|
548
|
+
*/
|
|
549
|
+
jsonStrings: string[];
|
|
550
|
+
/**
|
|
551
|
+
* @generated from field: repeated datadog.ffe.flagging.ufc.v1.Condition conditions = 9;
|
|
552
|
+
*/
|
|
553
|
+
conditions: Condition[];
|
|
554
|
+
/**
|
|
555
|
+
* Opt-in flag for emitting full flag-evaluation data from SDKs to
|
|
556
|
+
* Datadog. May contain PII; defaults to false for privacy.
|
|
557
|
+
*
|
|
558
|
+
* @generated from field: bool observe_full_evaluation_data = 10;
|
|
559
|
+
*/
|
|
560
|
+
observeFullEvaluationData: boolean;
|
|
561
|
+
/**
|
|
562
|
+
* Optional evaluator behavior overrides. Evaluators use their hard-coded
|
|
563
|
+
* defaults when this message or one of its fields is absent.
|
|
564
|
+
*
|
|
565
|
+
* @generated from field: datadog.ffe.flagging.ufc.v1.EvaluatorParams evaluator_params = 11;
|
|
566
|
+
*/
|
|
567
|
+
evaluatorParams?: EvaluatorParams | undefined;
|
|
568
|
+
};
|
|
569
|
+
type EvaluatorParams = Message<"datadog.ffe.flagging.ufc.v1.EvaluatorParams"> & {
|
|
570
|
+
/**
|
|
571
|
+
* Maximum dependency-edge depth, counted from a root flag at depth zero.
|
|
572
|
+
* The maximum is inclusive, and zero rejects every dependency edge. Values
|
|
573
|
+
* must not exceed 255.
|
|
574
|
+
*
|
|
575
|
+
* @generated from field: optional uint64 max_dependency_depth = 1;
|
|
576
|
+
*/
|
|
577
|
+
maxDependencyDepth?: bigint | undefined;
|
|
578
|
+
};
|
|
579
|
+
type Version = Message<"datadog.ffe.flagging.ufc.v1.Version"> & {
|
|
580
|
+
/**
|
|
581
|
+
* Main version components (usually "major.minor.patch" but can have more/less
|
|
582
|
+
* parts). Missing components should be treated as "0" for comparison
|
|
583
|
+
* purposes.
|
|
584
|
+
*
|
|
585
|
+
* @generated from field: repeated string components = 1;
|
|
586
|
+
*/
|
|
587
|
+
components: string[];
|
|
588
|
+
/**
|
|
589
|
+
* @generated from field: repeated string prerelease = 2;
|
|
590
|
+
*/
|
|
591
|
+
prerelease: string[];
|
|
592
|
+
};
|
|
593
|
+
type Flag = Message<"datadog.ffe.flagging.ufc.v1.Flag"> & {
|
|
594
|
+
/**
|
|
595
|
+
* The minimum feature level an SDK must support to evaluate this flag.
|
|
596
|
+
* SDKs that don't support this level must not evaluate the flag and should
|
|
597
|
+
* report an informative flag-scoped error rather than treat it as absent.
|
|
598
|
+
*
|
|
599
|
+
* @generated from field: uint32 minimum_feature_level = 1;
|
|
600
|
+
*/
|
|
601
|
+
minimumFeatureLevel: number;
|
|
602
|
+
/**
|
|
603
|
+
* @generated from field: datadog.ffe.flagging.ufc.v1.VariationType variation_type = 2;
|
|
604
|
+
*/
|
|
605
|
+
variationType: VariationType;
|
|
606
|
+
/**
|
|
607
|
+
* Split.variation_index indexes this array.
|
|
608
|
+
*
|
|
609
|
+
* @generated from field: repeated datadog.ffe.flagging.ufc.v1.Variation variations = 3;
|
|
610
|
+
*/
|
|
611
|
+
variations: Variation[];
|
|
612
|
+
/**
|
|
613
|
+
* @generated from field: repeated datadog.ffe.flagging.ufc.v1.Allocation allocations = 4;
|
|
614
|
+
*/
|
|
615
|
+
allocations: Allocation[];
|
|
616
|
+
};
|
|
617
|
+
type Variation = Message<"datadog.ffe.flagging.ufc.v1.Variation"> & {
|
|
618
|
+
/**
|
|
619
|
+
* Variation key. Index into FlagsConfiguration.strings
|
|
620
|
+
*
|
|
621
|
+
* @generated from field: uint32 key_string_index = 1;
|
|
622
|
+
*/
|
|
623
|
+
keyStringIndex: number;
|
|
624
|
+
/**
|
|
625
|
+
* The populated field must agree with Flag.variation_type.
|
|
626
|
+
*
|
|
627
|
+
* @generated from oneof datadog.ffe.flagging.ufc.v1.Variation.value
|
|
628
|
+
*/
|
|
629
|
+
value: {
|
|
630
|
+
/**
|
|
631
|
+
* Index into FlagsConfiguration.strings
|
|
632
|
+
*
|
|
633
|
+
* @generated from field: uint32 string_value_index = 2;
|
|
634
|
+
*/
|
|
635
|
+
value: number;
|
|
636
|
+
case: "stringValueIndex";
|
|
637
|
+
} | {
|
|
638
|
+
/**
|
|
639
|
+
* @generated from field: int64 integer_value = 3;
|
|
640
|
+
*/
|
|
641
|
+
value: bigint;
|
|
642
|
+
case: "integerValue";
|
|
643
|
+
} | {
|
|
644
|
+
/**
|
|
645
|
+
* @generated from field: double numeric_value = 4;
|
|
646
|
+
*/
|
|
647
|
+
value: number;
|
|
648
|
+
case: "numericValue";
|
|
649
|
+
} | {
|
|
650
|
+
/**
|
|
651
|
+
* @generated from field: bool boolean_value = 5;
|
|
652
|
+
*/
|
|
653
|
+
value: boolean;
|
|
654
|
+
case: "booleanValue";
|
|
655
|
+
} | {
|
|
656
|
+
/**
|
|
657
|
+
* JSON variations may be any valid JSON value, including scalar values.
|
|
658
|
+
* Index into FlagsConfiguration.json_strings.
|
|
659
|
+
*
|
|
660
|
+
* @generated from field: uint32 json_string_index = 6;
|
|
661
|
+
*/
|
|
662
|
+
value: number;
|
|
663
|
+
case: "jsonStringIndex";
|
|
664
|
+
} | {
|
|
665
|
+
case: undefined;
|
|
666
|
+
value?: undefined;
|
|
667
|
+
};
|
|
668
|
+
};
|
|
669
|
+
type Allocation = Message<"datadog.ffe.flagging.ufc.v1.Allocation"> & {
|
|
670
|
+
/**
|
|
671
|
+
* @generated from field: string key = 1;
|
|
672
|
+
*/
|
|
673
|
+
key: string;
|
|
674
|
+
/**
|
|
675
|
+
* Zero-based index into FlagsConfiguration.conditions. Unset means
|
|
676
|
+
* this allocation matches every subject.
|
|
677
|
+
*
|
|
678
|
+
* @generated from field: optional uint32 targeting_condition_index = 2;
|
|
679
|
+
*/
|
|
680
|
+
targetingConditionIndex?: number | undefined;
|
|
681
|
+
/**
|
|
682
|
+
* @generated from field: repeated datadog.ffe.flagging.ufc.v1.PartitionKey partition_key = 3;
|
|
683
|
+
*/
|
|
684
|
+
partitionKey: PartitionKey[];
|
|
685
|
+
/**
|
|
686
|
+
* @generated from field: repeated datadog.ffe.flagging.ufc.v1.Split splits = 4;
|
|
687
|
+
*/
|
|
688
|
+
splits: Split[];
|
|
689
|
+
/**
|
|
690
|
+
* Whether an evaluation resolved by this allocation should emit an
|
|
691
|
+
* exposure event (e.g. for experiments).
|
|
692
|
+
*
|
|
693
|
+
* @generated from field: bool log_exposure_event = 5;
|
|
694
|
+
*/
|
|
695
|
+
logExposureEvent: boolean;
|
|
696
|
+
/**
|
|
697
|
+
* First randomization activation, independent of later allocation edits.
|
|
698
|
+
*
|
|
699
|
+
* @generated from field: google.protobuf.Timestamp randomization_activated_at = 6;
|
|
700
|
+
*/
|
|
701
|
+
randomizationActivatedAt?: Timestamp | undefined;
|
|
702
|
+
};
|
|
703
|
+
type AttributeReference = Message<"datadog.ffe.flagging.ufc.v1.AttributeReference"> & {
|
|
704
|
+
/**
|
|
705
|
+
* @generated from oneof datadog.ffe.flagging.ufc.v1.AttributeReference.kind
|
|
706
|
+
*/
|
|
707
|
+
kind: {
|
|
708
|
+
/**
|
|
709
|
+
* @generated from field: google.protobuf.Empty targeting_key = 1;
|
|
710
|
+
*/
|
|
711
|
+
value: Empty;
|
|
712
|
+
case: "targetingKey";
|
|
713
|
+
} | {
|
|
714
|
+
/**
|
|
715
|
+
* @generated from field: datadog.ffe.flagging.ufc.v1.AttributePath attribute_path = 2;
|
|
716
|
+
*/
|
|
717
|
+
value: AttributePath;
|
|
718
|
+
case: "attributePath";
|
|
719
|
+
} | {
|
|
720
|
+
case: undefined;
|
|
721
|
+
value?: undefined;
|
|
722
|
+
};
|
|
723
|
+
};
|
|
724
|
+
type AttributePath = Message<"datadog.ffe.flagging.ufc.v1.AttributePath"> & {
|
|
725
|
+
/**
|
|
726
|
+
* Contains at least one segment and starts with a string.
|
|
727
|
+
*
|
|
728
|
+
* @generated from field: repeated datadog.ffe.flagging.ufc.v1.AttributePathSegment segments = 1;
|
|
729
|
+
*/
|
|
730
|
+
segments: AttributePathSegment[];
|
|
731
|
+
};
|
|
732
|
+
type AttributePathSegment = Message<"datadog.ffe.flagging.ufc.v1.AttributePathSegment"> & {
|
|
733
|
+
/**
|
|
734
|
+
* @generated from oneof datadog.ffe.flagging.ufc.v1.AttributePathSegment.kind
|
|
735
|
+
*/
|
|
736
|
+
kind: {
|
|
737
|
+
/**
|
|
738
|
+
* Index into FlagsConfiguration.strings.
|
|
739
|
+
*
|
|
740
|
+
* @generated from field: uint32 object_key_string_index = 1;
|
|
741
|
+
*/
|
|
742
|
+
value: number;
|
|
743
|
+
case: "objectKeyStringIndex";
|
|
744
|
+
} | {
|
|
745
|
+
/**
|
|
746
|
+
* @generated from field: uint32 array_index = 2;
|
|
747
|
+
*/
|
|
748
|
+
value: number;
|
|
749
|
+
case: "arrayIndex";
|
|
750
|
+
} | {
|
|
751
|
+
case: undefined;
|
|
752
|
+
value?: undefined;
|
|
753
|
+
};
|
|
754
|
+
};
|
|
755
|
+
type Condition = Message<"datadog.ffe.flagging.ufc.v1.Condition"> & {
|
|
756
|
+
/**
|
|
757
|
+
* @generated from oneof datadog.ffe.flagging.ufc.v1.Condition.kind
|
|
758
|
+
*/
|
|
759
|
+
kind: {
|
|
760
|
+
/**
|
|
761
|
+
* Logical AND. True when every referenced condition is
|
|
762
|
+
* true. Empty ALL is true.
|
|
763
|
+
*
|
|
764
|
+
* @generated from field: datadog.ffe.flagging.ufc.v1.ConditionOperands all = 1;
|
|
765
|
+
*/
|
|
766
|
+
value: ConditionOperands;
|
|
767
|
+
case: "all";
|
|
768
|
+
} | {
|
|
769
|
+
/**
|
|
770
|
+
* Logical OR. True when any referenced condition is true. Empty
|
|
771
|
+
* ANY is false.
|
|
772
|
+
*
|
|
773
|
+
* @generated from field: datadog.ffe.flagging.ufc.v1.ConditionOperands any = 2;
|
|
774
|
+
*/
|
|
775
|
+
value: ConditionOperands;
|
|
776
|
+
case: "any";
|
|
777
|
+
} | {
|
|
778
|
+
/**
|
|
779
|
+
* @generated from field: datadog.ffe.flagging.ufc.v1.NumericCondition numeric = 3;
|
|
780
|
+
*/
|
|
781
|
+
value: NumericCondition;
|
|
782
|
+
case: "numeric";
|
|
783
|
+
} | {
|
|
784
|
+
/**
|
|
785
|
+
* @generated from field: datadog.ffe.flagging.ufc.v1.RegexCondition regex = 4;
|
|
786
|
+
*/
|
|
787
|
+
value: RegexCondition;
|
|
788
|
+
case: "regex";
|
|
789
|
+
} | {
|
|
790
|
+
/**
|
|
791
|
+
* @generated from field: datadog.ffe.flagging.ufc.v1.StringMembershipCondition string_membership = 5;
|
|
792
|
+
*/
|
|
793
|
+
value: StringMembershipCondition;
|
|
794
|
+
case: "stringMembership";
|
|
795
|
+
} | {
|
|
796
|
+
/**
|
|
797
|
+
* @generated from field: datadog.ffe.flagging.ufc.v1.Sha256MembershipCondition sha256_membership = 6;
|
|
798
|
+
*/
|
|
799
|
+
value: Sha256MembershipCondition;
|
|
800
|
+
case: "sha256Membership";
|
|
801
|
+
} | {
|
|
802
|
+
/**
|
|
803
|
+
* @generated from field: datadog.ffe.flagging.ufc.v1.AttributePresenceCondition attribute_presence = 7;
|
|
804
|
+
*/
|
|
805
|
+
value: AttributePresenceCondition;
|
|
806
|
+
case: "attributePresence";
|
|
807
|
+
} | {
|
|
808
|
+
/**
|
|
809
|
+
* @generated from field: datadog.ffe.flagging.ufc.v1.VersionCondition version = 8;
|
|
810
|
+
*/
|
|
811
|
+
value: VersionCondition;
|
|
812
|
+
case: "version";
|
|
813
|
+
} | {
|
|
814
|
+
/**
|
|
815
|
+
* @generated from field: datadog.ffe.flagging.ufc.v1.StringComparisonCondition string_comparison = 9;
|
|
816
|
+
*/
|
|
817
|
+
value: StringComparisonCondition;
|
|
818
|
+
case: "stringComparison";
|
|
819
|
+
} | {
|
|
820
|
+
/**
|
|
821
|
+
* @generated from field: datadog.ffe.flagging.ufc.v1.Sha256StringComparisonCondition sha256_string_comparison = 10;
|
|
822
|
+
*/
|
|
823
|
+
value: Sha256StringComparisonCondition;
|
|
824
|
+
case: "sha256StringComparison";
|
|
825
|
+
} | {
|
|
826
|
+
/**
|
|
827
|
+
* @generated from field: datadog.ffe.flagging.ufc.v1.FlagEvaluationStringMembershipCondition flag_evaluation_string_membership = 11;
|
|
828
|
+
*/
|
|
829
|
+
value: FlagEvaluationStringMembershipCondition;
|
|
830
|
+
case: "flagEvaluationStringMembership";
|
|
831
|
+
} | {
|
|
832
|
+
case: undefined;
|
|
833
|
+
value?: undefined;
|
|
834
|
+
};
|
|
835
|
+
};
|
|
836
|
+
type FlagEvaluationStringMembershipCondition = Message<"datadog.ffe.flagging.ufc.v1.FlagEvaluationStringMembershipCondition"> & {
|
|
837
|
+
/**
|
|
838
|
+
* Index into FlagsConfiguration.strings for the flag key.
|
|
839
|
+
*
|
|
840
|
+
* @generated from field: uint32 flag_key_string_index = 1;
|
|
841
|
+
*/
|
|
842
|
+
flagKeyStringIndex: number;
|
|
843
|
+
/**
|
|
844
|
+
* Indices into FlagsConfiguration.strings for expected variant keys.
|
|
845
|
+
*
|
|
846
|
+
* @generated from field: repeated uint32 variant_key_string_indexes = 2;
|
|
847
|
+
*/
|
|
848
|
+
variantKeyStringIndexes: number[];
|
|
849
|
+
/**
|
|
850
|
+
* True negates membership.
|
|
851
|
+
*
|
|
852
|
+
* @generated from field: bool negate = 3;
|
|
853
|
+
*/
|
|
854
|
+
negate: boolean;
|
|
855
|
+
};
|
|
856
|
+
type ConditionOperands = Message<"datadog.ffe.flagging.ufc.v1.ConditionOperands"> & {
|
|
857
|
+
/**
|
|
858
|
+
* Zero-based indexes into FlagsConfiguration.conditions.
|
|
859
|
+
*
|
|
860
|
+
* @generated from field: repeated uint32 condition_indexes = 1;
|
|
861
|
+
*/
|
|
862
|
+
conditionIndexes: number[];
|
|
863
|
+
};
|
|
864
|
+
type NumericCondition = Message<"datadog.ffe.flagging.ufc.v1.NumericCondition"> & {
|
|
865
|
+
/**
|
|
866
|
+
* @generated from field: uint32 attribute_index = 1;
|
|
867
|
+
*/
|
|
868
|
+
attributeIndex: number;
|
|
869
|
+
/**
|
|
870
|
+
* @generated from field: datadog.ffe.flagging.ufc.v1.NumericComparator comparator = 2;
|
|
871
|
+
*/
|
|
872
|
+
comparator: NumericComparator;
|
|
873
|
+
/**
|
|
874
|
+
* @generated from field: double comparand = 3;
|
|
875
|
+
*/
|
|
876
|
+
comparand: number;
|
|
877
|
+
};
|
|
878
|
+
type RegexCondition = Message<"datadog.ffe.flagging.ufc.v1.RegexCondition"> & {
|
|
879
|
+
/**
|
|
880
|
+
* @generated from field: uint32 attribute_index = 1;
|
|
881
|
+
*/
|
|
882
|
+
attributeIndex: number;
|
|
883
|
+
/**
|
|
884
|
+
* Index into FlagsConfiguration.regexes.
|
|
885
|
+
*
|
|
886
|
+
* @generated from field: uint32 regex_index = 2;
|
|
887
|
+
*/
|
|
888
|
+
regexIndex: number;
|
|
889
|
+
/**
|
|
890
|
+
* True negates the regex match.
|
|
891
|
+
*
|
|
892
|
+
* @generated from field: bool negate = 3;
|
|
893
|
+
*/
|
|
894
|
+
negate: boolean;
|
|
895
|
+
};
|
|
896
|
+
type StringMembershipCondition = Message<"datadog.ffe.flagging.ufc.v1.StringMembershipCondition"> & {
|
|
897
|
+
/**
|
|
898
|
+
* @generated from field: uint32 attribute_index = 1;
|
|
899
|
+
*/
|
|
900
|
+
attributeIndex: number;
|
|
901
|
+
/**
|
|
902
|
+
* Indices into FlagsConfiguration.strings. Sorted by referenced value.
|
|
903
|
+
*
|
|
904
|
+
* @generated from field: repeated uint32 string_indexes = 2;
|
|
905
|
+
*/
|
|
906
|
+
stringIndexes: number[];
|
|
907
|
+
/**
|
|
908
|
+
* True negates membership.
|
|
909
|
+
*
|
|
910
|
+
* @generated from field: bool negate = 3;
|
|
911
|
+
*/
|
|
912
|
+
negate: boolean;
|
|
913
|
+
};
|
|
914
|
+
type StringComparisonCondition = Message<"datadog.ffe.flagging.ufc.v1.StringComparisonCondition"> & {
|
|
915
|
+
/**
|
|
916
|
+
* @generated from field: uint32 attribute_index = 1;
|
|
917
|
+
*/
|
|
918
|
+
attributeIndex: number;
|
|
919
|
+
/**
|
|
920
|
+
* @generated from field: datadog.ffe.flagging.ufc.v1.StringComparator comparator = 2;
|
|
921
|
+
*/
|
|
922
|
+
comparator: StringComparator;
|
|
923
|
+
/**
|
|
924
|
+
* Index into FlagsConfiguration.strings.
|
|
925
|
+
*
|
|
926
|
+
* @generated from field: uint32 string_index = 3;
|
|
927
|
+
*/
|
|
928
|
+
stringIndex: number;
|
|
929
|
+
/**
|
|
930
|
+
* True negates the comparator.
|
|
931
|
+
*
|
|
932
|
+
* @generated from field: bool negate = 4;
|
|
933
|
+
*/
|
|
934
|
+
negate: boolean;
|
|
935
|
+
};
|
|
936
|
+
type Sha256StringComparisonCondition = Message<"datadog.ffe.flagging.ufc.v1.Sha256StringComparisonCondition"> & {
|
|
937
|
+
/**
|
|
938
|
+
* @generated from field: uint32 attribute_index = 1;
|
|
939
|
+
*/
|
|
940
|
+
attributeIndex: number;
|
|
941
|
+
/**
|
|
942
|
+
* @generated from field: bytes salt = 2;
|
|
943
|
+
*/
|
|
944
|
+
salt: Uint8Array;
|
|
945
|
+
/**
|
|
946
|
+
* @generated from field: datadog.ffe.flagging.ufc.v1.Sha256StringComparator comparator = 3;
|
|
947
|
+
*/
|
|
948
|
+
comparator: Sha256StringComparator;
|
|
949
|
+
/**
|
|
950
|
+
* Number of UTF-8 bytes to extract from the start or end. If the attribute
|
|
951
|
+
* has fewer bytes, or extraction would split a code point, the condition is
|
|
952
|
+
* false.
|
|
953
|
+
*
|
|
954
|
+
* @generated from field: uint32 length = 4;
|
|
955
|
+
*/
|
|
956
|
+
length: number;
|
|
957
|
+
/**
|
|
958
|
+
* Expected SHA-256(salt || extracted UTF-8 bytes), as raw digest bytes.
|
|
959
|
+
*
|
|
960
|
+
* @generated from field: bytes sha256 = 5;
|
|
961
|
+
*/
|
|
962
|
+
sha256: Uint8Array;
|
|
963
|
+
/**
|
|
964
|
+
* True negates the comparator.
|
|
965
|
+
*
|
|
966
|
+
* @generated from field: bool negate = 6;
|
|
967
|
+
*/
|
|
968
|
+
negate: boolean;
|
|
969
|
+
};
|
|
970
|
+
type Sha256MembershipCondition = Message<"datadog.ffe.flagging.ufc.v1.Sha256MembershipCondition"> & {
|
|
971
|
+
/**
|
|
972
|
+
* @generated from field: uint32 attribute_index = 1;
|
|
973
|
+
*/
|
|
974
|
+
attributeIndex: number;
|
|
975
|
+
/**
|
|
976
|
+
* @generated from field: bytes salt = 2;
|
|
977
|
+
*/
|
|
978
|
+
salt: Uint8Array;
|
|
979
|
+
/**
|
|
980
|
+
* Sorted lexicographically as raw bytes.
|
|
981
|
+
*
|
|
982
|
+
* @generated from field: repeated bytes sha256 = 3;
|
|
983
|
+
*/
|
|
984
|
+
sha256: Uint8Array[];
|
|
985
|
+
/**
|
|
986
|
+
* True negates membership.
|
|
987
|
+
*
|
|
988
|
+
* @generated from field: bool negate = 4;
|
|
989
|
+
*/
|
|
990
|
+
negate: boolean;
|
|
991
|
+
};
|
|
992
|
+
type AttributePresenceCondition = Message<"datadog.ffe.flagging.ufc.v1.AttributePresenceCondition"> & {
|
|
993
|
+
/**
|
|
994
|
+
* @generated from field: uint32 attribute_index = 1;
|
|
995
|
+
*/
|
|
996
|
+
attributeIndex: number;
|
|
997
|
+
/**
|
|
998
|
+
* True checks that the attribute is null/absent (is_null); false checks
|
|
999
|
+
* that it is present/not-null (is_not_null).
|
|
1000
|
+
*
|
|
1001
|
+
* @generated from field: bool expect_null = 2;
|
|
1002
|
+
*/
|
|
1003
|
+
expectNull: boolean;
|
|
1004
|
+
};
|
|
1005
|
+
type VersionCondition = Message<"datadog.ffe.flagging.ufc.v1.VersionCondition"> & {
|
|
1006
|
+
/**
|
|
1007
|
+
* @generated from field: uint32 attribute_index = 1;
|
|
1008
|
+
*/
|
|
1009
|
+
attributeIndex: number;
|
|
1010
|
+
/**
|
|
1011
|
+
* @generated from field: datadog.ffe.flagging.ufc.v1.VersionComparator comparator = 2;
|
|
1012
|
+
*/
|
|
1013
|
+
comparator: VersionComparator;
|
|
1014
|
+
/**
|
|
1015
|
+
* Index into FlagsConfiguration.versions.
|
|
1016
|
+
*
|
|
1017
|
+
* @generated from field: uint32 version_index = 3;
|
|
1018
|
+
*/
|
|
1019
|
+
versionIndex: number;
|
|
1020
|
+
};
|
|
1021
|
+
type PartitionKey = Message<"datadog.ffe.flagging.ufc.v1.PartitionKey"> & {
|
|
1022
|
+
/**
|
|
1023
|
+
* @generated from oneof datadog.ffe.flagging.ufc.v1.PartitionKey.kind
|
|
1024
|
+
*/
|
|
1025
|
+
kind: {
|
|
1026
|
+
/**
|
|
1027
|
+
* @generated from field: datadog.ffe.flagging.ufc.v1.TimePartitionKey time = 1;
|
|
1028
|
+
*/
|
|
1029
|
+
value: TimePartitionKey;
|
|
1030
|
+
case: "time";
|
|
1031
|
+
} | {
|
|
1032
|
+
/**
|
|
1033
|
+
* @generated from field: datadog.ffe.flagging.ufc.v1.Md5ShardPartitionKey shard_md5 = 2;
|
|
1034
|
+
*/
|
|
1035
|
+
value: Md5ShardPartitionKey;
|
|
1036
|
+
case: "shardMd5";
|
|
1037
|
+
} | {
|
|
1038
|
+
case: undefined;
|
|
1039
|
+
value?: undefined;
|
|
1040
|
+
};
|
|
1041
|
+
};
|
|
1042
|
+
type TimePartitionKey = Message<"datadog.ffe.flagging.ufc.v1.TimePartitionKey"> & {};
|
|
1043
|
+
type Md5ShardPartitionKey = Message<"datadog.ffe.flagging.ufc.v1.Md5ShardPartitionKey"> & {
|
|
1044
|
+
/**
|
|
1045
|
+
* Includes any separator between the salt and the hashed value; callers
|
|
1046
|
+
* must concatenate salt and attribute_value directly, with no implicit
|
|
1047
|
+
* separator of their own.
|
|
1048
|
+
*
|
|
1049
|
+
* @generated from field: string salt = 1;
|
|
1050
|
+
*/
|
|
1051
|
+
salt: string;
|
|
1052
|
+
/**
|
|
1053
|
+
* Index into FlagsConfiguration.attributes.
|
|
1054
|
+
*
|
|
1055
|
+
* @generated from field: uint32 attribute_index = 2;
|
|
1056
|
+
*/
|
|
1057
|
+
attributeIndex: number;
|
|
1058
|
+
/**
|
|
1059
|
+
* @generated from field: uint64 total_shards = 3;
|
|
1060
|
+
*/
|
|
1061
|
+
totalShards: bigint;
|
|
1062
|
+
};
|
|
1063
|
+
type Split = Message<"datadog.ffe.flagging.ufc.v1.Split"> & {
|
|
1064
|
+
/**
|
|
1065
|
+
* Has the same number of elements as the partition key.
|
|
1066
|
+
*
|
|
1067
|
+
* @generated from field: repeated datadog.ffe.flagging.ufc.v1.PartitionRange ranges = 1;
|
|
1068
|
+
*/
|
|
1069
|
+
ranges: PartitionRange[];
|
|
1070
|
+
/**
|
|
1071
|
+
* @generated from field: uint32 variation_index = 2;
|
|
1072
|
+
*/
|
|
1073
|
+
variationIndex: number;
|
|
1074
|
+
/**
|
|
1075
|
+
* @generated from field: optional int32 serial_id = 3;
|
|
1076
|
+
*/
|
|
1077
|
+
serialId?: number | undefined;
|
|
1078
|
+
/**
|
|
1079
|
+
* @generated from field: datadog.ffe.flagging.ufc.v1.Reason reason = 4;
|
|
1080
|
+
*/
|
|
1081
|
+
reason: Reason;
|
|
1082
|
+
/**
|
|
1083
|
+
* @generated from field: repeated datadog.ffe.flagging.ufc.v1.Feature features = 5;
|
|
1084
|
+
*/
|
|
1085
|
+
features: Feature[];
|
|
1086
|
+
};
|
|
1087
|
+
type Feature = Message<"datadog.ffe.flagging.ufc.v1.Feature"> & {
|
|
1088
|
+
/**
|
|
1089
|
+
* @generated from field: string key = 1;
|
|
1090
|
+
*/
|
|
1091
|
+
key: string;
|
|
1092
|
+
/**
|
|
1093
|
+
* @generated from oneof datadog.ffe.flagging.ufc.v1.Feature.value
|
|
1094
|
+
*/
|
|
1095
|
+
value: {
|
|
1096
|
+
/**
|
|
1097
|
+
* @generated from field: string string_value = 2;
|
|
1098
|
+
*/
|
|
1099
|
+
value: string;
|
|
1100
|
+
case: "stringValue";
|
|
1101
|
+
} | {
|
|
1102
|
+
/**
|
|
1103
|
+
* @generated from field: double number_value = 3;
|
|
1104
|
+
*/
|
|
1105
|
+
value: number;
|
|
1106
|
+
case: "numberValue";
|
|
1107
|
+
} | {
|
|
1108
|
+
/**
|
|
1109
|
+
* @generated from field: bool bool_value = 4;
|
|
1110
|
+
*/
|
|
1111
|
+
value: boolean;
|
|
1112
|
+
case: "boolValue";
|
|
1113
|
+
} | {
|
|
1114
|
+
case: undefined;
|
|
1115
|
+
value?: undefined;
|
|
1116
|
+
};
|
|
1117
|
+
/**
|
|
1118
|
+
* Open strings such as HOOK, EXPOSURE or EVALUATION, not an enum: SDKs ignore destinations
|
|
1119
|
+
* they do not know.
|
|
1120
|
+
*
|
|
1121
|
+
* @generated from field: repeated string destinations = 5;
|
|
1122
|
+
*/
|
|
1123
|
+
destinations: string[];
|
|
1124
|
+
};
|
|
1125
|
+
type PartitionRange = Message<"datadog.ffe.flagging.ufc.v1.PartitionRange"> & {
|
|
1126
|
+
/**
|
|
1127
|
+
* @generated from field: optional uint64 from = 1;
|
|
1128
|
+
*/
|
|
1129
|
+
from?: bigint | undefined;
|
|
1130
|
+
/**
|
|
1131
|
+
* @generated from field: optional uint64 to = 2;
|
|
1132
|
+
*/
|
|
1133
|
+
to?: bigint | undefined;
|
|
1134
|
+
};
|
|
1135
|
+
declare enum VariationType {
|
|
1136
|
+
/**
|
|
1137
|
+
* @generated from enum value: VARIATION_TYPE_UNSPECIFIED = 0;
|
|
1138
|
+
*/
|
|
1139
|
+
UNSPECIFIED = 0,
|
|
1140
|
+
/**
|
|
1141
|
+
* @generated from enum value: VARIATION_TYPE_STRING = 1;
|
|
1142
|
+
*/
|
|
1143
|
+
STRING = 1,
|
|
1144
|
+
/**
|
|
1145
|
+
* @generated from enum value: VARIATION_TYPE_INTEGER = 2;
|
|
1146
|
+
*/
|
|
1147
|
+
INTEGER = 2,
|
|
1148
|
+
/**
|
|
1149
|
+
* @generated from enum value: VARIATION_TYPE_NUMERIC = 3;
|
|
1150
|
+
*/
|
|
1151
|
+
NUMERIC = 3,
|
|
1152
|
+
/**
|
|
1153
|
+
* @generated from enum value: VARIATION_TYPE_BOOLEAN = 4;
|
|
1154
|
+
*/
|
|
1155
|
+
BOOLEAN = 4,
|
|
1156
|
+
/**
|
|
1157
|
+
* @generated from enum value: VARIATION_TYPE_JSON = 5;
|
|
1158
|
+
*/
|
|
1159
|
+
JSON = 5
|
|
1160
|
+
}
|
|
1161
|
+
declare enum NumericComparator {
|
|
1162
|
+
/**
|
|
1163
|
+
* @generated from enum value: NUMERIC_COMPARATOR_UNSPECIFIED = 0;
|
|
1164
|
+
*/
|
|
1165
|
+
UNSPECIFIED = 0,
|
|
1166
|
+
/**
|
|
1167
|
+
* @generated from enum value: NUMERIC_COMPARATOR_LESS_THAN = 1;
|
|
1168
|
+
*/
|
|
1169
|
+
LESS_THAN = 1,
|
|
1170
|
+
/**
|
|
1171
|
+
* @generated from enum value: NUMERIC_COMPARATOR_LESS_THAN_OR_EQUAL = 2;
|
|
1172
|
+
*/
|
|
1173
|
+
LESS_THAN_OR_EQUAL = 2,
|
|
1174
|
+
/**
|
|
1175
|
+
* @generated from enum value: NUMERIC_COMPARATOR_GREATER_THAN = 3;
|
|
1176
|
+
*/
|
|
1177
|
+
GREATER_THAN = 3,
|
|
1178
|
+
/**
|
|
1179
|
+
* @generated from enum value: NUMERIC_COMPARATOR_GREATER_THAN_OR_EQUAL = 4;
|
|
1180
|
+
*/
|
|
1181
|
+
GREATER_THAN_OR_EQUAL = 4
|
|
1182
|
+
}
|
|
1183
|
+
declare enum StringComparator {
|
|
1184
|
+
/**
|
|
1185
|
+
* @generated from enum value: STRING_COMPARATOR_UNSPECIFIED = 0;
|
|
1186
|
+
*/
|
|
1187
|
+
UNSPECIFIED = 0,
|
|
1188
|
+
/**
|
|
1189
|
+
* @generated from enum value: STRING_COMPARATOR_STARTS_WITH = 1;
|
|
1190
|
+
*/
|
|
1191
|
+
STARTS_WITH = 1,
|
|
1192
|
+
/**
|
|
1193
|
+
* @generated from enum value: STRING_COMPARATOR_ENDS_WITH = 2;
|
|
1194
|
+
*/
|
|
1195
|
+
ENDS_WITH = 2,
|
|
1196
|
+
/**
|
|
1197
|
+
* @generated from enum value: STRING_COMPARATOR_CONTAINS = 3;
|
|
1198
|
+
*/
|
|
1199
|
+
CONTAINS = 3
|
|
1200
|
+
}
|
|
1201
|
+
declare enum Sha256StringComparator {
|
|
1202
|
+
/**
|
|
1203
|
+
* @generated from enum value: SHA256_STRING_COMPARATOR_UNSPECIFIED = 0;
|
|
1204
|
+
*/
|
|
1205
|
+
UNSPECIFIED = 0,
|
|
1206
|
+
/**
|
|
1207
|
+
* @generated from enum value: SHA256_STRING_COMPARATOR_STARTS_WITH = 1;
|
|
1208
|
+
*/
|
|
1209
|
+
STARTS_WITH = 1,
|
|
1210
|
+
/**
|
|
1211
|
+
* @generated from enum value: SHA256_STRING_COMPARATOR_ENDS_WITH = 2;
|
|
1212
|
+
*/
|
|
1213
|
+
ENDS_WITH = 2
|
|
1214
|
+
}
|
|
1215
|
+
declare enum VersionComparator {
|
|
1216
|
+
/**
|
|
1217
|
+
* @generated from enum value: VERSION_COMPARATOR_UNSPECIFIED = 0;
|
|
1218
|
+
*/
|
|
1219
|
+
UNSPECIFIED = 0,
|
|
1220
|
+
/**
|
|
1221
|
+
* @generated from enum value: VERSION_COMPARATOR_EQUAL = 1;
|
|
1222
|
+
*/
|
|
1223
|
+
EQUAL = 1,
|
|
1224
|
+
/**
|
|
1225
|
+
* @generated from enum value: VERSION_COMPARATOR_NOT_EQUAL = 2;
|
|
1226
|
+
*/
|
|
1227
|
+
NOT_EQUAL = 2,
|
|
1228
|
+
/**
|
|
1229
|
+
* @generated from enum value: VERSION_COMPARATOR_LESS_THAN = 3;
|
|
1230
|
+
*/
|
|
1231
|
+
LESS_THAN = 3,
|
|
1232
|
+
/**
|
|
1233
|
+
* @generated from enum value: VERSION_COMPARATOR_LESS_THAN_OR_EQUAL = 4;
|
|
1234
|
+
*/
|
|
1235
|
+
LESS_THAN_OR_EQUAL = 4,
|
|
1236
|
+
/**
|
|
1237
|
+
* @generated from enum value: VERSION_COMPARATOR_GREATER_THAN = 5;
|
|
1238
|
+
*/
|
|
1239
|
+
GREATER_THAN = 5,
|
|
1240
|
+
/**
|
|
1241
|
+
* @generated from enum value: VERSION_COMPARATOR_GREATER_THAN_OR_EQUAL = 6;
|
|
1242
|
+
*/
|
|
1243
|
+
GREATER_THAN_OR_EQUAL = 6
|
|
1244
|
+
}
|
|
1245
|
+
declare enum Reason {
|
|
1246
|
+
/**
|
|
1247
|
+
* @generated from enum value: REASON_UNSPECIFIED = 0;
|
|
1248
|
+
*/
|
|
1249
|
+
UNSPECIFIED = 0,
|
|
1250
|
+
/**
|
|
1251
|
+
* @generated from enum value: REASON_TARGETING_MATCH = 1;
|
|
1252
|
+
*/
|
|
1253
|
+
TARGETING_MATCH = 1,
|
|
1254
|
+
/**
|
|
1255
|
+
* @generated from enum value: REASON_SPLIT = 2;
|
|
1256
|
+
*/
|
|
1257
|
+
SPLIT = 2,
|
|
1258
|
+
/**
|
|
1259
|
+
* @generated from enum value: REASON_STATIC = 3;
|
|
1260
|
+
*/
|
|
1261
|
+
STATIC = 3,
|
|
1262
|
+
/**
|
|
1263
|
+
* @generated from enum value: REASON_DEFAULT = 4;
|
|
1264
|
+
*/
|
|
1265
|
+
DEFAULT = 4
|
|
1266
|
+
}
|
|
1267
|
+
type ExperimentationOptOutModeValue = "disabled" | "immediate" | "future_experiments_only";
|
|
1268
|
+
interface OptOutInstant {
|
|
1269
|
+
readonly seconds: number;
|
|
1270
|
+
readonly fraction: string;
|
|
1271
|
+
}
|
|
422
1272
|
declare enum OperatorType {
|
|
423
1273
|
MATCHES = "MATCHES",
|
|
424
1274
|
NOT_MATCHES = "NOT_MATCHES",
|
|
@@ -458,7 +1308,15 @@ type NotOneOfCondition = {
|
|
|
458
1308
|
attribute: string;
|
|
459
1309
|
value: string[];
|
|
460
1310
|
};
|
|
461
|
-
type
|
|
1311
|
+
type FlagEvaluation = {
|
|
1312
|
+
key: string;
|
|
1313
|
+
};
|
|
1314
|
+
type FlagEvaluationCondition = {
|
|
1315
|
+
operator: OperatorType.ONE_OF | OperatorType.NOT_ONE_OF;
|
|
1316
|
+
flagEvaluation: FlagEvaluation;
|
|
1317
|
+
value: string[];
|
|
1318
|
+
};
|
|
1319
|
+
type NumericCondition$1 = {
|
|
462
1320
|
operator: NumericOperator;
|
|
463
1321
|
attribute: string;
|
|
464
1322
|
value: number;
|
|
@@ -473,9 +1331,9 @@ type SemVerCondition = {
|
|
|
473
1331
|
attribute: string;
|
|
474
1332
|
value: string;
|
|
475
1333
|
};
|
|
476
|
-
type Condition = MatchesCondition | NotMatchesCondition | OneOfCondition | NotOneOfCondition | NumericCondition | NullCondition | SemVerCondition;
|
|
1334
|
+
type Condition$1 = MatchesCondition | NotMatchesCondition | OneOfCondition | NotOneOfCondition | FlagEvaluationCondition | NumericCondition$1 | NullCondition | SemVerCondition;
|
|
477
1335
|
interface Rule {
|
|
478
|
-
conditions: Condition[];
|
|
1336
|
+
conditions: Condition$1[];
|
|
479
1337
|
}
|
|
480
1338
|
type VariantType = "BOOLEAN" | "INTEGER" | "NUMERIC" | "STRING" | "JSON";
|
|
481
1339
|
interface VariantConfiguration {
|
|
@@ -491,38 +1349,161 @@ interface Shard {
|
|
|
491
1349
|
ranges: ShardRange[];
|
|
492
1350
|
totalShards: number;
|
|
493
1351
|
}
|
|
494
|
-
interface Split {
|
|
1352
|
+
interface Split$1 {
|
|
495
1353
|
variationKey: string;
|
|
496
1354
|
shards: Shard[];
|
|
497
1355
|
extraLogging?: Record<string, string>;
|
|
498
1356
|
serialId?: number;
|
|
1357
|
+
features?: unknown;
|
|
499
1358
|
}
|
|
500
|
-
interface Allocation {
|
|
1359
|
+
interface Allocation$1 {
|
|
501
1360
|
key: string;
|
|
502
1361
|
rules?: Rule[];
|
|
503
1362
|
startAt?: Date;
|
|
504
1363
|
endAt?: Date;
|
|
505
1364
|
randomizationActivatedAt?: string;
|
|
506
|
-
splits: Split[];
|
|
1365
|
+
splits: Split$1[];
|
|
507
1366
|
/** Required by the UFC JSON schema; the producer always supplies an explicit boolean. */
|
|
508
1367
|
doLog: boolean;
|
|
509
1368
|
}
|
|
510
|
-
interface Flag {
|
|
1369
|
+
interface Flag$1 {
|
|
511
1370
|
key: string;
|
|
512
1371
|
enabled: boolean;
|
|
513
1372
|
variationType: VariantType;
|
|
514
1373
|
variations: Record<string, VariantConfiguration>;
|
|
515
|
-
allocations: Allocation[];
|
|
1374
|
+
allocations: Allocation$1[];
|
|
516
1375
|
}
|
|
517
1376
|
export interface UniversalFlagConfigurationV1 {
|
|
518
1377
|
createdAt: string;
|
|
519
1378
|
format: string;
|
|
520
1379
|
observeFullEvaluationData?: boolean;
|
|
1380
|
+
evaluatorParams?: {
|
|
1381
|
+
maxDependencyDepth?: number;
|
|
1382
|
+
};
|
|
521
1383
|
environment: {
|
|
522
1384
|
name: string;
|
|
523
1385
|
};
|
|
524
|
-
flags: Record<string, Flag>;
|
|
1386
|
+
flags: Record<string, Flag$1>;
|
|
525
1387
|
}
|
|
1388
|
+
type RandomizationActivation = {
|
|
1389
|
+
kind: "missing";
|
|
1390
|
+
} | {
|
|
1391
|
+
kind: "valid";
|
|
1392
|
+
instant: OptOutInstant;
|
|
1393
|
+
} | {
|
|
1394
|
+
kind: "invalid";
|
|
1395
|
+
};
|
|
1396
|
+
type PreparedAllocations<T> = {
|
|
1397
|
+
/** False when any activation is invalid, including on unreachable allocations. */
|
|
1398
|
+
readonly valid: boolean;
|
|
1399
|
+
readonly allocations: ReadonlyArray<{
|
|
1400
|
+
allocation: T;
|
|
1401
|
+
activation: RandomizationActivation;
|
|
1402
|
+
}>;
|
|
1403
|
+
};
|
|
1404
|
+
type CachedJsonValue = {
|
|
1405
|
+
valid: true;
|
|
1406
|
+
value: FlagValue;
|
|
1407
|
+
} | {
|
|
1408
|
+
valid: false;
|
|
1409
|
+
};
|
|
1410
|
+
type PreparedRulesResponse = FlagsConfiguration & {
|
|
1411
|
+
evaluationRegexCache: Map<number, RegExp | null>;
|
|
1412
|
+
evaluationJsonCache: Map<number, CachedJsonValue>;
|
|
1413
|
+
/** Validated once at decode time; evaluation must not read raw activation timestamps. */
|
|
1414
|
+
randomizationActivations: ReadonlyMap<Flag, PreparedAllocations<Allocation>>;
|
|
1415
|
+
};
|
|
1416
|
+
/**
|
|
1417
|
+
* Internal flags configuration for DatadogProvider.
|
|
1418
|
+
*/
|
|
1419
|
+
type FlagsConfiguration$1 = {
|
|
1420
|
+
/** The configuration wire could not be parsed, so no capability was decoded. @internal */
|
|
1421
|
+
configurationError?: string;
|
|
1422
|
+
/** @internal */
|
|
1423
|
+
precomputed?: PrecomputedConfiguration;
|
|
1424
|
+
/** The precomputed capability could not be decoded; a valid rules capability remains usable. @internal */
|
|
1425
|
+
precomputedError?: string;
|
|
1426
|
+
/** @internal */
|
|
1427
|
+
rules?: RulesConfiguration;
|
|
1428
|
+
/** The rules capability could not be decoded; a valid precomputed capability remains usable. @internal */
|
|
1429
|
+
rulesError?: string;
|
|
1430
|
+
};
|
|
1431
|
+
type PrecomputedConfiguration = {
|
|
1432
|
+
response: PrecomputedConfigurationResponse;
|
|
1433
|
+
context?: EvaluationContext;
|
|
1434
|
+
fetchedAt?: TimeStamp;
|
|
1435
|
+
etag?: string;
|
|
1436
|
+
/** Parsing errors for malformed flags, retained by flag key. */
|
|
1437
|
+
flagErrors?: Record<string, string>;
|
|
1438
|
+
};
|
|
1439
|
+
type RulesConfiguration = {
|
|
1440
|
+
response: PreparedRulesResponse;
|
|
1441
|
+
fetchedAt?: TimeStamp;
|
|
1442
|
+
etag?: string;
|
|
1443
|
+
};
|
|
1444
|
+
type FlagTypeToValue<T extends FlagValueType> = {
|
|
1445
|
+
boolean: boolean;
|
|
1446
|
+
string: string;
|
|
1447
|
+
number: number;
|
|
1448
|
+
object: JsonValue;
|
|
1449
|
+
}[T];
|
|
1450
|
+
type PrecomputedConfigurationResponse = {
|
|
1451
|
+
data: {
|
|
1452
|
+
attributes: {
|
|
1453
|
+
/** When configuration was generated. */
|
|
1454
|
+
createdAt: string;
|
|
1455
|
+
format?: "PRECOMPUTED";
|
|
1456
|
+
environment?: {
|
|
1457
|
+
name: string;
|
|
1458
|
+
};
|
|
1459
|
+
/** Allows full evaluation details in telemetry only when explicitly true; absent defaults to false. */
|
|
1460
|
+
observeFullEvaluationData?: boolean;
|
|
1461
|
+
/** Effective server evaluation options, retained in portable and persisted configurations. */
|
|
1462
|
+
evaluation_options?: {
|
|
1463
|
+
experimentation_opt_out?: boolean;
|
|
1464
|
+
experimentation_opt_out_mode?: string;
|
|
1465
|
+
dd_experimentation_opt_out_at?: string;
|
|
1466
|
+
};
|
|
1467
|
+
/** Absent or false for legacy plaintext assignments. */
|
|
1468
|
+
obfuscated?: boolean;
|
|
1469
|
+
/** Required when obfuscated is true; retained with the map in caches. */
|
|
1470
|
+
obfuscation?: FlagKeyObfuscation;
|
|
1471
|
+
/** Complete successful assignments only. */
|
|
1472
|
+
flags: Record<string, PrecomputedFlag>;
|
|
1473
|
+
/** Terminal per-flag evaluation failures for dependent-flags-capable clients. */
|
|
1474
|
+
flagEvaluationErrors?: Record<string, PrecomputedErrorFlag>;
|
|
1475
|
+
};
|
|
1476
|
+
};
|
|
1477
|
+
};
|
|
1478
|
+
type PrecomputedFlag<T extends FlagValueType = FlagValueType> = {
|
|
1479
|
+
allocationKey: string;
|
|
1480
|
+
variationKey: string;
|
|
1481
|
+
variationType: T;
|
|
1482
|
+
variationValue: FlagTypeToValue<T>;
|
|
1483
|
+
reason: ResolutionReason;
|
|
1484
|
+
doLog: boolean;
|
|
1485
|
+
serialId?: number | null;
|
|
1486
|
+
dependencyEvaluations?: PrecomputedDependencyEvaluation[];
|
|
1487
|
+
/** Split features of the selected assignment; parsed leniently at evaluation time. */
|
|
1488
|
+
features?: unknown;
|
|
1489
|
+
};
|
|
1490
|
+
type PrecomputedErrorFlag = {
|
|
1491
|
+
reason: "ERROR";
|
|
1492
|
+
errorCode: string;
|
|
1493
|
+
errorMessage?: string;
|
|
1494
|
+
dependencyEvaluations?: PrecomputedDependencyEvaluation[];
|
|
1495
|
+
};
|
|
1496
|
+
type PrecomputedDependencyEvaluation = {
|
|
1497
|
+
flagKey: string;
|
|
1498
|
+
/** Whether this dependency belongs to the root flag's selected assignment path. */
|
|
1499
|
+
isPresentInAssignment: boolean;
|
|
1500
|
+
} | {
|
|
1501
|
+
flagKey: string;
|
|
1502
|
+
/** Root-relative prerequisite failure; error entries never belong to an assignment. */
|
|
1503
|
+
reason: "ERROR";
|
|
1504
|
+
errorCode: string;
|
|
1505
|
+
errorMessage?: string;
|
|
1506
|
+
};
|
|
526
1507
|
interface ExposureEvent {
|
|
527
1508
|
allocation: {
|
|
528
1509
|
key: string;
|
|
@@ -534,6 +1515,7 @@ interface ExposureEvent {
|
|
|
534
1515
|
key: string;
|
|
535
1516
|
};
|
|
536
1517
|
serial_id?: number;
|
|
1518
|
+
features?: Record<string, string | number | boolean>;
|
|
537
1519
|
subject: {
|
|
538
1520
|
id: string;
|
|
539
1521
|
attributes: EvaluationContext;
|
|
@@ -548,6 +1530,85 @@ interface ExposureEvent {
|
|
|
548
1530
|
};
|
|
549
1531
|
};
|
|
550
1532
|
}
|
|
1533
|
+
export interface FlagSelection {
|
|
1534
|
+
tags?: readonly string[];
|
|
1535
|
+
keyPatterns?: readonly string[];
|
|
1536
|
+
}
|
|
1537
|
+
/**
|
|
1538
|
+
* Return a detached copy of the context from a precomputed configuration.
|
|
1539
|
+
*
|
|
1540
|
+
* This function returns `undefined` when the configuration has no
|
|
1541
|
+
* context-specific precomputed branch. It does not modify the configuration,
|
|
1542
|
+
* OpenFeature, or provider state.
|
|
1543
|
+
*/
|
|
1544
|
+
export declare function getPrecomputedContext(configuration: FlagsConfiguration$1): EvaluationContext | undefined;
|
|
1545
|
+
export type FlagsConfigurationWire = string;
|
|
1546
|
+
/**
|
|
1547
|
+
* Parse the precomputed entry from an opaque flags configuration wire value.
|
|
1548
|
+
*/
|
|
1549
|
+
declare function configurationFromPrecomputedString(wire: FlagsConfigurationWire): FlagsConfiguration$1;
|
|
1550
|
+
/**
|
|
1551
|
+
* Serialize only the precomputed capability of a flags configuration.
|
|
1552
|
+
*/
|
|
1553
|
+
declare function configurationToPrecomputedString(configuration: FlagsConfiguration$1): FlagsConfigurationWire;
|
|
1554
|
+
type DependencyEvaluation = {
|
|
1555
|
+
flagKey: string;
|
|
1556
|
+
details: Omit<ResolutionDetails<FlagValue>, "value"> & {
|
|
1557
|
+
value?: FlagValue;
|
|
1558
|
+
};
|
|
1559
|
+
};
|
|
1560
|
+
export type ConfigurationFetchErrorCode = "invalid_options" | "http" | "invalid_response" | "decode" | "transport" | "cancelled" | "timeout";
|
|
1561
|
+
/** A configuration-loading failure, not an OpenFeature evaluation error. */
|
|
1562
|
+
export declare class ConfigurationFetchError extends Error {
|
|
1563
|
+
readonly code: ConfigurationFetchErrorCode;
|
|
1564
|
+
readonly status?: number | undefined;
|
|
1565
|
+
constructor(code: ConfigurationFetchErrorCode, message: string, status?: number | undefined);
|
|
1566
|
+
}
|
|
1567
|
+
interface ConfigurationTransportOptions {
|
|
1568
|
+
/** Request and response-body deadline in milliseconds. Defaults to 5000. */
|
|
1569
|
+
timeoutMs?: number;
|
|
1570
|
+
signal?: AbortSignal;
|
|
1571
|
+
/** Fetch-compatible transport. Must honor the supplied signal and redirect policy. */
|
|
1572
|
+
fetch?: typeof globalThis.fetch;
|
|
1573
|
+
}
|
|
1574
|
+
interface ConfigurationSelectionOptions {
|
|
1575
|
+
/**
|
|
1576
|
+
* Request flags matching any of these tags or key patterns.
|
|
1577
|
+
* Best-effort: an invalid or over-limit selection is not sent.
|
|
1578
|
+
*/
|
|
1579
|
+
flagSelection?: FlagSelection;
|
|
1580
|
+
/** Reports dropped or server-ignored selections. Defaults to console. */
|
|
1581
|
+
logger?: {
|
|
1582
|
+
error(message: string): void;
|
|
1583
|
+
};
|
|
1584
|
+
}
|
|
1585
|
+
export interface PrecomputedConfigurationFetchOptions extends ConfigurationTransportOptions, ConfigurationSelectionOptions {
|
|
1586
|
+
/** Required for now. Only client-distributed flags are supported by this endpoint. */
|
|
1587
|
+
distributionChannel: "client";
|
|
1588
|
+
clientToken: string;
|
|
1589
|
+
/** Reserved. API-key authentication is not supported for client distribution. */
|
|
1590
|
+
apiKey?: never;
|
|
1591
|
+
env: string;
|
|
1592
|
+
/** Datadog site. Defaults to datadoghq.com. */
|
|
1593
|
+
site?: string;
|
|
1594
|
+
applicationId?: string;
|
|
1595
|
+
/**
|
|
1596
|
+
* A detached snapshot is bound to the returned assignments. Only plain JSON values are accepted:
|
|
1597
|
+
* no Date, undefined, non-finite numbers, class instances, or cycles, including nested values.
|
|
1598
|
+
* Convert dates to strings before calling and use the same context in the receiving provider.
|
|
1599
|
+
*/
|
|
1600
|
+
context: EvaluationContext;
|
|
1601
|
+
/** Opaque target SDK fingerprint. Forward unchanged from its getter; omission requests plaintext. */
|
|
1602
|
+
clientFingerprint?: ClientFingerprint;
|
|
1603
|
+
/** Defaults to disabled. The receiving provider must use the same effective opt-out policy. */
|
|
1604
|
+
experimentationOptOutMode?: ExperimentationOptOutModeValue;
|
|
1605
|
+
}
|
|
1606
|
+
/** Fetch assignments for one client context, without initializing a provider or emitting tracking events. */
|
|
1607
|
+
export declare function fetchPrecomputedConfiguration(options: PrecomputedConfigurationFetchOptions): Promise<FlagsConfiguration$1>;
|
|
1608
|
+
export declare enum ExperimentationOptOutMode {
|
|
1609
|
+
Disabled = "disabled",
|
|
1610
|
+
Immediate = "immediate"
|
|
1611
|
+
}
|
|
551
1612
|
type Hook<TData = Record<string, unknown>> = BaseHook<FlagValue, TData, Promise<EvaluationContext | void> | EvaluationContext | void, Promise<void> | void>;
|
|
552
1613
|
interface Provider extends CommonProvider<ServerProviderStatus> {
|
|
553
1614
|
/**
|
|
@@ -574,17 +1635,96 @@ interface Provider extends CommonProvider<ServerProviderStatus> {
|
|
|
574
1635
|
*/
|
|
575
1636
|
resolveObjectEvaluation<T extends JsonValue>(flagKey: string, defaultValue: T, context: EvaluationContext, logger: Logger): Promise<ResolutionDetails<T>>;
|
|
576
1637
|
}
|
|
1638
|
+
type Milestone = {
|
|
1639
|
+
elapsed_ms: number;
|
|
1640
|
+
};
|
|
1641
|
+
type Initialization = {
|
|
1642
|
+
started_at_ms: number;
|
|
1643
|
+
duration_ms: number;
|
|
1644
|
+
milestones: {
|
|
1645
|
+
configuration_received?: Milestone;
|
|
1646
|
+
provider_ready?: Milestone;
|
|
1647
|
+
};
|
|
1648
|
+
};
|
|
1649
|
+
/** A provider observation. The integration adds SDK and service identity and handles delivery. */
|
|
1650
|
+
export type SDKDiagnostic = {
|
|
1651
|
+
timestamp: number;
|
|
1652
|
+
} & ({
|
|
1653
|
+
event_type: "sdk_initialization";
|
|
1654
|
+
initialization: Initialization & {
|
|
1655
|
+
outcome: "ready";
|
|
1656
|
+
final: true;
|
|
1657
|
+
milestones: {
|
|
1658
|
+
configuration_received: Milestone;
|
|
1659
|
+
provider_ready: Milestone;
|
|
1660
|
+
};
|
|
1661
|
+
};
|
|
1662
|
+
} | {
|
|
1663
|
+
event_type: "sdk_initialization";
|
|
1664
|
+
error_code: "INIT_FAILED";
|
|
1665
|
+
initialization: Initialization & {
|
|
1666
|
+
outcome: "failed";
|
|
1667
|
+
final: true;
|
|
1668
|
+
};
|
|
1669
|
+
} | {
|
|
1670
|
+
event_type: "sdk_initialization";
|
|
1671
|
+
initialization: Initialization & {
|
|
1672
|
+
outcome: "incomplete";
|
|
1673
|
+
final: false;
|
|
1674
|
+
reason: "provider_closed";
|
|
1675
|
+
};
|
|
1676
|
+
} | {
|
|
1677
|
+
event_type: "provider_error";
|
|
1678
|
+
error_code: "CONFIG_FETCH_FAILED";
|
|
1679
|
+
});
|
|
577
1680
|
export interface DatadogNodeServerProviderOptions {
|
|
578
1681
|
/**
|
|
579
1682
|
* Log experiment exposures
|
|
580
1683
|
*/
|
|
581
1684
|
exposureChannel: Channel<ExposureEvent>;
|
|
1685
|
+
/** Receives diagnostic observations without awaiting delivery. Omit to disable measurement. */
|
|
1686
|
+
onDiagnostic?: (diagnostic: SDKDiagnostic) => void | Promise<void>;
|
|
1687
|
+
/**
|
|
1688
|
+
* Internal sidecar consumed by the integration's root evaluation hook.
|
|
1689
|
+
* @internal
|
|
1690
|
+
*/
|
|
1691
|
+
dependencyTelemetrySidecar?: DependencyTelemetrySidecar;
|
|
582
1692
|
/**
|
|
583
1693
|
* Timeout in milliseconds for provider initialization.
|
|
584
1694
|
* If the configuration is not set within this time, initialization will fail.
|
|
585
1695
|
* @default DEFAULT_INITIALIZATION_TIMEOUT_MS (30000ms / 30 seconds)
|
|
586
1696
|
*/
|
|
587
1697
|
initializationTimeoutMs?: number;
|
|
1698
|
+
/** Experiment exclusion policy. Defaults to Disabled; environment configuration belongs to the caller. */
|
|
1699
|
+
experimentationOptOutMode?: ExperimentationOptOutMode;
|
|
1700
|
+
}
|
|
1701
|
+
type PreparedDependencyExposure = {
|
|
1702
|
+
details: Omit<EvaluationDetails<FlagValue>, "value"> & {
|
|
1703
|
+
value?: FlagValue;
|
|
1704
|
+
};
|
|
1705
|
+
event: ExposureEvent;
|
|
1706
|
+
};
|
|
1707
|
+
type PreparedDependencyTelemetry = {
|
|
1708
|
+
dependencyEvaluations: readonly DependencyEvaluation[];
|
|
1709
|
+
dependencyExposures: readonly PreparedDependencyExposure[];
|
|
1710
|
+
};
|
|
1711
|
+
/**
|
|
1712
|
+
* Associates a completed dependency trace with the root result's metadata and evaluation context.
|
|
1713
|
+
* Evaluation and exposure hooks consume their respective batches from the same root lifecycle.
|
|
1714
|
+
* @internal
|
|
1715
|
+
*/
|
|
1716
|
+
export declare class DependencyTelemetrySidecar {
|
|
1717
|
+
readonly collectDependencyEvaluations: boolean;
|
|
1718
|
+
private readonly batchesByMetadata;
|
|
1719
|
+
private readonly batchesByContext;
|
|
1720
|
+
private readonly evaluationAliases;
|
|
1721
|
+
constructor(collectDependencyEvaluations?: boolean);
|
|
1722
|
+
stage(rootMetadata: object, rootContext: object, telemetry: PreparedDependencyTelemetry): void;
|
|
1723
|
+
associateDependencyEvaluations(alias: object, metadata: object | undefined): void;
|
|
1724
|
+
takeDependencyEvaluations(metadata: object | undefined, alias?: object, context?: object): readonly DependencyEvaluation[];
|
|
1725
|
+
takeDependencyExposures(metadata: object | undefined): readonly PreparedDependencyExposure[];
|
|
1726
|
+
discardDependencyExposures(metadata: object | undefined): void;
|
|
1727
|
+
private deleteBatch;
|
|
588
1728
|
}
|
|
589
1729
|
export declare class DatadogNodeServerProvider implements Provider {
|
|
590
1730
|
private readonly options;
|
|
@@ -592,9 +1732,13 @@ export declare class DatadogNodeServerProvider implements Provider {
|
|
|
592
1732
|
readonly runsOn: Paradigm;
|
|
593
1733
|
readonly hooks?: Hook[];
|
|
594
1734
|
private initController?;
|
|
1735
|
+
private readonly diagnostics?;
|
|
1736
|
+
private initialization?;
|
|
595
1737
|
readonly events: ProviderEventEmitter<ServerProviderEvents>;
|
|
596
1738
|
private readonly exposureCache;
|
|
1739
|
+
private readonly dependencyTelemetrySidecar;
|
|
597
1740
|
private configuration?;
|
|
1741
|
+
private readonly experimentationOptOutMode;
|
|
598
1742
|
constructor(options: DatadogNodeServerProviderOptions);
|
|
599
1743
|
/**
|
|
600
1744
|
* Used by dd-source-js
|
|
@@ -618,11 +1762,30 @@ export declare class DatadogNodeServerProvider implements Provider {
|
|
|
618
1762
|
* See setConfiguration and setError for more details.
|
|
619
1763
|
*/
|
|
620
1764
|
initialize(): Promise<void>;
|
|
1765
|
+
private initializeConfiguration;
|
|
1766
|
+
/** Called by the integration once before a sequential configuration poll, including its retries. */
|
|
1767
|
+
reportConfigurationFetchStart(): void;
|
|
1768
|
+
/** Called after the poll succeeds or exhausts retries; cancellations are not fetch failures. */
|
|
1769
|
+
reportConfigurationFetchResult(success: boolean): void;
|
|
1770
|
+
/**
|
|
1771
|
+
* Waits for initialization that already received configuration or an error, then stops diagnostics permanently.
|
|
1772
|
+
* Await this before closing diagnostic delivery. Initializing again does not restart diagnostics.
|
|
1773
|
+
*/
|
|
1774
|
+
onClose(): Promise<void>;
|
|
621
1775
|
resolveBooleanEvaluation(flagKey: string, defaultValue: boolean, context: EvaluationContext, _logger: Logger): Promise<ResolutionDetails<boolean>>;
|
|
622
1776
|
resolveStringEvaluation(flagKey: string, defaultValue: string, context: EvaluationContext, _logger: Logger): Promise<ResolutionDetails<string>>;
|
|
623
1777
|
resolveNumberEvaluation(flagKey: string, defaultValue: number, context: EvaluationContext, _logger: Logger): Promise<ResolutionDetails<number>>;
|
|
624
1778
|
resolveObjectEvaluation<T extends JsonValue>(flagKey: string, defaultValue: T, context: EvaluationContext, _logger: Logger): Promise<ResolutionDetails<T>>;
|
|
1779
|
+
private stageDependencyTelemetry;
|
|
1780
|
+
/** Prepares a verdict finalized by the provider hook after successful evaluation. */
|
|
625
1781
|
private handleExposure;
|
|
1782
|
+
private prepareExposure;
|
|
626
1783
|
}
|
|
627
1784
|
|
|
1785
|
+
export {
|
|
1786
|
+
FlagsConfiguration$1 as FlagsConfiguration,
|
|
1787
|
+
configurationFromPrecomputedString as configurationFromString,
|
|
1788
|
+
configurationToPrecomputedString as configurationToString,
|
|
1789
|
+
};
|
|
1790
|
+
|
|
628
1791
|
export {};
|