@better-auth/scim 1.4.3 → 1.4.4-beta.2
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/.turbo/turbo-build.log +5 -5
- package/dist/client.d.mts +1 -1
- package/dist/{index-DZOZXCsn.d.mts → index-DZjSQbyr.d.mts} +11 -0
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +12 -0
- package/package.json +4 -4
- package/src/index.ts +12 -0
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @better-auth/scim@1.4.
|
|
2
|
+
> @better-auth/scim@1.4.4-beta.2 build /home/runner/work/better-auth/better-auth/packages/scim
|
|
3
3
|
> tsdown
|
|
4
4
|
|
|
5
5
|
[34mℹ[39m tsdown [2mv0.16.5[22m powered by rolldown [2mv1.0.0-beta.50[22m
|
|
@@ -7,10 +7,10 @@
|
|
|
7
7
|
[34mℹ[39m entry: [34msrc/index.ts, src/client.ts[39m
|
|
8
8
|
[34mℹ[39m tsconfig: [34mtsconfig.json[39m
|
|
9
9
|
[34mℹ[39m Build start
|
|
10
|
-
[34mℹ[39m [2mdist/[22m[1mindex.mjs[22m [2m 38.
|
|
10
|
+
[34mℹ[39m [2mdist/[22m[1mindex.mjs[22m [2m 38.82 kB[22m [2m│ gzip: 7.65 kB[22m
|
|
11
11
|
[34mℹ[39m [2mdist/[22m[1mclient.mjs[22m [2m 0.15 kB[22m [2m│ gzip: 0.14 kB[22m
|
|
12
12
|
[34mℹ[39m [2mdist/[22m[32m[1mclient.d.mts[22m[39m [2m 0.22 kB[22m [2m│ gzip: 0.18 kB[22m
|
|
13
13
|
[34mℹ[39m [2mdist/[22m[32m[1mindex.d.mts[22m[39m [2m 0.07 kB[22m [2m│ gzip: 0.08 kB[22m
|
|
14
|
-
[34mℹ[39m [2mdist/[22m[32mindex-
|
|
15
|
-
[34mℹ[39m 5 files, total:
|
|
16
|
-
[32m✔[39m Build complete in [
|
|
14
|
+
[34mℹ[39m [2mdist/[22m[32mindex-DZjSQbyr.d.mts[39m [2m108.14 kB[22m [2m│ gzip: 4.24 kB[22m
|
|
15
|
+
[34mℹ[39m 5 files, total: 147.40 kB
|
|
16
|
+
[32m✔[39m Build complete in [32m4863ms[39m
|
package/dist/client.d.mts
CHANGED
|
@@ -130,6 +130,7 @@ declare const scim: (options?: SCIMOptions) => {
|
|
|
130
130
|
}, z.core.$strip>;
|
|
131
131
|
metadata: {
|
|
132
132
|
isAction: false;
|
|
133
|
+
allowedMediaTypes: string[];
|
|
133
134
|
openapi: {
|
|
134
135
|
summary: string;
|
|
135
136
|
description: string;
|
|
@@ -420,6 +421,7 @@ declare const scim: (options?: SCIMOptions) => {
|
|
|
420
421
|
}, z.core.$strip>;
|
|
421
422
|
metadata: {
|
|
422
423
|
isAction: false;
|
|
424
|
+
allowedMediaTypes: string[];
|
|
423
425
|
openapi: {
|
|
424
426
|
summary: string;
|
|
425
427
|
description: string;
|
|
@@ -700,6 +702,7 @@ declare const scim: (options?: SCIMOptions) => {
|
|
|
700
702
|
}, z.core.$strip>>;
|
|
701
703
|
metadata: {
|
|
702
704
|
isAction: false;
|
|
705
|
+
allowedMediaTypes: string[];
|
|
703
706
|
openapi: {
|
|
704
707
|
summary: string;
|
|
705
708
|
description: string;
|
|
@@ -1000,6 +1003,7 @@ declare const scim: (options?: SCIMOptions) => {
|
|
|
1000
1003
|
method: "GET";
|
|
1001
1004
|
metadata: {
|
|
1002
1005
|
isAction: false;
|
|
1006
|
+
allowedMediaTypes: string[];
|
|
1003
1007
|
openapi: {
|
|
1004
1008
|
summary: string;
|
|
1005
1009
|
description: string;
|
|
@@ -1289,6 +1293,7 @@ declare const scim: (options?: SCIMOptions) => {
|
|
|
1289
1293
|
}, z.core.$strip>;
|
|
1290
1294
|
metadata: {
|
|
1291
1295
|
isAction: false;
|
|
1296
|
+
allowedMediaTypes: string[];
|
|
1292
1297
|
openapi: {
|
|
1293
1298
|
summary: string;
|
|
1294
1299
|
description: string;
|
|
@@ -1472,6 +1477,7 @@ declare const scim: (options?: SCIMOptions) => {
|
|
|
1472
1477
|
method: "DELETE";
|
|
1473
1478
|
metadata: {
|
|
1474
1479
|
isAction: false;
|
|
1480
|
+
allowedMediaTypes: string[];
|
|
1475
1481
|
openapi: {
|
|
1476
1482
|
summary: string;
|
|
1477
1483
|
description: string;
|
|
@@ -1655,6 +1661,7 @@ declare const scim: (options?: SCIMOptions) => {
|
|
|
1655
1661
|
method: "GET";
|
|
1656
1662
|
metadata: {
|
|
1657
1663
|
isAction: false;
|
|
1664
|
+
allowedMediaTypes: string[];
|
|
1658
1665
|
openapi: {
|
|
1659
1666
|
summary: string;
|
|
1660
1667
|
description: string;
|
|
@@ -1958,6 +1965,7 @@ declare const scim: (options?: SCIMOptions) => {
|
|
|
1958
1965
|
method: "GET";
|
|
1959
1966
|
metadata: {
|
|
1960
1967
|
isAction: false;
|
|
1968
|
+
allowedMediaTypes: string[];
|
|
1961
1969
|
openapi: {
|
|
1962
1970
|
summary: string;
|
|
1963
1971
|
description: string;
|
|
@@ -2336,6 +2344,7 @@ declare const scim: (options?: SCIMOptions) => {
|
|
|
2336
2344
|
method: "GET";
|
|
2337
2345
|
metadata: {
|
|
2338
2346
|
isAction: false;
|
|
2347
|
+
allowedMediaTypes: string[];
|
|
2339
2348
|
openapi: {
|
|
2340
2349
|
summary: string;
|
|
2341
2350
|
description: string;
|
|
@@ -2705,6 +2714,7 @@ declare const scim: (options?: SCIMOptions) => {
|
|
|
2705
2714
|
method: "GET";
|
|
2706
2715
|
metadata: {
|
|
2707
2716
|
isAction: false;
|
|
2717
|
+
allowedMediaTypes: string[];
|
|
2708
2718
|
openapi: {
|
|
2709
2719
|
summary: string;
|
|
2710
2720
|
description: string;
|
|
@@ -2959,6 +2969,7 @@ declare const scim: (options?: SCIMOptions) => {
|
|
|
2959
2969
|
method: "GET";
|
|
2960
2970
|
metadata: {
|
|
2961
2971
|
isAction: false;
|
|
2972
|
+
allowedMediaTypes: string[];
|
|
2962
2973
|
openapi: {
|
|
2963
2974
|
summary: string;
|
|
2964
2975
|
description: string;
|
package/dist/index.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as scim } from "./index-
|
|
1
|
+
import { t as scim } from "./index-DZjSQbyr.mjs";
|
|
2
2
|
export { scim };
|
package/dist/index.mjs
CHANGED
|
@@ -583,6 +583,7 @@ const createUserResource = (baseURL, user, account) => {
|
|
|
583
583
|
//#region src/index.ts
|
|
584
584
|
const supportedSCIMSchemas = [SCIMUserResourceSchema];
|
|
585
585
|
const supportedSCIMResourceTypes = [SCIMUserResourceType];
|
|
586
|
+
const supportedMediaTypes = ["application/json", "application/scim+json"];
|
|
586
587
|
const findUserById = async (adapter, { userId, providerId, organizationId }) => {
|
|
587
588
|
const account = await adapter.findOne({
|
|
588
589
|
model: "account",
|
|
@@ -725,6 +726,7 @@ const scim = (options) => {
|
|
|
725
726
|
body: APIUserSchema,
|
|
726
727
|
metadata: {
|
|
727
728
|
isAction: false,
|
|
729
|
+
allowedMediaTypes: supportedMediaTypes,
|
|
728
730
|
openapi: {
|
|
729
731
|
summary: "Create SCIM user.",
|
|
730
732
|
description: "Provision a new user into the linked organization via SCIM. See https://datatracker.ietf.org/doc/html/rfc7644#section-3.3",
|
|
@@ -823,6 +825,7 @@ const scim = (options) => {
|
|
|
823
825
|
body: APIUserSchema,
|
|
824
826
|
metadata: {
|
|
825
827
|
isAction: false,
|
|
828
|
+
allowedMediaTypes: supportedMediaTypes,
|
|
826
829
|
openapi: {
|
|
827
830
|
summary: "Update SCIM user.",
|
|
828
831
|
description: "Updates an existing user into the linked organization via SCIM. See https://datatracker.ietf.org/doc/html/rfc7644#section-3.3",
|
|
@@ -867,6 +870,7 @@ const scim = (options) => {
|
|
|
867
870
|
query: z.object({ filter: z.string().optional() }).optional(),
|
|
868
871
|
metadata: {
|
|
869
872
|
isAction: false,
|
|
873
|
+
allowedMediaTypes: supportedMediaTypes,
|
|
870
874
|
openapi: {
|
|
871
875
|
summary: "List SCIM users",
|
|
872
876
|
description: "Returns all users provisioned via SCIM for the linked organization. See https://datatracker.ietf.org/doc/html/rfc7644#section-3.4.2",
|
|
@@ -943,6 +947,7 @@ const scim = (options) => {
|
|
|
943
947
|
method: "GET",
|
|
944
948
|
metadata: {
|
|
945
949
|
isAction: false,
|
|
950
|
+
allowedMediaTypes: supportedMediaTypes,
|
|
946
951
|
openapi: {
|
|
947
952
|
summary: "Get SCIM user details",
|
|
948
953
|
description: "Returns the provisioned SCIM user details. See https://datatracker.ietf.org/doc/html/rfc7644#section-3.4.1",
|
|
@@ -984,6 +989,7 @@ const scim = (options) => {
|
|
|
984
989
|
}),
|
|
985
990
|
metadata: {
|
|
986
991
|
isAction: false,
|
|
992
|
+
allowedMediaTypes: supportedMediaTypes,
|
|
987
993
|
openapi: {
|
|
988
994
|
summary: "Patch SCIM user",
|
|
989
995
|
description: "Updates fields on a SCIM user record",
|
|
@@ -1019,6 +1025,7 @@ const scim = (options) => {
|
|
|
1019
1025
|
method: "DELETE",
|
|
1020
1026
|
metadata: {
|
|
1021
1027
|
isAction: false,
|
|
1028
|
+
allowedMediaTypes: supportedMediaTypes,
|
|
1022
1029
|
openapi: {
|
|
1023
1030
|
summary: "Delete SCIM user",
|
|
1024
1031
|
description: "Deletes (or deactivates) a user within the linked organization.",
|
|
@@ -1046,6 +1053,7 @@ const scim = (options) => {
|
|
|
1046
1053
|
method: "GET",
|
|
1047
1054
|
metadata: {
|
|
1048
1055
|
isAction: false,
|
|
1056
|
+
allowedMediaTypes: supportedMediaTypes,
|
|
1049
1057
|
openapi: {
|
|
1050
1058
|
summary: "SCIM Service Provider Configuration",
|
|
1051
1059
|
description: "Standard SCIM metadata endpoint used by identity providers. See https://datatracker.ietf.org/doc/html/rfc7644#section-4",
|
|
@@ -1081,6 +1089,7 @@ const scim = (options) => {
|
|
|
1081
1089
|
method: "GET",
|
|
1082
1090
|
metadata: {
|
|
1083
1091
|
isAction: false,
|
|
1092
|
+
allowedMediaTypes: supportedMediaTypes,
|
|
1084
1093
|
openapi: {
|
|
1085
1094
|
summary: "SCIM Service Provider Configuration Schemas",
|
|
1086
1095
|
description: "Standard SCIM metadata endpoint used by identity providers to acquire information about supported schemas. See https://datatracker.ietf.org/doc/html/rfc7644#section-4",
|
|
@@ -1117,6 +1126,7 @@ const scim = (options) => {
|
|
|
1117
1126
|
method: "GET",
|
|
1118
1127
|
metadata: {
|
|
1119
1128
|
isAction: false,
|
|
1129
|
+
allowedMediaTypes: supportedMediaTypes,
|
|
1120
1130
|
openapi: {
|
|
1121
1131
|
summary: "SCIM a Service Provider Configuration Schema",
|
|
1122
1132
|
description: "Standard SCIM metadata endpoint used by identity providers to acquire information about a given schema. See https://datatracker.ietf.org/doc/html/rfc7644#section-4",
|
|
@@ -1144,6 +1154,7 @@ const scim = (options) => {
|
|
|
1144
1154
|
method: "GET",
|
|
1145
1155
|
metadata: {
|
|
1146
1156
|
isAction: false,
|
|
1157
|
+
allowedMediaTypes: supportedMediaTypes,
|
|
1147
1158
|
openapi: {
|
|
1148
1159
|
summary: "SCIM Service Provider Supported Resource Types",
|
|
1149
1160
|
description: "Standard SCIM metadata endpoint used by identity providers to get a list of server supported types. See https://datatracker.ietf.org/doc/html/rfc7644#section-4",
|
|
@@ -1188,6 +1199,7 @@ const scim = (options) => {
|
|
|
1188
1199
|
method: "GET",
|
|
1189
1200
|
metadata: {
|
|
1190
1201
|
isAction: false,
|
|
1202
|
+
allowedMediaTypes: supportedMediaTypes,
|
|
1191
1203
|
openapi: {
|
|
1192
1204
|
summary: "SCIM Service Provider Supported Resource Type",
|
|
1193
1205
|
description: "Standard SCIM metadata endpoint used by identity providers to get a server supported type. See https://datatracker.ietf.org/doc/html/rfc7644#section-4",
|
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.
|
|
4
|
+
"version": "1.4.4-beta.2",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"license": "MIT",
|
|
@@ -37,16 +37,16 @@
|
|
|
37
37
|
}
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"better-call": "1.1.
|
|
40
|
+
"better-call": "1.1.3",
|
|
41
41
|
"@better-auth/utils": "0.3.0",
|
|
42
42
|
"zod": "^4.1.5"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"tsdown": "^0.16.0",
|
|
46
|
-
"@better-auth/sso": "1.4.
|
|
46
|
+
"@better-auth/sso": "1.4.4-beta.2"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
|
-
"better-auth": "1.4.
|
|
49
|
+
"better-auth": "1.4.4-beta.2"
|
|
50
50
|
},
|
|
51
51
|
"scripts": {
|
|
52
52
|
"test": "vitest",
|
package/src/index.ts
CHANGED
|
@@ -29,6 +29,7 @@ import { getResourceURL } from "./utils";
|
|
|
29
29
|
|
|
30
30
|
const supportedSCIMSchemas = [SCIMUserResourceSchema];
|
|
31
31
|
const supportedSCIMResourceTypes = [SCIMUserResourceType];
|
|
32
|
+
const supportedMediaTypes = ["application/json", "application/scim+json"];
|
|
32
33
|
|
|
33
34
|
const findUserById = async (
|
|
34
35
|
adapter: DBAdapter,
|
|
@@ -241,6 +242,7 @@ export const scim = (options?: SCIMOptions) => {
|
|
|
241
242
|
body: APIUserSchema,
|
|
242
243
|
metadata: {
|
|
243
244
|
isAction: false,
|
|
245
|
+
allowedMediaTypes: supportedMediaTypes,
|
|
244
246
|
openapi: {
|
|
245
247
|
summary: "Create SCIM user.",
|
|
246
248
|
description:
|
|
@@ -370,6 +372,7 @@ export const scim = (options?: SCIMOptions) => {
|
|
|
370
372
|
body: APIUserSchema,
|
|
371
373
|
metadata: {
|
|
372
374
|
isAction: false,
|
|
375
|
+
allowedMediaTypes: supportedMediaTypes,
|
|
373
376
|
openapi: {
|
|
374
377
|
summary: "Update SCIM user.",
|
|
375
378
|
description:
|
|
@@ -452,6 +455,7 @@ export const scim = (options?: SCIMOptions) => {
|
|
|
452
455
|
.optional(),
|
|
453
456
|
metadata: {
|
|
454
457
|
isAction: false,
|
|
458
|
+
allowedMediaTypes: supportedMediaTypes,
|
|
455
459
|
openapi: {
|
|
456
460
|
summary: "List SCIM users",
|
|
457
461
|
description:
|
|
@@ -539,6 +543,7 @@ export const scim = (options?: SCIMOptions) => {
|
|
|
539
543
|
method: "GET",
|
|
540
544
|
metadata: {
|
|
541
545
|
isAction: false,
|
|
546
|
+
allowedMediaTypes: supportedMediaTypes,
|
|
542
547
|
openapi: {
|
|
543
548
|
summary: "Get SCIM user details",
|
|
544
549
|
description:
|
|
@@ -604,6 +609,7 @@ export const scim = (options?: SCIMOptions) => {
|
|
|
604
609
|
}),
|
|
605
610
|
metadata: {
|
|
606
611
|
isAction: false,
|
|
612
|
+
allowedMediaTypes: supportedMediaTypes,
|
|
607
613
|
openapi: {
|
|
608
614
|
summary: "Patch SCIM user",
|
|
609
615
|
description: "Updates fields on a SCIM user record",
|
|
@@ -673,6 +679,7 @@ export const scim = (options?: SCIMOptions) => {
|
|
|
673
679
|
method: "DELETE",
|
|
674
680
|
metadata: {
|
|
675
681
|
isAction: false,
|
|
682
|
+
allowedMediaTypes: supportedMediaTypes,
|
|
676
683
|
openapi: {
|
|
677
684
|
summary: "Delete SCIM user",
|
|
678
685
|
description:
|
|
@@ -716,6 +723,7 @@ export const scim = (options?: SCIMOptions) => {
|
|
|
716
723
|
method: "GET",
|
|
717
724
|
metadata: {
|
|
718
725
|
isAction: false,
|
|
726
|
+
allowedMediaTypes: supportedMediaTypes,
|
|
719
727
|
openapi: {
|
|
720
728
|
summary: "SCIM Service Provider Configuration",
|
|
721
729
|
description:
|
|
@@ -767,6 +775,7 @@ export const scim = (options?: SCIMOptions) => {
|
|
|
767
775
|
method: "GET",
|
|
768
776
|
metadata: {
|
|
769
777
|
isAction: false,
|
|
778
|
+
allowedMediaTypes: supportedMediaTypes,
|
|
770
779
|
openapi: {
|
|
771
780
|
summary: "SCIM Service Provider Configuration Schemas",
|
|
772
781
|
description:
|
|
@@ -815,6 +824,7 @@ export const scim = (options?: SCIMOptions) => {
|
|
|
815
824
|
method: "GET",
|
|
816
825
|
metadata: {
|
|
817
826
|
isAction: false,
|
|
827
|
+
allowedMediaTypes: supportedMediaTypes,
|
|
818
828
|
openapi: {
|
|
819
829
|
summary: "SCIM a Service Provider Configuration Schema",
|
|
820
830
|
description:
|
|
@@ -862,6 +872,7 @@ export const scim = (options?: SCIMOptions) => {
|
|
|
862
872
|
method: "GET",
|
|
863
873
|
metadata: {
|
|
864
874
|
isAction: false,
|
|
875
|
+
allowedMediaTypes: supportedMediaTypes,
|
|
865
876
|
openapi: {
|
|
866
877
|
summary: "SCIM Service Provider Supported Resource Types",
|
|
867
878
|
description:
|
|
@@ -918,6 +929,7 @@ export const scim = (options?: SCIMOptions) => {
|
|
|
918
929
|
method: "GET",
|
|
919
930
|
metadata: {
|
|
920
931
|
isAction: false,
|
|
932
|
+
allowedMediaTypes: supportedMediaTypes,
|
|
921
933
|
openapi: {
|
|
922
934
|
summary: "SCIM Service Provider Supported Resource Type",
|
|
923
935
|
description:
|