openai 6.41.0 → 6.43.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 (81) hide show
  1. package/CHANGELOG.md +30 -1
  2. package/README.md +1 -1
  3. package/lib/AbstractChatCompletionRunner.d.mts.map +1 -1
  4. package/lib/AbstractChatCompletionRunner.d.ts.map +1 -1
  5. package/lib/AbstractChatCompletionRunner.js +6 -1
  6. package/lib/AbstractChatCompletionRunner.js.map +1 -1
  7. package/lib/AbstractChatCompletionRunner.mjs +6 -1
  8. package/lib/AbstractChatCompletionRunner.mjs.map +1 -1
  9. package/package.json +2 -11
  10. package/resources/admin/organization/admin-api-keys.d.mts +9 -0
  11. package/resources/admin/organization/admin-api-keys.d.mts.map +1 -1
  12. package/resources/admin/organization/admin-api-keys.d.ts +9 -0
  13. package/resources/admin/organization/admin-api-keys.d.ts.map +1 -1
  14. package/resources/admin/organization/audit-logs.d.mts +113 -3
  15. package/resources/admin/organization/audit-logs.d.mts.map +1 -1
  16. package/resources/admin/organization/audit-logs.d.ts +113 -3
  17. package/resources/admin/organization/audit-logs.d.ts.map +1 -1
  18. package/resources/admin/organization/projects/index.d.mts +1 -1
  19. package/resources/admin/organization/projects/index.d.mts.map +1 -1
  20. package/resources/admin/organization/projects/index.d.ts +1 -1
  21. package/resources/admin/organization/projects/index.d.ts.map +1 -1
  22. package/resources/admin/organization/projects/index.js.map +1 -1
  23. package/resources/admin/organization/projects/index.mjs.map +1 -1
  24. package/resources/admin/organization/projects/projects.d.mts +2 -2
  25. package/resources/admin/organization/projects/projects.d.mts.map +1 -1
  26. package/resources/admin/organization/projects/projects.d.ts +2 -2
  27. package/resources/admin/organization/projects/projects.d.ts.map +1 -1
  28. package/resources/admin/organization/projects/projects.js.map +1 -1
  29. package/resources/admin/organization/projects/projects.mjs.map +1 -1
  30. package/resources/admin/organization/projects/spend-alerts.d.mts +20 -1
  31. package/resources/admin/organization/projects/spend-alerts.d.mts.map +1 -1
  32. package/resources/admin/organization/projects/spend-alerts.d.ts +20 -1
  33. package/resources/admin/organization/projects/spend-alerts.d.ts.map +1 -1
  34. package/resources/admin/organization/projects/spend-alerts.js +19 -0
  35. package/resources/admin/organization/projects/spend-alerts.js.map +1 -1
  36. package/resources/admin/organization/projects/spend-alerts.mjs +19 -0
  37. package/resources/admin/organization/projects/spend-alerts.mjs.map +1 -1
  38. package/resources/admin/organization/spend-alerts.d.mts +12 -0
  39. package/resources/admin/organization/spend-alerts.d.mts.map +1 -1
  40. package/resources/admin/organization/spend-alerts.d.ts +12 -0
  41. package/resources/admin/organization/spend-alerts.d.ts.map +1 -1
  42. package/resources/admin/organization/spend-alerts.js +17 -0
  43. package/resources/admin/organization/spend-alerts.js.map +1 -1
  44. package/resources/admin/organization/spend-alerts.mjs +17 -0
  45. package/resources/admin/organization/spend-alerts.mjs.map +1 -1
  46. package/resources/chat/completions/completions.d.mts +350 -1
  47. package/resources/chat/completions/completions.d.mts.map +1 -1
  48. package/resources/chat/completions/completions.d.ts +350 -1
  49. package/resources/chat/completions/completions.d.ts.map +1 -1
  50. package/resources/chat/completions/completions.js.map +1 -1
  51. package/resources/chat/completions/completions.mjs.map +1 -1
  52. package/resources/responses/input-tokens.d.mts +6 -5
  53. package/resources/responses/input-tokens.d.mts.map +1 -1
  54. package/resources/responses/input-tokens.d.ts +6 -5
  55. package/resources/responses/input-tokens.d.ts.map +1 -1
  56. package/resources/responses/responses.d.mts +159 -2
  57. package/resources/responses/responses.d.mts.map +1 -1
  58. package/resources/responses/responses.d.ts +159 -2
  59. package/resources/responses/responses.d.ts.map +1 -1
  60. package/resources/responses/responses.js.map +1 -1
  61. package/resources/responses/responses.mjs.map +1 -1
  62. package/resources/shared.d.mts +6 -0
  63. package/resources/shared.d.mts.map +1 -1
  64. package/resources/shared.d.ts +6 -0
  65. package/resources/shared.d.ts.map +1 -1
  66. package/src/lib/AbstractChatCompletionRunner.ts +6 -1
  67. package/src/resources/admin/organization/admin-api-keys.ts +11 -0
  68. package/src/resources/admin/organization/audit-logs.ts +148 -1
  69. package/src/resources/admin/organization/projects/index.ts +1 -0
  70. package/src/resources/admin/organization/projects/projects.ts +2 -0
  71. package/src/resources/admin/organization/projects/spend-alerts.ts +32 -0
  72. package/src/resources/admin/organization/spend-alerts.ts +18 -0
  73. package/src/resources/chat/completions/completions.ts +382 -1
  74. package/src/resources/responses/input-tokens.ts +6 -5
  75. package/src/resources/responses/responses.ts +172 -2
  76. package/src/resources/shared.ts +7 -0
  77. package/src/version.ts +1 -1
  78. package/version.d.mts +1 -1
  79. package/version.d.ts +1 -1
  80. package/version.js +1 -1
  81. package/version.mjs +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"shared.d.mts","sourceRoot":"","sources":["../src/resources/shared.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,SAAS,GACjB,CAAC,MAAM,GAAG,EAAE,CAAC,GACb,SAAS,GACT,QAAQ,GACR,mBAAmB,GACnB,QAAQ,GACR,mBAAmB,GACnB,kBAAkB,GAClB,6BAA6B,GAC7B,uBAAuB,GACvB,kCAAkC,GAClC,sBAAsB,GACtB,iCAAiC,GACjC,aAAa,GACb,WAAW,GACX,sBAAsB,GACtB,mBAAmB,CAAC;AAExB,MAAM,MAAM,SAAS,GACjB,SAAS,GACT,cAAc,GACd,cAAc,GACd,yBAAyB,GACzB,yBAAyB,GACzB,qBAAqB,GACrB,SAAS,GACT,oBAAoB,GACpB,qBAAqB,GACrB,aAAa,GACb,wBAAwB,GACxB,SAAS,GACT,oBAAoB,GACpB,eAAe,GACf,cAAc,GACd,qBAAqB,GACrB,OAAO,GACP,YAAY,GACZ,YAAY,GACZ,kBAAkB,GAClB,uBAAuB,GACvB,uBAAuB,GACvB,mBAAmB,GACnB,SAAS,GACT,cAAc,GACd,cAAc,GACd,oBAAoB,GACpB,yBAAyB,GACzB,yBAAyB,GACzB,SAAS,GACT,oBAAoB,GACpB,IAAI,GACJ,eAAe,GACf,SAAS,GACT,oBAAoB,GACpB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uBAAuB,GACvB,kCAAkC,GAClC,sBAAsB,GACtB,iCAAiC,GACjC,aAAa,GACb,WAAW,GACX,sBAAsB,GACtB,mBAAmB,CAAC"}
1
+ {"version":3,"file":"shared.d.mts","sourceRoot":"","sources":["../src/resources/shared.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,SAAS,GACjB,CAAC,MAAM,GAAG,EAAE,CAAC,GACb,SAAS,GACT,QAAQ,GACR,mBAAmB,GACnB,QAAQ,GACR,mBAAmB,GACnB,kBAAkB,GAClB,6BAA6B,GAC7B,uBAAuB,GACvB,kCAAkC,GAClC,sBAAsB,GACtB,iCAAiC,GACjC,aAAa,GACb,WAAW,GACX,sBAAsB,GACtB,mBAAmB,CAAC;AAExB,MAAM,MAAM,SAAS,GACjB,SAAS,GACT,cAAc,GACd,cAAc,GACd,yBAAyB,GACzB,yBAAyB,GACzB,qBAAqB,GACrB,SAAS,GACT,oBAAoB,GACpB,qBAAqB,GACrB,aAAa,GACb,wBAAwB,GACxB,SAAS,GACT,oBAAoB,GACpB,eAAe,GACf,cAAc,GACd,qBAAqB,GACrB,OAAO,GACP,YAAY,GACZ,YAAY,GACZ,kBAAkB,GAClB,uBAAuB,GACvB,uBAAuB,GACvB,mBAAmB,GACnB,SAAS,GACT,cAAc,GACd,cAAc,GACd,oBAAoB,GACpB,yBAAyB,GACzB,yBAAyB,GACzB,SAAS,GACT,oBAAoB,GACpB,IAAI,GACJ,eAAe,GACf,SAAS,GACT,oBAAoB,GACpB,IAAI,GACJ,eAAe,GACf,YAAY,GACZ,uBAAuB,GACvB,SAAS,GACT,oBAAoB,GACpB,QAAQ,GACR,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,sBAAsB,GACtB,iCAAiC,GACjC,iCAAiC,GACjC,iCAAiC,GACjC,2BAA2B,GAC3B,sCAAsC,GACtC,uBAAuB,GACvB,4BAA4B,GAC5B,kCAAkC,GAClC,uCAAuC,GACvC,mBAAmB,GACnB,mBAAmB,GACnB,aAA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IG;AACH,MAAM,WAAW,wBAAwB;IACvC;;OAEG;IACH,IAAI,EAAE,aAAa,CAAC;CACrB;AAED;;;;GAIG;AACH,MAAM,WAAW,wBAAwB;IACvC;;OAEG;IACH,WAAW,EAAE,wBAAwB,CAAC,UAAU,CAAC;IAEjD;;OAEG;IACH,IAAI,EAAE,aAAa,CAAC;CACrB;AAED,yBAAiB,wBAAwB,CAAC;IACxC;;OAEG;IACH,UAAiB,UAAU;QACzB;;;WAGG;QACH,IAAI,EAAE,MAAM,CAAC;QAEb;;;WAGG;QACH,WAAW,CAAC,EAAE,MAAM,CAAC;QAErB;;;WAGG;QACH,MAAM,CAAC,EAAE;YAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;SAAE,CAAC;QAEpC;;;;;;WAMG;QACH,MAAM,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;KACzB;CACF;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;;GAGG;AACH,MAAM,WAAW,yBAAyB;IACxC;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,IAAI,EAAE,SAAS,CAAC;CACjB;AAED;;;;GAIG;AACH,MAAM,WAAW,wBAAwB;IACvC;;OAEG;IACH,IAAI,EAAE,QAAQ,CAAC;CAChB;AAED,MAAM,MAAM,cAAc,GACtB,CAAC,MAAM,GAAG,EAAE,CAAC,GACb,SAAS,GACT,QAAQ,GACR,mBAAmB,GACnB,QAAQ,GACR,mBAAmB,GACnB,kBAAkB,GAClB,6BAA6B,GAC7B,uBAAuB,GACvB,kCAAkC,GAClC,sBAAsB,GACtB,iCAAiC,GACjC,aAAa,GACb,WAAW,GACX,sBAAsB,GACtB,mBAAmB,CAAC"}
@@ -142,6 +142,12 @@ export type OAuthErrorCode = 'invalid_grant' | 'invalid_subject_token' | (string
142
142
  * [reasoning models](https://platform.openai.com/docs/guides/reasoning).
143
143
  */
144
144
  export interface Reasoning {
145
+ /**
146
+ * Controls which reasoning items are rendered back to the model on later turns.
147
+ * When returned on a response, this is the effective reasoning context mode used
148
+ * for the response.
149
+ */
150
+ context?: 'auto' | 'current_turn' | 'all_turns' | null;
145
151
  /**
146
152
  * Constrains effort on reasoning for
147
153
  * [reasoning models](https://platform.openai.com/docs/guides/reasoning). Currently
@@ -1 +1 @@
1
- {"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../src/resources/shared.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,SAAS,GACjB,CAAC,MAAM,GAAG,EAAE,CAAC,GACb,SAAS,GACT,QAAQ,GACR,mBAAmB,GACnB,QAAQ,GACR,mBAAmB,GACnB,kBAAkB,GAClB,6BAA6B,GAC7B,uBAAuB,GACvB,kCAAkC,GAClC,sBAAsB,GACtB,iCAAiC,GACjC,aAAa,GACb,WAAW,GACX,sBAAsB,GACtB,mBAAmB,CAAC;AAExB,MAAM,MAAM,SAAS,GACjB,SAAS,GACT,cAAc,GACd,cAAc,GACd,yBAAyB,GACzB,yBAAyB,GACzB,qBAAqB,GACrB,SAAS,GACT,oBAAoB,GACpB,qBAAqB,GACrB,aAAa,GACb,wBAAwB,GACxB,SAAS,GACT,oBAAoB,GACpB,eAAe,GACf,cAAc,GACd,qBAAqB,GACrB,OAAO,GACP,YAAY,GACZ,YAAY,GACZ,kBAAkB,GAClB,uBAAuB,GACvB,uBAAuB,GACvB,mBAAmB,GACnB,SAAS,GACT,cAAc,GACd,cAAc,GACd,oBAAoB,GACpB,yBAAyB,GACzB,yBAAyB,GACzB,SAAS,GACT,oBAAoB,GACpB,IAAI,GACJ,eAAe,GACf,SAAS,GACT,oBAAoB,GACpB,IAAI,GACJ,eAAe,GACf,YAAY,GACZ,uBAAuB,GACvB,SAAS,GACT,oBAAoB,GACpB,QAAQ,GACR,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,sBAAsB,GACtB,iCAAiC,GACjC,iCAAiC,GACjC,iCA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,GAAG,OAAO,GAAG,IAAI,CAAC;AAE9F;;;;GAIG;AACH,MAAM,WAAW,wBAAwB;IACvC;;OAEG;IACH,IAAI,EAAE,aAAa,CAAC;CACrB;AAED;;;;GAIG;AACH,MAAM,WAAW,wBAAwB;IACvC;;OAEG;IACH,WAAW,EAAE,wBAAwB,CAAC,UAAU,CAAC;IAEjD;;OAEG;IACH,IAAI,EAAE,aAAa,CAAC;CACrB;AAED,yBAAiB,wBAAwB,CAAC;IACxC;;OAEG;IACH,UAAiB,UAAU;QACzB;;;WAGG;QACH,IAAI,EAAE,MAAM,CAAC;QAEb;;;WAGG;QACH,WAAW,CAAC,EAAE,MAAM,CAAC;QAErB;;;WAGG;QACH,MAAM,CAAC,EAAE;YAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;SAAE,CAAC;QAEpC;;;;;;WAMG;QACH,MAAM,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;KACzB;CACF;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;;GAGG;AACH,MAAM,WAAW,yBAAyB;IACxC;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,IAAI,EAAE,SAAS,CAAC;CACjB;AAED;;;;GAIG;AACH,MAAM,WAAW,wBAAwB;IACvC;;OAEG;IACH,IAAI,EAAE,QAAQ,CAAC;CAChB;AAED,MAAM,MAAM,cAAc,GACtB,CAAC,MAAM,GAAG,EAAE,CAAC,GACb,SAAS,GACT,QAAQ,GACR,mBAAmB,GACnB,QAAQ,GACR,mBAAmB,GACnB,kBAAkB,GAClB,6BAA6B,GAC7B,uBAAuB,GACvB,kCAAkC,GAClC,sBAAsB,GACtB,iCAAiC,GACjC,aAAa,GACb,WAAW,GACX,sBAAsB,GACtB,mBAAmB,CAAC"}
1
+ {"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../src/resources/shared.ts"],"names":[],"mapp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D;;OAEG;IACH,IAAI,EAAE,aAAa,CAAC;CACrB;AAED,yBAAiB,wBAAwB,CAAC;IACxC;;OAEG;IACH,UAAiB,UAAU;QACzB;;;WAGG;QACH,IAAI,EAAE,MAAM,CAAC;QAEb;;;WAGG;QACH,WAAW,CAAC,EAAE,MAAM,CAAC;QAErB;;;WAGG;QACH,MAAM,CAAC,EAAE;YAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;SAAE,CAAC;QAEpC;;;;;;WAMG;QACH,MAAM,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;KACzB;CACF;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;;GAGG;AACH,MAAM,WAAW,yBAAyB;IACxC;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,IAAI,EAAE,SAAS,CAAC;CACjB;AAED;;;;GAIG;AACH,MAAM,WAAW,wBAAwB;IACvC;;OAEG;IACH,IAAI,EAAE,QAAQ,CAAC;CAChB;AAED,MAAM,MAAM,cAAc,GACtB,CAAC,MAAM,GAAG,EAAE,CAAC,GACb,SAAS,GACT,QAAQ,GACR,mBAAmB,GACnB,QAAQ,GACR,mBAAmB,GACnB,kBAAkB,GAClB,6BAA6B,GAC7B,uBAAuB,GACvB,kCAAkC,GAClC,sBAAsB,GACtB,iCAAiC,GACjC,aAAa,GACb,WAAW,GACX,sBAAsB,GACtB,mBAAmB,CAAC"}
@@ -125,7 +125,12 @@ export class AbstractChatCompletionRunner<
125
125
  for (let i = this.messages.length - 1; i >= 0; i--) {
126
126
  const message = this.messages[i];
127
127
  if (isAssistantMessage(message) && message?.tool_calls?.length) {
128
- return message.tool_calls.filter((x) => x.type === 'function').at(-1)?.function;
128
+ for (let j = message.tool_calls.length - 1; j >= 0; j--) {
129
+ const toolCall = message.tool_calls[j];
130
+ if (toolCall?.type === 'function') {
131
+ return toolCall.function;
132
+ }
133
+ }
129
134
  }
130
135
  }
131
136
 
@@ -101,6 +101,11 @@ export interface AdminAPIKey {
101
101
  */
102
102
  created_at: number;
103
103
 
104
+ /**
105
+ * The Unix timestamp (in seconds) of when the API key expires
106
+ */
107
+ expires_at: number | null;
108
+
104
109
  /**
105
110
  * The object type, which is always `organization.admin_api_key`
106
111
  */
@@ -178,6 +183,12 @@ export interface AdminAPIKeyDeleteResponse {
178
183
 
179
184
  export interface AdminAPIKeyCreateParams {
180
185
  name: string;
186
+
187
+ /**
188
+ * The number of seconds until the API key expires. Omit this field for a key that
189
+ * does not expire.
190
+ */
191
+ expires_in_seconds?: number;
181
192
  }
182
193
 
183
194
  export interface AdminAPIKeyListParams extends CursorPageParams {
@@ -104,6 +104,8 @@ export interface AuditLogListResponse {
104
104
  | 'role.deleted'
105
105
  | 'role.assignment.created'
106
106
  | 'role.assignment.deleted'
107
+ | 'role.bound_to_resource'
108
+ | 'role.unbound_from_resource'
107
109
  | 'scim.enabled'
108
110
  | 'scim.disabled'
109
111
  | 'service_account.created'
@@ -306,6 +308,11 @@ export interface AuditLogListResponse {
306
308
  */
307
309
  'role.assignment.deleted'?: AuditLogListResponse.RoleAssignmentDeleted;
308
310
 
311
+ /**
312
+ * The details for events with this `type`.
313
+ */
314
+ 'role.bound_to_resource'?: AuditLogListResponse.RoleBoundToResource;
315
+
309
316
  /**
310
317
  * The details for events with this `type`.
311
318
  */
@@ -316,6 +323,11 @@ export interface AuditLogListResponse {
316
323
  */
317
324
  'role.deleted'?: AuditLogListResponse.RoleDeleted;
318
325
 
326
+ /**
327
+ * The details for events with this `type`.
328
+ */
329
+ 'role.unbound_from_resource'?: AuditLogListResponse.RoleUnboundFromResource;
330
+
319
331
  /**
320
332
  * The details for events with this `type`.
321
333
  */
@@ -1252,6 +1264,68 @@ export namespace AuditLogListResponse {
1252
1264
  resource_type?: string;
1253
1265
  }
1254
1266
 
1267
+ /**
1268
+ * The details for events with this `type`.
1269
+ */
1270
+ export interface RoleBoundToResource {
1271
+ /**
1272
+ * The ID of the resource the role was bound to. ChatGPT workspace connector
1273
+ * resources use `<workspace_id>__<connector_id>`.
1274
+ */
1275
+ id?: string;
1276
+
1277
+ /**
1278
+ * The connector ID for a ChatGPT workspace connector resource.
1279
+ */
1280
+ connector_id?: string;
1281
+
1282
+ /**
1283
+ * The connector display name for a ChatGPT workspace connector resource, or the
1284
+ * connector ID when the display name could not be resolved.
1285
+ */
1286
+ connector_name?: string;
1287
+
1288
+ /**
1289
+ * Whether the connector is enabled for the role.
1290
+ */
1291
+ enabled?: boolean;
1292
+
1293
+ /**
1294
+ * The permissions granted to the role for the resource.
1295
+ */
1296
+ permissions?: Array<string>;
1297
+
1298
+ /**
1299
+ * The ID of the resource the role was bound to.
1300
+ */
1301
+ resource_id?: string;
1302
+
1303
+ /**
1304
+ * The type of resource the role was bound to.
1305
+ */
1306
+ resource_type?: string;
1307
+
1308
+ /**
1309
+ * The ID of the role that was bound to the resource.
1310
+ */
1311
+ role_id?: string;
1312
+
1313
+ /**
1314
+ * The connector role mutation path that produced the event.
1315
+ */
1316
+ source?:
1317
+ | 'role_toggle'
1318
+ | 'role_connector_update'
1319
+ | 'role_delete'
1320
+ | 'workspace_permissions'
1321
+ | 'connector_publish';
1322
+
1323
+ /**
1324
+ * The workspace ID for a ChatGPT workspace connector resource.
1325
+ */
1326
+ workspace_id?: string;
1327
+ }
1328
+
1255
1329
  /**
1256
1330
  * The details for events with this `type`.
1257
1331
  */
@@ -1292,6 +1366,68 @@ export namespace AuditLogListResponse {
1292
1366
  id?: string;
1293
1367
  }
1294
1368
 
1369
+ /**
1370
+ * The details for events with this `type`.
1371
+ */
1372
+ export interface RoleUnboundFromResource {
1373
+ /**
1374
+ * The ID of the resource the role was unbound from. ChatGPT workspace connector
1375
+ * resources use `<workspace_id>__<connector_id>`.
1376
+ */
1377
+ id?: string;
1378
+
1379
+ /**
1380
+ * The connector ID for a ChatGPT workspace connector resource.
1381
+ */
1382
+ connector_id?: string;
1383
+
1384
+ /**
1385
+ * The connector display name for a ChatGPT workspace connector resource, or the
1386
+ * connector ID when the display name could not be resolved.
1387
+ */
1388
+ connector_name?: string;
1389
+
1390
+ /**
1391
+ * Whether the connector is enabled for the role.
1392
+ */
1393
+ enabled?: boolean;
1394
+
1395
+ /**
1396
+ * The permissions remaining for the role after the change.
1397
+ */
1398
+ permissions?: Array<string>;
1399
+
1400
+ /**
1401
+ * The ID of the resource the role was unbound from.
1402
+ */
1403
+ resource_id?: string;
1404
+
1405
+ /**
1406
+ * The type of resource the role was unbound from.
1407
+ */
1408
+ resource_type?: string;
1409
+
1410
+ /**
1411
+ * The ID of the role that was unbound from the resource.
1412
+ */
1413
+ role_id?: string;
1414
+
1415
+ /**
1416
+ * The connector role mutation path that produced the event.
1417
+ */
1418
+ source?:
1419
+ | 'role_toggle'
1420
+ | 'role_connector_update'
1421
+ | 'role_delete'
1422
+ | 'workspace_permissions'
1423
+ | 'connector_publish';
1424
+
1425
+ /**
1426
+ * The workspace ID for a ChatGPT workspace connector resource.
1427
+ */
1428
+ workspace_id?: string;
1429
+ }
1430
+
1295
1431
  /**
1296
1432
  * The details for events with this `type`.
1297
1433
  */
@@ -1688,6 +1824,8 @@ export interface AuditLogListParams extends ConversationCursorPageParams {
1688
1824
  | 'role.deleted'
1689
1825
  | 'role.assignment.created'
1690
1826
  | 'role.assignment.deleted'
1827
+ | 'role.bound_to_resource'
1828
+ | 'role.unbound_from_resource'
1691
1829
  | 'scim.enabled'
1692
1830
  | 'scim.disabled'
1693
1831
  | 'service_account.created'
@@ -1705,9 +1843,18 @@ export interface AuditLogListParams extends ConversationCursorPageParams {
1705
1843
 
1706
1844
  /**
1707
1845
  * Return only events performed on these targets. For example, a project ID
1708
- * updated.
1846
+ * updated. For ChatGPT connector role events, use the workspace connector resource
1847
+ * ID shown in `details.id`, such as `<workspace_id>__<connector_id>`.
1709
1848
  */
1710
1849
  resource_ids?: Array<string>;
1850
+
1851
+ /**
1852
+ * Return only tenant-scoped events associated with this organization. Required for
1853
+ * tenant-scoped events such as `role.bound_to_resource` and
1854
+ * `role.unbound_from_resource`. When `true`, all supplied event types must be
1855
+ * tenant-scoped.
1856
+ */
1857
+ tenant_only?: boolean;
1711
1858
  }
1712
1859
 
1713
1860
  export namespace AuditLogListParams {
@@ -84,6 +84,7 @@ export {
84
84
  type ProjectSpendAlert,
85
85
  type ProjectSpendAlertDeleted,
86
86
  type SpendAlertCreateParams,
87
+ type SpendAlertRetrieveParams,
87
88
  type SpendAlertUpdateParams,
88
89
  type SpendAlertListParams,
89
90
  type SpendAlertDeleteParams,
@@ -78,6 +78,7 @@ import {
78
78
  SpendAlertCreateParams,
79
79
  SpendAlertDeleteParams,
80
80
  SpendAlertListParams,
81
+ SpendAlertRetrieveParams,
81
82
  SpendAlertUpdateParams,
82
83
  SpendAlerts,
83
84
  } from './spend-alerts';
@@ -425,6 +426,7 @@ export declare namespace Projects {
425
426
  type ProjectSpendAlertDeleted as ProjectSpendAlertDeleted,
426
427
  type ProjectSpendAlertsPage as ProjectSpendAlertsPage,
427
428
  type SpendAlertCreateParams as SpendAlertCreateParams,
429
+ type SpendAlertRetrieveParams as SpendAlertRetrieveParams,
428
430
  type SpendAlertUpdateParams as SpendAlertUpdateParams,
429
431
  type SpendAlertListParams as SpendAlertListParams,
430
432
  type SpendAlertDeleteParams as SpendAlertDeleteParams,
@@ -43,6 +43,30 @@ export class SpendAlerts extends APIResource {
43
43
  });
44
44
  }
45
45
 
46
+ /**
47
+ * Retrieves a project spend alert.
48
+ *
49
+ * @example
50
+ * ```ts
51
+ * const projectSpendAlert =
52
+ * await client.admin.organization.projects.spendAlerts.retrieve(
53
+ * 'alert_id',
54
+ * { project_id: 'project_id' },
55
+ * );
56
+ * ```
57
+ */
58
+ retrieve(
59
+ alertID: string,
60
+ params: SpendAlertRetrieveParams,
61
+ options?: RequestOptions,
62
+ ): APIPromise<ProjectSpendAlert> {
63
+ const { project_id } = params;
64
+ return this._client.get(path`/organization/projects/${project_id}/spend_alerts/${alertID}`, {
65
+ ...options,
66
+ __security: { adminAPIKeyAuth: true },
67
+ });
68
+ }
69
+
46
70
  /**
47
71
  * Updates a project spend alert.
48
72
  *
@@ -250,6 +274,13 @@ export namespace SpendAlertCreateParams {
250
274
  }
251
275
  }
252
276
 
277
+ export interface SpendAlertRetrieveParams {
278
+ /**
279
+ * The ID of the project.
280
+ */
281
+ project_id: string;
282
+ }
283
+
253
284
  export interface SpendAlertUpdateParams {
254
285
  /**
255
286
  * Path param: The ID of the project to update.
@@ -325,6 +356,7 @@ export declare namespace SpendAlerts {
325
356
  type ProjectSpendAlertDeleted as ProjectSpendAlertDeleted,
326
357
  type ProjectSpendAlertsPage as ProjectSpendAlertsPage,
327
358
  type SpendAlertCreateParams as SpendAlertCreateParams,
359
+ type SpendAlertRetrieveParams as SpendAlertRetrieveParams,
328
360
  type SpendAlertUpdateParams as SpendAlertUpdateParams,
329
361
  type SpendAlertListParams as SpendAlertListParams,
330
362
  type SpendAlertDeleteParams as SpendAlertDeleteParams,
@@ -36,6 +36,24 @@ export class SpendAlerts extends APIResource {
36
36
  });
37
37
  }
38
38
 
39
+ /**
40
+ * Retrieves an organization spend alert.
41
+ *
42
+ * @example
43
+ * ```ts
44
+ * const organizationSpendAlert =
45
+ * await client.admin.organization.spendAlerts.retrieve(
46
+ * 'alert_id',
47
+ * );
48
+ * ```
49
+ */
50
+ retrieve(alertID: string, options?: RequestOptions): APIPromise<OrganizationSpendAlert> {
51
+ return this._client.get(path`/organization/spend_alerts/${alertID}`, {
52
+ ...options,
53
+ __security: { adminAPIKeyAuth: true },
54
+ });
55
+ }
56
+
39
57
  /**
40
58
  * Updates an organization spend alert.
41
59
  *