@nosana/types 2.7.3 → 2.13.0
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 +12 -1
- package/dist/Common/index.d.ts +3 -0
- package/dist/Common/index.d.ts.map +1 -1
- package/dist/Common/index.js +6 -0
- package/dist/Common/index.js.map +1 -1
- package/dist/Deployments/index.d.ts +13 -13
- package/dist/Deployments/index.d.ts.map +1 -1
- package/dist/Schemas/api.d.ts +14809 -2448
- package/dist/Schemas/api.d.ts.map +1 -1
- package/dist/Schemas/index.d.ts +3 -0
- package/dist/Schemas/index.d.ts.map +1 -1
- package/dist/Schemas/index.js +1 -0
- package/dist/Schemas/index.js.map +1 -1
- package/dist/Schemas/node.d.ts +1826 -0
- package/dist/Schemas/node.d.ts.map +1 -0
- package/dist/Schemas/node.js +2 -0
- package/dist/Schemas/node.js.map +1 -0
- package/dist/Schemas/nodeOpenApi.d.ts +71 -0
- package/dist/Schemas/nodeOpenApi.d.ts.map +1 -0
- package/dist/Schemas/nodeOpenApi.js +1654 -0
- package/dist/Schemas/nodeOpenApi.js.map +1 -0
- package/openapi/node.openapi.json +3429 -0
- package/package.json +8 -6
package/README.md
CHANGED
|
@@ -44,4 +44,15 @@ declare module '@nosana/types' {
|
|
|
44
44
|
}
|
|
45
45
|
```
|
|
46
46
|
|
|
47
|
-
For more info go to [learn.nosana.com](https://learn.nosana.com)
|
|
47
|
+
For more info go to [learn.nosana.com](https://learn.nosana.com)
|
|
48
|
+
## Node API contract
|
|
49
|
+
|
|
50
|
+
`src/Schemas/nodeOpenApi.ts` is the OpenAPI 3.1 document for the HTTP API every node
|
|
51
|
+
serves for its jobs, and the single source of truth for it. `JobDefinition`, `FlowState`
|
|
52
|
+
and everything they reach are taken from the TypeScript types through typia at build
|
|
53
|
+
time, so the document cannot drift from them. `pnpm generate:node` (after `pnpm build`)
|
|
54
|
+
exports it to `openapi/node.openapi.json`, which ships with the package, and regenerates
|
|
55
|
+
`src/Schemas/node.ts`, exported as the `NodeApiSchema` namespace. `@nosana/api` builds
|
|
56
|
+
its node client from those types, and the node repository can type its route handlers
|
|
57
|
+
against the same ones and serve `nodeOpenApiDocument()` at `/openapi.json` to join the
|
|
58
|
+
gateway spec, its swagger and the MCP.
|
package/dist/Common/index.d.ts
CHANGED
|
@@ -20,4 +20,7 @@ export declare const NOSANA_PROGRAM_ADDRESSES: Record<NosanaNetwork, {
|
|
|
20
20
|
pools: string;
|
|
21
21
|
merkleDistributor: string;
|
|
22
22
|
}>;
|
|
23
|
+
/** A Solana address: base58 without the ambiguous characters, 32 to 44 characters long. */
|
|
24
|
+
export declare const SOLANA_ADDRESS_PATTERN = "^[1-9A-HJ-NP-Za-km-z]{32,44}$";
|
|
25
|
+
export declare function isSolanaAddress(value: string): boolean;
|
|
23
26
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Common/index.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,aAAa;;;;CAIhB,CAAC;AAEX,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,OAAO,aAAa,CAAC,CAAC;AAE/E;;;GAGG;AACH,eAAO,MAAM,kBAAkB,EAAE,MAAM,CAAC,aAAa,EAAE,MAAM,CAInD,CAAC;AAEX;;;GAGG;AACH,eAAO,MAAM,wBAAwB,EAAE,MAAM,CAC3C,aAAa,EACb;IACE,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,iBAAiB,EAAE,MAAM,CAAC;CAC3B,CAuBO,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Common/index.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,aAAa;;;;CAIhB,CAAC;AAEX,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,OAAO,aAAa,CAAC,CAAC;AAE/E;;;GAGG;AACH,eAAO,MAAM,kBAAkB,EAAE,MAAM,CAAC,aAAa,EAAE,MAAM,CAInD,CAAC;AAEX;;;GAGG;AACH,eAAO,MAAM,wBAAwB,EAAE,MAAM,CAC3C,aAAa,EACb;IACE,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,iBAAiB,EAAE,MAAM,CAAC;CAC3B,CAuBO,CAAC;AAEX,2FAA2F;AAC3F,eAAO,MAAM,sBAAsB,kCAAkC,CAAC;AAItE,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAEtD"}
|
package/dist/Common/index.js
CHANGED
|
@@ -39,4 +39,10 @@ export const NOSANA_PROGRAM_ADDRESSES = {
|
|
|
39
39
|
merkleDistributor: 'merkp8F8f5EgYSYKadk3YiuQQdo3JPdnJWKviaaF425',
|
|
40
40
|
},
|
|
41
41
|
};
|
|
42
|
+
/** A Solana address: base58 without the ambiguous characters, 32 to 44 characters long. */
|
|
43
|
+
export const SOLANA_ADDRESS_PATTERN = '^[1-9A-HJ-NP-Za-km-z]{32,44}$';
|
|
44
|
+
const SOLANA_ADDRESS = new RegExp(SOLANA_ADDRESS_PATTERN);
|
|
45
|
+
export function isSolanaAddress(value) {
|
|
46
|
+
return SOLANA_ADDRESS.test(value);
|
|
47
|
+
}
|
|
42
48
|
//# sourceMappingURL=index.js.map
|
package/dist/Common/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/Common/index.ts"],"names":[],"mappings":"AACA,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,OAAO,EAAE,SAAS;IAClB,MAAM,EAAE,QAAQ;IAChB,QAAQ,EAAE,UAAU;CACZ,CA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AA6C;CAC/D,CAAC;AAEX;;;GAGG;AACH,MAAM,CAAC,MAAM,wBAAwB,GASjC;IACF,CAAC,aAAa,CAAC,OAAO,CAAC,EAAE;QACvB,IAAI,EAAE,6CAA6C;QACnD,OAAO,EAAE,6CAA6C;QACtD,KAAK,EAAE,6CAA6C;QACpD,KAAK,EAAE,6CAA6C;QACpD,iBAAiB,EAAE,6CAA6C;KACjE;IACD,CAAC,aAAa,CAAC,MAAM,CAAC,EAAE;QACtB,IAAI,EAAE,6CAA6C;QACnD,OAAO,EAAE,6CAA6C;QACtD,KAAK,EAAE,6CAA6C;QACpD,KAAK,EAAE,6CAA6C;QACpD,iBAAiB,EAAE,6CAA6C;KACjE;IACD,CAAC,aAAa,CAAC,QAAQ,CAAC,EAAE;QACxB,IAAI,EAAE,6CAA6C;QACnD,OAAO,EAAE,6CAA6C;QACtD,KAAK,EAAE,6CAA6C;QACpD,KAAK,EAAE,6CAA6C;QACpD,iBAAiB,EAAE,6CAA6C;KACjE;CACO,CAAC;AAEX,2FAA2F;AAC3F,MAAM,CAAC,MAAM,sBAAsB,GAAG,+BAA+B,CAAC;AAEtE,MAAM,cAAc,GAAG,IAAI,MAAM,CAAC,sBAAsB,CAAC,CAAC;AAE1D,MAAM,UAAU,eAAe,CAAC,KAAa;IAC3C,OAAO,cAAc,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AACpC,CAAC"}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import type { components } from "../Schemas";
|
|
2
2
|
export type DeploymentId = string;
|
|
3
|
-
export type Deployment = components["schemas"]["
|
|
4
|
-
export type Revision = components["schemas"]["
|
|
5
|
-
export type Task = components["schemas"]["
|
|
6
|
-
export type Event = components["schemas"]["
|
|
7
|
-
export type DeploymentJob = components["schemas"]["
|
|
8
|
-
export type Vault = components["schemas"]["
|
|
9
|
-
export type DeploymentJobs = components["schemas"]["
|
|
10
|
-
export type DeploymentEvents = components["schemas"]["
|
|
11
|
-
export type DeploymentRevisions = components["schemas"]["
|
|
3
|
+
export type Deployment = components["schemas"]["DeploymentManagerDeployment"];
|
|
4
|
+
export type Revision = components["schemas"]["DeploymentManagerRevision"];
|
|
5
|
+
export type Task = components["schemas"]["DeploymentManagerTask"];
|
|
6
|
+
export type Event = components["schemas"]["DeploymentManagerEvent"];
|
|
7
|
+
export type DeploymentJob = components["schemas"]["DeploymentManagerJob"];
|
|
8
|
+
export type Vault = components["schemas"]["DeploymentManagerVault"];
|
|
9
|
+
export type DeploymentJobs = components["schemas"]["DeploymentManagerJob"][];
|
|
10
|
+
export type DeploymentEvents = components["schemas"]["DeploymentManagerEvent"][];
|
|
11
|
+
export type DeploymentRevisions = components["schemas"]["DeploymentManagerRevision"][];
|
|
12
12
|
export declare const DeploymentStatus: {
|
|
13
|
-
[key in components['schemas']['
|
|
13
|
+
[key in components['schemas']['DeploymentManagerDeploymentStatus']]: components['schemas']['DeploymentManagerDeploymentStatus'];
|
|
14
14
|
};
|
|
15
15
|
export declare const DeploymentStrategy: {
|
|
16
|
-
[key in components['schemas']['
|
|
16
|
+
[key in components['schemas']['DeploymentManagerDeploymentStrategy']]: components['schemas']['DeploymentManagerDeploymentStrategy'];
|
|
17
17
|
};
|
|
18
|
-
export type DeploymentStatus = components['schemas']['
|
|
19
|
-
export type DeploymentStrategy = components['schemas']['
|
|
18
|
+
export type DeploymentStatus = components['schemas']['DeploymentManagerDeploymentStatus'];
|
|
19
|
+
export type DeploymentStrategy = components['schemas']['DeploymentManagerDeploymentStrategy'];
|
|
20
20
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Deployments/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAE7C,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC;AAElC,MAAM,MAAM,UAAU,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC,
|
|
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