@reminix/sdk 0.8.4 → 0.10.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/CHANGELOG.md +19 -0
- package/README.md +6 -6
- package/client.d.mts +8 -11
- package/client.d.mts.map +1 -1
- package/client.d.ts +8 -11
- package/client.d.ts.map +1 -1
- package/client.js +3 -6
- package/client.js.map +1 -1
- package/client.mjs +3 -6
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/agents.d.mts +35 -69
- package/resources/agents.d.mts.map +1 -1
- package/resources/agents.d.ts +35 -69
- package/resources/agents.d.ts.map +1 -1
- package/resources/client-tokens.d.mts +90 -0
- package/resources/client-tokens.d.mts.map +1 -0
- package/resources/client-tokens.d.ts +90 -0
- package/resources/client-tokens.d.ts.map +1 -0
- package/resources/client-tokens.js +65 -0
- package/resources/client-tokens.js.map +1 -0
- package/resources/client-tokens.mjs +61 -0
- package/resources/client-tokens.mjs.map +1 -0
- package/resources/index.d.mts +3 -4
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +3 -4
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +3 -5
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -2
- package/resources/index.mjs.map +1 -1
- package/resources/projects.d.mts +15 -5
- package/resources/projects.d.mts.map +1 -1
- package/resources/projects.d.ts +15 -5
- package/resources/projects.d.ts.map +1 -1
- package/src/client.ts +13 -12
- package/src/resources/agents.ts +41 -80
- package/src/resources/client-tokens.ts +108 -0
- package/src/resources/index.ts +3 -3
- package/src/resources/projects.ts +17 -5
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.mts.map +1 -1
- package/version.d.ts +1 -1
- package/version.d.ts.map +1 -1
- package/version.js +1 -1
- package/version.js.map +1 -1
- package/version.mjs +1 -1
- package/version.mjs.map +1 -1
- package/resources/deployments.d.mts +0 -4
- package/resources/deployments.d.mts.map +0 -1
- package/resources/deployments.d.ts +0 -4
- package/resources/deployments.d.ts.map +0 -1
- package/resources/deployments.js +0 -9
- package/resources/deployments.js.map +0 -1
- package/resources/deployments.mjs +0 -5
- package/resources/deployments.mjs.map +0 -1
- package/resources/secrets.d.mts +0 -4
- package/resources/secrets.d.mts.map +0 -1
- package/resources/secrets.d.ts +0 -4
- package/resources/secrets.d.ts.map +0 -1
- package/resources/secrets.js +0 -9
- package/resources/secrets.js.map +0 -1
- package/resources/secrets.mjs +0 -5
- package/resources/secrets.mjs.map +0 -1
- package/src/resources/deployments.ts +0 -5
- package/src/resources/secrets.ts +0 -5
package/resources/agents.d.ts
CHANGED
|
@@ -85,6 +85,38 @@ export declare class Agents extends APIResource {
|
|
|
85
85
|
invoke(name: string, body: AgentInvokeParamsStreaming, options?: RequestOptions): APIPromise<Stream<StreamChunk>>;
|
|
86
86
|
invoke(name: string, body: AgentInvokeParamsBase, options?: RequestOptions): APIPromise<Stream<StreamChunk> | AgentInvokeResponse>;
|
|
87
87
|
}
|
|
88
|
+
export interface ChatMessage {
|
|
89
|
+
/**
|
|
90
|
+
* Message content. Can be string, array (multimodal), or object (tool).
|
|
91
|
+
*/
|
|
92
|
+
content: string | Array<ChatMessage.MultimodalContent> | {
|
|
93
|
+
[key: string]: unknown;
|
|
94
|
+
};
|
|
95
|
+
/**
|
|
96
|
+
* Message role
|
|
97
|
+
*/
|
|
98
|
+
role: 'system' | 'user' | 'assistant' | 'tool';
|
|
99
|
+
/**
|
|
100
|
+
* Tool name (required when role is "tool")
|
|
101
|
+
*/
|
|
102
|
+
name?: string;
|
|
103
|
+
/**
|
|
104
|
+
* Tool call ID (for tool role)
|
|
105
|
+
*/
|
|
106
|
+
tool_call_id?: string;
|
|
107
|
+
}
|
|
108
|
+
export declare namespace ChatMessage {
|
|
109
|
+
interface MultimodalContent {
|
|
110
|
+
type: 'text' | 'image_url';
|
|
111
|
+
image_url?: MultimodalContent.ImageURL;
|
|
112
|
+
text?: string;
|
|
113
|
+
}
|
|
114
|
+
namespace MultimodalContent {
|
|
115
|
+
interface ImageURL {
|
|
116
|
+
url: string;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
88
120
|
/**
|
|
89
121
|
* Optional request context passed to the agent handler.
|
|
90
122
|
*/
|
|
@@ -114,46 +146,12 @@ export interface AgentChatResponse {
|
|
|
114
146
|
/**
|
|
115
147
|
* Full conversation history including the assistant response
|
|
116
148
|
*/
|
|
117
|
-
messages: Array<
|
|
149
|
+
messages: Array<ChatMessage>;
|
|
118
150
|
/**
|
|
119
151
|
* Final assistant response text
|
|
120
152
|
*/
|
|
121
153
|
output: string;
|
|
122
154
|
}
|
|
123
|
-
export declare namespace AgentChatResponse {
|
|
124
|
-
interface Message {
|
|
125
|
-
/**
|
|
126
|
-
* Message content. Can be string, array (multimodal), or object (tool).
|
|
127
|
-
*/
|
|
128
|
-
content: string | Array<Message.UnionMember1> | {
|
|
129
|
-
[key: string]: unknown;
|
|
130
|
-
};
|
|
131
|
-
/**
|
|
132
|
-
* Message role
|
|
133
|
-
*/
|
|
134
|
-
role: 'system' | 'user' | 'assistant' | 'tool';
|
|
135
|
-
/**
|
|
136
|
-
* Tool name (required when role is "tool")
|
|
137
|
-
*/
|
|
138
|
-
name?: string;
|
|
139
|
-
/**
|
|
140
|
-
* Tool call ID (for tool role)
|
|
141
|
-
*/
|
|
142
|
-
tool_call_id?: string;
|
|
143
|
-
}
|
|
144
|
-
namespace Message {
|
|
145
|
-
interface UnionMember1 {
|
|
146
|
-
type: 'text' | 'image_url';
|
|
147
|
-
image_url?: UnionMember1.ImageURL;
|
|
148
|
-
text?: string;
|
|
149
|
-
}
|
|
150
|
-
namespace UnionMember1 {
|
|
151
|
-
interface ImageURL {
|
|
152
|
-
url: string;
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
155
|
export interface AgentInvokeResponse {
|
|
158
156
|
/**
|
|
159
157
|
* Output from the agent. Structure depends on agent implementation.
|
|
@@ -165,7 +163,7 @@ export interface AgentChatParamsBase {
|
|
|
165
163
|
/**
|
|
166
164
|
* Conversation history. Must include at least one message.
|
|
167
165
|
*/
|
|
168
|
-
messages: Array<
|
|
166
|
+
messages: Array<ChatMessage>;
|
|
169
167
|
/**
|
|
170
168
|
* Optional request context passed to the agent handler.
|
|
171
169
|
*/
|
|
@@ -176,38 +174,6 @@ export interface AgentChatParamsBase {
|
|
|
176
174
|
stream?: boolean;
|
|
177
175
|
}
|
|
178
176
|
export declare namespace AgentChatParams {
|
|
179
|
-
interface Message {
|
|
180
|
-
/**
|
|
181
|
-
* Message content. Can be string, array (multimodal), or object (tool).
|
|
182
|
-
*/
|
|
183
|
-
content: string | Array<Message.UnionMember1> | {
|
|
184
|
-
[key: string]: unknown;
|
|
185
|
-
};
|
|
186
|
-
/**
|
|
187
|
-
* Message role
|
|
188
|
-
*/
|
|
189
|
-
role: 'system' | 'user' | 'assistant' | 'tool';
|
|
190
|
-
/**
|
|
191
|
-
* Tool name (required when role is "tool")
|
|
192
|
-
*/
|
|
193
|
-
name?: string;
|
|
194
|
-
/**
|
|
195
|
-
* Tool call ID (for tool role)
|
|
196
|
-
*/
|
|
197
|
-
tool_call_id?: string;
|
|
198
|
-
}
|
|
199
|
-
namespace Message {
|
|
200
|
-
interface UnionMember1 {
|
|
201
|
-
type: 'text' | 'image_url';
|
|
202
|
-
image_url?: UnionMember1.ImageURL;
|
|
203
|
-
text?: string;
|
|
204
|
-
}
|
|
205
|
-
namespace UnionMember1 {
|
|
206
|
-
interface ImageURL {
|
|
207
|
-
url: string;
|
|
208
|
-
}
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
177
|
type AgentChatParamsNonStreaming = AgentsAPI.AgentChatParamsNonStreaming;
|
|
212
178
|
type AgentChatParamsStreaming = AgentsAPI.AgentChatParamsStreaming;
|
|
213
179
|
}
|
|
@@ -257,6 +223,6 @@ export interface AgentInvokeParamsStreaming extends AgentInvokeParamsBase {
|
|
|
257
223
|
stream: true;
|
|
258
224
|
}
|
|
259
225
|
export declare namespace Agents {
|
|
260
|
-
export { type Context as Context, type StreamChunk as StreamChunk, type AgentChatResponse as AgentChatResponse, type AgentInvokeResponse as AgentInvokeResponse, type AgentChatParams as AgentChatParams, type AgentChatParamsNonStreaming as AgentChatParamsNonStreaming, type AgentChatParamsStreaming as AgentChatParamsStreaming, type AgentInvokeParams as AgentInvokeParams, type AgentInvokeParamsNonStreaming as AgentInvokeParamsNonStreaming, type AgentInvokeParamsStreaming as AgentInvokeParamsStreaming, };
|
|
226
|
+
export { type ChatMessage as ChatMessage, type Context as Context, type StreamChunk as StreamChunk, type AgentChatResponse as AgentChatResponse, type AgentInvokeResponse as AgentInvokeResponse, type AgentChatParams as AgentChatParams, type AgentChatParamsNonStreaming as AgentChatParamsNonStreaming, type AgentChatParamsStreaming as AgentChatParamsStreaming, type AgentInvokeParams as AgentInvokeParams, type AgentInvokeParamsNonStreaming as AgentInvokeParamsNonStreaming, type AgentInvokeParamsStreaming as AgentInvokeParamsStreaming, };
|
|
261
227
|
}
|
|
262
228
|
//# sourceMappingURL=agents.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agents.d.ts","sourceRoot":"","sources":["../src/resources/agents.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,SAAS;OACd,EAAE,UAAU,EAAE;OACd,EAAE,MAAM,EAAE;OACV,EAAE,cAAc,EAAE;AAGzB,qBAAa,MAAO,SAAQ,WAAW;IACrC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAuCG;IACH,IAAI,CACF,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,2BAA2B,EACjC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,iBAAiB,CAAC;IAChC,IAAI,CACF,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,wBAAwB,EAC9B,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,MAAM,CAAC,WAAW,CAA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M,GAAG,OAAO,CAAA;KAAE,CAAC;IAElC;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,yBAAiB,iBAAiB,CAAC;IACjC,KAAY,6BAA6B,GAAG,SAAS,CAAC,6BAA6B,CAAC;IACpF,KAAY,0BAA0B,GAAG,SAAS,CAAC,0BAA0B,CAAC;CAC/E;AAED,MAAM,WAAW,6BAA8B,SAAQ,qBAAqB;IAC1E;;OAEG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC;CAChB;AAED,MAAM,WAAW,0BAA2B,SAAQ,qBAAqB;IACvE;;OAEG;IACH,MAAM,EAAE,IAAI,CAAC;CACd;AAED,MAAM,CAAC,OAAO,WAAW,MAAM,CAAC;IAC9B,OAAO,EACL,KAAK,WAAW,IAAI,WAAW,EAC/B,KAAK,OAAO,IAAI,OAAO,EACvB,KAAK,WAAW,IAAI,WAAW,EAC/B,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,0BAA0B,IAAI,0BAA0B,GAC9D,CAAC;CACH"}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { APIResource } from "../core/resource.mjs";
|
|
2
|
+
import { APIPromise } from "../core/api-promise.mjs";
|
|
3
|
+
import { RequestOptions } from "../internal/request-options.mjs";
|
|
4
|
+
export declare class ClientTokens extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* Create a short-lived client token for browser SDK use.
|
|
7
|
+
*
|
|
8
|
+
* **Use case:** Your backend calls this endpoint to generate a token, then passes
|
|
9
|
+
* it to your frontend. The frontend uses the token to make authenticated requests
|
|
10
|
+
* to `/client/*` endpoints.
|
|
11
|
+
*
|
|
12
|
+
* **Context types:**
|
|
13
|
+
*
|
|
14
|
+
* - `context`: Public data accessible to the client via `/client/context`
|
|
15
|
+
* - `serverContext`: Private data only accessible to agents/handlers (never
|
|
16
|
+
* exposed to client)
|
|
17
|
+
*
|
|
18
|
+
* **Security:**
|
|
19
|
+
*
|
|
20
|
+
* - Tokens are short-lived (default 1 hour, max 24 hours)
|
|
21
|
+
* - Both context types are trusted and cannot be tampered with
|
|
22
|
+
* - Store the token securely - it will only be shown once
|
|
23
|
+
*
|
|
24
|
+
* **Example flow:**
|
|
25
|
+
*
|
|
26
|
+
* 1. User logs in to your app
|
|
27
|
+
* 2. Your backend calls `POST /v1/client-tokens` with
|
|
28
|
+
* `{ context: { userId: "user_123" }, serverContext: { internalId: "int_456" } }`
|
|
29
|
+
* 3. Your backend returns the token to your frontend
|
|
30
|
+
* 4. Frontend uses the token to call `/client/*` endpoints
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* ```ts
|
|
34
|
+
* const clientToken = await client.clientTokens.create({
|
|
35
|
+
* context: { userId: 'user_123', sessionId: 'sess_abc' },
|
|
36
|
+
* });
|
|
37
|
+
* ```
|
|
38
|
+
*/
|
|
39
|
+
create(body: ClientTokenCreateParams, options?: RequestOptions): APIPromise<ClientTokenCreateResponse>;
|
|
40
|
+
/**
|
|
41
|
+
* Revoke a client token immediately.
|
|
42
|
+
*
|
|
43
|
+
* Once revoked, the token can no longer be used for authentication. This is a soft
|
|
44
|
+
* delete - the token record is kept for audit purposes.
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
* ```ts
|
|
48
|
+
* await client.clientTokens.revoke('x');
|
|
49
|
+
* ```
|
|
50
|
+
*/
|
|
51
|
+
revoke(id: string, options?: RequestOptions): APIPromise<void>;
|
|
52
|
+
}
|
|
53
|
+
export interface ClientTokenCreateResponse {
|
|
54
|
+
/**
|
|
55
|
+
* Token ID for management purposes
|
|
56
|
+
*/
|
|
57
|
+
id: string;
|
|
58
|
+
/**
|
|
59
|
+
* The client token. Store this securely - it will not be shown again.
|
|
60
|
+
*/
|
|
61
|
+
token: string;
|
|
62
|
+
/**
|
|
63
|
+
* ISO 8601 timestamp when the token expires
|
|
64
|
+
*/
|
|
65
|
+
expiresAt: string;
|
|
66
|
+
}
|
|
67
|
+
export interface ClientTokenCreateParams {
|
|
68
|
+
/**
|
|
69
|
+
* Public context accessible to the client via /client/context (e.g., { userId:
|
|
70
|
+
* "...", sessionId: "..." })
|
|
71
|
+
*/
|
|
72
|
+
context: {
|
|
73
|
+
[key: string]: unknown;
|
|
74
|
+
};
|
|
75
|
+
/**
|
|
76
|
+
* Private context only accessible to agents/handlers, never exposed to client
|
|
77
|
+
* (e.g., { internalId: "..." })
|
|
78
|
+
*/
|
|
79
|
+
serverContext?: {
|
|
80
|
+
[key: string]: unknown;
|
|
81
|
+
};
|
|
82
|
+
/**
|
|
83
|
+
* Time-to-live in seconds. Default: 3600 (1 hour). Max: 86400 (24 hours).
|
|
84
|
+
*/
|
|
85
|
+
ttlSeconds?: number;
|
|
86
|
+
}
|
|
87
|
+
export declare namespace ClientTokens {
|
|
88
|
+
export { type ClientTokenCreateResponse as ClientTokenCreateResponse, type ClientTokenCreateParams as ClientTokenCreateParams, };
|
|
89
|
+
}
|
|
90
|
+
//# sourceMappingURL=client-tokens.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client-tokens.d.mts","sourceRoot":"","sources":["../src/resources/client-tokens.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OAEd,EAAE,cAAc,EAAE;AAGzB,qBAAa,YAAa,SAAQ,WAAW;IAC3C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAiCG;IACH,MAAM,CAAC,IAAI,EAAE,uBAAuB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,yBAAyB,CAAC;IAItG;;;;;;;;;;OAUG;IACH,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,IAAI,CAAC;CAM/D;AAED,MAAM,WAAW,yBAAyB;IACxC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,uBAAuB;IACtC;;;OAGG;IACH,OAAO,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,CAAC;IAEpC;;;OAGG;IACH,aAAa,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,CAAC;IAE3C;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,CAAC,OAAO,WAAW,YAAY,CAAC;IACpC,OAAO,EACL,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,uBAAuB,IAAI,uBAAuB,GACxD,CAAC;CACH"}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { APIResource } from "../core/resource.js";
|
|
2
|
+
import { APIPromise } from "../core/api-promise.js";
|
|
3
|
+
import { RequestOptions } from "../internal/request-options.js";
|
|
4
|
+
export declare class ClientTokens extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* Create a short-lived client token for browser SDK use.
|
|
7
|
+
*
|
|
8
|
+
* **Use case:** Your backend calls this endpoint to generate a token, then passes
|
|
9
|
+
* it to your frontend. The frontend uses the token to make authenticated requests
|
|
10
|
+
* to `/client/*` endpoints.
|
|
11
|
+
*
|
|
12
|
+
* **Context types:**
|
|
13
|
+
*
|
|
14
|
+
* - `context`: Public data accessible to the client via `/client/context`
|
|
15
|
+
* - `serverContext`: Private data only accessible to agents/handlers (never
|
|
16
|
+
* exposed to client)
|
|
17
|
+
*
|
|
18
|
+
* **Security:**
|
|
19
|
+
*
|
|
20
|
+
* - Tokens are short-lived (default 1 hour, max 24 hours)
|
|
21
|
+
* - Both context types are trusted and cannot be tampered with
|
|
22
|
+
* - Store the token securely - it will only be shown once
|
|
23
|
+
*
|
|
24
|
+
* **Example flow:**
|
|
25
|
+
*
|
|
26
|
+
* 1. User logs in to your app
|
|
27
|
+
* 2. Your backend calls `POST /v1/client-tokens` with
|
|
28
|
+
* `{ context: { userId: "user_123" }, serverContext: { internalId: "int_456" } }`
|
|
29
|
+
* 3. Your backend returns the token to your frontend
|
|
30
|
+
* 4. Frontend uses the token to call `/client/*` endpoints
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* ```ts
|
|
34
|
+
* const clientToken = await client.clientTokens.create({
|
|
35
|
+
* context: { userId: 'user_123', sessionId: 'sess_abc' },
|
|
36
|
+
* });
|
|
37
|
+
* ```
|
|
38
|
+
*/
|
|
39
|
+
create(body: ClientTokenCreateParams, options?: RequestOptions): APIPromise<ClientTokenCreateResponse>;
|
|
40
|
+
/**
|
|
41
|
+
* Revoke a client token immediately.
|
|
42
|
+
*
|
|
43
|
+
* Once revoked, the token can no longer be used for authentication. This is a soft
|
|
44
|
+
* delete - the token record is kept for audit purposes.
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
* ```ts
|
|
48
|
+
* await client.clientTokens.revoke('x');
|
|
49
|
+
* ```
|
|
50
|
+
*/
|
|
51
|
+
revoke(id: string, options?: RequestOptions): APIPromise<void>;
|
|
52
|
+
}
|
|
53
|
+
export interface ClientTokenCreateResponse {
|
|
54
|
+
/**
|
|
55
|
+
* Token ID for management purposes
|
|
56
|
+
*/
|
|
57
|
+
id: string;
|
|
58
|
+
/**
|
|
59
|
+
* The client token. Store this securely - it will not be shown again.
|
|
60
|
+
*/
|
|
61
|
+
token: string;
|
|
62
|
+
/**
|
|
63
|
+
* ISO 8601 timestamp when the token expires
|
|
64
|
+
*/
|
|
65
|
+
expiresAt: string;
|
|
66
|
+
}
|
|
67
|
+
export interface ClientTokenCreateParams {
|
|
68
|
+
/**
|
|
69
|
+
* Public context accessible to the client via /client/context (e.g., { userId:
|
|
70
|
+
* "...", sessionId: "..." })
|
|
71
|
+
*/
|
|
72
|
+
context: {
|
|
73
|
+
[key: string]: unknown;
|
|
74
|
+
};
|
|
75
|
+
/**
|
|
76
|
+
* Private context only accessible to agents/handlers, never exposed to client
|
|
77
|
+
* (e.g., { internalId: "..." })
|
|
78
|
+
*/
|
|
79
|
+
serverContext?: {
|
|
80
|
+
[key: string]: unknown;
|
|
81
|
+
};
|
|
82
|
+
/**
|
|
83
|
+
* Time-to-live in seconds. Default: 3600 (1 hour). Max: 86400 (24 hours).
|
|
84
|
+
*/
|
|
85
|
+
ttlSeconds?: number;
|
|
86
|
+
}
|
|
87
|
+
export declare namespace ClientTokens {
|
|
88
|
+
export { type ClientTokenCreateResponse as ClientTokenCreateResponse, type ClientTokenCreateParams as ClientTokenCreateParams, };
|
|
89
|
+
}
|
|
90
|
+
//# sourceMappingURL=client-tokens.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client-tokens.d.ts","sourceRoot":"","sources":["../src/resources/client-tokens.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OAEd,EAAE,cAAc,EAAE;AAGzB,qBAAa,YAAa,SAAQ,WAAW;IAC3C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAiCG;IACH,MAAM,CAAC,IAAI,EAAE,uBAAuB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,yBAAyB,CAAC;IAItG;;;;;;;;;;OAUG;IACH,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,IAAI,CAAC;CAM/D;AAED,MAAM,WAAW,yBAAyB;IACxC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,uBAAuB;IACtC;;;OAGG;IACH,OAAO,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,CAAC;IAEpC;;;OAGG;IACH,aAAa,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,CAAC;IAE3C;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,CAAC,OAAO,WAAW,YAAY,CAAC;IACpC,OAAO,EACL,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,uBAAuB,IAAI,uBAAuB,GACxD,CAAC;CACH"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.ClientTokens = void 0;
|
|
5
|
+
const resource_1 = require("../core/resource.js");
|
|
6
|
+
const headers_1 = require("../internal/headers.js");
|
|
7
|
+
const path_1 = require("../internal/utils/path.js");
|
|
8
|
+
class ClientTokens extends resource_1.APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* Create a short-lived client token for browser SDK use.
|
|
11
|
+
*
|
|
12
|
+
* **Use case:** Your backend calls this endpoint to generate a token, then passes
|
|
13
|
+
* it to your frontend. The frontend uses the token to make authenticated requests
|
|
14
|
+
* to `/client/*` endpoints.
|
|
15
|
+
*
|
|
16
|
+
* **Context types:**
|
|
17
|
+
*
|
|
18
|
+
* - `context`: Public data accessible to the client via `/client/context`
|
|
19
|
+
* - `serverContext`: Private data only accessible to agents/handlers (never
|
|
20
|
+
* exposed to client)
|
|
21
|
+
*
|
|
22
|
+
* **Security:**
|
|
23
|
+
*
|
|
24
|
+
* - Tokens are short-lived (default 1 hour, max 24 hours)
|
|
25
|
+
* - Both context types are trusted and cannot be tampered with
|
|
26
|
+
* - Store the token securely - it will only be shown once
|
|
27
|
+
*
|
|
28
|
+
* **Example flow:**
|
|
29
|
+
*
|
|
30
|
+
* 1. User logs in to your app
|
|
31
|
+
* 2. Your backend calls `POST /v1/client-tokens` with
|
|
32
|
+
* `{ context: { userId: "user_123" }, serverContext: { internalId: "int_456" } }`
|
|
33
|
+
* 3. Your backend returns the token to your frontend
|
|
34
|
+
* 4. Frontend uses the token to call `/client/*` endpoints
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* ```ts
|
|
38
|
+
* const clientToken = await client.clientTokens.create({
|
|
39
|
+
* context: { userId: 'user_123', sessionId: 'sess_abc' },
|
|
40
|
+
* });
|
|
41
|
+
* ```
|
|
42
|
+
*/
|
|
43
|
+
create(body, options) {
|
|
44
|
+
return this._client.post('/client-tokens', { body, ...options });
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Revoke a client token immediately.
|
|
48
|
+
*
|
|
49
|
+
* Once revoked, the token can no longer be used for authentication. This is a soft
|
|
50
|
+
* delete - the token record is kept for audit purposes.
|
|
51
|
+
*
|
|
52
|
+
* @example
|
|
53
|
+
* ```ts
|
|
54
|
+
* await client.clientTokens.revoke('x');
|
|
55
|
+
* ```
|
|
56
|
+
*/
|
|
57
|
+
revoke(id, options) {
|
|
58
|
+
return this._client.delete((0, path_1.path) `/client-tokens/${id}`, {
|
|
59
|
+
...options,
|
|
60
|
+
headers: (0, headers_1.buildHeaders)([{ Accept: '*/*' }, options?.headers]),
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
exports.ClientTokens = ClientTokens;
|
|
65
|
+
//# sourceMappingURL=client-tokens.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client-tokens.js","sourceRoot":"","sources":["../src/resources/client-tokens.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAE/C,oDAAmD;AAEnD,oDAA8C;AAE9C,MAAa,YAAa,SAAQ,sBAAW;IAC3C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAiCG;IACH,MAAM,CAAC,IAA6B,EAAE,OAAwB;QAC5D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,gBAAgB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACnE,CAAC;IAED;;;;;;;;;;OAUG;IACH,MAAM,CAAC,EAAU,EAAE,OAAwB;QACzC,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAA,WAAI,EAAA,kBAAkB,EAAE,EAAE,EAAE;YACrD,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;CACF;AAxDD,oCAwDC"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../core/resource.mjs";
|
|
3
|
+
import { buildHeaders } from "../internal/headers.mjs";
|
|
4
|
+
import { path } from "../internal/utils/path.mjs";
|
|
5
|
+
export class ClientTokens extends APIResource {
|
|
6
|
+
/**
|
|
7
|
+
* Create a short-lived client token for browser SDK use.
|
|
8
|
+
*
|
|
9
|
+
* **Use case:** Your backend calls this endpoint to generate a token, then passes
|
|
10
|
+
* it to your frontend. The frontend uses the token to make authenticated requests
|
|
11
|
+
* to `/client/*` endpoints.
|
|
12
|
+
*
|
|
13
|
+
* **Context types:**
|
|
14
|
+
*
|
|
15
|
+
* - `context`: Public data accessible to the client via `/client/context`
|
|
16
|
+
* - `serverContext`: Private data only accessible to agents/handlers (never
|
|
17
|
+
* exposed to client)
|
|
18
|
+
*
|
|
19
|
+
* **Security:**
|
|
20
|
+
*
|
|
21
|
+
* - Tokens are short-lived (default 1 hour, max 24 hours)
|
|
22
|
+
* - Both context types are trusted and cannot be tampered with
|
|
23
|
+
* - Store the token securely - it will only be shown once
|
|
24
|
+
*
|
|
25
|
+
* **Example flow:**
|
|
26
|
+
*
|
|
27
|
+
* 1. User logs in to your app
|
|
28
|
+
* 2. Your backend calls `POST /v1/client-tokens` with
|
|
29
|
+
* `{ context: { userId: "user_123" }, serverContext: { internalId: "int_456" } }`
|
|
30
|
+
* 3. Your backend returns the token to your frontend
|
|
31
|
+
* 4. Frontend uses the token to call `/client/*` endpoints
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* ```ts
|
|
35
|
+
* const clientToken = await client.clientTokens.create({
|
|
36
|
+
* context: { userId: 'user_123', sessionId: 'sess_abc' },
|
|
37
|
+
* });
|
|
38
|
+
* ```
|
|
39
|
+
*/
|
|
40
|
+
create(body, options) {
|
|
41
|
+
return this._client.post('/client-tokens', { body, ...options });
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Revoke a client token immediately.
|
|
45
|
+
*
|
|
46
|
+
* Once revoked, the token can no longer be used for authentication. This is a soft
|
|
47
|
+
* delete - the token record is kept for audit purposes.
|
|
48
|
+
*
|
|
49
|
+
* @example
|
|
50
|
+
* ```ts
|
|
51
|
+
* await client.clientTokens.revoke('x');
|
|
52
|
+
* ```
|
|
53
|
+
*/
|
|
54
|
+
revoke(id, options) {
|
|
55
|
+
return this._client.delete(path `/client-tokens/${id}`, {
|
|
56
|
+
...options,
|
|
57
|
+
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
//# sourceMappingURL=client-tokens.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client-tokens.mjs","sourceRoot":"","sources":["../src/resources/client-tokens.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAEf,EAAE,YAAY,EAAE;OAEhB,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,YAAa,SAAQ,WAAW;IAC3C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAiCG;IACH,MAAM,CAAC,IAA6B,EAAE,OAAwB;QAC5D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,gBAAgB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACnE,CAAC;IAED;;;;;;;;;;OAUG;IACH,MAAM,CAAC,EAAU,EAAE,OAAwB;QACzC,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAA,kBAAkB,EAAE,EAAE,EAAE;YACrD,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;CACF"}
|
package/resources/index.d.mts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
export { Agents, type Context, type StreamChunk, type AgentChatResponse, type AgentInvokeResponse, type AgentChatParams, type AgentChatParamsNonStreaming, type AgentChatParamsStreaming, type AgentInvokeParams, type AgentInvokeParamsNonStreaming, type AgentInvokeParamsStreaming, } from "./agents.mjs";
|
|
2
|
-
export {
|
|
3
|
-
export { Projects, type
|
|
4
|
-
export { Secrets } from "./secrets.mjs";
|
|
1
|
+
export { Agents, type ChatMessage, type Context, type StreamChunk, type AgentChatResponse, type AgentInvokeResponse, type AgentChatParams, type AgentChatParamsNonStreaming, type AgentChatParamsStreaming, type AgentInvokeParams, type AgentInvokeParamsNonStreaming, type AgentInvokeParamsStreaming, } from "./agents.mjs";
|
|
2
|
+
export { ClientTokens, type ClientTokenCreateResponse, type ClientTokenCreateParams } from "./client-tokens.mjs";
|
|
3
|
+
export { Projects, type PaginationCursor, type Project } from "./projects.mjs";
|
|
5
4
|
//# sourceMappingURL=index.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"OAEO,EACL,MAAM,EACN,KAAK,OAAO,EACZ,KAAK,WAAW,EAChB,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,eAAe,EACpB,KAAK,2BAA2B,EAChC,KAAK,wBAAwB,EAC7B,KAAK,iBAAiB,EACtB,KAAK,6BAA6B,EAClC,KAAK,0BAA0B,GAChC;OACM,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"OAEO,EACL,MAAM,EACN,KAAK,WAAW,EAChB,KAAK,OAAO,EACZ,KAAK,WAAW,EAChB,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,eAAe,EACpB,KAAK,2BAA2B,EAChC,KAAK,wBAAwB,EAC7B,KAAK,iBAAiB,EACtB,KAAK,6BAA6B,EAClC,KAAK,0BAA0B,GAChC;OACM,EAAE,YAAY,EAAE,KAAK,yBAAyB,EAAE,KAAK,uBAAuB,EAAE;OAC9E,EAAE,QAAQ,EAAE,KAAK,gBAAgB,EAAE,KAAK,OAAO,EAAE"}
|
package/resources/index.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
export { Agents, type Context, type StreamChunk, type AgentChatResponse, type AgentInvokeResponse, type AgentChatParams, type AgentChatParamsNonStreaming, type AgentChatParamsStreaming, type AgentInvokeParams, type AgentInvokeParamsNonStreaming, type AgentInvokeParamsStreaming, } from "./agents.js";
|
|
2
|
-
export {
|
|
3
|
-
export { Projects, type
|
|
4
|
-
export { Secrets } from "./secrets.js";
|
|
1
|
+
export { Agents, type ChatMessage, type Context, type StreamChunk, type AgentChatResponse, type AgentInvokeResponse, type AgentChatParams, type AgentChatParamsNonStreaming, type AgentChatParamsStreaming, type AgentInvokeParams, type AgentInvokeParamsNonStreaming, type AgentInvokeParamsStreaming, } from "./agents.js";
|
|
2
|
+
export { ClientTokens, type ClientTokenCreateResponse, type ClientTokenCreateParams } from "./client-tokens.js";
|
|
3
|
+
export { Projects, type PaginationCursor, type Project } from "./projects.js";
|
|
5
4
|
//# sourceMappingURL=index.d.ts.map
|
package/resources/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"OAEO,EACL,MAAM,EACN,KAAK,OAAO,EACZ,KAAK,WAAW,EAChB,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,eAAe,EACpB,KAAK,2BAA2B,EAChC,KAAK,wBAAwB,EAC7B,KAAK,iBAAiB,EACtB,KAAK,6BAA6B,EAClC,KAAK,0BAA0B,GAChC;OACM,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"OAEO,EACL,MAAM,EACN,KAAK,WAAW,EAChB,KAAK,OAAO,EACZ,KAAK,WAAW,EAChB,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,eAAe,EACpB,KAAK,2BAA2B,EAChC,KAAK,wBAAwB,EAC7B,KAAK,iBAAiB,EACtB,KAAK,6BAA6B,EAClC,KAAK,0BAA0B,GAChC;OACM,EAAE,YAAY,EAAE,KAAK,yBAAyB,EAAE,KAAK,uBAAuB,EAAE;OAC9E,EAAE,QAAQ,EAAE,KAAK,gBAAgB,EAAE,KAAK,OAAO,EAAE"}
|
package/resources/index.js
CHANGED
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.
|
|
4
|
+
exports.Projects = exports.ClientTokens = exports.Agents = void 0;
|
|
5
5
|
var agents_1 = require("./agents.js");
|
|
6
6
|
Object.defineProperty(exports, "Agents", { enumerable: true, get: function () { return agents_1.Agents; } });
|
|
7
|
-
var
|
|
8
|
-
Object.defineProperty(exports, "
|
|
7
|
+
var client_tokens_1 = require("./client-tokens.js");
|
|
8
|
+
Object.defineProperty(exports, "ClientTokens", { enumerable: true, get: function () { return client_tokens_1.ClientTokens; } });
|
|
9
9
|
var projects_1 = require("./projects.js");
|
|
10
10
|
Object.defineProperty(exports, "Projects", { enumerable: true, get: function () { return projects_1.Projects; } });
|
|
11
|
-
var secrets_1 = require("./secrets.js");
|
|
12
|
-
Object.defineProperty(exports, "Secrets", { enumerable: true, get: function () { return secrets_1.Secrets; } });
|
|
13
11
|
//# sourceMappingURL=index.js.map
|
package/resources/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,sCAakB;AAZhB,gGAAA,MAAM,OAAA;AAaR,oDAA6G;AAApG,6GAAA,YAAY,OAAA;AACrB,0CAA2E;AAAlE,oGAAA,QAAQ,OAAA"}
|
package/resources/index.mjs
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
export { Agents, } from "./agents.mjs";
|
|
3
|
-
export {
|
|
3
|
+
export { ClientTokens } from "./client-tokens.mjs";
|
|
4
4
|
export { Projects } from "./projects.mjs";
|
|
5
|
-
export { Secrets } from "./secrets.mjs";
|
|
6
5
|
//# sourceMappingURL=index.mjs.map
|
package/resources/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EACL,MAAM,
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EACL,MAAM,GAYP;OACM,EAAE,YAAY,EAAgE;OAC9E,EAAE,QAAQ,EAAuC"}
|
package/resources/projects.d.mts
CHANGED
|
@@ -16,9 +16,19 @@ export declare class Projects extends APIResource {
|
|
|
16
16
|
* This endpoint is useful for verifying your API key is valid and retrieving
|
|
17
17
|
* project details.
|
|
18
18
|
*/
|
|
19
|
-
retrieveCurrent(options?: RequestOptions): APIPromise<
|
|
19
|
+
retrieveCurrent(options?: RequestOptions): APIPromise<Project>;
|
|
20
20
|
}
|
|
21
|
-
export interface
|
|
21
|
+
export interface PaginationCursor {
|
|
22
|
+
/**
|
|
23
|
+
* Whether there are more results available
|
|
24
|
+
*/
|
|
25
|
+
hasMore: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Cursor for the next page of results. Null if there are no more results.
|
|
28
|
+
*/
|
|
29
|
+
nextCursor: string | null;
|
|
30
|
+
}
|
|
31
|
+
export interface Project {
|
|
22
32
|
/**
|
|
23
33
|
* Unique identifier for the project
|
|
24
34
|
*/
|
|
@@ -34,7 +44,7 @@ export interface ProjectRetrieveCurrentResponse {
|
|
|
34
44
|
/**
|
|
35
45
|
* Organization that owns this project
|
|
36
46
|
*/
|
|
37
|
-
organization:
|
|
47
|
+
organization: Project.Organization;
|
|
38
48
|
/**
|
|
39
49
|
* ID of the organization that owns this project
|
|
40
50
|
*/
|
|
@@ -48,7 +58,7 @@ export interface ProjectRetrieveCurrentResponse {
|
|
|
48
58
|
*/
|
|
49
59
|
updatedAt: string;
|
|
50
60
|
}
|
|
51
|
-
export declare namespace
|
|
61
|
+
export declare namespace Project {
|
|
52
62
|
/**
|
|
53
63
|
* Organization that owns this project
|
|
54
64
|
*/
|
|
@@ -68,6 +78,6 @@ export declare namespace ProjectRetrieveCurrentResponse {
|
|
|
68
78
|
}
|
|
69
79
|
}
|
|
70
80
|
export declare namespace Projects {
|
|
71
|
-
export { type
|
|
81
|
+
export { type PaginationCursor as PaginationCursor, type Project as Project };
|
|
72
82
|
}
|
|
73
83
|
//# sourceMappingURL=projects.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"projects.d.mts","sourceRoot":"","sources":["../src/resources/projects.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB,qBAAa,QAAS,SAAQ,WAAW;IACvC;;;;;;;;;;;;;OAaG;IACH,eAAe,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,
|
|
1
|
+
{"version":3,"file":"projects.d.mts","sourceRoot":"","sources":["../src/resources/projects.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB,qBAAa,QAAS,SAAQ,WAAW;IACvC;;;;;;;;;;;;;OAaG;IACH,eAAe,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,OAAO,CAAC;CAG/D;AAED,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;IAEjB;;OAEG;IACH,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B;AAED,MAAM,WAAW,OAAO;IACtB;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,YAAY,EAAE,OAAO,CAAC,YAAY,CAAC;IAEnC;;OAEG;IACH,cAAc,EAAE,MAAM,CAAC;IAEvB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,yBAAiB,OAAO,CAAC;IACvB;;OAEG;IACH,UAAiB,YAAY;QAC3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