@superblocksteam/sdk-api 2.0.105-next.5 → 2.0.106-next.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.
Files changed (42) hide show
  1. package/README.md +244 -10
  2. package/dist/index.d.ts +1 -2
  3. package/dist/index.d.ts.map +1 -1
  4. package/dist/index.js +1 -1
  5. package/dist/index.js.map +1 -1
  6. package/dist/integrations/declarations.d.ts +0 -10
  7. package/dist/integrations/declarations.d.ts.map +1 -1
  8. package/dist/integrations/declarations.js +0 -9
  9. package/dist/integrations/declarations.js.map +1 -1
  10. package/dist/integrations/index.d.ts +1 -3
  11. package/dist/integrations/index.d.ts.map +1 -1
  12. package/dist/integrations/index.js +1 -2
  13. package/dist/integrations/index.js.map +1 -1
  14. package/dist/integrations/registry.d.ts +0 -1
  15. package/dist/integrations/registry.d.ts.map +1 -1
  16. package/dist/integrations/registry.js +0 -4
  17. package/dist/integrations/registry.js.map +1 -1
  18. package/dist/types.d.ts +1 -1
  19. package/package.json +1 -1
  20. package/src/index.ts +0 -3
  21. package/src/integrations/declarations.ts +0 -14
  22. package/src/integrations/groq/README.md +8 -8
  23. package/src/integrations/index.ts +0 -6
  24. package/src/integrations/perplexity/README.md +39 -48
  25. package/src/integrations/registry.ts +0 -5
  26. package/src/types.ts +1 -1
  27. package/dist/integrations/redis/client.d.ts +0 -43
  28. package/dist/integrations/redis/client.d.ts.map +0 -1
  29. package/dist/integrations/redis/client.js +0 -142
  30. package/dist/integrations/redis/client.js.map +0 -1
  31. package/dist/integrations/redis/index.d.ts +0 -8
  32. package/dist/integrations/redis/index.d.ts.map +0 -1
  33. package/dist/integrations/redis/index.js +0 -7
  34. package/dist/integrations/redis/index.js.map +0 -1
  35. package/dist/integrations/redis/types.d.ts +0 -137
  36. package/dist/integrations/redis/types.d.ts.map +0 -1
  37. package/dist/integrations/redis/types.js +0 -5
  38. package/dist/integrations/redis/types.js.map +0 -1
  39. package/src/integrations/redis/README.md +0 -200
  40. package/src/integrations/redis/client.ts +0 -208
  41. package/src/integrations/redis/index.ts +0 -8
  42. package/src/integrations/redis/types.ts +0 -167
@@ -1,167 +0,0 @@
1
- /**
2
- * Redis client types.
3
- */
4
-
5
- import type { z } from "zod";
6
-
7
- import type { BaseIntegrationClient } from "../../types.js";
8
- import type { TraceMetadata } from "../registry.js";
9
-
10
- /**
11
- * Redis client for executing commands.
12
- *
13
- * Provides typed methods for common Redis operations as well as a
14
- * generic command() method for executing raw Redis commands.
15
- *
16
- * @example
17
- * ```typescript
18
- * // Declare in api(): integrations: { redis: redis(INTEGRATION_ID) }
19
- * // In run(), access via ctx.integrations.redis
20
- *
21
- * // Typed string operations
22
- * await redis.set('user:1', 'Alice');
23
- * const name = await redis.get('user:1');
24
- *
25
- * // Typed hash operations
26
- * await redis.hset('user:1', 'name', 'Alice');
27
- * const val = await redis.hget('user:1', 'name');
28
- * const all = await redis.hgetall('user:1');
29
- *
30
- * // Key operations
31
- * await redis.del('user:1');
32
- * const userKeys = await redis.keys('user:*');
33
- *
34
- * // Raw command for anything not covered by typed methods
35
- * const result = await redis.command(
36
- * 'LRANGE mylist 0 -1',
37
- * z.array(z.string())
38
- * );
39
- * ```
40
- */
41
- export interface RedisClient extends BaseIntegrationClient {
42
- /**
43
- * Execute a raw Redis command.
44
- *
45
- * Use this for commands not covered by the typed methods.
46
- *
47
- * @param command - The Redis command string (e.g., "LRANGE mylist 0 -1")
48
- * @param schema - Zod schema for validating the result
49
- * @returns The validated result
50
- */
51
- command<T>(
52
- command: string,
53
- schema: z.ZodSchema<T>,
54
- metadata?: TraceMetadata,
55
- ): Promise<T>;
56
-
57
- /**
58
- * Get the value of a key.
59
- *
60
- * @param key - The key to get
61
- * @param metadata - Optional trace metadata for diagnostics
62
- * @returns The value, or null if the key does not exist
63
- */
64
- get(key: string, metadata?: TraceMetadata): Promise<unknown>;
65
-
66
- /**
67
- * Set the value of a key.
68
- *
69
- * @param key - The key to set
70
- * @param value - The value to set
71
- * @param expirationMs - Optional expiration time in milliseconds
72
- * @param metadata - Optional trace metadata for diagnostics
73
- * @returns The result (typically "OK")
74
- */
75
- set(
76
- key: string,
77
- value: string,
78
- expirationMs?: number,
79
- metadata?: TraceMetadata,
80
- ): Promise<unknown>;
81
-
82
- /**
83
- * Delete a key.
84
- *
85
- * @param key - The key to delete
86
- * @param metadata - Optional trace metadata for diagnostics
87
- * @returns The number of keys removed
88
- */
89
- del(key: string, metadata?: TraceMetadata): Promise<unknown>;
90
-
91
- /**
92
- * Find all keys matching a pattern.
93
- *
94
- * @param pattern - The glob-style pattern to match (e.g., "user:*")
95
- * @param metadata - Optional trace metadata for diagnostics
96
- * @returns Array of matching keys
97
- */
98
- keys(pattern: string, metadata?: TraceMetadata): Promise<unknown>;
99
-
100
- /**
101
- * Get the value of a hash field.
102
- *
103
- * @param key - The hash key
104
- * @param field - The field name
105
- * @param metadata - Optional trace metadata for diagnostics
106
- * @returns The field value, or null if the field does not exist
107
- */
108
- hget(key: string, field: string, metadata?: TraceMetadata): Promise<unknown>;
109
-
110
- /**
111
- * Set the value of a hash field.
112
- *
113
- * @param key - The hash key
114
- * @param field - The field name
115
- * @param value - The value to set
116
- * @param metadata - Optional trace metadata for diagnostics
117
- * @returns The number of fields that were added
118
- */
119
- hset(
120
- key: string,
121
- field: string,
122
- value: string,
123
- metadata?: TraceMetadata,
124
- ): Promise<unknown>;
125
-
126
- /**
127
- * Get all fields and values of a hash.
128
- *
129
- * @param key - The hash key
130
- * @param metadata - Optional trace metadata for diagnostics
131
- * @returns Object with all field-value pairs
132
- */
133
- hgetall(key: string, metadata?: TraceMetadata): Promise<unknown>;
134
-
135
- /**
136
- * Delete a hash field.
137
- *
138
- * @param key - The hash key
139
- * @param field - The field to delete
140
- * @param metadata - Optional trace metadata for diagnostics
141
- * @returns The number of fields that were removed
142
- */
143
- hdel(key: string, field: string, metadata?: TraceMetadata): Promise<unknown>;
144
-
145
- /**
146
- * Set expiration on a key.
147
- *
148
- * @param key - The key to set expiration on
149
- * @param seconds - Time to live in seconds
150
- * @param metadata - Optional trace metadata for diagnostics
151
- * @returns 1 if timeout was set, 0 if key does not exist
152
- */
153
- expire(
154
- key: string,
155
- seconds: number,
156
- metadata?: TraceMetadata,
157
- ): Promise<unknown>;
158
-
159
- /**
160
- * Get the remaining time to live of a key.
161
- *
162
- * @param key - The key to check
163
- * @param metadata - Optional trace metadata for diagnostics
164
- * @returns TTL in seconds, -2 if key does not exist, -1 if no expiration
165
- */
166
- ttl(key: string, metadata?: TraceMetadata): Promise<unknown>;
167
- }