@settlemint/dalp-cli 2.1.7-main.23451427165 → 2.1.7-main.23476285750

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.
Files changed (2) hide show
  1. package/dist/dalp.js +53 -6
  2. package/package.json +1 -1
package/dist/dalp.js CHANGED
@@ -60020,6 +60020,7 @@ var ethereumAddress = exports_external.string().meta({
60020
60020
  }
60021
60021
  return getAddress(value22);
60022
60022
  });
60023
+ var lowercaseEthereumAddress = ethereumAddress.transform((value22) => value22.toLowerCase());
60023
60024
  var AccountSearchGraphResponseSchema = exports_external.object({
60024
60025
  account: exports_external.object({
60025
60026
  id: ethereumAddress,
@@ -69131,9 +69132,31 @@ function buildSortSchema(sortFields) {
69131
69132
  }
69132
69133
  return exports_external.enum(values);
69133
69134
  }
69135
+ var UNARY_FILTER_OPERATORS = new Set(["isEmpty", "isNotEmpty"]);
69136
+ function shouldApplyUnaryCollectionFilter(entry) {
69137
+ return !Object.hasOwn(entry, "value") || entry.value !== undefined;
69138
+ }
69139
+ function serializeCollectionFilterValue(value22) {
69140
+ if (value22 === undefined) {
69141
+ return;
69142
+ }
69143
+ if (Array.isArray(value22)) {
69144
+ return value22.join(",");
69145
+ }
69146
+ return value22;
69147
+ }
69148
+ function isRecord2(value22) {
69149
+ return typeof value22 === "object" && value22 !== null && !Array.isArray(value22);
69150
+ }
69151
+ function isCollectionFilter(input) {
69152
+ if (!isRecord2(input)) {
69153
+ return false;
69154
+ }
69155
+ return typeof input.id === "string" && typeof input.operator === "string";
69156
+ }
69134
69157
  function buildFlatFormatPreprocess(filterFieldNames) {
69135
69158
  return (input) => {
69136
- if (typeof input !== "object" || input === null || Array.isArray(input)) {
69159
+ if (!isRecord2(input)) {
69137
69160
  return input;
69138
69161
  }
69139
69162
  const raw = input;
@@ -69141,9 +69164,10 @@ function buildFlatFormatPreprocess(filterFieldNames) {
69141
69164
  return input;
69142
69165
  }
69143
69166
  const hasFilterField = Object.keys(raw).some((key) => filterFieldNames.has(key));
69167
+ const hasFilterArray = Array.isArray(raw.filters);
69144
69168
  const hasPaginationField = raw.limit !== undefined || raw.offset !== undefined;
69145
69169
  const hasSortField = raw.sortBy !== undefined;
69146
- if (!hasFilterField && !hasPaginationField && !hasSortField) {
69170
+ if (!hasFilterField && !hasFilterArray && !hasPaginationField && !hasSortField) {
69147
69171
  return input;
69148
69172
  }
69149
69173
  const filter = {};
@@ -69159,6 +69183,25 @@ function buildFlatFormatPreprocess(filterFieldNames) {
69159
69183
  sort = `${dir}${value22}`;
69160
69184
  }
69161
69185
  }
69186
+ if (Array.isArray(raw.filters)) {
69187
+ for (const entry of raw.filters) {
69188
+ if (!isCollectionFilter(entry) || !filterFieldNames.has(entry.id)) {
69189
+ continue;
69190
+ }
69191
+ if (UNARY_FILTER_OPERATORS.has(entry.operator)) {
69192
+ if (!shouldApplyUnaryCollectionFilter(entry)) {
69193
+ continue;
69194
+ }
69195
+ filter[entry.id] = { [entry.operator]: true };
69196
+ continue;
69197
+ }
69198
+ const serializedValue = serializeCollectionFilterValue(entry.value);
69199
+ if (serializedValue === undefined) {
69200
+ continue;
69201
+ }
69202
+ filter[entry.id] = { [entry.operator]: serializedValue };
69203
+ }
69204
+ }
69162
69205
  const result = {};
69163
69206
  if (Object.keys(filter).length > 0) {
69164
69207
  result.filter = filter;
@@ -69189,7 +69232,7 @@ function createCollectionInputSchema(fields, options) {
69189
69232
  })
69190
69233
  });
69191
69234
  const preprocess2 = buildFlatFormatPreprocess(filterFieldNames);
69192
- return exports_external.preprocess(preprocess2, rawSchema).transform((raw) => {
69235
+ const transformedSchema = exports_external.preprocess(preprocess2, rawSchema).transform((raw) => {
69193
69236
  const rawSort = typeof raw.sort === "string" ? raw.sort : undefined;
69194
69237
  const sorting = parseJsonApiSort(rawSort, fields, options.defaultSort);
69195
69238
  const filterInput = raw.filter;
@@ -69202,6 +69245,7 @@ function createCollectionInputSchema(fields, options) {
69202
69245
  filters
69203
69246
  };
69204
69247
  });
69248
+ return transformedSchema;
69205
69249
  }
69206
69250
  function resolveCollectionMetadata(fields) {
69207
69251
  const metadata = {};
@@ -71393,7 +71437,9 @@ var directoryV2Contract = {
71393
71437
  };
71394
71438
  var ENTITIES_COLLECTION_FIELDS = {
71395
71439
  lastActivity: dateField(),
71396
- identityAddress: addressField()
71440
+ identityAddress: addressField(),
71441
+ entityType: enumField(entityTypes),
71442
+ status: enumField(["registered", "pending"])
71397
71443
  };
71398
71444
  var EntityV2ListInputSchema = createCollectionInputSchema(ENTITIES_COLLECTION_FIELDS, {
71399
71445
  defaultSort: "lastActivity",
@@ -79458,7 +79504,7 @@ var timestampSerializer = {
79458
79504
  };
79459
79505
  var package_default = {
79460
79506
  name: "@settlemint/dalp-sdk",
79461
- version: "2.1.7-main.23451427165",
79507
+ version: "2.1.7-main.23476285750",
79462
79508
  private: false,
79463
79509
  description: "Fully typed SDK for the DALP tokenization platform API",
79464
79510
  homepage: "https://settlemint.com",
@@ -79601,7 +79647,7 @@ function createDalpClient(config3) {
79601
79647
  // package.json
79602
79648
  var package_default2 = {
79603
79649
  name: "@settlemint/dalp-cli",
79604
- version: "2.1.7-main.23451427165",
79650
+ version: "2.1.7-main.23476285750",
79605
79651
  private: false,
79606
79652
  description: "CLI for the Digital Asset Lifecycle Platform — manage tokens, identities, compliance, and more from the command line.",
79607
79653
  homepage: "https://settlemint.com",
@@ -82028,6 +82074,7 @@ var ethereumAddress2 = exports_external.string().meta({
82028
82074
  }
82029
82075
  return getAddress(value3);
82030
82076
  });
82077
+ var lowercaseEthereumAddress2 = ethereumAddress2.transform((value3) => value3.toLowerCase());
82031
82078
 
82032
82079
  // ../../packages/core/validation/src/account.ts
82033
82080
  var AccountSchema2 = exports_external.object({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@settlemint/dalp-cli",
3
- "version": "2.1.7-main.23451427165",
3
+ "version": "2.1.7-main.23476285750",
4
4
  "private": false,
5
5
  "description": "CLI for the Digital Asset Lifecycle Platform — manage tokens, identities, compliance, and more from the command line.",
6
6
  "homepage": "https://settlemint.com",