@narrative.io/data-collaboration-sdk-ts 0.0.106 → 0.0.108
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/build/access-rules/index.d.ts +44 -0
- package/build/access-rules/index.js +51 -0
- package/build/access-rules/types.d.ts +29 -0
- package/build/access-rules/types.js +1 -0
- package/build/apps/index.d.ts +5 -4
- package/build/apps/index.js +8 -3
- package/build/apps/types.d.ts +12 -0
- package/build/apps/types.js +0 -1
- package/build/attributes/index.d.ts +9 -9
- package/build/attributes/index.js +8 -8
- package/build/attributes/types.d.ts +5 -5
- package/build/authentication/index.d.ts +3 -3
- package/build/authentication/index.js +3 -3
- package/build/authentication/types.d.ts +3 -3
- package/build/base-api.d.ts +42 -42
- package/build/base-api.js +51 -51
- package/build/company-info/index.d.ts +3 -3
- package/build/company-info/index.js +2 -2
- package/build/contracts/index.d.ts +18 -18
- package/build/contracts/index.js +18 -18
- package/build/contracts/types.d.ts +3 -3
- package/build/data-streams/index.d.ts +10 -10
- package/build/data-streams/index.js +9 -9
- package/build/data-streams/types.d.ts +7 -7
- package/build/datasets/index.d.ts +30 -30
- package/build/datasets/index.js +32 -32
- package/build/datasets/types.d.ts +9 -9
- package/build/forecast/index.d.ts +3 -3
- package/build/forecast/index.js +3 -3
- package/build/forecast/types.d.ts +7 -7
- package/build/health/index.d.ts +2 -2
- package/build/health/index.js +2 -2
- package/build/health/types.d.ts +1 -1
- package/build/index.d.ts +32 -31
- package/build/index.js +44 -24
- package/build/installations/index.d.ts +3 -3
- package/build/installations/index.js +3 -3
- package/build/installations/types.d.ts +1 -1
- package/build/mappings/index.d.ts +16 -16
- package/build/mappings/index.js +18 -18
- package/build/mappings/types.d.ts +6 -6
- package/build/nql/DataRulesConverter.d.ts +3 -3
- package/build/nql/DataRulesConverter.js +55 -31
- package/build/nql/NQLParser.d.ts +4 -4
- package/build/nql/NQLParser.js +74 -57
- package/build/nql/SubstraitParser.d.ts +173 -173
- package/build/nql/SubstraitParser.js +270 -261
- package/build/nql/index.d.ts +4 -4
- package/build/nql/index.js +3 -3
- package/build/nql/types.d.ts +6 -6
- package/build/nql/types.js +59 -29
- package/build/ping/index.d.ts +2 -2
- package/build/ping/index.js +2 -2
- package/build/ping/types.d.ts +1 -1
- package/build/products/index.d.ts +6 -6
- package/build/products/index.js +6 -6
- package/build/products/types.d.ts +4 -4
- package/build/resources/index.d.ts +4 -4
- package/build/resources/index.js +2 -2
- package/build/resources/types.d.ts +3 -3
- package/build/rosetta/types.d.ts +12 -12
- package/build/rosetta/types.js +69 -42
- package/build/rosetta-stone/index.d.ts +3 -3
- package/build/rosetta-stone/index.js +3 -3
- package/build/types.d.ts +2 -2
- package/build/uploads/index.d.ts +8 -8
- package/build/uploads/index.js +8 -8
- package/build/utils.js +1 -1
- package/package.json +3 -1
|
@@ -10,13 +10,13 @@ http://www.apache.org/licenses/LICENSE-2.0
|
|
|
10
10
|
NOTICE: THIS FILE HAS BEEN MODIFIED BY NARRATIVE I/O UNDER COMPLIANCE WITH THE APACHE 2.0 LICENCE FROM THE ORIGINAL WORK
|
|
11
11
|
OF THE COMPANY Substrait (https://github.com/substrait-io/substrait-js).
|
|
12
12
|
*/
|
|
13
|
-
type Nullability =
|
|
14
|
-
type FailureBehavior =
|
|
13
|
+
type Nullability = "NULLABILITY_UNSPECIFIED" | "NULLABILITY_NULLABLE" | "NULLABILITY_REQUIRED";
|
|
14
|
+
type FailureBehavior = "FAILURE_BEHAVIOR_UNSPECIFIED" | "FAILURE_BEHAVIOR_RETURN_NULL" | "THROW_EXCEPTION";
|
|
15
15
|
interface AdvancedExtension {
|
|
16
16
|
optimization: unknown;
|
|
17
17
|
enhancement: unknown;
|
|
18
18
|
}
|
|
19
|
-
type LogicalOperator =
|
|
19
|
+
type LogicalOperator = "and" | "or" | "not";
|
|
20
20
|
interface Expression {
|
|
21
21
|
selection?: FieldReference;
|
|
22
22
|
scalarFunction?: ScalarFunction;
|
|
@@ -512,240 +512,240 @@ declare class SubstraitParser {
|
|
|
512
512
|
filters: string[];
|
|
513
513
|
logicalOperators: LogicalOperator[];
|
|
514
514
|
/**
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
515
|
+
* Constructs a SubstraitParser
|
|
516
|
+
* @param {SubstraitPlan} plan the Substrait plan
|
|
517
|
+
*/
|
|
518
518
|
constructor(plan: Plan);
|
|
519
519
|
/**
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
520
|
+
* Creates a map from anchor to function name
|
|
521
|
+
* @param {SubstraitPlan} plan the Substrait plan
|
|
522
|
+
* @return {Map<number, string>} the created mapping
|
|
523
|
+
*/
|
|
524
524
|
buildExtensionSet(plan: Plan): Map<number, string>;
|
|
525
525
|
/**
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
526
|
+
* Geneate a unique id for the node
|
|
527
|
+
* @param {string} type The type of the node
|
|
528
|
+
* @return {string} A unique id
|
|
529
|
+
*/
|
|
530
530
|
nextId(type: string): string;
|
|
531
531
|
/**
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
532
|
+
* Create a schema field
|
|
533
|
+
*
|
|
534
|
+
* This is a special field with an empty name and an empty type string
|
|
535
|
+
* and uknown nullability
|
|
536
|
+
*
|
|
537
|
+
* @param {Field[]} fields the fields of the schema
|
|
538
|
+
* @return {Field} a schema field
|
|
539
|
+
*/
|
|
540
540
|
makeSchemaField(fields: Field[]): Field;
|
|
541
541
|
/**
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
542
|
+
* Applies a Substrait emit to an output schema
|
|
543
|
+
* @param {Field} schema the original output schema
|
|
544
|
+
* @param {Object} emit a potential remapping of fields
|
|
545
|
+
* @return {Field} the remapped output schema
|
|
546
|
+
*/
|
|
547
547
|
applyEmit(schema: Field, emit?: Emit): Field;
|
|
548
548
|
/**
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
549
|
+
* Create a print node, generating a new id
|
|
550
|
+
*
|
|
551
|
+
* @param {string} type the node type
|
|
552
|
+
* @param {PrintNode[]} inputs the inputs to the node
|
|
553
|
+
* @param {SimpleProperty[]} props properties describing the node
|
|
554
|
+
* @param {Field} schema the output schema of the node
|
|
555
|
+
* @param {Object} emit the Substrait emit for the node
|
|
556
|
+
* @return {PrintNode} a print node
|
|
557
|
+
*/
|
|
558
558
|
makePrintNode(type: string, inputs: PrintNode[], props: SimpleProperty[], schema: Field, emit?: Emit): PrintNode;
|
|
559
559
|
/**
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
560
|
+
* Recursive helper for structFieldToStr
|
|
561
|
+
* @param {*} field the Substrait field to convert
|
|
562
|
+
* @param {*} currentName the current name
|
|
563
|
+
* @param {Field} currentField the current input field
|
|
564
|
+
* @return {Field} a stringified represenstation
|
|
565
|
+
*/
|
|
566
566
|
structFieldHelper(field: StructItem, currentName: string, currentField: Field): Field;
|
|
567
567
|
/**
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
568
|
+
* Convert a struct field to a stringified representation
|
|
569
|
+
*
|
|
570
|
+
* Struct fields are usually intuitively written with names.
|
|
571
|
+
* For example, a.b.c. However, fields in Substrait plans
|
|
572
|
+
* are not typically named. So instead we represent them as
|
|
573
|
+
* $0, $1, $2, ... where $N means the field at index N.
|
|
574
|
+
*
|
|
575
|
+
* If the field does happen to be named we will use that.
|
|
576
|
+
*
|
|
577
|
+
* @param {StructItem} field a Substrait struct field
|
|
578
|
+
* @param {Field} exprIn the input to the expression
|
|
579
|
+
* @return {Field} a stringified representation
|
|
580
|
+
*/
|
|
581
581
|
structFieldToField(field: StructItem, exprIn: Field): Field;
|
|
582
582
|
/**
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
583
|
+
* Convert a direct reference to a stringified representation
|
|
584
|
+
* @param {Object} ref A Substrait direct reference
|
|
585
|
+
* @param {Object} exprIn the input to the expression
|
|
586
|
+
* @return {Field} a string representation
|
|
587
|
+
*/
|
|
588
588
|
directReferenceToField(ref: ReferenceSegment, exprIn: Field): Field;
|
|
589
589
|
/**
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
590
|
+
* Convert a reference to a stringified representation
|
|
591
|
+
* @param {Object} ref A Substrait reference expression
|
|
592
|
+
* @param {Object} exprIn the input to the expression
|
|
593
|
+
* @return {Field} a string representation
|
|
594
|
+
*/
|
|
595
595
|
referenceToField(ref: FieldReference, exprIn: Field): Field;
|
|
596
596
|
/**
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
597
|
+
* Convert a Substrait function argument to a string
|
|
598
|
+
* @param {Object} arg the argument to convert
|
|
599
|
+
* @param {Field} inp the input field
|
|
600
|
+
* @return {string} a string representation
|
|
601
|
+
*/
|
|
602
602
|
functionArgumentToStr(arg: FunctionArgument, inp: Field): string;
|
|
603
603
|
/**
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
604
|
+
* Converts a Substrait function reference to a string
|
|
605
|
+
* @param {number} ref a Substrait function reference
|
|
606
|
+
* @return {string} a string version of the reference
|
|
607
|
+
*/
|
|
608
608
|
functionRefToName(ref: number): string;
|
|
609
609
|
/**
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
610
|
+
* Convert arguments to a joined string
|
|
611
|
+
* @param {FunctionTyp} func A Substrait function call
|
|
612
|
+
* @param {Field} schema The input type
|
|
613
|
+
* @return {string} A string representation
|
|
614
|
+
*/
|
|
615
615
|
argsToString(func: FunctionTyp, schema: Field): string;
|
|
616
616
|
/**
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
617
|
+
* Convert a scalar function to a stringified representation
|
|
618
|
+
* @param {Object} func the function to convert
|
|
619
|
+
* @param {Field} schema the input type info
|
|
620
|
+
* @return {Field} a string version of the function
|
|
621
|
+
*/
|
|
622
622
|
scalarFunctionToField(func: ScalarFunction, schema: Field): Field;
|
|
623
623
|
/**
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
624
|
+
* Converts a Substrait literal to a field
|
|
625
|
+
* @param {Object} lit the Substrait literal
|
|
626
|
+
* @return {Field} a field representation
|
|
627
|
+
*/
|
|
628
628
|
literalToField(lit: Literal): Field;
|
|
629
629
|
/**
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
630
|
+
* Convert a cast expression to a stringified representation
|
|
631
|
+
* @param {Object} cast A Substrait cast expression
|
|
632
|
+
* @param {Field} schema The input schema
|
|
633
|
+
* @return {Field} A field representation
|
|
634
|
+
*/
|
|
635
635
|
castToField(cast: CastExpression, schema: Field): Field;
|
|
636
636
|
/**
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
637
|
+
* Convert an expression to a stringified representation
|
|
638
|
+
*
|
|
639
|
+
* The expression is returned as a field where the type
|
|
640
|
+
* of the field is the output type of the expression and the
|
|
641
|
+
* name of the field is a string representation of the expression
|
|
642
|
+
*
|
|
643
|
+
* @param {Object} expr A Substrait expression
|
|
644
|
+
* @param {Object} exprIn the input to the expression
|
|
645
|
+
* @return {Field} a string representation
|
|
646
|
+
*/
|
|
647
647
|
expressionToStr(expr: Expression, exprIn: Field): Field;
|
|
648
648
|
/**
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
649
|
+
* Convert a project relation to a print node
|
|
650
|
+
* @param {Object} project A Substrait ProjectRel
|
|
651
|
+
* @return {PrintNode} a print node
|
|
652
|
+
*/
|
|
653
653
|
projectToNode(project: ProjectRelation): PrintNode;
|
|
654
654
|
/**
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
655
|
+
* Convert a Substrait data type to an unnamed Field
|
|
656
|
+
*
|
|
657
|
+
* The field's name will be an empty string
|
|
658
|
+
*
|
|
659
|
+
* @param {Object} type a Substrait data type
|
|
660
|
+
* @return {Field} an unnamed field
|
|
661
|
+
*/
|
|
662
662
|
typeToField(type: LiteralType): Field;
|
|
663
663
|
/**
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
664
|
+
* Convert a named struct to an array of Field
|
|
665
|
+
* @param {NamedStruct} struct a Substrait named struct
|
|
666
|
+
* @return {Field[]} named fields
|
|
667
|
+
*/
|
|
668
668
|
namedStructToSchema(struct: NamedStruct): Field;
|
|
669
669
|
/**
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
670
|
+
* Extract the properties from a read relation
|
|
671
|
+
* @param {Object} read a Substrait read relation
|
|
672
|
+
* @return {SimpleProperty[]} properties for the relation
|
|
673
|
+
*/
|
|
674
674
|
readTypeToProps(read: ReadRelation): SimpleProperty[];
|
|
675
675
|
/**
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
676
|
+
* Convert a Substrait read relation to a print node
|
|
677
|
+
* @param {Object} read a Substrait read relation
|
|
678
|
+
* @return {PrintNode} a print node
|
|
679
|
+
*/
|
|
680
680
|
readToNode(read: ReadRelation): PrintNode;
|
|
681
681
|
/**
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
682
|
+
* True if the object has a field with the given name
|
|
683
|
+
* @param {Object} obj the object to test
|
|
684
|
+
* @param {string} fieldName the field name to look for
|
|
685
|
+
* @return {boolean} the result of the test
|
|
686
|
+
*/
|
|
687
687
|
hasValue(obj: object, fieldName: string): boolean;
|
|
688
688
|
/**
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
689
|
+
* Convert a Substrait fetch relation to a print node
|
|
690
|
+
* @param {Object} fetch a Substrait fetch relation
|
|
691
|
+
* @return {PrintNode} a print node
|
|
692
|
+
*/
|
|
693
693
|
fetchToNode(fetch: FetchRelation): PrintNode;
|
|
694
694
|
/**
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
695
|
+
* Convert a Substrait sort field to a property
|
|
696
|
+
* @param {Object} sortField a Substrait sort field
|
|
697
|
+
* @param {Field} schema the schema of the sort input
|
|
698
|
+
* @return {SimpleProperty} a property describing the sort
|
|
699
|
+
*/
|
|
700
700
|
sortFieldToStr(sortField: SortField, schema: Field): string | undefined;
|
|
701
701
|
/**
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
702
|
+
* Convert a Substrait sort relation to a print node
|
|
703
|
+
* @param {Object} sort a Substrait sort relation
|
|
704
|
+
* @return {PrintNode} a print node
|
|
705
|
+
*/
|
|
706
706
|
sortToNode(sort: SortRelation): PrintNode;
|
|
707
707
|
/**
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
708
|
+
* Convert a Substrait aggregate function to a field
|
|
709
|
+
* @param {Object} func the Substrait aggregate function
|
|
710
|
+
* @param {Field} inp the input field
|
|
711
|
+
* @return {Field} a field representation of the function
|
|
712
|
+
*/
|
|
713
713
|
aggregateFunctionToField(func: AggregateFunction, inp: Field): Field;
|
|
714
714
|
/**
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
715
|
+
* Convert a Substrait aggregate relation to a print node
|
|
716
|
+
* @param {Object} agg a Substrait aggregate relation
|
|
717
|
+
* @return {PrintNode} a print node
|
|
718
|
+
*/
|
|
719
719
|
aggToNode(agg: AggregateRelation): PrintNode;
|
|
720
720
|
/**
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
721
|
+
* Convert a Substrait filter relation to a print node
|
|
722
|
+
* @param {Object} filt a Substrait filter relation
|
|
723
|
+
* @return {PrintNode} a print node
|
|
724
|
+
*/
|
|
725
725
|
filterToNode(filt: FilterRelation): PrintNode;
|
|
726
726
|
/**
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
727
|
+
* Converts a Substrait join relation to a print node
|
|
728
|
+
* @param {Object} join a Substrait join relation
|
|
729
|
+
* @return {PrintNode} a print node
|
|
730
|
+
*/
|
|
731
731
|
joinToNode(join: JoinRelation): PrintNode;
|
|
732
732
|
/**
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
733
|
+
* Converts a Substrait relation to a print node
|
|
734
|
+
* @param {Object} rel the Substrait relation to convert
|
|
735
|
+
* @return {PrintNode} a print node
|
|
736
|
+
*/
|
|
737
737
|
relToNode(rel: Rel): PrintNode;
|
|
738
738
|
/**
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
739
|
+
* Converts a Substrait root relation to a print node
|
|
740
|
+
* @param {Object} rel the Substrait relation to convert
|
|
741
|
+
* @return {PrintNode} a print node
|
|
742
|
+
*/
|
|
743
743
|
rootRelToNode(rel: RelationRoot): PrintNode;
|
|
744
744
|
/**
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
745
|
+
* Converts a Substrait plan to a print node
|
|
746
|
+
* @param {Object} plan the Substrait plan to convert
|
|
747
|
+
* @return {PrintNode} a print node
|
|
748
|
+
*/
|
|
749
749
|
planToNode(plan: Plan): PrintNode;
|
|
750
750
|
parse(plan: Plan): {
|
|
751
751
|
selection: string[];
|