@settlemint/dalp-cli 2.1.7-main.23457166716 → 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.
- package/dist/dalp.js +51 -6
- package/package.json +1 -1
package/dist/dalp.js
CHANGED
|
@@ -69132,9 +69132,31 @@ function buildSortSchema(sortFields) {
|
|
|
69132
69132
|
}
|
|
69133
69133
|
return exports_external.enum(values);
|
|
69134
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
|
+
}
|
|
69135
69157
|
function buildFlatFormatPreprocess(filterFieldNames) {
|
|
69136
69158
|
return (input) => {
|
|
69137
|
-
if (
|
|
69159
|
+
if (!isRecord2(input)) {
|
|
69138
69160
|
return input;
|
|
69139
69161
|
}
|
|
69140
69162
|
const raw = input;
|
|
@@ -69142,9 +69164,10 @@ function buildFlatFormatPreprocess(filterFieldNames) {
|
|
|
69142
69164
|
return input;
|
|
69143
69165
|
}
|
|
69144
69166
|
const hasFilterField = Object.keys(raw).some((key) => filterFieldNames.has(key));
|
|
69167
|
+
const hasFilterArray = Array.isArray(raw.filters);
|
|
69145
69168
|
const hasPaginationField = raw.limit !== undefined || raw.offset !== undefined;
|
|
69146
69169
|
const hasSortField = raw.sortBy !== undefined;
|
|
69147
|
-
if (!hasFilterField && !hasPaginationField && !hasSortField) {
|
|
69170
|
+
if (!hasFilterField && !hasFilterArray && !hasPaginationField && !hasSortField) {
|
|
69148
69171
|
return input;
|
|
69149
69172
|
}
|
|
69150
69173
|
const filter = {};
|
|
@@ -69160,6 +69183,25 @@ function buildFlatFormatPreprocess(filterFieldNames) {
|
|
|
69160
69183
|
sort = `${dir}${value22}`;
|
|
69161
69184
|
}
|
|
69162
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
|
+
}
|
|
69163
69205
|
const result = {};
|
|
69164
69206
|
if (Object.keys(filter).length > 0) {
|
|
69165
69207
|
result.filter = filter;
|
|
@@ -69190,7 +69232,7 @@ function createCollectionInputSchema(fields, options) {
|
|
|
69190
69232
|
})
|
|
69191
69233
|
});
|
|
69192
69234
|
const preprocess2 = buildFlatFormatPreprocess(filterFieldNames);
|
|
69193
|
-
|
|
69235
|
+
const transformedSchema = exports_external.preprocess(preprocess2, rawSchema).transform((raw) => {
|
|
69194
69236
|
const rawSort = typeof raw.sort === "string" ? raw.sort : undefined;
|
|
69195
69237
|
const sorting = parseJsonApiSort(rawSort, fields, options.defaultSort);
|
|
69196
69238
|
const filterInput = raw.filter;
|
|
@@ -69203,6 +69245,7 @@ function createCollectionInputSchema(fields, options) {
|
|
|
69203
69245
|
filters
|
|
69204
69246
|
};
|
|
69205
69247
|
});
|
|
69248
|
+
return transformedSchema;
|
|
69206
69249
|
}
|
|
69207
69250
|
function resolveCollectionMetadata(fields) {
|
|
69208
69251
|
const metadata = {};
|
|
@@ -71394,7 +71437,9 @@ var directoryV2Contract = {
|
|
|
71394
71437
|
};
|
|
71395
71438
|
var ENTITIES_COLLECTION_FIELDS = {
|
|
71396
71439
|
lastActivity: dateField(),
|
|
71397
|
-
identityAddress: addressField()
|
|
71440
|
+
identityAddress: addressField(),
|
|
71441
|
+
entityType: enumField(entityTypes),
|
|
71442
|
+
status: enumField(["registered", "pending"])
|
|
71398
71443
|
};
|
|
71399
71444
|
var EntityV2ListInputSchema = createCollectionInputSchema(ENTITIES_COLLECTION_FIELDS, {
|
|
71400
71445
|
defaultSort: "lastActivity",
|
|
@@ -79459,7 +79504,7 @@ var timestampSerializer = {
|
|
|
79459
79504
|
};
|
|
79460
79505
|
var package_default = {
|
|
79461
79506
|
name: "@settlemint/dalp-sdk",
|
|
79462
|
-
version: "2.1.7-main.
|
|
79507
|
+
version: "2.1.7-main.23476285750",
|
|
79463
79508
|
private: false,
|
|
79464
79509
|
description: "Fully typed SDK for the DALP tokenization platform API",
|
|
79465
79510
|
homepage: "https://settlemint.com",
|
|
@@ -79602,7 +79647,7 @@ function createDalpClient(config3) {
|
|
|
79602
79647
|
// package.json
|
|
79603
79648
|
var package_default2 = {
|
|
79604
79649
|
name: "@settlemint/dalp-cli",
|
|
79605
|
-
version: "2.1.7-main.
|
|
79650
|
+
version: "2.1.7-main.23476285750",
|
|
79606
79651
|
private: false,
|
|
79607
79652
|
description: "CLI for the Digital Asset Lifecycle Platform — manage tokens, identities, compliance, and more from the command line.",
|
|
79608
79653
|
homepage: "https://settlemint.com",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@settlemint/dalp-cli",
|
|
3
|
-
"version": "2.1.7-main.
|
|
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",
|