@monarkmarkets/api-client 1.2.21 → 1.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/Client.d.ts CHANGED
@@ -55,21 +55,21 @@ export declare class Client {
55
55
  downloadDocument(id: string, token: string): Promise<void>;
56
56
  protected processDownloadDocument(response: Response): Promise<void>;
57
57
  /**
58
- * Create a Financial Advisor in the primary offering.
58
+ * Create a Financial Advisor.
59
59
  * @param body (optional) create Financial Advisor information.
60
60
  * @return The newly created Financial Advisor.
61
61
  */
62
62
  createFinancialAdvisor(body: CreateFinancialAdvisor | undefined): Promise<FinancialAdvisor>;
63
63
  protected processCreateFinancialAdvisor(response: Response): Promise<FinancialAdvisor>;
64
64
  /**
65
- * Update an entire Financial Advisor in the primary offering.
65
+ * Update a Financial Advisor.
66
66
  * @param body (optional) update Financial Advisor information.
67
67
  * @return The updated Financial Advisor.
68
68
  */
69
69
  updateFinancialAdvisor(body: UpdateFinancialAdvisor | undefined): Promise<FinancialAdvisor>;
70
70
  protected processUpdateFinancialAdvisor(response: Response): Promise<FinancialAdvisor>;
71
71
  /**
72
- * Get all Financial Advisors for the authenticated partner's financial institutions.
72
+ * Get all Financial Advisors.
73
73
  * @param page (optional) Number of the page to retrieve.
74
74
  Defaults to 1 if not specified.
75
75
  * @param pageSize (optional) Size of the page to retrieve.
@@ -81,7 +81,7 @@ export declare class Client {
81
81
  getAllFinancialAdvisors(page: number | undefined, pageSize: number | undefined, sortOrder: SortOrder2 | undefined, financialInstitutionId: string | undefined): Promise<FinancialAdvisorApiResponse>;
82
82
  protected processGetAllFinancialAdvisors(response: Response): Promise<FinancialAdvisorApiResponse>;
83
83
  /**
84
- * Get the Financial Advisor by the specified Id.
84
+ * Get a Financial Advisor by Id.
85
85
  * @param id Id of the Financial Advisor to find.
86
86
  * @return Returns the Financial Advisor with the specified Id.
87
87
  */
@@ -745,6 +745,28 @@ export declare class Client {
745
745
  */
746
746
  getAllPreIPOCompanySPVs(investorId: string, monarkStage: MonarkStage | undefined, exemptionsClaimed: ExemptionsClaimed[] | undefined, nameFilter: string | undefined, preIPOCompanyId: string | undefined, preIPOCompanyInvestmentId: string | undefined, isApproved: boolean | undefined, page: number | undefined, pageSize: number | undefined, sortOrder: SortOrder12 | undefined, sortBy: SortBy2 | undefined): Promise<PreIPOCompanySPVApiResponse>;
747
747
  protected processGetAllPreIPOCompanySPVs(response: Response): Promise<PreIPOCompanySPVApiResponse>;
748
+ /**
749
+ * Gets all Financial Institutions that have access to a specific SPV
750
+ * @param spvId ID of the SPV to find Financial Institutions for
751
+ * @param page (optional) Number of the page to retrieve.
752
+ Defaults to 1 if not specified.
753
+ * @param pageSize (optional) Size of the page to retrieve.
754
+ Defaults to 25 if not specified.
755
+ * @return Returns the list of Financial Institutions
756
+ */
757
+ getFinancialInstitutionsForSPV(spvId: string, page: number | undefined, pageSize: number | undefined): Promise<FinancialInstitutionApiResponse>;
758
+ protected processGetFinancialInstitutionsForSPV(response: Response): Promise<FinancialInstitutionApiResponse>;
759
+ /**
760
+ * Gets all SPVs that a Financial Institution has access to
761
+ * @param financialInstitutionId ID of the Financial Institution
762
+ * @param page (optional) Number of the page to retrieve.
763
+ Defaults to 1 if not specified.
764
+ * @param pageSize (optional) Size of the page to retrieve.
765
+ Defaults to 25 if not specified.
766
+ * @return Returns the list of SPVs
767
+ */
768
+ getSPVsForFinancialInstitution(financialInstitutionId: string, page: number | undefined, pageSize: number | undefined): Promise<PreIPOCompanySPV[]>;
769
+ protected processGetSPVsForFinancialInstitution(response: Response): Promise<PreIPOCompanySPV[]>;
748
770
  /**
749
771
  * Gets all SPVs that have been approved.
750
772
  * @param page (optional) Number of the page to retrieve.
@@ -795,14 +817,16 @@ export declare class Client {
795
817
  getAllPartnerSpvApprovals(page: number | undefined, pageSize: number | undefined, sortOrder: SortOrder13 | undefined): Promise<PreIPOCompanySPVPartnerApprovalApiResponse>;
796
818
  protected processGetAllPartnerSpvApprovals(response: Response): Promise<PreIPOCompanySPVPartnerApprovalApiResponse>;
797
819
  /**
798
- * @param body (optional)
799
- * @return Created
820
+ * Create a Questionnaire.
821
+ * @param body (optional) Payload describing the questionnaire to create.
822
+ * @return Returns the created questionnaire.
800
823
  */
801
824
  createQuestionnaire(body: CreateQuestionnaire | undefined): Promise<Questionnaire>;
802
825
  protected processCreateQuestionnaire(response: Response): Promise<Questionnaire>;
803
826
  /**
804
- * @param body (optional)
805
- * @return OK
827
+ * Update a Questionnaire.
828
+ * @param body (optional) Payload containing questionnaire updates.
829
+ * @return Returns the updated questionnaire.
806
830
  */
807
831
  updateQuestionnaire(body: UpdateQuestionnaire | undefined): Promise<Questionnaire>;
808
832
  protected processUpdateQuestionnaire(response: Response): Promise<Questionnaire>;
@@ -818,7 +842,9 @@ export declare class Client {
818
842
  getAllQuestionnaires(page: number | undefined, pageSize: number | undefined, sortOrder: SortOrder14 | undefined): Promise<QuestionnaireApiResponse>;
819
843
  protected processGetAllQuestionnaires(response: Response): Promise<QuestionnaireApiResponse>;
820
844
  /**
821
- * @return No Content
845
+ * Delete a Questionnaire.
846
+ * @param id Identifier of the questionnaire to remove.
847
+ * @return Questionnaire deleted successfully.
822
848
  */
823
849
  deleteQuestionnaire(id: string): Promise<void>;
824
850
  protected processDeleteQuestionnaire(response: Response): Promise<void>;
@@ -7817,13 +7843,9 @@ export declare enum InvestorSubscriptionActionStatus {
7817
7843
  Complete = "Complete"
7818
7844
  }
7819
7845
  export declare enum InvestorSubscriptionActionType {
7820
- Other = "Other",
7821
7846
  DocumentSign = "DocumentSign",
7822
7847
  DocumentAcknowledge = "DocumentAcknowledge",
7823
- CashMovement = "CashMovement",
7824
- ApiCall = "ApiCall",
7825
- TextAcknowledge = "TextAcknowledge",
7826
- KYCAML = "KYCAML"
7848
+ TextAcknowledge = "TextAcknowledge"
7827
7849
  }
7828
7850
  export declare enum InvestorSubscriptionActionResponsibleParty {
7829
7851
  Partner = "Partner",
@@ -8234,13 +8256,9 @@ export declare enum RegisteredFundSubscriptionActionStatus {
8234
8256
  Complete = "Complete"
8235
8257
  }
8236
8258
  export declare enum RegisteredFundSubscriptionActionType {
8237
- Other = "Other",
8238
8259
  DocumentSign = "DocumentSign",
8239
8260
  DocumentAcknowledge = "DocumentAcknowledge",
8240
- CashMovement = "CashMovement",
8241
- ApiCall = "ApiCall",
8242
- TextAcknowledge = "TextAcknowledge",
8243
- KYCAML = "KYCAML"
8261
+ TextAcknowledge = "TextAcknowledge"
8244
8262
  }
8245
8263
  export declare enum RegisteredFundSubscriptionActionResponsibleParty {
8246
8264
  Partner = "Partner",
package/dist/Client.js CHANGED
@@ -329,7 +329,7 @@ export class Client {
329
329
  return Promise.resolve(null);
330
330
  }
331
331
  /**
332
- * Create a Financial Advisor in the primary offering.
332
+ * Create a Financial Advisor.
333
333
  * @param body (optional) create Financial Advisor information.
334
334
  * @return The newly created Financial Advisor.
335
335
  */
@@ -380,7 +380,7 @@ export class Client {
380
380
  return Promise.resolve(null);
381
381
  }
382
382
  /**
383
- * Update an entire Financial Advisor in the primary offering.
383
+ * Update a Financial Advisor.
384
384
  * @param body (optional) update Financial Advisor information.
385
385
  * @return The updated Financial Advisor.
386
386
  */
@@ -431,7 +431,7 @@ export class Client {
431
431
  return Promise.resolve(null);
432
432
  }
433
433
  /**
434
- * Get all Financial Advisors for the authenticated partner's financial institutions.
434
+ * Get all Financial Advisors.
435
435
  * @param page (optional) Number of the page to retrieve.
436
436
  Defaults to 1 if not specified.
437
437
  * @param pageSize (optional) Size of the page to retrieve.
@@ -492,7 +492,7 @@ export class Client {
492
492
  return Promise.resolve(null);
493
493
  }
494
494
  /**
495
- * Get the Financial Advisor by the specified Id.
495
+ * Get a Financial Advisor by Id.
496
496
  * @param id Id of the Financial Advisor to find.
497
497
  * @return Returns the Financial Advisor with the specified Id.
498
498
  */
@@ -4916,6 +4916,139 @@ export class Client {
4916
4916
  }
4917
4917
  return Promise.resolve(null);
4918
4918
  }
4919
+ /**
4920
+ * Gets all Financial Institutions that have access to a specific SPV
4921
+ * @param spvId ID of the SPV to find Financial Institutions for
4922
+ * @param page (optional) Number of the page to retrieve.
4923
+ Defaults to 1 if not specified.
4924
+ * @param pageSize (optional) Size of the page to retrieve.
4925
+ Defaults to 25 if not specified.
4926
+ * @return Returns the list of Financial Institutions
4927
+ */
4928
+ getFinancialInstitutionsForSPV(spvId, page, pageSize) {
4929
+ let url_ = this.baseUrl + "/primary/v1/pre-ipo-company-spv/{spvId}/financial-institutions?";
4930
+ if (spvId === undefined || spvId === null)
4931
+ throw new Error("The parameter 'spvId' must be defined.");
4932
+ url_ = url_.replace("{spvId}", encodeURIComponent("" + spvId));
4933
+ if (page === null)
4934
+ throw new Error("The parameter 'page' cannot be null.");
4935
+ else if (page !== undefined)
4936
+ url_ += "page=" + encodeURIComponent("" + page) + "&";
4937
+ if (pageSize === null)
4938
+ throw new Error("The parameter 'pageSize' cannot be null.");
4939
+ else if (pageSize !== undefined)
4940
+ url_ += "pageSize=" + encodeURIComponent("" + pageSize) + "&";
4941
+ url_ = url_.replace(/[?&]$/, "");
4942
+ let options_ = {
4943
+ method: "GET",
4944
+ headers: {
4945
+ "Accept": "application/json"
4946
+ }
4947
+ };
4948
+ return this.http.fetch(url_, options_).then((_response) => {
4949
+ return this.processGetFinancialInstitutionsForSPV(_response);
4950
+ });
4951
+ }
4952
+ processGetFinancialInstitutionsForSPV(response) {
4953
+ const status = response.status;
4954
+ let _headers = {};
4955
+ if (response.headers && response.headers.forEach) {
4956
+ response.headers.forEach((v, k) => _headers[k] = v);
4957
+ }
4958
+ ;
4959
+ if (status === 200) {
4960
+ return response.text().then((_responseText) => {
4961
+ let result200 = null;
4962
+ let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
4963
+ result200 = FinancialInstitutionApiResponse.fromJS(resultData200);
4964
+ return result200;
4965
+ });
4966
+ }
4967
+ else if (status === 404) {
4968
+ return response.text().then((_responseText) => {
4969
+ let result404 = null;
4970
+ let resultData404 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
4971
+ result404 = ProblemDetails.fromJS(resultData404);
4972
+ return throwException("SPV not found", status, _responseText, _headers, result404);
4973
+ });
4974
+ }
4975
+ else if (status !== 200 && status !== 204) {
4976
+ return response.text().then((_responseText) => {
4977
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
4978
+ });
4979
+ }
4980
+ return Promise.resolve(null);
4981
+ }
4982
+ /**
4983
+ * Gets all SPVs that a Financial Institution has access to
4984
+ * @param financialInstitutionId ID of the Financial Institution
4985
+ * @param page (optional) Number of the page to retrieve.
4986
+ Defaults to 1 if not specified.
4987
+ * @param pageSize (optional) Size of the page to retrieve.
4988
+ Defaults to 25 if not specified.
4989
+ * @return Returns the list of SPVs
4990
+ */
4991
+ getSPVsForFinancialInstitution(financialInstitutionId, page, pageSize) {
4992
+ let url_ = this.baseUrl + "/primary/v1/pre-ipo-company-spv/financial-institution/{financialInstitutionId}/spvs?";
4993
+ if (financialInstitutionId === undefined || financialInstitutionId === null)
4994
+ throw new Error("The parameter 'financialInstitutionId' must be defined.");
4995
+ url_ = url_.replace("{financialInstitutionId}", encodeURIComponent("" + financialInstitutionId));
4996
+ if (page === null)
4997
+ throw new Error("The parameter 'page' cannot be null.");
4998
+ else if (page !== undefined)
4999
+ url_ += "page=" + encodeURIComponent("" + page) + "&";
5000
+ if (pageSize === null)
5001
+ throw new Error("The parameter 'pageSize' cannot be null.");
5002
+ else if (pageSize !== undefined)
5003
+ url_ += "pageSize=" + encodeURIComponent("" + pageSize) + "&";
5004
+ url_ = url_.replace(/[?&]$/, "");
5005
+ let options_ = {
5006
+ method: "GET",
5007
+ headers: {
5008
+ "Accept": "application/json"
5009
+ }
5010
+ };
5011
+ return this.http.fetch(url_, options_).then((_response) => {
5012
+ return this.processGetSPVsForFinancialInstitution(_response);
5013
+ });
5014
+ }
5015
+ processGetSPVsForFinancialInstitution(response) {
5016
+ const status = response.status;
5017
+ let _headers = {};
5018
+ if (response.headers && response.headers.forEach) {
5019
+ response.headers.forEach((v, k) => _headers[k] = v);
5020
+ }
5021
+ ;
5022
+ if (status === 200) {
5023
+ return response.text().then((_responseText) => {
5024
+ let result200 = null;
5025
+ let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
5026
+ if (Array.isArray(resultData200)) {
5027
+ result200 = [];
5028
+ for (let item of resultData200)
5029
+ result200.push(PreIPOCompanySPV.fromJS(item));
5030
+ }
5031
+ else {
5032
+ result200 = null;
5033
+ }
5034
+ return result200;
5035
+ });
5036
+ }
5037
+ else if (status === 404) {
5038
+ return response.text().then((_responseText) => {
5039
+ let result404 = null;
5040
+ let resultData404 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
5041
+ result404 = ProblemDetails.fromJS(resultData404);
5042
+ return throwException("Financial Institution not found", status, _responseText, _headers, result404);
5043
+ });
5044
+ }
5045
+ else if (status !== 200 && status !== 204) {
5046
+ return response.text().then((_responseText) => {
5047
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
5048
+ });
5049
+ }
5050
+ return Promise.resolve(null);
5051
+ }
4919
5052
  /**
4920
5053
  * Gets all SPVs that have been approved.
4921
5054
  * @param page (optional) Number of the page to retrieve.
@@ -5247,8 +5380,9 @@ export class Client {
5247
5380
  return Promise.resolve(null);
5248
5381
  }
5249
5382
  /**
5250
- * @param body (optional)
5251
- * @return Created
5383
+ * Create a Questionnaire.
5384
+ * @param body (optional) Payload describing the questionnaire to create.
5385
+ * @return Returns the created questionnaire.
5252
5386
  */
5253
5387
  createQuestionnaire(body) {
5254
5388
  let url_ = this.baseUrl + "/primary/v1/questionnaire";
@@ -5286,7 +5420,7 @@ export class Client {
5286
5420
  let result400 = null;
5287
5421
  let resultData400 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
5288
5422
  result400 = ProblemDetails.fromJS(resultData400);
5289
- return throwException("Bad Request", status, _responseText, _headers, result400);
5423
+ return throwException("Validation failed for the payload.", status, _responseText, _headers, result400);
5290
5424
  });
5291
5425
  }
5292
5426
  else if (status !== 200 && status !== 204) {
@@ -5297,8 +5431,9 @@ export class Client {
5297
5431
  return Promise.resolve(null);
5298
5432
  }
5299
5433
  /**
5300
- * @param body (optional)
5301
- * @return OK
5434
+ * Update a Questionnaire.
5435
+ * @param body (optional) Payload containing questionnaire updates.
5436
+ * @return Returns the updated questionnaire.
5302
5437
  */
5303
5438
  updateQuestionnaire(body) {
5304
5439
  let url_ = this.baseUrl + "/primary/v1/questionnaire";
@@ -5336,7 +5471,7 @@ export class Client {
5336
5471
  let result400 = null;
5337
5472
  let resultData400 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
5338
5473
  result400 = ProblemDetails.fromJS(resultData400);
5339
- return throwException("Bad Request", status, _responseText, _headers, result400);
5474
+ return throwException("Validation failed for the payload.", status, _responseText, _headers, result400);
5340
5475
  });
5341
5476
  }
5342
5477
  else if (status === 404) {
@@ -5344,7 +5479,7 @@ export class Client {
5344
5479
  let result404 = null;
5345
5480
  let resultData404 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
5346
5481
  result404 = ProblemDetails.fromJS(resultData404);
5347
- return throwException("Not Found", status, _responseText, _headers, result404);
5482
+ return throwException("Questionnaire not found.", status, _responseText, _headers, result404);
5348
5483
  });
5349
5484
  }
5350
5485
  else if (status !== 200 && status !== 204) {
@@ -5427,7 +5562,9 @@ export class Client {
5427
5562
  return Promise.resolve(null);
5428
5563
  }
5429
5564
  /**
5430
- * @return No Content
5565
+ * Delete a Questionnaire.
5566
+ * @param id Identifier of the questionnaire to remove.
5567
+ * @return Questionnaire deleted successfully.
5431
5568
  */
5432
5569
  deleteQuestionnaire(id) {
5433
5570
  let url_ = this.baseUrl + "/primary/v1/questionnaire/{id}";
@@ -5460,7 +5597,7 @@ export class Client {
5460
5597
  let result404 = null;
5461
5598
  let resultData404 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
5462
5599
  result404 = ProblemDetails.fromJS(resultData404);
5463
- return throwException("Not Found", status, _responseText, _headers, result404);
5600
+ return throwException("Questionnaire not found.", status, _responseText, _headers, result404);
5464
5601
  });
5465
5602
  }
5466
5603
  else if (status !== 200 && status !== 204) {
@@ -14672,13 +14809,9 @@ export var InvestorSubscriptionActionStatus;
14672
14809
  })(InvestorSubscriptionActionStatus || (InvestorSubscriptionActionStatus = {}));
14673
14810
  export var InvestorSubscriptionActionType;
14674
14811
  (function (InvestorSubscriptionActionType) {
14675
- InvestorSubscriptionActionType["Other"] = "Other";
14676
14812
  InvestorSubscriptionActionType["DocumentSign"] = "DocumentSign";
14677
14813
  InvestorSubscriptionActionType["DocumentAcknowledge"] = "DocumentAcknowledge";
14678
- InvestorSubscriptionActionType["CashMovement"] = "CashMovement";
14679
- InvestorSubscriptionActionType["ApiCall"] = "ApiCall";
14680
14814
  InvestorSubscriptionActionType["TextAcknowledge"] = "TextAcknowledge";
14681
- InvestorSubscriptionActionType["KYCAML"] = "KYCAML";
14682
14815
  })(InvestorSubscriptionActionType || (InvestorSubscriptionActionType = {}));
14683
14816
  export var InvestorSubscriptionActionResponsibleParty;
14684
14817
  (function (InvestorSubscriptionActionResponsibleParty) {
@@ -15125,13 +15258,9 @@ export var RegisteredFundSubscriptionActionStatus;
15125
15258
  })(RegisteredFundSubscriptionActionStatus || (RegisteredFundSubscriptionActionStatus = {}));
15126
15259
  export var RegisteredFundSubscriptionActionType;
15127
15260
  (function (RegisteredFundSubscriptionActionType) {
15128
- RegisteredFundSubscriptionActionType["Other"] = "Other";
15129
15261
  RegisteredFundSubscriptionActionType["DocumentSign"] = "DocumentSign";
15130
15262
  RegisteredFundSubscriptionActionType["DocumentAcknowledge"] = "DocumentAcknowledge";
15131
- RegisteredFundSubscriptionActionType["CashMovement"] = "CashMovement";
15132
- RegisteredFundSubscriptionActionType["ApiCall"] = "ApiCall";
15133
15263
  RegisteredFundSubscriptionActionType["TextAcknowledge"] = "TextAcknowledge";
15134
- RegisteredFundSubscriptionActionType["KYCAML"] = "KYCAML";
15135
15264
  })(RegisteredFundSubscriptionActionType || (RegisteredFundSubscriptionActionType = {}));
15136
15265
  export var RegisteredFundSubscriptionActionResponsibleParty;
15137
15266
  (function (RegisteredFundSubscriptionActionResponsibleParty) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@monarkmarkets/api-client",
3
- "version": "1.2.21",
3
+ "version": "1.3.1",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.js",
6
6
  "types": "dist/index.d.ts",