@openrouter/sdk 1.2.103 → 1.2.105

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 (46) hide show
  1. package/esm/funcs/scimCreateSyncJob.d.ts +18 -0
  2. package/esm/funcs/scimCreateSyncJob.js +99 -0
  3. package/esm/funcs/scimGetSyncJob.d.ts +19 -0
  4. package/esm/funcs/scimGetSyncJob.js +103 -0
  5. package/esm/lib/config.d.ts +2 -2
  6. package/esm/lib/config.js +2 -2
  7. package/esm/models/baseinputsunion.d.ts +3 -2
  8. package/esm/models/baseinputsunion.js +3 -0
  9. package/esm/models/chatsystemmessage.d.ts +22 -0
  10. package/esm/models/chatsystemmessage.js +14 -0
  11. package/esm/models/configurationupdateitem.d.ts +37 -0
  12. package/esm/models/configurationupdateitem.js +33 -0
  13. package/esm/models/configurationupdatereasoning.d.ts +44 -0
  14. package/esm/models/configurationupdatereasoning.js +38 -0
  15. package/esm/models/createscimsyncjobresponse.d.ts +11 -0
  16. package/esm/models/createscimsyncjobresponse.js +15 -0
  17. package/esm/models/getscimsyncjobresponse.d.ts +11 -0
  18. package/esm/models/getscimsyncjobresponse.js +15 -0
  19. package/esm/models/index.d.ts +9 -0
  20. package/esm/models/index.js +9 -0
  21. package/esm/models/inputsunion.d.ts +5 -4
  22. package/esm/models/inputsunion.js +3 -0
  23. package/esm/models/mcpcallitem.d.ts +6 -2
  24. package/esm/models/mcpcallitem.js +2 -1
  25. package/esm/models/mcphttperror.d.ts +26 -0
  26. package/esm/models/mcphttperror.js +20 -0
  27. package/esm/models/mcpprotocolerror.d.ts +26 -0
  28. package/esm/models/mcpprotocolerror.js +20 -0
  29. package/esm/models/mcptoolcallerror.d.ts +14 -0
  30. package/esm/models/mcptoolcallerror.js +19 -0
  31. package/esm/models/mcptoolexecutionerror.d.ts +24 -0
  32. package/esm/models/mcptoolexecutionerror.js +19 -0
  33. package/esm/models/operations/createscimsyncjob.d.ts +65 -0
  34. package/esm/models/operations/createscimsyncjob.js +35 -0
  35. package/esm/models/operations/getscimsyncjob.d.ts +55 -0
  36. package/esm/models/operations/getscimsyncjob.js +21 -0
  37. package/esm/models/operations/index.d.ts +2 -0
  38. package/esm/models/operations/index.js +2 -0
  39. package/esm/models/responseserrorfield.d.ts +1 -0
  40. package/esm/models/responseserrorfield.js +1 -0
  41. package/esm/models/scimsyncjob.d.ts +57 -0
  42. package/esm/models/scimsyncjob.js +44 -0
  43. package/esm/sdk/scim.d.ts +14 -0
  44. package/esm/sdk/scim.js +20 -0
  45. package/jsr.json +1 -1
  46. package/package.json +4 -4
@@ -0,0 +1,57 @@
1
+ import * as z from "zod/v4";
2
+ import { OpenEnum } from "../types/enums.js";
3
+ import { Result as SafeParseResult } from "../types/fp.js";
4
+ import { SDKValidationError } from "./errors/sdkvalidationerror.js";
5
+ /**
6
+ * Current status of the sync job: queued, running, succeeded, or failed.
7
+ */
8
+ export declare const ScimSyncJobStatus: {
9
+ readonly Queued: "queued";
10
+ readonly Running: "running";
11
+ readonly Succeeded: "succeeded";
12
+ readonly Failed: "failed";
13
+ };
14
+ /**
15
+ * Current status of the sync job: queued, running, succeeded, or failed.
16
+ */
17
+ export type ScimSyncJobStatus = OpenEnum<typeof ScimSyncJobStatus>;
18
+ export type ScimSyncJob = {
19
+ /**
20
+ * Time when the sync job was created.
21
+ */
22
+ createdAt: string;
23
+ /**
24
+ * Number of groups deleted, when the job completed successfully.
25
+ */
26
+ deletedGroups: number | null;
27
+ /**
28
+ * Stable error message when the job failed.
29
+ */
30
+ errorMessage: string | null;
31
+ /**
32
+ * Time when synchronization finished.
33
+ */
34
+ finishedAt: string | null;
35
+ /**
36
+ * Unique identifier for the sync job.
37
+ */
38
+ id: string;
39
+ /**
40
+ * Time when synchronization started.
41
+ */
42
+ startedAt: string | null;
43
+ /**
44
+ * Current status of the sync job: queued, running, succeeded, or failed.
45
+ */
46
+ status: ScimSyncJobStatus;
47
+ /**
48
+ * Number of groups synchronized, when the job completed successfully.
49
+ */
50
+ syncedGroups: number | null;
51
+ };
52
+ /** @internal */
53
+ export declare const ScimSyncJobStatus$inboundSchema: z.ZodType<ScimSyncJobStatus, unknown>;
54
+ /** @internal */
55
+ export declare const ScimSyncJob$inboundSchema: z.ZodType<ScimSyncJob, unknown>;
56
+ export declare function scimSyncJobFromJSON(jsonString: string): SafeParseResult<ScimSyncJob, SDKValidationError>;
57
+ //# sourceMappingURL=scimsyncjob.d.ts.map
@@ -0,0 +1,44 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: c04d52fe7194
4
+ */
5
+ import * as z from "zod/v4";
6
+ import { remap as remap$ } from "../lib/primitives.js";
7
+ import { safeParse } from "../lib/schemas.js";
8
+ import * as openEnums from "../types/enums.js";
9
+ /**
10
+ * Current status of the sync job: queued, running, succeeded, or failed.
11
+ */
12
+ export const ScimSyncJobStatus = {
13
+ Queued: "queued",
14
+ Running: "running",
15
+ Succeeded: "succeeded",
16
+ Failed: "failed",
17
+ };
18
+ /** @internal */
19
+ export const ScimSyncJobStatus$inboundSchema = openEnums.inboundSchema(ScimSyncJobStatus);
20
+ /** @internal */
21
+ export const ScimSyncJob$inboundSchema = z
22
+ .object({
23
+ created_at: z.string(),
24
+ deleted_groups: z.nullable(z.int()),
25
+ error_message: z.nullable(z.string()),
26
+ finished_at: z.nullable(z.string()),
27
+ id: z.string(),
28
+ started_at: z.nullable(z.string()),
29
+ status: ScimSyncJobStatus$inboundSchema,
30
+ synced_groups: z.nullable(z.int()),
31
+ }).transform((v) => {
32
+ return remap$(v, {
33
+ "created_at": "createdAt",
34
+ "deleted_groups": "deletedGroups",
35
+ "error_message": "errorMessage",
36
+ "finished_at": "finishedAt",
37
+ "started_at": "startedAt",
38
+ "synced_groups": "syncedGroups",
39
+ });
40
+ });
41
+ export function scimSyncJobFromJSON(jsonString) {
42
+ return safeParse(jsonString, (x) => ScimSyncJob$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ScimSyncJob' from JSON`);
43
+ }
44
+ //# sourceMappingURL=scimsyncjob.js.map
package/esm/sdk/scim.d.ts CHANGED
@@ -49,5 +49,19 @@ export declare class Scim extends ClientSDK {
49
49
  listGroups(request?: operations.ListScimGroupsRequest | undefined, options?: RequestOptions): Promise<PageIterator<operations.ListScimGroupsResponse, {
50
50
  offset: number;
51
51
  }>>;
52
+ /**
53
+ * Start a SCIM directory sync
54
+ *
55
+ * @remarks
56
+ * Start a SCIM directory sync. [Management key](/docs/guides/overview/auth/management-api-keys) required.
57
+ */
58
+ createSyncJob(request?: operations.CreateScimSyncJobRequest | undefined, options?: RequestOptions): Promise<operations.CreateScimSyncJobResponse>;
59
+ /**
60
+ * Get SCIM directory sync status
61
+ *
62
+ * @remarks
63
+ * Get SCIM directory sync status. [Management key](/docs/guides/overview/auth/management-api-keys) required.
64
+ */
65
+ getSyncJob(request: operations.GetScimSyncJobRequest, options?: RequestOptions): Promise<models.GetScimSyncJobResponse>;
52
66
  }
53
67
  //# sourceMappingURL=scim.d.ts.map
package/esm/sdk/scim.js CHANGED
@@ -3,7 +3,9 @@
3
3
  * @generated-id: ecf200b1abaf
4
4
  */
5
5
  import { scimCreate } from "../funcs/scimCreate.js";
6
+ import { scimCreateSyncJob } from "../funcs/scimCreateSyncJob.js";
6
7
  import { scimDelete } from "../funcs/scimDelete.js";
8
+ import { scimGetSyncJob } from "../funcs/scimGetSyncJob.js";
7
9
  import { scimListGroups } from "../funcs/scimListGroups.js";
8
10
  import { scimListMappings } from "../funcs/scimListMappings.js";
9
11
  import { scimRead } from "../funcs/scimRead.js";
@@ -66,5 +68,23 @@ export class Scim extends ClientSDK {
66
68
  async listGroups(request, options) {
67
69
  return unwrapResultIterator(scimListGroups(this, request, options));
68
70
  }
71
+ /**
72
+ * Start a SCIM directory sync
73
+ *
74
+ * @remarks
75
+ * Start a SCIM directory sync. [Management key](/docs/guides/overview/auth/management-api-keys) required.
76
+ */
77
+ async createSyncJob(request, options) {
78
+ return unwrapAsync(scimCreateSyncJob(this, request, options));
79
+ }
80
+ /**
81
+ * Get SCIM directory sync status
82
+ *
83
+ * @remarks
84
+ * Get SCIM directory sync status. [Management key](/docs/guides/overview/auth/management-api-keys) required.
85
+ */
86
+ async getSyncJob(request, options) {
87
+ return unwrapAsync(scimGetSyncJob(this, request, options));
88
+ }
69
89
  }
70
90
  //# sourceMappingURL=scim.js.map
package/jsr.json CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  {
4
4
  "name": "@openrouter/sdk",
5
- "version": "1.2.103",
5
+ "version": "1.2.105",
6
6
  "exports": {
7
7
  ".": "./src/index.ts",
8
8
  "./models/errors": "./src/models/errors/index.ts",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openrouter/sdk",
3
- "version": "1.2.103",
3
+ "version": "1.2.105",
4
4
  "author": "OpenRouter",
5
5
  "description": "The OpenRouter TypeScript SDK is a type-safe toolkit for building AI applications with access to 400+ language models through a unified API.",
6
6
  "keywords": [
@@ -74,13 +74,13 @@
74
74
  "build": "tsc",
75
75
  "prepublishOnly": "npm run build",
76
76
  "compile": "tsc",
77
+ "postinstall": "node scripts/check-types.js || true",
77
78
  "prepare": "npm run build",
79
+ "test": "vitest --run --project unit",
80
+ "test:watch": "vitest --watch --project unit",
78
81
  "test:e2e": "vitest --run --project e2e",
79
82
  "test:transit": "exit 0",
80
83
  "typecheck": "tsc --noEmit",
81
- "postinstall": "node scripts/check-types.js || true",
82
- "test": "vitest --run --project unit",
83
- "test:watch": "vitest --watch --project unit",
84
84
  "typecheck:transit": "exit 0"
85
85
  },
86
86
  "peerDependencies": {},