@amigo-ai/sdk 0.9.0 → 0.11.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 CHANGED
@@ -44,6 +44,14 @@ async function example() {
44
44
  example()
45
45
  ```
46
46
 
47
+ ## Examples
48
+
49
+ - **Conversation management**:
50
+ - [Basic conversation](examples/conversation/basic-conversation.ts)
51
+ - [Streaming conversation events](examples/conversation/conversation-events.ts)
52
+ - **User management**:
53
+ - [User management examples](examples/user/user-management.ts)
54
+
47
55
  ## Configuration
48
56
 
49
57
  The SDK requires the following configuration parameters:
@@ -68,6 +76,34 @@ For detailed instructions on generating API keys, see the [Authentication Guide]
68
76
 
69
77
  This SDK auto-generates its types from the latest Amigo OpenAPI schema. As a result, only the latest published SDK version is guaranteed to match the current API. If you pin to an older version, it may not include the newest endpoints or fields.
70
78
 
79
+ ## Generated types
80
+
81
+ The SDK ships with TypeScript types generated from the latest OpenAPI schema and re-exports them for convenience.
82
+
83
+ - **Importing types**:
84
+
85
+ ```typescript
86
+ import type { components, operations, paths } from '@amigo-ai/sdk'
87
+
88
+ // Example: response types
89
+ type Conversation = components['schemas']['Conversation']
90
+
91
+ // Example: operation params
92
+ type GetConversationsParams = operations['getConversations']['parameters']['query']
93
+ ```
94
+
95
+ ## Retries
96
+
97
+ The HTTP client includes sensible, configurable retries:
98
+
99
+ - **Defaults**:
100
+ - max attempts: 3
101
+ - backoff base: 250ms (exponential with full jitter)
102
+ - max delay per attempt: 30s
103
+ - retry on status: {408, 429, 500, 502, 503, 504}
104
+ - retry on methods: {GET}
105
+ - special-case: POST is retried on 429 when `Retry-After` is present
106
+
71
107
  ## Error Handling
72
108
 
73
109
  The SDK provides typed error handling:
@@ -5240,13 +5240,14 @@ export interface components {
5240
5240
  [key: string]: unknown;
5241
5241
  };
5242
5242
  /**
5243
- * Tool Branch Name
5244
- * @description The name of the branch in the tool repository that this version corresponds to.
5243
+ * Tool Repo
5244
+ * @description Whether this tool is published from the main repository or the team-specific repository.
5245
+ * @enum {string}
5245
5246
  */
5246
- tool_branch_name: string;
5247
+ tool_repo: "main" | "team";
5247
5248
  /**
5248
5249
  * Tool Commit Hash
5249
- * @description The commit hash of the tool within the `tool_branch_name`.
5250
+ * @description The commit hash of the tool within the repository.
5250
5251
  */
5251
5252
  tool_commit_hash: string;
5252
5253
  /**
@@ -7949,12 +7950,12 @@ export interface components {
7949
7950
  /** Request */
7950
7951
  tool__publish_tool_version__Request: {
7951
7952
  /**
7952
- * Branch
7953
- * @description The branch of the tools repo to publish the tool version from. If `team`, then it's published from the release branch of the organization's
7954
- * Azure DevOps team. If `main`, then it's published from the main branch of the tools repo.
7953
+ * Repo
7954
+ * @description The repo to publish the tool version from. If `team`, then it's published from the repo of the organization's Azure DevOps team. If `main`, then it's published
7955
+ * from the `tools-main` repo.
7955
7956
  * @enum {string}
7956
7957
  */
7957
- branch: "main" | "team";
7958
+ repo: "main" | "team";
7958
7959
  /**
7959
7960
  * Project Path
7960
7961
  * @description The directory in the tools repo that contains the `pyproject.toml` file corresponding to the tool version to publish.
@@ -8359,7 +8360,7 @@ export interface operations {
8359
8360
  };
8360
8361
  content?: never;
8361
8362
  };
8362
- /** @description Conflicts with existing organization with the same `org_id`. */
8363
+ /** @description Conflicts with existing organization with the same `org_id`, or a related operation is in progress. */
8363
8364
  409: {
8364
8365
  headers: {
8365
8366
  [name: string]: unknown;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@amigo-ai/sdk",
3
- "version": "0.9.0",
3
+ "version": "0.11.0",
4
4
  "description": "Amigo TypeScript SDK",
5
5
  "publishConfig": {
6
6
  "access": "public"