forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
microsoft-sdk-soap.d.ts
2970 lines (2569 loc) · 88.9 KB
/
microsoft-sdk-soap.d.ts
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
// Type definitions for Sdk.Soap.js
// Project: https://code.msdn.microsoft.com/SdkSoapjs-9b51b99a
// Definitions by: Markus Mauch <https://github.com/markusmauch/>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference path="../q/Q.d.ts"/>
declare namespace Sdk
{
interface IEntityView
{
attributes: AttributeCollection;
entityState: EntityState;
id: string;
logicalName: string;
relatedEntities: RelatedEntityCollection;
}
interface IEntityCollectionView
{
entityName: string;
entities: Array<IEntityView>;
minActiveRowVersion: string;
moreRecords: boolean;
pagingCookie: string;
totalRecordCount: number;
totalRecordCountLimitExceeded: boolean;
}
interface IEntityReferenceView
{
Id: string;
Type: string;
Name: string;
}
interface IEntityReferenceCollectionView extends Array<IEntityReferenceView>
{
}
class Q
{
/**
* Creates a link between records.
* @param entityName The logical name of the entity that is specified in the entityId parameter.
* @param entityId The ID of the record to which the related records are associated.
* @param relationship The name of the relationship to be used to create the link.
* @param relatedEntities A collection of Sdk.EntityReference objects to be associated.
*/
static associate( entityName: string, entityId: string, relationship: string, relatedEntities: Sdk.Collection<Sdk.EntityReference> ): Q.Promise<void>;
/**
* Creates an entity record and returns a string representation of the GUID value that is the Id of the created entity.
* @param entity An entity instance.
*/
static create( entity: Sdk.Entity ): Q.Promise<string>;
/**
* Deletes an entity record
* @param entityName The LogicalName of the entity to delete.
* @param id An ID of the record to delete.
*/
static del( entityName: string, id: string ): Q.Promise<void>;
/**
* Removes a link between records.
* @param entityName The logical name of the entity that is specified in the entityId parameter.
* @param entityId The ID of the record to which the related records are disassociated.
* @param relationship The name of the relationship to be used to remove the link.
* @param relatedEntities A collection of Sdk.EntityReference objects to be disassociated.
*/
static disassociate( entityName: string, entityId: string, relationship: string, relatedEntities: Sdk.Collection<Sdk.EntityReference> ): Q.Promise<void>;
/**
* Executes a SOAP Request using the SOAPAction Execute.
* @param request A request object.
*/
static execute( request: Sdk.OrganizationRequest ): Q.Promise<OrganizationResponse>;
/**
* Retrieves an entity instance.
* @param entityName The logical name of the entity to retrieve.
* @param id The id of the entity to retrieve.
* @param columnSet The columns of the entities to retrieve.
*/
static retrieve( entityName: string, id: string, columnSet: Sdk.ColumnSet ): Q.Promise<Entity>;
/**
* Retrieves the results of a query
* @param query An Sdk.Query.QueryByAttribute query.
*/
static retrieveMultiple( query: Sdk.Query.QueryByAttribute ): Q.Promise<Sdk.EntityCollection>;
/**
* Retrieves the results of a query
* @param query An Sdk.Query.QueryExpression query.
*/
static retrieveMultiple( query: Sdk.Query.QueryExpression ): Q.Promise<Sdk.EntityCollection>;
/**
* Retrieves the results of a query
* @param query An Sdk.Query.FetchExpression query.
*/
static retrieveMultiple( query: Sdk.Query.FetchExpression ): Q.Promise<Sdk.EntityCollection>;
/**
* Updates an entity instance.
* @param entity An entity instance to update.
*/
static update( entity: Entity ): Q.Promise<boolean>;
}
class ColumnSet
{
/**
* Specifies the attributes for which non- null values are returned from a query.
* @param columns Comma separated string values for attribute logical names.
*/
constructor( ...columns: string[] );
/**
* Specifies the attributes for which non- null values are returned from a query.
* @param columns An array of string values.
*/
constructor( columns: string[] );
/**
* Specifies the attributes for which non- null values are returned from a query.
* @param allColumns If Boolean true value is passed as the first parameter all columns will be included. (Not recommended for production code).
*/
constructor( allColumns: boolean );
/**
* Gets the collection of column names.
* @returns The collection of column names.
*/
getColumns(): Sdk.Collection<string>;
/**
* Adds a column to the collection.
* @param column The logical name of the attribute to add.
*/
addColumn( column: string ): void;
/**
* Adds a string array of column names.
* @param columns A string array of column names.
*/
addColumns( columns: Array<string> ): void;
/**
* Sets the AllColumns property.
* @params allColumns A boolean value.
*/
setAllColumns( allColumns: boolean ): void;
/**
* Whether all columns will be returned.
*/
getAllColumns(): boolean;
/**
* Gets the number of columns.
*/
getCount(): number;
/// prototype methods
/**
* Removes a column from the ColumnSet.
* @param columnName The logical name of an attribute to be removed from the ColumnSet.
* @param errorIfNotFound Whether to throw an error when the column to remove is not found. The default is false
*/
removeColumn( columnName: string, errorIfNotFound?: boolean ): void;
/**
* The XML node with "<d:columnSet>" as the root element.
*/
toXml(): string;
/**
* XML nodes for columnSet properties.
*/
toValueXml(): string;
}
class ValueType
{
}
class Collection<T>
{
/**
* A Collection for a specified type.
* @param type The function that specifies the type.
* @param items An array of items to add to the collection.
*/
constructor( type: T, items?: Array<T> );
/**
* Gets the type defined for the collection.
*/
getType(): T;
/**
* Adds an item to the collection.
* @param item An item to add to the collection.
*/
add( item: T ): void;
/**
* Adds an array of objects to the collection.
* @param items An array of items to add to the collection.
*/
addRange( items: any[] ): void;
/**
* Removes all items from the collection.
*/
clear(): void;
/**
* Returns whether an object exists within the collection.
* @param item The item to search in the collection.
*/
contains( item: T ): boolean;
/**
* Returns whether an object exists within the collection.
* @param predicate A comparer function which is invoked for each item of the collection.
*/
contains( predicate: ( item: T ) => boolean ): boolean;
/**
* Returns an Sdk.Collection that contains all the items of this collection that satisfy the specified predicate function.
* @param predicate A predicate function that takes a collection item as argument and returns a boolean.
*/
select( predicate: ( item: T ) => boolean ): Collection<T>;
/**
* Applies the action contained within a delegate function.
* @param fn Delegate function with parameters for item and index.
*/
forEach( fn: ( item: T, index: number ) => any ): void;
/**
* Gets the item in the collection at the specified index.
* @param index The index of the item to return.
*/
getByIndex( index: number ): T;
/**
* Removes an item from the collection.
* @param item A reference to the item to be removed.
*/
remove( item: T ): void;
/**
* Gets a copy of the array of items in the collection.
*/
toArray(): Array<T>;
/**
* Returns the number of items in the collection.
*/
getCount(): number;
}
class EntityCollection
{
/**
* Contains a collection of entity instances.
* @param entities Initializes a new instance of the EntityCollection class setting the Sdk.Collection of Sdk.Entity objects.
*/
constructor( entities: Sdk.Collection<Sdk.Entity> );
/**
* Adds an entity to the collection.
* @param entity
*/
addEntity( entity: Sdk.Entity ): void;
/**
* Gets the collection of entities.
*/
getEntities(): Sdk.Collection<Sdk.Entity>;
/**
* Gets an entity in the collection.
* @param index The index of the entity in the collection.
*/
getEntity( index: number ): Sdk.Entity;
/**
* Gets an entity in the collection.
* @param id The id of the entity in the collection.
*/
getEntity( id: Sdk.Guid ): Sdk.Entity;
/**
* Sets an item in the collection.
* @param index The index of the entity in the collection.
* @param value The Sdk.Entity value to set.
*/
setEntity( index: number, value: Sdk.Entity ): void;
/**
* Sets an item in the collection.
* @param id The Sdk.Guid id of the entity in the collection.
* @param value The Sdk.Entity value to set.
*/
setEntity( id: Sdk.Guid, value: Sdk.Entity ): void;
/**
* Gets the logical name of the entity.
*/
getEntityName(): string;
/**
* Sets the logical name of the entity.
* @param name The logical name of the entity.
*/
setEntityName( name: string ): void;
/**
* Gets the lowest active row version value.
*/
getMinActiveRowVersion(): string;
/**
* Sets the lowest active row version value.
* @param minActiveRowVersion The lowest active row version value.
*/
setMinActiveRowVersion( minActiveRowVersion: string ): void;
/**
* Gets whether there are more records available.
*/
getMoreRecords(): boolean;
/**
* Sets whether there are more records available.
* @param moreRecords Whether there are more records available.
*/
setMoreRecords( moreRecords: boolean ): void;
/**
* Gets the current paging information.
*/
getPagingCookie(): string;
/**
* Sets the current paging information.
* @param pagingCookie The current paging information.
*/
setPagingCookie( pagingCookie: string ): void;
/**
* Gets the total number of records in the collection if ReturnTotalRecordCount was true when the query was executed.
*/
getTotalRecordCount(): number;
/**
* Sets the total number of records in the collection if ReturnTotalRecordCount was true when the query was executed.
* @param totalRecordCount The total number of records in the collection if ReturnTotalRecordCount was true when the query was executed.
*/
setTotalRecordCount( totalRecordCount: number ): void;
/**
* Gets whether the results of the query exceeds the total record count.
*/
getTotalRecordCountLimitExceeded(): boolean;
/**
* Sets whether the results of the query exceeds the total record count.
* @param totalRecordCountLimitExceeded Whether the results of the query exceeds the total record count.
*/
setTotalRecordCountLimitExceeded( totalRecordCountLimitExceeded: boolean ): void;
/**
* XML definition of an the child nodes of an entity.
*/
toValueXml(): string;
/**
* Returns a view of the entity collection
*/
view(): IEntityCollectionView;
}
class EntityReferenceCollection
{
/**
* Contains a collection of EntityReference instances.
* @param entityReferences Initializes a new instance of the EntityReferenceCollection class setting the Sdk.Collection of Sdk.EntityReference objects.
*/
constructor( entityReferences?: Sdk.Collection<EntityReference> );
/**
* Gets the collection of entity references.
*/
getEntityReferences(): Sdk.Collection<EntityReference>;
/**
* Sets the collection of entity references.
* @param entityReferences The entity references
*/
setEntityReferences( entityReferences: Sdk.Collection<EntityReference> ): void;
/// prototype methods
/**
* Removes an entity reference to the collection.
* @param entityReference The entity reference to remove.
*/
remove( entityReference: Sdk.EntityReference ): void;
/**
* Returns a view of the data in an entity reference collection instance.
*/
view(): IEntityReferenceCollectionView;
/**
* Returns the values of serialized entity reference collection as XML nodes.
*/
toValueXml(): string;
}
class RelatedEntityCollection extends EntityCollection
{
}
class AttributeCollection extends Collection<AttributeBase>
{
constructor();
/**
* Adds an attribute to the Attribute Collection.
* @param attribute The attribute to add.
* @param isChanged Override the the attribute IsChanged value.
*/
add( attribute: AttributeBase, isChanged?: boolean ): void;
/**
* Gets the attributes in the collection.
*/
getAttributes(): Collection<AttributeBase>;
/// prototype methods
/**
* Allows for a delegate function to be applied to each attribute in the collection.
* @param fm The function to be applied. Function should have parameters for the attribute and the iterator i.e.: '(att,i)'
*/
forEach( fn: ( attribute: AttributeBase, index: number ) => any ): void;
/**
* Returns all attributes in the collection.
*/
get(): Sdk.Collection<AttributeBase>;
/**
* Returns the attribute with matching name.
* @param attribuetName
*/
get( attribuetName: string ): AttributeBase;
/**
* Returns the attribute with matching index.
* @param attribuetName
*/
get( index: number ): AttributeBase;
/**
* Gets an attribute at a given index.
* @param index The index.
*/
getAttributeByIndex( index: number ): AttributeBase;
/**
* Gets an attribute with a given name.
* @param name The Logical name of the attribute.
*/
getAttributeByName( name: string ): AttributeBase;
/**
* Gets an array of the names of attributes in a collection.
*/
getNames(): Array<string>;
/**
* The XML for an attribute collection.
*/
toXml( action: string ): string;
}
class FormattedValueCollection
{
}
class RelatedEntitiesCollection
{
}
class AttributeBase
{
/**
* Gets whether the value of the attribute has changed.
*/
getIsChanged(): boolean;
/**
* Gets the logical name of the attribute.
*/
getName(): string;
/**
* Gets the value type of the attribute.
*/
getType(): Sdk.ValueType;
/**
* Gets the value of the attribute.
* The type of value depends on the type of attribute.
*/
getValue(): any;
/**
* Whether the value of the attribute is set.
*/
isValueSet(): boolean;
/**
* Sets whether the value of the attribute has changed.
* @param isChanged Whether the value of the attribute has changed.
*/
setIsChanged( isChanged: boolean ): void;
/**
* Sets the name of the attribute
* @param name The name of the attribute.
*/
setName( name: string ): void;
/**
* For internal use only.
* @param type The type of the attribute.
*/
setType( type: Sdk.ValueType ): void;
/**
* Sets the general value of the attribute
* @param name The value of the attribute.
*/
setValue( value: any ): void;
/// prototype methods
/**
* XML node for Attribute.
*/
toXml( action: string ): string;
}
class Boolean extends AttributeBase
{
/**
* A Boolean Attribute.
* @param name The logical name of the attribute .
* @param value The value of the managed property.
*/
constructor( name: string, value?: boolean )
/**
* Gets the value of a Boolean attribute.
*/
getValue(): boolean;
/**
* Sets the value of a Boolean attribute.
* @param value
*/
setValue( value: boolean ): void;
}
class DateTime extends AttributeBase
{
/**
* A DateTime Attribute.
* @param name The logical name of the attribute.
* @param value The value of the attribute.
*/
constructor( name: string, value?: Date );
/**
* Gets the value of a DateTime attribute.
*/
getValue(): Date;
/**
* Sets the value of a DateTime attribute.
* @param value The value to set.
*/
setValue( value: Date ): void;
}
class Decimal extends AttributeBase
{
/**
* A Decimal Attribute.
* @param name The logical name of the attribute.
* @param value The value of the attribute.
*/
constructor( name: string, value?: number );
/**
* Gets the value of a Decimal attribute.
*/
getValue(): number;
/**
* Sets the value of a Decimal attribute.
* @param value The value to set.
*/
setValue( value: number ): void;
}
class Double
{
/**
* A Double Attribute.
* @param name The logical name of the attribute.
* @param value The value of the attribute.
*/
constructor( name: string, value?: number );
/**
* Gets the value of a Double attribute.
*/
getValue(): number;
/**
* Sets the value of a Double attribute.
* @param value The value to set.
*/
setValue( value: number ): void;
}
class Guid extends AttributeBase
{
/**
* A Guid Attribute.
* @param name The logical name of the attribute.
* @param value" The value of the attribute
*/
constructor( name: string, value?: string );
/**
* Gets the value of a Guid attribute.
*/
getValue(): string;
/**
* Sets the value of a Guid attribute.
* @param value The value to set.
*/
setValue( value: string ): void;
}
class Int extends AttributeBase
{
/**
* An Integer Attribute.
* @param name The logical name of the attribute.
* @param value The value of the attribute.
*/
constructor( name: string, value?: number );
/**
* Gets the value of an Integer attribute.
*/
getValue(): number;
/**
* Sets the value of an Integer attribute.
* @param value The value to set.
*/
setValue( value: number ): void;
}
class Long extends AttributeBase
{
/**
* A Long Attribute.
* @param name The logical name of the attribute.
* @param value The value of the attribute.
*/
constructor( name: string, value?: number );
/**
* Gets the value of a Long attribute.
*/
getValue(): number;
/**
* Sets the value of a Long attribute.
* @param value The value to set.
*/
setValue( value: number ): void;
}
class Lookup extends AttributeBase
{
/**
* A Lookup Attribute.
* @param name The logical name of the attribute.
* @param value The value of the attribute.
*/
constructor( name: string, value?: EntityReference );
/**
* Gets the value of a Lookup attribute.
*/
getValue(): EntityReference;
/**
* Sets the value of a Lookup attribute.
* @param value The value to set.
*/
setValue( value: EntityReference ): void;
}
class Money extends AttributeBase
{
/**
* A Money Attribute.
* @param name The logical name of the attribute.
* @param value The value of the attribute.
*/
constructor( name: string, value?: number );
/**
* Gets the value of a Money attribute.
*/
getValue(): number;
/**
* Sets the value of a Money attribute.
* @param value The value to set.
*/
setValue( value: number ): void;
}
class OptionSet extends AttributeBase
{
/**
* An OptionSet Attribute.
* @param name The logical name of the attribute.
* @param value The value of the attribute.
*/
constructor( name: string, value?: number );
/**
* Gets the value of a OptionSet attribute.
*/
getValue(): number;
/**
* Sets the value of an OptionSet attribute.
* @param value The value to set.
*/
setValue( value: number ): void;
}
class PartyList extends AttributeBase
{
/**
* A PartyList Attribute.
* @param name The logical name of the attribute.
* @param value The value of the attribute.
*/
constructor( name: string, value?: EntityCollection );
/**
* Gets the value of a PartyList attribute.
*/
getValue(): EntityCollection;
/**
* Sets the value of a PartyList attribute.
* @param value The value to set.
*/
setValue( value: EntityCollection ): void;
}
class String extends AttributeBase
{
/**
* A String Attribute.
* @param name The logical name of the attribute.
* @param value The value of the attribute.
*/
constructor( name: string, value?: string );
/**
* Gets the value of a String attribute.
*/
getValue(): string;
/**
* Sets the value of a String attribute.
* @param value The value to set.
*/
setValue( value: string ): void;
}
class EntityState
{
}
class Entity
{
/**
* Represents an instance of an entity (a record).
* @param type The logical name of the entity.
*/
constructor( type: string );
/**
* Gets the collection of attributes for the entity.
*/
getAttributes(): Sdk.AttributeCollection;
/**
* Gets the collection of attributes for the entity.
* @param attributeName The attribute with matching name is returned.
*/
getAttributes( attributeName: string ): Sdk.AttributeBase;
/**
* Gets the collection of attributes for the entity.
* @param index The attribute with matching index is returned.
*/
getAttributes( index: number ): Sdk.AttributeBase;
/**
* Checks whether the entity has an attribute that satisfies the specified predicate.
* @param A comparer function that takes an Sdk.AttributeBase as argument and returns a boolean.
*/
containsAttribute( predicate: ( attribute: Sdk.AttributeBase ) => boolean ): boolean;
/**
* Checks whether the entity has an attribute with the specified name.
* @param The name of the attribute.
*/
containsAttribute( name: string ): boolean;
/**
* Sets the collection of attributes for the entity.
* @param attributes The collection of attributes for the entity.
*/
setAttributes( attributes: Sdk.AttributeCollection ): void;
/**
* Gets the state of the entity.
*/
getEntityState(): Sdk.EntityState;
/**
* Sets the state of the entity.
* @param state The state of the entity.
*/
setEntityState( state: Sdk.EntityState ): void;
/**
* Gets the collection of formatted values for the entity attributes.
*/
getFormattedValues(): Sdk.FormattedValueCollection;
/**
* Sets the collection of formatted values for the entity attributes.
* @param values" The collection of formatted values for the entity attributes.
*/
setFormattedValues( values: Sdk.FormattedValueCollection ): void;
/**
* Gets the Id of the record represented by this entity instance.
*/
getId(): string;
/**
* Sets the Id of the record represented by this entity instance.
* @param id The Id of the record represented by this entity instance.
* @param override Allow setting the Id property, for example when creating a new record from an existing one.
*/
setId( id: string, override?: boolean ): void;
/**
* Gets the logical name of the entity.
*/
getType(): string;
/**
* Sets the logical name of the entity.
* @param type The logical name of the entity.
*/
setType( type: string ): void;
/**
* Gets a collection of related entities.
*/
getRelatedEntities(): Sdk.RelatedEntitiesCollection;
/**
* Sets a collection of related entities.
* @param relatedEntities A collection of related entities.
*/
setRelatedEntities( relatedEntities: Sdk.RelatedEntitiesCollection ): void;
/**
* Adds an attribute with an optional value to a newly instantiated Sdk.Entity
* @param attribute The attribute to add
* @param isChanged Whether the attribute should be considered changed, the default is true.
*/
addAttribute( attribute: Sdk.AttributeBase, isChanged?: boolean ): void;
/**
* Adds an entity to the related entities.
* @param relationshipSchemaName The relationship SchemaName.
* @param entity The entity to add.
*/
addRelatedEntity( relationshipSchemaName: string, entity: Sdk.Entity ): void;
/**
* Gets the value to indicate whether data for the entity has changed.
*/
getIsChanged(): boolean;
/**
* Sets the value to indicate whether data for the entity has changed.
* @param isChanged The value to indicate whether data for the entity has changed.
*/
setIsChanged( isChanged: boolean ): void;
/**
* Gets the value of the specified attribute.
* @param logicalName The logical name of the attribute.
*/
getValue( logicalName: string ): any;
/**
* Generates properties for the entity based on metadata.
*/
initializeSubClass( metadata: Sdk.Mdq.IEntityMetadata ): void;
/**
* Sets the value of the specified attribute.
* @param logicalName The logical name of the attribute.
* @param value The value for the attribute. Simple JavaScript types may be used for most attribute types. Sdk.EntityReference, Sdk.EntityCollection, and Sdk.BooleanManagedPropertyValue cannot use simple JavaScript types.
*/
setValue( logicalName: string, value: Object ): void;
/**
* Generates an entity reference.
*/
toEntityReference(): Sdk.EntityReference;
/**
* Overrides the default toString method.
*/
toString(): string;
/**
* XML definition of an the child nodes of an entity.
* @param action
*/
toValueXml( action: string ): string;
/**
* XML definition of an entity where the root node is <entity>.
*/
toXml( action: string ): string;
/**
* Returns a view of the data in an entity instance
*/
view(): IEntityView;
}
class EntityReference
{
/**
* Identifies a record.
* @param logicalName The logical name of the entity.
* @param id The id of the record.
* @param name The value of the primary attribute of the entity instance. This property can contain a value or null. This property is not automatically populated unless the EntityReference object has been retrieved from the server.
*/
constructor( logicalName: string, id: string, name?: string );
/**