@goauthentik/api 2025.12.0-rc1-1765381247 → 2025.12.0-rc1-1765387260

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 (40) hide show
  1. package/.openapi-generator/FILES +1 -0
  2. package/dist/apis/SourcesApi.d.ts +13 -1
  3. package/dist/apis/SourcesApi.d.ts.map +1 -1
  4. package/dist/apis/SourcesApi.js +38 -0
  5. package/dist/apis/SourcesApi.js.map +1 -1
  6. package/dist/esm/apis/SourcesApi.d.ts +13 -1
  7. package/dist/esm/apis/SourcesApi.d.ts.map +1 -1
  8. package/dist/esm/apis/SourcesApi.js +38 -0
  9. package/dist/esm/apis/SourcesApi.js.map +1 -1
  10. package/dist/esm/models/TelegramAuthRequest.d.ts +69 -0
  11. package/dist/esm/models/TelegramAuthRequest.d.ts.map +1 -0
  12. package/dist/esm/models/TelegramAuthRequest.js +67 -0
  13. package/dist/esm/models/TelegramAuthRequest.js.map +1 -0
  14. package/dist/esm/models/TelegramChallengeResponseRequest.d.ts +6 -6
  15. package/dist/esm/models/TelegramChallengeResponseRequest.d.ts.map +1 -1
  16. package/dist/esm/models/TelegramChallengeResponseRequest.js +2 -2
  17. package/dist/esm/models/TelegramChallengeResponseRequest.js.map +1 -1
  18. package/dist/esm/models/index.d.ts +1 -0
  19. package/dist/esm/models/index.d.ts.map +1 -1
  20. package/dist/esm/models/index.js +1 -0
  21. package/dist/esm/models/index.js.map +1 -1
  22. package/dist/models/TelegramAuthRequest.d.ts +69 -0
  23. package/dist/models/TelegramAuthRequest.d.ts.map +1 -0
  24. package/dist/models/TelegramAuthRequest.js +67 -0
  25. package/dist/models/TelegramAuthRequest.js.map +1 -0
  26. package/dist/models/TelegramChallengeResponseRequest.d.ts +6 -6
  27. package/dist/models/TelegramChallengeResponseRequest.d.ts.map +1 -1
  28. package/dist/models/TelegramChallengeResponseRequest.js +2 -2
  29. package/dist/models/TelegramChallengeResponseRequest.js.map +1 -1
  30. package/dist/models/index.d.ts +1 -0
  31. package/dist/models/index.d.ts.map +1 -1
  32. package/dist/models/index.js +1 -0
  33. package/dist/models/index.js.map +1 -1
  34. package/dist/tsconfig.esm.tsbuildinfo +1 -1
  35. package/package.json +1 -1
  36. package/src/apis/SourcesApi.ts +63 -0
  37. package/src/models/TelegramAuthRequest.ts +116 -0
  38. package/src/models/TelegramChallengeResponseRequest.ts +8 -8
  39. package/src/models/index.ts +1 -0
  40. package/tsconfig.tsbuildinfo +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@goauthentik/api",
3
- "version": "2025.12.0-rc1-1765381247",
3
+ "version": "2025.12.0-rc1-1765387260",
4
4
  "description": "OpenAPI client for @goauthentik/api",
5
5
  "author": "OpenAPI-Generator",
6
6
  "repository": {
@@ -100,6 +100,7 @@ import type {
100
100
  Source,
101
101
  SourceType,
102
102
  SyncStatus,
103
+ TelegramAuthRequest,
103
104
  TelegramSource,
104
105
  TelegramSourceRequest,
105
106
  TypeCreate,
@@ -292,6 +293,8 @@ import {
292
293
  SourceTypeToJSON,
293
294
  SyncStatusFromJSON,
294
295
  SyncStatusToJSON,
296
+ TelegramAuthRequestFromJSON,
297
+ TelegramAuthRequestToJSON,
295
298
  TelegramSourceFromJSON,
296
299
  TelegramSourceToJSON,
297
300
  TelegramSourceRequestFromJSON,
@@ -990,6 +993,11 @@ export interface SourcesScimUsersUsedByListRequest {
990
993
  id: string;
991
994
  }
992
995
 
996
+ export interface SourcesTelegramConnectUserCreateRequest {
997
+ slug: string;
998
+ telegramAuthRequest: TelegramAuthRequest;
999
+ }
1000
+
993
1001
  export interface SourcesTelegramCreateRequest {
994
1002
  telegramSourceRequest: TelegramSourceRequest;
995
1003
  }
@@ -7335,6 +7343,61 @@ export class SourcesApi extends runtime.BaseAPI {
7335
7343
  return await response.value();
7336
7344
  }
7337
7345
 
7346
+ /**
7347
+ * Mixin to add a used_by endpoint to return a list of all objects using this object
7348
+ */
7349
+ async sourcesTelegramConnectUserCreateRaw(requestParameters: SourcesTelegramConnectUserCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UserTelegramSourceConnection>> {
7350
+ if (requestParameters['slug'] == null) {
7351
+ throw new runtime.RequiredError(
7352
+ 'slug',
7353
+ 'Required parameter "slug" was null or undefined when calling sourcesTelegramConnectUserCreate().'
7354
+ );
7355
+ }
7356
+
7357
+ if (requestParameters['telegramAuthRequest'] == null) {
7358
+ throw new runtime.RequiredError(
7359
+ 'telegramAuthRequest',
7360
+ 'Required parameter "telegramAuthRequest" was null or undefined when calling sourcesTelegramConnectUserCreate().'
7361
+ );
7362
+ }
7363
+
7364
+ const queryParameters: any = {};
7365
+
7366
+ const headerParameters: runtime.HTTPHeaders = {};
7367
+
7368
+ headerParameters['Content-Type'] = 'application/json';
7369
+
7370
+ if (this.configuration && this.configuration.accessToken) {
7371
+ const token = this.configuration.accessToken;
7372
+ const tokenString = await token("authentik", []);
7373
+
7374
+ if (tokenString) {
7375
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
7376
+ }
7377
+ }
7378
+
7379
+ let urlPath = `/sources/telegram/{slug}/connect_user/`;
7380
+ urlPath = urlPath.replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters['slug'])));
7381
+
7382
+ const response = await this.request({
7383
+ path: urlPath,
7384
+ method: 'POST',
7385
+ headers: headerParameters,
7386
+ query: queryParameters,
7387
+ body: TelegramAuthRequestToJSON(requestParameters['telegramAuthRequest']),
7388
+ }, initOverrides);
7389
+
7390
+ return new runtime.JSONApiResponse(response, (jsonValue) => UserTelegramSourceConnectionFromJSON(jsonValue));
7391
+ }
7392
+
7393
+ /**
7394
+ * Mixin to add a used_by endpoint to return a list of all objects using this object
7395
+ */
7396
+ async sourcesTelegramConnectUserCreate(requestParameters: SourcesTelegramConnectUserCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserTelegramSourceConnection> {
7397
+ const response = await this.sourcesTelegramConnectUserCreateRaw(requestParameters, initOverrides);
7398
+ return await response.value();
7399
+ }
7400
+
7338
7401
  /**
7339
7402
  * Mixin to add a used_by endpoint to return a list of all objects using this object
7340
7403
  */
@@ -0,0 +1,116 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * authentik
5
+ * Making authentication simple.
6
+ *
7
+ * The version of the OpenAPI document: 2025.12.0-rc1
8
+ * Contact: hello@goauthentik.io
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime';
16
+ /**
17
+ *
18
+ * @export
19
+ * @interface TelegramAuthRequest
20
+ */
21
+ export interface TelegramAuthRequest {
22
+ /**
23
+ *
24
+ * @type {number}
25
+ * @memberof TelegramAuthRequest
26
+ */
27
+ id: number;
28
+ /**
29
+ *
30
+ * @type {string}
31
+ * @memberof TelegramAuthRequest
32
+ */
33
+ firstName?: string;
34
+ /**
35
+ *
36
+ * @type {string}
37
+ * @memberof TelegramAuthRequest
38
+ */
39
+ lastName?: string;
40
+ /**
41
+ *
42
+ * @type {string}
43
+ * @memberof TelegramAuthRequest
44
+ */
45
+ username?: string;
46
+ /**
47
+ *
48
+ * @type {string}
49
+ * @memberof TelegramAuthRequest
50
+ */
51
+ photoUrl?: string;
52
+ /**
53
+ *
54
+ * @type {number}
55
+ * @memberof TelegramAuthRequest
56
+ */
57
+ authDate: number;
58
+ /**
59
+ *
60
+ * @type {string}
61
+ * @memberof TelegramAuthRequest
62
+ */
63
+ hash: string;
64
+ }
65
+
66
+ /**
67
+ * Check if a given object implements the TelegramAuthRequest interface.
68
+ */
69
+ export function instanceOfTelegramAuthRequest(value: object): value is TelegramAuthRequest {
70
+ if (!('id' in value) || value['id'] === undefined) return false;
71
+ if (!('authDate' in value) || value['authDate'] === undefined) return false;
72
+ if (!('hash' in value) || value['hash'] === undefined) return false;
73
+ return true;
74
+ }
75
+
76
+ export function TelegramAuthRequestFromJSON(json: any): TelegramAuthRequest {
77
+ return TelegramAuthRequestFromJSONTyped(json, false);
78
+ }
79
+
80
+ export function TelegramAuthRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): TelegramAuthRequest {
81
+ if (json == null) {
82
+ return json;
83
+ }
84
+ return {
85
+
86
+ 'id': json['id'],
87
+ 'firstName': json['first_name'] == null ? undefined : json['first_name'],
88
+ 'lastName': json['last_name'] == null ? undefined : json['last_name'],
89
+ 'username': json['username'] == null ? undefined : json['username'],
90
+ 'photoUrl': json['photo_url'] == null ? undefined : json['photo_url'],
91
+ 'authDate': json['auth_date'],
92
+ 'hash': json['hash'],
93
+ };
94
+ }
95
+
96
+ export function TelegramAuthRequestToJSON(json: any): TelegramAuthRequest {
97
+ return TelegramAuthRequestToJSONTyped(json, false);
98
+ }
99
+
100
+ export function TelegramAuthRequestToJSONTyped(value?: TelegramAuthRequest | null, ignoreDiscriminator: boolean = false): any {
101
+ if (value == null) {
102
+ return value;
103
+ }
104
+
105
+ return {
106
+
107
+ 'id': value['id'],
108
+ 'first_name': value['firstName'],
109
+ 'last_name': value['lastName'],
110
+ 'username': value['username'],
111
+ 'photo_url': value['photoUrl'],
112
+ 'auth_date': value['authDate'],
113
+ 'hash': value['hash'],
114
+ };
115
+ }
116
+
@@ -19,12 +19,6 @@ import { mapValues } from '../runtime';
19
19
  * @interface TelegramChallengeResponseRequest
20
20
  */
21
21
  export interface TelegramChallengeResponseRequest {
22
- /**
23
- *
24
- * @type {string}
25
- * @memberof TelegramChallengeResponseRequest
26
- */
27
- component?: string;
28
22
  /**
29
23
  *
30
24
  * @type {number}
@@ -67,6 +61,12 @@ export interface TelegramChallengeResponseRequest {
67
61
  * @memberof TelegramChallengeResponseRequest
68
62
  */
69
63
  hash: string;
64
+ /**
65
+ *
66
+ * @type {string}
67
+ * @memberof TelegramChallengeResponseRequest
68
+ */
69
+ component?: string;
70
70
  }
71
71
 
72
72
  /**
@@ -89,7 +89,6 @@ export function TelegramChallengeResponseRequestFromJSONTyped(json: any, ignoreD
89
89
  }
90
90
  return {
91
91
 
92
- 'component': json['component'] == null ? undefined : json['component'],
93
92
  'id': json['id'],
94
93
  'firstName': json['first_name'] == null ? undefined : json['first_name'],
95
94
  'lastName': json['last_name'] == null ? undefined : json['last_name'],
@@ -97,6 +96,7 @@ export function TelegramChallengeResponseRequestFromJSONTyped(json: any, ignoreD
97
96
  'photoUrl': json['photo_url'] == null ? undefined : json['photo_url'],
98
97
  'authDate': json['auth_date'],
99
98
  'hash': json['hash'],
99
+ 'component': json['component'] == null ? undefined : json['component'],
100
100
  };
101
101
  }
102
102
 
@@ -111,7 +111,6 @@ export function TelegramChallengeResponseRequestToJSONTyped(value?: TelegramChal
111
111
 
112
112
  return {
113
113
 
114
- 'component': value['component'],
115
114
  'id': value['id'],
116
115
  'first_name': value['firstName'],
117
116
  'last_name': value['lastName'],
@@ -119,6 +118,7 @@ export function TelegramChallengeResponseRequestToJSONTyped(value?: TelegramChal
119
118
  'photo_url': value['photoUrl'],
120
119
  'auth_date': value['authDate'],
121
120
  'hash': value['hash'],
121
+ 'component': value['component'],
122
122
  };
123
123
  }
124
124
 
@@ -755,6 +755,7 @@ export * from './TOTPDevice';
755
755
  export * from './TOTPDeviceRequest';
756
756
  export * from './Task';
757
757
  export * from './TaskAggregatedStatusEnum';
758
+ export * from './TelegramAuthRequest';
758
759
  export * from './TelegramChallengeResponseRequest';
759
760
  export * from './TelegramLoginChallenge';
760
761
  export * from './TelegramSource';