@monarkmarkets/api-client 1.3.21 → 1.3.22

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
@@ -401,6 +401,15 @@ export declare class Client {
401
401
  */
402
402
  updateInvestorSubscriptionOrderReference(body: UpdateInvestorSubscriptionOrderReference | undefined): Promise<void>;
403
403
  protected processUpdateInvestorSubscriptionOrderReference(response: Response): Promise<void>;
404
+ /**
405
+ * Rejects an Existing Subscription with the fund partner.
406
+ * @param id ID of subscription to sign.
407
+ * @param body (optional)
408
+ * @return OK
409
+ * @deprecated
410
+ */
411
+ rejectInvestorSubscription(id: string, body: any | undefined): Promise<InvestorSubscription>;
412
+ protected processRejectInvestorSubscription(response: Response): Promise<InvestorSubscription>;
404
413
  /**
405
414
  * Get all InvestorSubscriptionActions by InvestorSubscription.
406
415
  * @param investorSubscriptionId The ID of the InvestorSubscription to get the actions for.
@@ -1176,6 +1185,15 @@ export declare class Client {
1176
1185
  */
1177
1186
  updateTransactionReferenceId(body: UpdateTransactionReference | undefined): Promise<Transaction>;
1178
1187
  protected processUpdateTransactionReferenceId(response: Response): Promise<Transaction>;
1188
+ /**
1189
+ * Reject a transaction.
1190
+ * @param id The transaction ID to reject.
1191
+ * @param targetAssetType (optional) The target asset type.
1192
+ * @param body (optional)
1193
+ * @return OK
1194
+ */
1195
+ rejectTransaction(id: string, targetAssetType: TargetAssetType4 | undefined, body: any | undefined): Promise<Transaction>;
1196
+ protected processRejectTransaction(response: Response): Promise<Transaction>;
1179
1197
  /**
1180
1198
  * Get all TransactionActions by Transaction.
1181
1199
  * @param transactionId The ID of the Transaction to get the actions for.
@@ -8415,6 +8433,11 @@ export declare enum TargetAssetType3 {
8415
8433
  RegisteredFund = "RegisteredFund",
8416
8434
  PreIPOCompany = "PreIPOCompany"
8417
8435
  }
8436
+ export declare enum TargetAssetType4 {
8437
+ PreIPOCompanySPV = "PreIPOCompanySPV",
8438
+ RegisteredFund = "RegisteredFund",
8439
+ PreIPOCompany = "PreIPOCompany"
8440
+ }
8418
8441
  export declare enum SortOrder23 {
8419
8442
  Ascending = "Ascending",
8420
8443
  Descending = "Descending"
package/dist/Client.js CHANGED
@@ -2566,6 +2566,62 @@ export class Client {
2566
2566
  }
2567
2567
  return Promise.resolve(null);
2568
2568
  }
2569
+ /**
2570
+ * Rejects an Existing Subscription with the fund partner.
2571
+ * @param id ID of subscription to sign.
2572
+ * @param body (optional)
2573
+ * @return OK
2574
+ * @deprecated
2575
+ */
2576
+ rejectInvestorSubscription(id, body) {
2577
+ let url_ = this.baseUrl + "/primary/v1/investor-subscription/{id}/reject";
2578
+ if (id === undefined || id === null)
2579
+ throw new globalThis.Error("The parameter 'id' must be defined.");
2580
+ url_ = url_.replace("{id}", encodeURIComponent("" + id));
2581
+ url_ = url_.replace(/[?&]$/, "");
2582
+ const content_ = JSON.stringify(body);
2583
+ let options_ = {
2584
+ body: content_,
2585
+ method: "POST",
2586
+ headers: {
2587
+ "Content-Type": "application/json",
2588
+ "Accept": "application/json"
2589
+ }
2590
+ };
2591
+ return this.http.fetch(url_, options_).then((_response) => {
2592
+ return this.processRejectInvestorSubscription(_response);
2593
+ });
2594
+ }
2595
+ processRejectInvestorSubscription(response) {
2596
+ const status = response.status;
2597
+ let _headers = {};
2598
+ if (response.headers && response.headers.forEach) {
2599
+ response.headers.forEach((v, k) => _headers[k] = v);
2600
+ }
2601
+ ;
2602
+ if (status === 200) {
2603
+ return response.text().then((_responseText) => {
2604
+ let result200 = null;
2605
+ let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
2606
+ result200 = InvestorSubscription.fromJS(resultData200);
2607
+ return result200;
2608
+ });
2609
+ }
2610
+ else if (status === 400) {
2611
+ return response.text().then((_responseText) => {
2612
+ let result400 = null;
2613
+ let resultData400 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
2614
+ result400 = ProblemDetails.fromJS(resultData400);
2615
+ return throwException("Bad Request", status, _responseText, _headers, result400);
2616
+ });
2617
+ }
2618
+ else if (status !== 200 && status !== 204) {
2619
+ return response.text().then((_responseText) => {
2620
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
2621
+ });
2622
+ }
2623
+ return Promise.resolve(null);
2624
+ }
2569
2625
  /**
2570
2626
  * Get all InvestorSubscriptionActions by InvestorSubscription.
2571
2627
  * @param investorSubscriptionId The ID of the InvestorSubscription to get the actions for.
@@ -7673,6 +7729,90 @@ export class Client {
7673
7729
  }
7674
7730
  return Promise.resolve(null);
7675
7731
  }
7732
+ /**
7733
+ * Reject a transaction.
7734
+ * @param id The transaction ID to reject.
7735
+ * @param targetAssetType (optional) The target asset type.
7736
+ * @param body (optional)
7737
+ * @return OK
7738
+ */
7739
+ rejectTransaction(id, targetAssetType, body) {
7740
+ let url_ = this.baseUrl + "/primary/v2/transaction/{id}/reject?";
7741
+ if (id === undefined || id === null)
7742
+ throw new globalThis.Error("The parameter 'id' must be defined.");
7743
+ url_ = url_.replace("{id}", encodeURIComponent("" + id));
7744
+ if (targetAssetType === null)
7745
+ throw new globalThis.Error("The parameter 'targetAssetType' cannot be null.");
7746
+ else if (targetAssetType !== undefined)
7747
+ url_ += "targetAssetType=" + encodeURIComponent("" + targetAssetType) + "&";
7748
+ url_ = url_.replace(/[?&]$/, "");
7749
+ const content_ = JSON.stringify(body);
7750
+ let options_ = {
7751
+ body: content_,
7752
+ method: "POST",
7753
+ headers: {
7754
+ "Content-Type": "application/json",
7755
+ "Accept": "application/json"
7756
+ }
7757
+ };
7758
+ return this.http.fetch(url_, options_).then((_response) => {
7759
+ return this.processRejectTransaction(_response);
7760
+ });
7761
+ }
7762
+ processRejectTransaction(response) {
7763
+ const status = response.status;
7764
+ let _headers = {};
7765
+ if (response.headers && response.headers.forEach) {
7766
+ response.headers.forEach((v, k) => _headers[k] = v);
7767
+ }
7768
+ ;
7769
+ if (status === 200) {
7770
+ return response.text().then((_responseText) => {
7771
+ let result200 = null;
7772
+ let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
7773
+ result200 = Transaction.fromJS(resultData200);
7774
+ return result200;
7775
+ });
7776
+ }
7777
+ else if (status === 400) {
7778
+ return response.text().then((_responseText) => {
7779
+ let result400 = null;
7780
+ let resultData400 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
7781
+ result400 = ProblemDetails.fromJS(resultData400);
7782
+ return throwException("Bad Request", status, _responseText, _headers, result400);
7783
+ });
7784
+ }
7785
+ else if (status === 401) {
7786
+ return response.text().then((_responseText) => {
7787
+ let result401 = null;
7788
+ let resultData401 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
7789
+ result401 = ProblemDetails.fromJS(resultData401);
7790
+ return throwException("Unauthorized", status, _responseText, _headers, result401);
7791
+ });
7792
+ }
7793
+ else if (status === 403) {
7794
+ return response.text().then((_responseText) => {
7795
+ let result403 = null;
7796
+ let resultData403 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
7797
+ result403 = ProblemDetails.fromJS(resultData403);
7798
+ return throwException("Forbidden", status, _responseText, _headers, result403);
7799
+ });
7800
+ }
7801
+ else if (status === 404) {
7802
+ return response.text().then((_responseText) => {
7803
+ let result404 = null;
7804
+ let resultData404 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
7805
+ result404 = ProblemDetails.fromJS(resultData404);
7806
+ return throwException("Not Found", status, _responseText, _headers, result404);
7807
+ });
7808
+ }
7809
+ else if (status !== 200 && status !== 204) {
7810
+ return response.text().then((_responseText) => {
7811
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
7812
+ });
7813
+ }
7814
+ return Promise.resolve(null);
7815
+ }
7676
7816
  /**
7677
7817
  * Get all TransactionActions by Transaction.
7678
7818
  * @param transactionId The ID of the Transaction to get the actions for.
@@ -16491,6 +16631,12 @@ export var TargetAssetType3;
16491
16631
  TargetAssetType3["RegisteredFund"] = "RegisteredFund";
16492
16632
  TargetAssetType3["PreIPOCompany"] = "PreIPOCompany";
16493
16633
  })(TargetAssetType3 || (TargetAssetType3 = {}));
16634
+ export var TargetAssetType4;
16635
+ (function (TargetAssetType4) {
16636
+ TargetAssetType4["PreIPOCompanySPV"] = "PreIPOCompanySPV";
16637
+ TargetAssetType4["RegisteredFund"] = "RegisteredFund";
16638
+ TargetAssetType4["PreIPOCompany"] = "PreIPOCompany";
16639
+ })(TargetAssetType4 || (TargetAssetType4 = {}));
16494
16640
  export var SortOrder23;
16495
16641
  (function (SortOrder23) {
16496
16642
  SortOrder23["Ascending"] = "Ascending";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@monarkmarkets/api-client",
3
- "version": "1.3.21",
3
+ "version": "1.3.22",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.js",
6
6
  "types": "dist/index.d.ts",