@monarkmarkets/api-client 1.3.20 → 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.
@@ -3735,6 +3753,8 @@ export interface IInvestorPii {
3735
3753
  export declare class InvestorSubscription implements IInvestorSubscription {
3736
3754
  /** Unique ID associated with an InvestorSubscription. */
3737
3755
  id?: string;
3756
+ /** External transaction ID - Unique 20-character identifier. */
3757
+ externalId?: string | undefined;
3738
3758
  /** The SPV ID that this Subscription relates to. */
3739
3759
  preIPOCompanySPVId?: string;
3740
3760
  /** ID of the Investor associated with this InvestorSubscription. */
@@ -3767,6 +3787,8 @@ export declare class InvestorSubscription implements IInvestorSubscription {
3767
3787
  export interface IInvestorSubscription {
3768
3788
  /** Unique ID associated with an InvestorSubscription. */
3769
3789
  id?: string;
3790
+ /** External transaction ID - Unique 20-character identifier. */
3791
+ externalId?: string | undefined;
3770
3792
  /** The SPV ID that this Subscription relates to. */
3771
3793
  preIPOCompanySPVId?: string;
3772
3794
  /** ID of the Investor associated with this InvestorSubscription. */
@@ -6883,6 +6905,8 @@ export interface IStructLayoutAttribute {
6883
6905
  export declare class Transaction implements ITransaction {
6884
6906
  /** Unique ID associated with an Order. */
6885
6907
  id?: string;
6908
+ /** External transaction ID - Unique 20-character identifier. */
6909
+ externalId?: string | undefined;
6886
6910
  /** The type of asset being targeted with this Order. */
6887
6911
  targetAssetType?: TransactionTargetAssetType;
6888
6912
  /** The SPV ID that this Order relates to. */
@@ -6923,6 +6947,8 @@ export declare class Transaction implements ITransaction {
6923
6947
  export interface ITransaction {
6924
6948
  /** Unique ID associated with an Order. */
6925
6949
  id?: string;
6950
+ /** External transaction ID - Unique 20-character identifier. */
6951
+ externalId?: string | undefined;
6926
6952
  /** The type of asset being targeted with this Order. */
6927
6953
  targetAssetType?: TransactionTargetAssetType;
6928
6954
  /** The SPV ID that this Order relates to. */
@@ -8316,6 +8342,7 @@ export declare enum MonarkStage {
8316
8342
  FUNDS_SENT_TO_TARGET = "FUNDS_SENT_TO_TARGET",
8317
8343
  CLOSED = "CLOSED",
8318
8344
  REGULATORY_HOLD_PERIOD = "REGULATORY_HOLD_PERIOD",
8345
+ READY_FOR_TRADING = "READY_FOR_TRADING",
8319
8346
  ACTIVELY_TRADING = "ACTIVELY_TRADING",
8320
8347
  CLOSE_FAILED = "CLOSE_FAILED",
8321
8348
  HALTED = "HALTED",
@@ -8406,6 +8433,11 @@ export declare enum TargetAssetType3 {
8406
8433
  RegisteredFund = "RegisteredFund",
8407
8434
  PreIPOCompany = "PreIPOCompany"
8408
8435
  }
8436
+ export declare enum TargetAssetType4 {
8437
+ PreIPOCompanySPV = "PreIPOCompanySPV",
8438
+ RegisteredFund = "RegisteredFund",
8439
+ PreIPOCompany = "PreIPOCompany"
8440
+ }
8409
8441
  export declare enum SortOrder23 {
8410
8442
  Ascending = "Ascending",
8411
8443
  Descending = "Descending"
@@ -8488,6 +8520,7 @@ export declare enum BulkPreIPOCompanySPVMonarkStage {
8488
8520
  FUNDS_SENT_TO_TARGET = "FUNDS_SENT_TO_TARGET",
8489
8521
  CLOSED = "CLOSED",
8490
8522
  REGULATORY_HOLD_PERIOD = "REGULATORY_HOLD_PERIOD",
8523
+ READY_FOR_TRADING = "READY_FOR_TRADING",
8491
8524
  ACTIVELY_TRADING = "ACTIVELY_TRADING",
8492
8525
  CLOSE_FAILED = "CLOSE_FAILED",
8493
8526
  HALTED = "HALTED",
@@ -9039,6 +9072,7 @@ export declare enum MonarkStageTransitionStage {
9039
9072
  FUNDS_SENT_TO_TARGET = "FUNDS_SENT_TO_TARGET",
9040
9073
  CLOSED = "CLOSED",
9041
9074
  REGULATORY_HOLD_PERIOD = "REGULATORY_HOLD_PERIOD",
9075
+ READY_FOR_TRADING = "READY_FOR_TRADING",
9042
9076
  ACTIVELY_TRADING = "ACTIVELY_TRADING",
9043
9077
  CLOSE_FAILED = "CLOSE_FAILED",
9044
9078
  HALTED = "HALTED",
@@ -9137,6 +9171,7 @@ export declare enum PreIPOCompanySPVMonarkStage {
9137
9171
  FUNDS_SENT_TO_TARGET = "FUNDS_SENT_TO_TARGET",
9138
9172
  CLOSED = "CLOSED",
9139
9173
  REGULATORY_HOLD_PERIOD = "REGULATORY_HOLD_PERIOD",
9174
+ READY_FOR_TRADING = "READY_FOR_TRADING",
9140
9175
  ACTIVELY_TRADING = "ACTIVELY_TRADING",
9141
9176
  CLOSE_FAILED = "CLOSE_FAILED",
9142
9177
  HALTED = "HALTED",
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.
@@ -11098,6 +11238,7 @@ export class InvestorSubscription {
11098
11238
  init(_data) {
11099
11239
  if (_data) {
11100
11240
  this.id = _data["id"];
11241
+ this.externalId = _data["externalId"];
11101
11242
  this.preIPOCompanySPVId = _data["preIPOCompanySPVId"];
11102
11243
  this.investorId = _data["investorId"];
11103
11244
  this.amountReservedDollars = _data["amountReservedDollars"];
@@ -11121,6 +11262,7 @@ export class InvestorSubscription {
11121
11262
  toJSON(data) {
11122
11263
  data = typeof data === 'object' ? data : {};
11123
11264
  data["id"] = this.id;
11265
+ data["externalId"] = this.externalId;
11124
11266
  data["preIPOCompanySPVId"] = this.preIPOCompanySPVId;
11125
11267
  data["investorId"] = this.investorId;
11126
11268
  data["amountReservedDollars"] = this.amountReservedDollars;
@@ -14742,6 +14884,7 @@ export class Transaction {
14742
14884
  init(_data) {
14743
14885
  if (_data) {
14744
14886
  this.id = _data["id"];
14887
+ this.externalId = _data["externalId"];
14745
14888
  this.targetAssetType = _data["targetAssetType"];
14746
14889
  this.targetId = _data["targetId"];
14747
14890
  this.investorId = _data["investorId"];
@@ -14773,6 +14916,7 @@ export class Transaction {
14773
14916
  toJSON(data) {
14774
14917
  data = typeof data === 'object' ? data : {};
14775
14918
  data["id"] = this.id;
14919
+ data["externalId"] = this.externalId;
14776
14920
  data["targetAssetType"] = this.targetAssetType;
14777
14921
  data["targetId"] = this.targetId;
14778
14922
  data["investorId"] = this.investorId;
@@ -16382,6 +16526,7 @@ export var MonarkStage;
16382
16526
  MonarkStage["FUNDS_SENT_TO_TARGET"] = "FUNDS_SENT_TO_TARGET";
16383
16527
  MonarkStage["CLOSED"] = "CLOSED";
16384
16528
  MonarkStage["REGULATORY_HOLD_PERIOD"] = "REGULATORY_HOLD_PERIOD";
16529
+ MonarkStage["READY_FOR_TRADING"] = "READY_FOR_TRADING";
16385
16530
  MonarkStage["ACTIVELY_TRADING"] = "ACTIVELY_TRADING";
16386
16531
  MonarkStage["CLOSE_FAILED"] = "CLOSE_FAILED";
16387
16532
  MonarkStage["HALTED"] = "HALTED";
@@ -16486,6 +16631,12 @@ export var TargetAssetType3;
16486
16631
  TargetAssetType3["RegisteredFund"] = "RegisteredFund";
16487
16632
  TargetAssetType3["PreIPOCompany"] = "PreIPOCompany";
16488
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 = {}));
16489
16640
  export var SortOrder23;
16490
16641
  (function (SortOrder23) {
16491
16642
  SortOrder23["Ascending"] = "Ascending";
@@ -16576,6 +16727,7 @@ export var BulkPreIPOCompanySPVMonarkStage;
16576
16727
  BulkPreIPOCompanySPVMonarkStage["FUNDS_SENT_TO_TARGET"] = "FUNDS_SENT_TO_TARGET";
16577
16728
  BulkPreIPOCompanySPVMonarkStage["CLOSED"] = "CLOSED";
16578
16729
  BulkPreIPOCompanySPVMonarkStage["REGULATORY_HOLD_PERIOD"] = "REGULATORY_HOLD_PERIOD";
16730
+ BulkPreIPOCompanySPVMonarkStage["READY_FOR_TRADING"] = "READY_FOR_TRADING";
16579
16731
  BulkPreIPOCompanySPVMonarkStage["ACTIVELY_TRADING"] = "ACTIVELY_TRADING";
16580
16732
  BulkPreIPOCompanySPVMonarkStage["CLOSE_FAILED"] = "CLOSE_FAILED";
16581
16733
  BulkPreIPOCompanySPVMonarkStage["HALTED"] = "HALTED";
@@ -17175,6 +17327,7 @@ export var MonarkStageTransitionStage;
17175
17327
  MonarkStageTransitionStage["FUNDS_SENT_TO_TARGET"] = "FUNDS_SENT_TO_TARGET";
17176
17328
  MonarkStageTransitionStage["CLOSED"] = "CLOSED";
17177
17329
  MonarkStageTransitionStage["REGULATORY_HOLD_PERIOD"] = "REGULATORY_HOLD_PERIOD";
17330
+ MonarkStageTransitionStage["READY_FOR_TRADING"] = "READY_FOR_TRADING";
17178
17331
  MonarkStageTransitionStage["ACTIVELY_TRADING"] = "ACTIVELY_TRADING";
17179
17332
  MonarkStageTransitionStage["CLOSE_FAILED"] = "CLOSE_FAILED";
17180
17333
  MonarkStageTransitionStage["HALTED"] = "HALTED";
@@ -17282,6 +17435,7 @@ export var PreIPOCompanySPVMonarkStage;
17282
17435
  PreIPOCompanySPVMonarkStage["FUNDS_SENT_TO_TARGET"] = "FUNDS_SENT_TO_TARGET";
17283
17436
  PreIPOCompanySPVMonarkStage["CLOSED"] = "CLOSED";
17284
17437
  PreIPOCompanySPVMonarkStage["REGULATORY_HOLD_PERIOD"] = "REGULATORY_HOLD_PERIOD";
17438
+ PreIPOCompanySPVMonarkStage["READY_FOR_TRADING"] = "READY_FOR_TRADING";
17285
17439
  PreIPOCompanySPVMonarkStage["ACTIVELY_TRADING"] = "ACTIVELY_TRADING";
17286
17440
  PreIPOCompanySPVMonarkStage["CLOSE_FAILED"] = "CLOSE_FAILED";
17287
17441
  PreIPOCompanySPVMonarkStage["HALTED"] = "HALTED";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@monarkmarkets/api-client",
3
- "version": "1.3.20",
3
+ "version": "1.3.22",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.js",
6
6
  "types": "dist/index.d.ts",