@settlemint/dalp-sdk 3.1.19-release.34456469550 → 3.1.19-release.34482856023
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/api-types.generated.d.ts +14125 -0
- package/dist/api-types.generated.d.ts.map +1 -0
- package/dist/contract.d.ts +14 -9
- package/dist/contract.d.ts.map +1 -1
- package/dist/index.js +12 -85
- package/dist/types.d.ts +12 -7
- package/dist/types.d.ts.map +1 -1
- package/dist/version.d.ts.map +1 -1
- package/dist/version.generated.d.ts +8 -0
- package/dist/version.generated.d.ts.map +1 -0
- package/package.json +6 -3
package/dist/contract.d.ts
CHANGED
|
@@ -1,17 +1,22 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Re-exports the DALP v2 contract.
|
|
2
|
+
* Re-exports the DALP v2 contract for the runtime link.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
4
|
+
* `bun build` inlines the contract definition, including every Zod schema from
|
|
5
|
+
* workspace packages, so a consumer never installs a workspace-only package to
|
|
6
|
+
* run the client. The declaration is a separate problem: `@dalp/api-contract`
|
|
7
|
+
* is private and unresolvable for a consumer, and re-exporting its inferred
|
|
8
|
+
* type leaves the published declaration pointing at a module that is not there.
|
|
9
|
+
* Under `skipLibCheck` that resolves to `any` and silently unchecks every call.
|
|
7
10
|
*
|
|
8
|
-
* The
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
+
* The explicit `AnyContractRouter` annotation keeps the emitted declaration
|
|
12
|
+
* self-contained: `@orpc/contract` is a real dependency of this package. The
|
|
13
|
+
* call-site types come from `./generated/api-types.ts` instead, which carries
|
|
14
|
+
* the shapes rather than a reference to them.
|
|
11
15
|
*
|
|
12
|
-
* Related: packages/dalp/api-contract/src/contract.ts
|
|
16
|
+
* Related: packages/dalp/api-contract/src/contract.ts, kit/sdk/scripts/codegen.ts
|
|
13
17
|
*
|
|
14
18
|
* @module
|
|
15
19
|
*/
|
|
16
|
-
|
|
20
|
+
import type { AnyContractRouter } from "@orpc/contract";
|
|
21
|
+
export declare const rpcContract: AnyContractRouter;
|
|
17
22
|
//# sourceMappingURL=contract.d.ts.map
|
package/dist/contract.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contract.d.ts","sourceRoot":"","sources":["../src/contract.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"contract.d.ts","sourceRoot":"","sources":["../src/contract.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAGxD,eAAO,MAAM,WAAW,EAAE,iBAAmC,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -93726,6 +93726,10 @@ var v2Contract2 = {
|
|
|
93726
93726
|
|
|
93727
93727
|
// ../../packages/dalp/api-contract/src/contract.ts
|
|
93728
93728
|
var rpcContract = v2Contract2;
|
|
93729
|
+
|
|
93730
|
+
// src/contract.ts
|
|
93731
|
+
var rpcContract2 = rpcContract;
|
|
93732
|
+
|
|
93729
93733
|
// src/sdk-error.ts
|
|
93730
93734
|
import { ORPCError as ORPCError8 } from "@orpc/client";
|
|
93731
93735
|
var DALP_SDK_ERROR_CODE = "DALP_SDK_ERROR";
|
|
@@ -93980,94 +93984,17 @@ function normalizeDalpBaseUrl(url) {
|
|
|
93980
93984
|
}
|
|
93981
93985
|
return `${parsed.origin}${parsed.pathname.replace(/\/+$/, "")}`;
|
|
93982
93986
|
}
|
|
93983
|
-
|
|
93984
|
-
|
|
93985
|
-
|
|
93986
|
-
version: "3.1.19-release.34456469550",
|
|
93987
|
-
private: false,
|
|
93988
|
-
description: "Fully typed SDK for the DALP tokenization platform API",
|
|
93989
|
-
homepage: "https://settlemint.com",
|
|
93990
|
-
bugs: {
|
|
93991
|
-
email: "support@settlemint.com"
|
|
93992
|
-
},
|
|
93993
|
-
license: "SEE LICENSE IN LICENSE",
|
|
93994
|
-
author: {
|
|
93995
|
-
name: "SettleMint",
|
|
93996
|
-
email: "support@settlemint.com",
|
|
93997
|
-
url: "https://settlemint.com"
|
|
93998
|
-
},
|
|
93999
|
-
files: [
|
|
94000
|
-
"dist",
|
|
94001
|
-
"README.md",
|
|
94002
|
-
"LICENSE"
|
|
94003
|
-
],
|
|
94004
|
-
type: "module",
|
|
94005
|
-
exports: {
|
|
94006
|
-
"./package.json": "./package.json",
|
|
94007
|
-
".": {
|
|
94008
|
-
types: "./dist/index.d.ts",
|
|
94009
|
-
import: "./dist/index.js",
|
|
94010
|
-
default: "./dist/index.js"
|
|
94011
|
-
},
|
|
94012
|
-
"./types": {
|
|
94013
|
-
types: "./dist/types.d.ts",
|
|
94014
|
-
import: "./dist/types.js",
|
|
94015
|
-
default: "./dist/types.js"
|
|
94016
|
-
},
|
|
94017
|
-
"./plugins": {
|
|
94018
|
-
types: "./dist/plugins/index.d.ts",
|
|
94019
|
-
import: "./dist/plugins/index.js",
|
|
94020
|
-
default: "./dist/plugins/index.js"
|
|
94021
|
-
}
|
|
94022
|
-
},
|
|
94023
|
-
publishConfig: {
|
|
94024
|
-
access: "public"
|
|
94025
|
-
},
|
|
94026
|
-
scripts: {
|
|
94027
|
-
build: "rm -rf dist && bun scripts/build.js && tsgo -p tsconfig.build.json && bun scripts/fix-dts-extensions.js",
|
|
94028
|
-
publint: "publint run --strict --pack npm",
|
|
94029
|
-
attw: "attw --pack . --profile esm-only",
|
|
94030
|
-
publish: "cp ../../LICENSE . && npm publish --ignore-scripts --tag ${TAG:-latest} --access public",
|
|
94031
|
-
prepack: "cp ../../LICENSE .",
|
|
94032
|
-
test: "bun test --parallel=2 tests",
|
|
94033
|
-
typecheck: "tsgo"
|
|
94034
|
-
},
|
|
94035
|
-
dependencies: {
|
|
94036
|
-
"@better-auth/api-key": "1.6.19",
|
|
94037
|
-
"@better-auth/passkey": "1.6.19",
|
|
94038
|
-
"@orpc/client": "1.14.6",
|
|
94039
|
-
"@orpc/contract": "1.14.6",
|
|
94040
|
-
"@orpc/openapi-client": "1.14.6",
|
|
94041
|
-
"better-auth": "1.6.19",
|
|
94042
|
-
"currency-codes": "2.2.0",
|
|
94043
|
-
"date-fns": "4.4.0",
|
|
94044
|
-
dnum: "2.17.0",
|
|
94045
|
-
"iso-3166": "4.4.0",
|
|
94046
|
-
standardwebhooks: "1.0.0",
|
|
94047
|
-
viem: "2.52.2",
|
|
94048
|
-
zod: "4.4.3"
|
|
94049
|
-
},
|
|
94050
|
-
devDependencies: {
|
|
94051
|
-
"@arethetypeswrong/cli": "0.18.3",
|
|
94052
|
-
"@dalp/api-contract": "workspace:*",
|
|
94053
|
-
"@dalp/errors": "workspace:*",
|
|
94054
|
-
"@tools/typescript-config": "workspace:*",
|
|
94055
|
-
"@types/bun": "1.3.14",
|
|
94056
|
-
publint: "0.3.21",
|
|
94057
|
-
typescript: "6.0.3"
|
|
94058
|
-
},
|
|
94059
|
-
engines: {
|
|
94060
|
-
node: ">=20"
|
|
94061
|
-
}
|
|
94062
|
-
};
|
|
93987
|
+
|
|
93988
|
+
// src/version.generated.ts
|
|
93989
|
+
var SDK_PACKAGE_VERSION = "3.1.19-release.34482856023";
|
|
94063
93990
|
|
|
94064
93991
|
// src/version.ts
|
|
94065
|
-
var SDK_VERSION =
|
|
93992
|
+
var SDK_VERSION = SDK_PACKAGE_VERSION;
|
|
94066
93993
|
var SDK_USER_AGENT = `DALP SDK v${SDK_VERSION}`;
|
|
94067
93994
|
|
|
94068
93995
|
// src/client.ts
|
|
94069
93996
|
var DEFAULT_MUTATION_PREFER = "wait=99";
|
|
94070
|
-
var resolveSdkRpcMethod = inferRPCMethodFromContractRouter(
|
|
93997
|
+
var resolveSdkRpcMethod = inferRPCMethodFromContractRouter(rpcContract2);
|
|
94071
93998
|
function hasHeader(headers, headerName) {
|
|
94072
93999
|
const normalizedHeaderName = headerName.toLowerCase();
|
|
94073
94000
|
return Object.keys(headers).some((key) => key.toLowerCase() === normalizedHeaderName);
|
|
@@ -94100,14 +94027,14 @@ function createDalpClient(config3) {
|
|
|
94100
94027
|
const baseUrl = normalizeDalpBaseUrl(url);
|
|
94101
94028
|
const plugins = [];
|
|
94102
94029
|
if (requestValidation) {
|
|
94103
|
-
plugins.push(new RequestValidationPlugin(
|
|
94030
|
+
plugins.push(new RequestValidationPlugin(rpcContract2));
|
|
94104
94031
|
}
|
|
94105
94032
|
if (responseValidation) {
|
|
94106
|
-
plugins.push(new ResponseValidationPlugin(
|
|
94033
|
+
plugins.push(new ResponseValidationPlugin(rpcContract2));
|
|
94107
94034
|
}
|
|
94108
94035
|
const innerFetch = customFetch ?? globalThis.fetch.bind(globalThis);
|
|
94109
94036
|
const wrappedFetch = (request, init) => fetchWithAttemptHeader(request, init, innerFetch);
|
|
94110
|
-
const link = new OpenAPILink(
|
|
94037
|
+
const link = new OpenAPILink(rpcContract2, {
|
|
94111
94038
|
url: `${baseUrl}/api/v2`,
|
|
94112
94039
|
headers: async (options, path) => {
|
|
94113
94040
|
const method = await Promise.resolve(resolveSdkRpcMethod(options, path));
|
package/dist/types.d.ts
CHANGED
|
@@ -8,22 +8,27 @@
|
|
|
8
8
|
*
|
|
9
9
|
* @module
|
|
10
10
|
*/
|
|
11
|
-
import type {
|
|
12
|
-
import type { JsonifiedClient } from "@orpc/openapi-client";
|
|
13
|
-
import type { rpcContract } from "./contract.js";
|
|
11
|
+
import type { DalpApi } from "./api-types.generated.js";
|
|
14
12
|
/**
|
|
15
13
|
* Fully typed DALP API client.
|
|
16
14
|
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
15
|
+
* The shapes come from `./api-types.generated.ts` rather than from the contract
|
|
16
|
+
* router's inferred type. A declaration that names the contract cannot be
|
|
17
|
+
* published: `@dalp/api-contract` is private, and the inferred type does not
|
|
18
|
+
* survive declaration emit at all (`TS7056` on the larger route files). See
|
|
19
|
+
* `./contract.ts`.
|
|
20
|
+
*
|
|
21
|
+
* Response values carry the wire representation, so a `bigint` field reads as a
|
|
22
|
+
* decimal string and a timestamp as an ISO string. The client serializes on the
|
|
23
|
+
* way out but does not decode on the way back, so a request may pass either the
|
|
24
|
+
* native value or its string form.
|
|
20
25
|
*
|
|
21
26
|
* Provides auto-completed access to all v2 API namespaces:
|
|
22
27
|
* `account`, `actions`, `addons`, `admin`, `contacts`, `exchangeRates`,
|
|
23
28
|
* `externalToken`, `identityRecovery`, `monitoring`, `search`,
|
|
24
29
|
* `settings`, `system`, `token`, `transaction`, `user`.
|
|
25
30
|
*/
|
|
26
|
-
export type DalpClient =
|
|
31
|
+
export type DalpClient = DalpApi;
|
|
27
32
|
/**
|
|
28
33
|
* Per-call client context threaded into individual SDK operations as the second
|
|
29
34
|
* argument, e.g. `client.token.create(input, { context: { idempotencyKey } })`.
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AAExD;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,MAAM,UAAU,GAAG,OAAO,CAAC;AAEjC;;;;;GAKG;AACH,MAAM,WAAW,qBAAqB;IACpC;;;;;;;OAOG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;;;;OAKG;IACH,cAAc,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CACpC;AAED,UAAU,oBAAoB;IAC5B,qEAAqE;IACrE,GAAG,EAAE,MAAM,CAAC;IAEZ;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,CAAC,MAAM,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC;IAEpG;;;;OAIG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAE5B;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAE7B;;;OAGG;IACH,KAAK,CAAC,EAAE,OAAO,UAAU,CAAC,KAAK,CAAC;IAEhC;;;;;;;;;;;OAWG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED;;GAEG;AACH,MAAM,WAAW,gBAAiB,SAAQ,oBAAoB;IAC5D,+EAA+E;IAC/E,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,sBAAuB,SAAQ,oBAAoB;IAClE,MAAM,CAAC,EAAE,SAAS,CAAC;CACpB;AAED,YAAY,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC"}
|
package/dist/version.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAcA,mDAAmD;AACnD,eAAO,MAAM,WAAW,EAAE,MAA4B,CAAC;AAEvD,6DAA6D;AAC7D,eAAO,MAAM,cAAc,QAA6B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version.generated.d.ts","sourceRoot":"","sources":["../src/version.generated.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,mDAAmD;AACnD,eAAO,MAAM,mBAAmB,+BAA+B,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@settlemint/dalp-sdk",
|
|
3
|
-
"version": "3.1.19-release.
|
|
3
|
+
"version": "3.1.19-release.34482856023",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Fully typed SDK for the DALP tokenization platform API",
|
|
6
6
|
"homepage": "https://settlemint.com",
|
|
@@ -41,13 +41,15 @@
|
|
|
41
41
|
"access": "public"
|
|
42
42
|
},
|
|
43
43
|
"scripts": {
|
|
44
|
-
"build": "rm -rf dist && bun scripts/build.js && tsgo -p tsconfig.build.json && bun scripts/fix-dts-extensions.js",
|
|
44
|
+
"build": "rm -rf dist && bun scripts/build.js && tsgo -p tsconfig.build.json && bun scripts/normalize-dist.ts && bun scripts/fix-dts-extensions.js && bun scripts/check-dts-portability.ts",
|
|
45
45
|
"publint": "publint run --strict --pack npm",
|
|
46
46
|
"attw": "attw --pack . --profile esm-only",
|
|
47
47
|
"publish": "cp ../../LICENSE . && npm publish --ignore-scripts --tag ${TAG:-latest} --access public",
|
|
48
48
|
"prepack": "cp ../../LICENSE .",
|
|
49
49
|
"test": "bun test --parallel=2 tests",
|
|
50
|
-
"typecheck": "tsgo"
|
|
50
|
+
"typecheck": "tsgo",
|
|
51
|
+
"codegen": "bun scripts/codegen.ts",
|
|
52
|
+
"check:dts-portability": "bun scripts/check-dts-portability.ts"
|
|
51
53
|
},
|
|
52
54
|
"dependencies": {
|
|
53
55
|
"@better-auth/api-key": "1.6.19",
|
|
@@ -68,6 +70,7 @@
|
|
|
68
70
|
"@arethetypeswrong/cli": "0.18.3",
|
|
69
71
|
"@dalp/api-contract": "workspace:*",
|
|
70
72
|
"@dalp/errors": "workspace:*",
|
|
73
|
+
"@orpc/zod": "1.14.6",
|
|
71
74
|
"@tools/typescript-config": "workspace:*",
|
|
72
75
|
"@types/bun": "1.3.14",
|
|
73
76
|
"publint": "0.3.21",
|