@dyne/interfacer-client 0.5.0 → 0.6.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/dist/index.cjs +368 -349
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +12 -1
- package/dist/index.d.ts +12 -1
- package/dist/index.js +367 -349
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -261,6 +261,7 @@ __export(index_exports, {
|
|
|
261
261
|
CITE_PROJECT: () => CITE_PROJECT,
|
|
262
262
|
CLAIM_DID: () => CLAIM_DID,
|
|
263
263
|
CO2_THRESHOLDS_KG: () => CO2_THRESHOLDS_KG,
|
|
264
|
+
COMPLEXITY_OPTIONS: () => COMPLEXITY_OPTIONS,
|
|
264
265
|
CONSUME_RESOURCE: () => CONSUME_RESOURCE,
|
|
265
266
|
CONTRIBUTE_TO_PROJECT: () => CONTRIBUTE_TO_PROJECT,
|
|
266
267
|
CREATE_DPP_RESOURCE: () => CREATE_DPP_RESOURCE,
|
|
@@ -559,7 +560,7 @@ var FETCH_RESOURCES = gql`
|
|
|
559
560
|
$filter: EconomicResourceFilterParams
|
|
560
561
|
) {
|
|
561
562
|
economicResources(first: $first after: $after before: $before last: $last filter: $filter) {
|
|
562
|
-
pageInfo { startCursor endCursor hasPreviousPage hasNextPage totalCount pageLimit }
|
|
563
|
+
pageInfo { startCursor endCursor hasPreviousPage hasNextPage totalCount pageLimit distinctPrimaryAccountableCount }
|
|
563
564
|
edges {
|
|
564
565
|
cursor
|
|
565
566
|
node {
|
|
@@ -855,13 +856,14 @@ var CREATE_PROJECT = gql`
|
|
|
855
856
|
var CREATE_MACHINE_RESOURCE = gql`
|
|
856
857
|
mutation createMachineResource(
|
|
857
858
|
$agent: ID! $creationTime: DateTime! $process: ID! $resourceSpec: ID!
|
|
858
|
-
$unitOne: ID! $name: String! $note: String $metadata: JSONObject
|
|
859
|
+
$unitOne: ID! $name: String! $note: String $metadata: JSONObject $tags: [URI!]
|
|
859
860
|
) {
|
|
860
861
|
createEconomicEvent(
|
|
861
862
|
event: {
|
|
862
863
|
action: "produce" outputOf: $process provider: $agent receiver: $agent
|
|
863
864
|
hasPointInTime: $creationTime resourceConformsTo: $resourceSpec
|
|
864
865
|
resourceQuantity: { hasNumericalValue: 1 hasUnit: $unitOne } resourceMetadata: $metadata
|
|
866
|
+
resourceClassifiedAs: $tags
|
|
865
867
|
}
|
|
866
868
|
newInventoriedResource: { name: $name note: $note }
|
|
867
869
|
) {
|
|
@@ -1883,76 +1885,357 @@ function clearInstanceVariablesCache() {
|
|
|
1883
1885
|
cachedVars = null;
|
|
1884
1886
|
}
|
|
1885
1887
|
|
|
1886
|
-
// src/
|
|
1887
|
-
var
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1888
|
+
// src/tagging/constants.ts
|
|
1889
|
+
var TAG_PREFIX = {
|
|
1890
|
+
USER: "tag",
|
|
1891
|
+
CATEGORY: "category",
|
|
1892
|
+
MACHINE: "machine",
|
|
1893
|
+
MATERIAL: "material",
|
|
1894
|
+
POWER_COMPAT: "powercompat",
|
|
1895
|
+
POWER_REQ: "powerreq",
|
|
1896
|
+
REPLICABILITY: "replicability",
|
|
1897
|
+
RECYCLABILITY: "recyclability",
|
|
1898
|
+
REPAIRABILITY: "repairability",
|
|
1899
|
+
ENV_ENERGY: "env-energy",
|
|
1900
|
+
ENV_CO2: "env-co2",
|
|
1901
|
+
SERVICE_TYPE: "servicetype",
|
|
1902
|
+
AVAILABILITY: "availability",
|
|
1903
|
+
LICENSE: "license",
|
|
1904
|
+
MANUFACTURABLE: "manufacturable",
|
|
1905
|
+
COMPLEXITY: "complexity"
|
|
1906
|
+
};
|
|
1907
|
+
var SYSTEM_TAG_PREFIXES = [
|
|
1908
|
+
TAG_PREFIX.CATEGORY,
|
|
1909
|
+
TAG_PREFIX.MACHINE,
|
|
1910
|
+
TAG_PREFIX.MATERIAL,
|
|
1911
|
+
TAG_PREFIX.POWER_COMPAT,
|
|
1912
|
+
TAG_PREFIX.POWER_REQ,
|
|
1913
|
+
TAG_PREFIX.REPLICABILITY,
|
|
1914
|
+
TAG_PREFIX.RECYCLABILITY,
|
|
1915
|
+
TAG_PREFIX.REPAIRABILITY,
|
|
1916
|
+
TAG_PREFIX.ENV_ENERGY,
|
|
1917
|
+
TAG_PREFIX.ENV_CO2,
|
|
1918
|
+
TAG_PREFIX.SERVICE_TYPE,
|
|
1919
|
+
TAG_PREFIX.AVAILABILITY,
|
|
1920
|
+
TAG_PREFIX.LICENSE,
|
|
1921
|
+
TAG_PREFIX.MANUFACTURABLE,
|
|
1922
|
+
TAG_PREFIX.COMPLEXITY
|
|
1923
|
+
];
|
|
1924
|
+
var LEGACY_SYSTEM_TAG_PATTERNS = [
|
|
1925
|
+
"power_compat-",
|
|
1926
|
+
"power_",
|
|
1927
|
+
"env_",
|
|
1928
|
+
"mat:",
|
|
1929
|
+
"c:",
|
|
1930
|
+
"pc:",
|
|
1931
|
+
"env:",
|
|
1932
|
+
"pwr:",
|
|
1933
|
+
"rep:",
|
|
1934
|
+
"m:"
|
|
1935
|
+
];
|
|
1936
|
+
var PRODUCT_CATEGORY_OPTIONS = [
|
|
1937
|
+
"Electronics",
|
|
1938
|
+
"Tools",
|
|
1939
|
+
"Furniture",
|
|
1940
|
+
"Home renovation",
|
|
1941
|
+
"Energy",
|
|
1942
|
+
"Wearables",
|
|
1943
|
+
"Medical",
|
|
1944
|
+
"Sustainability",
|
|
1945
|
+
"Education"
|
|
1946
|
+
];
|
|
1947
|
+
var POWER_COMPATIBILITY_OPTIONS = [
|
|
1948
|
+
"120V AC",
|
|
1949
|
+
"220-240V AC",
|
|
1950
|
+
"12V DC",
|
|
1951
|
+
"24V DC",
|
|
1952
|
+
"Battery Powered",
|
|
1953
|
+
"USB-C"
|
|
1954
|
+
];
|
|
1955
|
+
var REPLICABILITY_OPTIONS = ["High", "Medium", "Low"];
|
|
1956
|
+
var COMPLEXITY_OPTIONS = ["Beginner", "Intermediate", "Advanced"];
|
|
1957
|
+
var SERVICE_TYPE_OPTIONS = ["Fabrication", "Learning & Education", "Space Access"];
|
|
1958
|
+
var AVAILABILITY_OPTIONS = [
|
|
1959
|
+
"Available Now",
|
|
1960
|
+
"Booking Required",
|
|
1961
|
+
"Weekdays Only",
|
|
1962
|
+
"Weekends Available"
|
|
1963
|
+
];
|
|
1964
|
+
var RECYCLABILITY_THRESHOLDS_PCT = [0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100];
|
|
1965
|
+
var POWER_REQUIREMENT_THRESHOLDS_W = [
|
|
1966
|
+
0,
|
|
1967
|
+
10,
|
|
1968
|
+
25,
|
|
1969
|
+
50,
|
|
1970
|
+
75,
|
|
1971
|
+
100,
|
|
1972
|
+
150,
|
|
1973
|
+
200,
|
|
1974
|
+
250,
|
|
1975
|
+
300,
|
|
1976
|
+
500,
|
|
1977
|
+
750,
|
|
1978
|
+
1e3,
|
|
1979
|
+
1500,
|
|
1980
|
+
2e3
|
|
1981
|
+
];
|
|
1982
|
+
var ENERGY_THRESHOLDS_KWH = [
|
|
1983
|
+
0,
|
|
1984
|
+
10,
|
|
1985
|
+
20,
|
|
1986
|
+
30,
|
|
1987
|
+
50,
|
|
1988
|
+
100,
|
|
1989
|
+
200,
|
|
1990
|
+
300,
|
|
1991
|
+
500,
|
|
1992
|
+
750,
|
|
1993
|
+
1e3,
|
|
1994
|
+
1500,
|
|
1995
|
+
2e3
|
|
1996
|
+
];
|
|
1997
|
+
var CO2_THRESHOLDS_KG = [0, 0.5, 1, 1.5, 2, 2.5, 3, 3.5, 5, 7.5, 10, 15, 20];
|
|
1998
|
+
var REPAIRABILITY_AVAILABLE_TAG = "repairability-available";
|
|
1999
|
+
var MANUFACTURABLE_TRUE_TAG = "manufacturable-true";
|
|
2000
|
+
|
|
2001
|
+
// src/tagging/TaggingClient.ts
|
|
2002
|
+
function slugifyTagValue(value) {
|
|
2003
|
+
return value.normalize("NFKD").replace(/[\u0300-\u036f]/g, "").toLowerCase().trim().replace(/[^a-z0-9]+/g, "-").replace(/-+/g, "-").replace(/^-+/, "").replace(/-+$/, "");
|
|
2004
|
+
}
|
|
2005
|
+
function prefixedTag(prefix, value) {
|
|
2006
|
+
const slug = slugifyTagValue(value);
|
|
2007
|
+
if (!slug) return void 0;
|
|
2008
|
+
return `${prefix}-${slug}`;
|
|
2009
|
+
}
|
|
2010
|
+
function userTag(raw) {
|
|
2011
|
+
const slug = slugifyTagValue(raw);
|
|
2012
|
+
if (!slug) return void 0;
|
|
2013
|
+
return `${TAG_PREFIX.USER}-${slug}`;
|
|
2014
|
+
}
|
|
2015
|
+
function isUserTag(tag) {
|
|
2016
|
+
return tag.startsWith(`${TAG_PREFIX.USER}-`);
|
|
2017
|
+
}
|
|
2018
|
+
function stripUserTagPrefix(tag) {
|
|
2019
|
+
return isUserTag(tag) ? tag.substring(TAG_PREFIX.USER.length + 1) : tag;
|
|
2020
|
+
}
|
|
2021
|
+
function isSystemTag(tag) {
|
|
2022
|
+
if (isUserTag(tag)) return false;
|
|
2023
|
+
if (SYSTEM_TAG_PREFIXES.some((p) => tag.startsWith(`${p}-`))) return true;
|
|
2024
|
+
if (LEGACY_SYSTEM_TAG_PATTERNS.some((p) => tag.startsWith(p))) return true;
|
|
2025
|
+
return false;
|
|
2026
|
+
}
|
|
2027
|
+
function extractUserTagValues(tags) {
|
|
2028
|
+
if (!tags || tags.length === 0) return [];
|
|
2029
|
+
const out = [];
|
|
2030
|
+
const seen = /* @__PURE__ */ new Set();
|
|
2031
|
+
for (const tag of tags) {
|
|
2032
|
+
if (!tag) continue;
|
|
2033
|
+
let value;
|
|
2034
|
+
if (isUserTag(tag)) {
|
|
2035
|
+
value = decodeURIComponent(stripUserTagPrefix(tag));
|
|
2036
|
+
} else if (!isSystemTag(tag)) {
|
|
2037
|
+
value = decodeURIComponent(tag);
|
|
1917
2038
|
}
|
|
2039
|
+
if (!value) continue;
|
|
2040
|
+
if (seen.has(value)) continue;
|
|
2041
|
+
seen.add(value);
|
|
2042
|
+
out.push(value);
|
|
1918
2043
|
}
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
2044
|
+
return out;
|
|
2045
|
+
}
|
|
2046
|
+
function normalizeUserTagsForSave(tags) {
|
|
2047
|
+
const out = [];
|
|
2048
|
+
const seen = /* @__PURE__ */ new Set();
|
|
2049
|
+
for (const raw of tags) {
|
|
2050
|
+
const trimmed = raw?.trim();
|
|
2051
|
+
if (!trimmed) continue;
|
|
2052
|
+
if (isSystemTag(trimmed)) continue;
|
|
2053
|
+
const canonical = isUserTag(trimmed) ? trimmed : userTag(trimmed);
|
|
2054
|
+
if (!canonical) continue;
|
|
2055
|
+
if (seen.has(canonical)) continue;
|
|
2056
|
+
seen.add(canonical);
|
|
2057
|
+
out.push(canonical);
|
|
1927
2058
|
}
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
2059
|
+
return out;
|
|
2060
|
+
}
|
|
2061
|
+
function formatNumericTagValue(value) {
|
|
2062
|
+
if (!Number.isFinite(value)) return "";
|
|
2063
|
+
const normalized = Number.isInteger(value) ? String(value) : String(value).replace(/\./g, "p");
|
|
2064
|
+
return normalized.replace(/[^0-9p-]/g, "");
|
|
2065
|
+
}
|
|
2066
|
+
function asSortedNumericThresholds(thresholds) {
|
|
2067
|
+
return Array.from(new Set(thresholds.filter((n) => Number.isFinite(n)))).sort((a, b) => a - b);
|
|
2068
|
+
}
|
|
2069
|
+
function isPrefixedTag(tag, prefixes) {
|
|
2070
|
+
return prefixes.some((prefix) => tag.startsWith(`${prefix}-`));
|
|
2071
|
+
}
|
|
2072
|
+
function monotonicRangeTags(prefix, value, thresholds) {
|
|
2073
|
+
if (!Number.isFinite(value)) return [];
|
|
2074
|
+
const sorted = asSortedNumericThresholds(thresholds);
|
|
2075
|
+
const ge = sorted.filter((t) => t <= value).map((t) => `${prefix}-ge-${formatNumericTagValue(t)}`);
|
|
2076
|
+
const le = sorted.filter((t) => t >= value).map((t) => `${prefix}-le-${formatNumericTagValue(t)}`);
|
|
2077
|
+
return mergeTags(ge, le);
|
|
2078
|
+
}
|
|
2079
|
+
function rangeFilterTags(prefix, minValue, maxValue, thresholds) {
|
|
2080
|
+
const sorted = asSortedNumericThresholds(thresholds);
|
|
2081
|
+
const tags = [];
|
|
2082
|
+
if (typeof minValue === "number" && Number.isFinite(minValue)) {
|
|
2083
|
+
const lower = sorted.reduce((acc, t) => t <= minValue ? t : acc, void 0);
|
|
2084
|
+
if (typeof lower === "number") tags.push(`${prefix}-ge-${formatNumericTagValue(lower)}`);
|
|
1938
2085
|
}
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
2086
|
+
if (typeof maxValue === "number" && Number.isFinite(maxValue)) {
|
|
2087
|
+
const upper = sorted.find((t) => t >= maxValue);
|
|
2088
|
+
if (typeof upper === "number") tags.push(`${prefix}-le-${formatNumericTagValue(upper)}`);
|
|
2089
|
+
}
|
|
2090
|
+
return mergeTags(tags);
|
|
2091
|
+
}
|
|
2092
|
+
function derivedProductFilterTags(filters) {
|
|
2093
|
+
const categories = (filters.categories || []).map((value) => prefixedTag(TAG_PREFIX.CATEGORY, value)).filter((t) => Boolean(t));
|
|
2094
|
+
const powerCompatibility = (filters.powerCompatibility || []).map((value) => prefixedTag(TAG_PREFIX.POWER_COMPAT, value)).filter((t) => Boolean(t));
|
|
2095
|
+
const replicability = (filters.replicability || []).map((value) => prefixedTag(TAG_PREFIX.REPLICABILITY, value)).filter((t) => Boolean(t));
|
|
2096
|
+
const recyclability = typeof filters.recyclabilityPct === "number" ? monotonicRangeTags(TAG_PREFIX.RECYCLABILITY, filters.recyclabilityPct, RECYCLABILITY_THRESHOLDS_PCT) : [];
|
|
2097
|
+
const repairability = filters.repairability ? [REPAIRABILITY_AVAILABLE_TAG] : [];
|
|
2098
|
+
const powerReq = typeof filters.powerRequirementW === "number" ? monotonicRangeTags(TAG_PREFIX.POWER_REQ, filters.powerRequirementW, POWER_REQUIREMENT_THRESHOLDS_W) : [];
|
|
2099
|
+
const energy = typeof filters.energyKwh === "number" ? monotonicRangeTags(TAG_PREFIX.ENV_ENERGY, filters.energyKwh, ENERGY_THRESHOLDS_KWH) : [];
|
|
2100
|
+
const co2 = typeof filters.co2Kg === "number" ? monotonicRangeTags(TAG_PREFIX.ENV_CO2, filters.co2Kg, CO2_THRESHOLDS_KG) : [];
|
|
2101
|
+
return mergeTags(
|
|
2102
|
+
categories,
|
|
2103
|
+
powerCompatibility,
|
|
2104
|
+
replicability,
|
|
2105
|
+
recyclability,
|
|
2106
|
+
repairability,
|
|
2107
|
+
powerReq,
|
|
2108
|
+
energy,
|
|
2109
|
+
co2
|
|
2110
|
+
);
|
|
2111
|
+
}
|
|
2112
|
+
function derivedServiceFilterTags(filters) {
|
|
2113
|
+
const serviceType = (filters.serviceType || []).map((value) => prefixedTag(TAG_PREFIX.SERVICE_TYPE, value)).filter((t) => Boolean(t));
|
|
2114
|
+
const availability = (filters.availability || []).map((value) => prefixedTag(TAG_PREFIX.AVAILABILITY, value)).filter((t) => Boolean(t));
|
|
2115
|
+
return mergeTags(serviceType, availability);
|
|
2116
|
+
}
|
|
2117
|
+
function removeTagsWithPrefixes(tags, prefixes) {
|
|
2118
|
+
return tags.filter((tag) => !isPrefixedTag(tag, prefixes));
|
|
2119
|
+
}
|
|
2120
|
+
function mergeTags(...tagLists) {
|
|
2121
|
+
const merged = [];
|
|
2122
|
+
const seen = /* @__PURE__ */ new Set();
|
|
2123
|
+
for (const list of tagLists) {
|
|
2124
|
+
if (!list) continue;
|
|
2125
|
+
for (const tag of list) {
|
|
2126
|
+
const trimmed = tag.trim();
|
|
2127
|
+
if (!trimmed) continue;
|
|
2128
|
+
if (seen.has(trimmed)) continue;
|
|
2129
|
+
seen.add(trimmed);
|
|
2130
|
+
merged.push(trimmed);
|
|
2131
|
+
}
|
|
2132
|
+
}
|
|
2133
|
+
return merged;
|
|
2134
|
+
}
|
|
2135
|
+
var TaggingClient = class {
|
|
2136
|
+
// User tag operations
|
|
2137
|
+
normalizeUserTags = normalizeUserTagsForSave;
|
|
2138
|
+
extractUserTagValues = extractUserTagValues;
|
|
2139
|
+
isSystemTag = isSystemTag;
|
|
2140
|
+
isUserTag = isUserTag;
|
|
2141
|
+
userTag = userTag;
|
|
2142
|
+
// Filter tag derivation
|
|
2143
|
+
derivedProductFilterTags = derivedProductFilterTags;
|
|
2144
|
+
derivedServiceFilterTags = derivedServiceFilterTags;
|
|
2145
|
+
// Numeric range helpers
|
|
2146
|
+
monotonicRangeTags = monotonicRangeTags;
|
|
2147
|
+
rangeFilterTags = rangeFilterTags;
|
|
2148
|
+
// Utilities
|
|
2149
|
+
slugifyTagValue = slugifyTagValue;
|
|
2150
|
+
prefixedTag = prefixedTag;
|
|
2151
|
+
mergeTags = mergeTags;
|
|
2152
|
+
removeTagsWithPrefixes = removeTagsWithPrefixes;
|
|
2153
|
+
// Constants
|
|
2154
|
+
TAG_PREFIX = TAG_PREFIX;
|
|
2155
|
+
SYSTEM_TAG_PREFIXES = SYSTEM_TAG_PREFIXES;
|
|
2156
|
+
PRODUCT_CATEGORY_OPTIONS = PRODUCT_CATEGORY_OPTIONS;
|
|
2157
|
+
POWER_COMPATIBILITY_OPTIONS = POWER_COMPATIBILITY_OPTIONS;
|
|
2158
|
+
REPLICABILITY_OPTIONS = REPLICABILITY_OPTIONS;
|
|
2159
|
+
SERVICE_TYPE_OPTIONS = SERVICE_TYPE_OPTIONS;
|
|
2160
|
+
AVAILABILITY_OPTIONS = AVAILABILITY_OPTIONS;
|
|
2161
|
+
RECYCLABILITY_THRESHOLDS_PCT = RECYCLABILITY_THRESHOLDS_PCT;
|
|
2162
|
+
POWER_REQUIREMENT_THRESHOLDS_W = POWER_REQUIREMENT_THRESHOLDS_W;
|
|
2163
|
+
ENERGY_THRESHOLDS_KWH = ENERGY_THRESHOLDS_KWH;
|
|
2164
|
+
CO2_THRESHOLDS_KG = CO2_THRESHOLDS_KG;
|
|
2165
|
+
REPAIRABILITY_AVAILABLE_TAG = REPAIRABILITY_AVAILABLE_TAG;
|
|
2166
|
+
MANUFACTURABLE_TRUE_TAG = MANUFACTURABLE_TRUE_TAG;
|
|
2167
|
+
};
|
|
2168
|
+
|
|
2169
|
+
// src/resources/ResourceClient.ts
|
|
2170
|
+
var ResourceClient = class {
|
|
2171
|
+
constructor(config, store, graphql) {
|
|
2172
|
+
this.config = config;
|
|
2173
|
+
this.store = store;
|
|
2174
|
+
this.graphql = graphql;
|
|
2175
|
+
}
|
|
2176
|
+
config;
|
|
2177
|
+
store;
|
|
2178
|
+
graphql;
|
|
2179
|
+
get userId() {
|
|
2180
|
+
const id = this.store.getItem("authId");
|
|
2181
|
+
if (!id) throw new Error("Not authenticated");
|
|
2182
|
+
return id;
|
|
2183
|
+
}
|
|
2184
|
+
async getInstanceVars() {
|
|
2185
|
+
return getInstanceVariables(this.graphql);
|
|
2186
|
+
}
|
|
2187
|
+
// ─── Helpers ───────────────────────────────────────────────────────
|
|
2188
|
+
specIdForType(vars, type) {
|
|
2189
|
+
switch (type) {
|
|
2190
|
+
case "Design" /* DESIGN */:
|
|
2191
|
+
return vars.projectDesign.id;
|
|
2192
|
+
case "Product" /* PRODUCT */:
|
|
2193
|
+
return vars.projectProduct?.id || this.config.specs?.product || "";
|
|
2194
|
+
case "Service" /* SERVICE */:
|
|
2195
|
+
return vars.projectService?.id || this.config.specs?.service || "";
|
|
2196
|
+
case "Machine" /* MACHINE */:
|
|
2197
|
+
return vars.machine?.id || this.config.specs?.machine || "";
|
|
2198
|
+
case "DPP" /* DPP */:
|
|
2199
|
+
return vars.dpp?.id || this.config.specs?.dpp || "";
|
|
2200
|
+
}
|
|
2201
|
+
}
|
|
2202
|
+
// ─── Process ───────────────────────────────────────────────────────
|
|
2203
|
+
async createProcess(name) {
|
|
2204
|
+
const res = await this.graphql.request(
|
|
2205
|
+
CREATE_PROCESS,
|
|
2206
|
+
{ name }
|
|
2207
|
+
);
|
|
2208
|
+
if (res.errors?.length) throw new Error(`createProcess failed: ${res.errors[0].message}`);
|
|
2209
|
+
return res.data.createProcess.process.id;
|
|
2210
|
+
}
|
|
2211
|
+
// ─── Location ──────────────────────────────────────────────────────
|
|
2212
|
+
async createLocation(params) {
|
|
2213
|
+
const res = await this.graphql.request(CREATE_LOCATION, {
|
|
2214
|
+
name: params.name,
|
|
2215
|
+
addr: params.address || "",
|
|
2216
|
+
lat: params.lat || 0,
|
|
2217
|
+
lng: params.lng || 0
|
|
2218
|
+
});
|
|
2219
|
+
if (res.errors?.length) throw new Error(`createLocation failed: ${res.errors[0].message}`);
|
|
2220
|
+
return res.data.createSpatialThing.spatialThing;
|
|
2221
|
+
}
|
|
2222
|
+
// ─── Create Project (Design, Product, Service) ─────────────────────
|
|
2223
|
+
async createProject(params) {
|
|
2224
|
+
const vars = await this.getInstanceVars();
|
|
2225
|
+
const specId = this.specIdForType(vars, params.projectType);
|
|
2226
|
+
if (!specId) throw new Error(`${params.projectType} spec ID not found in instance variables or config`);
|
|
2227
|
+
const processId = params.processId || await this.createProcess(`creation of ${params.name} by owner`);
|
|
2228
|
+
let locationId = params.locationId;
|
|
2229
|
+
if (!locationId && params.location) {
|
|
2230
|
+
const loc = await this.createLocation(params.location);
|
|
2231
|
+
locationId = loc.id;
|
|
2232
|
+
}
|
|
2233
|
+
const variables = {
|
|
2234
|
+
name: params.name,
|
|
2235
|
+
note: params.note || "",
|
|
2236
|
+
metadata: JSON.stringify(params.metadata || {}),
|
|
2237
|
+
agent: this.userId,
|
|
2238
|
+
creationTime: (/* @__PURE__ */ new Date()).toISOString(),
|
|
1956
2239
|
location: locationId,
|
|
1957
2240
|
resourceSpec: specId,
|
|
1958
2241
|
oneUnit: vars.unitOne,
|
|
@@ -1974,7 +2257,18 @@ var ResourceClient = class {
|
|
|
1974
2257
|
const machineSpecId = vars.machine?.id || this.config.specs?.machine;
|
|
1975
2258
|
if (!machineSpecId) throw new Error("Machine spec ID not found in instance variables or config");
|
|
1976
2259
|
const processId = await this.createProcess(`creation of machine ${params.name}`);
|
|
1977
|
-
const
|
|
2260
|
+
const metadata = {
|
|
2261
|
+
...params.type && { machineType: params.type },
|
|
2262
|
+
...params.location && { location: params.location },
|
|
2263
|
+
...params.image && { image: params.image },
|
|
2264
|
+
...params.metadata || {}
|
|
2265
|
+
};
|
|
2266
|
+
const tags = [...params.tags || []];
|
|
2267
|
+
if (params.type) {
|
|
2268
|
+
const typeTag = prefixedTag(TAG_PREFIX.MACHINE, params.type);
|
|
2269
|
+
if (typeTag) tags.push(typeTag);
|
|
2270
|
+
}
|
|
2271
|
+
const variables = {
|
|
1978
2272
|
agent: this.userId,
|
|
1979
2273
|
creationTime: (/* @__PURE__ */ new Date()).toISOString(),
|
|
1980
2274
|
process: processId,
|
|
@@ -1982,8 +2276,10 @@ var ResourceClient = class {
|
|
|
1982
2276
|
unitOne: vars.unitOne,
|
|
1983
2277
|
name: params.name,
|
|
1984
2278
|
note: params.note || "",
|
|
1985
|
-
metadata: JSON.stringify(
|
|
1986
|
-
}
|
|
2279
|
+
metadata: JSON.stringify(metadata)
|
|
2280
|
+
};
|
|
2281
|
+
if (tags.length > 0) variables.tags = tags;
|
|
2282
|
+
const res = await this.graphql.request(CREATE_MACHINE_RESOURCE, variables);
|
|
1987
2283
|
if (res.errors?.length) throw new Error(`createMachine failed: ${res.errors[0].message}`);
|
|
1988
2284
|
return res.data.createEconomicEvent.economicEvent.resourceInventoriedAs;
|
|
1989
2285
|
}
|
|
@@ -2268,284 +2564,6 @@ var SocialClient = class {
|
|
|
2268
2564
|
}
|
|
2269
2565
|
};
|
|
2270
2566
|
|
|
2271
|
-
// src/tagging/constants.ts
|
|
2272
|
-
var TAG_PREFIX = {
|
|
2273
|
-
USER: "tag",
|
|
2274
|
-
CATEGORY: "category",
|
|
2275
|
-
MACHINE: "machine",
|
|
2276
|
-
MATERIAL: "material",
|
|
2277
|
-
POWER_COMPAT: "powercompat",
|
|
2278
|
-
POWER_REQ: "powerreq",
|
|
2279
|
-
REPLICABILITY: "replicability",
|
|
2280
|
-
RECYCLABILITY: "recyclability",
|
|
2281
|
-
REPAIRABILITY: "repairability",
|
|
2282
|
-
ENV_ENERGY: "env-energy",
|
|
2283
|
-
ENV_CO2: "env-co2",
|
|
2284
|
-
SERVICE_TYPE: "servicetype",
|
|
2285
|
-
AVAILABILITY: "availability",
|
|
2286
|
-
LICENSE: "license",
|
|
2287
|
-
MANUFACTURABLE: "manufacturable"
|
|
2288
|
-
};
|
|
2289
|
-
var SYSTEM_TAG_PREFIXES = [
|
|
2290
|
-
TAG_PREFIX.CATEGORY,
|
|
2291
|
-
TAG_PREFIX.MACHINE,
|
|
2292
|
-
TAG_PREFIX.MATERIAL,
|
|
2293
|
-
TAG_PREFIX.POWER_COMPAT,
|
|
2294
|
-
TAG_PREFIX.POWER_REQ,
|
|
2295
|
-
TAG_PREFIX.REPLICABILITY,
|
|
2296
|
-
TAG_PREFIX.RECYCLABILITY,
|
|
2297
|
-
TAG_PREFIX.REPAIRABILITY,
|
|
2298
|
-
TAG_PREFIX.ENV_ENERGY,
|
|
2299
|
-
TAG_PREFIX.ENV_CO2,
|
|
2300
|
-
TAG_PREFIX.SERVICE_TYPE,
|
|
2301
|
-
TAG_PREFIX.AVAILABILITY,
|
|
2302
|
-
TAG_PREFIX.LICENSE,
|
|
2303
|
-
TAG_PREFIX.MANUFACTURABLE
|
|
2304
|
-
];
|
|
2305
|
-
var LEGACY_SYSTEM_TAG_PATTERNS = [
|
|
2306
|
-
"power_compat-",
|
|
2307
|
-
"power_",
|
|
2308
|
-
"env_",
|
|
2309
|
-
"mat:",
|
|
2310
|
-
"c:",
|
|
2311
|
-
"pc:",
|
|
2312
|
-
"env:",
|
|
2313
|
-
"pwr:",
|
|
2314
|
-
"rep:",
|
|
2315
|
-
"m:"
|
|
2316
|
-
];
|
|
2317
|
-
var PRODUCT_CATEGORY_OPTIONS = [
|
|
2318
|
-
"Electronics",
|
|
2319
|
-
"Tools",
|
|
2320
|
-
"Furniture",
|
|
2321
|
-
"Home renovation",
|
|
2322
|
-
"Energy",
|
|
2323
|
-
"Wearables",
|
|
2324
|
-
"Medical",
|
|
2325
|
-
"Sustainability",
|
|
2326
|
-
"Education"
|
|
2327
|
-
];
|
|
2328
|
-
var POWER_COMPATIBILITY_OPTIONS = [
|
|
2329
|
-
"120V AC",
|
|
2330
|
-
"220-240V AC",
|
|
2331
|
-
"12V DC",
|
|
2332
|
-
"24V DC",
|
|
2333
|
-
"Battery Powered",
|
|
2334
|
-
"USB-C"
|
|
2335
|
-
];
|
|
2336
|
-
var REPLICABILITY_OPTIONS = ["High", "Medium", "Low"];
|
|
2337
|
-
var SERVICE_TYPE_OPTIONS = ["Fabrication", "Learning & Education", "Space Access"];
|
|
2338
|
-
var AVAILABILITY_OPTIONS = [
|
|
2339
|
-
"Available Now",
|
|
2340
|
-
"Booking Required",
|
|
2341
|
-
"Weekdays Only",
|
|
2342
|
-
"Weekends Available"
|
|
2343
|
-
];
|
|
2344
|
-
var RECYCLABILITY_THRESHOLDS_PCT = [0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100];
|
|
2345
|
-
var POWER_REQUIREMENT_THRESHOLDS_W = [
|
|
2346
|
-
0,
|
|
2347
|
-
10,
|
|
2348
|
-
25,
|
|
2349
|
-
50,
|
|
2350
|
-
75,
|
|
2351
|
-
100,
|
|
2352
|
-
150,
|
|
2353
|
-
200,
|
|
2354
|
-
250,
|
|
2355
|
-
300,
|
|
2356
|
-
500,
|
|
2357
|
-
750,
|
|
2358
|
-
1e3,
|
|
2359
|
-
1500,
|
|
2360
|
-
2e3
|
|
2361
|
-
];
|
|
2362
|
-
var ENERGY_THRESHOLDS_KWH = [
|
|
2363
|
-
0,
|
|
2364
|
-
10,
|
|
2365
|
-
20,
|
|
2366
|
-
30,
|
|
2367
|
-
50,
|
|
2368
|
-
100,
|
|
2369
|
-
200,
|
|
2370
|
-
300,
|
|
2371
|
-
500,
|
|
2372
|
-
750,
|
|
2373
|
-
1e3,
|
|
2374
|
-
1500,
|
|
2375
|
-
2e3
|
|
2376
|
-
];
|
|
2377
|
-
var CO2_THRESHOLDS_KG = [0, 0.5, 1, 1.5, 2, 2.5, 3, 3.5, 5, 7.5, 10, 15, 20];
|
|
2378
|
-
var REPAIRABILITY_AVAILABLE_TAG = "repairability-available";
|
|
2379
|
-
var MANUFACTURABLE_TRUE_TAG = "manufacturable-true";
|
|
2380
|
-
|
|
2381
|
-
// src/tagging/TaggingClient.ts
|
|
2382
|
-
function slugifyTagValue(value) {
|
|
2383
|
-
return value.normalize("NFKD").replace(/[\u0300-\u036f]/g, "").toLowerCase().trim().replace(/[^a-z0-9]+/g, "-").replace(/-+/g, "-").replace(/^-+/, "").replace(/-+$/, "");
|
|
2384
|
-
}
|
|
2385
|
-
function prefixedTag(prefix, value) {
|
|
2386
|
-
const slug = slugifyTagValue(value);
|
|
2387
|
-
if (!slug) return void 0;
|
|
2388
|
-
return `${prefix}-${slug}`;
|
|
2389
|
-
}
|
|
2390
|
-
function userTag(raw) {
|
|
2391
|
-
const slug = slugifyTagValue(raw);
|
|
2392
|
-
if (!slug) return void 0;
|
|
2393
|
-
return `${TAG_PREFIX.USER}-${slug}`;
|
|
2394
|
-
}
|
|
2395
|
-
function isUserTag(tag) {
|
|
2396
|
-
return tag.startsWith(`${TAG_PREFIX.USER}-`);
|
|
2397
|
-
}
|
|
2398
|
-
function stripUserTagPrefix(tag) {
|
|
2399
|
-
return isUserTag(tag) ? tag.substring(TAG_PREFIX.USER.length + 1) : tag;
|
|
2400
|
-
}
|
|
2401
|
-
function isSystemTag(tag) {
|
|
2402
|
-
if (isUserTag(tag)) return false;
|
|
2403
|
-
if (SYSTEM_TAG_PREFIXES.some((p) => tag.startsWith(`${p}-`))) return true;
|
|
2404
|
-
if (LEGACY_SYSTEM_TAG_PATTERNS.some((p) => tag.startsWith(p))) return true;
|
|
2405
|
-
return false;
|
|
2406
|
-
}
|
|
2407
|
-
function extractUserTagValues(tags) {
|
|
2408
|
-
if (!tags || tags.length === 0) return [];
|
|
2409
|
-
const out = [];
|
|
2410
|
-
const seen = /* @__PURE__ */ new Set();
|
|
2411
|
-
for (const tag of tags) {
|
|
2412
|
-
if (!tag) continue;
|
|
2413
|
-
let value;
|
|
2414
|
-
if (isUserTag(tag)) {
|
|
2415
|
-
value = decodeURIComponent(stripUserTagPrefix(tag));
|
|
2416
|
-
} else if (!isSystemTag(tag)) {
|
|
2417
|
-
value = decodeURIComponent(tag);
|
|
2418
|
-
}
|
|
2419
|
-
if (!value) continue;
|
|
2420
|
-
if (seen.has(value)) continue;
|
|
2421
|
-
seen.add(value);
|
|
2422
|
-
out.push(value);
|
|
2423
|
-
}
|
|
2424
|
-
return out;
|
|
2425
|
-
}
|
|
2426
|
-
function normalizeUserTagsForSave(tags) {
|
|
2427
|
-
const out = [];
|
|
2428
|
-
const seen = /* @__PURE__ */ new Set();
|
|
2429
|
-
for (const raw of tags) {
|
|
2430
|
-
const trimmed = raw?.trim();
|
|
2431
|
-
if (!trimmed) continue;
|
|
2432
|
-
if (isSystemTag(trimmed)) continue;
|
|
2433
|
-
const canonical = isUserTag(trimmed) ? trimmed : userTag(trimmed);
|
|
2434
|
-
if (!canonical) continue;
|
|
2435
|
-
if (seen.has(canonical)) continue;
|
|
2436
|
-
seen.add(canonical);
|
|
2437
|
-
out.push(canonical);
|
|
2438
|
-
}
|
|
2439
|
-
return out;
|
|
2440
|
-
}
|
|
2441
|
-
function formatNumericTagValue(value) {
|
|
2442
|
-
if (!Number.isFinite(value)) return "";
|
|
2443
|
-
const normalized = Number.isInteger(value) ? String(value) : String(value).replace(/\./g, "p");
|
|
2444
|
-
return normalized.replace(/[^0-9p-]/g, "");
|
|
2445
|
-
}
|
|
2446
|
-
function asSortedNumericThresholds(thresholds) {
|
|
2447
|
-
return Array.from(new Set(thresholds.filter((n) => Number.isFinite(n)))).sort((a, b) => a - b);
|
|
2448
|
-
}
|
|
2449
|
-
function isPrefixedTag(tag, prefixes) {
|
|
2450
|
-
return prefixes.some((prefix) => tag.startsWith(`${prefix}-`));
|
|
2451
|
-
}
|
|
2452
|
-
function monotonicRangeTags(prefix, value, thresholds) {
|
|
2453
|
-
if (!Number.isFinite(value)) return [];
|
|
2454
|
-
const sorted = asSortedNumericThresholds(thresholds);
|
|
2455
|
-
const ge = sorted.filter((t) => t <= value).map((t) => `${prefix}-ge-${formatNumericTagValue(t)}`);
|
|
2456
|
-
const le = sorted.filter((t) => t >= value).map((t) => `${prefix}-le-${formatNumericTagValue(t)}`);
|
|
2457
|
-
return mergeTags(ge, le);
|
|
2458
|
-
}
|
|
2459
|
-
function rangeFilterTags(prefix, minValue, maxValue, thresholds) {
|
|
2460
|
-
const sorted = asSortedNumericThresholds(thresholds);
|
|
2461
|
-
const tags = [];
|
|
2462
|
-
if (typeof minValue === "number" && Number.isFinite(minValue)) {
|
|
2463
|
-
const lower = sorted.reduce((acc, t) => t <= minValue ? t : acc, void 0);
|
|
2464
|
-
if (typeof lower === "number") tags.push(`${prefix}-ge-${formatNumericTagValue(lower)}`);
|
|
2465
|
-
}
|
|
2466
|
-
if (typeof maxValue === "number" && Number.isFinite(maxValue)) {
|
|
2467
|
-
const upper = sorted.find((t) => t >= maxValue);
|
|
2468
|
-
if (typeof upper === "number") tags.push(`${prefix}-le-${formatNumericTagValue(upper)}`);
|
|
2469
|
-
}
|
|
2470
|
-
return mergeTags(tags);
|
|
2471
|
-
}
|
|
2472
|
-
function derivedProductFilterTags(filters) {
|
|
2473
|
-
const categories = (filters.categories || []).map((value) => prefixedTag(TAG_PREFIX.CATEGORY, value)).filter((t) => Boolean(t));
|
|
2474
|
-
const powerCompatibility = (filters.powerCompatibility || []).map((value) => prefixedTag(TAG_PREFIX.POWER_COMPAT, value)).filter((t) => Boolean(t));
|
|
2475
|
-
const replicability = (filters.replicability || []).map((value) => prefixedTag(TAG_PREFIX.REPLICABILITY, value)).filter((t) => Boolean(t));
|
|
2476
|
-
const recyclability = typeof filters.recyclabilityPct === "number" ? monotonicRangeTags(TAG_PREFIX.RECYCLABILITY, filters.recyclabilityPct, RECYCLABILITY_THRESHOLDS_PCT) : [];
|
|
2477
|
-
const repairability = filters.repairability ? [REPAIRABILITY_AVAILABLE_TAG] : [];
|
|
2478
|
-
const powerReq = typeof filters.powerRequirementW === "number" ? monotonicRangeTags(TAG_PREFIX.POWER_REQ, filters.powerRequirementW, POWER_REQUIREMENT_THRESHOLDS_W) : [];
|
|
2479
|
-
const energy = typeof filters.energyKwh === "number" ? monotonicRangeTags(TAG_PREFIX.ENV_ENERGY, filters.energyKwh, ENERGY_THRESHOLDS_KWH) : [];
|
|
2480
|
-
const co2 = typeof filters.co2Kg === "number" ? monotonicRangeTags(TAG_PREFIX.ENV_CO2, filters.co2Kg, CO2_THRESHOLDS_KG) : [];
|
|
2481
|
-
return mergeTags(
|
|
2482
|
-
categories,
|
|
2483
|
-
powerCompatibility,
|
|
2484
|
-
replicability,
|
|
2485
|
-
recyclability,
|
|
2486
|
-
repairability,
|
|
2487
|
-
powerReq,
|
|
2488
|
-
energy,
|
|
2489
|
-
co2
|
|
2490
|
-
);
|
|
2491
|
-
}
|
|
2492
|
-
function derivedServiceFilterTags(filters) {
|
|
2493
|
-
const serviceType = (filters.serviceType || []).map((value) => prefixedTag(TAG_PREFIX.SERVICE_TYPE, value)).filter((t) => Boolean(t));
|
|
2494
|
-
const availability = (filters.availability || []).map((value) => prefixedTag(TAG_PREFIX.AVAILABILITY, value)).filter((t) => Boolean(t));
|
|
2495
|
-
return mergeTags(serviceType, availability);
|
|
2496
|
-
}
|
|
2497
|
-
function removeTagsWithPrefixes(tags, prefixes) {
|
|
2498
|
-
return tags.filter((tag) => !isPrefixedTag(tag, prefixes));
|
|
2499
|
-
}
|
|
2500
|
-
function mergeTags(...tagLists) {
|
|
2501
|
-
const merged = [];
|
|
2502
|
-
const seen = /* @__PURE__ */ new Set();
|
|
2503
|
-
for (const list of tagLists) {
|
|
2504
|
-
if (!list) continue;
|
|
2505
|
-
for (const tag of list) {
|
|
2506
|
-
const trimmed = tag.trim();
|
|
2507
|
-
if (!trimmed) continue;
|
|
2508
|
-
if (seen.has(trimmed)) continue;
|
|
2509
|
-
seen.add(trimmed);
|
|
2510
|
-
merged.push(trimmed);
|
|
2511
|
-
}
|
|
2512
|
-
}
|
|
2513
|
-
return merged;
|
|
2514
|
-
}
|
|
2515
|
-
var TaggingClient = class {
|
|
2516
|
-
// User tag operations
|
|
2517
|
-
normalizeUserTags = normalizeUserTagsForSave;
|
|
2518
|
-
extractUserTagValues = extractUserTagValues;
|
|
2519
|
-
isSystemTag = isSystemTag;
|
|
2520
|
-
isUserTag = isUserTag;
|
|
2521
|
-
userTag = userTag;
|
|
2522
|
-
// Filter tag derivation
|
|
2523
|
-
derivedProductFilterTags = derivedProductFilterTags;
|
|
2524
|
-
derivedServiceFilterTags = derivedServiceFilterTags;
|
|
2525
|
-
// Numeric range helpers
|
|
2526
|
-
monotonicRangeTags = monotonicRangeTags;
|
|
2527
|
-
rangeFilterTags = rangeFilterTags;
|
|
2528
|
-
// Utilities
|
|
2529
|
-
slugifyTagValue = slugifyTagValue;
|
|
2530
|
-
prefixedTag = prefixedTag;
|
|
2531
|
-
mergeTags = mergeTags;
|
|
2532
|
-
removeTagsWithPrefixes = removeTagsWithPrefixes;
|
|
2533
|
-
// Constants
|
|
2534
|
-
TAG_PREFIX = TAG_PREFIX;
|
|
2535
|
-
SYSTEM_TAG_PREFIXES = SYSTEM_TAG_PREFIXES;
|
|
2536
|
-
PRODUCT_CATEGORY_OPTIONS = PRODUCT_CATEGORY_OPTIONS;
|
|
2537
|
-
POWER_COMPATIBILITY_OPTIONS = POWER_COMPATIBILITY_OPTIONS;
|
|
2538
|
-
REPLICABILITY_OPTIONS = REPLICABILITY_OPTIONS;
|
|
2539
|
-
SERVICE_TYPE_OPTIONS = SERVICE_TYPE_OPTIONS;
|
|
2540
|
-
AVAILABILITY_OPTIONS = AVAILABILITY_OPTIONS;
|
|
2541
|
-
RECYCLABILITY_THRESHOLDS_PCT = RECYCLABILITY_THRESHOLDS_PCT;
|
|
2542
|
-
POWER_REQUIREMENT_THRESHOLDS_W = POWER_REQUIREMENT_THRESHOLDS_W;
|
|
2543
|
-
ENERGY_THRESHOLDS_KWH = ENERGY_THRESHOLDS_KWH;
|
|
2544
|
-
CO2_THRESHOLDS_KG = CO2_THRESHOLDS_KG;
|
|
2545
|
-
REPAIRABILITY_AVAILABLE_TAG = REPAIRABILITY_AVAILABLE_TAG;
|
|
2546
|
-
MANUFACTURABLE_TRUE_TAG = MANUFACTURABLE_TRUE_TAG;
|
|
2547
|
-
};
|
|
2548
|
-
|
|
2549
2567
|
// src/wallet/WalletClient.ts
|
|
2550
2568
|
init_sign();
|
|
2551
2569
|
var WalletClient = class {
|
|
@@ -2735,6 +2753,7 @@ init_sign();
|
|
|
2735
2753
|
CITE_PROJECT,
|
|
2736
2754
|
CLAIM_DID,
|
|
2737
2755
|
CO2_THRESHOLDS_KG,
|
|
2756
|
+
COMPLEXITY_OPTIONS,
|
|
2738
2757
|
CONSUME_RESOURCE,
|
|
2739
2758
|
CONTRIBUTE_TO_PROJECT,
|
|
2740
2759
|
CREATE_DPP_RESOURCE,
|