-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathBreeze.fs
1191 lines (1048 loc) · 66.9 KB
/
Breeze.fs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// ts2fable 0.0.0
module rec Breeze
#nowarn "3390" // disable warnings for invalid XML comments
open System
open Fable.Core
open Fable.Core.JS
type Error = System.Exception
type Function = System.Action
type RegExp = System.Text.RegularExpressions.Regex
let [<Import("core","breeze-client")>] core: Core.IExports = jsNative
let [<Import("config","breeze-client")>] config: Config.IExports = jsNative
let [<Import("DataType","breeze-client")>] DataType: DataType = jsNative
let [<Import("EntityAction","breeze-client")>] EntityAction: EntityAction = jsNative
let [<Import("EntityState","breeze-client")>] EntityState: EntityState = jsNative
let [<Import("FetchStrategy","breeze-client")>] FetchStrategy: FetchStrategy = jsNative
let [<Import("FilterQueryOp","breeze-client")>] FilterQueryOp: FilterQueryOp = jsNative
let [<Import("MergeStrategy","breeze-client")>] MergeStrategy: MergeStrategy = jsNative
let [<Import("metadataVersion","breeze-client")>] metadataVersion: string = jsNative
let [<Import("remoteAccess_odata","breeze-client")>] remoteAccess_odata: string = jsNative
let [<Import("remoteAccess_webApi","breeze-client")>] remoteAccess_webApi: string = jsNative
let [<Import("version","breeze-client")>] version: string = jsNative
type [<AllowNullLiteral>] IExports =
abstract AutoGeneratedKeyType: AutoGeneratedKeyTypeStatic
abstract ComplexAspect: ComplexAspectStatic
abstract ComplexType: ComplexTypeStatic
abstract DataProperty: DataPropertyStatic
abstract DataService: DataServiceStatic
abstract DataServiceAdapter: DataServiceAdapterStatic
abstract DeletedEntityKey: DeletedEntityKeyStatic
abstract JsonResultsAdapter: JsonResultsAdapterStatic
abstract DataTypeSymbol: DataTypeSymbolStatic
abstract EntityActionSymbol: EntityActionSymbolStatic
abstract EntityAspect: EntityAspectStatic
abstract PropertyChangedEventArgs: PropertyChangedEventArgsStatic
abstract PropertyChangedEvent: PropertyChangedEventStatic
abstract ValidationErrorsChangedEventArgs: ValidationErrorsChangedEventArgsStatic
abstract ValidationErrorsChangedEvent: ValidationErrorsChangedEventStatic
abstract EntityKey: EntityKeyStatic
abstract EntityManager: EntityManagerStatic
abstract EntityChangedEventArgs: EntityChangedEventArgsStatic
abstract EntityChangedEvent: EntityChangedEventStatic
abstract HasChangesChangedEventArgs: HasChangesChangedEventArgsStatic
abstract HasChangesChangedEvent: HasChangesChangedEventStatic
abstract EntityQuery: EntityQueryStatic
abstract EntityStateSymbol: EntityStateSymbolStatic
abstract EntityType: EntityTypeStatic
abstract FetchStrategySymbol: FetchStrategySymbolStatic
abstract FilterQueryOpSymbol: FilterQueryOpSymbolStatic
abstract LocalQueryComparisonOptions: LocalQueryComparisonOptionsStatic
abstract MergeStrategySymbol: MergeStrategySymbolStatic
abstract MetadataStore: MetadataStoreStatic
abstract NamingConvention: NamingConventionStatic
abstract NavigationProperty: NavigationPropertyStatic
abstract Predicate: PredicateStatic
abstract QueryOptions: QueryOptionsStatic
abstract SaveOptions: SaveOptionsStatic
abstract ValidationError: ValidationErrorStatic
abstract ValidationOptions: ValidationOptionsStatic
abstract Validator: ValidatorStatic
module Core =
type [<AllowNullLiteral>] IExports =
abstract Enum: EnumStatic
abstract EnumSymbol: EnumSymbolStatic
abstract Event: EventStatic
abstract objectForEach: obj: Object * kvfn: (string -> obj option -> unit) -> unit
abstract extend: target: Object * source: Object -> Object
abstract propEq: propertyName: string * value: obj option -> (Object -> bool)
abstract pluck: propertyName: string -> (Object -> obj option)
abstract arrayEquals: a1: ResizeArray<obj option> * a2: ResizeArray<obj option> * equalsFn: (obj option -> obj option -> bool) -> bool
abstract arrayFirst: a1: ResizeArray<obj option> * predicate: (obj option -> bool) -> obj option
abstract arrayIndexOf: a1: ResizeArray<obj option> * predicate: (obj option -> bool) -> float
abstract arrayRemoveItem: array: ResizeArray<obj option> * item: obj option * shouldRemoveMultiple: bool -> obj option
abstract arrayRemoveItem: array: ResizeArray<obj option> * predicate: (obj option -> bool) * shouldRemoveMultiple: bool -> obj option
abstract arrayZip: a1: ResizeArray<obj option> * a2: ResizeArray<obj option> * callback: (obj option -> obj option -> obj option) -> ResizeArray<obj option>
abstract requireLib: libnames: string * errMessage: string -> Object
abstract using: obj: Object * property: string * tempValue: obj option * fn: (unit -> obj option) -> obj option
abstract memoize: fn: (ResizeArray<obj option> -> obj option) -> obj option
abstract getUuid: unit -> string
abstract durationToSeconds: duration: string -> float
abstract isDate: o: obj option -> bool
abstract isGuid: o: obj option -> bool
abstract isDuration: o: obj option -> bool
abstract isFunction: o: obj option -> bool
abstract isEmpty: o: obj option -> bool
abstract isNumeric: o: obj option -> bool
abstract stringStartsWith: str: string * prefix: string -> bool
abstract stringEndsWith: str: string * suffix: string -> bool
abstract formatString: format: string * [<ParamArray>] args: obj option[] -> string
/// Change text to title case with spaces, e.g. 'myPropertyName12' to 'My Property Name 12'
abstract titleCase: str: string -> string
/// Return the ES5 property descriptor for the property, which may be on a prototype of the object
abstract getPropertyDescriptor: obj: obj option * propertyName: string -> PropertyDescriptor
/// safely perform toJSON logic on objects with cycles. Replacer function can map or exclude properties.
abstract toJSONSafe: obj: obj option * ?replacer: (string -> obj option -> obj option) -> obj option
/// Default value replacer for toJSONSafe. Replaces entityAspect and other internal properties with undefined.
abstract toJSONSafeReplacer: prop: string * ``val``: obj option -> obj option
type [<AllowNullLiteral>] ErrorCallback =
[<Emit("$0($1...)")>] abstract Invoke: error: Error -> unit
type [<AllowNullLiteral>] IEnum =
abstract contains: object: obj option -> bool
abstract fromName: name: string -> EnumSymbol
abstract getNames: unit -> ResizeArray<string>
abstract getSymbols: unit -> ResizeArray<EnumSymbol>
type [<AllowNullLiteral>] Enum =
inherit IEnum
abstract addSymbol: ?propertiesObj: obj -> EnumSymbol
abstract contains: object: obj option -> bool
abstract fromName: name: string -> EnumSymbol
abstract getNames: unit -> ResizeArray<string>
abstract getSymbols: unit -> ResizeArray<EnumSymbol>
abstract resolveSymbols: unit -> unit
type [<AllowNullLiteral>] EnumStatic =
[<EmitConstructor>] abstract Create: name: string * ?methodObj: obj -> Enum
abstract isSymbol: object: obj option -> bool
type [<AllowNullLiteral>] EnumSymbol =
abstract parentEnum: IEnum with get, set
abstract getName: unit -> string
abstract toString: unit -> string
type [<AllowNullLiteral>] EnumSymbolStatic =
[<EmitConstructor>] abstract Create: unit -> EnumSymbol
type [<AllowNullLiteral>] Event =
abstract publish: data: obj option * ?publishAsync: bool * ?errorCallback: ErrorCallback -> unit
abstract publishAsync: data: obj option * ?errorCallback: ErrorCallback -> unit
abstract subscribe: ?callback: (obj option -> unit) -> float
abstract unsubscribe: unsubKey: float -> bool
abstract clear: unit -> unit
type [<AllowNullLiteral>] EventStatic =
[<EmitConstructor>] abstract Create: name: string * publisher: obj option * ?defaultErrorCallback: ErrorCallback -> Event
abstract enable: eventName: string * target: obj option -> unit
abstract enable: eventName: string * target: obj option * isEnabled: bool -> unit
abstract enable: eventName: string * target: obj option * isEnabled: Function -> unit
abstract isEnabled: eventName: string * target: obj option -> bool
type [<AllowNullLiteral>] Entity =
abstract entityAspect: EntityAspect with get, set
abstract entityType: EntityType with get, set
type [<AllowNullLiteral>] ComplexObject =
abstract complexAspect: ComplexAspect with get, set
abstract complexType: ComplexType with get, set
type [<AllowNullLiteral>] IProperty =
abstract name: string with get, set
abstract nameOnServer: string with get, set
abstract displayName: string with get, set
abstract parentType: U2<EntityType, ComplexType> with get, set
abstract validators: ResizeArray<Validator> with get, set
abstract isDataProperty: bool with get, set
abstract isNavigationProperty: bool with get, set
abstract custom: obj option with get, set
type [<AllowNullLiteral>] IStructuralType =
abstract complexProperties: ResizeArray<DataProperty> with get, set
abstract dataProperties: ResizeArray<DataProperty> with get, set
abstract name: string with get, set
abstract ``namespace``: string with get, set
abstract shortName: string with get, set
abstract unmappedProperties: ResizeArray<DataProperty> with get, set
abstract validators: ResizeArray<Validator> with get, set
abstract custom: obj option with get, set
type [<AllowNullLiteral>] AutoGeneratedKeyType =
interface end
type [<AllowNullLiteral>] AutoGeneratedKeyTypeStatic =
[<EmitConstructor>] abstract Create: unit -> AutoGeneratedKeyType
abstract Identity: AutoGeneratedKeyType with get, set
abstract KeyGenerator: AutoGeneratedKeyType with get, set
abstract None: AutoGeneratedKeyType with get, set
type [<AllowNullLiteral>] ComplexAspect =
abstract complexObject: ComplexObject with get, set
abstract getEntityAspect: unit -> EntityAspect
abstract parent: Object with get, set
abstract parentProperty: DataProperty with get, set
abstract getPropertyPath: propName: string -> string
abstract originalValues: Object with get, set
type [<AllowNullLiteral>] ComplexAspectStatic =
[<EmitConstructor>] abstract Create: unit -> ComplexAspect
type [<AllowNullLiteral>] ComplexType =
inherit IStructuralType
abstract complexProperties: ResizeArray<DataProperty> with get, set
abstract dataProperties: ResizeArray<DataProperty> with get, set
abstract name: string with get, set
abstract ``namespace``: string with get, set
abstract shortName: string with get, set
abstract unmappedProperties: ResizeArray<DataProperty> with get, set
abstract validators: ResizeArray<Validator> with get, set
abstract custom: obj option with get, set
abstract addProperty: dataProperty: DataProperty -> ComplexType
abstract getProperties: unit -> ResizeArray<DataProperty>
type [<AllowNullLiteral>] ComplexTypeStatic =
[<EmitConstructor>] abstract Create: config: ComplexTypeOptions -> ComplexType
type [<AllowNullLiteral>] ComplexTypeOptions =
abstract shortName: string option with get, set
abstract ``namespace``: string option with get, set
abstract dataProperties: ResizeArray<DataProperty> option with get, set
abstract custom: Object option with get, set
type [<AllowNullLiteral>] DataProperty =
inherit IProperty
abstract complexTypeName: string with get, set
abstract concurrencyMode: string with get, set
abstract dataType: DataTypeSymbol with get, set
abstract defaultValue: obj option with get, set
abstract isComplexProperty: bool with get, set
abstract isDataProperty: bool with get, set
abstract isInherited: bool with get, set
abstract isNavigationProperty: bool with get, set
abstract isNullable: bool with get, set
abstract isPartOfKey: bool with get, set
abstract isUnmapped: bool with get, set
abstract isSettable: bool with get, set
abstract custom: obj option with get, set
abstract maxLength: float with get, set
abstract name: string with get, set
abstract nameOnServer: string with get, set
abstract displayName: string with get, set
abstract parentType: U2<EntityType, ComplexType> with get, set
abstract relatedNavigationProperty: NavigationProperty with get, set
abstract validators: ResizeArray<Validator> with get, set
type [<AllowNullLiteral>] DataPropertyStatic =
[<EmitConstructor>] abstract Create: config: DataPropertyOptions -> DataProperty
type [<AllowNullLiteral>] DataPropertyOptions =
abstract complexTypeName: string option with get, set
abstract concurrencyMode: string option with get, set
abstract custom: obj option with get, set
abstract dataType: DataTypeSymbol option with get, set
abstract defaultValue: obj option with get, set
abstract displayName: string option with get, set
abstract isNullable: bool option with get, set
abstract isPartOfKey: bool option with get, set
abstract isScalar: bool option with get, set
abstract isUnmapped: bool option with get, set
abstract maxLength: float option with get, set
abstract name: string option with get, set
abstract nameOnServer: string option with get, set
abstract validators: ResizeArray<Validator> option with get, set
type [<AllowNullLiteral>] DataService =
abstract adapterInstance: DataServiceAdapter with get, set
abstract adapterName: string with get, set
abstract hasServerMetadata: bool with get, set
abstract serviceName: string with get, set
abstract uriBuilderName: string with get, set
abstract jsonResultsAdapter: JsonResultsAdapter with get, set
abstract useJsonp: bool with get, set
abstract using: config: DataServiceOptions -> DataService
type [<AllowNullLiteral>] DataServiceStatic =
[<EmitConstructor>] abstract Create: config: DataServiceOptions -> DataService
type [<AllowNullLiteral>] DataServiceOptions =
abstract serviceName: string option with get, set
abstract adapterName: string option with get, set
abstract uriBuilderName: string option with get, set
abstract hasServerMetadata: bool option with get, set
abstract jsonResultsAdapter: JsonResultsAdapter option with get, set
abstract useJsonp: bool option with get, set
type [<AllowNullLiteral>] DataServiceAdapter =
abstract checkForRecomposition: interfaceInitializedArgs: {| interfaceName: string; isDefault: bool |} -> unit
abstract initialize: unit -> unit
abstract fetchMetadata: metadataStore: MetadataStore * dataService: DataService -> Promise<obj option>
abstract executeQuery: mappingContext: {| getUrl: unit -> string; query: EntityQuery; dataService: DataService |} -> Promise<obj option>
abstract saveChanges: saveContext: {| resourceName: string; dataService: DataService |} * saveBundle: Object -> Promise<SaveResult>
abstract JsonResultsAdapter: JsonResultsAdapter with get, set
type [<AllowNullLiteral>] DataServiceAdapterStatic =
[<EmitConstructor>] abstract Create: unit -> DataServiceAdapter
type [<AllowNullLiteral>] DeletedEntityKey =
abstract entityTypeName: string with get, set
abstract keyValues: ResizeArray<obj option> with get, set
type [<AllowNullLiteral>] DeletedEntityKeyStatic =
[<EmitConstructor>] abstract Create: unit -> DeletedEntityKey
type [<AllowNullLiteral>] JsonResultsAdapter =
abstract name: string with get, set
abstract extractResults: (JsonResultsAdapterExtractResults -> JsonResultsAdapterExtractResults) with get, set
abstract extractSaveResults: (JsonResultsAdapterExtractResults -> ResizeArray<obj option>) with get, set
abstract extractKeyMappings: (JsonResultsAdapterExtractResults -> ResizeArray<KeyMapping>) with get, set
abstract extractDeletedKeys: (JsonResultsAdapterExtractResults -> ResizeArray<DeletedEntityKey>) with get, set
abstract visitNode: (JsonResultsAdapterExtractResults -> QueryContext -> NodeContext -> {| entityType: EntityType option; nodeId: obj option; nodeRefId: obj option; ignore: bool option |}) with get, set
type [<AllowNullLiteral>] JsonResultsAdapterStatic =
[<EmitConstructor>] abstract Create: config: JsonResultsAdapterStaticConfig -> JsonResultsAdapter
type [<AllowNullLiteral>] JsonResultsAdapterStaticConfig =
abstract name: string with get, set
abstract extractResults: (JsonResultsAdapterExtractResults -> JsonResultsAdapterExtractResults) option with get, set
abstract extractSaveResults: (JsonResultsAdapterExtractResults -> ResizeArray<obj option>) option with get, set
abstract extractKeyMappings: (JsonResultsAdapterExtractResults -> ResizeArray<KeyMapping>) option with get, set
abstract extractDeletedKeys: (JsonResultsAdapterExtractResults -> ResizeArray<DeletedEntityKey>) option with get, set
abstract visitNode: (JsonResultsAdapterExtractResults -> QueryContext -> NodeContext -> {| entityType: EntityType option; nodeId: obj option; nodeRefId: obj option; ignore: bool option |}) with get, set
type [<AllowNullLiteral>] QueryContext =
abstract url: string with get, set
abstract query: U2<EntityQuery, string> with get, set
abstract entityManager: EntityManager with get, set
abstract dataService: DataService with get, set
abstract queryOptions: QueryOptions with get, set
type [<AllowNullLiteral>] NodeContext =
abstract nodeType: string with get, set
abstract propertyName: string with get, set
type [<AllowNullLiteral>] DataTypeSymbol =
inherit Core.EnumSymbol
abstract defaultValue: obj option with get, set
abstract isDate: bool option with get, set
abstract isFloat: bool option with get, set
abstract isInteger: bool option with get, set
abstract isNumeric: bool option with get, set
abstract quoteJsonOData: bool option with get, set
abstract validatorCtor: (obj option -> Validator) with get, set
/// Function to convert a value from string to this DataType. Note that this will be called each time a property is changed, so make it fast.
abstract parse: (obj option -> (string) option -> obj option) option with get, set
/// Function to format this DataType for OData queries.
abstract fmtOData: (obj option -> obj option) with get, set
/// Optional function to get the next value for key generation, if this datatype is used as a key. Uses an internal table of previous values.
abstract getNext: (unit -> obj option) option with get, set
/// Optional function to normalize a data value for comparison, if its value cannot be used directly. Note that this will be called each time a property is changed, so make it fast.
abstract normalize: (obj option -> obj option) option with get, set
/// Optional function to get the next value when the datatype is used as a concurrency property.
abstract getConcurrencyValue: (obj option -> obj option) option with get, set
/// Optional function to convert a raw (server) value from string to this DataType.
abstract parseRawValue: (obj option -> obj option) option with get, set
type [<AllowNullLiteral>] DataTypeSymbolStatic =
[<EmitConstructor>] abstract Create: unit -> DataTypeSymbol
type [<AllowNullLiteral>] DataType =
inherit Core.IEnum
abstract Binary: DataTypeSymbol with get, set
abstract Boolean: DataTypeSymbol with get, set
abstract Byte: DataTypeSymbol with get, set
abstract DateTime: DataTypeSymbol with get, set
abstract DateTimeOffset: DataTypeSymbol with get, set
abstract Decimal: DataTypeSymbol with get, set
abstract Double: DataTypeSymbol with get, set
abstract Guid: DataTypeSymbol with get, set
abstract Int16: DataTypeSymbol with get, set
abstract Int32: DataTypeSymbol with get, set
abstract Int64: DataTypeSymbol with get, set
abstract Single: DataTypeSymbol with get, set
abstract String: DataTypeSymbol with get, set
abstract Time: DataTypeSymbol with get, set
abstract Undefined: DataTypeSymbol with get, set
abstract constants: {| nextNumber: float; nextNumberIncrement: float; stringPrefix: string |} with get, set
abstract fromEdmDataType: typeName: string -> DataTypeSymbol
abstract fromValue: ``val``: obj option -> DataTypeSymbol
abstract getComparableFn: dataType: DataTypeSymbol -> (obj option -> obj option)
abstract parseDateAsUTC: source: obj option -> DateTime
abstract parseDateFromServer: date: obj option -> DateTime
abstract parseRawValue: ``val``: obj option * ?dataType: DataTypeSymbol -> obj option
abstract parseTimeFromServer: source: obj option -> string
type [<AllowNullLiteral>] EntityActionSymbol =
inherit Core.EnumSymbol
type [<AllowNullLiteral>] EntityActionSymbolStatic =
[<EmitConstructor>] abstract Create: unit -> EntityActionSymbol
type [<AllowNullLiteral>] EntityAction =
inherit Core.IEnum
abstract AcceptChanges: EntityActionSymbol with get, set
abstract Attach: EntityActionSymbol with get, set
abstract AttachOnImport: EntityActionSymbol with get, set
abstract AttachOnQuery: EntityActionSymbol with get, set
abstract Clear: EntityActionSymbol with get, set
abstract Detach: EntityActionSymbol with get, set
abstract EntityStateChange: EntityActionSymbol with get, set
abstract MergeOnImport: EntityActionSymbol with get, set
abstract MergeOnSave: EntityActionSymbol with get, set
abstract MergeOnQuery: EntityActionSymbol with get, set
abstract PropertyChange: EntityActionSymbol with get, set
abstract RejectChanges: EntityActionSymbol with get, set
type [<AllowNullLiteral>] EntityAspect =
abstract entity: Entity with get, set
abstract entityManager: EntityManager with get, set
abstract entityState: EntityStateSymbol with get, set
abstract isBeingSaved: bool with get, set
abstract originalValues: Object with get, set
abstract extraMetadata: Object with get, set
abstract propertyChanged: PropertyChangedEvent with get, set
abstract validationErrorsChanged: ValidationErrorsChangedEvent with get, set
abstract acceptChanges: unit -> unit
abstract addValidationError: validationError: ValidationError -> unit
abstract clearValidationErrors: unit -> unit
abstract getKey: ?forceRefresh: bool -> EntityKey
abstract getValidationErrors: unit -> ResizeArray<ValidationError>
abstract getValidationErrors: property: string -> ResizeArray<ValidationError>
abstract getValidationErrors: property: IProperty -> ResizeArray<ValidationError>
abstract hasValidationErrors: bool with get, set
abstract isNavigationPropertyLoaded: navigationProperty: string -> bool
abstract isNavigationPropertyLoaded: navigationProperty: NavigationProperty -> bool
abstract loadNavigationProperty: navigationProperty: string * ?callback: Function * ?errorCallback: Function -> Promise<QueryResult>
abstract loadNavigationProperty: navigationProperty: NavigationProperty * ?callback: Function * ?errorCallback: Function -> Promise<QueryResult>
abstract rejectChanges: unit -> unit
abstract removeValidationError: validator: Validator -> unit
abstract removeValidationError: validator: Validator * property: DataProperty -> unit
abstract removeValidationError: validator: Validator * property: NavigationProperty -> unit
abstract removeValidationError: validationError: ValidationError -> unit
abstract setAdded: unit -> unit
abstract setDeleted: unit -> unit
abstract setDetached: unit -> unit
abstract setModified: unit -> unit
abstract setUnchanged: unit -> unit
abstract setEntityState: entityState: EntityStateSymbol -> unit
abstract validateEntity: unit -> bool
abstract validateProperty: property: string * ?context: obj -> bool
abstract validateProperty: property: DataProperty * ?context: obj -> bool
abstract validateProperty: property: NavigationProperty * ?context: obj -> bool
type [<AllowNullLiteral>] EntityAspectStatic =
[<EmitConstructor>] abstract Create: unit -> EntityAspect
type [<AllowNullLiteral>] PropertyChangedEventArgs =
abstract entity: Entity with get, set
abstract property: IProperty with get, set
abstract propertyName: string with get, set
abstract oldValue: obj option with get, set
abstract newValue: obj option with get, set
abstract parent: obj option with get, set
type [<AllowNullLiteral>] PropertyChangedEventArgsStatic =
[<EmitConstructor>] abstract Create: unit -> PropertyChangedEventArgs
type [<AllowNullLiteral>] PropertyChangedEvent =
inherit Core.Event
abstract subscribe: ?callback: (PropertyChangedEventArgs -> unit) -> float
type [<AllowNullLiteral>] PropertyChangedEventStatic =
[<EmitConstructor>] abstract Create: name: string * publisher: obj option * ?defaultErrorCallback: ErrorCallback -> PropertyChangedEvent
type [<AllowNullLiteral>] ValidationErrorsChangedEventArgs =
abstract entity: Entity with get, set
abstract added: ResizeArray<ValidationError> with get, set
abstract removed: ResizeArray<ValidationError> with get, set
type [<AllowNullLiteral>] ValidationErrorsChangedEventArgsStatic =
[<EmitConstructor>] abstract Create: unit -> ValidationErrorsChangedEventArgs
type [<AllowNullLiteral>] ValidationErrorsChangedEvent =
inherit Core.Event
abstract subscribe: ?callback: (ValidationErrorsChangedEventArgs -> unit) -> float
type [<AllowNullLiteral>] ValidationErrorsChangedEventStatic =
[<EmitConstructor>] abstract Create: name: string * publisher: obj option * ?defaultErrorCallback: ErrorCallback -> ValidationErrorsChangedEvent
type [<AllowNullLiteral>] EntityKey =
abstract equals: entityKey: EntityKey -> bool
abstract entityType: EntityType with get, set
abstract values: ResizeArray<obj option> with get, set
type [<AllowNullLiteral>] EntityKeyStatic =
[<EmitConstructor>] abstract Create: entityType: EntityType * keyValue: obj option -> EntityKey
[<EmitConstructor>] abstract Create: entityType: EntityType * keyValues: ResizeArray<obj option> -> EntityKey
abstract equals: k1: EntityKey * k2: EntityKey -> bool
type [<AllowNullLiteral>] EntityByKeyResult =
abstract entity: Entity with get, set
abstract entityKey: EntityKey with get, set
abstract fromCache: bool with get, set
type [<AllowNullLiteral>] ExportEntitiesOptions =
abstract asString: bool with get, set
abstract includeMetadata: bool with get, set
type [<AllowNullLiteral>] EntityManager =
abstract dataService: DataService with get, set
abstract keyGeneratorCtor: Function with get, set
abstract metadataStore: MetadataStore with get, set
abstract queryOptions: QueryOptions with get, set
abstract saveOptions: SaveOptions with get, set
abstract serviceName: string with get, set
abstract validationOptions: ValidationOptions with get, set
abstract entityChanged: EntityChangedEvent with get, set
abstract hasChangesChanged: HasChangesChangedEvent with get, set
abstract validationErrorsChanged: ValidationErrorsChangedEvent with get, set
abstract acceptChanges: unit -> unit
abstract addEntity: entity: Entity -> Entity
abstract attachEntity: entity: Entity * ?entityState: EntityStateSymbol * ?mergeStrategy: MergeStrategySymbol -> Entity
abstract clear: unit -> unit
abstract createEmptyCopy: unit -> EntityManager
abstract createEntity: typeName: string * ?config: EntityManagerCreateEntityConfig * ?entityState: EntityStateSymbol * ?mergeStrategy: MergeStrategySymbol -> Entity
abstract createEntity: entityType: EntityType * ?config: EntityManagerCreateEntityConfig_ * ?entityState: EntityStateSymbol * ?mergeStrategy: MergeStrategySymbol -> Entity
abstract detachEntity: entity: Entity -> bool
abstract executeQuery: query: string * ?callback: ExecuteQuerySuccessCallback * ?errorCallback: ExecuteQueryErrorCallback -> Promise<QueryResult>
abstract executeQuery: query: EntityQuery * ?callback: ExecuteQuerySuccessCallback * ?errorCallback: ExecuteQueryErrorCallback -> Promise<QueryResult>
abstract executeQueryLocally: query: EntityQuery -> ResizeArray<Entity>
abstract exportEntities: ?entities: ResizeArray<Entity> * ?includeMetadata: bool -> string
abstract exportEntities: ?entities: ResizeArray<Entity> * ?options: ExportEntitiesOptions -> obj option
abstract fetchEntityByKey: typeName: string * keyValue: obj option * ?checkLocalCacheFirst: bool -> Promise<EntityByKeyResult>
abstract fetchEntityByKey: typeName: string * keyValues: ResizeArray<obj option> * ?checkLocalCacheFirst: bool -> Promise<EntityByKeyResult>
abstract fetchEntityByKey: entityKey: EntityKey -> Promise<EntityByKeyResult>
abstract fetchMetadata: ?callback: (obj option -> unit) * ?errorCallback: Core.ErrorCallback -> Promise<obj option>
abstract generateTempKeyValue: entity: Entity -> obj option
abstract getChanges: unit -> ResizeArray<Entity>
abstract getChanges: entityTypeName: string -> ResizeArray<Entity>
abstract getChanges: entityTypeNames: ResizeArray<string> -> ResizeArray<Entity>
abstract getChanges: entityType: EntityType -> ResizeArray<Entity>
abstract getChanges: entityTypes: ResizeArray<EntityType> -> ResizeArray<Entity>
abstract getEntities: entityTypeName: string * ?entityState: EntityStateSymbol -> ResizeArray<Entity>
abstract getEntities: ?entityTypeNames: ResizeArray<string> * ?entityState: EntityStateSymbol -> ResizeArray<Entity>
abstract getEntities: ?entityTypeName: string * ?entityStates: ResizeArray<EntityStateSymbol> -> ResizeArray<Entity>
abstract getEntities: ?entityTypeNames: ResizeArray<string> * ?entityStates: ResizeArray<EntityStateSymbol> -> ResizeArray<Entity>
abstract getEntities: entityType: EntityType * ?entityState: EntityStateSymbol -> ResizeArray<Entity>
abstract getEntities: ?entityTypes: ResizeArray<EntityType> * ?entityState: EntityStateSymbol -> ResizeArray<Entity>
abstract getEntities: ?entityType: EntityType * ?entityStates: ResizeArray<EntityStateSymbol> -> ResizeArray<Entity>
abstract getEntities: ?entityTypes: ResizeArray<EntityType> * ?entityStates: ResizeArray<EntityStateSymbol> -> ResizeArray<Entity>
abstract getEntityByKey: typeName: string * keyValue: obj option -> Entity
abstract getEntityByKey: typeName: string * keyValues: ResizeArray<obj option> -> Entity
abstract getEntityByKey: entityKey: EntityKey -> Entity
abstract hasChanges: unit -> bool
abstract hasChanges: entityTypeName: string -> bool
abstract hasChanges: entityTypeNames: ResizeArray<string> -> bool
abstract hasChanges: entityType: EntityType -> bool
abstract hasChanges: entityTypes: ResizeArray<EntityType> -> bool
abstract importEntities: exportedString: string * ?config: {| mergeAdds: bool option; mergeStrategy: MergeStrategySymbol option; metadataVersionFn: (obj option -> unit) option |} -> {| entities: ResizeArray<Entity>; tempKeyMapping: EntityManagerImportEntitiesTempKeyMapping |}
abstract importEntities: exportedData: Object * ?config: {| mergeAdds: bool option; mergeStrategy: MergeStrategySymbol option; metadataVersionFn: (obj option -> unit) option |} -> {| entities: ResizeArray<Entity>; tempKeyMapping: EntityManagerImportEntitiesTempKeyMapping |}
abstract rejectChanges: unit -> ResizeArray<Entity>
abstract saveChanges: ?entities: ResizeArray<Entity> * ?saveOptions: SaveOptions * ?callback: SaveChangesSuccessCallback * ?errorCallback: SaveChangesErrorCallback -> Promise<SaveResult>
abstract setProperties: config: EntityManagerProperties -> unit
type [<AllowNullLiteral>] EntityManagerCreateEntityConfig =
interface end
type [<AllowNullLiteral>] EntityManagerCreateEntityConfig_ =
interface end
type [<AllowNullLiteral>] EntityManagerStatic =
[<EmitConstructor>] abstract Create: ?config: EntityManagerOptions -> EntityManager
[<EmitConstructor>] abstract Create: ?config: string -> EntityManager
abstract importEntities: exportedString: string * ?config: {| mergeAdds: bool option; mergeStrategy: MergeStrategySymbol option; metadataVersionFn: (obj option -> unit) option |} -> EntityManager
abstract importEntities: exportedData: Object * ?config: {| mergeAdds: bool option; mergeStrategy: MergeStrategySymbol option; metadataVersionFn: (obj option -> unit) option |} -> EntityManager
type [<AllowNullLiteral>] EntityManagerOptions =
abstract serviceName: string option with get, set
abstract dataService: DataService option with get, set
abstract metadataStore: MetadataStore option with get, set
abstract queryOptions: QueryOptions option with get, set
abstract saveOptions: SaveOptions option with get, set
abstract validationOptions: ValidationOptions option with get, set
abstract keyGeneratorCtor: Function option with get, set
type [<AllowNullLiteral>] EntityManagerProperties =
abstract serviceName: string option with get, set
abstract dataService: DataService option with get, set
abstract metadataStore: MetadataStore option with get, set
abstract queryOptions: QueryOptions option with get, set
abstract saveOptions: SaveOptions option with get, set
abstract validationOptions: ValidationOptions option with get, set
abstract keyGeneratorCtor: Function option with get, set
type [<AllowNullLiteral>] ExecuteQuerySuccessCallback =
[<Emit("$0($1...)")>] abstract Invoke: data: QueryResult -> unit
type [<AllowNullLiteral>] ExecuteQueryErrorCallback =
[<Emit("$0($1...)")>] abstract Invoke: error: ExecuteQueryErrorCallbackInvokeError -> unit
type [<AllowNullLiteral>] ExecuteQueryErrorCallbackInvokeError =
abstract query: EntityQuery with get, set
abstract httpResponse: HttpResponse with get, set
abstract entityManager: EntityManager with get, set
abstract message: string option with get, set
abstract stack: string option with get, set
type [<AllowNullLiteral>] SaveChangesSuccessCallback =
[<Emit("$0($1...)")>] abstract Invoke: saveResult: SaveResult -> unit
type [<AllowNullLiteral>] EntityError =
abstract entity: Entity with get, set
abstract errorMessage: string with get, set
abstract errorName: string with get, set
abstract isServerError: bool with get, set
abstract propertyName: string with get, set
type [<AllowNullLiteral>] SaveChangesErrorCallback =
[<Emit("$0($1...)")>] abstract Invoke: error: SaveChangesErrorCallbackInvokeError -> unit
type [<AllowNullLiteral>] SaveChangesErrorCallbackInvokeError =
abstract entityErrors: ResizeArray<EntityError> with get, set
abstract httpResponse: HttpResponse with get, set
abstract message: string with get, set
abstract stack: string option with get, set
abstract status: float option with get, set
type [<AllowNullLiteral>] EntityChangedEventArgs =
abstract entity: Entity with get, set
abstract entityAction: EntityActionSymbol with get, set
abstract args: Object with get, set
type [<AllowNullLiteral>] EntityChangedEventArgsStatic =
[<EmitConstructor>] abstract Create: unit -> EntityChangedEventArgs
type [<AllowNullLiteral>] EntityChangedEvent =
inherit Core.Event
abstract subscribe: ?callback: (EntityChangedEventArgs -> unit) -> float
type [<AllowNullLiteral>] EntityChangedEventStatic =
[<EmitConstructor>] abstract Create: name: string * publisher: obj option * ?defaultErrorCallback: ErrorCallback -> EntityChangedEvent
type [<AllowNullLiteral>] HasChangesChangedEventArgs =
abstract entityManager: EntityManager with get, set
abstract hasChanges: bool with get, set
type [<AllowNullLiteral>] HasChangesChangedEventArgsStatic =
[<EmitConstructor>] abstract Create: unit -> HasChangesChangedEventArgs
type [<AllowNullLiteral>] HasChangesChangedEvent =
inherit Core.Event
abstract subscribe: ?callback: (HasChangesChangedEventArgs -> unit) -> float
type [<AllowNullLiteral>] HasChangesChangedEventStatic =
[<EmitConstructor>] abstract Create: name: string * publisher: obj option * ?defaultErrorCallback: ErrorCallback -> HasChangesChangedEvent
type [<AllowNullLiteral>] EntityQuery =
abstract entityManager: EntityManager with get, set
abstract orderByClause: OrderByClause with get, set
abstract parameters: Object with get, set
abstract queryOptions: QueryOptions with get, set
abstract resourceName: string with get, set
abstract resultEntityType: EntityType with get, set
abstract skipCount: float with get, set
abstract takeCount: float with get, set
abstract wherePredicate: Predicate with get, set
abstract execute: ?callback: ExecuteQuerySuccessCallback * ?errorCallback: ExecuteQueryErrorCallback -> Promise<QueryResult>
abstract executeLocally: unit -> ResizeArray<Entity>
abstract expand: propertyPaths: ResizeArray<string> -> EntityQuery
abstract expand: propertyPaths: string -> EntityQuery
abstract from: resourceName: string -> EntityQuery
abstract inlineCount: ?enabled: bool -> EntityQuery
abstract noTracking: ?enabled: bool -> EntityQuery
abstract orderBy: propertyPaths: string * ?isDescending: bool -> EntityQuery
abstract orderBy: propertyPaths: ResizeArray<string> * ?isDescending: bool -> EntityQuery
abstract orderByDesc: propertyPaths: string -> EntityQuery
abstract orderByDesc: propertyPaths: ResizeArray<string> -> EntityQuery
abstract select: propertyPaths: string -> EntityQuery
abstract select: propertyPaths: ResizeArray<string> -> EntityQuery
abstract skip: count: float -> EntityQuery
abstract take: count: float -> EntityQuery
abstract top: count: float -> EntityQuery
abstract toType: typeName: string -> EntityQuery
abstract toType: ``type``: EntityType -> EntityQuery
abstract using: obj: EntityManager -> EntityQuery
abstract using: obj: DataService -> EntityQuery
abstract using: obj: JsonResultsAdapter -> EntityQuery
abstract using: obj: QueryOptions -> EntityQuery
abstract using: obj: MergeStrategySymbol -> EntityQuery
abstract using: obj: FetchStrategySymbol -> EntityQuery
abstract where: predicate: Predicate -> EntityQuery
abstract where: property: string * operator: string * value: obj option -> EntityQuery
abstract where: property: string * operator: FilterQueryOpSymbol * value: obj option -> EntityQuery
abstract where: property: string * filterop: FilterQueryOpSymbol * property2: string * filterop2: FilterQueryOpSymbol * value: obj option -> EntityQuery
abstract where: property: string * filterop: string * property2: string * filterop2: string * value: obj option -> EntityQuery
abstract where: predicate: FilterQueryOpSymbol -> EntityQuery
abstract where: anArray: IRecursiveArray<U4<string, float, FilterQueryOpSymbol, Predicate>> -> EntityQuery
abstract withParameters: ``params``: Object -> EntityQuery
abstract toJSON: unit -> string
type [<AllowNullLiteral>] EntityQueryStatic =
[<EmitConstructor>] abstract Create: ?resourceName: string -> EntityQuery
/// Create query from an expression tree
[<EmitConstructor>] abstract Create: tree: Object -> EntityQuery
abstract from: resourceName: string -> EntityQuery
abstract fromEntities: entity: Entity -> EntityQuery
abstract fromEntities: entities: ResizeArray<Entity> -> EntityQuery
abstract fromEntityKey: entityKey: EntityKey -> EntityQuery
abstract fromEntityNavigation: entity: Entity * navigationProperty: NavigationProperty -> EntityQuery
type [<AllowNullLiteral>] OrderByClause =
interface end
type [<AllowNullLiteral>] EntityStateSymbol =
inherit Core.EnumSymbol
abstract isAdded: unit -> bool
abstract isAddedModifiedOrDeleted: unit -> bool
abstract isDeleted: unit -> bool
abstract isDetached: unit -> bool
abstract isModified: unit -> bool
abstract isUnchanged: unit -> bool
abstract isUnchangedOrModified: unit -> bool
type [<AllowNullLiteral>] EntityStateSymbolStatic =
[<EmitConstructor>] abstract Create: unit -> EntityStateSymbol
type [<AllowNullLiteral>] EntityState =
inherit Core.IEnum
abstract Added: EntityStateSymbol with get, set
abstract Deleted: EntityStateSymbol with get, set
abstract Detached: EntityStateSymbol with get, set
abstract Modified: EntityStateSymbol with get, set
abstract Unchanged: EntityStateSymbol with get, set
type [<AllowNullLiteral>] EntityType =
inherit IStructuralType
abstract autoGeneratedKeyType: AutoGeneratedKeyType with get, set
abstract baseEntityType: EntityType with get, set
abstract complexProperties: ResizeArray<DataProperty> with get, set
abstract concurrencyProperties: ResizeArray<DataProperty> with get, set
abstract dataProperties: ResizeArray<DataProperty> with get, set
abstract defaultResourceName: string with get, set
abstract foreignKeyProperties: ResizeArray<DataProperty> with get, set
abstract isAbstract: bool with get, set
abstract keyProperties: ResizeArray<DataProperty> with get, set
abstract metadataStore: MetadataStore with get, set
abstract name: string with get, set
abstract ``namespace``: string with get, set
abstract navigationProperties: ResizeArray<NavigationProperty> with get, set
abstract shortName: string with get, set
abstract unmappedProperties: ResizeArray<DataProperty> with get, set
abstract validators: ResizeArray<Validator> with get, set
abstract custom: obj option with get, set
abstract addProperty: property: IProperty -> unit
abstract addValidator: validator: Validator * ?property: IProperty -> unit
abstract createEntity: ?initialValues: Object -> Entity
abstract getCtor: unit -> Function
abstract getDataProperty: propertyName: string -> DataProperty
abstract getNavigationProperty: propertyName: string -> NavigationProperty
abstract getProperties: unit -> ResizeArray<IProperty>
abstract getProperty: propertyPath: string * ?throwIfNotFound: bool -> IProperty
abstract getPropertyNames: unit -> ResizeArray<string>
abstract getSelfAndSubtypes: unit -> ResizeArray<EntityType>
abstract isSubtypeOf: entityType: EntityType -> bool
abstract setProperties: config: EntityTypeProperties -> unit
abstract toString: unit -> string
type [<AllowNullLiteral>] EntityTypeStatic =
[<EmitConstructor>] abstract Create: config: MetadataStore -> EntityType
[<EmitConstructor>] abstract Create: config: EntityTypeOptions -> EntityType
type [<AllowNullLiteral>] EntityTypeOptions =
abstract shortName: string option with get, set
abstract ``namespace``: string option with get, set
abstract autoGeneratedKeyType: AutoGeneratedKeyType option with get, set
abstract defaultResourceName: string option with get, set
abstract dataProperties: ResizeArray<DataProperty> option with get, set
abstract navigationProperties: ResizeArray<NavigationProperty> option with get, set
type [<AllowNullLiteral>] EntityTypeProperties =
abstract autoGeneratedKeyType: AutoGeneratedKeyType option with get, set
abstract defaultResourceName: string option with get, set
abstract serializerFn: (DataProperty -> obj option -> obj option) option with get, set
type [<AllowNullLiteral>] FetchStrategySymbol =
inherit Core.EnumSymbol
type [<AllowNullLiteral>] FetchStrategySymbolStatic =
[<EmitConstructor>] abstract Create: unit -> FetchStrategySymbol
type [<AllowNullLiteral>] FetchStrategy =
inherit Core.IEnum
abstract FromLocalCache: FetchStrategySymbol with get, set
abstract FromServer: FetchStrategySymbol with get, set
type [<AllowNullLiteral>] FilterQueryOpSymbol =
inherit Core.EnumSymbol
type [<AllowNullLiteral>] FilterQueryOpSymbolStatic =
[<EmitConstructor>] abstract Create: unit -> FilterQueryOpSymbol
type [<AllowNullLiteral>] FilterQueryOp =
inherit Core.IEnum
abstract Contains: FilterQueryOpSymbol with get, set
abstract EndsWith: FilterQueryOpSymbol with get, set
abstract Equals: FilterQueryOpSymbol with get, set
abstract GreaterThan: FilterQueryOpSymbol with get, set
abstract GreaterThanOrEqual: FilterQueryOpSymbol with get, set
abstract IsTypeOf: FilterQueryOpSymbol with get, set
abstract LessThan: FilterQueryOpSymbol with get, set
abstract LessThanOrEqual: FilterQueryOpSymbol with get, set
abstract NotEquals: FilterQueryOpSymbol with get, set
abstract StartsWith: FilterQueryOpSymbol with get, set
abstract Any: FilterQueryOpSymbol with get, set
abstract All: FilterQueryOpSymbol with get, set
type [<AllowNullLiteral>] LocalQueryComparisonOptions =
abstract setAsDefault: unit -> unit
type [<AllowNullLiteral>] LocalQueryComparisonOptionsStatic =
abstract caseInsensitiveSQL: LocalQueryComparisonOptions with get, set
abstract defaultInstance: LocalQueryComparisonOptions with get, set
[<EmitConstructor>] abstract Create: config: {| name: string option; isCaseSensitive: bool option; usesSql92CompliantStringComparison: bool option |} -> LocalQueryComparisonOptions
type [<AllowNullLiteral>] MergeStrategySymbol =
inherit Core.EnumSymbol
type [<AllowNullLiteral>] MergeStrategySymbolStatic =
[<EmitConstructor>] abstract Create: unit -> MergeStrategySymbol
type [<AllowNullLiteral>] MergeStrategy =
inherit Core.IEnum
abstract OverwriteChanges: MergeStrategySymbol with get, set
abstract PreserveChanges: MergeStrategySymbol with get, set
abstract SkipMerge: MergeStrategySymbol with get, set
abstract Disallowed: MergeStrategySymbol with get, set
type [<AllowNullLiteral>] MetadataStore =
abstract namingConvention: NamingConvention with get, set
abstract addDataService: dataService: DataService * ?shouldOverwrite: bool -> unit
abstract addEntityType: structuralType: U2<EntityType, ComplexType> -> unit
abstract exportMetadata: unit -> string
abstract fetchMetadata: dataService: string * ?callback: (obj option -> unit) * ?errorCallback: Core.ErrorCallback -> Promise<obj option>
abstract fetchMetadata: dataService: DataService * ?callback: (obj option -> unit) * ?errorCallback: Core.ErrorCallback -> Promise<obj option>
abstract getDataService: serviceName: string -> DataService
abstract getEntityType: entityTypeName: string * ?okIfNotFound: bool -> U2<EntityType, ComplexType>
abstract getEntityTypes: unit -> ResizeArray<U2<EntityType, ComplexType>>
abstract hasMetadataFor: serviceName: string -> bool
abstract importMetadata: exportedString: string * ?allowMerge: bool -> MetadataStore
abstract isEmpty: unit -> bool
abstract registerEntityTypeCtor: entityTypeName: string * entityCtor: Function * ?initializationFn: (Entity -> unit) * ?noTrackingFn: (Object -> EntityType -> Object) -> unit
abstract trackUnmappedType: entityCtor: Function * ?interceptor: Function -> unit
abstract setEntityTypeForResourceName: resourceName: string * entityType: EntityType -> unit
abstract setEntityTypeForResourceName: resourceName: string * entityTypeName: string -> unit
abstract getEntityTypeNameForResourceName: resourceName: string -> string
abstract setProperties: config: {| name: string option; serializerFn: Function option |} -> unit
type [<AllowNullLiteral>] MetadataStoreStatic =
[<EmitConstructor>] abstract Create: unit -> MetadataStore
[<EmitConstructor>] abstract Create: ?config: MetadataStoreOptions -> MetadataStore
abstract importMetadata: exportedString: string -> MetadataStore
abstract normalizeTypeName: typeName: string -> string
type [<AllowNullLiteral>] MetadataStoreOptions =
abstract namingConvention: NamingConvention option with get, set
abstract localQueryComparisonOptions: LocalQueryComparisonOptions option with get, set
type [<AllowNullLiteral>] NamingConvention =
abstract clientPropertyNameToServer: clientPropertyName: string -> string
abstract clientPropertyNameToServer: clientPropertyName: string * property: IProperty -> string
abstract serverPropertyNameToClient: serverPropertyName: string -> string
abstract serverPropertyNameToClient: serverPropertyName: string * property: IProperty -> string
abstract setAsDefault: unit -> NamingConvention
type [<AllowNullLiteral>] NamingConventionStatic =
abstract camelCase: NamingConvention with get, set
abstract defaultInstance: NamingConvention with get, set
abstract none: NamingConvention with get, set
[<EmitConstructor>] abstract Create: config: NamingConventionOptions -> NamingConvention
type [<AllowNullLiteral>] NamingConventionOptions =
abstract serverPropertyNameToClient: (string -> string) option with get, set
abstract clientPropertyNameToServer: (string -> string) option with get, set
type [<AllowNullLiteral>] NavigationProperty =
inherit IProperty
abstract associationName: string with get, set
abstract entityType: EntityType with get, set
abstract foreignKeyNames: ResizeArray<string> with get, set
abstract inverse: NavigationProperty with get, set
abstract isDataProperty: bool with get, set
abstract isNavigationProperty: bool with get, set
abstract isScalar: bool with get, set
abstract name: string with get, set
abstract nameOnServer: string with get, set
abstract displayName: string with get, set
abstract parentType: U2<EntityType, ComplexType> with get, set
abstract relatedDataProperties: ResizeArray<DataProperty> with get, set
abstract validators: ResizeArray<Validator> with get, set
abstract invForeignKeyNames: ResizeArray<string> option with get, set
abstract invForeignKeyNamesOnServer: ResizeArray<string> option with get, set
abstract custom: obj option with get, set
type [<AllowNullLiteral>] NavigationPropertyStatic =
[<EmitConstructor>] abstract Create: config: NavigationPropertyOptions -> NavigationProperty
type [<AllowNullLiteral>] NavigationPropertyOptions =
abstract name: string option with get, set
abstract nameOnServer: string option with get, set
abstract entityTypeName: string with get, set
abstract isScalar: bool option with get, set
abstract associationName: string option with get, set
abstract foreignKeyNames: ResizeArray<string> option with get, set
abstract foreignKeyNamesOnServer: ResizeArray<string> option with get, set
abstract validators: ResizeArray<Validator> option with get, set
abstract invForeignKeyNames: ResizeArray<string> option with get, set
abstract invForeignKeyNamesOnServer: ResizeArray<string> option with get, set
type [<AllowNullLiteral>] IRecursiveArray<'T> =
[<EmitIndexer>] abstract Item: i: float -> U2<'T, IRecursiveArray<'T>> with get, set
type [<AllowNullLiteral>] Predicate =
abstract ``and``: PredicateMethod with get, set
abstract not: unit -> Predicate
abstract ``or``: PredicateMethod with get, set
abstract toFunction: unit -> Function
abstract toString: unit -> string
abstract validate: entityType: EntityType -> unit
abstract toJSON: unit -> string
type [<AllowNullLiteral>] PredicateStatic =
[<EmitConstructor>] abstract Create: unit -> Predicate
[<EmitConstructor>] abstract Create: property: string * operator: string * value: obj option -> Predicate
[<EmitConstructor>] abstract Create: property: string * operator: FilterQueryOpSymbol * value: obj option -> Predicate
[<EmitConstructor>] abstract Create: property: string * operator: string * value: {| value: obj option; isLiteral: bool option; dataType: DataType option |} -> Predicate
[<EmitConstructor>] abstract Create: property: string * operator: FilterQueryOpSymbol * value: {| value: obj option; isLiteral: bool option; dataType: DataType option |} -> Predicate
[<EmitConstructor>] abstract Create: property: string * filterop: FilterQueryOpSymbol * property2: string * filterop2: FilterQueryOpSymbol * value: obj option -> Predicate
[<EmitConstructor>] abstract Create: property: string * filterop: string * property2: string * filterop2: string * value: obj option -> Predicate
[<EmitConstructor>] abstract Create: passthru: string -> Predicate
[<EmitConstructor>] abstract Create: predicate: Predicate -> Predicate
[<EmitConstructor>] abstract Create: anArray: IRecursiveArray<U4<string, float, FilterQueryOpSymbol, Predicate>> -> Predicate
abstract ``and``: PredicateMethod with get, set
abstract create: PredicateMethod with get, set
abstract isPredicate: o: obj option -> bool
abstract not: predicate: Predicate -> Predicate
abstract ``or``: PredicateMethod with get, set
type [<AllowNullLiteral>] PredicateMethod =
[<Emit("$0($1...)")>] abstract Invoke: predicates: ResizeArray<Predicate> -> Predicate
[<Emit("$0($1...)")>] abstract Invoke: [<ParamArray>] predicates: Predicate[] -> Predicate
[<Emit("$0($1...)")>] abstract Invoke: property: string * operator: string * value: obj option * ?valueIsLiteral: bool -> Predicate
[<Emit("$0($1...)")>] abstract Invoke: property: string * operator: FilterQueryOpSymbol * value: obj option * ?valueIsLiteral: bool -> Predicate
[<Emit("$0($1...)")>] abstract Invoke: property: string * filterop: FilterQueryOpSymbol * property2: string * filterop2: FilterQueryOpSymbol * value: obj option -> Predicate
[<Emit("$0($1...)")>] abstract Invoke: property: string * filterop: string * property2: string * filterop2: string * value: obj option -> Predicate
type [<AllowNullLiteral>] QueryOptions =
abstract fetchStrategy: FetchStrategySymbol with get, set
abstract mergeStrategy: MergeStrategySymbol with get, set
/// Whether query should return cached deleted entities (false by default)
abstract includeDeleted: bool with get, set
abstract setAsDefault: unit -> unit
abstract using: config: QueryOptionsConfiguration -> QueryOptions
abstract using: config: MergeStrategySymbol -> QueryOptions
abstract using: config: FetchStrategySymbol -> QueryOptions
type [<AllowNullLiteral>] QueryOptionsStatic =
abstract defaultInstance: QueryOptions with get, set
[<EmitConstructor>] abstract Create: ?config: QueryOptionsConfiguration -> QueryOptions
type [<AllowNullLiteral>] QueryOptionsConfiguration =
abstract fetchStrategy: FetchStrategySymbol option with get, set
abstract mergeStrategy: MergeStrategySymbol option with get, set
type [<AllowNullLiteral>] HttpResponse =
abstract config: obj option with get, set
abstract data: ResizeArray<Entity> with get, set
abstract error: obj option with get, set
abstract saveContext: obj option with get, set
abstract status: float with get, set
abstract getHeaders: headerName: string -> string
type [<AllowNullLiteral>] QueryResult =
/// Top level entities returned
abstract results: ResizeArray<Entity> with get, set
/// Query that was executed
abstract query: EntityQuery with get, set
/// Raw response from the server
abstract httpResponse: HttpResponse with get, set
/// EntityManager that executed the query
abstract entityManager: EntityManager option with get, set
/// Total number of results available on the server
abstract inlineCount: float option with get, set
/// All entities returned by the query. Differs from results when an expand is used.
abstract retrievedEntities: ResizeArray<Entity> option with get, set
type [<AllowNullLiteral>] SaveOptions =
abstract allowConcurrentSaves: bool with get, set
abstract resourceName: string with get, set
abstract dataService: DataService with get, set
abstract tag: Object with get, set
abstract setAsDefault: unit -> SaveOptions
abstract using: config: SaveOptionsConfiguration -> SaveOptions
type [<AllowNullLiteral>] SaveOptionsStatic =
abstract defaultInstance: SaveOptions with get, set
[<EmitConstructor>] abstract Create: ?config: {| allowConcurrentSaves: bool option; resourceName: string option; dataService: DataService option; tag: obj option |} -> SaveOptions
type [<AllowNullLiteral>] SaveOptionsConfiguration =
abstract allowConcurrentSaves: bool option with get, set
abstract resourceName: string option with get, set
abstract dataService: DataService option with get, set
abstract tag: Object option with get, set
type [<AllowNullLiteral>] SaveResult =
abstract entities: ResizeArray<Entity> with get, set