@meshery/schemas 0.8.131 → 0.8.133

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 (36) hide show
  1. package/README.md +69 -0
  2. package/dist/cloudApi.d.mts +10460 -5916
  3. package/dist/cloudApi.d.ts +10460 -5916
  4. package/dist/cloudApi.js +1 -1
  5. package/dist/cloudApi.mjs +1 -1
  6. package/dist/constructs/v1beta1/credential/Credential.d.mts +41 -39
  7. package/dist/constructs/v1beta1/credential/Credential.d.ts +41 -39
  8. package/dist/constructs/v1beta1/credential/CredentialSchema.js +2 -2
  9. package/dist/constructs/v1beta1/credential/CredentialSchema.mjs +2 -2
  10. package/dist/constructs/v1beta1/event/Event.d.mts +149 -0
  11. package/dist/constructs/v1beta1/event/Event.d.ts +149 -0
  12. package/dist/constructs/v1beta1/event/EventSchema.js +1 -1
  13. package/dist/constructs/v1beta1/event/EventSchema.mjs +1 -1
  14. package/dist/constructs/v1beta1/role/Role.d.mts +90 -36
  15. package/dist/constructs/v1beta1/role/Role.d.ts +90 -36
  16. package/dist/constructs/v1beta1/role/RoleSchema.js +1 -1
  17. package/dist/constructs/v1beta1/role/RoleSchema.mjs +1 -1
  18. package/dist/constructs/v1beta1/token/Token.d.mts +538 -0
  19. package/dist/constructs/v1beta1/token/Token.d.ts +538 -0
  20. package/dist/constructs/v1beta1/token/Token.js +1 -0
  21. package/dist/constructs/v1beta1/token/Token.mjs +0 -0
  22. package/dist/constructs/v1beta1/token/TokenSchema.d.mts +7 -0
  23. package/dist/constructs/v1beta1/token/TokenSchema.d.ts +7 -0
  24. package/dist/constructs/v1beta1/token/TokenSchema.js +2 -0
  25. package/dist/constructs/v1beta1/token/TokenSchema.mjs +2 -0
  26. package/dist/constructs/v1beta1/workspace/Workspace.d.mts +4393 -185
  27. package/dist/constructs/v1beta1/workspace/Workspace.d.ts +4393 -185
  28. package/dist/constructs/v1beta1/workspace/WorkspaceSchema.js +97 -1
  29. package/dist/constructs/v1beta1/workspace/WorkspaceSchema.mjs +97 -1
  30. package/dist/index.js +98 -2
  31. package/dist/index.mjs +98 -2
  32. package/dist/mesheryApi.d.mts +192 -1130
  33. package/dist/mesheryApi.d.ts +192 -1130
  34. package/dist/mesheryApi.js +1 -1
  35. package/dist/mesheryApi.mjs +1 -1
  36. package/package.json +1 -1
@@ -0,0 +1,538 @@
1
+ /**
2
+ * This file was auto-generated by openapi-typescript.
3
+ * Do not make direct changes to the file.
4
+ */
5
+ interface paths {
6
+ "/api/identity/tokens": {
7
+ /** Retrieves tokens associated with the authenticated user. */
8
+ get: operations["getUserTokens"];
9
+ /** Generates a token for the authenticated user. */
10
+ post: operations["generateToken"];
11
+ /** Deletes a specific token for the authenticated user. */
12
+ delete: operations["deleteUserToken"];
13
+ };
14
+ "/api/identity/tokens/{id}": {
15
+ /** Retrieves a specific token by its ID. */
16
+ get: operations["getUserTokensById"];
17
+ };
18
+ "/api/identity/tokens/infinite": {
19
+ /** Creates a non-expiring user token for provider admin use cases. */
20
+ get: operations["issueIndefiniteLifetimeToken"];
21
+ };
22
+ }
23
+ interface components {
24
+ schemas: {
25
+ /** @description Represents a user-owned API token or OAuth session. */
26
+ UserToken: {
27
+ /**
28
+ * Format: uuid
29
+ * @description Unique identifier for the token.
30
+ */
31
+ id?: string;
32
+ /**
33
+ * Format: uuid
34
+ * @description UUID of the user who owns the token.
35
+ */
36
+ user_id?: string;
37
+ /** @description Authentication provider associated with the token. */
38
+ provider?: string;
39
+ /** @description Access token value. */
40
+ access_token?: string;
41
+ /** @description Refresh token value when applicable. */
42
+ refresh_token?: string;
43
+ /** @description Human-readable token name. */
44
+ name?: string;
45
+ /** @description Purpose for which the token was created. */
46
+ purpose?: string;
47
+ /** @description Whether this entry represents an OAuth session. */
48
+ is_oauth?: boolean;
49
+ /**
50
+ * Format: date-time
51
+ * @description Timestamp when the resource was created.
52
+ */
53
+ created_at?: string;
54
+ /**
55
+ * Format: date-time
56
+ * @description Timestamp when the resource was updated.
57
+ */
58
+ updated_at?: string;
59
+ };
60
+ /** @description A paginated list of tokens. */
61
+ TokenPage: {
62
+ tokens: {
63
+ /**
64
+ * Format: uuid
65
+ * @description Unique identifier for the token.
66
+ */
67
+ id?: string;
68
+ /**
69
+ * Format: uuid
70
+ * @description UUID of the user who owns the token.
71
+ */
72
+ user_id?: string;
73
+ /** @description Authentication provider associated with the token. */
74
+ provider?: string;
75
+ /** @description Access token value. */
76
+ access_token?: string;
77
+ /** @description Refresh token value when applicable. */
78
+ refresh_token?: string;
79
+ /** @description Human-readable token name. */
80
+ name?: string;
81
+ /** @description Purpose for which the token was created. */
82
+ purpose?: string;
83
+ /** @description Whether this entry represents an OAuth session. */
84
+ is_oauth?: boolean;
85
+ /**
86
+ * Format: date-time
87
+ * @description Timestamp when the resource was created.
88
+ */
89
+ created_at?: string;
90
+ /**
91
+ * Format: date-time
92
+ * @description Timestamp when the resource was updated.
93
+ */
94
+ updated_at?: string;
95
+ }[];
96
+ /** @description Total number of tokens across all pages. */
97
+ total_count: number;
98
+ /** @description Current page number (zero-based). */
99
+ page: number;
100
+ /** @description Number of tokens per page. */
101
+ page_size: number;
102
+ };
103
+ };
104
+ responses: {
105
+ /** Invalid request body or request param */
106
+ 400: {
107
+ content: {
108
+ "text/plain": string;
109
+ };
110
+ };
111
+ /** Expired JWT token used or insufficient privilege */
112
+ 401: {
113
+ content: {
114
+ "text/plain": string;
115
+ };
116
+ };
117
+ /** Result not found */
118
+ 404: {
119
+ content: {
120
+ "text/plain": string;
121
+ };
122
+ };
123
+ /** Internal server error */
124
+ 500: {
125
+ content: {
126
+ "text/plain": string;
127
+ };
128
+ };
129
+ };
130
+ parameters: {
131
+ /** @description Token ID */
132
+ id: string;
133
+ /** @description Get responses by page */
134
+ page: string;
135
+ /** @description Get responses by pagesize */
136
+ pagesize: string;
137
+ /** @description Get responses that match search param value */
138
+ search: string;
139
+ /** @description Get ordered responses */
140
+ order: string;
141
+ /** @description Whether to retrieve OAuth-backed sessions instead of API tokens. */
142
+ isOAuth: boolean;
143
+ /** @description Name of the token. */
144
+ name: string;
145
+ /** @description Purpose for which the token is generated. */
146
+ purpose: string;
147
+ /** @description ID of the token. */
148
+ tokenId: string;
149
+ /** @description UUID of the user. */
150
+ userId: string;
151
+ /** @description Remote provider. */
152
+ provider: string;
153
+ };
154
+ }
155
+ interface operations {
156
+ /** Retrieves tokens associated with the authenticated user. */
157
+ getUserTokens: {
158
+ parameters: {
159
+ query: {
160
+ /** Whether to retrieve OAuth-backed sessions instead of API tokens. */
161
+ isOAuth?: boolean;
162
+ /** Get responses by page */
163
+ page?: string;
164
+ /** Get responses by pagesize */
165
+ pagesize?: string;
166
+ /** Get responses that match search param value */
167
+ search?: string;
168
+ /** Get ordered responses */
169
+ order?: string;
170
+ };
171
+ };
172
+ responses: {
173
+ /** Tokens fetched successfully */
174
+ 200: {
175
+ content: {
176
+ "application/json": {
177
+ tokens: {
178
+ /**
179
+ * Format: uuid
180
+ * @description Unique identifier for the token.
181
+ */
182
+ id?: string;
183
+ /**
184
+ * Format: uuid
185
+ * @description UUID of the user who owns the token.
186
+ */
187
+ user_id?: string;
188
+ /** @description Authentication provider associated with the token. */
189
+ provider?: string;
190
+ /** @description Access token value. */
191
+ access_token?: string;
192
+ /** @description Refresh token value when applicable. */
193
+ refresh_token?: string;
194
+ /** @description Human-readable token name. */
195
+ name?: string;
196
+ /** @description Purpose for which the token was created. */
197
+ purpose?: string;
198
+ /** @description Whether this entry represents an OAuth session. */
199
+ is_oauth?: boolean;
200
+ /**
201
+ * Format: date-time
202
+ * @description Timestamp when the resource was created.
203
+ */
204
+ created_at?: string;
205
+ /**
206
+ * Format: date-time
207
+ * @description Timestamp when the resource was updated.
208
+ */
209
+ updated_at?: string;
210
+ }[];
211
+ /** @description Total number of tokens across all pages. */
212
+ total_count: number;
213
+ /** @description Current page number (zero-based). */
214
+ page: number;
215
+ /** @description Number of tokens per page. */
216
+ page_size: number;
217
+ };
218
+ };
219
+ };
220
+ /** Expired JWT token used or insufficient privilege */
221
+ 401: {
222
+ content: {
223
+ "text/plain": string;
224
+ };
225
+ };
226
+ /** Internal server error */
227
+ 500: {
228
+ content: {
229
+ "text/plain": string;
230
+ };
231
+ };
232
+ };
233
+ };
234
+ /** Generates a token for the authenticated user. */
235
+ generateToken: {
236
+ parameters: {
237
+ query: {
238
+ /** Name of the token. */
239
+ name: string;
240
+ /** Purpose for which the token is generated. */
241
+ purpose?: string;
242
+ };
243
+ };
244
+ responses: {
245
+ /** Token generated successfully */
246
+ 200: {
247
+ content: {
248
+ "application/json": {
249
+ tokens: {
250
+ /**
251
+ * Format: uuid
252
+ * @description Unique identifier for the token.
253
+ */
254
+ id?: string;
255
+ /**
256
+ * Format: uuid
257
+ * @description UUID of the user who owns the token.
258
+ */
259
+ user_id?: string;
260
+ /** @description Authentication provider associated with the token. */
261
+ provider?: string;
262
+ /** @description Access token value. */
263
+ access_token?: string;
264
+ /** @description Refresh token value when applicable. */
265
+ refresh_token?: string;
266
+ /** @description Human-readable token name. */
267
+ name?: string;
268
+ /** @description Purpose for which the token was created. */
269
+ purpose?: string;
270
+ /** @description Whether this entry represents an OAuth session. */
271
+ is_oauth?: boolean;
272
+ /**
273
+ * Format: date-time
274
+ * @description Timestamp when the resource was created.
275
+ */
276
+ created_at?: string;
277
+ /**
278
+ * Format: date-time
279
+ * @description Timestamp when the resource was updated.
280
+ */
281
+ updated_at?: string;
282
+ }[];
283
+ /** @description Total number of tokens across all pages. */
284
+ total_count: number;
285
+ /** @description Current page number (zero-based). */
286
+ page: number;
287
+ /** @description Number of tokens per page. */
288
+ page_size: number;
289
+ };
290
+ };
291
+ };
292
+ /** Invalid request body or request param */
293
+ 400: {
294
+ content: {
295
+ "text/plain": string;
296
+ };
297
+ };
298
+ /** Expired JWT token used or insufficient privilege */
299
+ 401: {
300
+ content: {
301
+ "text/plain": string;
302
+ };
303
+ };
304
+ /** Internal server error */
305
+ 500: {
306
+ content: {
307
+ "text/plain": string;
308
+ };
309
+ };
310
+ };
311
+ };
312
+ /** Deletes a specific token for the authenticated user. */
313
+ deleteUserToken: {
314
+ parameters: {
315
+ query: {
316
+ /** ID of the token. */
317
+ token_id: string;
318
+ };
319
+ };
320
+ responses: {
321
+ /** Token deleted successfully */
322
+ 200: {
323
+ content: {
324
+ "application/json": {
325
+ tokens: {
326
+ /**
327
+ * Format: uuid
328
+ * @description Unique identifier for the token.
329
+ */
330
+ id?: string;
331
+ /**
332
+ * Format: uuid
333
+ * @description UUID of the user who owns the token.
334
+ */
335
+ user_id?: string;
336
+ /** @description Authentication provider associated with the token. */
337
+ provider?: string;
338
+ /** @description Access token value. */
339
+ access_token?: string;
340
+ /** @description Refresh token value when applicable. */
341
+ refresh_token?: string;
342
+ /** @description Human-readable token name. */
343
+ name?: string;
344
+ /** @description Purpose for which the token was created. */
345
+ purpose?: string;
346
+ /** @description Whether this entry represents an OAuth session. */
347
+ is_oauth?: boolean;
348
+ /**
349
+ * Format: date-time
350
+ * @description Timestamp when the resource was created.
351
+ */
352
+ created_at?: string;
353
+ /**
354
+ * Format: date-time
355
+ * @description Timestamp when the resource was updated.
356
+ */
357
+ updated_at?: string;
358
+ }[];
359
+ /** @description Total number of tokens across all pages. */
360
+ total_count: number;
361
+ /** @description Current page number (zero-based). */
362
+ page: number;
363
+ /** @description Number of tokens per page. */
364
+ page_size: number;
365
+ };
366
+ };
367
+ };
368
+ /** Invalid request body or request param */
369
+ 400: {
370
+ content: {
371
+ "text/plain": string;
372
+ };
373
+ };
374
+ /** Expired JWT token used or insufficient privilege */
375
+ 401: {
376
+ content: {
377
+ "text/plain": string;
378
+ };
379
+ };
380
+ /** Internal server error */
381
+ 500: {
382
+ content: {
383
+ "text/plain": string;
384
+ };
385
+ };
386
+ };
387
+ };
388
+ /** Retrieves a specific token by its ID. */
389
+ getUserTokensById: {
390
+ parameters: {
391
+ path: {
392
+ /** Token ID */
393
+ id: string;
394
+ };
395
+ };
396
+ responses: {
397
+ /** Token fetched successfully */
398
+ 200: {
399
+ content: {
400
+ "application/json": {
401
+ /**
402
+ * Format: uuid
403
+ * @description Unique identifier for the token.
404
+ */
405
+ id?: string;
406
+ /**
407
+ * Format: uuid
408
+ * @description UUID of the user who owns the token.
409
+ */
410
+ user_id?: string;
411
+ /** @description Authentication provider associated with the token. */
412
+ provider?: string;
413
+ /** @description Access token value. */
414
+ access_token?: string;
415
+ /** @description Refresh token value when applicable. */
416
+ refresh_token?: string;
417
+ /** @description Human-readable token name. */
418
+ name?: string;
419
+ /** @description Purpose for which the token was created. */
420
+ purpose?: string;
421
+ /** @description Whether this entry represents an OAuth session. */
422
+ is_oauth?: boolean;
423
+ /**
424
+ * Format: date-time
425
+ * @description Timestamp when the resource was created.
426
+ */
427
+ created_at?: string;
428
+ /**
429
+ * Format: date-time
430
+ * @description Timestamp when the resource was updated.
431
+ */
432
+ updated_at?: string;
433
+ };
434
+ };
435
+ };
436
+ /** Expired JWT token used or insufficient privilege */
437
+ 401: {
438
+ content: {
439
+ "text/plain": string;
440
+ };
441
+ };
442
+ /** Result not found */
443
+ 404: {
444
+ content: {
445
+ "text/plain": string;
446
+ };
447
+ };
448
+ /** Internal server error */
449
+ 500: {
450
+ content: {
451
+ "text/plain": string;
452
+ };
453
+ };
454
+ };
455
+ };
456
+ /** Creates a non-expiring user token for provider admin use cases. */
457
+ issueIndefiniteLifetimeToken: {
458
+ parameters: {
459
+ query: {
460
+ /** UUID of the user. */
461
+ user_id: string;
462
+ /** Remote provider. */
463
+ provider: string;
464
+ };
465
+ };
466
+ responses: {
467
+ /** Token generated successfully */
468
+ 200: {
469
+ content: {
470
+ "application/json": {
471
+ tokens: {
472
+ /**
473
+ * Format: uuid
474
+ * @description Unique identifier for the token.
475
+ */
476
+ id?: string;
477
+ /**
478
+ * Format: uuid
479
+ * @description UUID of the user who owns the token.
480
+ */
481
+ user_id?: string;
482
+ /** @description Authentication provider associated with the token. */
483
+ provider?: string;
484
+ /** @description Access token value. */
485
+ access_token?: string;
486
+ /** @description Refresh token value when applicable. */
487
+ refresh_token?: string;
488
+ /** @description Human-readable token name. */
489
+ name?: string;
490
+ /** @description Purpose for which the token was created. */
491
+ purpose?: string;
492
+ /** @description Whether this entry represents an OAuth session. */
493
+ is_oauth?: boolean;
494
+ /**
495
+ * Format: date-time
496
+ * @description Timestamp when the resource was created.
497
+ */
498
+ created_at?: string;
499
+ /**
500
+ * Format: date-time
501
+ * @description Timestamp when the resource was updated.
502
+ */
503
+ updated_at?: string;
504
+ }[];
505
+ /** @description Total number of tokens across all pages. */
506
+ total_count: number;
507
+ /** @description Current page number (zero-based). */
508
+ page: number;
509
+ /** @description Number of tokens per page. */
510
+ page_size: number;
511
+ };
512
+ };
513
+ };
514
+ /** Invalid request body or request param */
515
+ 400: {
516
+ content: {
517
+ "text/plain": string;
518
+ };
519
+ };
520
+ /** Expired JWT token used or insufficient privilege */
521
+ 401: {
522
+ content: {
523
+ "text/plain": string;
524
+ };
525
+ };
526
+ /** Internal server error */
527
+ 500: {
528
+ content: {
529
+ "text/plain": string;
530
+ };
531
+ };
532
+ };
533
+ };
534
+ }
535
+ interface external {
536
+ }
537
+
538
+ export type { components, external, operations, paths };
@@ -0,0 +1 @@
1
+ 'use strict';
File without changes
@@ -0,0 +1,7 @@
1
+ /**
2
+ * This file was automatically generated from OpenAPI schema.
3
+ * Do not manually modify this file.
4
+ */
5
+ declare const TokenSchema: Record<string, unknown>;
6
+
7
+ export { TokenSchema as default };
@@ -0,0 +1,7 @@
1
+ /**
2
+ * This file was automatically generated from OpenAPI schema.
3
+ * Do not manually modify this file.
4
+ */
5
+ declare const TokenSchema: Record<string, unknown>;
6
+
7
+ export { TokenSchema as default };
@@ -0,0 +1,2 @@
1
+ 'use strict';var e={openapi:"3.0.0",info:{title:"token",description:"Documentation for Meshery Cloud REST APIs for user tokens and sessions",contact:{name:"Meshery Maintainers",email:"maintainers@meshery.io",url:"https://meshery.io"},license:{name:"Apache 2.0",url:"https://www.apache.org/licenses/LICENSE-2.0.html"},version:"v1beta1"},servers:[{url:"https://cloud.layer5.io",description:"Meshery Cloud production server URL"},{url:"https://staging-cloud.layer5.io",description:"Meshery Cloud staging server URL"},{url:"http://localhost:9876",description:"Meshery Cloud development server URL"}],security:[{jwt:[]}],tags:[{name:"tokens",description:"Operations related to user tokens and sessions"}],paths:{"/api/identity/tokens":{get:{"x-internal":["cloud"],tags:["tokens"],summary:"Get tokens",operationId:"getUserTokens",description:"Retrieves tokens associated with the authenticated user.",parameters:[{name:"isOAuth",in:"query",description:"Whether to retrieve OAuth-backed sessions instead of API tokens.",schema:{type:"boolean"}},{name:"page",in:"query",description:"Get responses by page",schema:{type:"string"}},{name:"pagesize",in:"query",description:"Get responses by pagesize",schema:{type:"string"}},{name:"search",in:"query",description:"Get responses that match search param value",schema:{type:"string"}},{name:"order",in:"query",description:"Get ordered responses",schema:{type:"string"}}],responses:{200:{description:"Tokens fetched successfully",content:{"application/json":{schema:{type:"object",description:"A paginated list of tokens.",required:["tokens","total_count","page","page_size"],properties:{tokens:{type:"array",items:{"x-go-type":"UserToken",type:"object",description:"Represents a user-owned API token or OAuth session.",properties:{id:{description:"Unique identifier for the token.","x-order":1,"x-oapi-codegen-extra-tags":{db:"id"},type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},user_id:{description:"UUID of the user who owns the token.","x-order":2,"x-oapi-codegen-extra-tags":{db:"user_id"},type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},provider:{type:"string",description:"Authentication provider associated with the token.","x-order":3,"x-oapi-codegen-extra-tags":{db:"provider"}},access_token:{type:"string",description:"Access token value.","x-order":4,"x-oapi-codegen-extra-tags":{db:"access_token"}},refresh_token:{type:"string",description:"Refresh token value when applicable.","x-order":5,"x-oapi-codegen-extra-tags":{db:"refresh_token"}},name:{type:"string",description:"Human-readable token name.","x-order":6,"x-oapi-codegen-extra-tags":{db:"name"}},purpose:{type:"string",description:"Purpose for which the token was created.","x-order":7,"x-oapi-codegen-extra-tags":{db:"purpose"}},is_oauth:{type:"boolean",description:"Whether this entry represents an OAuth session.","x-order":8,"x-oapi-codegen-extra-tags":{db:"is_oauth"}},created_at:{"x-order":9,description:"Timestamp when the resource was created.","x-go-type":"time.Time",type:"string",format:"date-time","x-go-name":"CreatedAt","x-oapi-codegen-extra-tags":{db:"created_at",yaml:"created_at"},"x-go-type-skip-optional-pointer":true},updated_at:{"x-order":10,description:"Timestamp when the resource was updated.","x-go-type":"time.Time",type:"string",format:"date-time","x-go-name":"UpdatedAt","x-oapi-codegen-extra-tags":{db:"updated_at",yaml:"updated_at"},"x-go-type-skip-optional-pointer":true}}},"x-order":1},total_count:{type:"integer",description:"Total number of tokens across all pages.","x-order":2},page:{type:"integer",description:"Current page number (zero-based).","x-order":3},page_size:{type:"integer",description:"Number of tokens per page.","x-order":4}}}}}},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}}},post:{"x-internal":["cloud"],tags:["tokens"],summary:"Generate token",operationId:"generateToken",description:"Generates a token for the authenticated user.",parameters:[{name:"name",in:"query",description:"Name of the token.",required:true,schema:{type:"string"}},{name:"purpose",in:"query",description:"Purpose for which the token is generated.",schema:{type:"string"}}],responses:{200:{description:"Token generated successfully",content:{"application/json":{schema:{type:"object",description:"A paginated list of tokens.",required:["tokens","total_count","page","page_size"],properties:{tokens:{type:"array",items:{"x-go-type":"UserToken",type:"object",description:"Represents a user-owned API token or OAuth session.",properties:{id:{description:"Unique identifier for the token.","x-order":1,"x-oapi-codegen-extra-tags":{db:"id"},type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},user_id:{description:"UUID of the user who owns the token.","x-order":2,"x-oapi-codegen-extra-tags":{db:"user_id"},type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},provider:{type:"string",description:"Authentication provider associated with the token.","x-order":3,"x-oapi-codegen-extra-tags":{db:"provider"}},access_token:{type:"string",description:"Access token value.","x-order":4,"x-oapi-codegen-extra-tags":{db:"access_token"}},refresh_token:{type:"string",description:"Refresh token value when applicable.","x-order":5,"x-oapi-codegen-extra-tags":{db:"refresh_token"}},name:{type:"string",description:"Human-readable token name.","x-order":6,"x-oapi-codegen-extra-tags":{db:"name"}},purpose:{type:"string",description:"Purpose for which the token was created.","x-order":7,"x-oapi-codegen-extra-tags":{db:"purpose"}},is_oauth:{type:"boolean",description:"Whether this entry represents an OAuth session.","x-order":8,"x-oapi-codegen-extra-tags":{db:"is_oauth"}},created_at:{"x-order":9,description:"Timestamp when the resource was created.","x-go-type":"time.Time",type:"string",format:"date-time","x-go-name":"CreatedAt","x-oapi-codegen-extra-tags":{db:"created_at",yaml:"created_at"},"x-go-type-skip-optional-pointer":true},updated_at:{"x-order":10,description:"Timestamp when the resource was updated.","x-go-type":"time.Time",type:"string",format:"date-time","x-go-name":"UpdatedAt","x-oapi-codegen-extra-tags":{db:"updated_at",yaml:"updated_at"},"x-go-type-skip-optional-pointer":true}}},"x-order":1},total_count:{type:"integer",description:"Total number of tokens across all pages.","x-order":2},page:{type:"integer",description:"Current page number (zero-based).","x-order":3},page_size:{type:"integer",description:"Number of tokens per page.","x-order":4}}}}}},400:{description:"Invalid request body or request param",content:{"text/plain":{schema:{type:"string"}}}},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}}},delete:{"x-internal":["cloud"],tags:["tokens"],summary:"Delete token",operationId:"deleteUserToken",description:"Deletes a specific token for the authenticated user.",parameters:[{name:"token_id",in:"query",description:"ID of the token.",required:true,schema:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}}}],responses:{200:{description:"Token deleted successfully",content:{"application/json":{schema:{type:"object",description:"A paginated list of tokens.",required:["tokens","total_count","page","page_size"],properties:{tokens:{type:"array",items:{"x-go-type":"UserToken",type:"object",description:"Represents a user-owned API token or OAuth session.",properties:{id:{description:"Unique identifier for the token.","x-order":1,"x-oapi-codegen-extra-tags":{db:"id"},type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},user_id:{description:"UUID of the user who owns the token.","x-order":2,"x-oapi-codegen-extra-tags":{db:"user_id"},type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},provider:{type:"string",description:"Authentication provider associated with the token.","x-order":3,"x-oapi-codegen-extra-tags":{db:"provider"}},access_token:{type:"string",description:"Access token value.","x-order":4,"x-oapi-codegen-extra-tags":{db:"access_token"}},refresh_token:{type:"string",description:"Refresh token value when applicable.","x-order":5,"x-oapi-codegen-extra-tags":{db:"refresh_token"}},name:{type:"string",description:"Human-readable token name.","x-order":6,"x-oapi-codegen-extra-tags":{db:"name"}},purpose:{type:"string",description:"Purpose for which the token was created.","x-order":7,"x-oapi-codegen-extra-tags":{db:"purpose"}},is_oauth:{type:"boolean",description:"Whether this entry represents an OAuth session.","x-order":8,"x-oapi-codegen-extra-tags":{db:"is_oauth"}},created_at:{"x-order":9,description:"Timestamp when the resource was created.","x-go-type":"time.Time",type:"string",format:"date-time","x-go-name":"CreatedAt","x-oapi-codegen-extra-tags":{db:"created_at",yaml:"created_at"},"x-go-type-skip-optional-pointer":true},updated_at:{"x-order":10,description:"Timestamp when the resource was updated.","x-go-type":"time.Time",type:"string",format:"date-time","x-go-name":"UpdatedAt","x-oapi-codegen-extra-tags":{db:"updated_at",yaml:"updated_at"},"x-go-type-skip-optional-pointer":true}}},"x-order":1},total_count:{type:"integer",description:"Total number of tokens across all pages.","x-order":2},page:{type:"integer",description:"Current page number (zero-based).","x-order":3},page_size:{type:"integer",description:"Number of tokens per page.","x-order":4}}}}}},400:{description:"Invalid request body or request param",content:{"text/plain":{schema:{type:"string"}}}},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}}}},"/api/identity/tokens/{id}":{get:{"x-internal":["cloud"],tags:["tokens"],summary:"Get token by ID",operationId:"getUserTokensById",description:"Retrieves a specific token by its ID.",parameters:[{name:"id",in:"path",description:"Token ID",required:true,schema:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}}}],responses:{200:{description:"Token fetched successfully",content:{"application/json":{schema:{type:"object",description:"Represents a user-owned API token or OAuth session.",properties:{id:{description:"Unique identifier for the token.","x-order":1,"x-oapi-codegen-extra-tags":{db:"id"},type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},user_id:{description:"UUID of the user who owns the token.","x-order":2,"x-oapi-codegen-extra-tags":{db:"user_id"},type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},provider:{type:"string",description:"Authentication provider associated with the token.","x-order":3,"x-oapi-codegen-extra-tags":{db:"provider"}},access_token:{type:"string",description:"Access token value.","x-order":4,"x-oapi-codegen-extra-tags":{db:"access_token"}},refresh_token:{type:"string",description:"Refresh token value when applicable.","x-order":5,"x-oapi-codegen-extra-tags":{db:"refresh_token"}},name:{type:"string",description:"Human-readable token name.","x-order":6,"x-oapi-codegen-extra-tags":{db:"name"}},purpose:{type:"string",description:"Purpose for which the token was created.","x-order":7,"x-oapi-codegen-extra-tags":{db:"purpose"}},is_oauth:{type:"boolean",description:"Whether this entry represents an OAuth session.","x-order":8,"x-oapi-codegen-extra-tags":{db:"is_oauth"}},created_at:{"x-order":9,description:"Timestamp when the resource was created.","x-go-type":"time.Time",type:"string",format:"date-time","x-go-name":"CreatedAt","x-oapi-codegen-extra-tags":{db:"created_at",yaml:"created_at"},"x-go-type-skip-optional-pointer":true},updated_at:{"x-order":10,description:"Timestamp when the resource was updated.","x-go-type":"time.Time",type:"string",format:"date-time","x-go-name":"UpdatedAt","x-oapi-codegen-extra-tags":{db:"updated_at",yaml:"updated_at"},"x-go-type-skip-optional-pointer":true}}}}}},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},404:{description:"Result not found",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}}}},"/api/identity/tokens/infinite":{get:{"x-internal":["cloud"],tags:["tokens"],summary:"Issue indefinite lifetime token",operationId:"issueIndefiniteLifetimeToken",description:"Creates a non-expiring user token for provider admin use cases.",parameters:[{name:"user_id",in:"query",description:"UUID of the user.",required:true,schema:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}}},{name:"provider",in:"query",description:"Remote provider.",required:true,schema:{type:"string"}}],responses:{200:{description:"Token generated successfully",content:{"application/json":{schema:{type:"object",description:"A paginated list of tokens.",required:["tokens","total_count","page","page_size"],properties:{tokens:{type:"array",items:{"x-go-type":"UserToken",type:"object",description:"Represents a user-owned API token or OAuth session.",properties:{id:{description:"Unique identifier for the token.","x-order":1,"x-oapi-codegen-extra-tags":{db:"id"},type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},user_id:{description:"UUID of the user who owns the token.","x-order":2,"x-oapi-codegen-extra-tags":{db:"user_id"},type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},provider:{type:"string",description:"Authentication provider associated with the token.","x-order":3,"x-oapi-codegen-extra-tags":{db:"provider"}},access_token:{type:"string",description:"Access token value.","x-order":4,"x-oapi-codegen-extra-tags":{db:"access_token"}},refresh_token:{type:"string",description:"Refresh token value when applicable.","x-order":5,"x-oapi-codegen-extra-tags":{db:"refresh_token"}},name:{type:"string",description:"Human-readable token name.","x-order":6,"x-oapi-codegen-extra-tags":{db:"name"}},purpose:{type:"string",description:"Purpose for which the token was created.","x-order":7,"x-oapi-codegen-extra-tags":{db:"purpose"}},is_oauth:{type:"boolean",description:"Whether this entry represents an OAuth session.","x-order":8,"x-oapi-codegen-extra-tags":{db:"is_oauth"}},created_at:{"x-order":9,description:"Timestamp when the resource was created.","x-go-type":"time.Time",type:"string",format:"date-time","x-go-name":"CreatedAt","x-oapi-codegen-extra-tags":{db:"created_at",yaml:"created_at"},"x-go-type-skip-optional-pointer":true},updated_at:{"x-order":10,description:"Timestamp when the resource was updated.","x-go-type":"time.Time",type:"string",format:"date-time","x-go-name":"UpdatedAt","x-oapi-codegen-extra-tags":{db:"updated_at",yaml:"updated_at"},"x-go-type-skip-optional-pointer":true}}},"x-order":1},total_count:{type:"integer",description:"Total number of tokens across all pages.","x-order":2},page:{type:"integer",description:"Current page number (zero-based).","x-order":3},page_size:{type:"integer",description:"Number of tokens per page.","x-order":4}}}}}},400:{description:"Invalid request body or request param",content:{"text/plain":{schema:{type:"string"}}}},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}}}}},components:{securitySchemes:{jwt:{type:"http",scheme:"bearer",bearerFormat:"JWT"}},responses:{400:{description:"Invalid request body or request param",content:{"text/plain":{schema:{type:"string"}}}},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},404:{description:"Result not found",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}},parameters:{id:{name:"id",in:"path",description:"Token ID",required:true,schema:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}}},page:{name:"page",in:"query",description:"Get responses by page",schema:{type:"string"}},pagesize:{name:"pagesize",in:"query",description:"Get responses by pagesize",schema:{type:"string"}},search:{name:"search",in:"query",description:"Get responses that match search param value",schema:{type:"string"}},order:{name:"order",in:"query",description:"Get ordered responses",schema:{type:"string"}},isOAuth:{name:"isOAuth",in:"query",description:"Whether to retrieve OAuth-backed sessions instead of API tokens.",schema:{type:"boolean"}},name:{name:"name",in:"query",description:"Name of the token.",required:true,schema:{type:"string"}},purpose:{name:"purpose",in:"query",description:"Purpose for which the token is generated.",schema:{type:"string"}},tokenId:{name:"token_id",in:"query",description:"ID of the token.",required:true,schema:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}}},userId:{name:"user_id",in:"query",description:"UUID of the user.",required:true,schema:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}}},provider:{name:"provider",in:"query",description:"Remote provider.",required:true,schema:{type:"string"}}},schemas:{UserToken:{type:"object",description:"Represents a user-owned API token or OAuth session.",properties:{id:{description:"Unique identifier for the token.","x-order":1,"x-oapi-codegen-extra-tags":{db:"id"},type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},user_id:{description:"UUID of the user who owns the token.","x-order":2,"x-oapi-codegen-extra-tags":{db:"user_id"},type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},provider:{type:"string",description:"Authentication provider associated with the token.","x-order":3,"x-oapi-codegen-extra-tags":{db:"provider"}},access_token:{type:"string",description:"Access token value.","x-order":4,"x-oapi-codegen-extra-tags":{db:"access_token"}},refresh_token:{type:"string",description:"Refresh token value when applicable.","x-order":5,"x-oapi-codegen-extra-tags":{db:"refresh_token"}},name:{type:"string",description:"Human-readable token name.","x-order":6,"x-oapi-codegen-extra-tags":{db:"name"}},purpose:{type:"string",description:"Purpose for which the token was created.","x-order":7,"x-oapi-codegen-extra-tags":{db:"purpose"}},is_oauth:{type:"boolean",description:"Whether this entry represents an OAuth session.","x-order":8,"x-oapi-codegen-extra-tags":{db:"is_oauth"}},created_at:{"x-order":9,description:"Timestamp when the resource was created.","x-go-type":"time.Time",type:"string",format:"date-time","x-go-name":"CreatedAt","x-oapi-codegen-extra-tags":{db:"created_at",yaml:"created_at"},"x-go-type-skip-optional-pointer":true},updated_at:{"x-order":10,description:"Timestamp when the resource was updated.","x-go-type":"time.Time",type:"string",format:"date-time","x-go-name":"UpdatedAt","x-oapi-codegen-extra-tags":{db:"updated_at",yaml:"updated_at"},"x-go-type-skip-optional-pointer":true}}},TokenPage:{type:"object",description:"A paginated list of tokens.",required:["tokens","total_count","page","page_size"],properties:{tokens:{type:"array",items:{"x-go-type":"UserToken",type:"object",description:"Represents a user-owned API token or OAuth session.",properties:{id:{description:"Unique identifier for the token.","x-order":1,"x-oapi-codegen-extra-tags":{db:"id"},type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},user_id:{description:"UUID of the user who owns the token.","x-order":2,"x-oapi-codegen-extra-tags":{db:"user_id"},type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}},provider:{type:"string",description:"Authentication provider associated with the token.","x-order":3,"x-oapi-codegen-extra-tags":{db:"provider"}},access_token:{type:"string",description:"Access token value.","x-order":4,"x-oapi-codegen-extra-tags":{db:"access_token"}},refresh_token:{type:"string",description:"Refresh token value when applicable.","x-order":5,"x-oapi-codegen-extra-tags":{db:"refresh_token"}},name:{type:"string",description:"Human-readable token name.","x-order":6,"x-oapi-codegen-extra-tags":{db:"name"}},purpose:{type:"string",description:"Purpose for which the token was created.","x-order":7,"x-oapi-codegen-extra-tags":{db:"purpose"}},is_oauth:{type:"boolean",description:"Whether this entry represents an OAuth session.","x-order":8,"x-oapi-codegen-extra-tags":{db:"is_oauth"}},created_at:{"x-order":9,description:"Timestamp when the resource was created.","x-go-type":"time.Time",type:"string",format:"date-time","x-go-name":"CreatedAt","x-oapi-codegen-extra-tags":{db:"created_at",yaml:"created_at"},"x-go-type-skip-optional-pointer":true},updated_at:{"x-order":10,description:"Timestamp when the resource was updated.","x-go-type":"time.Time",type:"string",format:"date-time","x-go-name":"UpdatedAt","x-oapi-codegen-extra-tags":{db:"updated_at",yaml:"updated_at"},"x-go-type-skip-optional-pointer":true}}},"x-order":1},total_count:{type:"integer",description:"Total number of tokens across all pages.","x-order":2},page:{type:"integer",description:"Current page number (zero-based).","x-order":3},page_size:{type:"integer",description:"Number of tokens per page.","x-order":4}}}}}},t=e;
2
+ module.exports=t;