@monarkmarkets/api-client 1.3.51 → 1.3.52

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
@@ -1081,9 +1081,10 @@ export declare class Client {
1081
1081
  * Get a Questionnaire by Id
1082
1082
  * @param id ID of the Questionnaire to find.
1083
1083
  * @param investorId (optional) Optional investor ID to filter questions based on Investor details.
1084
+ * @param financialAdvisorId (optional) Optional financial advisor ID to filter questions based on advisor details. Requires investorId to be specified.
1084
1085
  * @return Returns the Questionnaire with the specified Id.
1085
1086
  */
1086
- getQuestionnaireById(id: string, investorId: string | undefined): Promise<Questionnaire>;
1087
+ getQuestionnaireById(id: string, investorId: string | undefined, financialAdvisorId: string | undefined): Promise<Questionnaire>;
1087
1088
  protected processGetQuestionnaireById(response: Response): Promise<Questionnaire>;
1088
1089
  /**
1089
1090
  * Create a QuestionnaireAnswer
@@ -2184,8 +2185,13 @@ export declare class CreateInvestor implements ICreateInvestor {
2184
2185
  /** The Financial Institution ID associated with the Investor.
2185
2186
  If not provided, the default Financial Institution for the Partner will be used. */
2186
2187
  financialInstitutionId?: string | undefined;
2187
- /** The Financial Advisor ID associated with the Investor. */
2188
+ /** The Financial Advisor ID associated with the Investor.
2189
+ For backward compatibility: use this field to assign a single advisor. */
2188
2190
  financialAdvisorId?: string | undefined;
2191
+ /** List of Financial Advisor IDs to associate with the Investor.
2192
+ The first advisor in the list will be marked as primary.
2193
+ Cannot be used together with FinancialAdvisorId. */
2194
+ financialAdvisorIds?: string[] | undefined;
2189
2195
  /** Represents the unique ID provided by a Partner, used to identify an Investor. */
2190
2196
  investorReferenceId: string;
2191
2197
  /** Type of the Investor. */
@@ -2202,8 +2208,13 @@ export interface ICreateInvestor {
2202
2208
  /** The Financial Institution ID associated with the Investor.
2203
2209
  If not provided, the default Financial Institution for the Partner will be used. */
2204
2210
  financialInstitutionId?: string | undefined;
2205
- /** The Financial Advisor ID associated with the Investor. */
2211
+ /** The Financial Advisor ID associated with the Investor.
2212
+ For backward compatibility: use this field to assign a single advisor. */
2206
2213
  financialAdvisorId?: string | undefined;
2214
+ /** List of Financial Advisor IDs to associate with the Investor.
2215
+ The first advisor in the list will be marked as primary.
2216
+ Cannot be used together with FinancialAdvisorId. */
2217
+ financialAdvisorIds?: string[] | undefined;
2207
2218
  /** Represents the unique ID provided by a Partner, used to identify an Investor. */
2208
2219
  investorReferenceId: string;
2209
2220
  /** Type of the Investor. */
@@ -2392,6 +2403,9 @@ export declare class CreateTransaction implements ICreateTransaction {
2392
2403
  isFullExit?: boolean | undefined;
2393
2404
  /** The reference ID of an order submitted. */
2394
2405
  referenceId?: string | undefined;
2406
+ /** The financial advisor ID to assign to this transaction.
2407
+ If not provided, no advisor will be assigned. */
2408
+ financialAdvisorId?: string | undefined;
2395
2409
  constructor(data?: ICreateTransaction);
2396
2410
  init(_data?: any): void;
2397
2411
  static fromJS(data: any): CreateTransaction;
@@ -2414,6 +2428,9 @@ export interface ICreateTransaction {
2414
2428
  isFullExit?: boolean | undefined;
2415
2429
  /** The reference ID of an order submitted. */
2416
2430
  referenceId?: string | undefined;
2431
+ /** The financial advisor ID to assign to this transaction.
2432
+ If not provided, no advisor will be assigned. */
2433
+ financialAdvisorId?: string | undefined;
2417
2434
  }
2418
2435
  /** CreateWatchlist represents the request to create or update a watchlist item. */
2419
2436
  export declare class CreateWatchlist implements ICreateWatchlist {
@@ -3945,8 +3962,12 @@ export declare class Investor implements IInvestor {
3945
3962
  partnerId: string;
3946
3963
  /** The Financial Institution ID associated with the Investor. */
3947
3964
  financialInstitutionId: string | undefined;
3948
- /** The Financial Advisor ID associated with the Investor. */
3965
+ /** The Financial Advisor ID associated with the Investor.
3966
+ For backward compatibility: returns the single advisor ID if investor has exactly one advisor, otherwise null. */
3949
3967
  financialAdvisorId: string | undefined;
3968
+ /** List of Financial Advisor IDs associated with the Investor.
3969
+ Supports many-to-many relationship between investors and advisors. */
3970
+ financialAdvisorIds?: string[] | undefined;
3950
3971
  /** Updated at the specified date. */
3951
3972
  updatedAt?: Date | undefined;
3952
3973
  /** Represents the unique ID provided by a Partner, used to identify an Investor. */
@@ -3982,8 +4003,12 @@ export interface IInvestor {
3982
4003
  partnerId: string;
3983
4004
  /** The Financial Institution ID associated with the Investor. */
3984
4005
  financialInstitutionId: string | undefined;
3985
- /** The Financial Advisor ID associated with the Investor. */
4006
+ /** The Financial Advisor ID associated with the Investor.
4007
+ For backward compatibility: returns the single advisor ID if investor has exactly one advisor, otherwise null. */
3986
4008
  financialAdvisorId: string | undefined;
4009
+ /** List of Financial Advisor IDs associated with the Investor.
4010
+ Supports many-to-many relationship between investors and advisors. */
4011
+ financialAdvisorIds?: string[] | undefined;
3987
4012
  /** Updated at the specified date. */
3988
4013
  updatedAt?: Date | undefined;
3989
4014
  /** Represents the unique ID provided by a Partner, used to identify an Investor. */
@@ -8334,8 +8359,14 @@ export declare class UpdateInvestor implements IUpdateInvestor {
8334
8359
  id: string;
8335
8360
  /** Represents the unique ID provided by a Partner, used to identify an Investor. */
8336
8361
  investorReferenceId?: string | undefined;
8337
- /** The Financial Advisor ID associated with the Investor. */
8362
+ /** The Financial Advisor ID associated with the Investor.
8363
+ For backward compatibility: use this field to update to a single advisor. */
8338
8364
  financialAdvisorId?: string | undefined;
8365
+ /** List of Financial Advisor IDs to associate with the Investor.
8366
+ When provided, replaces all existing advisor associations.
8367
+ The first advisor in the list will be marked as primary.
8368
+ Cannot be used together with FinancialAdvisorId. */
8369
+ financialAdvisorIds?: string[] | undefined;
8339
8370
  constructor(data?: IUpdateInvestor);
8340
8371
  init(_data?: any): void;
8341
8372
  static fromJS(data: any): UpdateInvestor;
@@ -8350,8 +8381,14 @@ export interface IUpdateInvestor {
8350
8381
  id: string;
8351
8382
  /** Represents the unique ID provided by a Partner, used to identify an Investor. */
8352
8383
  investorReferenceId?: string | undefined;
8353
- /** The Financial Advisor ID associated with the Investor. */
8384
+ /** The Financial Advisor ID associated with the Investor.
8385
+ For backward compatibility: use this field to update to a single advisor. */
8354
8386
  financialAdvisorId?: string | undefined;
8387
+ /** List of Financial Advisor IDs to associate with the Investor.
8388
+ When provided, replaces all existing advisor associations.
8389
+ The first advisor in the list will be marked as primary.
8390
+ Cannot be used together with FinancialAdvisorId. */
8391
+ financialAdvisorIds?: string[] | undefined;
8355
8392
  }
8356
8393
  export declare class UpdateInvestorAccreditation implements IUpdateInvestorAccreditation {
8357
8394
  investorId: string;
package/dist/Client.js CHANGED
@@ -6935,9 +6935,10 @@ export class Client {
6935
6935
  * Get a Questionnaire by Id
6936
6936
  * @param id ID of the Questionnaire to find.
6937
6937
  * @param investorId (optional) Optional investor ID to filter questions based on Investor details.
6938
+ * @param financialAdvisorId (optional) Optional financial advisor ID to filter questions based on advisor details. Requires investorId to be specified.
6938
6939
  * @return Returns the Questionnaire with the specified Id.
6939
6940
  */
6940
- getQuestionnaireById(id, investorId) {
6941
+ getQuestionnaireById(id, investorId, financialAdvisorId) {
6941
6942
  let url_ = this.baseUrl + "/primary/v1/questionnaire/{id}?";
6942
6943
  if (id === undefined || id === null)
6943
6944
  throw new globalThis.Error("The parameter 'id' must be defined.");
@@ -6946,6 +6947,10 @@ export class Client {
6946
6947
  throw new globalThis.Error("The parameter 'investorId' cannot be null.");
6947
6948
  else if (investorId !== undefined)
6948
6949
  url_ += "investorId=" + encodeURIComponent("" + investorId) + "&";
6950
+ if (financialAdvisorId === null)
6951
+ throw new globalThis.Error("The parameter 'financialAdvisorId' cannot be null.");
6952
+ else if (financialAdvisorId !== undefined)
6953
+ url_ += "financialAdvisorId=" + encodeURIComponent("" + financialAdvisorId) + "&";
6949
6954
  url_ = url_.replace(/[?&]$/, "");
6950
6955
  let options_ = {
6951
6956
  method: "GET",
@@ -6972,6 +6977,14 @@ export class Client {
6972
6977
  return result200;
6973
6978
  });
6974
6979
  }
6980
+ else if (status === 400) {
6981
+ return response.text().then((_responseText) => {
6982
+ let result400 = null;
6983
+ let resultData400 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
6984
+ result400 = ProblemDetails.fromJS(resultData400);
6985
+ return throwException("financialAdvisorId was provided without investorId.", status, _responseText, _headers, result400);
6986
+ });
6987
+ }
6975
6988
  else if (status === 404) {
6976
6989
  return response.text().then((_responseText) => {
6977
6990
  let result404 = null;
@@ -10499,6 +10512,11 @@ export class CreateInvestor {
10499
10512
  if (_data) {
10500
10513
  this.financialInstitutionId = _data["financialInstitutionId"];
10501
10514
  this.financialAdvisorId = _data["financialAdvisorId"];
10515
+ if (Array.isArray(_data["financialAdvisorIds"])) {
10516
+ this.financialAdvisorIds = [];
10517
+ for (let item of _data["financialAdvisorIds"])
10518
+ this.financialAdvisorIds.push(item);
10519
+ }
10502
10520
  this.investorReferenceId = _data["investorReferenceId"];
10503
10521
  this.type = _data["type"];
10504
10522
  this.pii = _data["pii"] ? InvestorPii.fromJS(_data["pii"]) : undefined;
@@ -10514,6 +10532,11 @@ export class CreateInvestor {
10514
10532
  data = typeof data === 'object' ? data : {};
10515
10533
  data["financialInstitutionId"] = this.financialInstitutionId;
10516
10534
  data["financialAdvisorId"] = this.financialAdvisorId;
10535
+ if (Array.isArray(this.financialAdvisorIds)) {
10536
+ data["financialAdvisorIds"] = [];
10537
+ for (let item of this.financialAdvisorIds)
10538
+ data["financialAdvisorIds"].push(item);
10539
+ }
10517
10540
  data["investorReferenceId"] = this.investorReferenceId;
10518
10541
  data["type"] = this.type;
10519
10542
  data["pii"] = this.pii ? this.pii.toJSON() : undefined;
@@ -10792,6 +10815,7 @@ export class CreateTransaction {
10792
10815
  this.amountShares = _data["amountShares"];
10793
10816
  this.isFullExit = _data["isFullExit"];
10794
10817
  this.referenceId = _data["referenceId"];
10818
+ this.financialAdvisorId = _data["financialAdvisorId"];
10795
10819
  }
10796
10820
  }
10797
10821
  static fromJS(data) {
@@ -10810,6 +10834,7 @@ export class CreateTransaction {
10810
10834
  data["amountShares"] = this.amountShares;
10811
10835
  data["isFullExit"] = this.isFullExit;
10812
10836
  data["referenceId"] = this.referenceId;
10837
+ data["financialAdvisorId"] = this.financialAdvisorId;
10813
10838
  return data;
10814
10839
  }
10815
10840
  }
@@ -12491,6 +12516,11 @@ export class Investor {
12491
12516
  this.partnerId = _data["partnerId"];
12492
12517
  this.financialInstitutionId = _data["financialInstitutionId"];
12493
12518
  this.financialAdvisorId = _data["financialAdvisorId"];
12519
+ if (Array.isArray(_data["financialAdvisorIds"])) {
12520
+ this.financialAdvisorIds = [];
12521
+ for (let item of _data["financialAdvisorIds"])
12522
+ this.financialAdvisorIds.push(item);
12523
+ }
12494
12524
  this.updatedAt = _data["updatedAt"] ? new Date(_data["updatedAt"].toString()) : undefined;
12495
12525
  this.investorReferenceId = _data["investorReferenceId"];
12496
12526
  this.status = _data["status"];
@@ -12516,6 +12546,11 @@ export class Investor {
12516
12546
  data["partnerId"] = this.partnerId;
12517
12547
  data["financialInstitutionId"] = this.financialInstitutionId;
12518
12548
  data["financialAdvisorId"] = this.financialAdvisorId;
12549
+ if (Array.isArray(this.financialAdvisorIds)) {
12550
+ data["financialAdvisorIds"] = [];
12551
+ for (let item of this.financialAdvisorIds)
12552
+ data["financialAdvisorIds"].push(item);
12553
+ }
12519
12554
  data["updatedAt"] = this.updatedAt ? this.updatedAt.toISOString() : undefined;
12520
12555
  data["investorReferenceId"] = this.investorReferenceId;
12521
12556
  data["status"] = this.status;
@@ -17518,6 +17553,11 @@ export class UpdateInvestor {
17518
17553
  this.id = _data["id"];
17519
17554
  this.investorReferenceId = _data["investorReferenceId"];
17520
17555
  this.financialAdvisorId = _data["financialAdvisorId"];
17556
+ if (Array.isArray(_data["financialAdvisorIds"])) {
17557
+ this.financialAdvisorIds = [];
17558
+ for (let item of _data["financialAdvisorIds"])
17559
+ this.financialAdvisorIds.push(item);
17560
+ }
17521
17561
  }
17522
17562
  }
17523
17563
  static fromJS(data) {
@@ -17533,6 +17573,11 @@ export class UpdateInvestor {
17533
17573
  data["id"] = this.id;
17534
17574
  data["investorReferenceId"] = this.investorReferenceId;
17535
17575
  data["financialAdvisorId"] = this.financialAdvisorId;
17576
+ if (Array.isArray(this.financialAdvisorIds)) {
17577
+ data["financialAdvisorIds"] = [];
17578
+ for (let item of this.financialAdvisorIds)
17579
+ data["financialAdvisorIds"].push(item);
17580
+ }
17536
17581
  return data;
17537
17582
  }
17538
17583
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@monarkmarkets/api-client",
3
- "version": "1.3.51",
3
+ "version": "1.3.52",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.js",
6
6
  "types": "dist/index.d.ts",