@agntcy/slim-bindings 2.0.0 → 2.1.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/named-exports.js CHANGED
@@ -47,6 +47,9 @@ export const MulticastResponseReader = ns.MulticastResponseReader;
47
47
  export const MulticastStreamMessage = ns.MulticastStreamMessage;
48
48
  export const MulticastStreamMessage_Tags = ns.MulticastStreamMessage_Tags;
49
49
  export const Name = ns.Name;
50
+ export const OidcConfig = ns.OidcConfig;
51
+ export const OidcPolicyConfig = ns.OidcPolicyConfig;
52
+ export const OidcPolicyConfig_Tags = ns.OidcPolicyConfig_Tags;
50
53
  export const ParticipantInfo = ns.ParticipantInfo;
51
54
  export const ParticipantStatus = ns.ParticipantStatus;
52
55
  export const PersistenceConfig = ns.PersistenceConfig;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agntcy/slim-bindings",
3
- "version": "2.0.0",
3
+ "version": "2.1.0",
4
4
  "description": "SLIM Node.js bindings using UniFFI",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -42,15 +42,15 @@
42
42
  "@ubjs/node": "0.31.0-3"
43
43
  },
44
44
  "optionalDependencies": {
45
- "@agntcy/slim-bindings-darwin-arm64": "2.0.0",
46
- "@agntcy/slim-bindings-darwin-x64": "2.0.0",
47
- "@agntcy/slim-bindings-linux-arm64-gnu": "2.0.0",
48
- "@agntcy/slim-bindings-linux-arm64-musl": "2.0.0",
49
- "@agntcy/slim-bindings-linux-x64-gnu": "2.0.0",
50
- "@agntcy/slim-bindings-linux-x64-musl": "2.0.0",
51
- "@agntcy/slim-bindings-win32-arm64-msvc": "2.0.0",
52
- "@agntcy/slim-bindings-win32-x64-gnu": "2.0.0",
53
- "@agntcy/slim-bindings-win32-x64-msvc": "2.0.0"
45
+ "@agntcy/slim-bindings-darwin-arm64": "2.1.0",
46
+ "@agntcy/slim-bindings-darwin-x64": "2.1.0",
47
+ "@agntcy/slim-bindings-linux-arm64-gnu": "2.1.0",
48
+ "@agntcy/slim-bindings-linux-arm64-musl": "2.1.0",
49
+ "@agntcy/slim-bindings-linux-x64-gnu": "2.1.0",
50
+ "@agntcy/slim-bindings-linux-x64-musl": "2.1.0",
51
+ "@agntcy/slim-bindings-win32-arm64-msvc": "2.1.0",
52
+ "@agntcy/slim-bindings-win32-x64-gnu": "2.1.0",
53
+ "@agntcy/slim-bindings-win32-x64-msvc": "2.1.0"
54
54
  },
55
55
  "devDependencies": {
56
56
  "@types/node": "^20.0.0",
@@ -1001,11 +1001,205 @@ export declare const ClientJwtAuth: Readonly<{
1001
1001
  new: (partial: Partial<ClientJwtAuth> & Required<Omit<ClientJwtAuth, "duration" | "key" | "audience" | "issuer" | "subject">>) => ClientJwtAuth;
1002
1002
  defaults: () => Partial<ClientJwtAuth>;
1003
1003
  }>;
1004
+ export declare enum OidcPolicyConfig_Tags {
1005
+ Rego = "Rego",
1006
+ RegoFile = "RegoFile",
1007
+ Cel = "Cel"
1008
+ }
1009
+ /**
1010
+ * Policy evaluated against JWT claims on every authenticated request (server-side OIDC only)
1011
+ */
1012
+ export declare const OidcPolicyConfig: Readonly<{
1013
+ instanceOf: (obj: any) => obj is OidcPolicyConfig;
1014
+ Rego: {
1015
+ new (inner: {
1016
+ text: string;
1017
+ }): {
1018
+ readonly tag: OidcPolicyConfig_Tags.Rego;
1019
+ readonly inner: Readonly<{
1020
+ text: string;
1021
+ }>;
1022
+ /**
1023
+ * @private
1024
+ * This field is private and should not be used, use `tag` instead.
1025
+ */
1026
+ readonly [uniffiTypeNameSymbol]: "OidcPolicyConfig";
1027
+ };
1028
+ "new"(inner: {
1029
+ text: string;
1030
+ }): {
1031
+ readonly tag: OidcPolicyConfig_Tags.Rego;
1032
+ readonly inner: Readonly<{
1033
+ text: string;
1034
+ }>;
1035
+ /**
1036
+ * @private
1037
+ * This field is private and should not be used, use `tag` instead.
1038
+ */
1039
+ readonly [uniffiTypeNameSymbol]: "OidcPolicyConfig";
1040
+ };
1041
+ instanceOf(obj: any): obj is {
1042
+ readonly tag: OidcPolicyConfig_Tags.Rego;
1043
+ readonly inner: Readonly<{
1044
+ text: string;
1045
+ }>;
1046
+ /**
1047
+ * @private
1048
+ * This field is private and should not be used, use `tag` instead.
1049
+ */
1050
+ readonly [uniffiTypeNameSymbol]: "OidcPolicyConfig";
1051
+ };
1052
+ };
1053
+ RegoFile: {
1054
+ new (inner: {
1055
+ path: string;
1056
+ }): {
1057
+ readonly tag: OidcPolicyConfig_Tags.RegoFile;
1058
+ readonly inner: Readonly<{
1059
+ path: string;
1060
+ }>;
1061
+ /**
1062
+ * @private
1063
+ * This field is private and should not be used, use `tag` instead.
1064
+ */
1065
+ readonly [uniffiTypeNameSymbol]: "OidcPolicyConfig";
1066
+ };
1067
+ "new"(inner: {
1068
+ path: string;
1069
+ }): {
1070
+ readonly tag: OidcPolicyConfig_Tags.RegoFile;
1071
+ readonly inner: Readonly<{
1072
+ path: string;
1073
+ }>;
1074
+ /**
1075
+ * @private
1076
+ * This field is private and should not be used, use `tag` instead.
1077
+ */
1078
+ readonly [uniffiTypeNameSymbol]: "OidcPolicyConfig";
1079
+ };
1080
+ instanceOf(obj: any): obj is {
1081
+ readonly tag: OidcPolicyConfig_Tags.RegoFile;
1082
+ readonly inner: Readonly<{
1083
+ path: string;
1084
+ }>;
1085
+ /**
1086
+ * @private
1087
+ * This field is private and should not be used, use `tag` instead.
1088
+ */
1089
+ readonly [uniffiTypeNameSymbol]: "OidcPolicyConfig";
1090
+ };
1091
+ };
1092
+ Cel: {
1093
+ new (inner: {
1094
+ expression: string;
1095
+ }): {
1096
+ readonly tag: OidcPolicyConfig_Tags.Cel;
1097
+ readonly inner: Readonly<{
1098
+ expression: string;
1099
+ }>;
1100
+ /**
1101
+ * @private
1102
+ * This field is private and should not be used, use `tag` instead.
1103
+ */
1104
+ readonly [uniffiTypeNameSymbol]: "OidcPolicyConfig";
1105
+ };
1106
+ "new"(inner: {
1107
+ expression: string;
1108
+ }): {
1109
+ readonly tag: OidcPolicyConfig_Tags.Cel;
1110
+ readonly inner: Readonly<{
1111
+ expression: string;
1112
+ }>;
1113
+ /**
1114
+ * @private
1115
+ * This field is private and should not be used, use `tag` instead.
1116
+ */
1117
+ readonly [uniffiTypeNameSymbol]: "OidcPolicyConfig";
1118
+ };
1119
+ instanceOf(obj: any): obj is {
1120
+ readonly tag: OidcPolicyConfig_Tags.Cel;
1121
+ readonly inner: Readonly<{
1122
+ expression: string;
1123
+ }>;
1124
+ /**
1125
+ * @private
1126
+ * This field is private and should not be used, use `tag` instead.
1127
+ */
1128
+ readonly [uniffiTypeNameSymbol]: "OidcPolicyConfig";
1129
+ };
1130
+ };
1131
+ }>;
1132
+ /**
1133
+ * Policy evaluated against JWT claims on every authenticated request (server-side OIDC only)
1134
+ */
1135
+ export type OidcPolicyConfig = InstanceType<typeof OidcPolicyConfig['Rego' | 'RegoFile' | 'Cel']>;
1136
+ /**
1137
+ * OIDC authentication configuration (client-credentials, refresh-token, or JWKS verification)
1138
+ */
1139
+ export type OidcConfig = {
1140
+ /**
1141
+ * OIDC issuer URL (e.g., https://auth.example.com)
1142
+ */
1143
+ issuerUrl: string;
1144
+ /**
1145
+ * OAuth2 client ID (required for client-credentials and refresh-token flows)
1146
+ */
1147
+ clientId?: string;
1148
+ /**
1149
+ * OAuth2 client secret (for client-credentials flow)
1150
+ */
1151
+ clientSecret?: string;
1152
+ /**
1153
+ * Expected audience for JWT tokens (required for server-side verification)
1154
+ */
1155
+ audience?: string;
1156
+ /**
1157
+ * Inline refresh token (for authorization-code flow)
1158
+ */
1159
+ refreshToken?: string;
1160
+ /**
1161
+ * Path to file holding the refresh token (rotated tokens are written back automatically)
1162
+ */
1163
+ refreshTokenFile?: string;
1164
+ /**
1165
+ * Path to a file caching the current access token (optional companion to refresh_token_file)
1166
+ */
1167
+ accessTokenFile?: string;
1168
+ /**
1169
+ * OAuth2 scope parameter (client-side only)
1170
+ */
1171
+ scope?: string;
1172
+ /**
1173
+ * HTTP timeout for token requests in seconds (default: 30, client-side only)
1174
+ */
1175
+ timeout?: number;
1176
+ /**
1177
+ * JWKS cache TTL in seconds (default: 3600, server-side only)
1178
+ */
1179
+ jwksTtl?: number;
1180
+ /**
1181
+ * Cache TTL for merged JWT+userinfo claims in seconds (server-side only, absent = no cache)
1182
+ */
1183
+ claimCacheTtl?: number;
1184
+ /**
1185
+ * Policy evaluated against JWT claims on every authenticated request (server-side only)
1186
+ */
1187
+ policy?: OidcPolicyConfig;
1188
+ };
1189
+ /**
1190
+ * Generated factory for {@link OidcConfig} record objects.
1191
+ */
1192
+ export declare const OidcConfig: Readonly<{
1193
+ create: (partial: Partial<OidcConfig> & Required<Omit<OidcConfig, "timeout" | "audience" | "issuerUrl" | "clientId" | "clientSecret" | "refreshToken" | "refreshTokenFile" | "accessTokenFile" | "scope" | "jwksTtl" | "claimCacheTtl" | "policy">>) => OidcConfig;
1194
+ new: (partial: Partial<OidcConfig> & Required<Omit<OidcConfig, "timeout" | "audience" | "issuerUrl" | "clientId" | "clientSecret" | "refreshToken" | "refreshTokenFile" | "accessTokenFile" | "scope" | "jwksTtl" | "claimCacheTtl" | "policy">>) => OidcConfig;
1195
+ defaults: () => Partial<OidcConfig>;
1196
+ }>;
1004
1197
  export declare enum ClientAuthenticationConfig_Tags {
1005
1198
  Basic = "Basic",
1006
1199
  StaticJwt = "StaticJwt",
1007
1200
  Jwt = "Jwt",
1008
1201
  Spire = "Spire",
1202
+ Oidc = "Oidc",
1009
1203
  None = "None"
1010
1204
  }
1011
1205
  /**
@@ -1169,6 +1363,45 @@ export declare const ClientAuthenticationConfig: Readonly<{
1169
1363
  readonly [uniffiTypeNameSymbol]: "ClientAuthenticationConfig";
1170
1364
  };
1171
1365
  };
1366
+ Oidc: {
1367
+ new (inner: {
1368
+ config: OidcConfig;
1369
+ }): {
1370
+ readonly tag: ClientAuthenticationConfig_Tags.Oidc;
1371
+ readonly inner: Readonly<{
1372
+ config: OidcConfig;
1373
+ }>;
1374
+ /**
1375
+ * @private
1376
+ * This field is private and should not be used, use `tag` instead.
1377
+ */
1378
+ readonly [uniffiTypeNameSymbol]: "ClientAuthenticationConfig";
1379
+ };
1380
+ "new"(inner: {
1381
+ config: OidcConfig;
1382
+ }): {
1383
+ readonly tag: ClientAuthenticationConfig_Tags.Oidc;
1384
+ readonly inner: Readonly<{
1385
+ config: OidcConfig;
1386
+ }>;
1387
+ /**
1388
+ * @private
1389
+ * This field is private and should not be used, use `tag` instead.
1390
+ */
1391
+ readonly [uniffiTypeNameSymbol]: "ClientAuthenticationConfig";
1392
+ };
1393
+ instanceOf(obj: any): obj is {
1394
+ readonly tag: ClientAuthenticationConfig_Tags.Oidc;
1395
+ readonly inner: Readonly<{
1396
+ config: OidcConfig;
1397
+ }>;
1398
+ /**
1399
+ * @private
1400
+ * This field is private and should not be used, use `tag` instead.
1401
+ */
1402
+ readonly [uniffiTypeNameSymbol]: "ClientAuthenticationConfig";
1403
+ };
1404
+ };
1172
1405
  None: {
1173
1406
  new (): {
1174
1407
  readonly tag: ClientAuthenticationConfig_Tags.None;
@@ -1199,7 +1432,7 @@ export declare const ClientAuthenticationConfig: Readonly<{
1199
1432
  /**
1200
1433
  * Authentication configuration enum for client
1201
1434
  */
1202
- export type ClientAuthenticationConfig = InstanceType<typeof ClientAuthenticationConfig['Basic' | 'StaticJwt' | 'Jwt' | 'Spire' | 'None']>;
1435
+ export type ClientAuthenticationConfig = InstanceType<typeof ClientAuthenticationConfig['Basic' | 'StaticJwt' | 'Jwt' | 'Spire' | 'Oidc' | 'None']>;
1203
1436
  /**
1204
1437
  * Exponential backoff configuration
1205
1438
  */
@@ -1533,6 +1766,7 @@ export declare enum ServerAuthenticationConfig_Tags {
1533
1766
  Basic = "Basic",
1534
1767
  Jwt = "Jwt",
1535
1768
  Spire = "Spire",
1769
+ Oidc = "Oidc",
1536
1770
  None = "None"
1537
1771
  }
1538
1772
  /**
@@ -1657,6 +1891,45 @@ export declare const ServerAuthenticationConfig: Readonly<{
1657
1891
  readonly [uniffiTypeNameSymbol]: "ServerAuthenticationConfig";
1658
1892
  };
1659
1893
  };
1894
+ Oidc: {
1895
+ new (inner: {
1896
+ config: OidcConfig;
1897
+ }): {
1898
+ readonly tag: ServerAuthenticationConfig_Tags.Oidc;
1899
+ readonly inner: Readonly<{
1900
+ config: OidcConfig;
1901
+ }>;
1902
+ /**
1903
+ * @private
1904
+ * This field is private and should not be used, use `tag` instead.
1905
+ */
1906
+ readonly [uniffiTypeNameSymbol]: "ServerAuthenticationConfig";
1907
+ };
1908
+ "new"(inner: {
1909
+ config: OidcConfig;
1910
+ }): {
1911
+ readonly tag: ServerAuthenticationConfig_Tags.Oidc;
1912
+ readonly inner: Readonly<{
1913
+ config: OidcConfig;
1914
+ }>;
1915
+ /**
1916
+ * @private
1917
+ * This field is private and should not be used, use `tag` instead.
1918
+ */
1919
+ readonly [uniffiTypeNameSymbol]: "ServerAuthenticationConfig";
1920
+ };
1921
+ instanceOf(obj: any): obj is {
1922
+ readonly tag: ServerAuthenticationConfig_Tags.Oidc;
1923
+ readonly inner: Readonly<{
1924
+ config: OidcConfig;
1925
+ }>;
1926
+ /**
1927
+ * @private
1928
+ * This field is private and should not be used, use `tag` instead.
1929
+ */
1930
+ readonly [uniffiTypeNameSymbol]: "ServerAuthenticationConfig";
1931
+ };
1932
+ };
1660
1933
  None: {
1661
1934
  new (): {
1662
1935
  readonly tag: ServerAuthenticationConfig_Tags.None;
@@ -1687,7 +1960,7 @@ export declare const ServerAuthenticationConfig: Readonly<{
1687
1960
  /**
1688
1961
  * Authentication configuration enum for server
1689
1962
  */
1690
- export type ServerAuthenticationConfig = InstanceType<typeof ServerAuthenticationConfig['Basic' | 'Jwt' | 'Spire' | 'None']>;
1963
+ export type ServerAuthenticationConfig = InstanceType<typeof ServerAuthenticationConfig['Basic' | 'Jwt' | 'Spire' | 'Oidc' | 'None']>;
1691
1964
  /**
1692
1965
  * Server configuration for running a SLIM server
1693
1966
  */
@@ -5034,6 +5307,20 @@ declare const _default: Readonly<{
5034
5307
  lower(value: MlsSettings, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
5035
5308
  };
5036
5309
  FfiConverterTypeName: FfiConverterObject<NameLike>;
5310
+ FfiConverterTypeOidcConfig: {
5311
+ read(from: RustBuffer): OidcConfig;
5312
+ write(value: OidcConfig, into: RustBuffer): void;
5313
+ allocationSize(value: OidcConfig): number;
5314
+ lift(value: UniffiByteArray): OidcConfig;
5315
+ lower(value: OidcConfig, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
5316
+ };
5317
+ FfiConverterTypeOidcPolicyConfig: {
5318
+ read(from: RustBuffer): OidcPolicyConfig;
5319
+ write(value: OidcPolicyConfig, into: RustBuffer): void;
5320
+ allocationSize(value: OidcPolicyConfig): number;
5321
+ lift(value: UniffiByteArray): OidcPolicyConfig;
5322
+ lower(value: OidcPolicyConfig, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
5323
+ };
5037
5324
  FfiConverterTypeParticipantInfo: {
5038
5325
  read(from: RustBuffer): ParticipantInfo;
5039
5326
  write(value: ParticipantInfo, into: RustBuffer): void;