@echoxyz/sonar-core 0.2.0 → 0.2.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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @echoxyz/sonar-core
2
2
 
3
+ ## 0.2.1
4
+
5
+ ### Patch Changes
6
+
7
+ - affa026: Add missing values to PrePurchaseFailureReason enum
8
+
3
9
  ## 0.2.0
4
10
 
5
11
  ### Minor Changes
package/dist/index.cjs CHANGED
@@ -22,6 +22,7 @@ __export(index_exports, {
22
22
  APIError: () => APIError,
23
23
  EntitySetupState: () => EntitySetupState,
24
24
  EntityType: () => EntityType,
25
+ InvestingRegion: () => InvestingRegion,
25
26
  PrePurchaseFailureReason: () => PrePurchaseFailureReason,
26
27
  PurchasePermitType: () => PurchasePermitType,
27
28
  SaleEligibility: () => SaleEligibility,
@@ -376,6 +377,7 @@ var EntityType = /* @__PURE__ */ ((EntityType2) => {
376
377
  var EntitySetupState = /* @__PURE__ */ ((EntitySetupState2) => {
377
378
  EntitySetupState2["NOT_STARTED"] = "not-started";
378
379
  EntitySetupState2["IN_PROGRESS"] = "in-progress";
380
+ EntitySetupState2["READY_FOR_REVIEW"] = "ready-for-review";
379
381
  EntitySetupState2["IN_REVIEW"] = "in-review";
380
382
  EntitySetupState2["FAILURE"] = "failure";
381
383
  EntitySetupState2["FAILURE_FINAL"] = "failure-final";
@@ -399,8 +401,16 @@ var PrePurchaseFailureReason = /* @__PURE__ */ ((PrePurchaseFailureReason2) => {
399
401
  PrePurchaseFailureReason2["MAX_WALLETS_USED"] = "max-wallets-used";
400
402
  PrePurchaseFailureReason2["REQUIRES_LIVENESS"] = "requires-liveness";
401
403
  PrePurchaseFailureReason2["NO_RESERVED_ALLOCATION"] = "no-reserved-allocation";
404
+ PrePurchaseFailureReason2["SALE_NOT_ACTIVE"] = "sale-not-active";
405
+ PrePurchaseFailureReason2["WALLET_NOT_LINKED"] = "wallet-not-linked";
402
406
  return PrePurchaseFailureReason2;
403
407
  })(PrePurchaseFailureReason || {});
408
+ var InvestingRegion = /* @__PURE__ */ ((InvestingRegion2) => {
409
+ InvestingRegion2["UNKNOWN"] = "unknown";
410
+ InvestingRegion2["OTHER"] = "other";
411
+ InvestingRegion2["US"] = "us";
412
+ return InvestingRegion2;
413
+ })(InvestingRegion || {});
404
414
 
405
415
  // src/index.ts
406
416
  var DEFAULT_API_URL = "https://api.echo.xyz";
@@ -424,6 +434,7 @@ function createClient(options) {
424
434
  APIError,
425
435
  EntitySetupState,
426
436
  EntityType,
437
+ InvestingRegion,
427
438
  PrePurchaseFailureReason,
428
439
  PurchasePermitType,
429
440
  SaleEligibility,
package/dist/index.d.cts CHANGED
@@ -35,6 +35,7 @@ declare enum EntityType {
35
35
  declare enum EntitySetupState {
36
36
  NOT_STARTED = "not-started",
37
37
  IN_PROGRESS = "in-progress",
38
+ READY_FOR_REVIEW = "ready-for-review",
38
39
  IN_REVIEW = "in-review",
39
40
  FAILURE = "failure",
40
41
  FAILURE_FINAL = "failure-final",
@@ -67,15 +68,22 @@ declare enum PrePurchaseFailureReason {
67
68
  WALLET_RISK = "wallet-risk",
68
69
  MAX_WALLETS_USED = "max-wallets-used",
69
70
  REQUIRES_LIVENESS = "requires-liveness",
70
- NO_RESERVED_ALLOCATION = "no-reserved-allocation"
71
+ NO_RESERVED_ALLOCATION = "no-reserved-allocation",
72
+ SALE_NOT_ACTIVE = "sale-not-active",
73
+ WALLET_NOT_LINKED = "wallet-not-linked"
74
+ }
75
+ declare enum InvestingRegion {
76
+ UNKNOWN = "unknown",
77
+ OTHER = "other",
78
+ US = "us"
71
79
  }
72
80
  type EntityDetails = {
73
81
  Label: string;
74
82
  EntityUUID: string;
75
83
  EntityType: EntityType;
76
- EntitySetupState: string;
77
- SaleEligibility: string;
78
- InvestingRegion: string;
84
+ EntitySetupState: EntitySetupState;
85
+ SaleEligibility: SaleEligibility;
86
+ InvestingRegion: InvestingRegion;
79
87
  ObfuscatedEntityID: `0x${string}`;
80
88
  };
81
89
 
@@ -86,7 +94,7 @@ type PrePurchaseCheckResponse = {
86
94
  LivenessCheckURL: string;
87
95
  };
88
96
  type GeneratePurchasePermitResponse = {
89
- Permit: BasicPermit | AllocationPermit;
97
+ PermitJSON: BasicPermit | AllocationPermit;
90
98
  Signature: string;
91
99
  };
92
100
  type AllocationResponse = {
@@ -180,4 +188,4 @@ type CreateClientOptions = {
180
188
  };
181
189
  declare function createClient(options: CreateClientOptions): SonarClient;
182
190
 
183
- export { APIError, type AllocationPermit, type AllocationResponse, type BasicPermit, type BuildAuthorizationUrlArgs, type ClientOptions, type CreateClientOptions, type EntityDetails, EntitySetupState, EntityType, type FetchLike, type GeneratePurchasePermitResponse, type Hex, type PrePurchaseCheckResponse, PrePurchaseFailureReason, type PurchasePermit, PurchasePermitType, type ReadEntityResponse, SaleEligibility, SonarClient, type StorageLike, buildAuthorizationUrl, createClient, createMemoryStorage, createWebStorage, generatePKCEParams };
191
+ export { APIError, type AllocationPermit, type AllocationResponse, type BasicPermit, type BuildAuthorizationUrlArgs, type ClientOptions, type CreateClientOptions, type EntityDetails, EntitySetupState, EntityType, type FetchLike, type GeneratePurchasePermitResponse, type Hex, InvestingRegion, type PrePurchaseCheckResponse, PrePurchaseFailureReason, type PurchasePermit, PurchasePermitType, type ReadEntityResponse, SaleEligibility, SonarClient, type StorageLike, buildAuthorizationUrl, createClient, createMemoryStorage, createWebStorage, generatePKCEParams };
package/dist/index.d.ts CHANGED
@@ -35,6 +35,7 @@ declare enum EntityType {
35
35
  declare enum EntitySetupState {
36
36
  NOT_STARTED = "not-started",
37
37
  IN_PROGRESS = "in-progress",
38
+ READY_FOR_REVIEW = "ready-for-review",
38
39
  IN_REVIEW = "in-review",
39
40
  FAILURE = "failure",
40
41
  FAILURE_FINAL = "failure-final",
@@ -67,15 +68,22 @@ declare enum PrePurchaseFailureReason {
67
68
  WALLET_RISK = "wallet-risk",
68
69
  MAX_WALLETS_USED = "max-wallets-used",
69
70
  REQUIRES_LIVENESS = "requires-liveness",
70
- NO_RESERVED_ALLOCATION = "no-reserved-allocation"
71
+ NO_RESERVED_ALLOCATION = "no-reserved-allocation",
72
+ SALE_NOT_ACTIVE = "sale-not-active",
73
+ WALLET_NOT_LINKED = "wallet-not-linked"
74
+ }
75
+ declare enum InvestingRegion {
76
+ UNKNOWN = "unknown",
77
+ OTHER = "other",
78
+ US = "us"
71
79
  }
72
80
  type EntityDetails = {
73
81
  Label: string;
74
82
  EntityUUID: string;
75
83
  EntityType: EntityType;
76
- EntitySetupState: string;
77
- SaleEligibility: string;
78
- InvestingRegion: string;
84
+ EntitySetupState: EntitySetupState;
85
+ SaleEligibility: SaleEligibility;
86
+ InvestingRegion: InvestingRegion;
79
87
  ObfuscatedEntityID: `0x${string}`;
80
88
  };
81
89
 
@@ -86,7 +94,7 @@ type PrePurchaseCheckResponse = {
86
94
  LivenessCheckURL: string;
87
95
  };
88
96
  type GeneratePurchasePermitResponse = {
89
- Permit: BasicPermit | AllocationPermit;
97
+ PermitJSON: BasicPermit | AllocationPermit;
90
98
  Signature: string;
91
99
  };
92
100
  type AllocationResponse = {
@@ -180,4 +188,4 @@ type CreateClientOptions = {
180
188
  };
181
189
  declare function createClient(options: CreateClientOptions): SonarClient;
182
190
 
183
- export { APIError, type AllocationPermit, type AllocationResponse, type BasicPermit, type BuildAuthorizationUrlArgs, type ClientOptions, type CreateClientOptions, type EntityDetails, EntitySetupState, EntityType, type FetchLike, type GeneratePurchasePermitResponse, type Hex, type PrePurchaseCheckResponse, PrePurchaseFailureReason, type PurchasePermit, PurchasePermitType, type ReadEntityResponse, SaleEligibility, SonarClient, type StorageLike, buildAuthorizationUrl, createClient, createMemoryStorage, createWebStorage, generatePKCEParams };
191
+ export { APIError, type AllocationPermit, type AllocationResponse, type BasicPermit, type BuildAuthorizationUrlArgs, type ClientOptions, type CreateClientOptions, type EntityDetails, EntitySetupState, EntityType, type FetchLike, type GeneratePurchasePermitResponse, type Hex, InvestingRegion, type PrePurchaseCheckResponse, PrePurchaseFailureReason, type PurchasePermit, PurchasePermitType, type ReadEntityResponse, SaleEligibility, SonarClient, type StorageLike, buildAuthorizationUrl, createClient, createMemoryStorage, createWebStorage, generatePKCEParams };
package/dist/index.js CHANGED
@@ -340,6 +340,7 @@ var EntityType = /* @__PURE__ */ ((EntityType2) => {
340
340
  var EntitySetupState = /* @__PURE__ */ ((EntitySetupState2) => {
341
341
  EntitySetupState2["NOT_STARTED"] = "not-started";
342
342
  EntitySetupState2["IN_PROGRESS"] = "in-progress";
343
+ EntitySetupState2["READY_FOR_REVIEW"] = "ready-for-review";
343
344
  EntitySetupState2["IN_REVIEW"] = "in-review";
344
345
  EntitySetupState2["FAILURE"] = "failure";
345
346
  EntitySetupState2["FAILURE_FINAL"] = "failure-final";
@@ -363,8 +364,16 @@ var PrePurchaseFailureReason = /* @__PURE__ */ ((PrePurchaseFailureReason2) => {
363
364
  PrePurchaseFailureReason2["MAX_WALLETS_USED"] = "max-wallets-used";
364
365
  PrePurchaseFailureReason2["REQUIRES_LIVENESS"] = "requires-liveness";
365
366
  PrePurchaseFailureReason2["NO_RESERVED_ALLOCATION"] = "no-reserved-allocation";
367
+ PrePurchaseFailureReason2["SALE_NOT_ACTIVE"] = "sale-not-active";
368
+ PrePurchaseFailureReason2["WALLET_NOT_LINKED"] = "wallet-not-linked";
366
369
  return PrePurchaseFailureReason2;
367
370
  })(PrePurchaseFailureReason || {});
371
+ var InvestingRegion = /* @__PURE__ */ ((InvestingRegion2) => {
372
+ InvestingRegion2["UNKNOWN"] = "unknown";
373
+ InvestingRegion2["OTHER"] = "other";
374
+ InvestingRegion2["US"] = "us";
375
+ return InvestingRegion2;
376
+ })(InvestingRegion || {});
368
377
 
369
378
  // src/index.ts
370
379
  var DEFAULT_API_URL = "https://api.echo.xyz";
@@ -387,6 +396,7 @@ export {
387
396
  APIError,
388
397
  EntitySetupState,
389
398
  EntityType,
399
+ InvestingRegion,
390
400
  PrePurchaseFailureReason,
391
401
  PurchasePermitType,
392
402
  SaleEligibility,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@echoxyz/sonar-core",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "type": "module",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.js",