@settlemint/sdk-utils 2.1.0 → 2.1.1-mainb520d1f5
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/README.md +305 -83
- package/dist/environment.cjs +3 -1
- package/dist/environment.cjs.map +1 -1
- package/dist/environment.d.cts +7 -0
- package/dist/environment.d.ts +7 -0
- package/dist/environment.mjs +3 -1
- package/dist/environment.mjs.map +1 -1
- package/dist/index.cjs +8 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +15 -1
- package/dist/index.d.ts +15 -1
- package/dist/index.mjs +7 -0
- package/dist/index.mjs.map +1 -1
- package/dist/logging.cjs +45 -8
- package/dist/logging.cjs.map +1 -1
- package/dist/logging.d.cts +3 -1
- package/dist/logging.d.ts +3 -1
- package/dist/logging.mjs +45 -8
- package/dist/logging.mjs.map +1 -1
- package/dist/terminal.cjs.map +1 -1
- package/dist/terminal.mjs.map +1 -1
- package/dist/validation.cjs +3 -1
- package/dist/validation.cjs.map +1 -1
- package/dist/validation.d.cts +7 -0
- package/dist/validation.d.ts +7 -0
- package/dist/validation.mjs +3 -1
- package/dist/validation.mjs.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -62,6 +62,7 @@
|
|
|
62
62
|
- [setName()](#setname)
|
|
63
63
|
- [spinner()](#spinner)
|
|
64
64
|
- [table()](#table)
|
|
65
|
+
- [truncate()](#truncate)
|
|
65
66
|
- [tryParseJson()](#tryparsejson)
|
|
66
67
|
- [validate()](#validate)
|
|
67
68
|
- [writeEnv()](#writeenv)
|
|
@@ -74,10 +75,16 @@
|
|
|
74
75
|
- [LoggerOptions](#loggeroptions)
|
|
75
76
|
- [SpinnerOptions\<R\>](#spinneroptionsr)
|
|
76
77
|
- [Type Aliases](#type-aliases)
|
|
78
|
+
- [AccessToken](#accesstoken)
|
|
79
|
+
- [ApplicationAccessToken](#applicationaccesstoken)
|
|
77
80
|
- [DotEnv](#dotenv)
|
|
78
81
|
- [DotEnvPartial](#dotenvpartial)
|
|
79
82
|
- [Id](#id)
|
|
80
83
|
- [LogLevel](#loglevel)
|
|
84
|
+
- [PersonalAccessToken](#personalaccesstoken)
|
|
85
|
+
- [Url](#url)
|
|
86
|
+
- [UrlOrPath](#urlorpath)
|
|
87
|
+
- [UrlPath](#urlpath)
|
|
81
88
|
- [Variables](#variables)
|
|
82
89
|
- [AccessTokenSchema](#accesstokenschema)
|
|
83
90
|
- [ApplicationAccessTokenSchema](#applicationaccesstokenschema)
|
|
@@ -106,7 +113,7 @@ The SettleMint Utils SDK provides a collection of shared utilities and helper fu
|
|
|
106
113
|
|
|
107
114
|
> **ascii**(): `void`
|
|
108
115
|
|
|
109
|
-
Defined in: [sdk/utils/src/terminal/ascii.ts:13](https://github.com/settlemint/sdk/blob/v2.1.
|
|
116
|
+
Defined in: [sdk/utils/src/terminal/ascii.ts:13](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/terminal/ascii.ts#L13)
|
|
110
117
|
|
|
111
118
|
Prints the SettleMint ASCII art logo to the console in magenta color.
|
|
112
119
|
Used for CLI branding and visual identification.
|
|
@@ -130,7 +137,7 @@ ascii();
|
|
|
130
137
|
|
|
131
138
|
> **camelCaseToWords**(`s`): `string`
|
|
132
139
|
|
|
133
|
-
Defined in: [sdk/utils/src/string.ts:29](https://github.com/settlemint/sdk/blob/v2.1.
|
|
140
|
+
Defined in: [sdk/utils/src/string.ts:29](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/string.ts#L29)
|
|
134
141
|
|
|
135
142
|
Converts a camelCase string to a human-readable string.
|
|
136
143
|
|
|
@@ -161,7 +168,7 @@ const words = camelCaseToWords("camelCaseString");
|
|
|
161
168
|
|
|
162
169
|
> **cancel**(`msg`): `never`
|
|
163
170
|
|
|
164
|
-
Defined in: [sdk/utils/src/terminal/cancel.ts:23](https://github.com/settlemint/sdk/blob/v2.1.
|
|
171
|
+
Defined in: [sdk/utils/src/terminal/cancel.ts:23](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/terminal/cancel.ts#L23)
|
|
165
172
|
|
|
166
173
|
Displays an error message in red inverse text and throws a CancelError.
|
|
167
174
|
Used to terminate execution with a visible error message.
|
|
@@ -194,7 +201,7 @@ cancel("An error occurred");
|
|
|
194
201
|
|
|
195
202
|
> **capitalizeFirstLetter**(`val`): `string`
|
|
196
203
|
|
|
197
|
-
Defined in: [sdk/utils/src/string.ts:13](https://github.com/settlemint/sdk/blob/v2.1.
|
|
204
|
+
Defined in: [sdk/utils/src/string.ts:13](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/string.ts#L13)
|
|
198
205
|
|
|
199
206
|
Capitalizes the first letter of a string.
|
|
200
207
|
|
|
@@ -225,7 +232,7 @@ const capitalized = capitalizeFirstLetter("hello");
|
|
|
225
232
|
|
|
226
233
|
> **createLogger**(`options`): [`Logger`](#logger)
|
|
227
234
|
|
|
228
|
-
Defined in: [sdk/utils/src/logging/logger.ts:
|
|
235
|
+
Defined in: [sdk/utils/src/logging/logger.ts:50](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/logging/logger.ts#L50)
|
|
229
236
|
|
|
230
237
|
Creates a simple logger with configurable log level
|
|
231
238
|
|
|
@@ -258,7 +265,7 @@ logger.error('Operation failed', new Error('Connection timeout'));
|
|
|
258
265
|
|
|
259
266
|
> **emptyDir**(`dir`): `Promise`\<`void`\>
|
|
260
267
|
|
|
261
|
-
Defined in: [sdk/utils/src/package-manager/download-and-extract.ts:45](https://github.com/settlemint/sdk/blob/v2.1.
|
|
268
|
+
Defined in: [sdk/utils/src/package-manager/download-and-extract.ts:45](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/package-manager/download-and-extract.ts#L45)
|
|
262
269
|
|
|
263
270
|
Removes all contents of a directory except the .git folder
|
|
264
271
|
|
|
@@ -286,7 +293,7 @@ await emptyDir("/path/to/dir"); // Removes all contents except .git
|
|
|
286
293
|
|
|
287
294
|
> **ensureBrowser**(): `void`
|
|
288
295
|
|
|
289
|
-
Defined in: [sdk/utils/src/runtime/ensure-server.ts:31](https://github.com/settlemint/sdk/blob/v2.1.
|
|
296
|
+
Defined in: [sdk/utils/src/runtime/ensure-server.ts:31](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/runtime/ensure-server.ts#L31)
|
|
290
297
|
|
|
291
298
|
Ensures that code is running in a browser environment and not on the server.
|
|
292
299
|
|
|
@@ -313,7 +320,7 @@ ensureBrowser();
|
|
|
313
320
|
|
|
314
321
|
> **ensureServer**(): `void`
|
|
315
322
|
|
|
316
|
-
Defined in: [sdk/utils/src/runtime/ensure-server.ts:13](https://github.com/settlemint/sdk/blob/v2.1.
|
|
323
|
+
Defined in: [sdk/utils/src/runtime/ensure-server.ts:13](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/runtime/ensure-server.ts#L13)
|
|
317
324
|
|
|
318
325
|
Ensures that code is running on the server and not in a browser environment.
|
|
319
326
|
|
|
@@ -340,7 +347,7 @@ ensureServer();
|
|
|
340
347
|
|
|
341
348
|
> **executeCommand**(`command`, `args`, `options?`): `Promise`\<`string`[]\>
|
|
342
349
|
|
|
343
|
-
Defined in: [sdk/utils/src/terminal/execute-command.ts:31](https://github.com/settlemint/sdk/blob/v2.1.
|
|
350
|
+
Defined in: [sdk/utils/src/terminal/execute-command.ts:31](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/terminal/execute-command.ts#L31)
|
|
344
351
|
|
|
345
352
|
Executes a command with the given arguments in a child process.
|
|
346
353
|
Pipes stdin to the child process and captures stdout/stderr output.
|
|
@@ -382,7 +389,7 @@ await executeCommand("npm", ["install"], { silent: true });
|
|
|
382
389
|
|
|
383
390
|
> **exists**(`path`): `Promise`\<`boolean`\>
|
|
384
391
|
|
|
385
|
-
Defined in: [sdk/utils/src/filesystem/exists.ts:17](https://github.com/settlemint/sdk/blob/v2.1.
|
|
392
|
+
Defined in: [sdk/utils/src/filesystem/exists.ts:17](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/filesystem/exists.ts#L17)
|
|
386
393
|
|
|
387
394
|
Checks if a file or directory exists at the given path
|
|
388
395
|
|
|
@@ -415,7 +422,7 @@ if (await exists('/path/to/file.txt')) {
|
|
|
415
422
|
|
|
416
423
|
> **fetchWithRetry**(`input`, `init?`, `maxRetries?`, `initialSleepTime?`): `Promise`\<`Response`\>
|
|
417
424
|
|
|
418
|
-
Defined in: [sdk/utils/src/http/fetch-with-retry.ts:18](https://github.com/settlemint/sdk/blob/v2.1.
|
|
425
|
+
Defined in: [sdk/utils/src/http/fetch-with-retry.ts:18](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/http/fetch-with-retry.ts#L18)
|
|
419
426
|
|
|
420
427
|
Retry an HTTP request with exponential backoff and jitter.
|
|
421
428
|
Only retries on server errors (5xx), rate limits (429), timeouts (408), and network errors.
|
|
@@ -453,7 +460,7 @@ const response = await fetchWithRetry("https://api.example.com/data");
|
|
|
453
460
|
|
|
454
461
|
> **findMonoRepoPackages**(`projectDir`): `Promise`\<`string`[]\>
|
|
455
462
|
|
|
456
|
-
Defined in: [sdk/utils/src/filesystem/mono-repo.ts:59](https://github.com/settlemint/sdk/blob/v2.1.
|
|
463
|
+
Defined in: [sdk/utils/src/filesystem/mono-repo.ts:59](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/filesystem/mono-repo.ts#L59)
|
|
457
464
|
|
|
458
465
|
Finds all packages in a monorepo
|
|
459
466
|
|
|
@@ -484,7 +491,7 @@ console.log(packages); // Output: ["/path/to/your/project/packages/core", "/path
|
|
|
484
491
|
|
|
485
492
|
> **findMonoRepoRoot**(`startDir`): `Promise`\<`null` \| `string`\>
|
|
486
493
|
|
|
487
|
-
Defined in: [sdk/utils/src/filesystem/mono-repo.ts:19](https://github.com/settlemint/sdk/blob/v2.1.
|
|
494
|
+
Defined in: [sdk/utils/src/filesystem/mono-repo.ts:19](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/filesystem/mono-repo.ts#L19)
|
|
488
495
|
|
|
489
496
|
Finds the root directory of a monorepo
|
|
490
497
|
|
|
@@ -515,7 +522,7 @@ console.log(root); // Output: /path/to/your/project/packages/core
|
|
|
515
522
|
|
|
516
523
|
> **formatTargetDir**(`targetDir`): `string`
|
|
517
524
|
|
|
518
|
-
Defined in: [sdk/utils/src/package-manager/download-and-extract.ts:15](https://github.com/settlemint/sdk/blob/v2.1.
|
|
525
|
+
Defined in: [sdk/utils/src/package-manager/download-and-extract.ts:15](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/package-manager/download-and-extract.ts#L15)
|
|
519
526
|
|
|
520
527
|
Formats a directory path by removing trailing slashes and whitespace
|
|
521
528
|
|
|
@@ -545,7 +552,7 @@ const formatted = formatTargetDir("/path/to/dir/ "); // "/path/to/dir"
|
|
|
545
552
|
|
|
546
553
|
> **getPackageManager**(`targetDir?`): `Promise`\<`AgentName`\>
|
|
547
554
|
|
|
548
|
-
Defined in: [sdk/utils/src/package-manager/get-package-manager.ts:15](https://github.com/settlemint/sdk/blob/v2.1.
|
|
555
|
+
Defined in: [sdk/utils/src/package-manager/get-package-manager.ts:15](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/package-manager/get-package-manager.ts#L15)
|
|
549
556
|
|
|
550
557
|
Detects the package manager used in the current project
|
|
551
558
|
|
|
@@ -576,7 +583,7 @@ console.log(`Using ${packageManager}`);
|
|
|
576
583
|
|
|
577
584
|
> **getPackageManagerExecutable**(`targetDir?`): `Promise`\<\{ `args`: `string`[]; `command`: `string`; \}\>
|
|
578
585
|
|
|
579
|
-
Defined in: [sdk/utils/src/package-manager/get-package-manager-executable.ts:14](https://github.com/settlemint/sdk/blob/v2.1.
|
|
586
|
+
Defined in: [sdk/utils/src/package-manager/get-package-manager-executable.ts:14](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/package-manager/get-package-manager-executable.ts#L14)
|
|
580
587
|
|
|
581
588
|
Retrieves the executable command and arguments for the package manager
|
|
582
589
|
|
|
@@ -607,7 +614,7 @@ console.log(`Using ${command} with args: ${args.join(" ")}`);
|
|
|
607
614
|
|
|
608
615
|
> **graphqlFetchWithRetry**\<`Data`\>(`input`, `init?`, `maxRetries?`, `initialSleepTime?`): `Promise`\<`Data`\>
|
|
609
616
|
|
|
610
|
-
Defined in: [sdk/utils/src/http/graphql-fetch-with-retry.ts:34](https://github.com/settlemint/sdk/blob/v2.1.
|
|
617
|
+
Defined in: [sdk/utils/src/http/graphql-fetch-with-retry.ts:34](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/http/graphql-fetch-with-retry.ts#L34)
|
|
611
618
|
|
|
612
619
|
Executes a GraphQL request with automatic retries using exponential backoff and jitter.
|
|
613
620
|
Only retries on server errors (5xx), rate limits (429), timeouts (408), and network errors.
|
|
@@ -666,7 +673,7 @@ const data = await graphqlFetchWithRetry<{ user: { id: string } }>(
|
|
|
666
673
|
|
|
667
674
|
> **installDependencies**(`pkgs`, `cwd?`): `Promise`\<`void`\>
|
|
668
675
|
|
|
669
|
-
Defined in: [sdk/utils/src/package-manager/install-dependencies.ts:20](https://github.com/settlemint/sdk/blob/v2.1.
|
|
676
|
+
Defined in: [sdk/utils/src/package-manager/install-dependencies.ts:20](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/package-manager/install-dependencies.ts#L20)
|
|
670
677
|
|
|
671
678
|
Installs one or more packages as dependencies using the detected package manager
|
|
672
679
|
|
|
@@ -705,7 +712,7 @@ await installDependencies(["express", "cors"]);
|
|
|
705
712
|
|
|
706
713
|
> **intro**(`msg`): `void`
|
|
707
714
|
|
|
708
|
-
Defined in: [sdk/utils/src/terminal/intro.ts:15](https://github.com/settlemint/sdk/blob/v2.1.
|
|
715
|
+
Defined in: [sdk/utils/src/terminal/intro.ts:15](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/terminal/intro.ts#L15)
|
|
709
716
|
|
|
710
717
|
Displays an introductory message in magenta text with padding.
|
|
711
718
|
Any sensitive tokens in the message are masked before display.
|
|
@@ -735,7 +742,7 @@ intro("Starting deployment...");
|
|
|
735
742
|
|
|
736
743
|
> **isEmpty**(`path`): `Promise`\<`boolean`\>
|
|
737
744
|
|
|
738
|
-
Defined in: [sdk/utils/src/package-manager/download-and-extract.ts:31](https://github.com/settlemint/sdk/blob/v2.1.
|
|
745
|
+
Defined in: [sdk/utils/src/package-manager/download-and-extract.ts:31](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/package-manager/download-and-extract.ts#L31)
|
|
739
746
|
|
|
740
747
|
Checks if a directory is empty or contains only a .git folder
|
|
741
748
|
|
|
@@ -767,7 +774,7 @@ if (await isEmpty("/path/to/dir")) {
|
|
|
767
774
|
|
|
768
775
|
> **isPackageInstalled**(`name`, `path?`): `Promise`\<`boolean`\>
|
|
769
776
|
|
|
770
|
-
Defined in: [sdk/utils/src/package-manager/is-package-installed.ts:17](https://github.com/settlemint/sdk/blob/v2.1.
|
|
777
|
+
Defined in: [sdk/utils/src/package-manager/is-package-installed.ts:17](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/package-manager/is-package-installed.ts#L17)
|
|
771
778
|
|
|
772
779
|
Checks if a package is installed in the project's dependencies, devDependencies, or peerDependencies.
|
|
773
780
|
|
|
@@ -803,7 +810,7 @@ console.log(`@settlemint/sdk-utils is installed: ${isInstalled}`);
|
|
|
803
810
|
|
|
804
811
|
> **list**(`title`, `items`): `void`
|
|
805
812
|
|
|
806
|
-
Defined in: [sdk/utils/src/terminal/list.ts:23](https://github.com/settlemint/sdk/blob/v2.1.
|
|
813
|
+
Defined in: [sdk/utils/src/terminal/list.ts:23](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/terminal/list.ts#L23)
|
|
807
814
|
|
|
808
815
|
Displays a list of items in a formatted manner, supporting nested items.
|
|
809
816
|
|
|
@@ -843,7 +850,7 @@ list("Providers", [
|
|
|
843
850
|
|
|
844
851
|
> **loadEnv**\<`T`\>(`validateEnv`, `prod`, `path`): `Promise`\<`T` *extends* `true` ? `object` : `object`\>
|
|
845
852
|
|
|
846
|
-
Defined in: [sdk/utils/src/environment/load-env.ts:25](https://github.com/settlemint/sdk/blob/v2.1.
|
|
853
|
+
Defined in: [sdk/utils/src/environment/load-env.ts:25](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/environment/load-env.ts#L25)
|
|
847
854
|
|
|
848
855
|
Loads environment variables from .env files.
|
|
849
856
|
To enable encryption with dotenvx (https://www.dotenvx.com/docs) run `bunx dotenvx encrypt`
|
|
@@ -891,7 +898,7 @@ const rawEnv = await loadEnv(false, false);
|
|
|
891
898
|
|
|
892
899
|
> **maskTokens**(`output`): `string`
|
|
893
900
|
|
|
894
|
-
Defined in: [sdk/utils/src/logging/mask-tokens.ts:13](https://github.com/settlemint/sdk/blob/v2.1.
|
|
901
|
+
Defined in: [sdk/utils/src/logging/mask-tokens.ts:13](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/logging/mask-tokens.ts#L13)
|
|
895
902
|
|
|
896
903
|
Masks sensitive SettleMint tokens in output text by replacing them with asterisks.
|
|
897
904
|
Handles personal access tokens (PAT), application access tokens (AAT), and service account tokens (SAT).
|
|
@@ -923,7 +930,7 @@ const masked = maskTokens("Token: sm_pat_****"); // "Token: ***"
|
|
|
923
930
|
|
|
924
931
|
> **note**(`message`, `level`): `void`
|
|
925
932
|
|
|
926
|
-
Defined in: [sdk/utils/src/terminal/note.ts:20](https://github.com/settlemint/sdk/blob/v2.1.
|
|
933
|
+
Defined in: [sdk/utils/src/terminal/note.ts:20](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/terminal/note.ts#L20)
|
|
927
934
|
|
|
928
935
|
Displays a note message with optional warning level formatting.
|
|
929
936
|
Regular notes are displayed in normal text, while warnings are shown in yellow.
|
|
@@ -958,7 +965,7 @@ note("Low disk space remaining", "warn");
|
|
|
958
965
|
|
|
959
966
|
> **outro**(`msg`): `void`
|
|
960
967
|
|
|
961
|
-
Defined in: [sdk/utils/src/terminal/outro.ts:15](https://github.com/settlemint/sdk/blob/v2.1.
|
|
968
|
+
Defined in: [sdk/utils/src/terminal/outro.ts:15](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/terminal/outro.ts#L15)
|
|
962
969
|
|
|
963
970
|
Displays a closing message in green inverted text with padding.
|
|
964
971
|
Any sensitive tokens in the message are masked before display.
|
|
@@ -988,7 +995,7 @@ outro("Deployment completed successfully!");
|
|
|
988
995
|
|
|
989
996
|
> **projectRoot**(`fallbackToCwd`, `cwd?`): `Promise`\<`string`\>
|
|
990
997
|
|
|
991
|
-
Defined in: [sdk/utils/src/filesystem/project-root.ts:18](https://github.com/settlemint/sdk/blob/v2.1.
|
|
998
|
+
Defined in: [sdk/utils/src/filesystem/project-root.ts:18](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/filesystem/project-root.ts#L18)
|
|
992
999
|
|
|
993
1000
|
Finds the root directory of the current project by locating the nearest package.json file
|
|
994
1001
|
|
|
@@ -1025,7 +1032,7 @@ console.log(`Project root is at: ${rootDir}`);
|
|
|
1025
1032
|
|
|
1026
1033
|
> **replaceUnderscoresAndHyphensWithSpaces**(`s`): `string`
|
|
1027
1034
|
|
|
1028
|
-
Defined in: [sdk/utils/src/string.ts:48](https://github.com/settlemint/sdk/blob/v2.1.
|
|
1035
|
+
Defined in: [sdk/utils/src/string.ts:48](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/string.ts#L48)
|
|
1029
1036
|
|
|
1030
1037
|
Replaces underscores and hyphens with spaces.
|
|
1031
1038
|
|
|
@@ -1056,9 +1063,9 @@ const result = replaceUnderscoresAndHyphensWithSpaces("Already_Spaced-Second");
|
|
|
1056
1063
|
|
|
1057
1064
|
> **requestLogger**(`logger`, `name`, `fn`): (...`args`) => `Promise`\<`Response`\>
|
|
1058
1065
|
|
|
1059
|
-
Defined in: [sdk/utils/src/logging/request-logger.ts:
|
|
1066
|
+
Defined in: [sdk/utils/src/logging/request-logger.ts:14](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/logging/request-logger.ts#L14)
|
|
1060
1067
|
|
|
1061
|
-
Logs the request and duration of a fetch call (>
|
|
1068
|
+
Logs the request and duration of a fetch call (> 500ms is logged as warn, otherwise info)
|
|
1062
1069
|
|
|
1063
1070
|
##### Parameters
|
|
1064
1071
|
|
|
@@ -1090,7 +1097,7 @@ The fetch function
|
|
|
1090
1097
|
|
|
1091
1098
|
> **retryWhenFailed**\<`T`\>(`fn`, `maxRetries`, `initialSleepTime`, `stopOnError?`): `Promise`\<`T`\>
|
|
1092
1099
|
|
|
1093
|
-
Defined in: [sdk/utils/src/retry.ts:14](https://github.com/settlemint/sdk/blob/v2.1.
|
|
1100
|
+
Defined in: [sdk/utils/src/retry.ts:14](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/retry.ts#L14)
|
|
1094
1101
|
|
|
1095
1102
|
Retry a function when it fails.
|
|
1096
1103
|
|
|
@@ -1130,7 +1137,7 @@ const result = await retryWhenFailed(() => readFile("/path/to/file.txt"), 3, 1_0
|
|
|
1130
1137
|
|
|
1131
1138
|
> **setName**(`name`, `path?`): `Promise`\<`void`\>
|
|
1132
1139
|
|
|
1133
|
-
Defined in: [sdk/utils/src/package-manager/set-name.ts:16](https://github.com/settlemint/sdk/blob/v2.1.
|
|
1140
|
+
Defined in: [sdk/utils/src/package-manager/set-name.ts:16](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/package-manager/set-name.ts#L16)
|
|
1134
1141
|
|
|
1135
1142
|
Sets the name field in the package.json file
|
|
1136
1143
|
|
|
@@ -1165,7 +1172,7 @@ await setName("my-new-project-name");
|
|
|
1165
1172
|
|
|
1166
1173
|
> **spinner**\<`R`\>(`options`): `Promise`\<`R`\>
|
|
1167
1174
|
|
|
1168
|
-
Defined in: [sdk/utils/src/terminal/spinner.ts:54](https://github.com/settlemint/sdk/blob/v2.1.
|
|
1175
|
+
Defined in: [sdk/utils/src/terminal/spinner.ts:54](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/terminal/spinner.ts#L54)
|
|
1169
1176
|
|
|
1170
1177
|
Displays a loading spinner while executing an async task.
|
|
1171
1178
|
Shows progress with start/stop messages and handles errors.
|
|
@@ -1215,7 +1222,7 @@ const result = await spinner({
|
|
|
1215
1222
|
|
|
1216
1223
|
> **table**(`title`, `data`): `void`
|
|
1217
1224
|
|
|
1218
|
-
Defined in: [sdk/utils/src/terminal/table.ts:20](https://github.com/settlemint/sdk/blob/v2.1.
|
|
1225
|
+
Defined in: [sdk/utils/src/terminal/table.ts:20](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/terminal/table.ts#L20)
|
|
1219
1226
|
|
|
1220
1227
|
Displays data in a formatted table in the terminal.
|
|
1221
1228
|
|
|
@@ -1245,11 +1252,43 @@ table("My Table", data);
|
|
|
1245
1252
|
|
|
1246
1253
|
***
|
|
1247
1254
|
|
|
1255
|
+
#### truncate()
|
|
1256
|
+
|
|
1257
|
+
> **truncate**(`value`, `maxLength`): `string`
|
|
1258
|
+
|
|
1259
|
+
Defined in: [sdk/utils/src/string.ts:65](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/string.ts#L65)
|
|
1260
|
+
|
|
1261
|
+
Truncates a string to a maximum length and appends "..." if it is longer.
|
|
1262
|
+
|
|
1263
|
+
##### Parameters
|
|
1264
|
+
|
|
1265
|
+
| Parameter | Type | Description |
|
|
1266
|
+
| ------ | ------ | ------ |
|
|
1267
|
+
| `value` | `string` | The string to truncate |
|
|
1268
|
+
| `maxLength` | `number` | The maximum length of the string |
|
|
1269
|
+
|
|
1270
|
+
##### Returns
|
|
1271
|
+
|
|
1272
|
+
`string`
|
|
1273
|
+
|
|
1274
|
+
The truncated string or the original string if it is shorter than the maximum length
|
|
1275
|
+
|
|
1276
|
+
##### Example
|
|
1277
|
+
|
|
1278
|
+
```ts
|
|
1279
|
+
import { truncate } from "@settlemint/sdk-utils";
|
|
1280
|
+
|
|
1281
|
+
const truncated = truncate("Hello, world!", 10);
|
|
1282
|
+
// Returns: "Hello, wor..."
|
|
1283
|
+
```
|
|
1284
|
+
|
|
1285
|
+
***
|
|
1286
|
+
|
|
1248
1287
|
#### tryParseJson()
|
|
1249
1288
|
|
|
1250
1289
|
> **tryParseJson**\<`T`\>(`value`, `defaultValue`): `null` \| `T`
|
|
1251
1290
|
|
|
1252
|
-
Defined in: [sdk/utils/src/json.ts:23](https://github.com/settlemint/sdk/blob/v2.1.
|
|
1291
|
+
Defined in: [sdk/utils/src/json.ts:23](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/json.ts#L23)
|
|
1253
1292
|
|
|
1254
1293
|
Attempts to parse a JSON string into a typed value, returning a default value if parsing fails.
|
|
1255
1294
|
|
|
@@ -1296,7 +1335,7 @@ const invalid = tryParseJson<string[]>(
|
|
|
1296
1335
|
|
|
1297
1336
|
> **validate**\<`T`\>(`schema`, `value`): `T`\[`"_output"`\]
|
|
1298
1337
|
|
|
1299
|
-
Defined in: [sdk/utils/src/validation/validate.ts:16](https://github.com/settlemint/sdk/blob/v2.1.
|
|
1338
|
+
Defined in: [sdk/utils/src/validation/validate.ts:16](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/validation/validate.ts#L16)
|
|
1300
1339
|
|
|
1301
1340
|
Validates a value against a given Zod schema.
|
|
1302
1341
|
|
|
@@ -1337,7 +1376,7 @@ const validatedId = validate(IdSchema, "550e8400-e29b-41d4-a716-446655440000");
|
|
|
1337
1376
|
|
|
1338
1377
|
> **writeEnv**(`options`): `Promise`\<`void`\>
|
|
1339
1378
|
|
|
1340
|
-
Defined in: [sdk/utils/src/environment/write-env.ts:41](https://github.com/settlemint/sdk/blob/v2.1.
|
|
1379
|
+
Defined in: [sdk/utils/src/environment/write-env.ts:41](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/environment/write-env.ts#L41)
|
|
1341
1380
|
|
|
1342
1381
|
Writes environment variables to .env files across a project or monorepo
|
|
1343
1382
|
|
|
@@ -1345,9 +1384,9 @@ Writes environment variables to .env files across a project or monorepo
|
|
|
1345
1384
|
|
|
1346
1385
|
| Parameter | Type | Description |
|
|
1347
1386
|
| ------ | ------ | ------ |
|
|
1348
|
-
| `options` | \{ `cwd`: `string`; `env`: `Partial`\<\{ `SETTLEMINT_ACCESS_TOKEN`: `string`; `SETTLEMINT_ACCESSIBLE_PRIVATE_KEY`: `string`; `SETTLEMINT_APPLICATION`: `string`; `SETTLEMINT_BLOCKCHAIN_NETWORK`: `string`; `SETTLEMINT_BLOCKCHAIN_NODE`: `string`; `SETTLEMINT_BLOCKSCOUT`: `string`; `SETTLEMINT_BLOCKSCOUT_GRAPHQL_ENDPOINT`: `string`; `SETTLEMINT_BLOCKSCOUT_UI_ENDPOINT`: `string`; `SETTLEMINT_CUSTOM_DEPLOYMENT`: `string`; `SETTLEMINT_CUSTOM_DEPLOYMENT_ENDPOINT`: `string`; `SETTLEMINT_HASURA`: `string`; `SETTLEMINT_HASURA_ADMIN_SECRET`: `string`; `SETTLEMINT_HASURA_DATABASE_URL`: `string`; `SETTLEMINT_HASURA_ENDPOINT`: `string`; `SETTLEMINT_HD_PRIVATE_KEY`: `string`; `SETTLEMINT_INSTANCE`: `string`; `SETTLEMINT_IPFS`: `string`; `SETTLEMINT_IPFS_API_ENDPOINT`: `string`; `SETTLEMINT_IPFS_GATEWAY_ENDPOINT`: `string`; `SETTLEMINT_IPFS_PINNING_ENDPOINT`: `string`; `SETTLEMINT_LOAD_BALANCER`: `string`; `SETTLEMINT_MINIO`: `string`; `SETTLEMINT_MINIO_ACCESS_KEY`: `string`; `SETTLEMINT_MINIO_ENDPOINT`: `string`; `SETTLEMINT_MINIO_SECRET_KEY`: `string`; `SETTLEMINT_NEW_PROJECT_NAME`: `string`; `SETTLEMINT_PORTAL`: `string`; `SETTLEMINT_PORTAL_GRAPHQL_ENDPOINT`: `string`; `SETTLEMINT_PORTAL_REST_ENDPOINT`: `string`; `SETTLEMINT_THEGRAPH`: `string`; `SETTLEMINT_THEGRAPH_DEFAULT_SUBGRAPH`: `string`; `SETTLEMINT_THEGRAPH_SUBGRAPHS_ENDPOINTS`: `string`[]; `SETTLEMINT_WORKSPACE`: `string`; \}\>; `prod`: `boolean`; `secrets`: `boolean`; \} | The options for writing the environment variables |
|
|
1387
|
+
| `options` | \{ `cwd`: `string`; `env`: `Partial`\<\{ `SETTLEMINT_ACCESS_TOKEN`: `string`; `SETTLEMINT_ACCESSIBLE_PRIVATE_KEY`: `string`; `SETTLEMINT_APPLICATION`: `string`; `SETTLEMINT_BLOCKCHAIN_NETWORK`: `string`; `SETTLEMINT_BLOCKCHAIN_NODE`: `string`; `SETTLEMINT_BLOCKSCOUT`: `string`; `SETTLEMINT_BLOCKSCOUT_GRAPHQL_ENDPOINT`: `string`; `SETTLEMINT_BLOCKSCOUT_UI_ENDPOINT`: `string`; `SETTLEMINT_CUSTOM_DEPLOYMENT`: `string`; `SETTLEMINT_CUSTOM_DEPLOYMENT_ENDPOINT`: `string`; `SETTLEMINT_HASURA`: `string`; `SETTLEMINT_HASURA_ADMIN_SECRET`: `string`; `SETTLEMINT_HASURA_DATABASE_URL`: `string`; `SETTLEMINT_HASURA_ENDPOINT`: `string`; `SETTLEMINT_HD_PRIVATE_KEY`: `string`; `SETTLEMINT_INSTANCE`: `string`; `SETTLEMINT_IPFS`: `string`; `SETTLEMINT_IPFS_API_ENDPOINT`: `string`; `SETTLEMINT_IPFS_GATEWAY_ENDPOINT`: `string`; `SETTLEMINT_IPFS_PINNING_ENDPOINT`: `string`; `SETTLEMINT_LOAD_BALANCER`: `string`; `SETTLEMINT_LOG_LEVEL`: `"error"` \| `"info"` \| `"warn"` \| `"debug"` \| `"none"`; `SETTLEMINT_MINIO`: `string`; `SETTLEMINT_MINIO_ACCESS_KEY`: `string`; `SETTLEMINT_MINIO_ENDPOINT`: `string`; `SETTLEMINT_MINIO_SECRET_KEY`: `string`; `SETTLEMINT_NEW_PROJECT_NAME`: `string`; `SETTLEMINT_PORTAL`: `string`; `SETTLEMINT_PORTAL_GRAPHQL_ENDPOINT`: `string`; `SETTLEMINT_PORTAL_REST_ENDPOINT`: `string`; `SETTLEMINT_THEGRAPH`: `string`; `SETTLEMINT_THEGRAPH_DEFAULT_SUBGRAPH`: `string`; `SETTLEMINT_THEGRAPH_SUBGRAPHS_ENDPOINTS`: `string`[]; `SETTLEMINT_WORKSPACE`: `string`; \}\>; `prod`: `boolean`; `secrets`: `boolean`; \} | The options for writing the environment variables |
|
|
1349
1388
|
| `options.cwd?` | `string` | The directory to start searching for the package.json file from (defaults to process.cwd()) |
|
|
1350
|
-
| `options.env` | `Partial`\<\{ `SETTLEMINT_ACCESS_TOKEN`: `string`; `SETTLEMINT_ACCESSIBLE_PRIVATE_KEY`: `string`; `SETTLEMINT_APPLICATION`: `string`; `SETTLEMINT_BLOCKCHAIN_NETWORK`: `string`; `SETTLEMINT_BLOCKCHAIN_NODE`: `string`; `SETTLEMINT_BLOCKSCOUT`: `string`; `SETTLEMINT_BLOCKSCOUT_GRAPHQL_ENDPOINT`: `string`; `SETTLEMINT_BLOCKSCOUT_UI_ENDPOINT`: `string`; `SETTLEMINT_CUSTOM_DEPLOYMENT`: `string`; `SETTLEMINT_CUSTOM_DEPLOYMENT_ENDPOINT`: `string`; `SETTLEMINT_HASURA`: `string`; `SETTLEMINT_HASURA_ADMIN_SECRET`: `string`; `SETTLEMINT_HASURA_DATABASE_URL`: `string`; `SETTLEMINT_HASURA_ENDPOINT`: `string`; `SETTLEMINT_HD_PRIVATE_KEY`: `string`; `SETTLEMINT_INSTANCE`: `string`; `SETTLEMINT_IPFS`: `string`; `SETTLEMINT_IPFS_API_ENDPOINT`: `string`; `SETTLEMINT_IPFS_GATEWAY_ENDPOINT`: `string`; `SETTLEMINT_IPFS_PINNING_ENDPOINT`: `string`; `SETTLEMINT_LOAD_BALANCER`: `string`; `SETTLEMINT_MINIO`: `string`; `SETTLEMINT_MINIO_ACCESS_KEY`: `string`; `SETTLEMINT_MINIO_ENDPOINT`: `string`; `SETTLEMINT_MINIO_SECRET_KEY`: `string`; `SETTLEMINT_NEW_PROJECT_NAME`: `string`; `SETTLEMINT_PORTAL`: `string`; `SETTLEMINT_PORTAL_GRAPHQL_ENDPOINT`: `string`; `SETTLEMINT_PORTAL_REST_ENDPOINT`: `string`; `SETTLEMINT_THEGRAPH`: `string`; `SETTLEMINT_THEGRAPH_DEFAULT_SUBGRAPH`: `string`; `SETTLEMINT_THEGRAPH_SUBGRAPHS_ENDPOINTS`: `string`[]; `SETTLEMINT_WORKSPACE`: `string`; \}\> | The environment variables to write |
|
|
1389
|
+
| `options.env` | `Partial`\<\{ `SETTLEMINT_ACCESS_TOKEN`: `string`; `SETTLEMINT_ACCESSIBLE_PRIVATE_KEY`: `string`; `SETTLEMINT_APPLICATION`: `string`; `SETTLEMINT_BLOCKCHAIN_NETWORK`: `string`; `SETTLEMINT_BLOCKCHAIN_NODE`: `string`; `SETTLEMINT_BLOCKSCOUT`: `string`; `SETTLEMINT_BLOCKSCOUT_GRAPHQL_ENDPOINT`: `string`; `SETTLEMINT_BLOCKSCOUT_UI_ENDPOINT`: `string`; `SETTLEMINT_CUSTOM_DEPLOYMENT`: `string`; `SETTLEMINT_CUSTOM_DEPLOYMENT_ENDPOINT`: `string`; `SETTLEMINT_HASURA`: `string`; `SETTLEMINT_HASURA_ADMIN_SECRET`: `string`; `SETTLEMINT_HASURA_DATABASE_URL`: `string`; `SETTLEMINT_HASURA_ENDPOINT`: `string`; `SETTLEMINT_HD_PRIVATE_KEY`: `string`; `SETTLEMINT_INSTANCE`: `string`; `SETTLEMINT_IPFS`: `string`; `SETTLEMINT_IPFS_API_ENDPOINT`: `string`; `SETTLEMINT_IPFS_GATEWAY_ENDPOINT`: `string`; `SETTLEMINT_IPFS_PINNING_ENDPOINT`: `string`; `SETTLEMINT_LOAD_BALANCER`: `string`; `SETTLEMINT_LOG_LEVEL`: `"error"` \| `"info"` \| `"warn"` \| `"debug"` \| `"none"`; `SETTLEMINT_MINIO`: `string`; `SETTLEMINT_MINIO_ACCESS_KEY`: `string`; `SETTLEMINT_MINIO_ENDPOINT`: `string`; `SETTLEMINT_MINIO_SECRET_KEY`: `string`; `SETTLEMINT_NEW_PROJECT_NAME`: `string`; `SETTLEMINT_PORTAL`: `string`; `SETTLEMINT_PORTAL_GRAPHQL_ENDPOINT`: `string`; `SETTLEMINT_PORTAL_REST_ENDPOINT`: `string`; `SETTLEMINT_THEGRAPH`: `string`; `SETTLEMINT_THEGRAPH_DEFAULT_SUBGRAPH`: `string`; `SETTLEMINT_THEGRAPH_SUBGRAPHS_ENDPOINTS`: `string`[]; `SETTLEMINT_WORKSPACE`: `string`; \}\> | The environment variables to write |
|
|
1351
1390
|
| `options.prod` | `boolean` | Whether to write production environment variables |
|
|
1352
1391
|
| `options.secrets` | `boolean` | Whether to write to .env.local files for secrets |
|
|
1353
1392
|
|
|
@@ -1389,7 +1428,7 @@ await writeEnv({
|
|
|
1389
1428
|
|
|
1390
1429
|
#### CancelError
|
|
1391
1430
|
|
|
1392
|
-
Defined in: [sdk/utils/src/terminal/cancel.ts:8](https://github.com/settlemint/sdk/blob/v2.1.
|
|
1431
|
+
Defined in: [sdk/utils/src/terminal/cancel.ts:8](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/terminal/cancel.ts#L8)
|
|
1393
1432
|
|
|
1394
1433
|
Error class used to indicate that the operation was cancelled.
|
|
1395
1434
|
This error is used to signal that the operation should be aborted.
|
|
@@ -1402,7 +1441,7 @@ This error is used to signal that the operation should be aborted.
|
|
|
1402
1441
|
|
|
1403
1442
|
#### SpinnerError
|
|
1404
1443
|
|
|
1405
|
-
Defined in: [sdk/utils/src/terminal/spinner.ts:11](https://github.com/settlemint/sdk/blob/v2.1.
|
|
1444
|
+
Defined in: [sdk/utils/src/terminal/spinner.ts:11](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/terminal/spinner.ts#L11)
|
|
1406
1445
|
|
|
1407
1446
|
Error class used to indicate that the spinner operation failed.
|
|
1408
1447
|
This error is used to signal that the operation should be aborted.
|
|
@@ -1415,7 +1454,7 @@ This error is used to signal that the operation should be aborted.
|
|
|
1415
1454
|
|
|
1416
1455
|
#### ExecuteCommandOptions
|
|
1417
1456
|
|
|
1418
|
-
Defined in: [sdk/utils/src/terminal/execute-command.ts:7](https://github.com/settlemint/sdk/blob/v2.1.
|
|
1457
|
+
Defined in: [sdk/utils/src/terminal/execute-command.ts:7](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/terminal/execute-command.ts#L7)
|
|
1419
1458
|
|
|
1420
1459
|
Options for executing a command, extending SpawnOptionsWithoutStdio
|
|
1421
1460
|
|
|
@@ -1427,13 +1466,13 @@ Options for executing a command, extending SpawnOptionsWithoutStdio
|
|
|
1427
1466
|
|
|
1428
1467
|
| Property | Type | Description | Defined in |
|
|
1429
1468
|
| ------ | ------ | ------ | ------ |
|
|
1430
|
-
| <a id="silent"></a> `silent?` | `boolean` | Whether to suppress output to stdout/stderr | [sdk/utils/src/terminal/execute-command.ts:9](https://github.com/settlemint/sdk/blob/v2.1.
|
|
1469
|
+
| <a id="silent"></a> `silent?` | `boolean` | Whether to suppress output to stdout/stderr | [sdk/utils/src/terminal/execute-command.ts:9](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/terminal/execute-command.ts#L9) |
|
|
1431
1470
|
|
|
1432
1471
|
***
|
|
1433
1472
|
|
|
1434
1473
|
#### Logger
|
|
1435
1474
|
|
|
1436
|
-
Defined in: [sdk/utils/src/logging/logger.ts:23](https://github.com/settlemint/sdk/blob/v2.1.
|
|
1475
|
+
Defined in: [sdk/utils/src/logging/logger.ts:23](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/logging/logger.ts#L23)
|
|
1437
1476
|
|
|
1438
1477
|
Simple logger interface with basic logging methods
|
|
1439
1478
|
Logger
|
|
@@ -1442,16 +1481,16 @@ Simple logger interface with basic logging methods
|
|
|
1442
1481
|
|
|
1443
1482
|
| Property | Type | Description | Defined in |
|
|
1444
1483
|
| ------ | ------ | ------ | ------ |
|
|
1445
|
-
| <a id="debug"></a> `debug` | (`message`, ...`args`) => `void` | Log debug information | [sdk/utils/src/logging/logger.ts:25](https://github.com/settlemint/sdk/blob/v2.1.
|
|
1446
|
-
| <a id="error"></a> `error` | (`message`, ...`args`) => `void` | Log errors | [sdk/utils/src/logging/logger.ts:31](https://github.com/settlemint/sdk/blob/v2.1.
|
|
1447
|
-
| <a id="info"></a> `info` | (`message`, ...`args`) => `void` | Log general information | [sdk/utils/src/logging/logger.ts:27](https://github.com/settlemint/sdk/blob/v2.1.
|
|
1448
|
-
| <a id="warn"></a> `warn` | (`message`, ...`args`) => `void` | Log warnings | [sdk/utils/src/logging/logger.ts:29](https://github.com/settlemint/sdk/blob/v2.1.
|
|
1484
|
+
| <a id="debug"></a> `debug` | (`message`, ...`args`) => `void` | Log debug information | [sdk/utils/src/logging/logger.ts:25](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/logging/logger.ts#L25) |
|
|
1485
|
+
| <a id="error"></a> `error` | (`message`, ...`args`) => `void` | Log errors | [sdk/utils/src/logging/logger.ts:31](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/logging/logger.ts#L31) |
|
|
1486
|
+
| <a id="info"></a> `info` | (`message`, ...`args`) => `void` | Log general information | [sdk/utils/src/logging/logger.ts:27](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/logging/logger.ts#L27) |
|
|
1487
|
+
| <a id="warn"></a> `warn` | (`message`, ...`args`) => `void` | Log warnings | [sdk/utils/src/logging/logger.ts:29](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/logging/logger.ts#L29) |
|
|
1449
1488
|
|
|
1450
1489
|
***
|
|
1451
1490
|
|
|
1452
1491
|
#### LoggerOptions
|
|
1453
1492
|
|
|
1454
|
-
Defined in: [sdk/utils/src/logging/logger.ts:12](https://github.com/settlemint/sdk/blob/v2.1.
|
|
1493
|
+
Defined in: [sdk/utils/src/logging/logger.ts:12](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/logging/logger.ts#L12)
|
|
1455
1494
|
|
|
1456
1495
|
Configuration options for the logger
|
|
1457
1496
|
LoggerOptions
|
|
@@ -1460,14 +1499,14 @@ Configuration options for the logger
|
|
|
1460
1499
|
|
|
1461
1500
|
| Property | Type | Description | Defined in |
|
|
1462
1501
|
| ------ | ------ | ------ | ------ |
|
|
1463
|
-
| <a id="level"></a> `level?` | [`LogLevel`](#loglevel) | The minimum log level to output | [sdk/utils/src/logging/logger.ts:14](https://github.com/settlemint/sdk/blob/v2.1.
|
|
1464
|
-
| <a id="prefix"></a> `prefix?` | `string` | The prefix to add to the log message | [sdk/utils/src/logging/logger.ts:16](https://github.com/settlemint/sdk/blob/v2.1.
|
|
1502
|
+
| <a id="level"></a> `level?` | [`LogLevel`](#loglevel) | The minimum log level to output | [sdk/utils/src/logging/logger.ts:14](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/logging/logger.ts#L14) |
|
|
1503
|
+
| <a id="prefix"></a> `prefix?` | `string` | The prefix to add to the log message | [sdk/utils/src/logging/logger.ts:16](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/logging/logger.ts#L16) |
|
|
1465
1504
|
|
|
1466
1505
|
***
|
|
1467
1506
|
|
|
1468
1507
|
#### SpinnerOptions\<R\>
|
|
1469
1508
|
|
|
1470
|
-
Defined in: [sdk/utils/src/terminal/spinner.ts:24](https://github.com/settlemint/sdk/blob/v2.1.
|
|
1509
|
+
Defined in: [sdk/utils/src/terminal/spinner.ts:24](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/terminal/spinner.ts#L24)
|
|
1471
1510
|
|
|
1472
1511
|
Options for configuring the spinner behavior
|
|
1473
1512
|
|
|
@@ -1481,37 +1520,137 @@ Options for configuring the spinner behavior
|
|
|
1481
1520
|
|
|
1482
1521
|
| Property | Type | Description | Defined in |
|
|
1483
1522
|
| ------ | ------ | ------ | ------ |
|
|
1484
|
-
| <a id="startmessage"></a> `startMessage` | `string` | Message to display when spinner starts | [sdk/utils/src/terminal/spinner.ts:26](https://github.com/settlemint/sdk/blob/v2.1.
|
|
1485
|
-
| <a id="stopmessage"></a> `stopMessage` | `string` | Message to display when spinner completes successfully | [sdk/utils/src/terminal/spinner.ts:30](https://github.com/settlemint/sdk/blob/v2.1.
|
|
1486
|
-
| <a id="task"></a> `task` | (`spinner?`) => `Promise`\<`R`\> | Async task to execute while spinner is active | [sdk/utils/src/terminal/spinner.ts:28](https://github.com/settlemint/sdk/blob/v2.1.
|
|
1523
|
+
| <a id="startmessage"></a> `startMessage` | `string` | Message to display when spinner starts | [sdk/utils/src/terminal/spinner.ts:26](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/terminal/spinner.ts#L26) |
|
|
1524
|
+
| <a id="stopmessage"></a> `stopMessage` | `string` | Message to display when spinner completes successfully | [sdk/utils/src/terminal/spinner.ts:30](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/terminal/spinner.ts#L30) |
|
|
1525
|
+
| <a id="task"></a> `task` | (`spinner?`) => `Promise`\<`R`\> | Async task to execute while spinner is active | [sdk/utils/src/terminal/spinner.ts:28](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/terminal/spinner.ts#L28) |
|
|
1487
1526
|
|
|
1488
1527
|
### Type Aliases
|
|
1489
1528
|
|
|
1529
|
+
#### AccessToken
|
|
1530
|
+
|
|
1531
|
+
> **AccessToken** = `string`
|
|
1532
|
+
|
|
1533
|
+
Defined in: [sdk/utils/src/validation/access-token.schema.ts:22](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/validation/access-token.schema.ts#L22)
|
|
1534
|
+
|
|
1535
|
+
Schema for validating both application and personal access tokens.
|
|
1536
|
+
Accepts tokens starting with either 'sm_pat_' or 'sm_aat_' prefix.
|
|
1537
|
+
|
|
1538
|
+
***
|
|
1539
|
+
|
|
1540
|
+
#### ApplicationAccessToken
|
|
1541
|
+
|
|
1542
|
+
> **ApplicationAccessToken** = `string`
|
|
1543
|
+
|
|
1544
|
+
Defined in: [sdk/utils/src/validation/access-token.schema.ts:8](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/validation/access-token.schema.ts#L8)
|
|
1545
|
+
|
|
1546
|
+
Schema for validating application access tokens.
|
|
1547
|
+
Application access tokens start with 'sm_aat_' prefix.
|
|
1548
|
+
|
|
1549
|
+
***
|
|
1550
|
+
|
|
1490
1551
|
#### DotEnv
|
|
1491
1552
|
|
|
1492
|
-
> **DotEnv** = `
|
|
1553
|
+
> **DotEnv** = `object`
|
|
1493
1554
|
|
|
1494
|
-
Defined in: [sdk/utils/src/validation/dot-env.schema.ts:
|
|
1555
|
+
Defined in: [sdk/utils/src/validation/dot-env.schema.ts:91](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/validation/dot-env.schema.ts#L91)
|
|
1495
1556
|
|
|
1496
1557
|
Type definition for the environment variables schema.
|
|
1497
1558
|
|
|
1559
|
+
##### Type declaration
|
|
1560
|
+
|
|
1561
|
+
| Name | Type | Description | Defined in |
|
|
1562
|
+
| ------ | ------ | ------ | ------ |
|
|
1563
|
+
| <a id="settlemint_access_token"></a> `SETTLEMINT_ACCESS_TOKEN?` | `string` | Application access token for authenticating with SettleMint services | [sdk/utils/src/validation/dot-env.schema.ts:16](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/validation/dot-env.schema.ts#L16) |
|
|
1564
|
+
| <a id="settlemint_accessible_private_key"></a> `SETTLEMINT_ACCESSIBLE_PRIVATE_KEY?` | `string` | Unique name of the accessible private key | [sdk/utils/src/validation/dot-env.schema.ts:55](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/validation/dot-env.schema.ts#L55) |
|
|
1565
|
+
| <a id="settlemint_application"></a> `SETTLEMINT_APPLICATION?` | `string` | Unique name of the application | [sdk/utils/src/validation/dot-env.schema.ts:22](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/validation/dot-env.schema.ts#L22) |
|
|
1566
|
+
| <a id="settlemint_blockchain_network"></a> `SETTLEMINT_BLOCKCHAIN_NETWORK?` | `string` | Unique name of the blockchain network | [sdk/utils/src/validation/dot-env.schema.ts:24](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/validation/dot-env.schema.ts#L24) |
|
|
1567
|
+
| <a id="settlemint_blockchain_node"></a> `SETTLEMINT_BLOCKCHAIN_NODE?` | `string` | Unique name of the blockchain node | [sdk/utils/src/validation/dot-env.schema.ts:26](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/validation/dot-env.schema.ts#L26) |
|
|
1568
|
+
| <a id="settlemint_blockscout"></a> `SETTLEMINT_BLOCKSCOUT?` | `string` | Unique name of the Blockscout instance | [sdk/utils/src/validation/dot-env.schema.ts:77](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/validation/dot-env.schema.ts#L77) |
|
|
1569
|
+
| <a id="settlemint_blockscout_graphql_endpoint"></a> `SETTLEMINT_BLOCKSCOUT_GRAPHQL_ENDPOINT?` | `string` | GraphQL endpoint URL for Blockscout | [sdk/utils/src/validation/dot-env.schema.ts:79](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/validation/dot-env.schema.ts#L79) |
|
|
1570
|
+
| <a id="settlemint_blockscout_ui_endpoint"></a> `SETTLEMINT_BLOCKSCOUT_UI_ENDPOINT?` | `string` | UI endpoint URL for Blockscout | [sdk/utils/src/validation/dot-env.schema.ts:81](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/validation/dot-env.schema.ts#L81) |
|
|
1571
|
+
| <a id="settlemint_custom_deployment"></a> `SETTLEMINT_CUSTOM_DEPLOYMENT?` | `string` | Unique name of the custom deployment | [sdk/utils/src/validation/dot-env.schema.ts:73](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/validation/dot-env.schema.ts#L73) |
|
|
1572
|
+
| <a id="settlemint_custom_deployment_endpoint"></a> `SETTLEMINT_CUSTOM_DEPLOYMENT_ENDPOINT?` | `string` | Endpoint URL for the custom deployment | [sdk/utils/src/validation/dot-env.schema.ts:75](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/validation/dot-env.schema.ts#L75) |
|
|
1573
|
+
| <a id="settlemint_hasura"></a> `SETTLEMINT_HASURA?` | `string` | Unique name of the Hasura instance | [sdk/utils/src/validation/dot-env.schema.ts:30](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/validation/dot-env.schema.ts#L30) |
|
|
1574
|
+
| <a id="settlemint_hasura_admin_secret"></a> `SETTLEMINT_HASURA_ADMIN_SECRET?` | `string` | Admin secret for authenticating with Hasura | [sdk/utils/src/validation/dot-env.schema.ts:34](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/validation/dot-env.schema.ts#L34) |
|
|
1575
|
+
| <a id="settlemint_hasura_database_url"></a> `SETTLEMINT_HASURA_DATABASE_URL?` | `string` | Database connection URL for Hasura | [sdk/utils/src/validation/dot-env.schema.ts:36](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/validation/dot-env.schema.ts#L36) |
|
|
1576
|
+
| <a id="settlemint_hasura_endpoint"></a> `SETTLEMINT_HASURA_ENDPOINT?` | `string` | Endpoint URL for the Hasura GraphQL API | [sdk/utils/src/validation/dot-env.schema.ts:32](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/validation/dot-env.schema.ts#L32) |
|
|
1577
|
+
| <a id="settlemint_hd_private_key"></a> `SETTLEMINT_HD_PRIVATE_KEY?` | `string` | Unique name of the HD private key | [sdk/utils/src/validation/dot-env.schema.ts:53](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/validation/dot-env.schema.ts#L53) |
|
|
1578
|
+
| <a id="settlemint_instance"></a> `SETTLEMINT_INSTANCE` | `string` | Base URL of the SettleMint platform instance | [sdk/utils/src/validation/dot-env.schema.ts:14](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/validation/dot-env.schema.ts#L14) |
|
|
1579
|
+
| <a id="settlemint_ipfs"></a> `SETTLEMINT_IPFS?` | `string` | Unique name of the IPFS instance | [sdk/utils/src/validation/dot-env.schema.ts:65](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/validation/dot-env.schema.ts#L65) |
|
|
1580
|
+
| <a id="settlemint_ipfs_api_endpoint"></a> `SETTLEMINT_IPFS_API_ENDPOINT?` | `string` | API endpoint URL for IPFS | [sdk/utils/src/validation/dot-env.schema.ts:67](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/validation/dot-env.schema.ts#L67) |
|
|
1581
|
+
| <a id="settlemint_ipfs_gateway_endpoint"></a> `SETTLEMINT_IPFS_GATEWAY_ENDPOINT?` | `string` | Gateway endpoint URL for IPFS | [sdk/utils/src/validation/dot-env.schema.ts:71](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/validation/dot-env.schema.ts#L71) |
|
|
1582
|
+
| <a id="settlemint_ipfs_pinning_endpoint"></a> `SETTLEMINT_IPFS_PINNING_ENDPOINT?` | `string` | Pinning service endpoint URL for IPFS | [sdk/utils/src/validation/dot-env.schema.ts:69](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/validation/dot-env.schema.ts#L69) |
|
|
1583
|
+
| <a id="settlemint_load_balancer"></a> `SETTLEMINT_LOAD_BALANCER?` | `string` | Unique name of the load balancer | [sdk/utils/src/validation/dot-env.schema.ts:28](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/validation/dot-env.schema.ts#L28) |
|
|
1584
|
+
| <a id="settlemint_log_level"></a> `SETTLEMINT_LOG_LEVEL` | `"error"` \| `"info"` \| `"warn"` \| `"debug"` \| `"none"` | The log level to use | [sdk/utils/src/validation/dot-env.schema.ts:85](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/validation/dot-env.schema.ts#L85) |
|
|
1585
|
+
| <a id="settlemint_minio"></a> `SETTLEMINT_MINIO?` | `string` | Unique name of the MinIO instance | [sdk/utils/src/validation/dot-env.schema.ts:57](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/validation/dot-env.schema.ts#L57) |
|
|
1586
|
+
| <a id="settlemint_minio_access_key"></a> `SETTLEMINT_MINIO_ACCESS_KEY?` | `string` | Access key for MinIO authentication | [sdk/utils/src/validation/dot-env.schema.ts:61](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/validation/dot-env.schema.ts#L61) |
|
|
1587
|
+
| <a id="settlemint_minio_endpoint"></a> `SETTLEMINT_MINIO_ENDPOINT?` | `string` | Endpoint URL for MinIO | [sdk/utils/src/validation/dot-env.schema.ts:59](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/validation/dot-env.schema.ts#L59) |
|
|
1588
|
+
| <a id="settlemint_minio_secret_key"></a> `SETTLEMINT_MINIO_SECRET_KEY?` | `string` | Secret key for MinIO authentication | [sdk/utils/src/validation/dot-env.schema.ts:63](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/validation/dot-env.schema.ts#L63) |
|
|
1589
|
+
| <a id="settlemint_new_project_name"></a> `SETTLEMINT_NEW_PROJECT_NAME?` | `string` | Name of the new project being created | [sdk/utils/src/validation/dot-env.schema.ts:83](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/validation/dot-env.schema.ts#L83) |
|
|
1590
|
+
| <a id="settlemint_portal"></a> `SETTLEMINT_PORTAL?` | `string` | Unique name of the Smart Contract Portal instance | [sdk/utils/src/validation/dot-env.schema.ts:47](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/validation/dot-env.schema.ts#L47) |
|
|
1591
|
+
| <a id="settlemint_portal_graphql_endpoint"></a> `SETTLEMINT_PORTAL_GRAPHQL_ENDPOINT?` | `string` | GraphQL endpoint URL for the Portal | [sdk/utils/src/validation/dot-env.schema.ts:49](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/validation/dot-env.schema.ts#L49) |
|
|
1592
|
+
| <a id="settlemint_portal_rest_endpoint"></a> `SETTLEMINT_PORTAL_REST_ENDPOINT?` | `string` | REST endpoint URL for the Portal | [sdk/utils/src/validation/dot-env.schema.ts:51](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/validation/dot-env.schema.ts#L51) |
|
|
1593
|
+
| <a id="settlemint_thegraph"></a> `SETTLEMINT_THEGRAPH?` | `string` | Unique name of The Graph instance | [sdk/utils/src/validation/dot-env.schema.ts:38](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/validation/dot-env.schema.ts#L38) |
|
|
1594
|
+
| <a id="settlemint_thegraph_default_subgraph"></a> `SETTLEMINT_THEGRAPH_DEFAULT_SUBGRAPH?` | `string` | Default The Graph subgraph to use | [sdk/utils/src/validation/dot-env.schema.ts:45](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/validation/dot-env.schema.ts#L45) |
|
|
1595
|
+
| <a id="settlemint_thegraph_subgraphs_endpoints"></a> `SETTLEMINT_THEGRAPH_SUBGRAPHS_ENDPOINTS?` | `string`[] | Array of endpoint URLs for The Graph subgraphs | [sdk/utils/src/validation/dot-env.schema.ts:40](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/validation/dot-env.schema.ts#L40) |
|
|
1596
|
+
| <a id="settlemint_workspace"></a> `SETTLEMINT_WORKSPACE?` | `string` | Unique name of the workspace | [sdk/utils/src/validation/dot-env.schema.ts:20](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/validation/dot-env.schema.ts#L20) |
|
|
1597
|
+
|
|
1498
1598
|
***
|
|
1499
1599
|
|
|
1500
1600
|
#### DotEnvPartial
|
|
1501
1601
|
|
|
1502
|
-
> **DotEnvPartial** = `
|
|
1602
|
+
> **DotEnvPartial** = `object`
|
|
1503
1603
|
|
|
1504
|
-
Defined in: [sdk/utils/src/validation/dot-env.schema.ts:
|
|
1604
|
+
Defined in: [sdk/utils/src/validation/dot-env.schema.ts:102](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/validation/dot-env.schema.ts#L102)
|
|
1505
1605
|
|
|
1506
1606
|
Type definition for the partial environment variables schema.
|
|
1507
1607
|
|
|
1608
|
+
##### Type declaration
|
|
1609
|
+
|
|
1610
|
+
| Name | Type | Description | Defined in |
|
|
1611
|
+
| ------ | ------ | ------ | ------ |
|
|
1612
|
+
| <a id="settlemint_access_token-1"></a> `SETTLEMINT_ACCESS_TOKEN?` | `string` | Application access token for authenticating with SettleMint services | [sdk/utils/src/validation/dot-env.schema.ts:16](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/validation/dot-env.schema.ts#L16) |
|
|
1613
|
+
| <a id="settlemint_accessible_private_key-1"></a> `SETTLEMINT_ACCESSIBLE_PRIVATE_KEY?` | `string` | Unique name of the accessible private key | [sdk/utils/src/validation/dot-env.schema.ts:55](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/validation/dot-env.schema.ts#L55) |
|
|
1614
|
+
| <a id="settlemint_application-1"></a> `SETTLEMINT_APPLICATION?` | `string` | Unique name of the application | [sdk/utils/src/validation/dot-env.schema.ts:22](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/validation/dot-env.schema.ts#L22) |
|
|
1615
|
+
| <a id="settlemint_blockchain_network-1"></a> `SETTLEMINT_BLOCKCHAIN_NETWORK?` | `string` | Unique name of the blockchain network | [sdk/utils/src/validation/dot-env.schema.ts:24](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/validation/dot-env.schema.ts#L24) |
|
|
1616
|
+
| <a id="settlemint_blockchain_node-1"></a> `SETTLEMINT_BLOCKCHAIN_NODE?` | `string` | Unique name of the blockchain node | [sdk/utils/src/validation/dot-env.schema.ts:26](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/validation/dot-env.schema.ts#L26) |
|
|
1617
|
+
| <a id="settlemint_blockscout-1"></a> `SETTLEMINT_BLOCKSCOUT?` | `string` | Unique name of the Blockscout instance | [sdk/utils/src/validation/dot-env.schema.ts:77](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/validation/dot-env.schema.ts#L77) |
|
|
1618
|
+
| <a id="settlemint_blockscout_graphql_endpoint-1"></a> `SETTLEMINT_BLOCKSCOUT_GRAPHQL_ENDPOINT?` | `string` | GraphQL endpoint URL for Blockscout | [sdk/utils/src/validation/dot-env.schema.ts:79](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/validation/dot-env.schema.ts#L79) |
|
|
1619
|
+
| <a id="settlemint_blockscout_ui_endpoint-1"></a> `SETTLEMINT_BLOCKSCOUT_UI_ENDPOINT?` | `string` | UI endpoint URL for Blockscout | [sdk/utils/src/validation/dot-env.schema.ts:81](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/validation/dot-env.schema.ts#L81) |
|
|
1620
|
+
| <a id="settlemint_custom_deployment-1"></a> `SETTLEMINT_CUSTOM_DEPLOYMENT?` | `string` | Unique name of the custom deployment | [sdk/utils/src/validation/dot-env.schema.ts:73](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/validation/dot-env.schema.ts#L73) |
|
|
1621
|
+
| <a id="settlemint_custom_deployment_endpoint-1"></a> `SETTLEMINT_CUSTOM_DEPLOYMENT_ENDPOINT?` | `string` | Endpoint URL for the custom deployment | [sdk/utils/src/validation/dot-env.schema.ts:75](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/validation/dot-env.schema.ts#L75) |
|
|
1622
|
+
| <a id="settlemint_hasura-1"></a> `SETTLEMINT_HASURA?` | `string` | Unique name of the Hasura instance | [sdk/utils/src/validation/dot-env.schema.ts:30](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/validation/dot-env.schema.ts#L30) |
|
|
1623
|
+
| <a id="settlemint_hasura_admin_secret-1"></a> `SETTLEMINT_HASURA_ADMIN_SECRET?` | `string` | Admin secret for authenticating with Hasura | [sdk/utils/src/validation/dot-env.schema.ts:34](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/validation/dot-env.schema.ts#L34) |
|
|
1624
|
+
| <a id="settlemint_hasura_database_url-1"></a> `SETTLEMINT_HASURA_DATABASE_URL?` | `string` | Database connection URL for Hasura | [sdk/utils/src/validation/dot-env.schema.ts:36](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/validation/dot-env.schema.ts#L36) |
|
|
1625
|
+
| <a id="settlemint_hasura_endpoint-1"></a> `SETTLEMINT_HASURA_ENDPOINT?` | `string` | Endpoint URL for the Hasura GraphQL API | [sdk/utils/src/validation/dot-env.schema.ts:32](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/validation/dot-env.schema.ts#L32) |
|
|
1626
|
+
| <a id="settlemint_hd_private_key-1"></a> `SETTLEMINT_HD_PRIVATE_KEY?` | `string` | Unique name of the HD private key | [sdk/utils/src/validation/dot-env.schema.ts:53](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/validation/dot-env.schema.ts#L53) |
|
|
1627
|
+
| <a id="settlemint_instance-1"></a> `SETTLEMINT_INSTANCE?` | `string` | Base URL of the SettleMint platform instance | [sdk/utils/src/validation/dot-env.schema.ts:14](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/validation/dot-env.schema.ts#L14) |
|
|
1628
|
+
| <a id="settlemint_ipfs-1"></a> `SETTLEMINT_IPFS?` | `string` | Unique name of the IPFS instance | [sdk/utils/src/validation/dot-env.schema.ts:65](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/validation/dot-env.schema.ts#L65) |
|
|
1629
|
+
| <a id="settlemint_ipfs_api_endpoint-1"></a> `SETTLEMINT_IPFS_API_ENDPOINT?` | `string` | API endpoint URL for IPFS | [sdk/utils/src/validation/dot-env.schema.ts:67](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/validation/dot-env.schema.ts#L67) |
|
|
1630
|
+
| <a id="settlemint_ipfs_gateway_endpoint-1"></a> `SETTLEMINT_IPFS_GATEWAY_ENDPOINT?` | `string` | Gateway endpoint URL for IPFS | [sdk/utils/src/validation/dot-env.schema.ts:71](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/validation/dot-env.schema.ts#L71) |
|
|
1631
|
+
| <a id="settlemint_ipfs_pinning_endpoint-1"></a> `SETTLEMINT_IPFS_PINNING_ENDPOINT?` | `string` | Pinning service endpoint URL for IPFS | [sdk/utils/src/validation/dot-env.schema.ts:69](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/validation/dot-env.schema.ts#L69) |
|
|
1632
|
+
| <a id="settlemint_load_balancer-1"></a> `SETTLEMINT_LOAD_BALANCER?` | `string` | Unique name of the load balancer | [sdk/utils/src/validation/dot-env.schema.ts:28](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/validation/dot-env.schema.ts#L28) |
|
|
1633
|
+
| <a id="settlemint_log_level-1"></a> `SETTLEMINT_LOG_LEVEL?` | `"error"` \| `"info"` \| `"warn"` \| `"debug"` \| `"none"` | The log level to use | [sdk/utils/src/validation/dot-env.schema.ts:85](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/validation/dot-env.schema.ts#L85) |
|
|
1634
|
+
| <a id="settlemint_minio-1"></a> `SETTLEMINT_MINIO?` | `string` | Unique name of the MinIO instance | [sdk/utils/src/validation/dot-env.schema.ts:57](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/validation/dot-env.schema.ts#L57) |
|
|
1635
|
+
| <a id="settlemint_minio_access_key-1"></a> `SETTLEMINT_MINIO_ACCESS_KEY?` | `string` | Access key for MinIO authentication | [sdk/utils/src/validation/dot-env.schema.ts:61](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/validation/dot-env.schema.ts#L61) |
|
|
1636
|
+
| <a id="settlemint_minio_endpoint-1"></a> `SETTLEMINT_MINIO_ENDPOINT?` | `string` | Endpoint URL for MinIO | [sdk/utils/src/validation/dot-env.schema.ts:59](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/validation/dot-env.schema.ts#L59) |
|
|
1637
|
+
| <a id="settlemint_minio_secret_key-1"></a> `SETTLEMINT_MINIO_SECRET_KEY?` | `string` | Secret key for MinIO authentication | [sdk/utils/src/validation/dot-env.schema.ts:63](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/validation/dot-env.schema.ts#L63) |
|
|
1638
|
+
| <a id="settlemint_new_project_name-1"></a> `SETTLEMINT_NEW_PROJECT_NAME?` | `string` | Name of the new project being created | [sdk/utils/src/validation/dot-env.schema.ts:83](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/validation/dot-env.schema.ts#L83) |
|
|
1639
|
+
| <a id="settlemint_portal-1"></a> `SETTLEMINT_PORTAL?` | `string` | Unique name of the Smart Contract Portal instance | [sdk/utils/src/validation/dot-env.schema.ts:47](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/validation/dot-env.schema.ts#L47) |
|
|
1640
|
+
| <a id="settlemint_portal_graphql_endpoint-1"></a> `SETTLEMINT_PORTAL_GRAPHQL_ENDPOINT?` | `string` | GraphQL endpoint URL for the Portal | [sdk/utils/src/validation/dot-env.schema.ts:49](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/validation/dot-env.schema.ts#L49) |
|
|
1641
|
+
| <a id="settlemint_portal_rest_endpoint-1"></a> `SETTLEMINT_PORTAL_REST_ENDPOINT?` | `string` | REST endpoint URL for the Portal | [sdk/utils/src/validation/dot-env.schema.ts:51](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/validation/dot-env.schema.ts#L51) |
|
|
1642
|
+
| <a id="settlemint_thegraph-1"></a> `SETTLEMINT_THEGRAPH?` | `string` | Unique name of The Graph instance | [sdk/utils/src/validation/dot-env.schema.ts:38](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/validation/dot-env.schema.ts#L38) |
|
|
1643
|
+
| <a id="settlemint_thegraph_default_subgraph-1"></a> `SETTLEMINT_THEGRAPH_DEFAULT_SUBGRAPH?` | `string` | Default The Graph subgraph to use | [sdk/utils/src/validation/dot-env.schema.ts:45](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/validation/dot-env.schema.ts#L45) |
|
|
1644
|
+
| <a id="settlemint_thegraph_subgraphs_endpoints-1"></a> `SETTLEMINT_THEGRAPH_SUBGRAPHS_ENDPOINTS?` | `string`[] | Array of endpoint URLs for The Graph subgraphs | [sdk/utils/src/validation/dot-env.schema.ts:40](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/validation/dot-env.schema.ts#L40) |
|
|
1645
|
+
| <a id="settlemint_workspace-1"></a> `SETTLEMINT_WORKSPACE?` | `string` | Unique name of the workspace | [sdk/utils/src/validation/dot-env.schema.ts:20](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/validation/dot-env.schema.ts#L20) |
|
|
1646
|
+
|
|
1508
1647
|
***
|
|
1509
1648
|
|
|
1510
1649
|
#### Id
|
|
1511
1650
|
|
|
1512
|
-
> **Id** = `
|
|
1651
|
+
> **Id** = `string`
|
|
1513
1652
|
|
|
1514
|
-
Defined in: [sdk/utils/src/validation/id.schema.ts:30](https://github.com/settlemint/sdk/blob/v2.1.
|
|
1653
|
+
Defined in: [sdk/utils/src/validation/id.schema.ts:30](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/validation/id.schema.ts#L30)
|
|
1515
1654
|
|
|
1516
1655
|
Type definition for database IDs, inferred from IdSchema.
|
|
1517
1656
|
Can be either a PostgreSQL UUID string or MongoDB ObjectID string.
|
|
@@ -1522,17 +1661,100 @@ Can be either a PostgreSQL UUID string or MongoDB ObjectID string.
|
|
|
1522
1661
|
|
|
1523
1662
|
> **LogLevel** = `"debug"` \| `"info"` \| `"warn"` \| `"error"` \| `"none"`
|
|
1524
1663
|
|
|
1525
|
-
Defined in: [sdk/utils/src/logging/logger.ts:6](https://github.com/settlemint/sdk/blob/v2.1.
|
|
1664
|
+
Defined in: [sdk/utils/src/logging/logger.ts:6](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/logging/logger.ts#L6)
|
|
1526
1665
|
|
|
1527
1666
|
Log levels supported by the logger
|
|
1528
1667
|
|
|
1668
|
+
***
|
|
1669
|
+
|
|
1670
|
+
#### PersonalAccessToken
|
|
1671
|
+
|
|
1672
|
+
> **PersonalAccessToken** = `string`
|
|
1673
|
+
|
|
1674
|
+
Defined in: [sdk/utils/src/validation/access-token.schema.ts:15](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/validation/access-token.schema.ts#L15)
|
|
1675
|
+
|
|
1676
|
+
Schema for validating personal access tokens.
|
|
1677
|
+
Personal access tokens start with 'sm_pat_' prefix.
|
|
1678
|
+
|
|
1679
|
+
***
|
|
1680
|
+
|
|
1681
|
+
#### Url
|
|
1682
|
+
|
|
1683
|
+
> **Url** = `string`
|
|
1684
|
+
|
|
1685
|
+
Defined in: [sdk/utils/src/validation/url.schema.ts:18](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/validation/url.schema.ts#L18)
|
|
1686
|
+
|
|
1687
|
+
Schema for validating URLs.
|
|
1688
|
+
|
|
1689
|
+
##### Example
|
|
1690
|
+
|
|
1691
|
+
```ts
|
|
1692
|
+
import { UrlSchema } from "@settlemint/sdk-utils/validation";
|
|
1693
|
+
|
|
1694
|
+
// Validate a URL
|
|
1695
|
+
const isValidUrl = UrlSchema.safeParse("https://console.settlemint.com").success;
|
|
1696
|
+
// true
|
|
1697
|
+
|
|
1698
|
+
// Invalid URLs will fail validation
|
|
1699
|
+
const isInvalidUrl = UrlSchema.safeParse("not-a-url").success;
|
|
1700
|
+
// false
|
|
1701
|
+
```
|
|
1702
|
+
|
|
1703
|
+
***
|
|
1704
|
+
|
|
1705
|
+
#### UrlOrPath
|
|
1706
|
+
|
|
1707
|
+
> **UrlOrPath** = `string`
|
|
1708
|
+
|
|
1709
|
+
Defined in: [sdk/utils/src/validation/url.schema.ts:55](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/validation/url.schema.ts#L55)
|
|
1710
|
+
|
|
1711
|
+
Schema that accepts either a full URL or a URL path.
|
|
1712
|
+
|
|
1713
|
+
##### Example
|
|
1714
|
+
|
|
1715
|
+
```ts
|
|
1716
|
+
import { UrlOrPathSchema } from "@settlemint/sdk-utils/validation";
|
|
1717
|
+
|
|
1718
|
+
// Validate a URL
|
|
1719
|
+
const isValidUrl = UrlOrPathSchema.safeParse("https://console.settlemint.com").success;
|
|
1720
|
+
// true
|
|
1721
|
+
|
|
1722
|
+
// Validate a path
|
|
1723
|
+
const isValidPath = UrlOrPathSchema.safeParse("/api/v1/users").success;
|
|
1724
|
+
// true
|
|
1725
|
+
```
|
|
1726
|
+
|
|
1727
|
+
***
|
|
1728
|
+
|
|
1729
|
+
#### UrlPath
|
|
1730
|
+
|
|
1731
|
+
> **UrlPath** = `string`
|
|
1732
|
+
|
|
1733
|
+
Defined in: [sdk/utils/src/validation/url.schema.ts:38](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/validation/url.schema.ts#L38)
|
|
1734
|
+
|
|
1735
|
+
Schema for validating URL paths.
|
|
1736
|
+
|
|
1737
|
+
##### Example
|
|
1738
|
+
|
|
1739
|
+
```ts
|
|
1740
|
+
import { UrlPathSchema } from "@settlemint/sdk-utils/validation";
|
|
1741
|
+
|
|
1742
|
+
// Validate a URL path
|
|
1743
|
+
const isValidPath = UrlPathSchema.safeParse("/api/v1/users").success;
|
|
1744
|
+
// true
|
|
1745
|
+
|
|
1746
|
+
// Invalid paths will fail validation
|
|
1747
|
+
const isInvalidPath = UrlPathSchema.safeParse("not-a-path").success;
|
|
1748
|
+
// false
|
|
1749
|
+
```
|
|
1750
|
+
|
|
1529
1751
|
### Variables
|
|
1530
1752
|
|
|
1531
1753
|
#### AccessTokenSchema
|
|
1532
1754
|
|
|
1533
|
-
> `const` **AccessTokenSchema**: `ZodString`
|
|
1755
|
+
> `const` **AccessTokenSchema**: `ZodString`\<[`AccessToken`](#accesstoken)\>
|
|
1534
1756
|
|
|
1535
|
-
Defined in: [sdk/utils/src/validation/access-token.schema.ts:21](https://github.com/settlemint/sdk/blob/v2.1.
|
|
1757
|
+
Defined in: [sdk/utils/src/validation/access-token.schema.ts:21](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/validation/access-token.schema.ts#L21)
|
|
1536
1758
|
|
|
1537
1759
|
Schema for validating both application and personal access tokens.
|
|
1538
1760
|
Accepts tokens starting with either 'sm_pat_' or 'sm_aat_' prefix.
|
|
@@ -1541,9 +1763,9 @@ Accepts tokens starting with either 'sm_pat_' or 'sm_aat_' prefix.
|
|
|
1541
1763
|
|
|
1542
1764
|
#### ApplicationAccessTokenSchema
|
|
1543
1765
|
|
|
1544
|
-
> `const` **ApplicationAccessTokenSchema**: `ZodString`
|
|
1766
|
+
> `const` **ApplicationAccessTokenSchema**: `ZodString`\<[`ApplicationAccessToken`](#applicationaccesstoken)\>
|
|
1545
1767
|
|
|
1546
|
-
Defined in: [sdk/utils/src/validation/access-token.schema.ts:7](https://github.com/settlemint/sdk/blob/v2.1.
|
|
1768
|
+
Defined in: [sdk/utils/src/validation/access-token.schema.ts:7](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/validation/access-token.schema.ts#L7)
|
|
1547
1769
|
|
|
1548
1770
|
Schema for validating application access tokens.
|
|
1549
1771
|
Application access tokens start with 'sm_aat_' prefix.
|
|
@@ -1552,9 +1774,9 @@ Application access tokens start with 'sm_aat_' prefix.
|
|
|
1552
1774
|
|
|
1553
1775
|
#### DotEnvSchema
|
|
1554
1776
|
|
|
1555
|
-
> `const` **DotEnvSchema**: `ZodObject
|
|
1777
|
+
> `const` **DotEnvSchema**: `ZodObject`\<[`DotEnv`](#dotenv)\>
|
|
1556
1778
|
|
|
1557
|
-
Defined in: [sdk/utils/src/validation/dot-env.schema.ts:12](https://github.com/settlemint/sdk/blob/v2.1.
|
|
1779
|
+
Defined in: [sdk/utils/src/validation/dot-env.schema.ts:12](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/validation/dot-env.schema.ts#L12)
|
|
1558
1780
|
|
|
1559
1781
|
Schema for validating environment variables used by the SettleMint SDK.
|
|
1560
1782
|
Defines validation rules and types for configuration values like URLs,
|
|
@@ -1564,9 +1786,9 @@ access tokens, workspace names, and service endpoints.
|
|
|
1564
1786
|
|
|
1565
1787
|
#### DotEnvSchemaPartial
|
|
1566
1788
|
|
|
1567
|
-
> `const` **DotEnvSchemaPartial**: `ZodObject
|
|
1789
|
+
> `const` **DotEnvSchemaPartial**: `ZodObject`\<[`DotEnvPartial`](#dotenvpartial)\>
|
|
1568
1790
|
|
|
1569
|
-
Defined in: [sdk/utils/src/validation/dot-env.schema.ts:
|
|
1791
|
+
Defined in: [sdk/utils/src/validation/dot-env.schema.ts:97](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/validation/dot-env.schema.ts#L97)
|
|
1570
1792
|
|
|
1571
1793
|
Partial version of the environment variables schema where all fields are optional.
|
|
1572
1794
|
Useful for validating incomplete configurations during development or build time.
|
|
@@ -1575,9 +1797,9 @@ Useful for validating incomplete configurations during development or build time
|
|
|
1575
1797
|
|
|
1576
1798
|
#### IdSchema
|
|
1577
1799
|
|
|
1578
|
-
> `const` **IdSchema**: `ZodUnion
|
|
1800
|
+
> `const` **IdSchema**: `ZodUnion`\<[`Id`](#id)\>
|
|
1579
1801
|
|
|
1580
|
-
Defined in: [sdk/utils/src/validation/id.schema.ts:17](https://github.com/settlemint/sdk/blob/v2.1.
|
|
1802
|
+
Defined in: [sdk/utils/src/validation/id.schema.ts:17](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/validation/id.schema.ts#L17)
|
|
1581
1803
|
|
|
1582
1804
|
Schema for validating database IDs. Accepts both PostgreSQL UUIDs and MongoDB ObjectIDs.
|
|
1583
1805
|
PostgreSQL UUIDs are 32 hexadecimal characters with hyphens (e.g. 123e4567-e89b-12d3-a456-426614174000).
|
|
@@ -1599,9 +1821,9 @@ const isValidObjectId = IdSchema.safeParse("507f1f77bcf86cd799439011").success;
|
|
|
1599
1821
|
|
|
1600
1822
|
#### PersonalAccessTokenSchema
|
|
1601
1823
|
|
|
1602
|
-
> `const` **PersonalAccessTokenSchema**: `ZodString`
|
|
1824
|
+
> `const` **PersonalAccessTokenSchema**: `ZodString`\<[`PersonalAccessToken`](#personalaccesstoken)\>
|
|
1603
1825
|
|
|
1604
|
-
Defined in: [sdk/utils/src/validation/access-token.schema.ts:14](https://github.com/settlemint/sdk/blob/v2.1.
|
|
1826
|
+
Defined in: [sdk/utils/src/validation/access-token.schema.ts:14](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/validation/access-token.schema.ts#L14)
|
|
1605
1827
|
|
|
1606
1828
|
Schema for validating personal access tokens.
|
|
1607
1829
|
Personal access tokens start with 'sm_pat_' prefix.
|
|
@@ -1612,7 +1834,7 @@ Personal access tokens start with 'sm_pat_' prefix.
|
|
|
1612
1834
|
|
|
1613
1835
|
> `const` **runsInBrowser**: `boolean` = `isBrowser`
|
|
1614
1836
|
|
|
1615
|
-
Defined in: [sdk/utils/src/runtime/ensure-server.ts:40](https://github.com/settlemint/sdk/blob/v2.1.
|
|
1837
|
+
Defined in: [sdk/utils/src/runtime/ensure-server.ts:40](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/runtime/ensure-server.ts#L40)
|
|
1616
1838
|
|
|
1617
1839
|
Boolean indicating if code is currently running in a browser environment
|
|
1618
1840
|
|
|
@@ -1622,7 +1844,7 @@ Boolean indicating if code is currently running in a browser environment
|
|
|
1622
1844
|
|
|
1623
1845
|
> `const` **runsOnServer**: `boolean` = `!isBrowser`
|
|
1624
1846
|
|
|
1625
|
-
Defined in: [sdk/utils/src/runtime/ensure-server.ts:45](https://github.com/settlemint/sdk/blob/v2.1.
|
|
1847
|
+
Defined in: [sdk/utils/src/runtime/ensure-server.ts:45](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/runtime/ensure-server.ts#L45)
|
|
1626
1848
|
|
|
1627
1849
|
Boolean indicating if code is currently running in a server environment
|
|
1628
1850
|
|
|
@@ -1632,7 +1854,7 @@ Boolean indicating if code is currently running in a server environment
|
|
|
1632
1854
|
|
|
1633
1855
|
> `const` **UniqueNameSchema**: `ZodString`
|
|
1634
1856
|
|
|
1635
|
-
Defined in: [sdk/utils/src/validation/unique-name.schema.ts:19](https://github.com/settlemint/sdk/blob/v2.1.
|
|
1857
|
+
Defined in: [sdk/utils/src/validation/unique-name.schema.ts:19](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/validation/unique-name.schema.ts#L19)
|
|
1636
1858
|
|
|
1637
1859
|
Schema for validating unique names used across the SettleMint platform.
|
|
1638
1860
|
Only accepts lowercase alphanumeric characters and hyphens.
|
|
@@ -1656,9 +1878,9 @@ const isInvalidName = UniqueNameSchema.safeParse("My Workspace!").success;
|
|
|
1656
1878
|
|
|
1657
1879
|
#### UrlOrPathSchema
|
|
1658
1880
|
|
|
1659
|
-
> `const` **UrlOrPathSchema**: `ZodUnion
|
|
1881
|
+
> `const` **UrlOrPathSchema**: `ZodUnion`\<[`UrlOrPath`](#urlorpath)\>
|
|
1660
1882
|
|
|
1661
|
-
Defined in: [sdk/utils/src/validation/url.schema.ts:54](https://github.com/settlemint/sdk/blob/v2.1.
|
|
1883
|
+
Defined in: [sdk/utils/src/validation/url.schema.ts:54](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/validation/url.schema.ts#L54)
|
|
1662
1884
|
|
|
1663
1885
|
Schema that accepts either a full URL or a URL path.
|
|
1664
1886
|
|
|
@@ -1680,9 +1902,9 @@ const isValidPath = UrlOrPathSchema.safeParse("/api/v1/users").success;
|
|
|
1680
1902
|
|
|
1681
1903
|
#### UrlPathSchema
|
|
1682
1904
|
|
|
1683
|
-
> `const` **UrlPathSchema**: `ZodString`
|
|
1905
|
+
> `const` **UrlPathSchema**: `ZodString`\<[`UrlPath`](#urlpath)\>
|
|
1684
1906
|
|
|
1685
|
-
Defined in: [sdk/utils/src/validation/url.schema.ts:34](https://github.com/settlemint/sdk/blob/v2.1.
|
|
1907
|
+
Defined in: [sdk/utils/src/validation/url.schema.ts:34](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/validation/url.schema.ts#L34)
|
|
1686
1908
|
|
|
1687
1909
|
Schema for validating URL paths.
|
|
1688
1910
|
|
|
@@ -1704,9 +1926,9 @@ const isInvalidPath = UrlPathSchema.safeParse("not-a-path").success;
|
|
|
1704
1926
|
|
|
1705
1927
|
#### UrlSchema
|
|
1706
1928
|
|
|
1707
|
-
> `const` **UrlSchema**: `ZodString`
|
|
1929
|
+
> `const` **UrlSchema**: `ZodString`\<[`Url`](#url)\>
|
|
1708
1930
|
|
|
1709
|
-
Defined in: [sdk/utils/src/validation/url.schema.ts:17](https://github.com/settlemint/sdk/blob/v2.1.
|
|
1931
|
+
Defined in: [sdk/utils/src/validation/url.schema.ts:17](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/validation/url.schema.ts#L17)
|
|
1710
1932
|
|
|
1711
1933
|
Schema for validating URLs.
|
|
1712
1934
|
|