@monarkmarkets/api-client 1.1.114 → 1.1.115

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
@@ -220,12 +220,13 @@ export declare class Client {
220
220
  * @param status (optional) Optional subscription status to filter on.
221
221
  * @param preIPOCompanyName (optional) Optional Company Name to filter on.
222
222
  * @param preIPOCompanySPVName (optional) Optional SPV Name to filter on.
223
+ * @param tradingSymbol (optional) Optional Trading Symbol to filter on.
223
224
  * @param page (optional)
224
225
  * @param pageSize (optional)
225
226
  * @param sortOrder (optional)
226
227
  * @return OK
227
228
  */
228
- investorSubscriptionGET(preIpoCompanySpvId: string | undefined, investorId: string | undefined, status: Status | undefined, preIPOCompanyName: string | undefined, preIPOCompanySPVName: string | undefined, page: number | undefined, pageSize: number | undefined, sortOrder: SortOrder6 | undefined): Promise<InvestorSubscriptionApiResponse>;
229
+ investorSubscriptionGET(preIpoCompanySpvId: string | undefined, investorId: string | undefined, status: Status | undefined, preIPOCompanyName: string | undefined, preIPOCompanySPVName: string | undefined, tradingSymbol: string | undefined, page: number | undefined, pageSize: number | undefined, sortOrder: SortOrder6 | undefined): Promise<InvestorSubscriptionApiResponse>;
229
230
  protected processInvestorSubscriptionGET(response: Response): Promise<InvestorSubscriptionApiResponse>;
230
231
  /**
231
232
  * Update an InvestorSubscription.
@@ -652,12 +653,17 @@ export declare class Client {
652
653
  investorGET6(investorId: string, monarkStage: MonarkStage | undefined, exemptionsClaimed: ExemptionsClaimed[] | undefined, nameFilter: string | undefined, preIPOCompanyId: string | undefined, preIPOCompanyInvestmentId: string | undefined, page: number | undefined, pageSize: number | undefined, sortOrder: SortOrder12 | undefined, sortBy: SortBy2 | undefined): Promise<PreIPOCompanySPVApiResponse>;
653
654
  protected processInvestorGET6(response: Response): Promise<PreIPOCompanySPVApiResponse>;
654
655
  /**
655
- * Get a Questionnaire by Id
656
- * @param id ID of the Questionnaire to find.
657
- * @return Returns the Questionnaire with the specified Id.
656
+ * @param body (optional)
657
+ * @return Created
658
+ */
659
+ questionnairePOST(body: CreateQuestionnaire | undefined): Promise<Questionnaire>;
660
+ protected processQuestionnairePOST(response: Response): Promise<Questionnaire>;
661
+ /**
662
+ * @param body (optional)
663
+ * @return OK
658
664
  */
659
- questionnaire(id: string): Promise<Questionnaire>;
660
- protected processQuestionnaire(response: Response): Promise<Questionnaire>;
665
+ questionnairePUT(body: UpdateQuestionnaire | undefined): Promise<Questionnaire>;
666
+ protected processQuestionnairePUT(response: Response): Promise<Questionnaire>;
661
667
  /**
662
668
  * Get all Questionnaires
663
669
  * @param page (optional)
@@ -665,8 +671,20 @@ export declare class Client {
665
671
  * @param sortOrder (optional)
666
672
  * @return Returns the list of Questionnaires.
667
673
  */
668
- questionnaire2(page: number | undefined, pageSize: number | undefined, sortOrder: SortOrder13 | undefined): Promise<QuestionnaireApiResponse>;
669
- protected processQuestionnaire2(response: Response): Promise<QuestionnaireApiResponse>;
674
+ questionnaireGET(page: number | undefined, pageSize: number | undefined, sortOrder: SortOrder13 | undefined): Promise<QuestionnaireApiResponse>;
675
+ protected processQuestionnaireGET(response: Response): Promise<QuestionnaireApiResponse>;
676
+ /**
677
+ * @return No Content
678
+ */
679
+ questionnaireDELETE(id: string): Promise<void>;
680
+ protected processQuestionnaireDELETE(response: Response): Promise<void>;
681
+ /**
682
+ * Get a Questionnaire by Id
683
+ * @param id ID of the Questionnaire to find.
684
+ * @return Returns the Questionnaire with the specified Id.
685
+ */
686
+ questionnaireGET2(id: string): Promise<Questionnaire>;
687
+ protected processQuestionnaireGET2(response: Response): Promise<Questionnaire>;
670
688
  /**
671
689
  * Create a QuestionnaireAnswer
672
690
  * @param body (optional) create QuestionnaireAnswer information.
@@ -1367,6 +1385,28 @@ export interface ICreateInvestorSubscription {
1367
1385
  /** Describes the amount, in dollars, an Investor intends to invest into an SPV. */
1368
1386
  amountReservedDollars: number;
1369
1387
  }
1388
+ /** Create Questionnaire allows the creation of a questionaire with the primary offerring. */
1389
+ export declare class CreateQuestionnaire implements ICreateQuestionnaire {
1390
+ /** Name of Questionnaire. */
1391
+ name: string;
1392
+ /** Title of Questionnaire. */
1393
+ title: string;
1394
+ /** Questions to create with the questionnaire. */
1395
+ createQuestions: CreateQuestionnaireQuestion[];
1396
+ constructor(data?: ICreateQuestionnaire);
1397
+ init(_data?: any): void;
1398
+ static fromJS(data: any): CreateQuestionnaire;
1399
+ toJSON(data?: any): any;
1400
+ }
1401
+ /** Create Questionnaire allows the creation of a questionaire with the primary offerring. */
1402
+ export interface ICreateQuestionnaire {
1403
+ /** Name of Questionnaire. */
1404
+ name: string;
1405
+ /** Title of Questionnaire. */
1406
+ title: string;
1407
+ /** Questions to create with the questionnaire. */
1408
+ createQuestions: CreateQuestionnaireQuestion[];
1409
+ }
1370
1410
  /** Create the Questionnaire answer. */
1371
1411
  export declare class CreateQuestionnaireAnswer implements ICreateQuestionnaireAnswer {
1372
1412
  /** Unique ID of the Questionnaire being answered. */
@@ -1389,6 +1429,56 @@ export interface ICreateQuestionnaireAnswer {
1389
1429
  /** Pairing of all the Questions and Investor-provided responses associated with the Questionnaire. */
1390
1430
  createQuestionAnswers: CreateQuestionnaireQuestionAnswer[];
1391
1431
  }
1432
+ /** Create Questionnaire Question. */
1433
+ export declare class CreateQuestionnaireQuestion implements ICreateQuestionnaireQuestion {
1434
+ /** Identifier for the question. */
1435
+ identifier: string;
1436
+ /** Order sequence of the question within the Questionnaire. */
1437
+ sequence: number;
1438
+ /** Question status, could be active or disabled. Questions can be set to disabled and new questions created if a Partners elects to edit one or more of the questions presented to their Investors. */
1439
+ status: CreateQuestionnaireQuestionStatus;
1440
+ /** Text of the question. */
1441
+ text: string;
1442
+ /** An explanation of the question presented within a Questionnaire. Helps the Investor understand the question being asked by providing additional context. */
1443
+ explanation: string | undefined;
1444
+ /** Format of the question. */
1445
+ format: CreateQuestionnaireQuestionFormat;
1446
+ /** A list of potential answers associated with a question. */
1447
+ options?: string[] | undefined;
1448
+ /** Optional minimum value for a scale question. */
1449
+ scaleMin?: number | undefined;
1450
+ /** Optional maximum value for a scale question. */
1451
+ scaleMax?: number | undefined;
1452
+ /** Optional step value for a scale question. */
1453
+ scaleStep?: number | undefined;
1454
+ constructor(data?: ICreateQuestionnaireQuestion);
1455
+ init(_data?: any): void;
1456
+ static fromJS(data: any): CreateQuestionnaireQuestion;
1457
+ toJSON(data?: any): any;
1458
+ }
1459
+ /** Create Questionnaire Question. */
1460
+ export interface ICreateQuestionnaireQuestion {
1461
+ /** Identifier for the question. */
1462
+ identifier: string;
1463
+ /** Order sequence of the question within the Questionnaire. */
1464
+ sequence: number;
1465
+ /** Question status, could be active or disabled. Questions can be set to disabled and new questions created if a Partners elects to edit one or more of the questions presented to their Investors. */
1466
+ status: CreateQuestionnaireQuestionStatus;
1467
+ /** Text of the question. */
1468
+ text: string;
1469
+ /** An explanation of the question presented within a Questionnaire. Helps the Investor understand the question being asked by providing additional context. */
1470
+ explanation: string | undefined;
1471
+ /** Format of the question. */
1472
+ format: CreateQuestionnaireQuestionFormat;
1473
+ /** A list of potential answers associated with a question. */
1474
+ options?: string[] | undefined;
1475
+ /** Optional minimum value for a scale question. */
1476
+ scaleMin?: number | undefined;
1477
+ /** Optional maximum value for a scale question. */
1478
+ scaleMax?: number | undefined;
1479
+ /** Optional step value for a scale question. */
1480
+ scaleStep?: number | undefined;
1481
+ }
1392
1482
  /** Create the Questionnaire Question Answer. */
1393
1483
  export declare class CreateQuestionnaireQuestionAnswer implements ICreateQuestionnaireQuestionAnswer {
1394
1484
  /** Questionnaire QuestionId of the question being answered. */
@@ -5541,6 +5631,84 @@ export interface IUpdateInvestorSubscriptionOrderReference {
5541
5631
  investorSubscriptionId: string;
5542
5632
  orderReferenceId: string;
5543
5633
  }
5634
+ /** Update Questionnaire allows the update of a questionnaire with the primary offerring. */
5635
+ export declare class UpdateQuestionnaire implements IUpdateQuestionnaire {
5636
+ id: string;
5637
+ /** Name of Questionnaire. */
5638
+ name: string;
5639
+ /** Title of Questionnaire. */
5640
+ title: string;
5641
+ /** Questions to update with the questionnaire. */
5642
+ questions: UpdateQuestionnaireQuestion[];
5643
+ constructor(data?: IUpdateQuestionnaire);
5644
+ init(_data?: any): void;
5645
+ static fromJS(data: any): UpdateQuestionnaire;
5646
+ toJSON(data?: any): any;
5647
+ }
5648
+ /** Update Questionnaire allows the update of a questionnaire with the primary offerring. */
5649
+ export interface IUpdateQuestionnaire {
5650
+ id: string;
5651
+ /** Name of Questionnaire. */
5652
+ name: string;
5653
+ /** Title of Questionnaire. */
5654
+ title: string;
5655
+ /** Questions to update with the questionnaire. */
5656
+ questions: UpdateQuestionnaireQuestion[];
5657
+ }
5658
+ /** Questionnaire Question. */
5659
+ export declare class UpdateQuestionnaireQuestion implements IUpdateQuestionnaireQuestion {
5660
+ /** Unique ID associated with a Questionnaire question. */
5661
+ id?: string | undefined;
5662
+ /** Identifier for the question. */
5663
+ identifier: string;
5664
+ /** Order sequence of the question within the Questionnaire. */
5665
+ sequence: number;
5666
+ /** Question status, could be active or disabled. Questions can be set to disabled and new questions created if a Partners elects to edit one or more of the questions presented to their Investors. */
5667
+ status?: UpdateQuestionnaireQuestionStatus;
5668
+ /** Text of the question. */
5669
+ text: string;
5670
+ /** An explanation of the question presented within a Questionnaire. Helps the Investor understand the question being asked by providing additional context. */
5671
+ explanation: string | undefined;
5672
+ /** Format of the question. */
5673
+ format: UpdateQuestionnaireQuestionFormat;
5674
+ /** A list of potential answers associated with a question. */
5675
+ options?: string[] | undefined;
5676
+ /** Optional minimum value for a scale question. */
5677
+ scaleMin?: number | undefined;
5678
+ /** Optional maximum value for a scale question. */
5679
+ scaleMax?: number | undefined;
5680
+ /** Optional step value for a scale question. */
5681
+ scaleStep?: number | undefined;
5682
+ constructor(data?: IUpdateQuestionnaireQuestion);
5683
+ init(_data?: any): void;
5684
+ static fromJS(data: any): UpdateQuestionnaireQuestion;
5685
+ toJSON(data?: any): any;
5686
+ }
5687
+ /** Questionnaire Question. */
5688
+ export interface IUpdateQuestionnaireQuestion {
5689
+ /** Unique ID associated with a Questionnaire question. */
5690
+ id?: string | undefined;
5691
+ /** Identifier for the question. */
5692
+ identifier: string;
5693
+ /** Order sequence of the question within the Questionnaire. */
5694
+ sequence: number;
5695
+ /** Question status, could be active or disabled. Questions can be set to disabled and new questions created if a Partners elects to edit one or more of the questions presented to their Investors. */
5696
+ status?: UpdateQuestionnaireQuestionStatus;
5697
+ /** Text of the question. */
5698
+ text: string;
5699
+ /** An explanation of the question presented within a Questionnaire. Helps the Investor understand the question being asked by providing additional context. */
5700
+ explanation: string | undefined;
5701
+ /** Format of the question. */
5702
+ format: UpdateQuestionnaireQuestionFormat;
5703
+ /** A list of potential answers associated with a question. */
5704
+ options?: string[] | undefined;
5705
+ /** Optional minimum value for a scale question. */
5706
+ scaleMin?: number | undefined;
5707
+ /** Optional maximum value for a scale question. */
5708
+ scaleMax?: number | undefined;
5709
+ /** Optional step value for a scale question. */
5710
+ scaleStep?: number | undefined;
5711
+ }
5544
5712
  export declare class UpdateWebhook implements IUpdateWebhook {
5545
5713
  /** Unique ID associated with a Webhook. */
5546
5714
  id: string;
@@ -5962,6 +6130,22 @@ export declare enum CreateInvestorType {
5962
6130
  IndividualInvestor = "IndividualInvestor",
5963
6131
  EntityInvestor = "EntityInvestor"
5964
6132
  }
6133
+ export declare enum CreateQuestionnaireQuestionStatus {
6134
+ DISABLED = "DISABLED",
6135
+ ACTIVE = "ACTIVE"
6136
+ }
6137
+ export declare enum CreateQuestionnaireQuestionFormat {
6138
+ Integer = "Integer",
6139
+ Float = "Float",
6140
+ Percentage = "Percentage",
6141
+ MultipleChoiceSingle = "MultipleChoiceSingle",
6142
+ MultipleChoiceMultiple = "MultipleChoiceMultiple",
6143
+ Boolean = "Boolean",
6144
+ Date = "Date",
6145
+ Text = "Text",
6146
+ Email = "Email",
6147
+ Scale = "Scale"
6148
+ }
5965
6149
  export declare enum DocumentType2 {
5966
6150
  BUSINESS_FORMATION = "BUSINESS_FORMATION",
5967
6151
  BANK_STATEMENT = "BANK_STATEMENT",
@@ -6396,6 +6580,22 @@ export declare enum UpdateInvestorAccreditationAccreditationStatus {
6396
6580
  FAMILY_OFFICE_GT_5M = "FAMILY_OFFICE_GT_5M",
6397
6581
  NOT_APPLICABLE = "NOT_APPLICABLE"
6398
6582
  }
6583
+ export declare enum UpdateQuestionnaireQuestionStatus {
6584
+ DISABLED = "DISABLED",
6585
+ ACTIVE = "ACTIVE"
6586
+ }
6587
+ export declare enum UpdateQuestionnaireQuestionFormat {
6588
+ Integer = "Integer",
6589
+ Float = "Float",
6590
+ Percentage = "Percentage",
6591
+ MultipleChoiceSingle = "MultipleChoiceSingle",
6592
+ MultipleChoiceMultiple = "MultipleChoiceMultiple",
6593
+ Boolean = "Boolean",
6594
+ Date = "Date",
6595
+ Text = "Text",
6596
+ Email = "Email",
6597
+ Scale = "Scale"
6598
+ }
6399
6599
  export declare enum WebhookEventDeliveryStatus {
6400
6600
  Pending = "Pending",
6401
6601
  Delivered = "Delivered",
package/dist/Client.js CHANGED
@@ -1497,12 +1497,13 @@ export class Client {
1497
1497
  * @param status (optional) Optional subscription status to filter on.
1498
1498
  * @param preIPOCompanyName (optional) Optional Company Name to filter on.
1499
1499
  * @param preIPOCompanySPVName (optional) Optional SPV Name to filter on.
1500
+ * @param tradingSymbol (optional) Optional Trading Symbol to filter on.
1500
1501
  * @param page (optional)
1501
1502
  * @param pageSize (optional)
1502
1503
  * @param sortOrder (optional)
1503
1504
  * @return OK
1504
1505
  */
1505
- investorSubscriptionGET(preIpoCompanySpvId, investorId, status, preIPOCompanyName, preIPOCompanySPVName, page, pageSize, sortOrder) {
1506
+ investorSubscriptionGET(preIpoCompanySpvId, investorId, status, preIPOCompanyName, preIPOCompanySPVName, tradingSymbol, page, pageSize, sortOrder) {
1506
1507
  let url_ = this.baseUrl + "/primary/v1/investor-subscription?";
1507
1508
  if (preIpoCompanySpvId === null)
1508
1509
  throw new Error("The parameter 'preIpoCompanySpvId' cannot be null.");
@@ -1524,6 +1525,10 @@ export class Client {
1524
1525
  throw new Error("The parameter 'preIPOCompanySPVName' cannot be null.");
1525
1526
  else if (preIPOCompanySPVName !== undefined)
1526
1527
  url_ += "preIPOCompanySPVName=" + encodeURIComponent("" + preIPOCompanySPVName) + "&";
1528
+ if (tradingSymbol === null)
1529
+ throw new Error("The parameter 'tradingSymbol' cannot be null.");
1530
+ else if (tradingSymbol !== undefined)
1531
+ url_ += "tradingSymbol=" + encodeURIComponent("" + tradingSymbol) + "&";
1527
1532
  if (page === null)
1528
1533
  throw new Error("The parameter 'page' cannot be null.");
1529
1534
  else if (page !== undefined)
@@ -4546,27 +4551,76 @@ export class Client {
4546
4551
  return Promise.resolve(null);
4547
4552
  }
4548
4553
  /**
4549
- * Get a Questionnaire by Id
4550
- * @param id ID of the Questionnaire to find.
4551
- * @return Returns the Questionnaire with the specified Id.
4554
+ * @param body (optional)
4555
+ * @return Created
4552
4556
  */
4553
- questionnaire(id) {
4554
- let url_ = this.baseUrl + "/primary/v1/questionnaire/{id}";
4555
- if (id === undefined || id === null)
4556
- throw new Error("The parameter 'id' must be defined.");
4557
- url_ = url_.replace("{id}", encodeURIComponent("" + id));
4557
+ questionnairePOST(body) {
4558
+ let url_ = this.baseUrl + "/primary/v1/questionnaire";
4558
4559
  url_ = url_.replace(/[?&]$/, "");
4560
+ const content_ = JSON.stringify(body);
4559
4561
  let options_ = {
4560
- method: "GET",
4562
+ body: content_,
4563
+ method: "POST",
4561
4564
  headers: {
4565
+ "Content-Type": "application/json",
4562
4566
  "Accept": "application/json"
4563
4567
  }
4564
4568
  };
4565
4569
  return this.http.fetch(url_, options_).then((_response) => {
4566
- return this.processQuestionnaire(_response);
4570
+ return this.processQuestionnairePOST(_response);
4567
4571
  });
4568
4572
  }
4569
- processQuestionnaire(response) {
4573
+ processQuestionnairePOST(response) {
4574
+ const status = response.status;
4575
+ let _headers = {};
4576
+ if (response.headers && response.headers.forEach) {
4577
+ response.headers.forEach((v, k) => _headers[k] = v);
4578
+ }
4579
+ ;
4580
+ if (status === 201) {
4581
+ return response.text().then((_responseText) => {
4582
+ let result201 = null;
4583
+ let resultData201 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
4584
+ result201 = Questionnaire.fromJS(resultData201);
4585
+ return result201;
4586
+ });
4587
+ }
4588
+ else if (status === 400) {
4589
+ return response.text().then((_responseText) => {
4590
+ let result400 = null;
4591
+ let resultData400 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
4592
+ result400 = ProblemDetails.fromJS(resultData400);
4593
+ return throwException("Bad Request", status, _responseText, _headers, result400);
4594
+ });
4595
+ }
4596
+ else if (status !== 200 && status !== 204) {
4597
+ return response.text().then((_responseText) => {
4598
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
4599
+ });
4600
+ }
4601
+ return Promise.resolve(null);
4602
+ }
4603
+ /**
4604
+ * @param body (optional)
4605
+ * @return OK
4606
+ */
4607
+ questionnairePUT(body) {
4608
+ let url_ = this.baseUrl + "/primary/v1/questionnaire";
4609
+ url_ = url_.replace(/[?&]$/, "");
4610
+ const content_ = JSON.stringify(body);
4611
+ let options_ = {
4612
+ body: content_,
4613
+ method: "PUT",
4614
+ headers: {
4615
+ "Content-Type": "application/json",
4616
+ "Accept": "application/json"
4617
+ }
4618
+ };
4619
+ return this.http.fetch(url_, options_).then((_response) => {
4620
+ return this.processQuestionnairePUT(_response);
4621
+ });
4622
+ }
4623
+ processQuestionnairePUT(response) {
4570
4624
  const status = response.status;
4571
4625
  let _headers = {};
4572
4626
  if (response.headers && response.headers.forEach) {
@@ -4581,12 +4635,20 @@ export class Client {
4581
4635
  return result200;
4582
4636
  });
4583
4637
  }
4638
+ else if (status === 400) {
4639
+ return response.text().then((_responseText) => {
4640
+ let result400 = null;
4641
+ let resultData400 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
4642
+ result400 = ProblemDetails.fromJS(resultData400);
4643
+ return throwException("Bad Request", status, _responseText, _headers, result400);
4644
+ });
4645
+ }
4584
4646
  else if (status === 404) {
4585
4647
  return response.text().then((_responseText) => {
4586
4648
  let result404 = null;
4587
4649
  let resultData404 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
4588
4650
  result404 = ProblemDetails.fromJS(resultData404);
4589
- return throwException("Questionnaire not found.", status, _responseText, _headers, result404);
4651
+ return throwException("Not Found", status, _responseText, _headers, result404);
4590
4652
  });
4591
4653
  }
4592
4654
  else if (status !== 200 && status !== 204) {
@@ -4603,7 +4665,7 @@ export class Client {
4603
4665
  * @param sortOrder (optional)
4604
4666
  * @return Returns the list of Questionnaires.
4605
4667
  */
4606
- questionnaire2(page, pageSize, sortOrder) {
4668
+ questionnaireGET(page, pageSize, sortOrder) {
4607
4669
  let url_ = this.baseUrl + "/primary/v1/questionnaire?";
4608
4670
  if (page === null)
4609
4671
  throw new Error("The parameter 'page' cannot be null.");
@@ -4625,10 +4687,10 @@ export class Client {
4625
4687
  }
4626
4688
  };
4627
4689
  return this.http.fetch(url_, options_).then((_response) => {
4628
- return this.processQuestionnaire2(_response);
4690
+ return this.processQuestionnaireGET(_response);
4629
4691
  });
4630
4692
  }
4631
- processQuestionnaire2(response) {
4693
+ processQuestionnaireGET(response) {
4632
4694
  const status = response.status;
4633
4695
  let _headers = {};
4634
4696
  if (response.headers && response.headers.forEach) {
@@ -4666,6 +4728,101 @@ export class Client {
4666
4728
  }
4667
4729
  return Promise.resolve(null);
4668
4730
  }
4731
+ /**
4732
+ * @return No Content
4733
+ */
4734
+ questionnaireDELETE(id) {
4735
+ let url_ = this.baseUrl + "/primary/v1/questionnaire/{id}";
4736
+ if (id === undefined || id === null)
4737
+ throw new Error("The parameter 'id' must be defined.");
4738
+ url_ = url_.replace("{id}", encodeURIComponent("" + id));
4739
+ url_ = url_.replace(/[?&]$/, "");
4740
+ let options_ = {
4741
+ method: "DELETE",
4742
+ headers: {}
4743
+ };
4744
+ return this.http.fetch(url_, options_).then((_response) => {
4745
+ return this.processQuestionnaireDELETE(_response);
4746
+ });
4747
+ }
4748
+ processQuestionnaireDELETE(response) {
4749
+ const status = response.status;
4750
+ let _headers = {};
4751
+ if (response.headers && response.headers.forEach) {
4752
+ response.headers.forEach((v, k) => _headers[k] = v);
4753
+ }
4754
+ ;
4755
+ if (status === 204) {
4756
+ return response.text().then((_responseText) => {
4757
+ return;
4758
+ });
4759
+ }
4760
+ else if (status === 404) {
4761
+ return response.text().then((_responseText) => {
4762
+ let result404 = null;
4763
+ let resultData404 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
4764
+ result404 = ProblemDetails.fromJS(resultData404);
4765
+ return throwException("Not Found", status, _responseText, _headers, result404);
4766
+ });
4767
+ }
4768
+ else if (status !== 200 && status !== 204) {
4769
+ return response.text().then((_responseText) => {
4770
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
4771
+ });
4772
+ }
4773
+ return Promise.resolve(null);
4774
+ }
4775
+ /**
4776
+ * Get a Questionnaire by Id
4777
+ * @param id ID of the Questionnaire to find.
4778
+ * @return Returns the Questionnaire with the specified Id.
4779
+ */
4780
+ questionnaireGET2(id) {
4781
+ let url_ = this.baseUrl + "/primary/v1/questionnaire/{id}";
4782
+ if (id === undefined || id === null)
4783
+ throw new Error("The parameter 'id' must be defined.");
4784
+ url_ = url_.replace("{id}", encodeURIComponent("" + id));
4785
+ url_ = url_.replace(/[?&]$/, "");
4786
+ let options_ = {
4787
+ method: "GET",
4788
+ headers: {
4789
+ "Accept": "application/json"
4790
+ }
4791
+ };
4792
+ return this.http.fetch(url_, options_).then((_response) => {
4793
+ return this.processQuestionnaireGET2(_response);
4794
+ });
4795
+ }
4796
+ processQuestionnaireGET2(response) {
4797
+ const status = response.status;
4798
+ let _headers = {};
4799
+ if (response.headers && response.headers.forEach) {
4800
+ response.headers.forEach((v, k) => _headers[k] = v);
4801
+ }
4802
+ ;
4803
+ if (status === 200) {
4804
+ return response.text().then((_responseText) => {
4805
+ let result200 = null;
4806
+ let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
4807
+ result200 = Questionnaire.fromJS(resultData200);
4808
+ return result200;
4809
+ });
4810
+ }
4811
+ else if (status === 404) {
4812
+ return response.text().then((_responseText) => {
4813
+ let result404 = null;
4814
+ let resultData404 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
4815
+ result404 = ProblemDetails.fromJS(resultData404);
4816
+ return throwException("Questionnaire not found.", status, _responseText, _headers, result404);
4817
+ });
4818
+ }
4819
+ else if (status !== 200 && status !== 204) {
4820
+ return response.text().then((_responseText) => {
4821
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
4822
+ });
4823
+ }
4824
+ return Promise.resolve(null);
4825
+ }
4669
4826
  /**
4670
4827
  * Create a QuestionnaireAnswer
4671
4828
  * @param body (optional) create QuestionnaireAnswer information.
@@ -6516,6 +6673,48 @@ export class CreateInvestorSubscription {
6516
6673
  return data;
6517
6674
  }
6518
6675
  }
6676
+ /** Create Questionnaire allows the creation of a questionaire with the primary offerring. */
6677
+ export class CreateQuestionnaire {
6678
+ constructor(data) {
6679
+ if (data) {
6680
+ for (var property in data) {
6681
+ if (data.hasOwnProperty(property))
6682
+ this[property] = data[property];
6683
+ }
6684
+ }
6685
+ if (!data) {
6686
+ this.createQuestions = [];
6687
+ }
6688
+ }
6689
+ init(_data) {
6690
+ if (_data) {
6691
+ this.name = _data["name"];
6692
+ this.title = _data["title"];
6693
+ if (Array.isArray(_data["createQuestions"])) {
6694
+ this.createQuestions = [];
6695
+ for (let item of _data["createQuestions"])
6696
+ this.createQuestions.push(CreateQuestionnaireQuestion.fromJS(item));
6697
+ }
6698
+ }
6699
+ }
6700
+ static fromJS(data) {
6701
+ data = typeof data === 'object' ? data : {};
6702
+ let result = new CreateQuestionnaire();
6703
+ result.init(data);
6704
+ return result;
6705
+ }
6706
+ toJSON(data) {
6707
+ data = typeof data === 'object' ? data : {};
6708
+ data["name"] = this.name;
6709
+ data["title"] = this.title;
6710
+ if (Array.isArray(this.createQuestions)) {
6711
+ data["createQuestions"] = [];
6712
+ for (let item of this.createQuestions)
6713
+ data["createQuestions"].push(item.toJSON());
6714
+ }
6715
+ return data;
6716
+ }
6717
+ }
6519
6718
  /** Create the Questionnaire answer. */
6520
6719
  export class CreateQuestionnaireAnswer {
6521
6720
  constructor(data) {
@@ -6558,6 +6757,59 @@ export class CreateQuestionnaireAnswer {
6558
6757
  return data;
6559
6758
  }
6560
6759
  }
6760
+ /** Create Questionnaire Question. */
6761
+ export class CreateQuestionnaireQuestion {
6762
+ constructor(data) {
6763
+ if (data) {
6764
+ for (var property in data) {
6765
+ if (data.hasOwnProperty(property))
6766
+ this[property] = data[property];
6767
+ }
6768
+ }
6769
+ }
6770
+ init(_data) {
6771
+ if (_data) {
6772
+ this.identifier = _data["identifier"];
6773
+ this.sequence = _data["sequence"];
6774
+ this.status = _data["status"];
6775
+ this.text = _data["text"];
6776
+ this.explanation = _data["explanation"];
6777
+ this.format = _data["format"];
6778
+ if (Array.isArray(_data["options"])) {
6779
+ this.options = [];
6780
+ for (let item of _data["options"])
6781
+ this.options.push(item);
6782
+ }
6783
+ this.scaleMin = _data["scaleMin"];
6784
+ this.scaleMax = _data["scaleMax"];
6785
+ this.scaleStep = _data["scaleStep"];
6786
+ }
6787
+ }
6788
+ static fromJS(data) {
6789
+ data = typeof data === 'object' ? data : {};
6790
+ let result = new CreateQuestionnaireQuestion();
6791
+ result.init(data);
6792
+ return result;
6793
+ }
6794
+ toJSON(data) {
6795
+ data = typeof data === 'object' ? data : {};
6796
+ data["identifier"] = this.identifier;
6797
+ data["sequence"] = this.sequence;
6798
+ data["status"] = this.status;
6799
+ data["text"] = this.text;
6800
+ data["explanation"] = this.explanation;
6801
+ data["format"] = this.format;
6802
+ if (Array.isArray(this.options)) {
6803
+ data["options"] = [];
6804
+ for (let item of this.options)
6805
+ data["options"].push(item);
6806
+ }
6807
+ data["scaleMin"] = this.scaleMin;
6808
+ data["scaleMax"] = this.scaleMax;
6809
+ data["scaleStep"] = this.scaleStep;
6810
+ return data;
6811
+ }
6812
+ }
6561
6813
  /** Create the Questionnaire Question Answer. */
6562
6814
  export class CreateQuestionnaireQuestionAnswer {
6563
6815
  constructor(data) {
@@ -10786,6 +11038,105 @@ export class UpdateInvestorSubscriptionOrderReference {
10786
11038
  return data;
10787
11039
  }
10788
11040
  }
11041
+ /** Update Questionnaire allows the update of a questionnaire with the primary offerring. */
11042
+ export class UpdateQuestionnaire {
11043
+ constructor(data) {
11044
+ if (data) {
11045
+ for (var property in data) {
11046
+ if (data.hasOwnProperty(property))
11047
+ this[property] = data[property];
11048
+ }
11049
+ }
11050
+ if (!data) {
11051
+ this.questions = [];
11052
+ }
11053
+ }
11054
+ init(_data) {
11055
+ if (_data) {
11056
+ this.id = _data["id"];
11057
+ this.name = _data["name"];
11058
+ this.title = _data["title"];
11059
+ if (Array.isArray(_data["questions"])) {
11060
+ this.questions = [];
11061
+ for (let item of _data["questions"])
11062
+ this.questions.push(UpdateQuestionnaireQuestion.fromJS(item));
11063
+ }
11064
+ }
11065
+ }
11066
+ static fromJS(data) {
11067
+ data = typeof data === 'object' ? data : {};
11068
+ let result = new UpdateQuestionnaire();
11069
+ result.init(data);
11070
+ return result;
11071
+ }
11072
+ toJSON(data) {
11073
+ data = typeof data === 'object' ? data : {};
11074
+ data["id"] = this.id;
11075
+ data["name"] = this.name;
11076
+ data["title"] = this.title;
11077
+ if (Array.isArray(this.questions)) {
11078
+ data["questions"] = [];
11079
+ for (let item of this.questions)
11080
+ data["questions"].push(item.toJSON());
11081
+ }
11082
+ return data;
11083
+ }
11084
+ }
11085
+ /** Questionnaire Question. */
11086
+ export class UpdateQuestionnaireQuestion {
11087
+ constructor(data) {
11088
+ if (data) {
11089
+ for (var property in data) {
11090
+ if (data.hasOwnProperty(property))
11091
+ this[property] = data[property];
11092
+ }
11093
+ }
11094
+ }
11095
+ init(_data) {
11096
+ if (_data) {
11097
+ this.id = _data["id"];
11098
+ this.identifier = _data["identifier"];
11099
+ this.sequence = _data["sequence"];
11100
+ this.status = _data["status"];
11101
+ this.text = _data["text"];
11102
+ this.explanation = _data["explanation"];
11103
+ this.format = _data["format"];
11104
+ if (Array.isArray(_data["options"])) {
11105
+ this.options = [];
11106
+ for (let item of _data["options"])
11107
+ this.options.push(item);
11108
+ }
11109
+ this.scaleMin = _data["scaleMin"];
11110
+ this.scaleMax = _data["scaleMax"];
11111
+ this.scaleStep = _data["scaleStep"];
11112
+ }
11113
+ }
11114
+ static fromJS(data) {
11115
+ data = typeof data === 'object' ? data : {};
11116
+ let result = new UpdateQuestionnaireQuestion();
11117
+ result.init(data);
11118
+ return result;
11119
+ }
11120
+ toJSON(data) {
11121
+ data = typeof data === 'object' ? data : {};
11122
+ data["id"] = this.id;
11123
+ data["identifier"] = this.identifier;
11124
+ data["sequence"] = this.sequence;
11125
+ data["status"] = this.status;
11126
+ data["text"] = this.text;
11127
+ data["explanation"] = this.explanation;
11128
+ data["format"] = this.format;
11129
+ if (Array.isArray(this.options)) {
11130
+ data["options"] = [];
11131
+ for (let item of this.options)
11132
+ data["options"].push(item);
11133
+ }
11134
+ data["scaleMin"] = this.scaleMin;
11135
+ data["scaleMax"] = this.scaleMax;
11136
+ data["scaleStep"] = this.scaleStep;
11137
+ return data;
11138
+ }
11139
+ }
10789
11140
  export class UpdateWebhook {
10790
11141
  constructor(data) {
10791
11142
  if (data) {
@@ -11302,6 +11653,24 @@ export var CreateInvestorType;
11302
11653
  CreateInvestorType["IndividualInvestor"] = "IndividualInvestor";
11303
11654
  CreateInvestorType["EntityInvestor"] = "EntityInvestor";
11304
11655
  })(CreateInvestorType || (CreateInvestorType = {}));
11656
+ export var CreateQuestionnaireQuestionStatus;
11657
+ (function (CreateQuestionnaireQuestionStatus) {
11658
+ CreateQuestionnaireQuestionStatus["DISABLED"] = "DISABLED";
11659
+ CreateQuestionnaireQuestionStatus["ACTIVE"] = "ACTIVE";
11660
+ })(CreateQuestionnaireQuestionStatus || (CreateQuestionnaireQuestionStatus = {}));
11661
+ export var CreateQuestionnaireQuestionFormat;
11662
+ (function (CreateQuestionnaireQuestionFormat) {
11663
+ CreateQuestionnaireQuestionFormat["Integer"] = "Integer";
11664
+ CreateQuestionnaireQuestionFormat["Float"] = "Float";
11665
+ CreateQuestionnaireQuestionFormat["Percentage"] = "Percentage";
11666
+ CreateQuestionnaireQuestionFormat["MultipleChoiceSingle"] = "MultipleChoiceSingle";
11667
+ CreateQuestionnaireQuestionFormat["MultipleChoiceMultiple"] = "MultipleChoiceMultiple";
11668
+ CreateQuestionnaireQuestionFormat["Boolean"] = "Boolean";
11669
+ CreateQuestionnaireQuestionFormat["Date"] = "Date";
11670
+ CreateQuestionnaireQuestionFormat["Text"] = "Text";
11671
+ CreateQuestionnaireQuestionFormat["Email"] = "Email";
11672
+ CreateQuestionnaireQuestionFormat["Scale"] = "Scale";
11673
+ })(CreateQuestionnaireQuestionFormat || (CreateQuestionnaireQuestionFormat = {}));
11305
11674
  export var DocumentType2;
11306
11675
  (function (DocumentType2) {
11307
11676
  DocumentType2["BUSINESS_FORMATION"] = "BUSINESS_FORMATION";
@@ -11786,6 +12155,24 @@ export var UpdateInvestorAccreditationAccreditationStatus;
11786
12155
  UpdateInvestorAccreditationAccreditationStatus["FAMILY_OFFICE_GT_5M"] = "FAMILY_OFFICE_GT_5M";
11787
12156
  UpdateInvestorAccreditationAccreditationStatus["NOT_APPLICABLE"] = "NOT_APPLICABLE";
11788
12157
  })(UpdateInvestorAccreditationAccreditationStatus || (UpdateInvestorAccreditationAccreditationStatus = {}));
12158
+ export var UpdateQuestionnaireQuestionStatus;
12159
+ (function (UpdateQuestionnaireQuestionStatus) {
12160
+ UpdateQuestionnaireQuestionStatus["DISABLED"] = "DISABLED";
12161
+ UpdateQuestionnaireQuestionStatus["ACTIVE"] = "ACTIVE";
12162
+ })(UpdateQuestionnaireQuestionStatus || (UpdateQuestionnaireQuestionStatus = {}));
12163
+ export var UpdateQuestionnaireQuestionFormat;
12164
+ (function (UpdateQuestionnaireQuestionFormat) {
12165
+ UpdateQuestionnaireQuestionFormat["Integer"] = "Integer";
12166
+ UpdateQuestionnaireQuestionFormat["Float"] = "Float";
12167
+ UpdateQuestionnaireQuestionFormat["Percentage"] = "Percentage";
12168
+ UpdateQuestionnaireQuestionFormat["MultipleChoiceSingle"] = "MultipleChoiceSingle";
12169
+ UpdateQuestionnaireQuestionFormat["MultipleChoiceMultiple"] = "MultipleChoiceMultiple";
12170
+ UpdateQuestionnaireQuestionFormat["Boolean"] = "Boolean";
12171
+ UpdateQuestionnaireQuestionFormat["Date"] = "Date";
12172
+ UpdateQuestionnaireQuestionFormat["Text"] = "Text";
12173
+ UpdateQuestionnaireQuestionFormat["Email"] = "Email";
12174
+ UpdateQuestionnaireQuestionFormat["Scale"] = "Scale";
12175
+ })(UpdateQuestionnaireQuestionFormat || (UpdateQuestionnaireQuestionFormat = {}));
11789
12176
  export var WebhookEventDeliveryStatus;
11790
12177
  (function (WebhookEventDeliveryStatus) {
11791
12178
  WebhookEventDeliveryStatus["Pending"] = "Pending";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@monarkmarkets/api-client",
3
- "version": "1.1.114",
3
+ "version": "1.1.115",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.js",
6
6
  "types": "dist/index.d.ts",