Skip to content

Commit e5a1657

Browse files
Add SDK snippets
1 parent 61082fc commit e5a1657

File tree

19 files changed

+116
-81
lines changed

19 files changed

+116
-81
lines changed

.trunk/trunk.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ lint:
3737
- linters: [ALL]
3838
paths:
3939
- styles
40+
- snippets
4041
- linters: [checkov]
4142
paths:
4243
- mint.json

modus/sdk/assemblyscript/collections.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ title: Collections
33
description: "Add storage and vector search capabilities to your functions."
44
---
55

6+
import { SdkHeader, SdkTip } from "/snippets/sdk-snippets.mdx"
7+
8+
<SdkHeader language="AssemblyScript" feature="Collections" />
9+
610
The Modus Collection API allows you to add vector search within your functions.
711

812
## Import
@@ -27,11 +31,7 @@ import { collections } from "@hypermode/modus-sdk-as"
2731

2832
The APIs in the `collections` namespace are below, organized by category.
2933

30-
<Tip>
31-
We're constantly introducing new APIs through ongoing development with early
32-
users. [Open an issue](https://github.com/hypermodeinc/modus/issues) if you
33-
have ideas on what would make Modus even more powerful for your next app!
34-
</Tip>
34+
<SdkTip />
3535

3636
### Mutation Functions
3737

modus/sdk/assemblyscript/console.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ title: Console
33
description: "Capture errors and debugging information in your functions"
44
---
55

6+
import { SdkHeader, SdkTip } from "/snippets/sdk-snippets.mdx"
7+
8+
<SdkHeader language="AssemblyScript" feature="Console" />
9+
610
The Modus Console API allows you to capture information from your functions,
711
such as errors and other information that can help you debug your functions.
812

@@ -27,11 +31,7 @@ directs the output to Hypermode as follows:
2731

2832
The APIs in the `console` namespace are below, organized by category.
2933

30-
<Tip>
31-
We're constantly introducing new APIs through ongoing development with early
32-
users. [Open an issue](https://github.com/hypermodeinc/modus/issues) if you
33-
have ideas on what would make Modus even more powerful for your next app!
34-
</Tip>
34+
<SdkTip />
3535

3636
### Assertion Functions
3737

modus/sdk/assemblyscript/dgraph.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ title: Dgraph
33
description: "Execute queries and mutations against a Dgraph database"
44
---
55

6+
import { SdkHeader, SdkTip } from "/snippets/sdk-snippets.mdx"
7+
8+
<SdkHeader language="AssemblyScript" feature="Dgraph" />
9+
610
The Modus Dgraph API allows you to run queries and mutations against a Dgraph
711
database.
812

@@ -28,11 +32,7 @@ import { dgraph } from "@hypermode/modus-sdk-as"
2832

2933
The APIs in the `dgraph` namespace are below, organized by category.
3034

31-
<Tip>
32-
We're constantly introducing new APIs through ongoing development with early
33-
users. [Open an issue](https://github.com/hypermodeinc/modus/issues) if you
34-
have ideas on what would make Modus even more powerful for your next app!
35-
</Tip>
35+
<SdkTip />
3636

3737
### Functions
3838

modus/sdk/assemblyscript/graphql.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ title: GraphQL
33
description: "Access external GraphQL data sources from your functions"
44
---
55

6+
import { SdkHeader, SdkTip } from "/snippets/sdk-snippets.mdx"
7+
8+
<SdkHeader language="AssemblyScript" feature="GraphQL" />
9+
610
The Modus GraphQL API allows you to securely call and fetch data from any
711
GraphQL endpoint.
812

@@ -28,11 +32,7 @@ import { http } from "@hypermode/modus-sdk-as"
2832

2933
The APIs in the `graphql` namespace are below, organized by category.
3034

31-
<Tip>
32-
We're constantly introducing new APIs through ongoing development with early
33-
users. [Open an issue](https://github.com/hypermodeinc/modus/issues) if you
34-
have ideas on what would make Modus even more powerful for your next app!
35-
</Tip>
35+
<SdkTip />
3636

3737
### Functions
3838

modus/sdk/assemblyscript/http.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ title: HTTP
33
description: "Access external HTTP endpoints from your functions"
44
---
55

6+
import { SdkHeader, SdkTip } from "/snippets/sdk-snippets.mdx"
7+
8+
<SdkHeader language="AssemblyScript" feature="HTTP" />
9+
610
The Modus HTTP API allows you to securely call and fetch data from an HTTP
711
endpoint. It's similar to the HTTP
812
[`fetch`](https://developer.mozilla.org/docs/Web/API/Fetch_API) API used in
@@ -43,11 +47,7 @@ import { http } from "@hypermode/modus-sdk-as"
4347

4448
The APIs in the `http` namespace are below, organized by category.
4549

46-
<Tip>
47-
We're constantly introducing new APIs through ongoing development with early
48-
users. [Open an issue](https://github.com/hypermodeinc/modus/issues) if you
49-
have ideas on what would make Modus even more powerful for your next app!
50-
</Tip>
50+
<SdkTip />
5151

5252
### Functions
5353

modus/sdk/assemblyscript/models.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ title: Models
33
description: "Invoke AI models from your functions"
44
---
55

6+
import { SdkHeader, SdkTip } from "/snippets/sdk-snippets.mdx"
7+
8+
<SdkHeader language="AssemblyScript" feature="Models" />
9+
610
The Modus Models API allows you to invoke AI models directly from your
711
functions, irrespective of the model's host.
812

@@ -67,11 +71,7 @@ a pull request, if you'd like to contribute a new model yourself.
6771

6872
The APIs in the `models` namespace are below, organized by category.
6973

70-
<Tip>
71-
We're constantly introducing new APIs through ongoing development with early
72-
users. [Open an issue](https://github.com/hypermodeinc/modus/issues) if you
73-
have ideas on what would make Modus even more powerful for your next app!
74-
</Tip>
74+
<SdkTip />
7575

7676
### Functions
7777

modus/sdk/assemblyscript/neo4j.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ title: Neo4j
33
description: "Execute queries and mutations against a Neo4j database"
44
---
55

6+
import { SdkHeader, SdkTip } from "/snippets/sdk-snippets.mdx"
7+
8+
<SdkHeader language="AssemblyScript" feature="Neo4j" />
9+
610
The Modus Neo4j API allows you to run queries and mutations against a Neo4j
711
database.
812

@@ -28,11 +32,7 @@ import github.com/hypermodeinc/modus/sdk/go/pkg/neo4j
2832

2933
The APIs in the `neo4j` namespace are below, organized by category.
3034

31-
<Tip>
32-
We're constantly introducing new APIs through ongoing development with early
33-
users. [Open an issue](https://github.com/hypermodeinc/modus/issues) if you
34-
have ideas on what would make Modus even more powerful for your next app!
35-
</Tip>
35+
<SdkTip />
3636

3737
### Functions
3838

modus/sdk/assemblyscript/postgresql.mdx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ title: PostgreSQL
33
description: "Execute queries against a PostgreSQL database"
44
---
55

6+
import { SdkHeader, SdkTip } from "/snippets/sdk-snippets.mdx"
7+
8+
<SdkHeader language="AssemblyScript" feature="PostgreSQL" />
69
The Modus PostgreSQL API allows you to run queries against PostgreSQL or any
710
PostgreSQL-compatible database platform.
811

@@ -28,11 +31,7 @@ import { postgresql } from "@hypermode/modus-sdk-as"
2831

2932
The APIs in the `postgresql` namespace are below, organized by category.
3033

31-
<Tip>
32-
We're constantly introducing new APIs through ongoing development with early
33-
users. [Open an issue](https://github.com/hypermodeinc/modus/issues) if you
34-
have ideas on what would make Modus even more powerful for your next app!
35-
</Tip>
34+
<SdkTip />
3635

3736
### Functions
3837

modus/sdk/go/collections.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ title: Collections
33
description: "Add storage and vector search capabilities to your functions."
44
---
55

6+
import { SdkHeader, SdkTip } from "/snippets/sdk-snippets.mdx"
7+
8+
<SdkHeader language="Go" feature="Collections" />
9+
610
The Modus Collection API allows you to add vector search within your functions.
711

812
## Import
@@ -27,11 +31,7 @@ import { collections } from "@hypermode/modus-sdk-as"
2731

2832
The APIs in the `collections` namespace are below, organized by category.
2933

30-
<Tip>
31-
We're constantly introducing new APIs through ongoing development with early
32-
users. [Open an issue](https://github.com/hypermodeinc/modus/issues) if you
33-
have ideas on what would make Modus even more powerful for your next app!
34-
</Tip>
34+
<SdkTip />
3535

3636
### Mutation Functions
3737

0 commit comments

Comments
 (0)