-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathcalendarsApi.ts
1153 lines (1016 loc) · 78.1 KB
/
calendarsApi.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
/**
* LUSID API
* # Introduction This page documents the [LUSID APIs](../../../api/swagger), which allows authorised clients to query and update their data within the LUSID platform. SDKs to interact with the LUSID APIs are available in the following languages and frameworks: * [C#](https://github.com/finbourne/lusid-sdk-csharp) * [Java](https://github.com/finbourne/lusid-sdk-java) * [JavaScript](https://github.com/finbourne/lusid-sdk-js) * [Python](https://github.com/finbourne/lusid-sdk-python) * [Angular](https://github.com/finbourne/lusid-sdk-angular) The LUSID platform is made up of a number of sub-applications. You can find the API / swagger documentation by following the links in the table below. | Application | Description | API / Swagger Documentation | |---------------|-----------------------------------------------------------------------------------|------------------------------------------------------| | LUSID | Open, API-first, developer-friendly investment data platform. | [Swagger](../../../api/swagger/index.html) | | Web app | User-facing front end for LUSID. | [Swagger](../../../app/swagger/index.html) | | Scheduler | Automated job scheduler. | [Swagger](../../../scheduler2/swagger/index.html) | | Insights | Monitoring and troubleshooting service. | [Swagger](../../../insights/swagger/index.html) | | Identity | Identity management for LUSID (in conjunction with Access) | [Swagger](../../../identity/swagger/index.html) | | Access | Access control for LUSID (in conjunction with Identity) | [Swagger](../../../access/swagger/index.html) | | Drive | Secure file repository and manager for collaboration. | [Swagger](../../../drive/swagger/index.html) | | Luminesce | Data virtualisation service (query data from multiple providers, including LUSID) | [Swagger](../../../honeycomb/swagger/index.html) | | Notification | Notification service. | [Swagger](../../../notification/swagger/index.html) | | Configuration | File store for secrets and other sensitive information. | [Swagger](../../../configuration/swagger/index.html) | | Workflow | Workflow service. | [Swagger](../../../workflow/swagger/index.html) | # Error Codes | Code|Name|Description | | ---|---|--- | | <a name=\"-10\">-10</a>|Server Configuration Error| | | <a name=\"-1\">-1</a>|Unknown error|An unexpected error was encountered on our side. | | <a name=\"102\">102</a>|Version Not Found| | | <a name=\"103\">103</a>|Api Rate Limit Violation| | | <a name=\"104\">104</a>|Instrument Not Found| | | <a name=\"105\">105</a>|Property Not Found| | | <a name=\"106\">106</a>|Portfolio Recursion Depth| | | <a name=\"108\">108</a>|Group Not Found| | | <a name=\"109\">109</a>|Portfolio Not Found| | | <a name=\"110\">110</a>|Property Schema Not Found| | | <a name=\"111\">111</a>|Portfolio Ancestry Not Found| | | <a name=\"112\">112</a>|Portfolio With Id Already Exists| | | <a name=\"113\">113</a>|Orphaned Portfolio| | | <a name=\"119\">119</a>|Missing Base Claims| | | <a name=\"121\">121</a>|Property Not Defined| | | <a name=\"122\">122</a>|Cannot Delete System Property| | | <a name=\"123\">123</a>|Cannot Modify Immutable Property Field| | | <a name=\"124\">124</a>|Property Already Exists| | | <a name=\"125\">125</a>|Invalid Property Life Time| | | <a name=\"126\">126</a>|Property Constraint Style Excludes Properties| | | <a name=\"127\">127</a>|Cannot Modify Default Data Type| | | <a name=\"128\">128</a>|Group Already Exists| | | <a name=\"129\">129</a>|No Such Data Type| | | <a name=\"130\">130</a>|Undefined Value For Data Type| | | <a name=\"131\">131</a>|Unsupported Value Type Defined On Data Type| | | <a name=\"132\">132</a>|Validation Error| | | <a name=\"133\">133</a>|Loop Detected In Group Hierarchy| | | <a name=\"134\">134</a>|Undefined Acceptable Values| | | <a name=\"135\">135</a>|Sub Group Already Exists| | | <a name=\"138\">138</a>|Price Source Not Found| | | <a name=\"139\">139</a>|Analytic Store Not Found| | | <a name=\"141\">141</a>|Analytic Store Already Exists| | | <a name=\"143\">143</a>|Client Instrument Already Exists| | | <a name=\"144\">144</a>|Duplicate In Parameter Set| | | <a name=\"147\">147</a>|Results Not Found| | | <a name=\"148\">148</a>|Order Field Not In Result Set| | | <a name=\"149\">149</a>|Operation Failed| | | <a name=\"150\">150</a>|Elastic Search Error| | | <a name=\"151\">151</a>|Invalid Parameter Value| | | <a name=\"153\">153</a>|Command Processing Failure| | | <a name=\"154\">154</a>|Entity State Construction Failure| | | <a name=\"155\">155</a>|Entity Timeline Does Not Exist| | | <a name=\"156\">156</a>|Concurrency Conflict Failure| | | <a name=\"157\">157</a>|Invalid Request| | | <a name=\"158\">158</a>|Event Publish Unknown| | | <a name=\"159\">159</a>|Event Query Failure| | | <a name=\"160\">160</a>|Blob Did Not Exist| | | <a name=\"162\">162</a>|Sub System Request Failure| | | <a name=\"163\">163</a>|Sub System Configuration Failure| | | <a name=\"165\">165</a>|Failed To Delete| | | <a name=\"166\">166</a>|Upsert Client Instrument Failure| | | <a name=\"167\">167</a>|Illegal As At Interval| | | <a name=\"168\">168</a>|Illegal Bitemporal Query| | | <a name=\"169\">169</a>|Invalid Alternate Id| | | <a name=\"170\">170</a>|Cannot Add Source Portfolio Property Explicitly| | | <a name=\"171\">171</a>|Entity Already Exists In Group| | | <a name=\"172\">172</a>|Entity With Id Does Not Exist| | | <a name=\"173\">173</a>|Entity With Id Already Exists| | | <a name=\"174\">174</a>|Derived Portfolio Details Do Not Exist| | | <a name=\"175\">175</a>|Entity Not In Group| | | <a name=\"176\">176</a>|Portfolio With Name Already Exists| | | <a name=\"177\">177</a>|Invalid Transactions| | | <a name=\"178\">178</a>|Reference Portfolio Not Found| | | <a name=\"179\">179</a>|Duplicate Id| | | <a name=\"180\">180</a>|Command Retrieval Failure| | | <a name=\"181\">181</a>|Data Filter Application Failure| | | <a name=\"182\">182</a>|Search Failed| | | <a name=\"183\">183</a>|Movements Engine Configuration Key Failure| | | <a name=\"184\">184</a>|Fx Rate Source Not Found| | | <a name=\"185\">185</a>|Accrual Source Not Found| | | <a name=\"186\">186</a>|Access Denied| | | <a name=\"187\">187</a>|Invalid Identity Token| | | <a name=\"188\">188</a>|Invalid Request Headers| | | <a name=\"189\">189</a>|Price Not Found| | | <a name=\"190\">190</a>|Invalid Sub Holding Keys Provided| | | <a name=\"191\">191</a>|Duplicate Sub Holding Keys Provided| | | <a name=\"192\">192</a>|Cut Definition Not Found| | | <a name=\"193\">193</a>|Cut Definition Invalid| | | <a name=\"194\">194</a>|Time Variant Property Deletion Date Unspecified| | | <a name=\"195\">195</a>|Perpetual Property Deletion Date Specified| | | <a name=\"196\">196</a>|Time Variant Property Upsert Date Unspecified| | | <a name=\"197\">197</a>|Perpetual Property Upsert Date Specified| | | <a name=\"200\">200</a>|Invalid Unit For Data Type| | | <a name=\"201\">201</a>|Invalid Type For Data Type| | | <a name=\"202\">202</a>|Invalid Value For Data Type| | | <a name=\"203\">203</a>|Unit Not Defined For Data Type| | | <a name=\"204\">204</a>|Units Not Supported On Data Type| | | <a name=\"205\">205</a>|Cannot Specify Units On Data Type| | | <a name=\"206\">206</a>|Unit Schema Inconsistent With Data Type| | | <a name=\"207\">207</a>|Unit Definition Not Specified| | | <a name=\"208\">208</a>|Duplicate Unit Definitions Specified| | | <a name=\"209\">209</a>|Invalid Units Definition| | | <a name=\"210\">210</a>|Invalid Instrument Identifier Unit| | | <a name=\"211\">211</a>|Holdings Adjustment Does Not Exist| | | <a name=\"212\">212</a>|Could Not Build Excel Url| | | <a name=\"213\">213</a>|Could Not Get Excel Version| | | <a name=\"214\">214</a>|Instrument By Code Not Found| | | <a name=\"215\">215</a>|Entity Schema Does Not Exist| | | <a name=\"216\">216</a>|Feature Not Supported On Portfolio Type| | | <a name=\"217\">217</a>|Quote Not Found| | | <a name=\"218\">218</a>|Invalid Quote Identifier| | | <a name=\"219\">219</a>|Invalid Metric For Data Type| | | <a name=\"220\">220</a>|Invalid Instrument Definition| | | <a name=\"221\">221</a>|Instrument Upsert Failure| | | <a name=\"222\">222</a>|Reference Portfolio Request Not Supported| | | <a name=\"223\">223</a>|Transaction Portfolio Request Not Supported| | | <a name=\"224\">224</a>|Invalid Property Value Assignment| | | <a name=\"230\">230</a>|Transaction Type Not Found| | | <a name=\"231\">231</a>|Transaction Type Duplication| | | <a name=\"232\">232</a>|Portfolio Does Not Exist At Given Date| | | <a name=\"233\">233</a>|Query Parser Failure| | | <a name=\"234\">234</a>|Duplicate Constituent| | | <a name=\"235\">235</a>|Unresolved Instrument Constituent| | | <a name=\"236\">236</a>|Unresolved Instrument In Transition| | | <a name=\"237\">237</a>|Missing Side Definitions| | | <a name=\"240\">240</a>|Duplicate Calculations Failure| | | <a name=\"299\">299</a>|Invalid Recipe| | | <a name=\"300\">300</a>|Missing Recipe| | | <a name=\"301\">301</a>|Dependencies| | | <a name=\"304\">304</a>|Portfolio Preprocess Failure| | | <a name=\"310\">310</a>|Valuation Engine Failure| | | <a name=\"311\">311</a>|Task Factory Failure| | | <a name=\"312\">312</a>|Task Evaluation Failure| | | <a name=\"313\">313</a>|Task Generation Failure| | | <a name=\"314\">314</a>|Engine Configuration Failure| | | <a name=\"315\">315</a>|Model Specification Failure| | | <a name=\"320\">320</a>|Market Data Key Failure| | | <a name=\"321\">321</a>|Market Resolver Failure| | | <a name=\"322\">322</a>|Market Data Failure| | | <a name=\"330\">330</a>|Curve Failure| | | <a name=\"331\">331</a>|Volatility Surface Failure| | | <a name=\"332\">332</a>|Volatility Cube Failure| | | <a name=\"350\">350</a>|Instrument Failure| | | <a name=\"351\">351</a>|Cash Flows Failure| | | <a name=\"352\">352</a>|Reference Data Failure| | | <a name=\"360\">360</a>|Aggregation Failure| | | <a name=\"361\">361</a>|Aggregation Measure Failure| | | <a name=\"370\">370</a>|Result Retrieval Failure| | | <a name=\"371\">371</a>|Result Processing Failure| | | <a name=\"372\">372</a>|Vendor Result Processing Failure| | | <a name=\"373\">373</a>|Vendor Result Mapping Failure| | | <a name=\"374\">374</a>|Vendor Library Unauthorised| | | <a name=\"375\">375</a>|Vendor Connectivity Error| | | <a name=\"376\">376</a>|Vendor Interface Error| | | <a name=\"377\">377</a>|Vendor Pricing Failure| | | <a name=\"378\">378</a>|Vendor Translation Failure| | | <a name=\"379\">379</a>|Vendor Key Mapping Failure| | | <a name=\"380\">380</a>|Vendor Reflection Failure| | | <a name=\"381\">381</a>|Vendor Process Failure| | | <a name=\"382\">382</a>|Vendor System Failure| | | <a name=\"390\">390</a>|Attempt To Upsert Duplicate Quotes| | | <a name=\"391\">391</a>|Corporate Action Source Does Not Exist| | | <a name=\"392\">392</a>|Corporate Action Source Already Exists| | | <a name=\"393\">393</a>|Instrument Identifier Already In Use| | | <a name=\"394\">394</a>|Properties Not Found| | | <a name=\"395\">395</a>|Batch Operation Aborted| | | <a name=\"400\">400</a>|Invalid Iso4217 Currency Code| | | <a name=\"401\">401</a>|Cannot Assign Instrument Identifier To Currency| | | <a name=\"402\">402</a>|Cannot Assign Currency Identifier To Non Currency| | | <a name=\"403\">403</a>|Currency Instrument Cannot Be Deleted| | | <a name=\"404\">404</a>|Currency Instrument Cannot Have Economic Definition| | | <a name=\"405\">405</a>|Currency Instrument Cannot Have Lookthrough Portfolio| | | <a name=\"406\">406</a>|Cannot Create Currency Instrument With Multiple Identifiers| | | <a name=\"407\">407</a>|Specified Currency Is Undefined| | | <a name=\"410\">410</a>|Index Does Not Exist| | | <a name=\"411\">411</a>|Sort Field Does Not Exist| | | <a name=\"413\">413</a>|Negative Pagination Parameters| | | <a name=\"414\">414</a>|Invalid Search Syntax| | | <a name=\"415\">415</a>|Filter Execution Timeout| | | <a name=\"420\">420</a>|Side Definition Inconsistent| | | <a name=\"450\">450</a>|Invalid Quote Access Metadata Rule| | | <a name=\"451\">451</a>|Access Metadata Not Found| | | <a name=\"452\">452</a>|Invalid Access Metadata Identifier| | | <a name=\"460\">460</a>|Standard Resource Not Found| | | <a name=\"461\">461</a>|Standard Resource Conflict| | | <a name=\"462\">462</a>|Calendar Not Found| | | <a name=\"463\">463</a>|Date In A Calendar Not Found| | | <a name=\"464\">464</a>|Invalid Date Source Data| | | <a name=\"465\">465</a>|Invalid Timezone| | | <a name=\"601\">601</a>|Person Identifier Already In Use| | | <a name=\"602\">602</a>|Person Not Found| | | <a name=\"603\">603</a>|Cannot Set Identifier| | | <a name=\"617\">617</a>|Invalid Recipe Specification In Request| | | <a name=\"618\">618</a>|Inline Recipe Deserialisation Failure| | | <a name=\"619\">619</a>|Identifier Types Not Set For Entity| | | <a name=\"620\">620</a>|Cannot Delete All Client Defined Identifiers| | | <a name=\"650\">650</a>|The Order requested was not found.| | | <a name=\"654\">654</a>|The Allocation requested was not found.| | | <a name=\"655\">655</a>|Cannot build the fx forward target with the given holdings.| | | <a name=\"656\">656</a>|Group does not contain expected entities.| | | <a name=\"665\">665</a>|Destination directory not found| | | <a name=\"667\">667</a>|Relation definition already exists| | | <a name=\"672\">672</a>|Could not retrieve file contents| | | <a name=\"673\">673</a>|Missing entitlements for entities in Group| | | <a name=\"674\">674</a>|Next Best Action not found| | | <a name=\"676\">676</a>|Relation definition not defined| | | <a name=\"677\">677</a>|Invalid entity identifier for relation| | | <a name=\"681\">681</a>|Sorting by specified field not supported|One or more of the provided fields to order by were either invalid or not supported. | | <a name=\"682\">682</a>|Too many fields to sort by|The number of fields to sort the data by exceeds the number allowed by the endpoint | | <a name=\"684\">684</a>|Sequence Not Found| | | <a name=\"685\">685</a>|Sequence Already Exists| | | <a name=\"686\">686</a>|Non-cycling sequence has been exhausted| | | <a name=\"687\">687</a>|Legal Entity Identifier Already In Use| | | <a name=\"688\">688</a>|Legal Entity Not Found| | | <a name=\"689\">689</a>|The supplied pagination token is invalid| | | <a name=\"690\">690</a>|Property Type Is Not Supported| | | <a name=\"691\">691</a>|Multiple Tax-lots For Currency Type Is Not Supported| | | <a name=\"692\">692</a>|This endpoint does not support impersonation| | | <a name=\"693\">693</a>|Entity type is not supported for Relationship| | | <a name=\"694\">694</a>|Relationship Validation Failure| | | <a name=\"695\">695</a>|Relationship Not Found| | | <a name=\"697\">697</a>|Derived Property Formula No Longer Valid| | | <a name=\"698\">698</a>|Story is not available| | | <a name=\"703\">703</a>|Corporate Action Does Not Exist| | | <a name=\"720\">720</a>|The provided sort and filter combination is not valid| | | <a name=\"721\">721</a>|A2B generation failed| | | <a name=\"722\">722</a>|Aggregated Return Calculation Failure| | | <a name=\"723\">723</a>|Custom Entity Definition Identifier Already In Use| | | <a name=\"724\">724</a>|Custom Entity Definition Not Found| | | <a name=\"725\">725</a>|The Placement requested was not found.| | | <a name=\"726\">726</a>|The Execution requested was not found.| | | <a name=\"727\">727</a>|The Block requested was not found.| | | <a name=\"728\">728</a>|The Participation requested was not found.| | | <a name=\"729\">729</a>|The Package requested was not found.| | | <a name=\"730\">730</a>|The OrderInstruction requested was not found.| | | <a name=\"732\">732</a>|Custom Entity not found.| | | <a name=\"733\">733</a>|Custom Entity Identifier already in use.| | | <a name=\"735\">735</a>|Calculation Failed.| | | <a name=\"736\">736</a>|An expected key on HttpResponse is missing.| | | <a name=\"737\">737</a>|A required fee detail is missing.| | | <a name=\"738\">738</a>|Zero rows were returned from Luminesce| | | <a name=\"739\">739</a>|Provided Weekend Mask was invalid| | | <a name=\"742\">742</a>|Custom Entity fields do not match the definition| | | <a name=\"746\">746</a>|The provided sequence is not valid.| | | <a name=\"751\">751</a>|The type of the Custom Entity is different than the type provided in the definition.| | | <a name=\"752\">752</a>|Luminesce process returned an error.| | | <a name=\"753\">753</a>|File name or content incompatible with operation.| | | <a name=\"755\">755</a>|Schema of response from Drive is not as expected.| | | <a name=\"757\">757</a>|Schema of response from Luminesce is not as expected.| | | <a name=\"758\">758</a>|Luminesce timed out.| | | <a name=\"763\">763</a>|Invalid Lusid Entity Identifier Unit| | | <a name=\"768\">768</a>|Fee rule not found.| | | <a name=\"769\">769</a>|Cannot update the base currency of a portfolio with transactions loaded| | | <a name=\"771\">771</a>|Transaction configuration source not found| | | <a name=\"774\">774</a>|Compliance rule not found.| | | <a name=\"775\">775</a>|Fund accounting document cannot be processed.| | | <a name=\"778\">778</a>|Unable to look up FX rate from trade ccy to portfolio ccy for some of the trades.| | | <a name=\"782\">782</a>|The Property definition dataType is not matching the derivation formula dataType| | | <a name=\"783\">783</a>|The Property definition domain is not supported for derived properties| | | <a name=\"788\">788</a>|Compliance run not found failure.| | | <a name=\"790\">790</a>|Custom Entity has missing or invalid identifiers| | | <a name=\"791\">791</a>|Custom Entity definition already exists| | | <a name=\"792\">792</a>|Compliance PropertyKey is missing.| | | <a name=\"793\">793</a>|Compliance Criteria Value for matching is missing.| | | <a name=\"795\">795</a>|Cannot delete identifier definition| | | <a name=\"796\">796</a>|Tax rule set not found.| | | <a name=\"797\">797</a>|A tax rule set with this id already exists.| | | <a name=\"798\">798</a>|Multiple rule sets for the same property key are applicable.| | | <a name=\"800\">800</a>|Can not upsert an instrument event of this type.| | | <a name=\"801\">801</a>|The instrument event does not exist.| | | <a name=\"802\">802</a>|The Instrument event is missing salient information.| | | <a name=\"803\">803</a>|The Instrument event could not be processed.| | | <a name=\"804\">804</a>|Some data requested does not follow the order graph assumptions.| | | <a name=\"805\">805</a>|The instrument event type does not exist.| | | <a name=\"806\">806</a>|The transaction template specification does not exist.| | | <a name=\"807\">807</a>|The default transaction template does not exist.| | | <a name=\"808\">808</a>|The transaction template does not exist.| | | <a name=\"811\">811</a>|A price could not be found for an order.| | | <a name=\"812\">812</a>|A price could not be found for an allocation.| | | <a name=\"813\">813</a>|Chart of Accounts not found.| | | <a name=\"814\">814</a>|Account not found.| | | <a name=\"815\">815</a>|Abor not found.| | | <a name=\"816\">816</a>|Abor Configuration not found.| | | <a name=\"817\">817</a>|Reconciliation mapping not found| | | <a name=\"818\">818</a>|Attribute type could not be deleted because it doesn\'t exist.| | | <a name=\"819\">819</a>|Reconciliation not found.| | | <a name=\"820\">820</a>|Custodian Account not found.| | | <a name=\"821\">821</a>|Allocation Failure| | | <a name=\"822\">822</a>|Reconciliation run not found| | | <a name=\"823\">823</a>|Reconciliation break not found| | | <a name=\"824\">824</a>|Entity link type could not be deleted because it doesn\'t exist.| | | <a name=\"828\">828</a>|Address key definition not found.| | | <a name=\"829\">829</a>|Compliance template not found.| | | <a name=\"830\">830</a>|Action not supported| | | <a name=\"831\">831</a>|Reference list not found.| | | <a name=\"832\">832</a>|Posting Module not found.| | | <a name=\"833\">833</a>|The type of parameter provided did not match that required by the compliance rule.| | | <a name=\"834\">834</a>|The parameters provided by a rule did not match those required by its template.| | | <a name=\"835\">835</a>|The entity has a property in a domain that is not supprted for that entity type.| | | <a name=\"836\">836</a>|Structured result data not found.| | | <a name=\"837\">837</a>|Diary entry not found.| | | <a name=\"838\">838</a>|Diary entry could not be created.| | | <a name=\"839\">839</a>|Diary entry already exists.| | | <a name=\"861\">861</a>|Compliance run summary not found.| | | <a name=\"869\">869</a>|Conflicting instrument properties in batch.| | | <a name=\"870\">870</a>|Compliance run summary already exists.| | | <a name=\"871\">871</a>|The specified impersonated user does not exist| | | <a name=\"874\">874</a>|Provided Property Domain is not supported for entity filter.| | | <a name=\"875\">875</a>|Cannot Delete System Reference List.| | | <a name=\"876\">876</a>|Cleardown Module not found.| | | <a name=\"879\">879</a>|Portfolios do not have the same base currency| | | <a name=\"880\">880</a>|There was a problem with the definition of the compliance expression.| | | <a name=\"881\">881</a>|Block overplaced.| | | <a name=\"882\">882</a>|Order not approved.| | | <a name=\"883\">883</a>|Cannot update the shared fields of a block with associated orders.| |
*
* The version of the OpenAPI document: 2.0.162
* Contact: [email protected]
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import localVarRequest from 'request';
import http from 'http';
/* tslint:disable:no-unused-locals */
import { AddBusinessDaysToDateRequest } from '../model/addBusinessDaysToDateRequest';
import { AddBusinessDaysToDateResponse } from '../model/addBusinessDaysToDateResponse';
import { Calendar } from '../model/calendar';
import { CalendarDate } from '../model/calendarDate';
import { CreateCalendarRequest } from '../model/createCalendarRequest';
import { CreateDateRequest } from '../model/createDateRequest';
import { IsBusinessDayResponse } from '../model/isBusinessDayResponse';
import { LusidProblemDetails } from '../model/lusidProblemDetails';
import { LusidValidationProblemDetails } from '../model/lusidValidationProblemDetails';
import { PagedResourceListOfCalendar } from '../model/pagedResourceListOfCalendar';
import { ResourceListOfCalendarDate } from '../model/resourceListOfCalendarDate';
import { UpdateCalendarRequest } from '../model/updateCalendarRequest';
import { ValuationSchedule } from '../model/valuationSchedule';
import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models';
import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models';
class HttpError extends Error {
constructor (public response: http.IncomingMessage, public body: any, public statusCode?: number) {
super('HTTP request failed');
this.name = 'HttpError';
}
}
let defaultBasePath = 'https://www.lusid.com/api';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
export enum CalendarsApiApiKeys {
}
export class CalendarsApi {
protected _basePath = defaultBasePath;
protected _defaultHeaders : any = {};
protected _useQuerystring : boolean = false;
protected authentications = {
'default': <Authentication>new VoidAuth(),
'oauth2': new OAuth(),
}
protected interceptors: Interceptor[] = [];
constructor(basePath?: string);
constructor(basePathOrUsername: string, password?: string, basePath?: string) {
if (password) {
if (basePath) {
this.basePath = basePath;
}
} else {
if (basePathOrUsername) {
this.basePath = basePathOrUsername
}
}
}
set useQuerystring(value: boolean) {
this._useQuerystring = value;
}
set basePath(basePath: string) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders: any) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
public setDefaultAuthentication(auth: Authentication) {
this.authentications.default = auth;
}
public setApiKey(key: CalendarsApiApiKeys, value: string) {
(this.authentications as any)[CalendarsApiApiKeys[key]].apiKey = value;
}
set accessToken(token: string) {
this.authentications.oauth2.accessToken = token;
}
public addInterceptor(interceptor: Interceptor) {
this.interceptors.push(interceptor);
}
/**
* A Business day is defined as a point in time that: * Does not represent a day in the calendar\'s weekend * Does not represent a day in the calendar\'s list of holidays (e.g. Christmas Day in the UK) All dates specified must be UTC and the upper bound of a calendar is not inclusive e.g. From: 2020-12-24-00-00-00: Adding 3 business days returns 2020-12-30, assuming Saturday and Sunday are weekends, and the 25th and 28th are holidays. Adding -2 business days returns 2020-12-22 under the same assumptions. If the provided number of days to add is zero, returns a failure.
* @summary [EARLY ACCESS] AddBusinessDaysToDate: Adds the requested number of Business Days to the provided date.
* @param scope Scope within which to search for the calendars
* @param addBusinessDaysToDateRequest Request Details: start date, number of days to add (which can be negative, but not zero), calendar codes and optionally an AsAt date for searching the calendar store
*/
public async addBusinessDaysToDate (scope: string, addBusinessDaysToDateRequest: AddBusinessDaysToDateRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: AddBusinessDaysToDateResponse; }> {
const localVarPath = this.basePath + '/api/calendars/businessday/{scope}/add'
.replace('{' + 'scope' + '}', encodeURIComponent(String(scope)));
let localVarQueryParameters: any = {};
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
const produces = ['text/plain', 'application/json', 'text/json'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
} else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams: any = {};
// verify required parameter 'scope' is not null or undefined
if (scope === null || scope === undefined) {
throw new Error('Required parameter scope was null or undefined when calling addBusinessDaysToDate.');
}
// verify required parameter 'addBusinessDaysToDateRequest' is not null or undefined
if (addBusinessDaysToDateRequest === null || addBusinessDaysToDateRequest === undefined) {
throw new Error('Required parameter addBusinessDaysToDateRequest was null or undefined when calling addBusinessDaysToDate.');
}
(<any>Object).assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions: localVarRequest.Options = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: ObjectSerializer.serialize(addBusinessDaysToDateRequest, "AddBusinessDaysToDateRequest")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.oauth2.accessToken) {
authenticationPromise = authenticationPromise.then(() => this.authentications.oauth2.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
(<any>localVarRequestOptions).formData = localVarFormParams;
} else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise<{ response: http.IncomingMessage; body: AddBusinessDaysToDateResponse; }>((resolve, reject) => {
localVarRequest(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
} else {
body = ObjectSerializer.deserialize(body, "AddBusinessDaysToDateResponse");
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
resolve({ response: response, body: body });
} else {
reject(new HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* Add an event to the calendar. These Events can be a maximum of 24 hours and must be specified in UTC. A local date will be calculated by the system and applied to the calendar before processing.
* @summary [EARLY ACCESS] AddDateToCalendar: Add a date to a calendar
* @param scope Scope of the calendar
* @param code Code of the calendar
* @param createDateRequest Add date to calendar request
*/
public async addDateToCalendar (scope: string, code: string, createDateRequest: CreateDateRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: CalendarDate; }> {
const localVarPath = this.basePath + '/api/calendars/generic/{scope}/{code}/dates'
.replace('{' + 'scope' + '}', encodeURIComponent(String(scope)))
.replace('{' + 'code' + '}', encodeURIComponent(String(code)));
let localVarQueryParameters: any = {};
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
const produces = ['text/plain', 'application/json', 'text/json'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
} else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams: any = {};
// verify required parameter 'scope' is not null or undefined
if (scope === null || scope === undefined) {
throw new Error('Required parameter scope was null or undefined when calling addDateToCalendar.');
}
// verify required parameter 'code' is not null or undefined
if (code === null || code === undefined) {
throw new Error('Required parameter code was null or undefined when calling addDateToCalendar.');
}
// verify required parameter 'createDateRequest' is not null or undefined
if (createDateRequest === null || createDateRequest === undefined) {
throw new Error('Required parameter createDateRequest was null or undefined when calling addDateToCalendar.');
}
(<any>Object).assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions: localVarRequest.Options = {
method: 'PUT',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: ObjectSerializer.serialize(createDateRequest, "CreateDateRequest")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.oauth2.accessToken) {
authenticationPromise = authenticationPromise.then(() => this.authentications.oauth2.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
(<any>localVarRequestOptions).formData = localVarFormParams;
} else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise<{ response: http.IncomingMessage; body: CalendarDate; }>((resolve, reject) => {
localVarRequest(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
} else {
body = ObjectSerializer.deserialize(body, "CalendarDate");
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
resolve({ response: response, body: body });
} else {
reject(new HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* Create a calendar in a generic form which can be used to store date events.
* @summary [EARLY ACCESS] CreateCalendar: Create a calendar in its generic form
* @param createCalendarRequest A request to create the calendar
*/
public async createCalendar (createCalendarRequest: CreateCalendarRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Calendar; }> {
const localVarPath = this.basePath + '/api/calendars/generic';
let localVarQueryParameters: any = {};
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
const produces = ['text/plain', 'application/json', 'text/json'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
} else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams: any = {};
// verify required parameter 'createCalendarRequest' is not null or undefined
if (createCalendarRequest === null || createCalendarRequest === undefined) {
throw new Error('Required parameter createCalendarRequest was null or undefined when calling createCalendar.');
}
(<any>Object).assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions: localVarRequest.Options = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: ObjectSerializer.serialize(createCalendarRequest, "CreateCalendarRequest")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.oauth2.accessToken) {
authenticationPromise = authenticationPromise.then(() => this.authentications.oauth2.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
(<any>localVarRequestOptions).formData = localVarFormParams;
} else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise<{ response: http.IncomingMessage; body: Calendar; }>((resolve, reject) => {
localVarRequest(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
} else {
body = ObjectSerializer.deserialize(body, "Calendar");
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
resolve({ response: response, body: body });
} else {
reject(new HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* Delete a calendar and all of its respective dates
* @summary [EARLY ACCESS] DeleteCalendar: Delete a calendar
* @param scope Scope of the calendar
* @param code Code of the calendar
*/
public async deleteCalendar (scope: string, code: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Calendar; }> {
const localVarPath = this.basePath + '/api/calendars/generic/{scope}/{code}'
.replace('{' + 'scope' + '}', encodeURIComponent(String(scope)))
.replace('{' + 'code' + '}', encodeURIComponent(String(code)));
let localVarQueryParameters: any = {};
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
const produces = ['text/plain', 'application/json', 'text/json'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
} else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams: any = {};
// verify required parameter 'scope' is not null or undefined
if (scope === null || scope === undefined) {
throw new Error('Required parameter scope was null or undefined when calling deleteCalendar.');
}
// verify required parameter 'code' is not null or undefined
if (code === null || code === undefined) {
throw new Error('Required parameter code was null or undefined when calling deleteCalendar.');
}
(<any>Object).assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions: localVarRequest.Options = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.oauth2.accessToken) {
authenticationPromise = authenticationPromise.then(() => this.authentications.oauth2.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
(<any>localVarRequestOptions).formData = localVarFormParams;
} else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise<{ response: http.IncomingMessage; body: Calendar; }>((resolve, reject) => {
localVarRequest(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
} else {
body = ObjectSerializer.deserialize(body, "Calendar");
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
resolve({ response: response, body: body });
} else {
reject(new HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* Remove a date from a calendar.
* @summary [EARLY ACCESS] DeleteDateFromCalendar: Remove a date from a calendar
* @param scope Scope of the calendar
* @param code Code of the calendar
* @param dateId Identifier of the date to be removed
*/
public async deleteDateFromCalendar (scope: string, code: string, dateId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: CalendarDate; }> {
const localVarPath = this.basePath + '/api/calendars/generic/{scope}/{code}/dates/{dateId}'
.replace('{' + 'scope' + '}', encodeURIComponent(String(scope)))
.replace('{' + 'code' + '}', encodeURIComponent(String(code)))
.replace('{' + 'dateId' + '}', encodeURIComponent(String(dateId)));
let localVarQueryParameters: any = {};
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
const produces = ['text/plain', 'application/json', 'text/json'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
} else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams: any = {};
// verify required parameter 'scope' is not null or undefined
if (scope === null || scope === undefined) {
throw new Error('Required parameter scope was null or undefined when calling deleteDateFromCalendar.');
}
// verify required parameter 'code' is not null or undefined
if (code === null || code === undefined) {
throw new Error('Required parameter code was null or undefined when calling deleteDateFromCalendar.');
}
// verify required parameter 'dateId' is not null or undefined
if (dateId === null || dateId === undefined) {
throw new Error('Required parameter dateId was null or undefined when calling deleteDateFromCalendar.');
}
(<any>Object).assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions: localVarRequest.Options = {
method: 'DELETE',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.oauth2.accessToken) {
authenticationPromise = authenticationPromise.then(() => this.authentications.oauth2.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
(<any>localVarRequestOptions).formData = localVarFormParams;
} else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise<{ response: http.IncomingMessage; body: CalendarDate; }>((resolve, reject) => {
localVarRequest(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
} else {
body = ObjectSerializer.deserialize(body, "CalendarDate");
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
resolve({ response: response, body: body });
} else {
reject(new HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* Returns an ordered array of dates. The dates will only fall on business days as defined by the scope and calendar codes in the valuation schedule. Valuations are made at a frequency defined by the valuation schedule\'s tenor, e.g. every day (\"1D\"), every other week (\"2W\") etc. These dates will be adjusted onto business days as defined by the schedule\'s rollConvention.
* @summary [EARLY ACCESS] GenerateSchedule: Generate an ordered schedule of dates.
* @param scope Scope of the calendars to use
* @param valuationSchedule The ValuationSchedule to generate schedule dates from
* @param asAt Optional AsAt for searching the calendar store. Defaults to Latest.
*/
public async generateSchedule (scope: string, valuationSchedule: ValuationSchedule, asAt?: Date, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array<Date>; }> {
const localVarPath = this.basePath + '/api/calendars/schedule/{scope}'
.replace('{' + 'scope' + '}', encodeURIComponent(String(scope)));
let localVarQueryParameters: any = {};
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
const produces = ['text/plain', 'application/json', 'text/json'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
} else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams: any = {};
// verify required parameter 'scope' is not null or undefined
if (scope === null || scope === undefined) {
throw new Error('Required parameter scope was null or undefined when calling generateSchedule.');
}
// verify required parameter 'valuationSchedule' is not null or undefined
if (valuationSchedule === null || valuationSchedule === undefined) {
throw new Error('Required parameter valuationSchedule was null or undefined when calling generateSchedule.');
}
if (asAt !== undefined) {
localVarQueryParameters['asAt'] = ObjectSerializer.serialize(asAt, "Date");
}
(<any>Object).assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions: localVarRequest.Options = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: ObjectSerializer.serialize(valuationSchedule, "ValuationSchedule")
};
let authenticationPromise = Promise.resolve();
if (this.authentications.oauth2.accessToken) {
authenticationPromise = authenticationPromise.then(() => this.authentications.oauth2.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
(<any>localVarRequestOptions).formData = localVarFormParams;
} else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise<{ response: http.IncomingMessage; body: Array<Date>; }>((resolve, reject) => {
localVarRequest(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
} else {
body = ObjectSerializer.deserialize(body, "Array<Date>");
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
resolve({ response: response, body: body });
} else {
reject(new HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* Retrieve a generic calendar by a specific ID at a point in AsAt time
* @summary [EARLY ACCESS] GetCalendar: Get a calendar in its generic form
* @param scope Scope of the calendar identifier
* @param code Code of the calendar identifier
* @param propertyKeys A list of property keys from the \"Calendar\" domain to decorate onto the calendar, These take the format {domain}/{scope}/{code} e.g. \"Calendar/System/Name\".
* @param asAt The AsAt datetime at which to retrieve the calendar
*/
public async getCalendar (scope: string, code: string, propertyKeys?: Array<string>, asAt?: Date, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Calendar; }> {
const localVarPath = this.basePath + '/api/calendars/generic/{scope}/{code}'
.replace('{' + 'scope' + '}', encodeURIComponent(String(scope)))
.replace('{' + 'code' + '}', encodeURIComponent(String(code)));
let localVarQueryParameters: any = {};
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
const produces = ['text/plain', 'application/json', 'text/json'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
} else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams: any = {};
// verify required parameter 'scope' is not null or undefined
if (scope === null || scope === undefined) {
throw new Error('Required parameter scope was null or undefined when calling getCalendar.');
}
// verify required parameter 'code' is not null or undefined
if (code === null || code === undefined) {
throw new Error('Required parameter code was null or undefined when calling getCalendar.');
}
if (propertyKeys !== undefined) {
localVarQueryParameters['propertyKeys'] = ObjectSerializer.serialize(propertyKeys, "Array<string>");
}
if (asAt !== undefined) {
localVarQueryParameters['asAt'] = ObjectSerializer.serialize(asAt, "Date");
}
(<any>Object).assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions: localVarRequest.Options = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.oauth2.accessToken) {
authenticationPromise = authenticationPromise.then(() => this.authentications.oauth2.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
(<any>localVarRequestOptions).formData = localVarFormParams;
} else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise<{ response: http.IncomingMessage; body: Calendar; }>((resolve, reject) => {
localVarRequest(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
} else {
body = ObjectSerializer.deserialize(body, "Calendar");
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
resolve({ response: response, body: body });
} else {
reject(new HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* Get dates from a specific calendar within a specific window of effective time, at a point in AsAt time. Providing an id filter can further refine the results.
* @summary [EARLY ACCESS] GetDates: Get dates for a specific calendar
* @param scope Scope of the calendar
* @param code Code of the calendar
* @param fromEffectiveAt Where the effective window of dates should begin from
* @param toEffectiveAt Where the effective window of dates should end
* @param asAt AsAt the dates should be retrieved at
* @param idFilter An additional filter that will filter dates based on their identifer
*/
public async getDates (scope: string, code: string, fromEffectiveAt?: string, toEffectiveAt?: string, asAt?: Date, idFilter?: Array<string>, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: ResourceListOfCalendarDate; }> {
const localVarPath = this.basePath + '/api/calendars/generic/{scope}/{code}/dates'
.replace('{' + 'scope' + '}', encodeURIComponent(String(scope)))
.replace('{' + 'code' + '}', encodeURIComponent(String(code)));
let localVarQueryParameters: any = {};
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
const produces = ['text/plain', 'application/json', 'text/json'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
} else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams: any = {};
// verify required parameter 'scope' is not null or undefined
if (scope === null || scope === undefined) {
throw new Error('Required parameter scope was null or undefined when calling getDates.');
}
// verify required parameter 'code' is not null or undefined
if (code === null || code === undefined) {
throw new Error('Required parameter code was null or undefined when calling getDates.');
}
if (fromEffectiveAt !== undefined) {
localVarQueryParameters['fromEffectiveAt'] = ObjectSerializer.serialize(fromEffectiveAt, "string");
}
if (toEffectiveAt !== undefined) {
localVarQueryParameters['toEffectiveAt'] = ObjectSerializer.serialize(toEffectiveAt, "string");
}
if (asAt !== undefined) {
localVarQueryParameters['asAt'] = ObjectSerializer.serialize(asAt, "Date");
}
if (idFilter !== undefined) {
localVarQueryParameters['idFilter'] = ObjectSerializer.serialize(idFilter, "Array<string>");
}
(<any>Object).assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions: localVarRequest.Options = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.oauth2.accessToken) {
authenticationPromise = authenticationPromise.then(() => this.authentications.oauth2.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
(<any>localVarRequestOptions).formData = localVarFormParams;
} else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise<{ response: http.IncomingMessage; body: ResourceListOfCalendarDate; }>((resolve, reject) => {
localVarRequest(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
} else {
body = ObjectSerializer.deserialize(body, "ResourceListOfCalendarDate");
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
resolve({ response: response, body: body });
} else {
reject(new HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* A Business DateTime is defined as a point in time that: * Does not represent a day that overlaps with the calendars WeekendMask * If the calendar is a \"Holiday Calendar\" Does not overlap with any dates in the calendar * If the calendar is a \"TradingHours Calendar\" Does overlap with a date in the calendar All dates specified must be UTC and the upper bound of a calendar is not inclusive e.g. From: 2020-12-25-00-00-00 To: 2020-12-26-00-00-00 IsBusinessDay(2020-12-26-00-00-00) == false
* @summary [EARLY ACCESS] IsBusinessDateTime: Check whether a DateTime is a \"Business DateTime\"
* @param dateTime DateTime to check - This DateTime must be UTC
* @param scope Scope of the calendar
* @param code Code of the calendar
* @param asAt AsAt for the request
*/
public async isBusinessDateTime (dateTime: Date, scope: string, code: string, asAt?: Date, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: IsBusinessDayResponse; }> {
const localVarPath = this.basePath + '/api/calendars/businessday/{scope}/{code}'
.replace('{' + 'scope' + '}', encodeURIComponent(String(scope)))
.replace('{' + 'code' + '}', encodeURIComponent(String(code)));
let localVarQueryParameters: any = {};
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
const produces = ['text/plain', 'application/json', 'text/json'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
} else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams: any = {};
// verify required parameter 'dateTime' is not null or undefined
if (dateTime === null || dateTime === undefined) {
throw new Error('Required parameter dateTime was null or undefined when calling isBusinessDateTime.');
}
// verify required parameter 'scope' is not null or undefined
if (scope === null || scope === undefined) {
throw new Error('Required parameter scope was null or undefined when calling isBusinessDateTime.');
}
// verify required parameter 'code' is not null or undefined
if (code === null || code === undefined) {
throw new Error('Required parameter code was null or undefined when calling isBusinessDateTime.');
}
if (dateTime !== undefined) {
localVarQueryParameters['dateTime'] = ObjectSerializer.serialize(dateTime, "Date");
}
if (asAt !== undefined) {
localVarQueryParameters['asAt'] = ObjectSerializer.serialize(asAt, "Date");
}
(<any>Object).assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions: localVarRequest.Options = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.oauth2.accessToken) {
authenticationPromise = authenticationPromise.then(() => this.authentications.oauth2.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
(<any>localVarRequestOptions).formData = localVarFormParams;
} else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise<{ response: http.IncomingMessage; body: IsBusinessDayResponse; }>((resolve, reject) => {
localVarRequest(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
} else {
body = ObjectSerializer.deserialize(body, "IsBusinessDayResponse");
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
resolve({ response: response, body: body });
} else {
reject(new HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* List calendars at a point in AsAt time.
* @summary [EARLY ACCESS] ListCalendars: List Calendars
* @param asAt The AsAt datetime at which to retrieve the calendars
* @param page The pagination token to use to continue listing calendars from a previous call to list calendars. This value is returned from the previous call. If a pagination token is provided the sortBy, filter, and asAt fields must not have changed since the original request.
* @param limit When paginating, limit the number of returned results to this many.
* @param propertyKeys A list of property keys from the \"Calendar\" domain to decorate onto the calendar, These take the format {domain}/{scope}/{code} e.g. \"Calendar/System/Name\".
* @param filter Expression to filter the result set. Read more about filtering results from LUSID here https://support.lusid.com/filtering-results-from-lusid.
*/
public async listCalendars (asAt?: Date, page?: string, limit?: number, propertyKeys?: Array<string>, filter?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: PagedResourceListOfCalendar; }> {
const localVarPath = this.basePath + '/api/calendars/generic';
let localVarQueryParameters: any = {};
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
const produces = ['text/plain', 'application/json', 'text/json'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
} else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams: any = {};
if (asAt !== undefined) {
localVarQueryParameters['asAt'] = ObjectSerializer.serialize(asAt, "Date");
}
if (page !== undefined) {
localVarQueryParameters['page'] = ObjectSerializer.serialize(page, "string");
}
if (limit !== undefined) {
localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number");
}
if (propertyKeys !== undefined) {
localVarQueryParameters['propertyKeys'] = ObjectSerializer.serialize(propertyKeys, "Array<string>");
}
if (filter !== undefined) {
localVarQueryParameters['filter'] = ObjectSerializer.serialize(filter, "string");
}
(<any>Object).assign(localVarHeaderParams, options.headers);
let localVarUseFormData = false;
let localVarRequestOptions: localVarRequest.Options = {
method: 'GET',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};
let authenticationPromise = Promise.resolve();
if (this.authentications.oauth2.accessToken) {
authenticationPromise = authenticationPromise.then(() => this.authentications.oauth2.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}
return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
(<any>localVarRequestOptions).formData = localVarFormParams;
} else {
localVarRequestOptions.form = localVarFormParams;
}
}
return new Promise<{ response: http.IncomingMessage; body: PagedResourceListOfCalendar; }>((resolve, reject) => {
localVarRequest(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
} else {
body = ObjectSerializer.deserialize(body, "PagedResourceListOfCalendar");
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
resolve({ response: response, body: body });
} else {
reject(new HttpError(response, body, response.statusCode));
}
}
});
});
});
}
/**
* List calendars in a Scope at a point in AsAt time.
* @summary [EARLY ACCESS] ListCalendarsInScope: List all calenders in a specified scope
* @param scope Scope of the calendars
* @param asAt The AsAt datetime at which to retrieve the calendars
* @param page The pagination token to use to continue listing calendars from a previous call to list calendars. This value is returned from the previous call. If a pagination token is provided the sortBy, filter, and asAt fields must not have changed since the original request.
* @param limit When paginating, limit the number of returned results to this many.
* @param propertyKeys A list of property keys from the \"Calendar\" domain to decorate onto the calendar, These take the format {domain}/{scope}/{code} e.g. \"Calendar/System/Name\".
* @param filter Expression to filter the result set. Read more about filtering results from LUSID here https://support.lusid.com/filtering-results-from-lusid.
*/
public async listCalendarsInScope (scope: string, asAt?: Date, page?: string, limit?: number, propertyKeys?: Array<string>, filter?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: PagedResourceListOfCalendar; }> {
const localVarPath = this.basePath + '/api/calendars/generic/{scope}'
.replace('{' + 'scope' + '}', encodeURIComponent(String(scope)));
let localVarQueryParameters: any = {};
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
const produces = ['text/plain', 'application/json', 'text/json'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
} else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams: any = {};
// verify required parameter 'scope' is not null or undefined
if (scope === null || scope === undefined) {
throw new Error('Required parameter scope was null or undefined when calling listCalendarsInScope.');
}
if (asAt !== undefined) {
localVarQueryParameters['asAt'] = ObjectSerializer.serialize(asAt, "Date");