Skip to content

Commit 227b324

Browse files
author
Abdulhakim Ajetunmobi
authored
add terminal image to node sms (#23)
1 parent 077e9aa commit 227b324

File tree

10 files changed

+825
-4
lines changed

10 files changed

+825
-4
lines changed

tutorials/messages_api-node-sms/.astro/collections/docs.schema.json

Lines changed: 628 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export default new Map();
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
2+
export default new Map([
3+
["src/content/docs/index.mdx", () => import("astro:content-layer-deferred-module?astro%3Acontent-layer-deferred-module=&fileName=src%2Fcontent%2Fdocs%2Findex.mdx&astroContentModuleFlag=true")]]);
4+
Lines changed: 183 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,183 @@
1+
declare module 'astro:content' {
2+
interface Render {
3+
'.mdoc': Promise<{
4+
Content(props: Record<string, any>): import('astro').MarkdownInstance<{}>['Content'];
5+
headings: import('astro').MarkdownHeading[];
6+
}>;
7+
}
8+
}
9+
10+
declare module 'astro:content' {
11+
interface Render {
12+
'.mdx': Promise<{
13+
Content: import('astro').MarkdownInstance<{}>['Content'];
14+
headings: import('astro').MarkdownHeading[];
15+
remarkPluginFrontmatter: Record<string, any>;
16+
components: import('astro').MDXInstance<{}>['components'];
17+
}>;
18+
}
19+
}
20+
21+
declare module 'astro:content' {
22+
export interface RenderResult {
23+
Content: import('astro/runtime/server/index.js').AstroComponentFactory;
24+
headings: import('astro').MarkdownHeading[];
25+
remarkPluginFrontmatter: Record<string, any>;
26+
}
27+
interface Render {
28+
'.md': Promise<RenderResult>;
29+
}
30+
31+
export interface RenderedContent {
32+
html: string;
33+
metadata?: {
34+
imagePaths: Array<string>;
35+
[key: string]: unknown;
36+
};
37+
}
38+
}
39+
40+
declare module 'astro:content' {
41+
type Flatten<T> = T extends { [K: string]: infer U } ? U : never;
42+
43+
export type CollectionKey = keyof AnyEntryMap;
44+
export type CollectionEntry<C extends CollectionKey> = Flatten<AnyEntryMap[C]>;
45+
46+
export type ContentCollectionKey = keyof ContentEntryMap;
47+
export type DataCollectionKey = keyof DataEntryMap;
48+
49+
type AllValuesOf<T> = T extends any ? T[keyof T] : never;
50+
type ValidContentEntrySlug<C extends keyof ContentEntryMap> = AllValuesOf<
51+
ContentEntryMap[C]
52+
>['slug'];
53+
54+
/** @deprecated Use `getEntry` instead. */
55+
export function getEntryBySlug<
56+
C extends keyof ContentEntryMap,
57+
E extends ValidContentEntrySlug<C> | (string & {}),
58+
>(
59+
collection: C,
60+
// Note that this has to accept a regular string too, for SSR
61+
entrySlug: E,
62+
): E extends ValidContentEntrySlug<C>
63+
? Promise<CollectionEntry<C>>
64+
: Promise<CollectionEntry<C> | undefined>;
65+
66+
/** @deprecated Use `getEntry` instead. */
67+
export function getDataEntryById<C extends keyof DataEntryMap, E extends keyof DataEntryMap[C]>(
68+
collection: C,
69+
entryId: E,
70+
): Promise<CollectionEntry<C>>;
71+
72+
export function getCollection<C extends keyof AnyEntryMap, E extends CollectionEntry<C>>(
73+
collection: C,
74+
filter?: (entry: CollectionEntry<C>) => entry is E,
75+
): Promise<E[]>;
76+
export function getCollection<C extends keyof AnyEntryMap>(
77+
collection: C,
78+
filter?: (entry: CollectionEntry<C>) => unknown,
79+
): Promise<CollectionEntry<C>[]>;
80+
81+
export function getEntry<
82+
C extends keyof ContentEntryMap,
83+
E extends ValidContentEntrySlug<C> | (string & {}),
84+
>(entry: {
85+
collection: C;
86+
slug: E;
87+
}): E extends ValidContentEntrySlug<C>
88+
? Promise<CollectionEntry<C>>
89+
: Promise<CollectionEntry<C> | undefined>;
90+
export function getEntry<
91+
C extends keyof DataEntryMap,
92+
E extends keyof DataEntryMap[C] | (string & {}),
93+
>(entry: {
94+
collection: C;
95+
id: E;
96+
}): E extends keyof DataEntryMap[C]
97+
? Promise<DataEntryMap[C][E]>
98+
: Promise<CollectionEntry<C> | undefined>;
99+
export function getEntry<
100+
C extends keyof ContentEntryMap,
101+
E extends ValidContentEntrySlug<C> | (string & {}),
102+
>(
103+
collection: C,
104+
slug: E,
105+
): E extends ValidContentEntrySlug<C>
106+
? Promise<CollectionEntry<C>>
107+
: Promise<CollectionEntry<C> | undefined>;
108+
export function getEntry<
109+
C extends keyof DataEntryMap,
110+
E extends keyof DataEntryMap[C] | (string & {}),
111+
>(
112+
collection: C,
113+
id: E,
114+
): E extends keyof DataEntryMap[C]
115+
? string extends keyof DataEntryMap[C]
116+
? Promise<DataEntryMap[C][E]> | undefined
117+
: Promise<DataEntryMap[C][E]>
118+
: Promise<CollectionEntry<C> | undefined>;
119+
120+
/** Resolve an array of entry references from the same collection */
121+
export function getEntries<C extends keyof ContentEntryMap>(
122+
entries: {
123+
collection: C;
124+
slug: ValidContentEntrySlug<C>;
125+
}[],
126+
): Promise<CollectionEntry<C>[]>;
127+
export function getEntries<C extends keyof DataEntryMap>(
128+
entries: {
129+
collection: C;
130+
id: keyof DataEntryMap[C];
131+
}[],
132+
): Promise<CollectionEntry<C>[]>;
133+
134+
export function render<C extends keyof AnyEntryMap>(
135+
entry: AnyEntryMap[C][string],
136+
): Promise<RenderResult>;
137+
138+
export function reference<C extends keyof AnyEntryMap>(
139+
collection: C,
140+
): import('astro/zod').ZodEffects<
141+
import('astro/zod').ZodString,
142+
C extends keyof ContentEntryMap
143+
? {
144+
collection: C;
145+
slug: ValidContentEntrySlug<C>;
146+
}
147+
: {
148+
collection: C;
149+
id: keyof DataEntryMap[C];
150+
}
151+
>;
152+
// Allow generic `string` to avoid excessive type errors in the config
153+
// if `dev` is not running to update as you edit.
154+
// Invalid collection names will be caught at build time.
155+
export function reference<C extends string>(
156+
collection: C,
157+
): import('astro/zod').ZodEffects<import('astro/zod').ZodString, never>;
158+
159+
type ReturnTypeOrOriginal<T> = T extends (...args: any[]) => infer R ? R : T;
160+
type InferEntrySchema<C extends keyof AnyEntryMap> = import('astro/zod').infer<
161+
ReturnTypeOrOriginal<Required<ContentConfig['collections'][C]>['schema']>
162+
>;
163+
164+
type ContentEntryMap = {
165+
166+
};
167+
168+
type DataEntryMap = {
169+
"docs": Record<string, {
170+
id: string;
171+
body?: string;
172+
collection: "docs";
173+
data: InferEntrySchema<"docs">;
174+
rendered?: RenderedContent;
175+
filePath?: string;
176+
}>;
177+
178+
};
179+
180+
type AnyEntryMap = ContentEntryMap & DataEntryMap;
181+
182+
export type ContentConfig = typeof import("../src/content.config.js");
183+
}

tutorials/messages_api-node-sms/.astro/data-store.json

Lines changed: 1 addition & 0 deletions
Large diffs are not rendered by default.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"_variables": {
3-
"lastUpdateCheck": 1736170921507
3+
"lastUpdateCheck": 1737738643821
44
}
55
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
/// <reference types="astro/client" />
2-
/// <reference path="astro/content.d.ts" />
2+
/// <reference path="content.d.ts" />
41.3 KB
Loading

tutorials/messages_api-node-sms/src/content/docs/02-install-server-sdk.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,12 @@
22
title: Install the Server SDK
33
---
44

5-
Type this command into the Terminal to install the Vonage Node Server SDK. You can use the Vonage Node Server SDK to make calls to Vonage's various APIs.
5+
Type this command into the Terminal to install the Vonage Node Server SDK.
66

77
```sh
88
npm install @vonage/server-sdk
99
```
10+
11+
![Terminal example](/terminal.png)
12+
13+
You can use the Vonage Node Server SDK to make calls to Vonage's various APIs.

tutorials/messages_api-node-sms/tutorial-config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@
55
"panels": [
66
"terminal"
77
],
8-
"version": "0.7.0"
8+
"version": "0.8.0"
99
}

0 commit comments

Comments
 (0)