@better-auth/scim 1.4.6 → 1.4.7-beta.3

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.
@@ -1,16 +1,16 @@
1
1
 
2
- > @better-auth/scim@1.4.6 build /home/runner/work/better-auth/better-auth/packages/scim
2
+ > @better-auth/scim@1.4.7-beta.3 build /home/runner/work/better-auth/better-auth/packages/scim
3
3
  > tsdown
4
4
 
5
- ℹ tsdown v0.17.0 powered by rolldown v1.0.0-beta.53
5
+ ℹ tsdown v0.17.2 powered by rolldown v1.0.0-beta.53
6
6
  ℹ config file: /home/runner/work/better-auth/better-auth/packages/scim/tsdown.config.ts
7
7
  ℹ entry: src/index.ts, src/client.ts
8
8
  ℹ tsconfig: tsconfig.json
9
9
  ℹ Build start
10
- ℹ dist/index.mjs  37.96 kB │ gzip: 7.66 kB
10
+ ℹ dist/index.mjs  37.98 kB │ gzip: 7.67 kB
11
11
  ℹ dist/client.mjs  0.15 kB │ gzip: 0.14 kB
12
- ℹ dist/client.d.mts  0.22 kB │ gzip: 0.18 kB
12
+ ℹ dist/client.d.mts  0.22 kB │ gzip: 0.19 kB
13
13
  ℹ dist/index.d.mts  0.07 kB │ gzip: 0.08 kB
14
- ℹ dist/index-CTS2LxJh.d.mts 108.41 kB │ gzip: 4.19 kB
15
- ℹ 5 files, total: 146.80 kB
16
- ✔ Build complete in 4437ms
14
+ ℹ dist/index-CT3475Nv.d.mts 108.08 kB │ gzip: 4.18 kB
15
+ ℹ 5 files, total: 146.49 kB
16
+ ✔ Build complete in 4523ms
package/dist/client.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { t as scim } from "./index-CTS2LxJh.mjs";
1
+ import { t as scim } from "./index-CT3475Nv.mjs";
2
2
 
3
3
  //#region src/client.d.ts
4
4
  declare const scimClient: () => {
@@ -109,15 +109,12 @@ declare const scim: (options?: SCIMOptions) => {
109
109
  };
110
110
  };
111
111
  }>)[];
112
- } & {
113
- use: any[];
114
112
  }, {
115
113
  scimToken: string;
116
114
  }>;
117
115
  getSCIMUser: better_call0.StrictEndpoint<"/scim/v2/Users/:userId", {
118
116
  method: "GET";
119
117
  metadata: {
120
- isAction: false;
121
118
  allowedMediaTypes: string[];
122
119
  openapi: {
123
120
  summary: string;
@@ -364,13 +361,12 @@ declare const scim: (options?: SCIMOptions) => {
364
361
  };
365
362
  };
366
363
  };
364
+ scope: "server";
367
365
  };
368
366
  use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
369
367
  authSCIMToken: string;
370
368
  scimProvider: SCIMProvider;
371
369
  }>)[];
372
- } & {
373
- use: any[];
374
370
  }, {
375
371
  id: string;
376
372
  externalId: string | undefined;
@@ -408,7 +404,6 @@ declare const scim: (options?: SCIMOptions) => {
408
404
  }, better_auth0.$strip>>>;
409
405
  }, better_auth0.$strip>;
410
406
  metadata: {
411
- isAction: false;
412
407
  allowedMediaTypes: string[];
413
408
  openapi: {
414
409
  summary: string;
@@ -655,13 +650,12 @@ declare const scim: (options?: SCIMOptions) => {
655
650
  };
656
651
  };
657
652
  };
653
+ scope: "server";
658
654
  };
659
655
  use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
660
656
  authSCIMToken: string;
661
657
  scimProvider: SCIMProvider;
662
658
  }>)[];
663
- } & {
664
- use: any[];
665
659
  }, {
666
660
  id: string;
667
661
  externalId: string | undefined;
@@ -698,7 +692,6 @@ declare const scim: (options?: SCIMOptions) => {
698
692
  }, better_auth0.$strip>>;
699
693
  }, better_auth0.$strip>;
700
694
  metadata: {
701
- isAction: false;
702
695
  allowedMediaTypes: string[];
703
696
  openapi: {
704
697
  summary: string;
@@ -871,18 +864,16 @@ declare const scim: (options?: SCIMOptions) => {
871
864
  };
872
865
  };
873
866
  };
867
+ scope: "server";
874
868
  };
875
869
  use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
876
870
  authSCIMToken: string;
877
871
  scimProvider: SCIMProvider;
878
872
  }>)[];
879
- } & {
880
- use: any[];
881
873
  }, void>;
882
874
  deleteSCIMUser: better_call0.StrictEndpoint<"/scim/v2/Users/:userId", {
883
875
  method: "DELETE";
884
876
  metadata: {
885
- isAction: false;
886
877
  allowedMediaTypes: string[];
887
878
  openapi: {
888
879
  summary: string;
@@ -1055,13 +1046,12 @@ declare const scim: (options?: SCIMOptions) => {
1055
1046
  };
1056
1047
  };
1057
1048
  };
1049
+ scope: "server";
1058
1050
  };
1059
1051
  use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
1060
1052
  authSCIMToken: string;
1061
1053
  scimProvider: SCIMProvider;
1062
1054
  }>)[];
1063
- } & {
1064
- use: any[];
1065
1055
  }, void>;
1066
1056
  updateSCIMUser: better_call0.StrictEndpoint<"/scim/v2/Users/:userId", {
1067
1057
  method: "PUT";
@@ -1079,7 +1069,6 @@ declare const scim: (options?: SCIMOptions) => {
1079
1069
  }, better_auth0.$strip>>>;
1080
1070
  }, better_auth0.$strip>;
1081
1071
  metadata: {
1082
- isAction: false;
1083
1072
  allowedMediaTypes: string[];
1084
1073
  openapi: {
1085
1074
  summary: string;
@@ -1326,13 +1315,12 @@ declare const scim: (options?: SCIMOptions) => {
1326
1315
  };
1327
1316
  };
1328
1317
  };
1318
+ scope: "server";
1329
1319
  };
1330
1320
  use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
1331
1321
  authSCIMToken: string;
1332
1322
  scimProvider: SCIMProvider;
1333
1323
  }>)[];
1334
- } & {
1335
- use: any[];
1336
1324
  }, {
1337
1325
  id: string;
1338
1326
  externalId: string | undefined;
@@ -1360,7 +1348,6 @@ declare const scim: (options?: SCIMOptions) => {
1360
1348
  filter: zod0.ZodOptional<zod0.ZodString>;
1361
1349
  }, better_auth0.$strip>>;
1362
1350
  metadata: {
1363
- isAction: false;
1364
1351
  allowedMediaTypes: string[];
1365
1352
  openapi: {
1366
1353
  summary: string;
@@ -1624,13 +1611,12 @@ declare const scim: (options?: SCIMOptions) => {
1624
1611
  };
1625
1612
  };
1626
1613
  };
1614
+ scope: "server";
1627
1615
  };
1628
1616
  use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
1629
1617
  authSCIMToken: string;
1630
1618
  scimProvider: SCIMProvider;
1631
1619
  }>)[];
1632
- } & {
1633
- use: any[];
1634
1620
  }, {
1635
1621
  schemas: string[];
1636
1622
  totalResults: number;
@@ -1661,7 +1647,6 @@ declare const scim: (options?: SCIMOptions) => {
1661
1647
  getSCIMServiceProviderConfig: better_call0.StrictEndpoint<"/scim/v2/ServiceProviderConfig", {
1662
1648
  method: "GET";
1663
1649
  metadata: {
1664
- isAction: false;
1665
1650
  allowedMediaTypes: string[];
1666
1651
  openapi: {
1667
1652
  summary: string;
@@ -1928,9 +1913,8 @@ declare const scim: (options?: SCIMOptions) => {
1928
1913
  };
1929
1914
  };
1930
1915
  };
1916
+ scope: "server";
1931
1917
  };
1932
- } & {
1933
- use: any[];
1934
1918
  }, {
1935
1919
  patch: {
1936
1920
  supported: boolean;
@@ -1965,7 +1949,6 @@ declare const scim: (options?: SCIMOptions) => {
1965
1949
  getSCIMSchemas: better_call0.StrictEndpoint<"/scim/v2/Schemas", {
1966
1950
  method: "GET";
1967
1951
  metadata: {
1968
- isAction: false;
1969
1952
  allowedMediaTypes: string[];
1970
1953
  openapi: {
1971
1954
  summary: string;
@@ -2247,9 +2230,8 @@ declare const scim: (options?: SCIMOptions) => {
2247
2230
  };
2248
2231
  };
2249
2232
  };
2233
+ scope: "server";
2250
2234
  };
2251
- } & {
2252
- use: any[];
2253
2235
  }, {
2254
2236
  totalResults: number;
2255
2237
  itemsPerPage: number;
@@ -2344,7 +2326,6 @@ declare const scim: (options?: SCIMOptions) => {
2344
2326
  getSCIMSchema: better_call0.StrictEndpoint<"/scim/v2/Schemas/:schemaId", {
2345
2327
  method: "GET";
2346
2328
  metadata: {
2347
- isAction: false;
2348
2329
  allowedMediaTypes: string[];
2349
2330
  openapi: {
2350
2331
  summary: string;
@@ -2623,9 +2604,8 @@ declare const scim: (options?: SCIMOptions) => {
2623
2604
  };
2624
2605
  };
2625
2606
  };
2607
+ scope: "server";
2626
2608
  };
2627
- } & {
2628
- use: any[];
2629
2609
  }, {
2630
2610
  meta: {
2631
2611
  location: string;
@@ -2714,7 +2694,6 @@ declare const scim: (options?: SCIMOptions) => {
2714
2694
  getSCIMResourceTypes: better_call0.StrictEndpoint<"/scim/v2/ResourceTypes", {
2715
2695
  method: "GET";
2716
2696
  metadata: {
2717
- isAction: false;
2718
2697
  allowedMediaTypes: string[];
2719
2698
  openapi: {
2720
2699
  summary: string;
@@ -2945,9 +2924,8 @@ declare const scim: (options?: SCIMOptions) => {
2945
2924
  };
2946
2925
  };
2947
2926
  };
2927
+ scope: "server";
2948
2928
  };
2949
- } & {
2950
- use: any[];
2951
2929
  }, {
2952
2930
  totalResults: number;
2953
2931
  itemsPerPage: number;
@@ -2969,7 +2947,6 @@ declare const scim: (options?: SCIMOptions) => {
2969
2947
  getSCIMResourceType: better_call0.StrictEndpoint<"/scim/v2/ResourceTypes/:resourceTypeId", {
2970
2948
  method: "GET";
2971
2949
  metadata: {
2972
- isAction: false;
2973
2950
  allowedMediaTypes: string[];
2974
2951
  openapi: {
2975
2952
  summary: string;
@@ -3183,9 +3160,8 @@ declare const scim: (options?: SCIMOptions) => {
3183
3160
  };
3184
3161
  };
3185
3162
  };
3163
+ scope: "server";
3186
3164
  };
3187
- } & {
3188
- use: any[];
3189
3165
  }, {
3190
3166
  meta: {
3191
3167
  location: string;
package/dist/index.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- import { t as scim } from "./index-CTS2LxJh.mjs";
1
+ import { t as scim } from "./index-CT3475Nv.mjs";
2
2
  export { scim };
package/dist/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import { base64Url } from "@better-auth/utils/base64";
2
2
  import { createAuthEndpoint, createAuthMiddleware, defaultKeyHasher } from "better-auth/plugins";
3
- import { APIError } from "better-auth";
3
+ import { APIError, HIDE_METADATA } from "better-auth";
4
4
  import { statusCodes } from "better-call";
5
5
  import { generateRandomString, symmetricDecrypt, symmetricEncrypt } from "better-auth/crypto";
6
6
  import { APIError as APIError$1, sessionMiddleware } from "better-auth/api";
@@ -671,7 +671,7 @@ const createSCIMUser = (authMiddleware) => createAuthEndpoint("/scim/v2/Users",
671
671
  method: "POST",
672
672
  body: APIUserSchema,
673
673
  metadata: {
674
- isAction: false,
674
+ ...HIDE_METADATA,
675
675
  allowedMediaTypes: supportedMediaTypes,
676
676
  openapi: {
677
677
  summary: "Create SCIM user.",
@@ -770,7 +770,7 @@ const updateSCIMUser = (authMiddleware) => createAuthEndpoint("/scim/v2/Users/:u
770
770
  method: "PUT",
771
771
  body: APIUserSchema,
772
772
  metadata: {
773
- isAction: false,
773
+ ...HIDE_METADATA,
774
774
  allowedMediaTypes: supportedMediaTypes,
775
775
  openapi: {
776
776
  summary: "Update SCIM user.",
@@ -816,7 +816,7 @@ const listSCIMUsers = (authMiddleware) => createAuthEndpoint("/scim/v2/Users", {
816
816
  method: "GET",
817
817
  query: listSCIMUsersQuerySchema,
818
818
  metadata: {
819
- isAction: false,
819
+ ...HIDE_METADATA,
820
820
  allowedMediaTypes: supportedMediaTypes,
821
821
  openapi: {
822
822
  summary: "List SCIM users",
@@ -893,7 +893,7 @@ const listSCIMUsers = (authMiddleware) => createAuthEndpoint("/scim/v2/Users", {
893
893
  const getSCIMUser = (authMiddleware) => createAuthEndpoint("/scim/v2/Users/:userId", {
894
894
  method: "GET",
895
895
  metadata: {
896
- isAction: false,
896
+ ...HIDE_METADATA,
897
897
  allowedMediaTypes: supportedMediaTypes,
898
898
  openapi: {
899
899
  summary: "Get SCIM user details",
@@ -936,7 +936,7 @@ const patchSCIMUser = (authMiddleware) => createAuthEndpoint("/scim/v2/Users/:us
936
936
  method: "PATCH",
937
937
  body: patchSCIMUserBodySchema,
938
938
  metadata: {
939
- isAction: false,
939
+ ...HIDE_METADATA,
940
940
  allowedMediaTypes: supportedMediaTypes,
941
941
  openapi: {
942
942
  summary: "Patch SCIM user",
@@ -972,7 +972,7 @@ const patchSCIMUser = (authMiddleware) => createAuthEndpoint("/scim/v2/Users/:us
972
972
  const deleteSCIMUser = (authMiddleware) => createAuthEndpoint("/scim/v2/Users/:userId", {
973
973
  method: "DELETE",
974
974
  metadata: {
975
- isAction: false,
975
+ ...HIDE_METADATA,
976
976
  allowedMediaTypes: supportedMediaTypes,
977
977
  openapi: {
978
978
  summary: "Delete SCIM user",
@@ -1000,7 +1000,7 @@ const deleteSCIMUser = (authMiddleware) => createAuthEndpoint("/scim/v2/Users/:u
1000
1000
  const getSCIMServiceProviderConfig = createAuthEndpoint("/scim/v2/ServiceProviderConfig", {
1001
1001
  method: "GET",
1002
1002
  metadata: {
1003
- isAction: false,
1003
+ ...HIDE_METADATA,
1004
1004
  allowedMediaTypes: supportedMediaTypes,
1005
1005
  openapi: {
1006
1006
  summary: "SCIM Service Provider Configuration",
@@ -1036,7 +1036,7 @@ const getSCIMServiceProviderConfig = createAuthEndpoint("/scim/v2/ServiceProvide
1036
1036
  const getSCIMSchemas = createAuthEndpoint("/scim/v2/Schemas", {
1037
1037
  method: "GET",
1038
1038
  metadata: {
1039
- isAction: false,
1039
+ ...HIDE_METADATA,
1040
1040
  allowedMediaTypes: supportedMediaTypes,
1041
1041
  openapi: {
1042
1042
  summary: "SCIM Service Provider Configuration Schemas",
@@ -1073,7 +1073,7 @@ const getSCIMSchemas = createAuthEndpoint("/scim/v2/Schemas", {
1073
1073
  const getSCIMSchema = createAuthEndpoint("/scim/v2/Schemas/:schemaId", {
1074
1074
  method: "GET",
1075
1075
  metadata: {
1076
- isAction: false,
1076
+ ...HIDE_METADATA,
1077
1077
  allowedMediaTypes: supportedMediaTypes,
1078
1078
  openapi: {
1079
1079
  summary: "SCIM a Service Provider Configuration Schema",
@@ -1101,7 +1101,7 @@ const getSCIMSchema = createAuthEndpoint("/scim/v2/Schemas/:schemaId", {
1101
1101
  const getSCIMResourceTypes = createAuthEndpoint("/scim/v2/ResourceTypes", {
1102
1102
  method: "GET",
1103
1103
  metadata: {
1104
- isAction: false,
1104
+ ...HIDE_METADATA,
1105
1105
  allowedMediaTypes: supportedMediaTypes,
1106
1106
  openapi: {
1107
1107
  summary: "SCIM Service Provider Supported Resource Types",
@@ -1146,7 +1146,7 @@ const getSCIMResourceTypes = createAuthEndpoint("/scim/v2/ResourceTypes", {
1146
1146
  const getSCIMResourceType = createAuthEndpoint("/scim/v2/ResourceTypes/:resourceTypeId", {
1147
1147
  method: "GET",
1148
1148
  metadata: {
1149
- isAction: false,
1149
+ ...HIDE_METADATA,
1150
1150
  allowedMediaTypes: supportedMediaTypes,
1151
1151
  openapi: {
1152
1152
  summary: "SCIM Service Provider Supported Resource Type",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@better-auth/scim",
3
3
  "author": "Jonathan Samines",
4
- "version": "1.4.6",
4
+ "version": "1.4.7-beta.3",
5
5
  "type": "module",
6
6
  "main": "dist/index.mjs",
7
7
  "types": "dist/index.d.mts",
@@ -48,16 +48,17 @@
48
48
  "zod": "^4.1.5"
49
49
  },
50
50
  "devDependencies": {
51
- "tsdown": "^0.17.0",
52
- "@better-auth/sso": "1.4.6"
51
+ "tsdown": "^0.17.2",
52
+ "@better-auth/sso": "1.4.7-beta.3"
53
53
  },
54
54
  "peerDependencies": {
55
- "better-auth": "1.4.6"
55
+ "better-auth": "1.4.7-beta.3"
56
56
  },
57
57
  "scripts": {
58
58
  "test": "vitest",
59
59
  "coverage": "vitest run --coverage",
60
60
  "lint:package": "publint run --strict",
61
+ "lint:types": "attw --profile esm-only --pack .",
61
62
  "build": "tsdown",
62
63
  "dev": "tsdown --watch",
63
64
  "typecheck": "tsc --project tsconfig.json"
package/src/routes.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import { base64Url } from "@better-auth/utils/base64";
2
2
  import type { Account, DBAdapter, User } from "better-auth";
3
+ import { HIDE_METADATA } from "better-auth";
3
4
  import { APIError, sessionMiddleware } from "better-auth/api";
4
5
  import { generateRandomString } from "better-auth/crypto";
5
6
  import type { Member } from "better-auth/plugins";
@@ -179,7 +180,7 @@ export const createSCIMUser = (authMiddleware: AuthMiddleware) =>
179
180
  method: "POST",
180
181
  body: APIUserSchema,
181
182
  metadata: {
182
- isAction: false,
183
+ ...HIDE_METADATA,
183
184
  allowedMediaTypes: supportedMediaTypes,
184
185
  openapi: {
185
186
  summary: "Create SCIM user.",
@@ -309,7 +310,7 @@ export const updateSCIMUser = (authMiddleware: AuthMiddleware) =>
309
310
  method: "PUT",
310
311
  body: APIUserSchema,
311
312
  metadata: {
312
- isAction: false,
313
+ ...HIDE_METADATA,
313
314
  allowedMediaTypes: supportedMediaTypes,
314
315
  openapi: {
315
316
  summary: "Update SCIM user.",
@@ -396,7 +397,7 @@ export const listSCIMUsers = (authMiddleware: AuthMiddleware) =>
396
397
  method: "GET",
397
398
  query: listSCIMUsersQuerySchema,
398
399
  metadata: {
399
- isAction: false,
400
+ ...HIDE_METADATA,
400
401
  allowedMediaTypes: supportedMediaTypes,
401
402
  openapi: {
402
403
  summary: "List SCIM users",
@@ -482,7 +483,7 @@ export const getSCIMUser = (authMiddleware: AuthMiddleware) =>
482
483
  {
483
484
  method: "GET",
484
485
  metadata: {
485
- isAction: false,
486
+ ...HIDE_METADATA,
486
487
  allowedMediaTypes: supportedMediaTypes,
487
488
  openapi: {
488
489
  summary: "Get SCIM user details",
@@ -549,7 +550,7 @@ export const patchSCIMUser = (authMiddleware: AuthMiddleware) =>
549
550
  method: "PATCH",
550
551
  body: patchSCIMUserBodySchema,
551
552
  metadata: {
552
- isAction: false,
553
+ ...HIDE_METADATA,
553
554
  allowedMediaTypes: supportedMediaTypes,
554
555
  openapi: {
555
556
  summary: "Patch SCIM user",
@@ -621,7 +622,7 @@ export const deleteSCIMUser = (authMiddleware: AuthMiddleware) =>
621
622
  {
622
623
  method: "DELETE",
623
624
  metadata: {
624
- isAction: false,
625
+ ...HIDE_METADATA,
625
626
  allowedMediaTypes: supportedMediaTypes,
626
627
  openapi: {
627
628
  summary: "Delete SCIM user",
@@ -666,7 +667,7 @@ export const getSCIMServiceProviderConfig = createAuthEndpoint(
666
667
  {
667
668
  method: "GET",
668
669
  metadata: {
669
- isAction: false,
670
+ ...HIDE_METADATA,
670
671
  allowedMediaTypes: supportedMediaTypes,
671
672
  openapi: {
672
673
  summary: "SCIM Service Provider Configuration",
@@ -717,7 +718,7 @@ export const getSCIMSchemas = createAuthEndpoint(
717
718
  {
718
719
  method: "GET",
719
720
  metadata: {
720
- isAction: false,
721
+ ...HIDE_METADATA,
721
722
  allowedMediaTypes: supportedMediaTypes,
722
723
  openapi: {
723
724
  summary: "SCIM Service Provider Configuration Schemas",
@@ -764,7 +765,7 @@ export const getSCIMSchema = createAuthEndpoint(
764
765
  {
765
766
  method: "GET",
766
767
  metadata: {
767
- isAction: false,
768
+ ...HIDE_METADATA,
768
769
  allowedMediaTypes: supportedMediaTypes,
769
770
  openapi: {
770
771
  summary: "SCIM a Service Provider Configuration Schema",
@@ -810,7 +811,7 @@ export const getSCIMResourceTypes = createAuthEndpoint(
810
811
  {
811
812
  method: "GET",
812
813
  metadata: {
813
- isAction: false,
814
+ ...HIDE_METADATA,
814
815
  allowedMediaTypes: supportedMediaTypes,
815
816
  openapi: {
816
817
  summary: "SCIM Service Provider Supported Resource Types",
@@ -865,7 +866,7 @@ export const getSCIMResourceType = createAuthEndpoint(
865
866
  {
866
867
  method: "GET",
867
868
  metadata: {
868
- isAction: false,
869
+ ...HIDE_METADATA,
869
870
  allowedMediaTypes: supportedMediaTypes,
870
871
  openapi: {
871
872
  summary: "SCIM Service Provider Supported Resource Type",